From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 02:03:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1C987AD4; Sun, 31 Mar 2013 02:03:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CF953C4; Sun, 31 Mar 2013 02:03:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2V23Yka055652; Sun, 31 Mar 2013 02:03:34 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2V23YfI055651; Sun, 31 Mar 2013 02:03:34 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303310203.r2V23YfI055651@svn.freebsd.org> From: Andrew Turner Date: Sun, 31 Mar 2013 02:03:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248937 - 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: Sun, 31 Mar 2013 02:03:35 -0000 Author: andrew Date: Sun Mar 31 02:03:34 2013 New Revision: 248937 URL: http://svnweb.freebsd.org/changeset/base/248937 Log: When building universe ensure the required worlds are finished before starting the kernels. Before this the kernels would be built as part of the last architecture universe target. There can cause problems when this world finishes before the other worlds as the host compiler may be picked up rather than the target compiler. The solution is to add a target to build the universe kernels that depends on all the world targets finishing. As we may not be building a world only depend on it when MAKE_JUST_KERNELS is undefined. Modified: head/Makefile Modified: head/Makefile ============================================================================== --- head/Makefile Sat Mar 30 20:57:35 2013 (r248936) +++ head/Makefile Sun Mar 31 02:03:34 2013 (r248937) @@ -392,6 +392,14 @@ universe_${target}_${target_arch}: unive .endfor .endif .if !defined(MAKE_JUST_WORLDS) +# If we are building world and kernels wait for the required worlds to finish +.if !defined(MAKE_JUST_KERNELS) +.for target_arch in ${TARGET_ARCHES_${target}} +universe_${target}_kernels: universe_${target}_${target_arch} +.endfor +.endif +universe_${target}: universe_${target}_kernels +universe_${target}_kernels: universe_${target}_prologue .if exists(${KERNSRCDIR}/${target}/conf/NOTES) @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=/dev/null \ ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 03:56:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 13A1C25A; Sun, 31 Mar 2013 03:56:49 +0000 (UTC) (envelope-from neel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 01FE183C; Sun, 31 Mar 2013 03:56:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2V3umXZ088638; Sun, 31 Mar 2013 03:56:48 GMT (envelope-from neel@svn.freebsd.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2V3umuS088637; Sun, 31 Mar 2013 03:56:48 GMT (envelope-from neel@svn.freebsd.org) Message-Id: <201303310356.r2V3umuS088637@svn.freebsd.org> From: Neel Natu Date: Sun, 31 Mar 2013 03:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248938 - head/sys/amd64/vmm/io 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: Sun, 31 Mar 2013 03:56:49 -0000 Author: neel Date: Sun Mar 31 03:56:48 2013 New Revision: 248938 URL: http://svnweb.freebsd.org/changeset/base/248938 Log: Add counter to keep track of the number of timer interrupts generated by the local apic for each virtual cpu. Modified: head/sys/amd64/vmm/io/vlapic.c Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Sun Mar 31 02:03:34 2013 (r248937) +++ head/sys/amd64/vmm/io/vlapic.c Sun Mar 31 03:56:48 2013 (r248938) @@ -41,6 +41,7 @@ __FBSDID("$FreeBSD$"); #include +#include "vmm_stat.h" #include "vmm_lapic.h" #include "vmm_ktr.h" #include "vdev.h" @@ -410,6 +411,8 @@ vlapic_periodic_timer(struct vlapic *vla return (vlapic_get_lvt_field(lvt, APIC_LVTT_TM_PERIODIC)); } +static VMM_STAT(VLAPIC_INTR_TIMER, "timer interrupts generated by vlapic"); + static void vlapic_fire_timer(struct vlapic *vlapic) { @@ -419,6 +422,7 @@ vlapic_fire_timer(struct vlapic *vlapic) lvt = vlapic_get_lvt(vlapic, APIC_OFFSET_TIMER_LVT); if (!vlapic_get_lvt_field(lvt, APIC_LVTT_M)) { + vmm_stat_incr(vlapic->vm, vlapic->vcpuid, VLAPIC_INTR_TIMER, 1); vector = vlapic_get_lvt_field(lvt,APIC_LVTT_VECTOR); vlapic_set_intr_ready(vlapic, vector); } From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 04:03:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C1337633; Sun, 31 Mar 2013 04:03:09 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-da0-x22d.google.com (mail-da0-x22d.google.com [IPv6:2607:f8b0:400e:c00::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 8E9EE89D; Sun, 31 Mar 2013 04:03:09 +0000 (UTC) Received: by mail-da0-f45.google.com with SMTP id v40so660905dad.18 for ; Sat, 30 Mar 2013 21:03:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=kjUQvUf6ssKlAbqQBPNein3E0V2z57B9YZnLF+kMi0Y=; b=bhJspNS8fk56Did944bpjU1dwqAOU3SB/Fpn0SLC8o8fIsKv9BWwssRtKu+bdwgD5D YZ3ENeV0yC8lypT2aMOyYYuyRiutli/21X1BcB9Wsd6HL7+VvoKkRJ1dq1uXA3e7zWmO WM+jgUFT2cVMblM5ZPKrCb2FobmWlfRj4i09YPBZ49xwoL1bXJ00IoONP7L94P5yMD3t yefjWhEn+wzpTmmg7QiKlye6e2mi3Qd2/cmqZOp0ceAL6qgGDSotuTopLstN+KY0GTIz 1GWJ4Qu+ec3Te+yK1VxKbsvHNR/IOdoreg3A7DpDke2uk+088w975nETNgV26JsOlQ1V Pkdw== X-Received: by 10.68.164.33 with SMTP id yn1mr11589110pbb.166.1364702589374; Sat, 30 Mar 2013 21:03:09 -0700 (PDT) Received: from [10.151.96.107] (mobile-166-147-082-222.mycingular.net. [166.147.82.222]) by mx.google.com with ESMTPS id i9sm9723208paa.7.2013.03.30.21.03.07 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 30 Mar 2013 21:03:08 -0700 (PDT) References: <201303310203.r2V23YfI055651@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201303310203.r2V23YfI055651@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <10073ABA-A83A-4D20-AD83-01AD611D8F85@gmail.com> X-Mailer: iPhone Mail (10B329) From: Garrett Cooper Subject: Re: svn commit: r248937 - head Date: Sat, 30 Mar 2013 21:03:02 -0700 To: Andrew Turner 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: Sun, 31 Mar 2013 04:03:09 -0000 Awesome--thanks! -Garrett Sent from my iPhone On Mar 30, 2013, at 7:03 PM, Andrew Turner wrote: > Author: andrew > Date: Sun Mar 31 02:03:34 2013 > New Revision: 248937 > URL: http://svnweb.freebsd.org/changeset/base/248937 >=20 > Log: > When building universe ensure the required worlds are finished before > starting the kernels. Before this the kernels would be built as part of t= he > last architecture universe target. There can cause problems when this wor= ld > finishes before the other worlds as the host compiler may be picked up > rather than the target compiler. >=20 > The solution is to add a target to build the universe kernels that depend= s > on all the world targets finishing. As we may not be building a world onl= y > depend on it when MAKE_JUST_KERNELS is undefined. >=20 > Modified: > head/Makefile >=20 > Modified: head/Makefile > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/Makefile Sat Mar 30 20:57:35 2013 (r248936) > +++ head/Makefile Sun Mar 31 02:03:34 2013 (r248937) > @@ -392,6 +392,14 @@ universe_${target}_${target_arch}: unive > .endfor > .endif > .if !defined(MAKE_JUST_WORLDS) > +# If we are building world and kernels wait for the required worlds to fi= nish > +.if !defined(MAKE_JUST_KERNELS) > +.for target_arch in ${TARGET_ARCHES_${target}} > +universe_${target}_kernels: universe_${target}_${target_arch} > +.endfor > +.endif > +universe_${target}: universe_${target}_kernels > +universe_${target}_kernels: universe_${target}_prologue > .if exists(${KERNSRCDIR}/${target}/conf/NOTES) > @(cd ${KERNSRCDIR}/${target}/conf && env __MAKE_CONF=3D/dev/null \ > ${MAKE} LINT > ${.CURDIR}/_.${target}.makeLINT 2>&1 || \ > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 04:10:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E51D481B; Sun, 31 Mar 2013 04:10:38 +0000 (UTC) (envelope-from jamie@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D19938CC; Sun, 31 Mar 2013 04:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2V4Ac5X093735; Sun, 31 Mar 2013 04:10:38 GMT (envelope-from jamie@svn.freebsd.org) Received: (from jamie@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2V4Ac5r093732; Sun, 31 Mar 2013 04:10:38 GMT (envelope-from jamie@svn.freebsd.org) Message-Id: <201303310410.r2V4Ac5r093732@svn.freebsd.org> From: Jamie Gritton Date: Sun, 31 Mar 2013 04:10:38 +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: r248939 - stable/9/usr.sbin/jail 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: Sun, 31 Mar 2013 04:10:39 -0000 Author: jamie Date: Sun Mar 31 04:10:37 2013 New Revision: 248939 URL: http://svnweb.freebsd.org/changeset/base/248939 Log: MFC r248854: Reverse the order of some implicit commands (FS mounts and ifconfigs) when stopping jails. This matters particularly for nested filesystem mounts. PR: kern/177325 Submitted by: Harald Schmalzbauer Modified: stable/9/usr.sbin/jail/command.c stable/9/usr.sbin/jail/config.c stable/9/usr.sbin/jail/jailp.h Directory Properties: stable/9/usr.sbin/jail/ (props changed) Modified: stable/9/usr.sbin/jail/command.c ============================================================================== --- stable/9/usr.sbin/jail/command.c Sun Mar 31 03:56:48 2013 (r248938) +++ stable/9/usr.sbin/jail/command.c Sun Mar 31 04:10:37 2013 (r248939) @@ -88,13 +88,14 @@ int next_command(struct cfjail *j) { enum intparam comparam; - int create_failed; + int create_failed, stopping; if (paralimit == 0) { requeue(j, &runnable); return 1; } create_failed = (j->flags & (JF_STOP | JF_FAILED)) == JF_FAILED; + stopping = (j->flags & JF_STOP) != 0; comparam = *j->comparam; for (;;) { if (j->comstring == NULL) { @@ -113,14 +114,16 @@ next_command(struct cfjail *j) default: if (j->intparams[comparam] == NULL) continue; - j->comstring = create_failed + j->comstring = create_failed || (stopping && + (j->intparams[comparam]->flags & PF_REV)) ? TAILQ_LAST(&j->intparams[comparam]->val, cfstrings) : TAILQ_FIRST(&j->intparams[comparam]->val); } } else { j->comstring = j->comstring == &dummystring ? NULL : - create_failed + create_failed || (stopping && + (j->intparams[comparam]->flags & PF_REV)) ? TAILQ_PREV(j->comstring, cfstrings, tq) : TAILQ_NEXT(j->comstring, tq); } Modified: stable/9/usr.sbin/jail/config.c ============================================================================== --- stable/9/usr.sbin/jail/config.c Sun Mar 31 03:56:48 2013 (r248938) +++ stable/9/usr.sbin/jail/config.c Sun Mar 31 04:10:37 2013 (r248939) @@ -79,18 +79,18 @@ static const struct ipspec intparams[] = [IP_INTERFACE] = {"interface", PF_INTERNAL}, [IP_IP_HOSTNAME] = {"ip_hostname", PF_INTERNAL | PF_BOOL}, #endif - [IP_MOUNT] = {"mount", PF_INTERNAL}, + [IP_MOUNT] = {"mount", PF_INTERNAL | PF_REV}, [IP_MOUNT_DEVFS] = {"mount.devfs", PF_INTERNAL | PF_BOOL}, [IP_MOUNT_FSTAB] = {"mount.fstab", PF_INTERNAL}, [IP_STOP_TIMEOUT] = {"stop.timeout", PF_INTERNAL | PF_INT}, [IP_VNET_INTERFACE] = {"vnet.interface", PF_INTERNAL}, #ifdef INET - [IP__IP4_IFADDR] = {"ip4.addr", PF_INTERNAL | PF_CONV}, + [IP__IP4_IFADDR] = {"ip4.addr", PF_INTERNAL | PF_CONV | PF_REV}, #endif #ifdef INET6 - [IP__IP6_IFADDR] = {"ip6.addr", PF_INTERNAL | PF_CONV}, + [IP__IP6_IFADDR] = {"ip6.addr", PF_INTERNAL | PF_CONV | PF_REV}, #endif - [IP__MOUNT_FROM_FSTAB] = {"mount.fstab", PF_INTERNAL | PF_CONV}, + [IP__MOUNT_FROM_FSTAB] = {"mount.fstab", PF_INTERNAL | PF_CONV | PF_REV}, [IP__OP] = {NULL, PF_CONV}, [KP_ALLOW_CHFLAGS] = {"allow.chflags", 0}, [KP_ALLOW_MOUNT] = {"allow.mount", 0}, Modified: stable/9/usr.sbin/jail/jailp.h ============================================================================== --- stable/9/usr.sbin/jail/jailp.h Sun Mar 31 03:56:48 2013 (r248938) +++ stable/9/usr.sbin/jail/jailp.h Sun Mar 31 04:10:37 2013 (r248939) @@ -50,6 +50,7 @@ #define PF_BOOL 0x10 /* Boolean parameter */ #define PF_INT 0x20 /* Integer parameter */ #define PF_CONV 0x40 /* Parameter duplicated in converted form */ +#define PF_REV 0x80 /* Run commands in reverse order on stopping */ #define JF_START 0x0001 /* -c */ #define JF_SET 0x0002 /* -m */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 08:31:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E6AD41D5; Sun, 31 Mar 2013 08:31:06 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C14CCF9A; Sun, 31 Mar 2013 08:31:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2V8V60H069285; Sun, 31 Mar 2013 08:31:06 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2V8V6b4069284; Sun, 31 Mar 2013 08:31:06 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303310831.r2V8V6b4069284@svn.freebsd.org> From: Andrew Turner Date: Sun, 31 Mar 2013 08:31:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248940 - 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: Sun, 31 Mar 2013 08:31:07 -0000 Author: andrew Date: Sun Mar 31 08:31:06 2013 New Revision: 248940 URL: http://svnweb.freebsd.org/changeset/base/248940 Log: Fix xdev. Clang and libc were not building correctly on older worlds, for example, on 9.1. * To fix clang add an _xb-bootstrap-tools target that mirrors the existing bootstrap-tools target in the full world. * For libc have the compiler use the newly installed includes, and, while here, tell the compiler about the xdev library path as some other libraries will link against the installed libraries. Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 31 04:10:37 2013 (r248939) +++ head/Makefile.inc1 Sun Mar 31 08:31:06 2013 (r248940) @@ -1745,11 +1745,12 @@ CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREF CDENV= ${CDBENV} \ _SHLIBDIRPREFIX=${XDTP} \ TOOLS_PREFIX=${XDTP} -CD2ENV=${CDENV} \ +CD2CFLAGS=-isystem ${XDTP}/usr/include -L${XDTP}/usr/lib -B${XDTP}/usr/lib +CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" \ MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH} -CDTMP= ${MAKEOBJDIRPREFIX}/${XDEV}/${.CURDIR}/tmp -CDMAKE=${CDENV} ${MAKE} ${NOFUN} +CDTMP= ${MAKEOBJDIRPREFIX}/${XDDIR}/${.CURDIR}/tmp +CDMAKE=${CDENV} PATH=${CDTMP}/usr/bin:${PATH} ${MAKE} ${NOFUN} CD2MAKE=${CD2ENV} PATH=${CDTMP}/usr/bin:${XDTP}/usr/bin:${PATH} ${MAKE} ${NOFUN} XDDESTDIR=${DESTDIR}${XDTP} .if !defined(OSREL) @@ -1759,8 +1760,24 @@ OSREL!= uname -r | sed -e 's/[-(].*//' .ORDER: xdev-build xdev-install xdev: xdev-build xdev-install -.ORDER: _xb-build-tools _xb-cross-tools -xdev-build: _xb-build-tools _xb-cross-tools +.ORDER: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools +xdev-build: _xb-worldtmp _xb-bootstrap-tools _xb-build-tools _xb-cross-tools + +_xb-worldtmp: + mkdir -p ${CDTMP}/usr + mtree -deU -f ${.CURDIR}/etc/mtree/BSD.usr.dist \ + -p ${CDTMP}/usr >/dev/null + +_xb-bootstrap-tools: +.for _tool in \ + ${_clang_tblgen} + ${_+_}@${ECHODIR} "===> ${_tool} (obj,depend,all,install)"; \ + cd ${.CURDIR}/${_tool}; \ + ${CDMAKE} DIRPRFX=${_tool}/ obj; \ + ${CDMAKE} DIRPRFX=${_tool}/ depend; \ + ${CDMAKE} DIRPRFX=${_tool}/ all; \ + ${CDMAKE} DIRPRFX=${_tool}/ DESTDIR=${CDTMP} install +.endfor _xb-build-tools: ${_+_}@cd ${.CURDIR}; \ @@ -1770,7 +1787,9 @@ _xb-cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ - usr.bin/ar + usr.bin/ar \ + ${_clang_libs} \ + ${_clang} ${_+_}@${ECHODIR} "===> xdev ${_tool} (obj,depend,all)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ obj; \ @@ -1796,7 +1815,8 @@ _xi-cross-tools: .for _tool in \ gnu/usr.bin/binutils \ gnu/usr.bin/cc \ - usr.bin/ar + usr.bin/ar \ + ${_clang} ${_+_}@${ECHODIR} "===> xdev ${_tool} (install)"; \ cd ${.CURDIR}/${_tool}; \ ${CDMAKE} DIRPRFX=${_tool}/ install DESTDIR=${XDDESTDIR} From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 08:54:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5A77C69F; Sun, 31 Mar 2013 08:54:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4DA0319C; Sun, 31 Mar 2013 08:54:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2V8s5od075406; Sun, 31 Mar 2013 08:54:05 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2V8s5RO075405; Sun, 31 Mar 2013 08:54:05 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201303310854.r2V8s5RO075405@svn.freebsd.org> From: Andrew Turner Date: Sun, 31 Mar 2013 08:54:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248941 - 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: Sun, 31 Mar 2013 08:54:05 -0000 Author: andrew Date: Sun Mar 31 08:54:04 2013 New Revision: 248941 URL: http://svnweb.freebsd.org/changeset/base/248941 Log: Fix xdev-install when installing to a location other than / Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Sun Mar 31 08:31:06 2013 (r248940) +++ head/Makefile.inc1 Sun Mar 31 08:54:04 2013 (r248941) @@ -1743,9 +1743,10 @@ XDTP=/usr/${XDDIR} CDBENV=MAKEOBJDIRPREFIX=${MAKEOBJDIRPREFIX}/${XDDIR} \ INSTALL="sh ${.CURDIR}/tools/install.sh" CDENV= ${CDBENV} \ - _SHLIBDIRPREFIX=${XDTP} \ - TOOLS_PREFIX=${XDTP} -CD2CFLAGS=-isystem ${XDTP}/usr/include -L${XDTP}/usr/lib -B${XDTP}/usr/lib + _SHLIBDIRPREFIX=${XDDESTDIR} \ + TOOLS_PREFIX=${XDDESTDIR} +CD2CFLAGS=-isystem ${XDDESTDIR}/usr/include -L${XDDESTDIR}/usr/lib \ + -B${XDDESTDIR}/usr/lib CD2ENV=${CDENV} CC="${CC} ${CD2CFLAGS}" \ MACHINE=${XDEV} MACHINE_ARCH=${XDEV_ARCH} From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 10:17:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7B7AB6EE; Sun, 31 Mar 2013 10:17:40 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D65460B; Sun, 31 Mar 2013 10:17:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VAHeHm099434; Sun, 31 Mar 2013 10:17:40 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VAHdAh099431; Sun, 31 Mar 2013 10:17:39 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201303311017.r2VAHdAh099431@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 31 Mar 2013 10:17:39 +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: r248942 - stable/8/sys/net 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: Sun, 31 Mar 2013 10:17:40 -0000 Author: melifaro Date: Sun Mar 31 10:17:39 2013 New Revision: 248942 URL: http://svnweb.freebsd.org/changeset/base/248942 Log: Merge r248070. Fix long-standing issue with interface routes being unprotected: Use RTM_PINNED flag to mark route as immutable. Forbid deleting immutable routes without special rtrequest1_fib() flag. Adding interface address with prefix already in route table is handled by atomically deleting old prefix and adding interface one. Modified: stable/8/sys/net/if.c stable/8/sys/net/route.c stable/8/sys/net/route.h Directory Properties: stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/if.c ============================================================================== --- stable/8/sys/net/if.c Sun Mar 31 08:54:04 2013 (r248941) +++ stable/8/sys/net/if.c Sun Mar 31 10:17:39 2013 (r248942) @@ -1412,7 +1412,8 @@ if_rtdel(struct radix_node *rn, void *ar return (0); err = rtrequest_fib(RTM_DELETE, rt_key(rt), rt->rt_gateway, - rt_mask(rt), rt->rt_flags|RTF_RNH_LOCKED, + rt_mask(rt), + rt->rt_flags|RTF_RNH_LOCKED|RTF_PINNED, (struct rtentry **) NULL, rt->rt_fibnum); if (err) { log(LOG_WARNING, "if_rtdel: error %d\n", err); Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Sun Mar 31 08:54:04 2013 (r248941) +++ stable/8/sys/net/route.c Sun Mar 31 10:17:39 2013 (r248942) @@ -1112,6 +1112,14 @@ rtrequest1_fib(int req, struct rt_addrin error = 0; } #endif + if ((flags & RTF_PINNED) == 0) { + /* Check if target route can be deleted */ + rt = (struct rtentry *)rnh->rnh_lookup(dst, + netmask, rnh); + if ((rt != NULL) && (rt->rt_flags & RTF_PINNED)) + senderr(EADDRINUSE); + } + /* * Remove the item from the tree and return it. * Complain if it is not there and do no more processing. @@ -1439,6 +1447,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int int didwork = 0; int a_failure = 0; static struct sockaddr_dl null_sdl = {sizeof(null_sdl), AF_LINK}; + struct radix_node_head *rnh; if (flags & RTF_HOST) { dst = ifa->ifa_dstaddr; @@ -1497,7 +1506,6 @@ rtinit1(struct ifaddr *ifa, int cmd, int */ for ( fibnum = startfib; fibnum <= endfib; fibnum++) { if (cmd == RTM_DELETE) { - struct radix_node_head *rnh; struct radix_node *rn; /* * Look up an rtentry that is in the routing tree and @@ -1547,7 +1555,8 @@ rtinit1(struct ifaddr *ifa, int cmd, int */ bzero((caddr_t)&info, sizeof(info)); info.rti_ifa = ifa; - info.rti_flags = flags | (ifa->ifa_flags & ~IFA_RTSELF); + info.rti_flags = flags | + (ifa->ifa_flags & ~IFA_RTSELF) | RTF_PINNED; info.rti_info[RTAX_DST] = dst; /* * doing this for compatibility reasons @@ -1559,6 +1568,33 @@ rtinit1(struct ifaddr *ifa, int cmd, int info.rti_info[RTAX_GATEWAY] = ifa->ifa_addr; info.rti_info[RTAX_NETMASK] = netmask; error = rtrequest1_fib(cmd, &info, &rt, fibnum); + + if ((error == EEXIST) && (cmd == RTM_ADD)) { + /* + * Interface route addition failed. + * Atomically delete current prefix generating + * RTM_DELETE message, and retry adding + * interface prefix. + */ + rnh = rt_tables_get_rnh(fibnum, dst->sa_family); + RADIX_NODE_HEAD_LOCK(rnh); + + /* Delete old prefix */ + info.rti_ifa = NULL; + info.rti_flags = RTF_RNH_LOCKED; + + error = rtrequest1_fib(RTM_DELETE, &info, &rt, fibnum); + if (error == 0) { + info.rti_ifa = ifa; + info.rti_flags = flags | RTF_RNH_LOCKED | + (ifa->ifa_flags & ~IFA_RTSELF) | RTF_PINNED; + error = rtrequest1_fib(cmd, &info, &rt, fibnum); + } + + RADIX_NODE_HEAD_UNLOCK(rnh); + } + + if (error == 0 && rt != NULL) { /* * notify any listening routing agents of the change Modified: stable/8/sys/net/route.h ============================================================================== --- stable/8/sys/net/route.h Sun Mar 31 08:54:04 2013 (r248941) +++ stable/8/sys/net/route.h Sun Mar 31 10:17:39 2013 (r248942) @@ -171,7 +171,7 @@ struct ortentry { /* 0x20000 unused, was RTF_WASCLONED */ #define RTF_PROTO3 0x40000 /* protocol specific routing flag */ /* 0x80000 unused */ -#define RTF_PINNED 0x100000 /* future use */ +#define RTF_PINNED 0x100000 /* route is immutable */ #define RTF_LOCAL 0x200000 /* route represents a local address */ #define RTF_BROADCAST 0x400000 /* route represents a bcast address */ #define RTF_MULTICAST 0x800000 /* route represents a mcast address */ From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 10:20:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A527D8C5; Sun, 31 Mar 2013 10:20:29 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 97D0A61E; Sun, 31 Mar 2013 10:20:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VAKTgV001371; Sun, 31 Mar 2013 10:20:29 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VAKTuU001370; Sun, 31 Mar 2013 10:20:29 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201303311020.r2VAKTuU001370@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Sun, 31 Mar 2013 10:20:29 +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: r248943 - stable/8/sys/net 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: Sun, 31 Mar 2013 10:20:29 -0000 Author: melifaro Date: Sun Mar 31 10:20:29 2013 New Revision: 248943 URL: http://svnweb.freebsd.org/changeset/base/248943 Log: MFC r247842. Write lock is not required for find&compare operation. Modified: stable/8/sys/net/route.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/net/ (props changed) Modified: stable/8/sys/net/route.c ============================================================================== --- stable/8/sys/net/route.c Sun Mar 31 10:17:39 2013 (r248942) +++ stable/8/sys/net/route.c Sun Mar 31 10:20:29 2013 (r248943) @@ -1515,7 +1515,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int if (rnh == NULL) /* this table doesn't exist but others might */ continue; - RADIX_NODE_HEAD_LOCK(rnh); + RADIX_NODE_HEAD_RLOCK(rnh); #ifdef RADIX_MPATH if (rn_mpath_capable(rnh)) { @@ -1544,7 +1544,7 @@ rtinit1(struct ifaddr *ifa, int cmd, int (rn->rn_flags & RNF_ROOT) || RNTORT(rn)->rt_ifa != ifa || !sa_equal((struct sockaddr *)rn->rn_key, dst)); - RADIX_NODE_HEAD_UNLOCK(rnh); + RADIX_NODE_HEAD_RUNLOCK(rnh); if (error) { /* this is only an error if bad on ALL tables */ continue; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 12:51:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4CC42455; Sun, 31 Mar 2013 12:51:57 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3EFA7B59; Sun, 31 Mar 2013 12:51:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VCpuwS044975; Sun, 31 Mar 2013 12:51:56 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VCpuxl044974; Sun, 31 Mar 2013 12:51:56 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303311251.r2VCpuxl044974@svn.freebsd.org> From: Ian Lepore Date: Sun, 31 Mar 2013 12:51:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248944 - head/sys/arm/at91 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: Sun, 31 Mar 2013 12:51:57 -0000 Author: ian Date: Sun Mar 31 12:51:56 2013 New Revision: 248944 URL: http://svnweb.freebsd.org/changeset/base/248944 Log: Fix a typo in the CF device driver name that prevented instantiation. Modified: head/sys/arm/at91/at91rm9200.c Modified: head/sys/arm/at91/at91rm9200.c ============================================================================== --- head/sys/arm/at91/at91rm9200.c Sun Mar 31 10:20:29 2013 (r248943) +++ head/sys/arm/at91/at91rm9200.c Sun Mar 31 12:51:56 2013 (r248944) @@ -125,7 +125,7 @@ static const struct cpu_devs at91_devs[] DEVICE("at91_tc", TC0, 0), DEVICE("at91_tc", TC1, 1), DEVICE("ohci", OHCI, 0), - DEVICE("af91_cfata", CF, 0), + DEVICE("at91_cfata", CF, 0), { 0, 0, 0, 0, 0 } }; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 13:54:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C4E58473; Sun, 31 Mar 2013 13:54:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A6CA2DD3; Sun, 31 Mar 2013 13:54:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VDsi1Z063158; Sun, 31 Mar 2013 13:54:44 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VDsifr063157; Sun, 31 Mar 2013 13:54:44 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303311354.r2VDsifr063157@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 13:54:44 +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: r248945 - stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sun, 31 Mar 2013 13:54:44 -0000 Author: avg Date: Sun Mar 31 13:54:44 2013 New Revision: 248945 URL: http://svnweb.freebsd.org/changeset/base/248945 Log: MFC r246293: zfs: fix, improve and re-organize page_lookup and page_unlock Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Mar 31 12:51:56 2013 (r248944) +++ stable/9/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Mar 31 13:54:44 2013 (r248945) @@ -322,7 +322,7 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt } static vm_page_t -page_lookup(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) +page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) { vm_object_t obj; vm_page_t pp; @@ -332,7 +332,7 @@ page_lookup(vnode_t *vp, int64_t start, for (;;) { if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && - vm_page_is_valid(pp, (vm_offset_t)off, nbytes)) { + pp->valid) { if ((pp->oflags & VPO_BUSY) != 0) { /* * Reference the page before unlocking and @@ -343,25 +343,74 @@ page_lookup(vnode_t *vp, int64_t start, vm_page_sleep(pp, "zfsmwb"); continue; } - vm_page_busy(pp); - vm_page_undirty(pp); } else { - if (__predict_false(obj->cache != NULL)) { - vm_page_cache_free(obj, OFF_TO_IDX(start), - OFF_TO_IDX(start) + 1); + pp = vm_page_alloc(obj, OFF_TO_IDX(start), + VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | + VM_ALLOC_NOBUSY); + } + + if (pp != NULL) { + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); + vm_object_pip_add(obj, 1); + vm_page_io_start(pp); + pmap_remove_write(pp); + vm_page_clear_dirty(pp, off, nbytes); + } + break; + } + return (pp); +} + +static void +page_unbusy(vm_page_t pp) +{ + + vm_page_io_finish(pp); + vm_object_pip_subtract(pp->object, 1); +} + +static vm_page_t +page_hold(vnode_t *vp, int64_t start) +{ + vm_object_t obj; + vm_page_t pp; + + obj = vp->v_object; + VM_OBJECT_LOCK_ASSERT(obj, MA_OWNED); + + for (;;) { + if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && + pp->valid) { + if ((pp->oflags & VPO_BUSY) != 0) { + /* + * Reference the page before unlocking and + * sleeping so that the page daemon is less + * likely to reclaim it. + */ + vm_page_reference(pp); + vm_page_sleep(pp, "zfsmwb"); + continue; } + + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); + vm_page_lock(pp); + vm_page_hold(pp); + vm_page_unlock(pp); + + } else pp = NULL; - } break; } return (pp); } static void -page_unlock(vm_page_t pp) +page_unhold(vm_page_t pp) { - vm_page_wakeup(pp); + vm_page_lock(pp); + vm_page_unhold(pp); + vm_page_unlock(pp); } static caddr_t @@ -392,6 +441,7 @@ update_pages(vnode_t *vp, int64_t start, { vm_object_t obj; struct sf_buf *sf; + caddr_t va; int off; ASSERT(vp->v_mount != NULL); @@ -402,27 +452,44 @@ update_pages(vnode_t *vp, int64_t start, VM_OBJECT_LOCK(obj); for (start &= PAGEMASK; len > 0; start += PAGESIZE) { vm_page_t pp; - int nbytes = MIN(PAGESIZE - off, len); + int nbytes = imin(PAGESIZE - off, len); - if ((pp = page_lookup(vp, start, off, nbytes)) != NULL) { - caddr_t va; + if (segflg == UIO_NOCOPY) { + pp = vm_page_lookup(obj, OFF_TO_IDX(start)); + KASSERT(pp != NULL, + ("zfs update_pages: NULL page in putpages case")); + KASSERT(off == 0, + ("zfs update_pages: unaligned data in putpages case")); + KASSERT(pp->valid == VM_PAGE_BITS_ALL, + ("zfs update_pages: invalid page in putpages case")); + KASSERT(pp->busy > 0, + ("zfs update_pages: unbusy page in putpages case")); + KASSERT(!pmap_page_is_write_mapped(pp), + ("zfs update_pages: writable page in putpages case")); + VM_OBJECT_UNLOCK(obj); + + va = zfs_map_page(pp, &sf); + (void) dmu_write(os, oid, start, nbytes, va, tx); + zfs_unmap_page(sf); + VM_OBJECT_LOCK(obj); + vm_page_undirty(pp); + } else if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { VM_OBJECT_UNLOCK(obj); + va = zfs_map_page(pp, &sf); - if (segflg == UIO_NOCOPY) { - (void) dmu_write(os, oid, start+off, nbytes, - va+off, tx); - } else { - (void) dmu_read(os, oid, start+off, nbytes, - va+off, DMU_READ_PREFETCH); - } + (void) dmu_read(os, oid, start+off, nbytes, + va+off, DMU_READ_PREFETCH);; zfs_unmap_page(sf); + VM_OBJECT_LOCK(obj); - page_unlock(pp); + page_unbusy(pp); } len -= nbytes; off = 0; } + if (segflg != UIO_NOCOPY) + vm_object_pip_wakeupn(obj, 0); VM_OBJECT_UNLOCK(obj); } @@ -524,7 +591,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ vm_page_t pp; uint64_t bytes = MIN(PAGESIZE - off, len); - if (pp = page_lookup(vp, start, off, bytes)) { + if (pp = page_hold(vp, start)) { struct sf_buf *sf; caddr_t va; @@ -533,7 +600,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ error = uiomove(va + off, bytes, UIO_READ, uio); zfs_unmap_page(sf); VM_OBJECT_LOCK(obj); - page_unlock(pp); + page_unhold(pp); } else { VM_OBJECT_UNLOCK(obj); error = dmu_read_uio(os, zp->z_id, uio, bytes); From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 13:56:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 34CC15F0; Sun, 31 Mar 2013 13:56:14 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1842CDE3; Sun, 31 Mar 2013 13:56:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VDuDeF063455; Sun, 31 Mar 2013 13:56:13 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VDuDr2063454; Sun, 31 Mar 2013 13:56:13 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303311356.r2VDuDr2063454@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 13:56:13 +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: r248946 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sun, 31 Mar 2013 13:56:14 -0000 Author: avg Date: Sun Mar 31 13:56:13 2013 New Revision: 248946 URL: http://svnweb.freebsd.org/changeset/base/248946 Log: MFC r246293: zfs: fix, improve and re-organize page_lookup and page_unlock Please note that because of the significant VM API differences between HEAD and stable/8 this commit has some additional changes. Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Mar 31 13:54:44 2013 (r248945) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Mar 31 13:56:13 2013 (r248946) @@ -323,7 +323,7 @@ zfs_ioctl(vnode_t *vp, u_long com, intpt } static vm_page_t -page_lookup(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) +page_busy(vnode_t *vp, int64_t start, int64_t off, int64_t nbytes) { vm_object_t obj; vm_page_t pp; @@ -333,19 +333,23 @@ page_lookup(vnode_t *vp, int64_t start, for (;;) { if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && - vm_page_is_valid(pp, (vm_offset_t)off, nbytes)) { + pp->valid) { if (vm_page_sleep_if_busy(pp, FALSE, "zfsmwb")) continue; - vm_page_busy(pp); + } else { + pp = vm_page_alloc(obj, OFF_TO_IDX(start), + VM_ALLOC_SYSTEM | VM_ALLOC_IFCACHED | + VM_ALLOC_NOBUSY); + } + + if (pp != NULL) { + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); + vm_object_pip_add(obj, 1); + vm_page_io_start(pp); vm_page_lock_queues(); - vm_page_undirty(pp); + pmap_remove_write(pp); + vm_page_clear_dirty(pp, off, nbytes); vm_page_unlock_queues(); - } else { - if (__predict_false(obj->cache != NULL)) { - vm_page_cache_free(obj, OFF_TO_IDX(start), - OFF_TO_IDX(start) + 1); - } - pp = NULL; } break; } @@ -353,10 +357,46 @@ page_lookup(vnode_t *vp, int64_t start, } static void -page_unlock(vm_page_t pp) +page_unbusy(vm_page_t pp) { - vm_page_wakeup(pp); + vm_page_io_finish(pp); + vm_object_pip_subtract(pp->object, 1); +} + +static vm_page_t +page_hold(vnode_t *vp, int64_t start) +{ + vm_object_t obj; + vm_page_t pp; + + obj = vp->v_object; + VM_OBJECT_LOCK_ASSERT(obj, MA_OWNED); + + for (;;) { + if ((pp = vm_page_lookup(obj, OFF_TO_IDX(start))) != NULL && + pp->valid) { + if (vm_page_sleep_if_busy(pp, FALSE, "zfsmwb")) + continue; + ASSERT3U(pp->valid, ==, VM_PAGE_BITS_ALL); + vm_page_lock_queues(); + vm_page_hold(pp); + vm_page_unlock_queues(); + + } else + pp = NULL; + break; + } + return (pp); +} + +static void +page_unhold(vm_page_t pp) +{ + + vm_page_lock_queues(); + vm_page_unhold(pp); + vm_page_unlock_queues(); } static caddr_t @@ -387,6 +427,7 @@ update_pages(vnode_t *vp, int64_t start, { vm_object_t obj; struct sf_buf *sf; + caddr_t va; int off; ASSERT(vp->v_mount != NULL); @@ -397,27 +438,44 @@ update_pages(vnode_t *vp, int64_t start, VM_OBJECT_LOCK(obj); for (start &= PAGEMASK; len > 0; start += PAGESIZE) { vm_page_t pp; - int nbytes = MIN(PAGESIZE - off, len); + int nbytes = imin(PAGESIZE - off, len); - if ((pp = page_lookup(vp, start, off, nbytes)) != NULL) { - caddr_t va; + if (segflg == UIO_NOCOPY) { + pp = vm_page_lookup(obj, OFF_TO_IDX(start)); + KASSERT(pp != NULL, + ("zfs update_pages: NULL page in putpages case")); + KASSERT(off == 0, + ("zfs update_pages: unaligned data in putpages case")); + KASSERT(pp->valid == VM_PAGE_BITS_ALL, + ("zfs update_pages: invalid page in putpages case")); + KASSERT(pp->busy > 0, + ("zfs update_pages: unbusy page in putpages case")); + KASSERT(!pmap_page_is_write_mapped(pp), + ("zfs update_pages: writable page in putpages case")); + VM_OBJECT_UNLOCK(obj); + + va = zfs_map_page(pp, &sf); + (void) dmu_write(os, oid, start, nbytes, va, tx); + zfs_unmap_page(sf); + VM_OBJECT_LOCK(obj); + vm_page_undirty(pp); + } else if ((pp = page_busy(vp, start, off, nbytes)) != NULL) { VM_OBJECT_UNLOCK(obj); + va = zfs_map_page(pp, &sf); - if (segflg == UIO_NOCOPY) { - (void) dmu_write(os, oid, start+off, nbytes, - va+off, tx); - } else { - (void) dmu_read(os, oid, start+off, nbytes, - va+off, DMU_READ_PREFETCH); - } + (void) dmu_read(os, oid, start+off, nbytes, + va+off, DMU_READ_PREFETCH);; zfs_unmap_page(sf); + VM_OBJECT_LOCK(obj); - page_unlock(pp); + page_unbusy(pp); } len -= nbytes; off = 0; } + if (segflg != UIO_NOCOPY) + vm_object_pip_wakeupn(obj, 0); VM_OBJECT_UNLOCK(obj); } @@ -532,7 +590,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ vm_page_t pp; uint64_t bytes = MIN(PAGESIZE - off, len); - if (pp = page_lookup(vp, start, off, bytes)) { + if (pp = page_hold(vp, start)) { struct sf_buf *sf; caddr_t va; VM_OBJECT_UNLOCK(obj); @@ -540,7 +598,7 @@ mappedread(vnode_t *vp, int nbytes, uio_ error = uiomove(va + off, bytes, UIO_READ, uio); zfs_unmap_page(sf); VM_OBJECT_LOCK(obj); - page_unlock(pp); + page_unhold(pp); } else { VM_OBJECT_UNLOCK(obj); error = dmu_read_uio(os, zp->z_id, uio, bytes); From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 14:02:28 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D8D1B81E; Sun, 31 Mar 2013 14:02:28 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C9C56E10; Sun, 31 Mar 2013 14:02:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VE2SMw065992; Sun, 31 Mar 2013 14:02:28 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VE2SSc065991; Sun, 31 Mar 2013 14:02:28 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303311402.r2VE2SSc065991@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 14:02:28 +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: r248947 - stable/9/sys/cddl/dev/fbt 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: Sun, 31 Mar 2013 14:02:28 -0000 Author: avg Date: Sun Mar 31 14:02:28 2013 New Revision: 248947 URL: http://svnweb.freebsd.org/changeset/base/248947 Log: MFC r248640: fbt_typoff_init: fix an off by one in determining required memory size Modified: stable/9/sys/cddl/dev/fbt/fbt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/9/sys/cddl/dev/fbt/fbt.c Sun Mar 31 13:56:13 2013 (r248946) +++ stable/9/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:02:28 2013 (r248947) @@ -777,6 +777,8 @@ fbt_typoff_init(linker_ctf_t *lc) pop[kind]++; } + /* account for a sentinel value below */ + ctf_typemax++; *lc->typlenp = ctf_typemax; if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL) From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 14:02:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D52FA97A; Sun, 31 Mar 2013 14:02:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C7E6AE13; Sun, 31 Mar 2013 14:02:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VE2h4t066062; Sun, 31 Mar 2013 14:02:43 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VE2hM8066061; Sun, 31 Mar 2013 14:02:43 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303311402.r2VE2hM8066061@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 14:02:43 +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: r248948 - stable/8/sys/cddl/dev/fbt 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: Sun, 31 Mar 2013 14:02:43 -0000 Author: avg Date: Sun Mar 31 14:02:43 2013 New Revision: 248948 URL: http://svnweb.freebsd.org/changeset/base/248948 Log: MFC r248640: fbt_typoff_init: fix an off by one in determining required memory size Modified: stable/8/sys/cddl/dev/fbt/fbt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/8/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:02:28 2013 (r248947) +++ stable/8/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:02:43 2013 (r248948) @@ -777,6 +777,8 @@ fbt_typoff_init(linker_ctf_t *lc) pop[kind]++; } + /* account for a sentinel value below */ + ctf_typemax++; *lc->typlenp = ctf_typemax; if ((xp = malloc(sizeof(uint32_t) * ctf_typemax, M_LINKER, M_ZERO | M_WAITOK)) == NULL) From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 14:10:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9264EBC2; Sun, 31 Mar 2013 14:10:20 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 851DCE40; Sun, 31 Mar 2013 14:10:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VEAKis068557; Sun, 31 Mar 2013 14:10:20 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VEAKXj068556; Sun, 31 Mar 2013 14:10:20 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303311410.r2VEAKXj068556@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 14:10: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: r248949 - stable/9/sys/cddl/dev/fbt 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: Sun, 31 Mar 2013 14:10:20 -0000 Author: avg Date: Sun Mar 31 14:10:19 2013 New Revision: 248949 URL: http://svnweb.freebsd.org/changeset/base/248949 Log: MFC r248642: fbt_getargdesc: correctly handle types for return probes Modified: stable/9/sys/cddl/dev/fbt/fbt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/9/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:02:43 2013 (r248948) +++ stable/9/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:10:19 2013 (r248949) @@ -1260,6 +1260,11 @@ fbt_getargdesc(void *arg __unused, dtrac uint32_t offset; ushort_t info, kind, n; + if (fbt->fbtp_roffset != 0 && desc->dtargd_ndx == 0) { + (void) strcpy(desc->dtargd_native, "int"); + return; + } + desc->dtargd_ndx = DTRACE_ARGNONE; /* Get a pointer to the CTF data and it's length. */ @@ -1310,12 +1315,19 @@ fbt_getargdesc(void *arg __unused, dtrac return; } - /* Check if the requested argument doesn't exist. */ - if (ndx >= n) - return; + if (fbt->fbtp_roffset != 0) { + /* Only return type is available for args[1] in return probe. */ + if (ndx > 1) + return; + ASSERT(ndx == 1); + } else { + /* Check if the requested argument doesn't exist. */ + if (ndx >= n) + return; - /* Skip the return type and arguments up to the one requested. */ - dp += ndx + 1; + /* Skip the return type and arguments up to the one requested. */ + dp += ndx + 1; + } if (fbt_type_name(&lc, *dp, desc->dtargd_native, sizeof(desc->dtargd_native)) > 0) desc->dtargd_ndx = ndx; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 14:10:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3F793DBB; Sun, 31 Mar 2013 14:10:50 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 31E3FE4C; Sun, 31 Mar 2013 14:10:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VEAo7u068792; Sun, 31 Mar 2013 14:10:50 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VEAoHr068791; Sun, 31 Mar 2013 14:10:50 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303311410.r2VEAoHr068791@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 14:10:50 +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: r248950 - stable/8/sys/cddl/dev/fbt 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: Sun, 31 Mar 2013 14:10:50 -0000 Author: avg Date: Sun Mar 31 14:10:49 2013 New Revision: 248950 URL: http://svnweb.freebsd.org/changeset/base/248950 Log: MFC r248642: fbt_getargdesc: correctly handle types for return probes Modified: stable/8/sys/cddl/dev/fbt/fbt.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) Modified: stable/8/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/8/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:10:19 2013 (r248949) +++ stable/8/sys/cddl/dev/fbt/fbt.c Sun Mar 31 14:10:49 2013 (r248950) @@ -1260,6 +1260,11 @@ fbt_getargdesc(void *arg __unused, dtrac uint32_t offset; ushort_t info, kind, n; + if (fbt->fbtp_roffset != 0 && desc->dtargd_ndx == 0) { + (void) strcpy(desc->dtargd_native, "int"); + return; + } + desc->dtargd_ndx = DTRACE_ARGNONE; /* Get a pointer to the CTF data and it's length. */ @@ -1310,12 +1315,19 @@ fbt_getargdesc(void *arg __unused, dtrac return; } - /* Check if the requested argument doesn't exist. */ - if (ndx >= n) - return; + if (fbt->fbtp_roffset != 0) { + /* Only return type is available for args[1] in return probe. */ + if (ndx > 1) + return; + ASSERT(ndx == 1); + } else { + /* Check if the requested argument doesn't exist. */ + if (ndx >= n) + return; - /* Skip the return type and arguments up to the one requested. */ - dp += ndx + 1; + /* Skip the return type and arguments up to the one requested. */ + dp += ndx + 1; + } if (fbt_type_name(&lc, *dp, desc->dtargd_native, sizeof(desc->dtargd_native)) > 0) desc->dtargd_ndx = ndx; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 17:42:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2A58BA43; Sun, 31 Mar 2013 17:42:55 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0424985A; Sun, 31 Mar 2013 17:42:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VHgsUW030573; Sun, 31 Mar 2013 17:42:54 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VHgsCU030570; Sun, 31 Mar 2013 17:42:54 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201303311742.r2VHgsCU030570@svn.freebsd.org> From: Jilles Tjoelker Date: Sun, 31 Mar 2013 17:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248951 - in head/sys: compat/linux kern sys 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: Sun, 31 Mar 2013 17:42:55 -0000 Author: jilles Date: Sun Mar 31 17:42:54 2013 New Revision: 248951 URL: http://svnweb.freebsd.org/changeset/base/248951 Log: Rename do_pipe() to kern_pipe2() and declare it properly. Modified: head/sys/compat/linux/linux_file.c head/sys/kern/sys_pipe.c head/sys/sys/syscallsubr.h Modified: head/sys/compat/linux/linux_file.c ============================================================================== --- head/sys/compat/linux/linux_file.c Sun Mar 31 14:10:49 2013 (r248950) +++ head/sys/compat/linux/linux_file.c Sun Mar 31 17:42:54 2013 (r248951) @@ -70,9 +70,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* XXX */ -int do_pipe(struct thread *td, int fildes[2], int flags); - int linux_creat(struct thread *td, struct linux_creat_args *args) { @@ -1584,7 +1581,7 @@ linux_pipe(struct thread *td, struct lin printf(ARGS(pipe, "*")); #endif - error = do_pipe(td, fildes, 0); + error = kern_pipe2(td, fildes, 0); if (error) return (error); @@ -1611,7 +1608,7 @@ linux_pipe2(struct thread *td, struct li flags |= O_NONBLOCK; if ((args->flags & LINUX_O_CLOEXEC) != 0) flags |= O_CLOEXEC; - error = do_pipe(td, fildes, flags); + error = kern_pipe2(td, fildes, flags); if (error) return (error); Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Sun Mar 31 14:10:49 2013 (r248950) +++ head/sys/kern/sys_pipe.c Sun Mar 31 17:42:54 2013 (r248951) @@ -129,9 +129,6 @@ __FBSDID("$FreeBSD$"); #include #include -/* XXX */ -int do_pipe(struct thread *td, int fildes[2], int flags); - /* * Use this define if you want to disable *fancy* VM things. Expect an * approx 30% decrease in transfer rate. This could be useful for @@ -408,11 +405,11 @@ int kern_pipe(struct thread *td, int fildes[2]) { - return (do_pipe(td, fildes, 0)); + return (kern_pipe2(td, fildes, 0)); } int -do_pipe(struct thread *td, int fildes[2], int flags) +kern_pipe2(struct thread *td, int fildes[2], int flags) { struct filedesc *fdp; struct file *rf, *wf; Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Sun Mar 31 14:10:49 2013 (r248950) +++ head/sys/sys/syscallsubr.h Sun Mar 31 17:42:54 2013 (r248951) @@ -156,6 +156,7 @@ int kern_openat(struct thread *td, int f int kern_pathconf(struct thread *td, char *path, enum uio_seg pathseg, int name, u_long flags); int kern_pipe(struct thread *td, int fildes[2]); +int kern_pipe2(struct thread *td, int fildes[2], int flags); int kern_posix_fadvise(struct thread *td, int fd, off_t offset, off_t len, int advice); int kern_posix_fallocate(struct thread *td, int fd, off_t offset, From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 18:27:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A9B28F9E; Sun, 31 Mar 2013 18:27:46 +0000 (UTC) (envelope-from tuexen@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9BA9A97A; Sun, 31 Mar 2013 18:27:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VIRkd6042925; Sun, 31 Mar 2013 18:27:46 GMT (envelope-from tuexen@svn.freebsd.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VIRkWG042924; Sun, 31 Mar 2013 18:27:46 GMT (envelope-from tuexen@svn.freebsd.org) Message-Id: <201303311827.r2VIRkWG042924@svn.freebsd.org> From: Michael Tuexen Date: Sun, 31 Mar 2013 18:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248953 - 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: Sun, 31 Mar 2013 18:27:46 -0000 Author: tuexen Date: Sun Mar 31 18:27:46 2013 New Revision: 248953 URL: http://svnweb.freebsd.org/changeset/base/248953 Log: Add a macro for checking for IPv4 link local addresses. MFC after: 1 week Modified: head/sys/netinet/sctp_constants.h Modified: head/sys/netinet/sctp_constants.h ============================================================================== --- head/sys/netinet/sctp_constants.h Sun Mar 31 17:50:01 2013 (r248952) +++ head/sys/netinet/sctp_constants.h Sun Mar 31 18:27:46 2013 (r248953) @@ -997,6 +997,10 @@ __FBSDID("$FreeBSD$"); (((uint8_t *)&(a)->s_addr)[2] == 0) && \ (((uint8_t *)&(a)->s_addr)[3] == 1)) +#define IN4_ISLINKLOCAL_ADDRESS(a) \ + ((((uint8_t *)&(a)->s_addr)[0] == 169) && \ + (((uint8_t *)&(a)->s_addr)[1] == 254)) + #if defined(_KERNEL) #define SCTP_GETTIME_TIMEVAL(x) (getmicrouptime(x)) From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 18:31:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AE3A2209; Sun, 31 Mar 2013 18:31:59 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F00A9A6; Sun, 31 Mar 2013 18:31:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VIVxPq045163; Sun, 31 Mar 2013 18:31:59 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VIVxKq045160; Sun, 31 Mar 2013 18:31:59 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303311831.r2VIVxKq045160@svn.freebsd.org> From: Martin Matuska Date: Sun, 31 Mar 2013 18:31:59 +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: r248954 - in stable/8: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sun, 31 Mar 2013 18:31:59 -0000 Author: mm Date: Sun Mar 31 18:31:58 2013 New Revision: 248954 URL: http://svnweb.freebsd.org/changeset/base/248954 Log: MFC r247852: Import ZFS bpobj bugfix from vendor. Illumos ZFS issues: 3603 panic from bpobj_enqueue_subobj() 3604 zdb should print bpobjs more verbosely Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:27:46 2013 (r248953) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:31:58 2013 (r248954) @@ -1189,7 +1189,7 @@ dump_bpobj_cb(void *arg, const blkptr_t } static void -dump_bpobj(bpobj_t *bpo, char *name) +dump_bpobj(bpobj_t *bpo, char *name, int indent) { char bytes[32]; char comp[32]; @@ -1199,31 +1199,56 @@ dump_bpobj(bpobj_t *bpo, char *name) return; zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes); - if (bpo->bpo_havesubobj) { + if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) { zdb_nicenum(bpo->bpo_phys->bpo_comp, comp); zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp); - (void) printf("\n %s: %llu local blkptrs, %llu subobjs, " - "%s (%s/%s comp)\n", - name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, + (void) printf(" %*s: object %llu, %llu local blkptrs, " + "%llu subobjs, %s (%s/%s comp)\n", + indent * 8, name, + (u_longlong_t)bpo->bpo_object, + (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, (u_longlong_t)bpo->bpo_phys->bpo_num_subobjs, bytes, comp, uncomp); + + for (uint64_t i = 0; i < bpo->bpo_phys->bpo_num_subobjs; i++) { + uint64_t subobj; + bpobj_t subbpo; + int error; + VERIFY0(dmu_read(bpo->bpo_os, + bpo->bpo_phys->bpo_subobjs, + i * sizeof (subobj), sizeof (subobj), &subobj, 0)); + error = bpobj_open(&subbpo, bpo->bpo_os, subobj); + if (error != 0) { + (void) printf("ERROR %u while trying to open " + "subobj id %llu\n", + error, (u_longlong_t)subobj); + continue; + } + dump_bpobj(&subbpo, "subobj", indent + 1); + } } else { - (void) printf("\n %s: %llu blkptrs, %s\n", - name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, bytes); + (void) printf(" %*s: object %llu, %llu blkptrs, %s\n", + indent * 8, name, + (u_longlong_t)bpo->bpo_object, + (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, + bytes); } if (dump_opt['d'] < 5) return; - (void) printf("\n"); - (void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL); + if (indent == 0) { + (void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL); + (void) printf("\n"); + } } static void dump_deadlist(dsl_deadlist_t *dl) { dsl_deadlist_entry_t *dle; + uint64_t unused; char bytes[32]; char comp[32]; char uncomp[32]; @@ -1242,14 +1267,24 @@ dump_deadlist(dsl_deadlist_t *dl) (void) printf("\n"); + /* force the tree to be loaded */ + dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); + for (dle = avl_first(&dl->dl_tree); dle; dle = AVL_NEXT(&dl->dl_tree, dle)) { - (void) printf(" mintxg %llu -> obj %llu\n", - (longlong_t)dle->dle_mintxg, - (longlong_t)dle->dle_bpobj.bpo_object); + if (dump_opt['d'] >= 5) { + char buf[128]; + (void) snprintf(buf, sizeof (buf), "mintxg %llu -> ", + (longlong_t)dle->dle_mintxg, + (longlong_t)dle->dle_bpobj.bpo_object); - if (dump_opt['d'] >= 5) - dump_bpobj(&dle->dle_bpobj, ""); + dump_bpobj(&dle->dle_bpobj, buf, 0); + } else { + (void) printf("mintxg %llu -> obj %llu\n", + (longlong_t)dle->dle_mintxg, + (longlong_t)dle->dle_bpobj.bpo_object); + + } } } @@ -1272,7 +1307,7 @@ fuid_table_destroy() * print uid or gid information. * For normal POSIX id just the id is printed in decimal format. * For CIFS files with FUID the fuid is printed in hex followed by - * the doman-rid string. + * the domain-rid string. */ static void print_idstr(uint64_t id, const char *id_type) @@ -2529,10 +2564,11 @@ dump_zpool(spa_t *spa) if (dump_opt['d'] || dump_opt['i']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { - dump_bpobj(&spa->spa_deferred_bpobj, "Deferred frees"); + dump_bpobj(&spa->spa_deferred_bpobj, + "Deferred frees", 0); if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj, - "Pool snapshot frees"); + "Pool snapshot frees", 0); } if (spa_feature_is_active(spa, Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Sun Mar 31 18:27:46 2013 (r248953) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Sun Mar 31 18:31:58 2013 (r248954) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -414,6 +414,12 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint6 VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs, 0, FTAG, &subdb, 0)); + /* + * Make sure that we are not asking dmu_write() + * to write more data than we have in our buffer. + */ + VERIFY3U(subdb->db_size, >=, + numsubsub * sizeof (subobj)); dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj), numsubsub * sizeof (subobj), subdb->db_data, tx); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sun Mar 31 18:27:46 2013 (r248953) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sun Mar 31 18:31:58 2013 (r248954) @@ -1712,7 +1712,7 @@ dmu_object_info_from_dnode(dnode_t *dn, doi->doi_checksum = dn->dn_checksum; doi->doi_compress = dn->dn_compress; doi->doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) >> 9; - doi->doi_max_offset = (dnp->dn_maxblkid + 1) * dn->dn_datablksz; + doi->doi_max_offset = (dn->dn_maxblkid + 1) * dn->dn_datablksz; doi->doi_fill_count = 0; for (int i = 0; i < dnp->dn_nblkptr; i++) doi->doi_fill_count += dnp->dn_blkptr[i].blk_fill; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 18:35:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9DFC0383; Sun, 31 Mar 2013 18:35:03 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8DF449B3; Sun, 31 Mar 2013 18:35:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VIZ3Xo045640; Sun, 31 Mar 2013 18:35:03 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VIZ3fJ045637; Sun, 31 Mar 2013 18:35:03 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303311835.r2VIZ3fJ045637@svn.freebsd.org> From: Martin Matuska Date: Sun, 31 Mar 2013 18:35:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r248955 - in releng/8.4: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sun, 31 Mar 2013 18:35:03 -0000 Author: mm Date: Sun Mar 31 18:35:02 2013 New Revision: 248955 URL: http://svnweb.freebsd.org/changeset/base/248955 Log: MFC r247852: Import ZFS bpobj bugfix from vendor. Illumos ZFS issues: 3603 panic from bpobj_enqueue_subobj() 3604 zdb should print bpobjs more verbosely Approved by: re (marius) Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Directory Properties: releng/8.4/cddl/contrib/opensolaris/ (props changed) releng/8.4/sys/ (props changed) releng/8.4/sys/cddl/ (props changed) releng/8.4/sys/cddl/contrib/opensolaris/ (props changed) Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:31:58 2013 (r248954) +++ releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:35:02 2013 (r248955) @@ -1189,7 +1189,7 @@ dump_bpobj_cb(void *arg, const blkptr_t } static void -dump_bpobj(bpobj_t *bpo, char *name) +dump_bpobj(bpobj_t *bpo, char *name, int indent) { char bytes[32]; char comp[32]; @@ -1199,31 +1199,56 @@ dump_bpobj(bpobj_t *bpo, char *name) return; zdb_nicenum(bpo->bpo_phys->bpo_bytes, bytes); - if (bpo->bpo_havesubobj) { + if (bpo->bpo_havesubobj && bpo->bpo_phys->bpo_subobjs != 0) { zdb_nicenum(bpo->bpo_phys->bpo_comp, comp); zdb_nicenum(bpo->bpo_phys->bpo_uncomp, uncomp); - (void) printf("\n %s: %llu local blkptrs, %llu subobjs, " - "%s (%s/%s comp)\n", - name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, + (void) printf(" %*s: object %llu, %llu local blkptrs, " + "%llu subobjs, %s (%s/%s comp)\n", + indent * 8, name, + (u_longlong_t)bpo->bpo_object, + (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, (u_longlong_t)bpo->bpo_phys->bpo_num_subobjs, bytes, comp, uncomp); + + for (uint64_t i = 0; i < bpo->bpo_phys->bpo_num_subobjs; i++) { + uint64_t subobj; + bpobj_t subbpo; + int error; + VERIFY0(dmu_read(bpo->bpo_os, + bpo->bpo_phys->bpo_subobjs, + i * sizeof (subobj), sizeof (subobj), &subobj, 0)); + error = bpobj_open(&subbpo, bpo->bpo_os, subobj); + if (error != 0) { + (void) printf("ERROR %u while trying to open " + "subobj id %llu\n", + error, (u_longlong_t)subobj); + continue; + } + dump_bpobj(&subbpo, "subobj", indent + 1); + } } else { - (void) printf("\n %s: %llu blkptrs, %s\n", - name, (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, bytes); + (void) printf(" %*s: object %llu, %llu blkptrs, %s\n", + indent * 8, name, + (u_longlong_t)bpo->bpo_object, + (u_longlong_t)bpo->bpo_phys->bpo_num_blkptrs, + bytes); } if (dump_opt['d'] < 5) return; - (void) printf("\n"); - (void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL); + if (indent == 0) { + (void) bpobj_iterate_nofree(bpo, dump_bpobj_cb, NULL, NULL); + (void) printf("\n"); + } } static void dump_deadlist(dsl_deadlist_t *dl) { dsl_deadlist_entry_t *dle; + uint64_t unused; char bytes[32]; char comp[32]; char uncomp[32]; @@ -1242,14 +1267,24 @@ dump_deadlist(dsl_deadlist_t *dl) (void) printf("\n"); + /* force the tree to be loaded */ + dsl_deadlist_space_range(dl, 0, UINT64_MAX, &unused, &unused, &unused); + for (dle = avl_first(&dl->dl_tree); dle; dle = AVL_NEXT(&dl->dl_tree, dle)) { - (void) printf(" mintxg %llu -> obj %llu\n", - (longlong_t)dle->dle_mintxg, - (longlong_t)dle->dle_bpobj.bpo_object); + if (dump_opt['d'] >= 5) { + char buf[128]; + (void) snprintf(buf, sizeof (buf), "mintxg %llu -> ", + (longlong_t)dle->dle_mintxg, + (longlong_t)dle->dle_bpobj.bpo_object); - if (dump_opt['d'] >= 5) - dump_bpobj(&dle->dle_bpobj, ""); + dump_bpobj(&dle->dle_bpobj, buf, 0); + } else { + (void) printf("mintxg %llu -> obj %llu\n", + (longlong_t)dle->dle_mintxg, + (longlong_t)dle->dle_bpobj.bpo_object); + + } } } @@ -1272,7 +1307,7 @@ fuid_table_destroy() * print uid or gid information. * For normal POSIX id just the id is printed in decimal format. * For CIFS files with FUID the fuid is printed in hex followed by - * the doman-rid string. + * the domain-rid string. */ static void print_idstr(uint64_t id, const char *id_type) @@ -2529,10 +2564,11 @@ dump_zpool(spa_t *spa) if (dump_opt['d'] || dump_opt['i']) { dump_dir(dp->dp_meta_objset); if (dump_opt['d'] >= 3) { - dump_bpobj(&spa->spa_deferred_bpobj, "Deferred frees"); + dump_bpobj(&spa->spa_deferred_bpobj, + "Deferred frees", 0); if (spa_version(spa) >= SPA_VERSION_DEADLISTS) { dump_bpobj(&spa->spa_dsl_pool->dp_free_bpobj, - "Pool snapshot frees"); + "Pool snapshot frees", 0); } if (spa_feature_is_active(spa, Modified: releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c ============================================================================== --- releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Sun Mar 31 18:31:58 2013 (r248954) +++ releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c Sun Mar 31 18:35:02 2013 (r248955) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -414,6 +414,12 @@ bpobj_enqueue_subobj(bpobj_t *bpo, uint6 VERIFY3U(0, ==, dmu_buf_hold(bpo->bpo_os, subsubobjs, 0, FTAG, &subdb, 0)); + /* + * Make sure that we are not asking dmu_write() + * to write more data than we have in our buffer. + */ + VERIFY3U(subdb->db_size, >=, + numsubsub * sizeof (subobj)); dmu_write(bpo->bpo_os, bpo->bpo_phys->bpo_subobjs, bpo->bpo_phys->bpo_num_subobjs * sizeof (subobj), numsubsub * sizeof (subobj), subdb->db_data, tx); Modified: releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sun Mar 31 18:31:58 2013 (r248954) +++ releng/8.4/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sun Mar 31 18:35:02 2013 (r248955) @@ -1712,7 +1712,7 @@ dmu_object_info_from_dnode(dnode_t *dn, doi->doi_checksum = dn->dn_checksum; doi->doi_compress = dn->dn_compress; doi->doi_physical_blocks_512 = (DN_USED_BYTES(dnp) + 256) >> 9; - doi->doi_max_offset = (dnp->dn_maxblkid + 1) * dn->dn_datablksz; + doi->doi_max_offset = (dn->dn_maxblkid + 1) * dn->dn_datablksz; doi->doi_fill_count = 0; for (int i = 0; i < dnp->dn_nblkptr; i++) doi->doi_fill_count += dnp->dn_blkptr[i].blk_fill; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 18:39:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 39B4951C; Sun, 31 Mar 2013 18:39:12 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C65A9D5; Sun, 31 Mar 2013 18:39:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VIdCRv046259; Sun, 31 Mar 2013 18:39:12 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VIdBbL046255; Sun, 31 Mar 2013 18:39:11 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303311839.r2VIdBbL046255@svn.freebsd.org> From: Martin Matuska Date: Sun, 31 Mar 2013 18:39:11 +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: r248956 - in stable/8/cddl/contrib/opensolaris/cmd: zdb zpool 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: Sun, 31 Mar 2013 18:39:12 -0000 Author: mm Date: Sun Mar 31 18:39:11 2013 New Revision: 248956 URL: http://svnweb.freebsd.org/changeset/base/248956 Log: MFC r248267: Import minor ZFS changes from vendor Illumos ZFS issues: 3604 zdb should print bpobjs more verbosely (fix zdb hang) 3606 zpool status -x shouldn't warn about old on-disk format Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:35:02 2013 (r248955) +++ stable/8/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:39:11 2013 (r248956) @@ -1225,6 +1225,7 @@ dump_bpobj(bpobj_t *bpo, char *name, int continue; } dump_bpobj(&subbpo, "subobj", indent + 1); + bpobj_close(&subbpo); } } else { (void) printf(" %*s: object %llu, %llu blkptrs, %s\n", Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Mar 31 18:35:02 2013 (r248955) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Mar 31 18:39:11 2013 (r248956) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2012 +.Dd March 14, 2013 .Dt ZPOOL 8 .Os .Sh NAME @@ -1608,14 +1608,15 @@ is specified, the command exits after .Ar count reports are printed. .Pp -If a scrub or resilver is in progress, this command reports the percentage done -and the estimated time to completion. Both of these are only approximate, +If a scrub or resilver is in progress, this command reports the percentage +done and the estimated time to completion. Both of these are only approximate, because the amount of data in the pool and the other workloads on the system can change. .Bl -tag -width indent .It Fl x Only display status for pools that are exhibiting errors or are otherwise unavailable. +Warnings about pools not using the latest on-disk format will not be included. .It Fl v Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub. Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Mar 31 18:35:02 2013 (r248955) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Mar 31 18:39:11 2013 (r248956) @@ -4030,7 +4030,10 @@ status_callback(zpool_handle_t *zhp, voi * If we were given 'zpool status -x', only report those pools with * problems. */ - if (reason == ZPOOL_STATUS_OK && cbp->cb_explain) { + if (cbp->cb_explain && + (reason == ZPOOL_STATUS_OK || + reason == ZPOOL_STATUS_VERSION_OLDER || + reason == ZPOOL_STATUS_FEAT_DISABLED)) { if (!cbp->cb_allpools) { (void) printf(gettext("pool '%s' is healthy\n"), zpool_get_name(zhp)); From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 18:51:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B751C70C; Sun, 31 Mar 2013 18:51:35 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9B232A14; Sun, 31 Mar 2013 18:51:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VIpZQ9051052; Sun, 31 Mar 2013 18:51:35 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VIpY4q051049; Sun, 31 Mar 2013 18:51:34 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303311851.r2VIpY4q051049@svn.freebsd.org> From: Martin Matuska Date: Sun, 31 Mar 2013 18:51:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r248957 - in releng/8.4/cddl/contrib/opensolaris/cmd: zdb zpool 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: Sun, 31 Mar 2013 18:51:35 -0000 Author: mm Date: Sun Mar 31 18:51:34 2013 New Revision: 248957 URL: http://svnweb.freebsd.org/changeset/base/248957 Log: MFC r248267: Import minor ZFS changes from vendor Illumos ZFS issues: 3604 zdb should print bpobjs more verbosely (fix zdb hang) 3606 zpool status -x shouldn't warn about old on-disk format Approved by: re (marius) Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool.8 releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: releng/8.4/cddl/contrib/opensolaris/ (props changed) Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:39:11 2013 (r248956) +++ releng/8.4/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sun Mar 31 18:51:34 2013 (r248957) @@ -1225,6 +1225,7 @@ dump_bpobj(bpobj_t *bpo, char *name, int continue; } dump_bpobj(&subbpo, "subobj", indent + 1); + bpobj_close(&subbpo); } } else { (void) printf(" %*s: object %llu, %llu blkptrs, %s\n", Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool.8 ============================================================================== --- releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Mar 31 18:39:11 2013 (r248956) +++ releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool.8 Sun Mar 31 18:51:34 2013 (r248957) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 15, 2012 +.Dd March 14, 2013 .Dt ZPOOL 8 .Os .Sh NAME @@ -1608,14 +1608,15 @@ is specified, the command exits after .Ar count reports are printed. .Pp -If a scrub or resilver is in progress, this command reports the percentage done -and the estimated time to completion. Both of these are only approximate, +If a scrub or resilver is in progress, this command reports the percentage +done and the estimated time to completion. Both of these are only approximate, because the amount of data in the pool and the other workloads on the system can change. .Bl -tag -width indent .It Fl x Only display status for pools that are exhibiting errors or are otherwise unavailable. +Warnings about pools not using the latest on-disk format will not be included. .It Fl v Displays verbose data error information, printing out a complete list of all data errors since the last complete pool scrub. Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Mar 31 18:39:11 2013 (r248956) +++ releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sun Mar 31 18:51:34 2013 (r248957) @@ -4030,7 +4030,10 @@ status_callback(zpool_handle_t *zhp, voi * If we were given 'zpool status -x', only report those pools with * problems. */ - if (reason == ZPOOL_STATUS_OK && cbp->cb_explain) { + if (cbp->cb_explain && + (reason == ZPOOL_STATUS_OK || + reason == ZPOOL_STATUS_VERSION_OLDER || + reason == ZPOOL_STATUS_FEAT_DISABLED)) { if (!cbp->cb_allpools) { (void) printf(gettext("pool '%s' is healthy\n"), zpool_get_name(zhp)); From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 18:56:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 481CB8EE; Sun, 31 Mar 2013 18:56:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3885EA2B; Sun, 31 Mar 2013 18:56:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VIu1M1051761; Sun, 31 Mar 2013 18:56:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VIu1sd051760; Sun, 31 Mar 2013 18:56:01 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303311856.r2VIu1sd051760@svn.freebsd.org> From: Martin Matuska Date: Sun, 31 Mar 2013 18:56:01 +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: r248958 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sun, 31 Mar 2013 18:56:01 -0000 Author: mm Date: Sun Mar 31 18:56:00 2013 New Revision: 248958 URL: http://svnweb.freebsd.org/changeset/base/248958 Log: MFC r247592 (delphij): Import a fix tighten assertion on SPA versions from vendor (Illumos). Illumos ZFS issue: 3543 Feature flags causes assertion in spa.c to miss certain cases Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Mar 31 18:51:34 2013 (r248957) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sun Mar 31 18:56:00 2013 (r248958) @@ -5995,7 +5995,7 @@ spa_sync_version(void *arg1, void *arg2, */ ASSERT(tx->tx_txg != TXG_INITIAL); - ASSERT(version <= SPA_VERSION); + ASSERT(SPA_VERSION_IS_SUPPORTED(version)); ASSERT(version >= spa_version(spa)); spa->spa_uberblock.ub_version = version; @@ -6517,7 +6517,7 @@ spa_upgrade(spa_t *spa, uint64_t version * future version would result in an unopenable pool, this shouldn't be * possible. */ - ASSERT(spa->spa_uberblock.ub_version <= SPA_VERSION); + ASSERT(SPA_VERSION_IS_SUPPORTED(spa->spa_uberblock.ub_version)); ASSERT(version >= spa->spa_uberblock.ub_version); spa->spa_uberblock.ub_version = version; From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 19:03:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3D224B87; Sun, 31 Mar 2013 19:03:26 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2D30BA83; Sun, 31 Mar 2013 19:03:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VJ3QFB054454; Sun, 31 Mar 2013 19:03:26 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VJ3PiC054450; Sun, 31 Mar 2013 19:03:25 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201303311903.r2VJ3PiC054450@svn.freebsd.org> From: Martin Matuska Date: Sun, 31 Mar 2013 19:03:25 +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: r248959 - in stable/8: cddl/contrib/opensolaris/cmd/ztest sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys 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: Sun, 31 Mar 2013 19:03:26 -0000 Author: mm Date: Sun Mar 31 19:03:25 2013 New Revision: 248959 URL: http://svnweb.freebsd.org/changeset/base/248959 Log: MFC r242845 (delphij): Illumos r13840:97fd5cdf328a: 3145 single-copy arc 3212 ztest: race condition between vdev_online() and spa_vdev_remove() Illumos r13849:3468a95b27cd: 3258 ztest's use of file descriptors is unstable Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Directory Properties: stable/8/cddl/contrib/opensolaris/ (props changed) stable/8/sys/ (props changed) stable/8/sys/cddl/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Sun Mar 31 18:56:00 2013 (r248958) +++ stable/8/cddl/contrib/opensolaris/cmd/ztest/ztest.c Sun Mar 31 19:03:25 2013 (r248959) @@ -121,8 +121,8 @@ #include #include -#define ZTEST_FD_DATA 3 -#define ZTEST_FD_RAND 4 +static int ztest_fd_data = -1; +static int ztest_fd_rand = -1; typedef struct ztest_shared_hdr { uint64_t zh_hdr_size; @@ -713,14 +713,17 @@ process_options(int argc, char **argv) UINT64_MAX >> 2); if (strlen(altdir) > 0) { - char cmd[MAXNAMELEN]; - char realaltdir[MAXNAMELEN]; + char *cmd; + char *realaltdir; char *bin; char *ztest; char *isa; int isalen; - (void) realpath(getexecname(), cmd); + cmd = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); + realaltdir = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); + + VERIFY(NULL != realpath(getexecname(), cmd)); if (0 != access(altdir, F_OK)) { ztest_dump_core = B_FALSE; fatal(B_TRUE, "invalid alternate ztest path: %s", @@ -751,6 +754,9 @@ process_options(int argc, char **argv) fatal(B_TRUE, "invalid alternate lib directory %s", zo->zo_alt_libpath); } + + umem_free(cmd, MAXPATHLEN); + umem_free(realaltdir, MAXPATHLEN); } } @@ -767,10 +773,12 @@ ztest_random(uint64_t range) { uint64_t r; + ASSERT3S(ztest_fd_rand, >=, 0); + if (range == 0) return (0); - if (read(ZTEST_FD_RAND, &r, sizeof (r)) != sizeof (r)) + if (read(ztest_fd_rand, &r, sizeof (r)) != sizeof (r)) fatal(1, "short read from /dev/urandom"); return (r % range); @@ -4836,7 +4844,18 @@ ztest_fault_inject(ztest_ds_t *zd, uint6 if (islog) (void) rw_unlock(&ztest_name_lock); } else { + /* + * Ideally we would like to be able to randomly + * call vdev_[on|off]line without holding locks + * to force unpredictable failures but the side + * effects of vdev_[on|off]line prevent us from + * doing so. We grab the ztest_vdev_lock here to + * prevent a race between injection testing and + * aux_vdev removal. + */ + VERIFY(mutex_lock(&ztest_vdev_lock) == 0); (void) vdev_online(spa, guid0, 0, NULL); + VERIFY(mutex_unlock(&ztest_vdev_lock) == 0); } } @@ -5795,29 +5814,16 @@ ztest_init(ztest_shared_t *zs) } static void -setup_fds(void) +setup_data_fd(void) { - int fd; -#ifdef illumos - - char *tmp = tempnam(NULL, NULL); - fd = open(tmp, O_RDWR | O_CREAT, 0700); - ASSERT3U(fd, ==, ZTEST_FD_DATA); - (void) unlink(tmp); - free(tmp); -#else - char tmp[MAXPATHLEN]; - - strlcpy(tmp, ztest_opts.zo_dir, MAXPATHLEN); - strlcat(tmp, "/ztest.XXXXXX", MAXPATHLEN); - fd = mkstemp(tmp); - ASSERT3U(fd, ==, ZTEST_FD_DATA); -#endif + static char ztest_name_data[] = "/tmp/ztest.data.XXXXXX"; - fd = open("/dev/urandom", O_RDONLY); - ASSERT3U(fd, ==, ZTEST_FD_RAND); + ztest_fd_data = mkstemp(ztest_name_data); + ASSERT3S(ztest_fd_data, >=, 0); + (void) unlink(ztest_name_data); } + static int shared_data_size(ztest_shared_hdr_t *hdr) { @@ -5838,15 +5844,11 @@ setup_hdr(void) int size; ztest_shared_hdr_t *hdr; -#ifndef illumos - pwrite(ZTEST_FD_DATA, "", 1, 0); -#endif - hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), - PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0); + PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); ASSERT(hdr != MAP_FAILED); - VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, sizeof (ztest_shared_hdr_t))); + VERIFY3U(0, ==, ftruncate(ztest_fd_data, sizeof (ztest_shared_hdr_t))); hdr->zh_hdr_size = sizeof (ztest_shared_hdr_t); hdr->zh_opts_size = sizeof (ztest_shared_opts_t); @@ -5857,7 +5859,7 @@ setup_hdr(void) hdr->zh_ds_count = ztest_opts.zo_datasets; size = shared_data_size(hdr); - VERIFY3U(0, ==, ftruncate(ZTEST_FD_DATA, size)); + VERIFY3U(0, ==, ftruncate(ztest_fd_data, size)); (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); } @@ -5870,14 +5872,14 @@ setup_data(void) uint8_t *buf; hdr = (void *)mmap(0, P2ROUNDUP(sizeof (*hdr), getpagesize()), - PROT_READ, MAP_SHARED, ZTEST_FD_DATA, 0); + PROT_READ, MAP_SHARED, ztest_fd_data, 0); ASSERT(hdr != MAP_FAILED); size = shared_data_size(hdr); (void) munmap((caddr_t)hdr, P2ROUNDUP(sizeof (*hdr), getpagesize())); hdr = ztest_shared_hdr = (void *)mmap(0, P2ROUNDUP(size, getpagesize()), - PROT_READ | PROT_WRITE, MAP_SHARED, ZTEST_FD_DATA, 0); + PROT_READ | PROT_WRITE, MAP_SHARED, ztest_fd_data, 0); ASSERT(hdr != MAP_FAILED); buf = (uint8_t *)hdr; @@ -5896,12 +5898,13 @@ exec_child(char *cmd, char *libpath, boo { pid_t pid; int status; - char cmdbuf[MAXPATHLEN]; + char *cmdbuf = NULL; pid = fork(); if (cmd == NULL) { - (void) strlcpy(cmdbuf, getexecname(), sizeof (cmdbuf)); + cmdbuf = umem_alloc(MAXPATHLEN, UMEM_NOFAIL); + (void) strlcpy(cmdbuf, getexecname(), MAXPATHLEN); cmd = cmdbuf; } @@ -5910,9 +5913,16 @@ exec_child(char *cmd, char *libpath, boo if (pid == 0) { /* child */ char *emptyargv[2] = { cmd, NULL }; + char fd_data_str[12]; struct rlimit rl = { 1024, 1024 }; (void) setrlimit(RLIMIT_NOFILE, &rl); + + (void) close(ztest_fd_rand); + VERIFY3U(11, >=, + snprintf(fd_data_str, 12, "%d", ztest_fd_data)); + VERIFY0(setenv("ZTEST_FD_DATA", fd_data_str, 1)); + (void) enable_extended_FILE_stdio(-1, -1); if (libpath != NULL) VERIFY(0 == setenv("LD_LIBRARY_PATH", libpath, 1)); @@ -5925,6 +5935,11 @@ exec_child(char *cmd, char *libpath, boo fatal(B_TRUE, "exec failed: %s", cmd); } + if (cmdbuf != NULL) { + umem_free(cmdbuf, MAXPATHLEN); + cmd = NULL; + } + while (waitpid(pid, &status, 0) != pid) continue; if (statusp != NULL) @@ -5989,39 +6004,41 @@ main(int argc, char **argv) char timebuf[100]; char numbuf[6]; spa_t *spa; - char cmd[MAXNAMELEN]; + char *cmd; boolean_t hasalt; - - boolean_t ischild = (0 == lseek(ZTEST_FD_DATA, 0, SEEK_CUR)); - ASSERT(ischild || errno == EBADF); + char *fd_data_str = getenv("ZTEST_FD_DATA"); (void) setvbuf(stdout, NULL, _IOLBF, 0); dprintf_setup(&argc, argv); - if (!ischild) { + ztest_fd_rand = open("/dev/urandom", O_RDONLY); + ASSERT3S(ztest_fd_rand, >=, 0); + + if (!fd_data_str) { process_options(argc, argv); - setup_fds(); + setup_data_fd(); setup_hdr(); setup_data(); bcopy(&ztest_opts, ztest_shared_opts, sizeof (*ztest_shared_opts)); } else { + ztest_fd_data = atoi(fd_data_str); setup_data(); bcopy(ztest_shared_opts, &ztest_opts, sizeof (ztest_opts)); } ASSERT3U(ztest_opts.zo_datasets, ==, ztest_shared_hdr->zh_ds_count); /* Override location of zpool.cache */ - (void) asprintf((char **)&spa_config_path, "%s/zpool.cache", - ztest_opts.zo_dir); + VERIFY3U(asprintf((char **)&spa_config_path, "%s/zpool.cache", + ztest_opts.zo_dir), !=, -1); ztest_ds = umem_alloc(ztest_opts.zo_datasets * sizeof (ztest_ds_t), UMEM_NOFAIL); zs = ztest_shared; - if (ischild) { + if (fd_data_str) { metaslab_gang_bang = ztest_opts.zo_metaslab_gang_bang; metaslab_df_alloc_threshold = zs->zs_metaslab_df_alloc_threshold; @@ -6044,7 +6061,8 @@ main(int argc, char **argv) (u_longlong_t)ztest_opts.zo_time); } - (void) strlcpy(cmd, getexecname(), sizeof (cmd)); + cmd = umem_alloc(MAXNAMELEN, UMEM_NOFAIL); + (void) strlcpy(cmd, getexecname(), MAXNAMELEN); zs->zs_do_init = B_TRUE; if (strlen(ztest_opts.zo_alt_ztest) != 0) { @@ -6185,5 +6203,7 @@ main(int argc, char **argv) kills, iters - kills, (100.0 * kills) / MAX(1, iters)); } + umem_free(cmd, MAXNAMELEN); + return (0); } Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Mar 31 18:56:00 2013 (r248958) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sun Mar 31 19:03:25 2013 (r248959) @@ -191,6 +191,7 @@ uint64_t zfs_arc_meta_limit = 0; int zfs_arc_grow_retry = 0; int zfs_arc_shrink_shift = 0; int zfs_arc_p_min_shift = 0; +int zfs_disable_dup_eviction = 0; TUNABLE_QUAD("vfs.zfs.arc_max", &zfs_arc_max); TUNABLE_QUAD("vfs.zfs.arc_min", &zfs_arc_min); @@ -321,7 +322,6 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_io_error; kstat_named_t arcstat_l2_size; kstat_named_t arcstat_l2_hdr_size; - kstat_named_t arcstat_memory_throttle_count; kstat_named_t arcstat_l2_write_trylock_fail; kstat_named_t arcstat_l2_write_passed_headroom; kstat_named_t arcstat_l2_write_spa_mismatch; @@ -334,6 +334,10 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_write_buffer_bytes_scanned; kstat_named_t arcstat_l2_write_buffer_list_iter; kstat_named_t arcstat_l2_write_buffer_list_null_iter; + kstat_named_t arcstat_memory_throttle_count; + kstat_named_t arcstat_duplicate_buffers; + kstat_named_t arcstat_duplicate_buffers_size; + kstat_named_t arcstat_duplicate_reads; } arc_stats_t; static arc_stats_t arc_stats = { @@ -391,7 +395,6 @@ static arc_stats_t arc_stats = { { "l2_io_error", KSTAT_DATA_UINT64 }, { "l2_size", KSTAT_DATA_UINT64 }, { "l2_hdr_size", KSTAT_DATA_UINT64 }, - { "memory_throttle_count", KSTAT_DATA_UINT64 }, { "l2_write_trylock_fail", KSTAT_DATA_UINT64 }, { "l2_write_passed_headroom", KSTAT_DATA_UINT64 }, { "l2_write_spa_mismatch", KSTAT_DATA_UINT64 }, @@ -403,7 +406,11 @@ static arc_stats_t arc_stats = { { "l2_write_pios", KSTAT_DATA_UINT64 }, { "l2_write_buffer_bytes_scanned", KSTAT_DATA_UINT64 }, { "l2_write_buffer_list_iter", KSTAT_DATA_UINT64 }, - { "l2_write_buffer_list_null_iter", KSTAT_DATA_UINT64 } + { "l2_write_buffer_list_null_iter", KSTAT_DATA_UINT64 }, + { "memory_throttle_count", KSTAT_DATA_UINT64 }, + { "duplicate_buffers", KSTAT_DATA_UINT64 }, + { "duplicate_buffers_size", KSTAT_DATA_UINT64 }, + { "duplicate_reads", KSTAT_DATA_UINT64 } }; #define ARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -1516,6 +1523,17 @@ arc_buf_clone(arc_buf_t *from) hdr->b_buf = buf; arc_get_data_buf(buf); bcopy(from->b_data, buf->b_data, size); + + /* + * This buffer already exists in the arc so create a duplicate + * copy for the caller. If the buffer is associated with user data + * then track the size and number of duplicates. These stats will be + * updated as duplicate buffers are created and destroyed. + */ + if (hdr->b_type == ARC_BUFC_DATA) { + ARCSTAT_BUMP(arcstat_duplicate_buffers); + ARCSTAT_INCR(arcstat_duplicate_buffers_size, size); + } hdr->b_datacnt += 1; return (buf); } @@ -1616,6 +1634,16 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ ASSERT3U(state->arcs_size, >=, size); atomic_add_64(&state->arcs_size, -size); buf->b_data = NULL; + + /* + * If we're destroying a duplicate buffer make sure + * that the appropriate statistics are updated. + */ + if (buf->b_hdr->b_datacnt > 1 && + buf->b_hdr->b_type == ARC_BUFC_DATA) { + ARCSTAT_BUMPDOWN(arcstat_duplicate_buffers); + ARCSTAT_INCR(arcstat_duplicate_buffers_size, -size); + } ASSERT(buf->b_hdr->b_datacnt > 0); buf->b_hdr->b_datacnt -= 1; } @@ -1800,6 +1828,48 @@ arc_buf_size(arc_buf_t *buf) } /* + * Called from the DMU to determine if the current buffer should be + * evicted. In order to ensure proper locking, the eviction must be initiated + * from the DMU. Return true if the buffer is associated with user data and + * duplicate buffers still exist. + */ +boolean_t +arc_buf_eviction_needed(arc_buf_t *buf) +{ + arc_buf_hdr_t *hdr; + boolean_t evict_needed = B_FALSE; + + if (zfs_disable_dup_eviction) + return (B_FALSE); + + mutex_enter(&buf->b_evict_lock); + hdr = buf->b_hdr; + if (hdr == NULL) { + /* + * We are in arc_do_user_evicts(); let that function + * perform the eviction. + */ + ASSERT(buf->b_data == NULL); + mutex_exit(&buf->b_evict_lock); + return (B_FALSE); + } else if (buf->b_data == NULL) { + /* + * We have already been added to the arc eviction list; + * recommend eviction. + */ + ASSERT3P(hdr, ==, &arc_eviction_hdr); + mutex_exit(&buf->b_evict_lock); + return (B_TRUE); + } + + if (hdr->b_datacnt > 1 && hdr->b_type == ARC_BUFC_DATA) + evict_needed = B_TRUE; + + mutex_exit(&buf->b_evict_lock); + return (evict_needed); +} + +/* * Evict buffers from list until we've removed the specified number of * bytes. Move the removed buffers to the appropriate evict state. * If the recycle flag is set, then attempt to "recycle" a buffer: @@ -2885,8 +2955,10 @@ arc_read_done(zio_t *zio) abuf = buf; for (acb = callback_list; acb; acb = acb->acb_next) { if (acb->acb_done) { - if (abuf == NULL) + if (abuf == NULL) { + ARCSTAT_BUMP(arcstat_duplicate_reads); abuf = arc_buf_clone(buf); + } acb->acb_buf = abuf; abuf = NULL; } @@ -3401,6 +3473,16 @@ arc_release(arc_buf_t *buf, void *tag) ASSERT3U(*size, >=, hdr->b_size); atomic_add_64(size, -hdr->b_size); } + + /* + * We're releasing a duplicate user data buffer, update + * our statistics accordingly. + */ + if (hdr->b_type == ARC_BUFC_DATA) { + ARCSTAT_BUMPDOWN(arcstat_duplicate_buffers); + ARCSTAT_INCR(arcstat_duplicate_buffers_size, + -hdr->b_size); + } hdr->b_datacnt -= 1; arc_cksum_verify(buf); #ifdef illumos Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Mar 31 18:56:00 2013 (r248958) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sun Mar 31 19:03:25 2013 (r248959) @@ -2071,7 +2071,24 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, dbuf_evict(db); } else { VERIFY(arc_buf_remove_ref(db->db_buf, db) == 0); - if (!DBUF_IS_CACHEABLE(db)) + + /* + * A dbuf will be eligible for eviction if either the + * 'primarycache' property is set or a duplicate + * copy of this buffer is already cached in the arc. + * + * In the case of the 'primarycache' a buffer + * is considered for eviction if it matches the + * criteria set in the property. + * + * To decide if our buffer is considered a + * duplicate, we must call into the arc to determine + * if multiple buffers are referencing the same + * block on-disk. If so, then we simply evict + * ourselves. + */ + if (!DBUF_IS_CACHEABLE(db) || + arc_buf_eviction_needed(db->db_buf)) dbuf_clear(db); else mutex_exit(&db->db_mtx); Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Sun Mar 31 18:56:00 2013 (r248958) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h Sun Mar 31 19:03:25 2013 (r248959) @@ -96,6 +96,7 @@ int arc_released(arc_buf_t *buf); int arc_has_callback(arc_buf_t *buf); void arc_buf_freeze(arc_buf_t *buf); void arc_buf_thaw(arc_buf_t *buf); +boolean_t arc_buf_eviction_needed(arc_buf_t *buf); #ifdef ZFS_DEBUG int arc_referenced(arc_buf_t *buf); #endif From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 20:40:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D6803C36; Sun, 31 Mar 2013 20:40:06 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C7856E4B; Sun, 31 Mar 2013 20:40:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VKe6do081814; Sun, 31 Mar 2013 20:40:06 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VKe6Am081813; Sun, 31 Mar 2013 20:40:06 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201303312040.r2VKe6Am081813@svn.freebsd.org> From: Andriy Gapon Date: Sun, 31 Mar 2013 20:40:06 +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: r248960 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Sun, 31 Mar 2013 20:40:06 -0000 Author: avg Date: Sun Mar 31 20:40:06 2013 New Revision: 248960 URL: http://svnweb.freebsd.org/changeset/base/248960 Log: fix r248946: there is no pmap_page_is_write_mapped in stable/8 This is a direct commit. Pointyhat to: avg Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Mar 31 19:03:25 2013 (r248959) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Mar 31 20:40:06 2013 (r248960) @@ -450,7 +450,7 @@ update_pages(vnode_t *vp, int64_t start, ("zfs update_pages: invalid page in putpages case")); KASSERT(pp->busy > 0, ("zfs update_pages: unbusy page in putpages case")); - KASSERT(!pmap_page_is_write_mapped(pp), + KASSERT((pp->flags & PG_WRITEABLE) == 0, ("zfs update_pages: writable page in putpages case")); VM_OBJECT_UNLOCK(obj); From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 20:51:00 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 69392E31; Sun, 31 Mar 2013 20:51:00 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 12898E80; Sun, 31 Mar 2013 20:50:58 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA14671; Sun, 31 Mar 2013 23:50:56 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1UMPDL-0001TP-QR; Sun, 31 Mar 2013 23:50:55 +0300 Message-ID: <5158A1AD.1080808@FreeBSD.org> Date: Sun, 31 Mar 2013 23:50:53 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130321 Thunderbird/17.0.4 MIME-Version: 1.0 To: "Alexander V. Chernikov" Subject: Re: svn commit: r248552 - in head: sbin/ipfw sys/netinet sys/netpfil/ipfw References: <201303201035.r2KAZXj2090085@svn.freebsd.org> In-Reply-To: <201303201035.r2KAZXj2090085@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Sun, 31 Mar 2013 20:51:00 -0000 on 20/03/2013 12:35 Alexander V. Chernikov said the following: > Author: melifaro > Date: Wed Mar 20 10:35:33 2013 > New Revision: 248552 > URL: http://svnweb.freebsd.org/changeset/base/248552 > > Log: > Add ipfw support for setting/matching DiffServ codepoints (DSCP). > > Setting DSCP support is done via O_SETDSCP which works for both > IPv4 and IPv6 packets. Fast checksum recalculation (RFC 1624) is done for IPv4. > Dscp can be specified by name (AFXY, CSX, BE, EF), by value > (0..63) or via tablearg. > > Matching DSCP is done via another opcode (O_DSCP) which accepts several > classes at once (af11,af22,be). Classes are stored in bitmask (2 u32 words). [snip] > Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c > ============================================================================== > --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Mar 20 09:56:20 2013 (r248551) > +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Mar 20 10:35:33 2013 (r248552) > @@ -671,6 +671,10 @@ check_ipfw_struct(struct ip_fw *rule, in > case O_IPID: > case O_IPTTL: > case O_IPLEN: > + case O_DSCP: > + if (cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1) > + goto bad_size; > + break; > case O_TCPDATALEN: > case O_TCPWIN: > case O_TAGGED: Could you please double-check this part of the change? Handling of the new O_DSCP opcode is inserted in the middle of the long fall-through list of cases and thus it modifies behavior of the preceding cases. The commit message does not say anything about that. I've just done my bi-monthly release/upgrade and ipfw now chokes on my ruleset. There is the following message in system log: kernel: ipfw: opcode 0 size 8 wrong Offending rule seems to be: allow ip from any to any via tun* Reverting this commit fixes the problem. Thank you. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 22:42:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A13CB3DB; Sun, 31 Mar 2013 22:42:26 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 93575604; Sun, 31 Mar 2013 22:42:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VMgQfv018791; Sun, 31 Mar 2013 22:42:26 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VMgQqU018790; Sun, 31 Mar 2013 22:42:26 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303312242.r2VMgQqU018790@svn.freebsd.org> From: Ian Lepore Date: Sun, 31 Mar 2013 22:42:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248961 - head/sys/arm/arm 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: Sun, 31 Mar 2013 22:42:26 -0000 Author: ian Date: Sun Mar 31 22:42:25 2013 New Revision: 248961 URL: http://svnweb.freebsd.org/changeset/base/248961 Log: When running on armv6, set alignment checking to modulo-4 mode rather than modulo-8, because clang emits ldrd and strd instructions for addresses that are only 4-byte aligned. Modified: head/sys/arm/arm/locore.S Modified: head/sys/arm/arm/locore.S ============================================================================== --- head/sys/arm/arm/locore.S Sun Mar 31 20:40:06 2013 (r248960) +++ head/sys/arm/arm/locore.S Sun Mar 31 22:42:25 2013 (r248961) @@ -176,10 +176,16 @@ Lunmapped: /* Set the Domain Access register. Very important! */ mov r0, #((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL*2)) | DOMAIN_CLIENT) mcr p15, 0, r0, c3, c0, 0 - /* Enable MMU */ + /* + * Enable MMU. + * On armv6 enable extended page tables, and set alignment checking + * to modulo-4 (CPU_CONTROL_UNAL_ENABLE) for the ldrd/strd + * instructions emitted by clang. + */ mrc p15, 0, r0, c1, c0, 0 -#if defined(CPU_ARM1136) || defined(CPU_ARM1176) || defined(CPU_CORTEXA) || defined(CPU_MV_PJ4B) - orr r0, r0, #CPU_CONTROL_V6_EXTPAGE +#ifdef _ARM_ARCH_6 + orr r0, r0, #(CPU_CONTROL_V6_EXTPAGE | CPU_CONTROL_UNAL_ENABLE) + orr r2, r2, #(CPU_CONTROL_AFLT_ENABLE) #endif orr r0, r0, #(CPU_CONTROL_MMU_ENABLE) mcr p15, 0, r0, c1, c0, 0 From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 22:43:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E5168557; Sun, 31 Mar 2013 22:43:16 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D7A3960F; Sun, 31 Mar 2013 22:43:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VMhGa8018953; Sun, 31 Mar 2013 22:43:16 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VMhGcV018951; Sun, 31 Mar 2013 22:43:16 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303312243.r2VMhGcV018951@svn.freebsd.org> From: Ian Lepore Date: Sun, 31 Mar 2013 22:43:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248962 - head/sys/boot/arm/uboot 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: Sun, 31 Mar 2013 22:43:17 -0000 Author: ian Date: Sun Mar 31 22:43:16 2013 New Revision: 248962 URL: http://svnweb.freebsd.org/changeset/base/248962 Log: When running on armv6, set alignment checking to modulo-4 mode rather than modulo-8, because clang emits ldrd and strd instructions for addresses that are only 4-byte aligned Modified: head/sys/boot/arm/uboot/start.S Modified: head/sys/boot/arm/uboot/start.S ============================================================================== --- head/sys/boot/arm/uboot/start.S Sun Mar 31 22:42:25 2013 (r248961) +++ head/sys/boot/arm/uboot/start.S Sun Mar 31 22:43:16 2013 (r248962) @@ -27,6 +27,7 @@ */ #include +#include /* * Entry point to the loader that U-Boot passes control to. @@ -42,6 +43,13 @@ _start: ldr ip, =saved_regs str r8, [ip, #0] +#ifdef _ARM_ARCH_6 + mrc p15, 0, r2, c1, c0, 0 + orr r2, r2, #(CPU_CONTROL_UNAL_ENABLE) + orr r2, r2, #(CPU_CONTROL_AFLT_ENABLE) + mcr p15, 0, r2, c1, c0, 0 +#endif + /* Start loader */ b main From owner-svn-src-all@FreeBSD.ORG Sun Mar 31 23:24:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0AC8FB9E; Sun, 31 Mar 2013 23:24:05 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F200C7C3; Sun, 31 Mar 2013 23:24:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2VNO4es030737; Sun, 31 Mar 2013 23:24:04 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2VNO4Xd030736; Sun, 31 Mar 2013 23:24:04 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201303312324.r2VNO4Xd030736@svn.freebsd.org> From: Ian Lepore Date: Sun, 31 Mar 2013 23:24:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248963 - head/sys/dev/uart 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: Sun, 31 Mar 2013 23:24:05 -0000 Author: ian Date: Sun Mar 31 23:24:04 2013 New Revision: 248963 URL: http://svnweb.freebsd.org/changeset/base/248963 Log: Accommodate uart devices with large FIFOs (or DMA buffers which amount to the same thing) by allocating the uart(4) rx buffer based on the device's rxfifosz rather than using a hard-coded size of 384 bytes. The historical 384 byte size is 3 times the largest hard-coded fifo size in the tree, so use that ratio as a guide and allocate the buffer as three times rxfifosz, but never smaller than the historical size. Modified: head/sys/dev/uart/uart_core.c Modified: head/sys/dev/uart/uart_core.c ============================================================================== --- head/sys/dev/uart/uart_core.c Sun Mar 31 22:43:16 2013 (r248962) +++ head/sys/dev/uart/uart_core.c Sun Mar 31 23:24:04 2013 (r248963) @@ -457,7 +457,13 @@ uart_bus_attach(device_t dev) callout_init(&sc->sc_timer, 1); } - sc->sc_rxbufsz = 384; + /* + * Ensure there is room for at least three full FIFOs of data in the + * receive buffer (handles the case of low-level drivers with huge + * FIFOs), and also ensure that there is no less than the historical + * size of 384 bytes (handles the typical small-FIFO case). + */ + sc->sc_rxbufsz = MAX(384, sc->sc_rxfifosz * 3); sc->sc_rxbuf = malloc(sc->sc_rxbufsz * sizeof(*sc->sc_rxbuf), M_UART, M_WAITOK); sc->sc_txbuf = malloc(sc->sc_txfifosz * sizeof(*sc->sc_txbuf), From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 00:00:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E527518D; Mon, 1 Apr 2013 00:00:10 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D52E18A9; Mon, 1 Apr 2013 00:00:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3100ATO041675; Mon, 1 Apr 2013 00:00:10 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3100AEq041674; Mon, 1 Apr 2013 00:00:10 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201304010000.r3100AEq041674@svn.freebsd.org> From: Ian Lepore Date: Mon, 1 Apr 2013 00:00:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248964 - head/sys/arm/at91 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: Mon, 01 Apr 2013 00:00:11 -0000 Author: ian Date: Mon Apr 1 00:00:10 2013 New Revision: 248964 URL: http://svnweb.freebsd.org/changeset/base/248964 Log: Enable hardware flow control and high speed bulk data transfer in at91 uarts. Changes to make rtc/cts flow control work... This does not turn on the builtin hardware flow control on the SoC's usart device, because that doesn't work on uart1 due to a chip erratum (they forgot to wire up pin PA21 to RTS0 internally). Instead it uses the hardware flow control logic where the tty layer calls the driver to assert and de-assert the flow control lines as needed. This prevents overruns at the tty layer (app doesn't read fast enough), but does nothing for overruns at the driver layer (interrupts not serviced fast enough). To work around the wiring problem with RTS0, the driver reassigns that pin as a GPIO and controls it manually. It only does so if given permission via hint.uart.1.use_rts0_workaround=1, to prevent accidentally driving the pin if uart1 is used without flow control (because something not related to serial IO could be wired to that pin). In addition to the RTS0 workaround, driver changes were needed in the area of reading the current set of DCE signals. A priming read is now done at attach() time, and the interrupt routine now sets SER_INT_SIGCHG when any of the DCE signals change. Without these changes, nothing could ever be transmitted, because the tty layer thought CTS was de-asserted (when in fact we had just never read the status register, and the hwsig variable was init'd to CTS de-asserted). Changes to support bulk high-speed (230kbps and higher) data reception... Allow the receive fifo size to be tuned with hint.uart..fifo_bytes. For high speed receive, a fifo size of 1024 works well. The default is still 128 bytes if no hint is provided. Using a value larger than 384 requires a change in dev/uart/uart_core.c to size the intermediate buffer as MAX(384, 3*sc->sc_rxfifosize). Recalculate the receive timeout whenever the baud rate changes. At low baud rates (19.2kbps and below) the timeout is the number of bits in 2 characters. At higher speed it's calculated to be 500 microseconds worth of bits. The idea is to compromise between being responsive in interactive situations and not timing out prematurely during a brief pause in bulk data flow. The old fixed timeout of 1.5 characters was just 32 microseconds at 460kbps. At interrupt time, check for receiver holding register overrun status and set the corresponding status bit in the return value. When handling a buffer overrun, get a single buffer emptied and handed back to the hardware as quickly as possible, then deal with the second buffer. This at least minimizes data loss compared to the old logic that fully processed both buffers before restarting the hardware. Rewrite the logic for handling buffers after a receive timeout. The original author speculated in a comment that there may be a race with high speed data. There was, although it was rare. The code now handles all three possible scenarios on receive timeout: two empty buffers, one empty and one partial buffer, or one full and one partial buffer. Reviewed by: imp Modified: head/sys/arm/at91/uart_dev_at91usart.c Modified: head/sys/arm/at91/uart_dev_at91usart.c ============================================================================== --- head/sys/arm/at91/uart_dev_at91usart.c Sun Mar 31 23:24:04 2013 (r248963) +++ head/sys/arm/at91/uart_dev_at91usart.c Mon Apr 1 00:00:10 2013 (r248964) @@ -1,6 +1,7 @@ /*- * Copyright (c) 2005 M. Warner Losh * Copyright (c) 2005 Olivier Houchard + * Copyright (c) 2012 Ian Lepore * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -42,12 +43,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#include #include #include "uart_if.h" -#define DEFAULT_RCLK at91_master_clock -#define USART_BUFFER_SIZE 128 +#define DEFAULT_RCLK at91_master_clock +#define USART_DEFAULT_FIFO_BYTES 128 + +#define USART_DCE_CHANGE_BITS (USART_CSR_CTSIC | USART_CSR_DCDIC | \ + USART_CSR_DSRIC | USART_CSR_RIIC) /* * High-level UART interface. @@ -63,7 +70,8 @@ struct at91_usart_softc { bus_dma_tag_t tx_tag; bus_dmamap_t tx_map; uint32_t flags; -#define HAS_TIMEOUT 1 +#define HAS_TIMEOUT 0x1 +#define USE_RTS0_WORKAROUND 0x2 bus_dma_tag_t rx_tag; struct at91_usart_rx ping_pong[2]; struct at91_usart_rx *ping; @@ -193,6 +201,20 @@ at91_usart_param(struct uart_bas *bas, i if (DEFAULT_RCLK != 0) WR4(bas, USART_BRGR, BAUD2DIVISOR(baudrate)); + /* + * Set the receive timeout based on the baud rate. The idea is to + * compromise between being responsive on an interactive connection and + * giving a bulk data sender a bit of time to queue up a new buffer + * without mistaking it for a stopping point in the transmission. For + * 19.2kbps and below, use 20 * bit time (2 characters). For faster + * connections use 500 microseconds worth of bits. + */ + if (baudrate <= 19200) + WR4(bas, USART_RTOR, 20); + else + WR4(bas, USART_RTOR, baudrate / 2000); + WR4(bas, USART_CR, USART_CR_STTTO); + /* XXX Need to take possible synchronous mode into account */ return (0); } @@ -243,7 +265,7 @@ at91_usart_term(struct uart_bas *bas) /* * Put a character of console output (so we do it here polling rather than - * interrutp driven). + * interrupt driven). */ static void at91_usart_putc(struct uart_bas *bas, int c) @@ -312,9 +334,14 @@ static kobj_method_t at91_usart_methods[ int at91_usart_bus_probe(struct uart_softc *sc) { + int value; - sc->sc_txfifosz = USART_BUFFER_SIZE; - sc->sc_rxfifosz = USART_BUFFER_SIZE; + value = USART_DEFAULT_FIFO_BYTES; + resource_int_value(device_get_name(sc->sc_dev), + device_get_unit(sc->sc_dev), "fifo_bytes", &value); + value = roundup2(value, arm_dcache_align); + sc->sc_txfifosz = value; + sc->sc_rxfifosz = value; sc->sc_hwiflow = 0; return (0); } @@ -329,6 +356,41 @@ at91_getaddr(void *arg, bus_dma_segment_ } static int +at91_usart_requires_rts0_workaround(struct uart_softc *sc) +{ + int value; + int unit; + + unit = device_get_unit(sc->sc_dev); + + /* + * On the rm9200 chips, the PA21/RTS0 pin is not correctly wired to the + * usart device interally (so-called 'erratum 39', but it's 41.14 in rev + * I of the manual). This prevents use of the hardware flow control + * feature in the usart itself. It also means that if we are to + * implement RTS/CTS flow via the tty layer logic, we must use pin PA21 + * as a gpio and manually manipulate it in at91_usart_bus_setsig(). We + * can only safely do so if we've been given permission via a hint, + * otherwise we might manipulate a pin that's attached to who-knows-what + * and Bad Things could happen. + */ + if (at91_is_rm92() && unit == 1) { + value = 0; + resource_int_value(device_get_name(sc->sc_dev), unit, + "use_rts0_workaround", &value); + if (value != 0) { + at91_pio_use_gpio(AT91RM92_PIOA_BASE, AT91C_PIO_PA21); + at91_pio_gpio_output(AT91RM92_PIOA_BASE, + AT91C_PIO_PA21, 1); + at91_pio_use_periph_a(AT91RM92_PIOA_BASE, + AT91C_PIO_PA20, 0); + return (1); + } + } + return (0); +} + +static int at91_usart_bus_attach(struct uart_softc *sc) { int err; @@ -338,6 +400,9 @@ at91_usart_bus_attach(struct uart_softc atsc = (struct at91_usart_softc *)sc; + if (at91_usart_requires_rts0_workaround(sc)) + atsc->flags |= USE_RTS0_WORKAROUND; + /* * See if we have a TIMEOUT bit. We disable all interrupts as * a side effect. Boot loaders may have enabled them. Since @@ -427,7 +492,11 @@ at91_usart_bus_attach(struct uart_softc } else { WR4(&sc->sc_bas, USART_IER, USART_CSR_RXRDY); } - WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK); + WR4(&sc->sc_bas, USART_IER, USART_CSR_RXBRK | USART_DCE_CHANGE_BITS); + + /* Prime sc->hwsig with the initial hw line states. */ + at91_usart_bus_getsig(sc); + errout: return (err); } @@ -466,7 +535,9 @@ static int at91_usart_bus_setsig(struct uart_softc *sc, int sig) { uint32_t new, old, cr; - struct uart_bas *bas; + struct at91_usart_softc *atsc; + + atsc = (struct at91_usart_softc *)sc; do { old = sc->sc_hwsig; @@ -476,8 +547,7 @@ at91_usart_bus_setsig(struct uart_softc if (sig & SER_DRTS) SIGCHG(sig & SER_RTS, new, SER_RTS, SER_DRTS); } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new)); - bas = &sc->sc_bas; - uart_lock(sc->sc_hwmtx); + cr = 0; if (new & SER_DTR) cr |= USART_CR_DTREN; @@ -487,8 +557,18 @@ at91_usart_bus_setsig(struct uart_softc cr |= USART_CR_RTSEN; else cr |= USART_CR_RTSDIS; - WR4(bas, USART_CR, cr); + + uart_lock(sc->sc_hwmtx); + WR4(&sc->sc_bas, USART_CR, cr); + if (atsc->flags & USE_RTS0_WORKAROUND) { + /* Signal is active-low. */ + if (new & SER_RTS) + at91_pio_gpio_clear(AT91RM92_PIOA_BASE, AT91C_PIO_PA21); + else + at91_pio_gpio_set(AT91RM92_PIOA_BASE,AT91C_PIO_PA21); + } uart_unlock(sc->sc_hwmtx); + return (0); } @@ -531,6 +611,15 @@ at91_usart_bus_ipend(struct uart_softc * atsc = (struct at91_usart_softc *)sc; uart_lock(sc->sc_hwmtx); csr = RD4(&sc->sc_bas, USART_CSR); + + if (csr & USART_CSR_OVRE) { + WR4(&sc->sc_bas, USART_CR, USART_CR_RSTSTA); + ipend |= SER_INT_OVERRUN; + } + + if (csr & USART_DCE_CHANGE_BITS) + ipend |= SER_INT_SIGCHG; + if (csr & USART_CSR_ENDTX) { bus_dmamap_sync(atsc->tx_tag, atsc->tx_map, BUS_DMASYNC_POSTWRITE); @@ -552,36 +641,37 @@ at91_usart_bus_ipend(struct uart_softc * if (atsc->flags & HAS_TIMEOUT) { if (csr & USART_CSR_RXBUFF) { /* - * We have a buffer overflow. Copy all data from both - * ping and pong. Insert overflow character. Reset - * ping and pong and re-enable the PDC to receive - * characters again. + * We have a buffer overflow. Consume data from ping + * and give it back to the hardware before worrying + * about pong, to minimze data loss. Insert an overrun + * marker after the contents of the pong buffer. */ + WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTDIS); bus_dmamap_sync(atsc->rx_tag, atsc->ping->map, BUS_DMASYNC_POSTREAD); - bus_dmamap_sync(atsc->rx_tag, atsc->pong->map, - BUS_DMASYNC_POSTREAD); for (i = 0; i < sc->sc_rxfifosz; i++) at91_rx_put(sc, atsc->ping->buffer[i]); + bus_dmamap_sync(atsc->rx_tag, atsc->ping->map, + BUS_DMASYNC_PREREAD); + WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa); + WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz); + WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN); + bus_dmamap_sync(atsc->rx_tag, atsc->pong->map, + BUS_DMASYNC_POSTREAD); for (i = 0; i < sc->sc_rxfifosz; i++) at91_rx_put(sc, atsc->pong->buffer[i]); uart_rx_put(sc, UART_STAT_OVERRUN); - bus_dmamap_sync(atsc->rx_tag, atsc->ping->map, - BUS_DMASYNC_PREREAD); bus_dmamap_sync(atsc->rx_tag, atsc->pong->map, BUS_DMASYNC_PREREAD); - WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa); - WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz); WR4(&sc->sc_bas, PDC_RNPR, atsc->pong->pa); WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz); - WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN); ipend |= SER_INT_RXREADY; } else if (csr & USART_CSR_ENDRX) { /* - * Shuffle data from ping of ping pong buffer, but - * leave current pong in place, as it has become the - * new ping. We need to copy data and setup the old - * ping as the new pong when we're done. + * Consume data from ping of ping pong buffer, but leave + * current pong in place, as it has become the new ping. + * We need to copy data and setup the old ping as the + * new pong when we're done. */ bus_dmamap_sync(atsc->rx_tag, atsc->ping->map, BUS_DMASYNC_POSTREAD); @@ -597,25 +687,49 @@ at91_usart_bus_ipend(struct uart_softc * ipend |= SER_INT_RXREADY; } else if (csr & USART_CSR_TIMEOUT) { /* - * We have one partial buffer. We need to stop the - * PDC, get the number of characters left and from - * that compute number of valid characters. We then - * need to reset ping and pong and reenable the PDC. - * Not sure if there's a race here at fast baud rates - * we need to worry about. + * On a timeout, one of the following applies: + * 1. Two empty buffers. The last received byte exactly + * filled a buffer, causing an ENDTX that got + * processed earlier; no new bytes have arrived. + * 2. Ping buffer contains some data and pong is empty. + * This should be the most common timeout condition. + * 3. Ping buffer is full and pong is now being filled. + * This is exceedingly rare; it can happen only if + * the ping buffer is almost full when a timeout is + * signaled, and then dataflow resumes and the ping + * buffer filled up between the time we read the + * status register above and the point where the + * RXTDIS takes effect here. Yes, it can happen. + * Because dataflow can resume at any time following a + * timeout (it may have already resumed before we get + * here), it's important to minimize the time the PDC is + * disabled -- just long enough to take the ping buffer + * out of service (so we can consume it) and install the + * pong buffer as the active one. Note that in case 3 + * the hardware has already done the ping-pong swap. */ WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTDIS); + if (RD4(&sc->sc_bas, PDC_RNCR) == 0) { + len = sc->sc_rxfifosz; + } else { + len = sc->sc_rxfifosz - RD4(&sc->sc_bas, PDC_RCR); + WR4(&sc->sc_bas, PDC_RPR, atsc->pong->pa); + WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz); + WR4(&sc->sc_bas, PDC_RNCR, 0); + } + WR4(&sc->sc_bas, USART_CR, USART_CR_STTTO); + WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN); bus_dmamap_sync(atsc->rx_tag, atsc->ping->map, BUS_DMASYNC_POSTREAD); - len = sc->sc_rxfifosz - RD4(&sc->sc_bas, PDC_RCR); for (i = 0; i < len; i++) at91_rx_put(sc, atsc->ping->buffer[i]); bus_dmamap_sync(atsc->rx_tag, atsc->ping->map, BUS_DMASYNC_PREREAD); - WR4(&sc->sc_bas, PDC_RPR, atsc->ping->pa); - WR4(&sc->sc_bas, PDC_RCR, sc->sc_rxfifosz); - WR4(&sc->sc_bas, USART_CR, USART_CR_STTTO); - WR4(&sc->sc_bas, PDC_PTCR, PDC_PTCR_RXTEN); + p = atsc->ping; + atsc->ping = atsc->pong; + atsc->pong = p; + WR4(&sc->sc_bas, PDC_RNPR, atsc->pong->pa); + WR4(&sc->sc_bas, PDC_RNCR, sc->sc_rxfifosz); ipend |= SER_INT_RXREADY; } } else if (csr & USART_CSR_RXRDY) { @@ -645,22 +759,24 @@ at91_usart_bus_flush(struct uart_softc * static int at91_usart_bus_getsig(struct uart_softc *sc) { - uint32_t csr, new, sig; + uint32_t csr, new, old, sig; + + /* + * Note that the atmel channel status register DCE status bits reflect + * the electrical state of the lines, not the logical state. Since they + * are logically active-low signals, we invert the tests here. + */ + do { + old = sc->sc_hwsig; + sig = old; + csr = RD4(&sc->sc_bas, USART_CSR); + SIGCHG(!(csr & USART_CSR_DSR), sig, SER_DSR, SER_DDSR); + SIGCHG(!(csr & USART_CSR_CTS), sig, SER_CTS, SER_DCTS); + SIGCHG(!(csr & USART_CSR_DCD), sig, SER_DCD, SER_DDCD); + SIGCHG(!(csr & USART_CSR_RI), sig, SER_RI, SER_DRI); + new = sig & ~SER_MASK_DELTA; + } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new)); - uart_lock(sc->sc_hwmtx); - csr = RD4(&sc->sc_bas, USART_CSR); - sig = 0; - if (csr & USART_CSR_CTS) - sig |= SER_CTS; - if (csr & USART_CSR_DCD) - sig |= SER_DCD; - if (csr & USART_CSR_DSR) - sig |= SER_DSR; - if (csr & USART_CSR_RI) - sig |= SER_RI; - new = sig & ~SER_MASK_DELTA; - sc->sc_hwsig = new; - uart_unlock(sc->sc_hwmtx); return (sig); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 00:41:39 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E7E53733; Mon, 1 Apr 2013 00:41:39 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) by mx1.freebsd.org (Postfix) with ESMTP id AD305A08; Mon, 1 Apr 2013 00:41:39 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1UMSU1-000Heo-9n; Mon, 01 Apr 2013 00:20:21 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r310KIZT017370; Sun, 31 Mar 2013 18:20:18 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1+ctOrM4mmZ6f8Gs+iLbA/r Subject: Re: svn commit: r246713 - in head/sys: arm/arm cam cam/ctl cam/scsi conf dev/aac dev/advansys dev/aha dev/ahb dev/ahci dev/aic dev/aic7xxx dev/amr dev/arcmsr dev/ata dev/buslogic dev/ciss dev/dpt dev/f... From: Ian Lepore To: Konstantin Belousov In-Reply-To: <201302121657.r1CGvKb5007795@svn.freebsd.org> References: <201302121657.r1CGvKb5007795@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" Date: Sun, 31 Mar 2013 18:20:17 -0600 Message-ID: <1364775617.1312.4.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit 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: Mon, 01 Apr 2013 00:41:40 -0000 On Tue, 2013-02-12 at 16:57 +0000, Konstantin Belousov wrote: > Author: kib > Date: Tue Feb 12 16:57:20 2013 > New Revision: 246713 > URL: http://svnweb.freebsd.org/changeset/base/246713 > > Log: > Reform the busdma API so that new types may be added without modifying > every architecture's busdma_machdep.c. It is done by unifying the > bus_dmamap_load_buffer() routines so that they may be called from MI > code. The MD busdma is then given a chance to do any final processing > in the complete() callback. > > The cam changes unify the bus_dmamap_load* handling in cam drivers. > > The arm and mips implementations are updated to track virtual > addresses for sync(). Previously this was done in a type specific > way. Now it is done in a generic way by recording the list of > virtuals in the map. > > Submitted by: jeff (sponsored by EMC/Isilon) > Reviewed by: kan (previous version), scottl, > mjacob (isp(4), no objections for target mode changes) > Discussed with: ian (arm changes) > Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), > amd64 (Fabian Keil ) > > Added: > head/sys/kern/subr_bus_dma.c (contents, props changed) > [...] I've just discovered that _bus_dmamap_load_vlist() gets a compile warning when building tinderbox on an i386 host, while building for PAE and XEN: cc1: warnings being treated as errors /local/build/staging/freebsd/head/src/sys/kern/subr_bus_dma.c: In function '_bus_dmamap_load_vlist': /local/build/staging/freebsd/head/src/sys/kern/subr_bus_dma.c:69: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] My build machine is i386 PAE running 8.3 (needs to be that old for our build system at $work), so if this is a bogus error caused by building -current on such a downlevel system, I appologize in advance for the noise. -- Ian From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 00:44:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3CAB8BE; Mon, 1 Apr 2013 00:44:22 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E55D3A19; Mon, 1 Apr 2013 00:44:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r310iM2G054020; Mon, 1 Apr 2013 00:44:22 GMT (envelope-from ian@svn.freebsd.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r310iL9m054003; Mon, 1 Apr 2013 00:44:21 GMT (envelope-from ian@svn.freebsd.org) Message-Id: <201304010044.r310iL9m054003@svn.freebsd.org> From: Ian Lepore Date: Mon, 1 Apr 2013 00:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248965 - in head/sys: arm/s3c2xx0 arm/sa11x0 dev/uart mips/adm5120 mips/rt305x sparc64/pci 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: Mon, 01 Apr 2013 00:44:23 -0000 Author: ian Date: Mon Apr 1 00:44:20 2013 New Revision: 248965 URL: http://svnweb.freebsd.org/changeset/base/248965 Log: Fix low-level uart drivers that set their fifo sizes in the softc too late. uart(4) allocates send and receiver buffers in attach() before it calls the low-level driver's attach routine. Many low-level drivers set the fifo sizes in their attach routine, which is too late. Other drivers set them in the probe() routine, so that they're available when uart(4) allocates buffers. This fixes the ones that were setting the values too late by moving the code to probe(). Modified: head/sys/arm/s3c2xx0/uart_dev_s3c2410.c head/sys/arm/sa11x0/uart_dev_sa1110.c head/sys/dev/uart/uart_dev_imx.c head/sys/dev/uart/uart_dev_pl011.c head/sys/dev/uart/uart_dev_quicc.c head/sys/dev/uart/uart_dev_sab82532.c head/sys/dev/uart/uart_dev_z8530.c head/sys/mips/adm5120/uart_dev_adm5120.c head/sys/mips/rt305x/uart_dev_rt305x.c head/sys/sparc64/pci/sbbc.c Modified: head/sys/arm/s3c2xx0/uart_dev_s3c2410.c ============================================================================== --- head/sys/arm/s3c2xx0/uart_dev_s3c2410.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/arm/s3c2xx0/uart_dev_s3c2410.c Mon Apr 1 00:44:20 2013 (r248965) @@ -233,14 +233,6 @@ static kobj_method_t s3c2410_methods[] = int s3c2410_bus_probe(struct uart_softc *sc) { - return (0); -} - -static int -s3c2410_bus_attach(struct uart_softc *sc) -{ - uintptr_t irq; - switch(s3c2xx0_softc->sc_cpu) { case CPU_S3C2410: sc->sc_txfifosz = 16; @@ -253,7 +245,15 @@ s3c2410_bus_attach(struct uart_softc *sc default: return (ENXIO); } - + + return (0); +} + +static int +s3c2410_bus_attach(struct uart_softc *sc) +{ + uintptr_t irq; + sc->sc_hwiflow = 0; sc->sc_hwoflow = 0; Modified: head/sys/arm/sa11x0/uart_dev_sa1110.c ============================================================================== --- head/sys/arm/sa11x0/uart_dev_sa1110.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/arm/sa11x0/uart_dev_sa1110.c Mon Apr 1 00:44:20 2013 (r248965) @@ -156,6 +156,8 @@ static kobj_method_t sa1110_methods[] = int sa1110_bus_probe(struct uart_softc *sc) { + sc->sc_txfifosz = 3; + sc->sc_rxfifosz = 1; return (0); } @@ -164,8 +166,6 @@ sa1110_bus_attach(struct uart_softc *sc) { bcopy(&sc->sc_sysdev->bas, &sc->sc_bas, sizeof(sc->sc_bas)); - sc->sc_txfifosz = 3; - sc->sc_rxfifosz = 1; sc->sc_hwiflow = 0; uart_setreg(&sc->sc_bas, SACOM_CR3, CR3_RXE | CR3_TXE | CR3_RIE | CR3_TIE); return (0); Modified: head/sys/dev/uart/uart_dev_imx.c ============================================================================== --- head/sys/dev/uart/uart_dev_imx.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/dev/uart/uart_dev_imx.c Mon Apr 1 00:44:20 2013 (r248965) @@ -187,9 +187,6 @@ imx_uart_bus_attach(struct uart_softc *s imx_uart_init(bas, 115200, 8, 1, 0); } - sc->sc_rxfifosz = 1; - sc->sc_txfifosz = 1; - (void)imx_uart_bus_getsig(sc); /* XXX workaround to have working console on manut prompt */ @@ -353,6 +350,9 @@ imx_uart_bus_probe(struct uart_softc *sc if (error) return (error); + sc->sc_rxfifosz = 1; + sc->sc_txfifosz = 1; + device_set_desc(sc->sc_dev, "imx_uart"); return (0); } Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/dev/uart/uart_dev_pl011.c Mon Apr 1 00:44:20 2013 (r248965) @@ -278,9 +278,6 @@ uart_pl011_bus_attach(struct uart_softc /* Clear RX & TX interrupts */ __uart_setreg(bas, UART_ICR, IMSC_MASK_ALL); - sc->sc_rxfifosz = 1; - sc->sc_txfifosz = 1; - return (0); } @@ -377,6 +374,9 @@ uart_pl011_bus_probe(struct uart_softc * device_set_desc(sc->sc_dev, "PrimeCell UART (PL011)"); + sc->sc_rxfifosz = 1; + sc->sc_txfifosz = 1; + return (0); } Modified: head/sys/dev/uart/uart_dev_quicc.c ============================================================================== --- head/sys/dev/uart/uart_dev_quicc.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/dev/uart/uart_dev_quicc.c Mon Apr 1 00:44:20 2013 (r248965) @@ -293,9 +293,6 @@ quicc_bus_attach(struct uart_softc *sc) quicc_setup(bas, 9600, 8, 1, UART_PARITY_NONE); } - sc->sc_rxfifosz = 1; - sc->sc_txfifosz = 1; - /* Enable interrupts on the receive buffer. */ rb = quicc_read2(bas, QUICC_PRAM_SCC_RBASE(bas->chan - 1)); st = quicc_read2(bas, rb); @@ -417,6 +414,9 @@ quicc_bus_probe(struct uart_softc *sc) if (error) return (error); + sc->sc_rxfifosz = 1; + sc->sc_txfifosz = 1; + snprintf(buf, sizeof(buf), "quicc, channel %d", sc->sc_bas.chan); device_set_desc_copy(sc->sc_dev, buf); return (0); Modified: head/sys/dev/uart/uart_dev_sab82532.c ============================================================================== --- head/sys/dev/uart/uart_dev_sab82532.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/dev/uart/uart_dev_sab82532.c Mon Apr 1 00:44:20 2013 (r248965) @@ -407,9 +407,6 @@ sab82532_bus_attach(struct uart_softc *s if (sc->sc_sysdev == NULL) sab82532_init(bas, 9600, 8, 1, UART_PARITY_NONE); - sc->sc_rxfifosz = 32; - sc->sc_txfifosz = 32; - imr0 = SAB_IMR0_TCD|SAB_IMR0_TIME|SAB_IMR0_CDSC|SAB_IMR0_RFO| SAB_IMR0_RPF; uart_setreg(bas, SAB_IMR0, 0xff & ~imr0); @@ -592,6 +589,9 @@ sab82532_bus_probe(struct uart_softc *sc if (error) return (error); + sc->sc_rxfifosz = 32; + sc->sc_txfifosz = 32; + ch = sc->sc_bas.chan - 1 + 'A'; switch (uart_getreg(&sc->sc_bas, SAB_VSTR) & SAB_VSTR_VMASK) { Modified: head/sys/dev/uart/uart_dev_z8530.c ============================================================================== --- head/sys/dev/uart/uart_dev_z8530.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/dev/uart/uart_dev_z8530.c Mon Apr 1 00:44:20 2013 (r248965) @@ -332,9 +332,6 @@ z8530_bus_attach(struct uart_softc *sc) } z8530->txidle = 1; /* Report SER_INT_TXIDLE. */ - sc->sc_rxfifosz = 3; - sc->sc_txfifosz = 1; - (void)z8530_bus_getsig(sc); uart_setmreg(bas, WR_IC, IC_BRK | IC_CTS | IC_DCD); @@ -515,6 +512,9 @@ z8530_bus_probe(struct uart_softc *sc) if (error) return (error); + sc->sc_rxfifosz = 3; + sc->sc_txfifosz = 1; + ch = sc->sc_bas.chan - 1 + 'A'; snprintf(buf, sizeof(buf), "z8530, channel %c", ch); Modified: head/sys/mips/adm5120/uart_dev_adm5120.c ============================================================================== --- head/sys/mips/adm5120/uart_dev_adm5120.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/mips/adm5120/uart_dev_adm5120.c Mon Apr 1 00:44:20 2013 (r248965) @@ -221,9 +221,6 @@ adm5120_uart_bus_attach(struct uart_soft /* TODO: set parameters 115200, 8N1 */ } - sc->sc_rxfifosz = 16; - sc->sc_txfifosz = 16; - (void)adm5120_uart_bus_getsig(sc); #if 1 @@ -367,6 +364,9 @@ adm5120_uart_bus_probe(struct uart_softc if (error) return (error); + sc->sc_rxfifosz = 16; + sc->sc_txfifosz = 16; + ch = sc->sc_bas.chan + 'A'; snprintf(buf, sizeof(buf), "adm5120_uart, channel %c", ch); Modified: head/sys/mips/rt305x/uart_dev_rt305x.c ============================================================================== --- head/sys/mips/rt305x/uart_dev_rt305x.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/mips/rt305x/uart_dev_rt305x.c Mon Apr 1 00:44:20 2013 (r248965) @@ -272,9 +272,6 @@ rt305x_uart_bus_attach(struct uart_softc rt305x_uart_init(bas, 115200, 8, 1, 0); } - sc->sc_rxfifosz = 16; - sc->sc_txfifosz = 16; - (void)rt305x_uart_bus_getsig(sc); /* Enable FIFO */ @@ -438,6 +435,9 @@ rt305x_uart_bus_probe(struct uart_softc if (error) return (error); + sc->sc_rxfifosz = 16; + sc->sc_txfifosz = 16; + snprintf(buf, sizeof(buf), "rt305x_uart"); device_set_desc_copy(sc->sc_dev, buf); Modified: head/sys/sparc64/pci/sbbc.c ============================================================================== --- head/sys/sparc64/pci/sbbc.c Mon Apr 1 00:00:10 2013 (r248964) +++ head/sys/sparc64/pci/sbbc.c Mon Apr 1 00:44:20 2013 (r248965) @@ -835,13 +835,6 @@ sbbc_uart_bus_attach(struct uart_softc * bst = bas->bst; bsh = bas->bsh; - sc->sc_rxfifosz = SBBC_SRAM_READ_4(sbbc_solcons + - SBBC_CONS_OFF(cons_in_end)) - SBBC_SRAM_READ_4(sbbc_solcons + - SBBC_CONS_OFF(cons_in_begin)) - 1; - sc->sc_txfifosz = SBBC_SRAM_READ_4(sbbc_solcons + - SBBC_CONS_OFF(cons_out_end)) - SBBC_SRAM_READ_4(sbbc_solcons + - SBBC_CONS_OFF(cons_out_begin)) - 1; - uart_lock(sc->sc_hwmtx); /* @@ -995,11 +988,24 @@ sbbc_uart_bus_param(struct uart_softc *s } static int -sbbc_uart_bus_probe(struct uart_softc *sc __unused) +sbbc_uart_bus_probe(struct uart_softc *sc) { + struct uart_bas *bas; + bus_space_tag_t bst; + bus_space_handle_t bsh; - if (sbbc_console != 0) + if (sbbc_console != 0) { + bas = &sc->sc_bas; + bst = bas->bst; + bsh = bas->bsh; + sc->sc_rxfifosz = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_end)) - SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_in_begin)) - 1; + sc->sc_txfifosz = SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_end)) - SBBC_SRAM_READ_4(sbbc_solcons + + SBBC_CONS_OFF(cons_out_begin)) - 1; return (0); + } return (ENXIO); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 06:07:24 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1565E99F; Mon, 1 Apr 2013 06:07:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id ACB87DA7; Mon, 1 Apr 2013 06:07:22 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id JAA19017; Mon, 01 Apr 2013 09:07:20 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1UMXto-00055m-A2; Mon, 01 Apr 2013 09:07:20 +0300 Message-ID: <51592416.7090003@FreeBSD.org> Date: Mon, 01 Apr 2013 09:07:18 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130321 Thunderbird/17.0.4 MIME-Version: 1.0 To: Dimitry Andric Subject: Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt References: <201303072243.r27Mhopv039449@svn.freebsd.org> In-Reply-To: <201303072243.r27Mhopv039449@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Mon, 01 Apr 2013 06:07:24 -0000 on 08/03/2013 00:43 Dimitry Andric said the following: > Author: dim > Date: Thu Mar 7 22:43:50 2013 > New Revision: 247962 > URL: http://svnweb.freebsd.org/changeset/base/247962 > > Log: > Fix error in r247960: actually assign the basename to match.iim_file. I've got some bad news. First of all, sorry for not being thorough enough when this change was originally proposed. I rebuilt only ctfconvert with the patch, but ctfmerge was left alone. It seems that r247960 + r247962 (this commit) broke ctfmerge in my environment (head + clang). While .o files have expected ctf information, combined files miss ctf data for functions. I haven't dug yet into this problem, but I suspect that there is some mismatch at another place (or even multiple places) where STT_FILE is used. > Pointed out by: avg > Pointy hat to: dim > MFC after: 1 week > X-MFC-With: r247960 > > Modified: > head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c > > Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c > ============================================================================== > --- head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Thu Mar 7 22:32:41 2013 (r247961) > +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/output.c Thu Mar 7 22:43:50 2013 (r247962) > @@ -379,8 +379,7 @@ sort_iidescs(Elf *elf, const char *file, > switch (GELF_ST_TYPE(sym.st_info)) { > case STT_FILE: > bname = strrchr(match.iim_name, '/'); > - bname = bname == NULL ? match.iim_name : bname + 1; > - match.iim_file = match.iim_name; > + match.iim_file = bname == NULL ? match.iim_name : bname + 1; > continue; > case STT_OBJECT: > tolist = iiburst->iib_objts; > -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 08:45:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AC05FC69; Mon, 1 Apr 2013 08:45:02 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from gw01.mail.saunalahti.fi (gw01.mail.saunalahti.fi [195.197.172.115]) by mx1.freebsd.org (Postfix) with ESMTP id 6B8C39A0; Mon, 1 Apr 2013 08:45:02 +0000 (UTC) Received: from a91-153-126-50.elisa-laajakaista.fi (a91-153-126-50.elisa-laajakaista.fi [91.153.126.50]) by gw01.mail.saunalahti.fi (Postfix) with SMTP id 81EFC151546; Mon, 1 Apr 2013 11:37:33 +0300 (EEST) Date: Mon, 1 Apr 2013 11:37:32 +0300 From: Jaakko Heinonen To: Martin Matuska Subject: Re: svn commit: r248571 - in head: . cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd... Message-ID: <20130401083731.GA1973@a91-153-126-50.elisa-laajakaista.fi> References: <201303210838.r2L8c3OB097432@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201303210838.r2L8c3OB097432@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: Mon, 01 Apr 2013 08:45:02 -0000 Hi, On 2013-03-21, Martin Matuska wrote: > Merge libzfs_core branch: > includes MFV 238590, 238592, 247580 I am getting the following error after this commit: # zpool list failed to read pool configuration: bad address no pools available # zfs list failed to read pool configuration: bad address Reverting sys/cddl to r248570 makes it work again. >From dmesg: ZFS filesystem version: 5 ZFS storage pool version: features support (5000) -- Jaakko From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 08:49:02 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E49B2E78; Mon, 1 Apr 2013 08:49:02 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 41F0C9E3; Mon, 1 Apr 2013 08:49:02 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.6/8.14.6) with ESMTP id r318mukk074844; Mon, 1 Apr 2013 11:48:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.2 kib.kiev.ua r318mukk074844 Received: (from kostik@localhost) by tom.home (8.14.6/8.14.6/Submit) id r318muQ1074839; Mon, 1 Apr 2013 11:48:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Mon, 1 Apr 2013 11:48:56 +0300 From: Konstantin Belousov To: Ian Lepore Subject: Re: svn commit: r246713 - in head/sys: arm/arm cam cam/ctl cam/scsi conf dev/aac dev/advansys dev/aha dev/ahb dev/ahci dev/aic dev/aic7xxx dev/amr dev/arcmsr dev/ata dev/buslogic dev/ciss dev/dpt dev/f... Message-ID: <20130401084856.GQ3794@kib.kiev.ua> References: <201302121657.r1CGvKb5007795@svn.freebsd.org> <1364775617.1312.4.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="gc60dUbPCPq6wSWX" Content-Disposition: inline In-Reply-To: <1364775617.1312.4.camel@revolution.hippie.lan> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home 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: Mon, 01 Apr 2013 08:49:03 -0000 --gc60dUbPCPq6wSWX Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 31, 2013 at 06:20:17PM -0600, Ian Lepore wrote: > On Tue, 2013-02-12 at 16:57 +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Tue Feb 12 16:57:20 2013 > > New Revision: 246713 > > URL: http://svnweb.freebsd.org/changeset/base/246713 > >=20 > > Log: > > Reform the busdma API so that new types may be added without modifying > > every architecture's busdma_machdep.c. It is done by unifying the > > bus_dmamap_load_buffer() routines so that they may be called from MI > > code. The MD busdma is then given a chance to do any final processing > > in the complete() callback. > > =20 > > The cam changes unify the bus_dmamap_load* handling in cam drivers. > > =20 > > The arm and mips implementations are updated to track virtual > > addresses for sync(). Previously this was done in a type specific > > way. Now it is done in a generic way by recording the list of > > virtuals in the map. > > =20 > > Submitted by: jeff (sponsored by EMC/Isilon) > > Reviewed by: kan (previous version), scottl, > > mjacob (isp(4), no objections for target mode changes) > > Discussed with: ian (arm changes) > > Tested by: marius (sparc64), mips (jmallet), isci(4) on x86 (jharris), > > amd64 (Fabian Keil ) > >=20 > > Added: > > head/sys/kern/subr_bus_dma.c (contents, props changed) > > [...] >=20 > I've just discovered that _bus_dmamap_load_vlist() gets a compile > warning when building tinderbox on an i386 host, while building for PAE > and XEN: >=20 > cc1: warnings being treated as errors > /local/build/staging/freebsd/head/src/sys/kern/subr_bus_dma.c: In functio= n '_bus_dmamap_load_vlist': > /local/build/staging/freebsd/head/src/sys/kern/subr_bus_dma.c:69: warning= : cast to pointer from integer of different size [-Wint-to-pointer-cast] >=20 > My build machine is i386 PAE running 8.3 (needs to be that old for our > build system at $work), so if this is a bogus error caused by building > -current on such a downlevel system, I appologize in advance for the > noise. The warning is bogus in a sense that the code is correct. The bus_addr_t on the PAE i386 is uint64_t, and since void * is 32bit, the warning is emited. On the other hand, the promise of the caller of the _bus_dmamap_load_vlist() is to have the virtual addresses stored in the ds_addr, so the cast is not problematic. The warning is useful only in the other direction, IMO, i.e. when casting wide pointer to narrow integer type. The warning is obviously specific to the version of the compiler you use. It is not hard to fix it, could you, please, verify the patch below ? diff --git a/sys/kern/subr_bus_dma.c b/sys/kern/subr_bus_dma.c index 45fa9bb..4528601 100644 --- a/sys/kern/subr_bus_dma.c +++ b/sys/kern/subr_bus_dma.c @@ -66,8 +66,8 @@ _bus_dmamap_load_vlist(bus_dma_tag_t dmat, bus_dmamap_t m= ap, error =3D 0; for (; sglist_cnt > 0; sglist_cnt--, list++) { error =3D _bus_dmamap_load_buffer(dmat, map, - (void *)list->ds_addr, list->ds_len, pmap, flags, NULL, - nsegs); + (void *)(uintptr_t)list->ds_addr, list->ds_len, pmap, + flags, NULL, nsegs); if (error) break; } --gc60dUbPCPq6wSWX Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJRWUn3AAoJEJDCuSvBvK1BNd0QAI76T7GivfL7CRBGosCgg28N CfRqOM35CYc1r28NwzVY4Zs/EjiVIzsejK/yRfATm+eNpHjZwPm+46yWYcX8J0HL TWxCZfWAowUrDnyio4DmE2C1yS55J5RWd3nPmFCuCmotflUOU1BV/xTPH8gBlmdk CsrOsqxsvQq0ahN/jls9gMmlBM4m7u1P2WDPtGGl7Dj7qO3fomUQJ/yWXuL8LWBd thxHrclHDeuPhzb1O6Nj3gdWWXLvgcQfHFFaUjyQJ/PU3w04JYc2ivgFnSt/olGD v0HtxT2wlaZWED3pBGH+8gFChFuUmYVhkQYi7K716cozhcQCURkFtyFemAdxxpB9 PaukBXFW0T08kLvynu/BDRvnRCo5vL6GMLuBbSrMDtv80cvhXNR7voCr2ambeYCe cBAWbLh6hM7BsB89rp7Jg/nrqrGFbOz4zhUEWZqYFXekU5kDYZNDvbhJTn63xCpl Th+TCFZfmlQxGfSVu22arppFxgylOsU+SS2BEMHrhxijJkMQd7xjSyeth2l3Syt0 okAcrCtqqc6JNKZpPTDnq9KqovK7eVD8n70ANeBbnQWxnDy5FUQnZn2GF284anrr z1LElL0xH7rYdQSlG9eoGAsLs9p1RzPB80zxrshPy9Q3OnWVN3xnqYKWjJ2FY1lw BiuGzWDS5NcAkz4d0Pf4 =9IXv -----END PGP SIGNATURE----- --gc60dUbPCPq6wSWX-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 08:50:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id D3E31C9; Mon, 1 Apr 2013 08:50:49 +0000 (UTC) Date: Mon, 1 Apr 2013 08:50:49 +0000 From: Alexey Dokuchaev To: Alexander Motin Subject: Re: svn commit: r236750 - in stable/8: share/man/man4 sys/conf sys/dev/sound/pci/hda sys/modules/sound/driver/hda Message-ID: <20130401085049.GA84064@FreeBSD.org> References: <201206081235.q58CZiiK059149@svn.freebsd.org> <20130321162521.GA82532@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <20130321162521.GA82532@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-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: Mon, 01 Apr 2013 08:50:49 -0000 On Thu, Mar 21, 2013 at 04:25:21PM +0000, Alexey Dokuchaev wrote: > On Fri, Jun 08, 2012 at 12:35:44PM +0000, Alexander Motin wrote: > > New Revision: 236750 > > URL: http://svn.freebsd.org/changeset/base/236750 > > > > Log: > > MFC r230130: > > Major snd_hda driver rewrite: > > - Huge old hdac driver was split into three independent pieces: HDA > > controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function > > driver (hdaa). [...] > > Unfortunately, this commit apparently had broken the sound for me on my > laptop. [...] While trying to debug this problem, I've noticed that though I can recompile snd_hda(4), I cannot load it: # kldload ./snd_hda.ko kldload: can't load ./snd_hda.ko: No such file or directory The message is clearly bogus, but in /var/log/messages I see this line: link_elf: symbol snd_verbose undefined Is this known behavior? How to remedy it? ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 09:56:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 00D514FB; Mon, 1 Apr 2013 09:56:20 +0000 (UTC) (envelope-from tijl@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D912FFAC; Mon, 1 Apr 2013 09:56:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r319uK0M015216; Mon, 1 Apr 2013 09:56:20 GMT (envelope-from tijl@svn.freebsd.org) Received: (from tijl@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r319uKtB015215; Mon, 1 Apr 2013 09:56:20 GMT (envelope-from tijl@svn.freebsd.org) Message-Id: <201304010956.r319uKtB015215@svn.freebsd.org> From: Tijl Coosemans Date: Mon, 1 Apr 2013 09:56:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r248966 - releng/8.4/sys/kern 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: Mon, 01 Apr 2013 09:56:21 -0000 Author: tijl Date: Mon Apr 1 09:56:20 2013 New Revision: 248966 URL: http://svnweb.freebsd.org/changeset/base/248966 Log: MFS r248880: - Fix two possible overflows when testing if ELF program headers are on the first page: 1. Cast uint16_t operands in a multiplication to unsigned int because otherwise the implicit promotion to int results in a signed multiplication that can overflow and the behaviour on integer overflow is undefined. 2. Replace (offset + size > PAGE_SIZE) with (size > PAGE_SIZE - offset) because the sum may overflow. - Use the same tests to see if the path to the interpreter is on the first page. There's no overflow here because size is already limited by MAXPATHLEN, but the compiler optimises the new tests better. Also fix an off-by-one error. - Simplify tests to see if an ELF note program header is on the first page. This also fixes an off-by-one error. Reviewed by: kib Approved by: re (glebius) Modified: releng/8.4/sys/kern/imgact_elf.c Directory Properties: releng/8.4/sys/ (props changed) releng/8.4/sys/kern/ (props changed) Modified: releng/8.4/sys/kern/imgact_elf.c ============================================================================== --- releng/8.4/sys/kern/imgact_elf.c Mon Apr 1 00:44:20 2013 (r248965) +++ releng/8.4/sys/kern/imgact_elf.c Mon Apr 1 09:56:20 2013 (r248966) @@ -629,9 +629,8 @@ __elfN(load_file)(struct proc *p, const } /* Only support headers that fit within first page for now */ - /* (multiplication of two Elf_Half fields will not overflow) */ if ((hdr->e_phoff > PAGE_SIZE) || - (hdr->e_phentsize * hdr->e_phnum) > PAGE_SIZE - hdr->e_phoff) { + (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { error = ENOEXEC; goto fail; } @@ -713,7 +712,7 @@ __CONCAT(exec_, __elfN(imgact))(struct i */ if ((hdr->e_phoff > PAGE_SIZE) || - (hdr->e_phoff + hdr->e_phentsize * hdr->e_phnum) > PAGE_SIZE) { + (u_int)hdr->e_phentsize * hdr->e_phnum > PAGE_SIZE - hdr->e_phoff) { /* Only support headers in first page for now */ return (ENOEXEC); } @@ -732,8 +731,8 @@ __CONCAT(exec_, __elfN(imgact))(struct i if (phdr[i].p_type == PT_INTERP) { /* Path to interpreter */ if (phdr[i].p_filesz > MAXPATHLEN || - phdr[i].p_offset >= PAGE_SIZE || - phdr[i].p_offset + phdr[i].p_filesz >= PAGE_SIZE) + phdr[i].p_offset > PAGE_SIZE || + phdr[i].p_filesz > PAGE_SIZE - phdr[i].p_offset) return (ENOEXEC); interp = imgp->image_header + phdr[i].p_offset; interp_name_len = phdr[i].p_filesz; @@ -1417,9 +1416,8 @@ __elfN(parse_notes)(struct image_params const char *note_name; int i; - if (pnote == NULL || pnote->p_offset >= PAGE_SIZE || - pnote->p_filesz > PAGE_SIZE || - pnote->p_offset + pnote->p_filesz >= PAGE_SIZE) + if (pnote == NULL || pnote->p_offset > PAGE_SIZE || + pnote->p_filesz > PAGE_SIZE - pnote->p_offset) return (FALSE); note = note0 = (const Elf_Note *)(imgp->image_header + pnote->p_offset); From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 09:56:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B2C6E668; Mon, 1 Apr 2013 09:56:48 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9723AFBA; Mon, 1 Apr 2013 09:56:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r319umoF015303; Mon, 1 Apr 2013 09:56:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r319umS3015302; Mon, 1 Apr 2013 09:56:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304010956.r319umS3015302@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 1 Apr 2013 09:56:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248967 - head/sys/fs/nfsclient 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: Mon, 01 Apr 2013 09:56:48 -0000 Author: kib Date: Mon Apr 1 09:56:48 2013 New Revision: 248967 URL: http://svnweb.freebsd.org/changeset/base/248967 Log: Strip the unnneeded spaces, mostly at the end of lines. MFC after: 3 days Modified: head/sys/fs/nfsclient/nfs_clbio.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Mon Apr 1 09:56:20 2013 (r248966) +++ head/sys/fs/nfsclient/nfs_clbio.c Mon Apr 1 09:56:48 2013 (r248967) @@ -74,7 +74,7 @@ int ncl_pbuf_freecnt = -1; /* start out static struct buf *nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td); -static int nfs_directio_write(struct vnode *vp, struct uio *uiop, +static int nfs_directio_write(struct vnode *vp, struct uio *uiop, struct ucred *cred, int ioflag); /* @@ -121,7 +121,7 @@ ncl_getpages(struct vop_getpages_args *a mtx_lock(&nmp->nm_mtx); if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && - (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { + (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { mtx_unlock(&nmp->nm_mtx); /* We'll never get here for v4, because we always have fsinfo */ (void)ncl_fsinfo(nmp, vp, cred, td); @@ -270,7 +270,7 @@ ncl_putpages(struct vop_putpages_args *a rtvals = ap->a_rtvals; npages = btoc(count); offset = IDX_TO_OFF(pages[0]->pindex); - + mtx_lock(&nmp->nm_mtx); if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { @@ -280,9 +280,9 @@ ncl_putpages(struct vop_putpages_args *a mtx_unlock(&nmp->nm_mtx); mtx_lock(&np->n_mtx); - if (newnfs_directio_enable && !newnfs_directio_allow_mmap && + if (newnfs_directio_enable && !newnfs_directio_allow_mmap && (np->n_flag & NNONCACHE) && (vp->v_type == VREG)) { - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); ncl_printf("ncl_putpages: called on noncache-able vnode??\n"); mtx_lock(&np->n_mtx); } @@ -363,7 +363,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct vattr vattr; struct nfsnode *np = VTONFS(vp); int old_lock; - + /* * Grab the exclusive lock before checking whether the cache is * consistent. @@ -415,7 +415,7 @@ nfs_bioread_check_cons(struct vnode *vp, } mtx_unlock(&np->n_mtx); } -out: +out: ncl_downgrade_vnlock(vp, old_lock); return error; } @@ -457,10 +457,10 @@ ncl_bioread(struct vnode *vp, struct uio tmp_off = uio->uio_offset + uio->uio_resid; if (vp->v_type != VDIR && (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset)) { - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&nmp->nm_mtx); return (EFBIG); } - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&nmp->nm_mtx); if (newnfs_directio_enable && (ioflag & IO_DIRECT) && (vp->v_type == VREG)) /* No caching/ no readaheads. Just read data into the user buffer */ @@ -468,17 +468,17 @@ ncl_bioread(struct vnode *vp, struct uio biosize = vp->v_bufobj.bo_bsize; seqcount = (int)((off_t)(ioflag >> IO_SEQSHIFT) * biosize / BKVASIZE); - + error = nfs_bioread_check_cons(vp, td, cred); if (error) return error; do { u_quad_t nsize; - + mtx_lock(&np->n_mtx); nsize = np->n_size; - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); switch (vp->v_type) { case VREG: @@ -711,13 +711,13 @@ ncl_bioread(struct vnode *vp, struct uio } /* - * The NFS write path cannot handle iovecs with len > 1. So we need to + * The NFS write path cannot handle iovecs with len > 1. So we need to * break up iovecs accordingly (restricting them to wsize). - * For the SYNC case, we can do this with 1 copy (user buffer -> mbuf). - * For the ASYNC case, 2 copies are needed. The first a copy from the + * For the SYNC case, we can do this with 1 copy (user buffer -> mbuf). + * For the ASYNC case, 2 copies are needed. The first a copy from the * user buffer to a staging buffer and then a second copy from the staging * buffer to mbufs. This can be optimized by copying from the user buffer - * directly into mbufs and passing the chain down, but that requires a + * directly into mbufs and passing the chain down, but that requires a * fair amount of re-working of the relevant codepaths (and can be done * later). */ @@ -733,7 +733,7 @@ nfs_directio_write(vp, uiop, cred, iofla struct thread *td = uiop->uio_td; int size; int wsize; - + mtx_lock(&nmp->nm_mtx); wsize = nmp->nm_wsize; mtx_unlock(&nmp->nm_mtx); @@ -757,7 +757,7 @@ do_sync: iomode = NFSWRITE_FILESYNC; error = ncl_writerpc(vp, &uio, cred, &iomode, &must_commit, 0); - KASSERT((must_commit == 0), + KASSERT((must_commit == 0), ("ncl_directio_write: Did not commit write")); if (error) return (error); @@ -767,7 +767,7 @@ do_sync: uiop->uio_iovcnt--; uiop->uio_iov++; } else { - uiop->uio_iov->iov_base = + uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + size; uiop->uio_iov->iov_len -= size; } @@ -776,14 +776,14 @@ do_sync: struct uio *t_uio; struct iovec *t_iov; struct buf *bp; - + /* * Break up the write into blocksize chunks and hand these * over to nfsiod's for write back. - * Unfortunately, this incurs a copy of the data. Since - * the user could modify the buffer before the write is + * Unfortunately, this incurs a copy of the data. Since + * the user could modify the buffer before the write is * initiated. - * + * * The obvious optimization here is that one of the 2 copies * in the async write path can be eliminated by copying the * data here directly into mbufs and passing the mbuf chain @@ -826,8 +826,8 @@ do_sync: if (cred != NOCRED) { crhold(cred); bp->b_wcred = cred; - } else - bp->b_wcred = NOCRED; + } else + bp->b_wcred = NOCRED; bp->b_caller1 = (void *)t_uio; bp->b_vp = vp; error = ncl_asyncio(nmp, bp, NOCRED, td); @@ -848,7 +848,7 @@ err_free: uiop->uio_iovcnt--; uiop->uio_iov++; } else { - uiop->uio_iov->iov_base = + uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + size; uiop->uio_iov->iov_len -= size; } @@ -981,7 +981,7 @@ flush_and_restart: mtx_lock(&np->n_mtx); nflag = np->n_flag; - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); int needrestart = 0; if (nmp->nm_wcommitsize < uio->uio_resid) { /* @@ -1294,11 +1294,11 @@ nfs_getcacheblk(struct vnode *vp, daddr_ nmp = VFSTONFS(mp); if (nmp->nm_flag & NFSMNT_INT) { - sigset_t oldset; + sigset_t oldset; - newnfs_set_sigmask(td, &oldset); + newnfs_set_sigmask(td, &oldset); bp = getblk(vp, bn, size, PCATCH, 0, 0); - newnfs_restore_sigmask(td, &oldset); + newnfs_restore_sigmask(td, &oldset); while (bp == NULL) { if (newnfs_sigintr(nmp, td)) return (NULL); @@ -1323,7 +1323,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag struct nfsnode *np = VTONFS(vp); struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, slpflag, slptimeo; - int old_lock = 0; + int old_lock = 0; ASSERT_VOP_LOCKED(vp, "ncl_vinvalbuf"); @@ -1359,7 +1359,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag VM_OBJECT_WUNLOCK(vp->v_bufobj.bo_object); /* * If the page clean was interrupted, fail the invalidation. - * Not doing so, we run the risk of losing dirty pages in the + * Not doing so, we run the risk of losing dirty pages in the * vinvalbuf() call below. */ if (intrflg && (error = newnfs_sigintr(nmp, td))) @@ -1469,13 +1469,13 @@ again: NFS_DPF(ASYNCIO, ("ncl_asyncio: waiting for mount %p queue to drain\n", nmp)); nmp->nm_bufqwant = TRUE; - error = newnfs_msleep(td, &nmp->nm_bufq, + error = newnfs_msleep(td, &nmp->nm_bufq, &ncl_iod_mutex, slpflag | PRIBIO, "nfsaio", - slptimeo); + slptimeo); if (error) { error2 = newnfs_sigintr(nmp, td); if (error2) { - mtx_unlock(&ncl_iod_mutex); + mtx_unlock(&ncl_iod_mutex); return (error2); } if (slpflag == PCATCH) { @@ -1511,7 +1511,7 @@ again: TAILQ_INSERT_TAIL(&nmp->nm_bufq, bp, b_freelist); nmp->nm_bufqlen++; if ((bp->b_flags & B_DIRECT) && bp->b_iocmd == BIO_WRITE) { - mtx_lock(&(VTONFS(bp->b_vp))->n_mtx); + mtx_lock(&(VTONFS(bp->b_vp))->n_mtx); VTONFS(bp->b_vp)->n_flag |= NMODIFIED; VTONFS(bp->b_vp)->n_directio_asyncwr++; mtx_unlock(&(VTONFS(bp->b_vp))->n_mtx); @@ -1536,7 +1536,7 @@ ncl_doio_directwrite(struct buf *bp) int iomode, must_commit; struct uio *uiop = (struct uio *)bp->b_caller1; char *iov_base = uiop->uio_iov->iov_base; - + iomode = NFSWRITE_FILESYNC; uiop->uio_td = NULL; /* NULL since we're in nfsiod */ ncl_writerpc(bp->b_vp, uiop, bp->b_wcred, &iomode, &must_commit, 0); @@ -1577,7 +1577,7 @@ ncl_doio(struct vnode *vp, struct buf *b struct iovec io; struct proc *p = td ? td->td_proc : NULL; uint8_t iocmd; - + np = VTONFS(vp); nmp = VFSTONFS(vp->v_mount); uiop = &uio; @@ -1761,20 +1761,20 @@ ncl_doio(struct vnode *vp, struct buf *b * bp in this case is not an NFS cache block so we should * be safe. XXX * - * The logic below breaks up errors into recoverable and + * The logic below breaks up errors into recoverable and * unrecoverable. For the former, we clear B_INVAL|B_NOCACHE * and keep the buffer around for potential write retries. * For the latter (eg ESTALE), we toss the buffer away (B_INVAL) - * and save the error in the nfsnode. This is less than ideal + * and save the error in the nfsnode. This is less than ideal * but necessary. Keeping such buffers around could potentially * cause buffer exhaustion eventually (they can never be written * out, so will get constantly be re-dirtied). It also causes - * all sorts of vfs panics. For non-recoverable write errors, + * all sorts of vfs panics. For non-recoverable write errors, * also invalidate the attrcache, so we'll be forced to go over * the wire for this object, returning an error to user on next * call (most of the time). */ - if (error == EINTR || error == EIO || error == ETIMEDOUT + if (error == EINTR || error == EIO || error == ETIMEDOUT || (!error && (bp->b_flags & B_NEEDCOMMIT))) { int s; @@ -1788,7 +1788,7 @@ ncl_doio(struct vnode *vp, struct buf *b (bp->b_flags & B_ASYNC) == 0) bp->b_flags |= B_EINTR; splx(s); - } else { + } else { if (error) { bp->b_ioflags |= BIO_ERROR; bp->b_flags |= B_INVAL; @@ -1841,7 +1841,7 @@ ncl_meta_setsize(struct vnode *vp, struc int bufsize; /* - * vtruncbuf() doesn't get the buffer overlapping the + * vtruncbuf() doesn't get the buffer overlapping the * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ @@ -1849,8 +1849,8 @@ ncl_meta_setsize(struct vnode *vp, struc lbn = nsize / biosize; bufsize = nsize - (lbn * biosize); bp = nfs_getcacheblk(vp, lbn, bufsize, td); - if (!bp) - return EINTR; + if (!bp) + return EINTR; if (bp->b_dirtyoff > bp->b_bcount) bp->b_dirtyoff = bp->b_bcount; if (bp->b_dirtyend > bp->b_bcount) From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 09:57:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 656BE7EE; Mon, 1 Apr 2013 09:57:47 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 57429FC5; Mon, 1 Apr 2013 09:57:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r319vlcT015472; Mon, 1 Apr 2013 09:57:47 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r319vl1d015471; Mon, 1 Apr 2013 09:57:47 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304010957.r319vl1d015471@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 1 Apr 2013 09:57:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248968 - head/sys/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: Mon, 01 Apr 2013 09:57:47 -0000 Author: kib Date: Mon Apr 1 09:57:46 2013 New Revision: 248968 URL: http://svnweb.freebsd.org/changeset/base/248968 Log: Record the correct error in the trace. Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/sys/x86/x86/busdma_machdep.c Modified: head/sys/x86/x86/busdma_machdep.c ============================================================================== --- head/sys/x86/x86/busdma_machdep.c Mon Apr 1 09:56:48 2013 (r248967) +++ head/sys/x86/x86/busdma_machdep.c Mon Apr 1 09:57:46 2013 (r248968) @@ -251,7 +251,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, M_ZERO | M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", - __func__, newtag, 0, error); + __func__, newtag, 0, ENOMEM); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 09:59:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B47C09FC; Mon, 1 Apr 2013 09:59:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 92E2FFE4; Mon, 1 Apr 2013 09:59:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r319xcSa015747; Mon, 1 Apr 2013 09:59:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r319xc5L015746; Mon, 1 Apr 2013 09:59:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304010959.r319xc5L015746@svn.freebsd.org> From: Konstantin Belousov Date: Mon, 1 Apr 2013 09:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248969 - 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: Mon, 01 Apr 2013 09:59:38 -0000 Author: kib Date: Mon Apr 1 09:59:38 2013 New Revision: 248969 URL: http://svnweb.freebsd.org/changeset/base/248969 Log: Do not call the VOP_LOOKUP() for the doomed directory vnode. The vnode could be reclaimed while lock upgrade was performed. Sponsored by: The FreeBSD Foundation Reported and tested by: pho Diagnosed and reviewed by: rmacklem MFC after: 1 week Modified: head/sys/kern/vfs_lookup.c Modified: head/sys/kern/vfs_lookup.c ============================================================================== --- head/sys/kern/vfs_lookup.c Mon Apr 1 09:57:46 2013 (r248968) +++ head/sys/kern/vfs_lookup.c Mon Apr 1 09:59:38 2013 (r248969) @@ -698,6 +698,10 @@ unionlookup: VOP_ISLOCKED(dp) == LK_SHARED && (cnp->cn_flags & ISLASTCN) && (cnp->cn_flags & LOCKPARENT)) vn_lock(dp, LK_UPGRADE|LK_RETRY); + if ((dp->v_iflag & VI_DOOMED) != 0) { + error = ENOENT; + goto bad; + } /* * If we're looking up the last component and we need an exclusive * lock, adjust our lkflags. From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 11:28:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1A64E91F; Mon, 1 Apr 2013 11:28:53 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0B986817; Mon, 1 Apr 2013 11:28:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31BSqGM041862; Mon, 1 Apr 2013 11:28:52 GMT (envelope-from melifaro@svn.freebsd.org) Received: (from melifaro@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31BSqes041861; Mon, 1 Apr 2013 11:28:52 GMT (envelope-from melifaro@svn.freebsd.org) Message-Id: <201304011128.r31BSqes041861@svn.freebsd.org> From: "Alexander V. Chernikov" Date: Mon, 1 Apr 2013 11:28:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248971 - 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: Mon, 01 Apr 2013 11:28:53 -0000 Author: melifaro Date: Mon Apr 1 11:28:52 2013 New Revision: 248971 URL: http://svnweb.freebsd.org/changeset/base/248971 Log: Fix ipfw rule validation partially broken by r248552. Pointed by: avg MFC with: r248552 Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Apr 1 10:45:35 2013 (r248970) +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Mon Apr 1 11:28:52 2013 (r248971) @@ -672,10 +672,6 @@ check_ipfw_struct(struct ip_fw *rule, in case O_IPID: case O_IPTTL: case O_IPLEN: - case O_DSCP: - if (cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1) - goto bad_size; - break; case O_TCPDATALEN: case O_TCPWIN: case O_TAGGED: @@ -683,6 +679,11 @@ check_ipfw_struct(struct ip_fw *rule, in goto bad_size; break; + case O_DSCP: + if (cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1) + goto bad_size; + break; + case O_MAC_TYPE: case O_IP_SRCPORT: case O_IP_DSTPORT: /* XXX artificial limit, 30 port pairs */ From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 11:31:21 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A7CCDAC2; Mon, 1 Apr 2013 11:31:21 +0000 (UTC) (envelope-from melifaro@FreeBSD.org) Received: from mail.ipfw.ru (unknown [IPv6:2a01:4f8:120:6141::2]) by mx1.freebsd.org (Postfix) with ESMTP id 6CCFF82F; Mon, 1 Apr 2013 11:31:21 +0000 (UTC) Received: from dhcp170-36-red.yandex.net ([95.108.170.36]) by mail.ipfw.ru with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.76 (FreeBSD)) (envelope-from ) id 1UMd0j-0002Bq-5D; Mon, 01 Apr 2013 15:34:49 +0400 Message-ID: <51596FD6.8030101@FreeBSD.org> Date: Mon, 01 Apr 2013 15:30:30 +0400 From: "Alexander V. Chernikov" User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r248552 - in head: sbin/ipfw sys/netinet sys/netpfil/ipfw References: <201303201035.r2KAZXj2090085@svn.freebsd.org> <5158A1AD.1080808@FreeBSD.org> In-Reply-To: <5158A1AD.1080808@FreeBSD.org> X-Enigmail-Version: 1.4.6 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Mon, 01 Apr 2013 11:31:21 -0000 On 01.04.2013 00:50, Andriy Gapon wrote: > on 20/03/2013 12:35 Alexander V. Chernikov said the following: >> Author: melifaro >> Date: Wed Mar 20 10:35:33 2013 >> New Revision: 248552 >> URL: http://svnweb.freebsd.org/changeset/base/248552 >> >> Log: >> Add ipfw support for setting/matching DiffServ codepoints (DSCP). >> >> Setting DSCP support is done via O_SETDSCP which works for both >> IPv4 and IPv6 packets. Fast checksum recalculation (RFC 1624) is done for IPv4. >> Dscp can be specified by name (AFXY, CSX, BE, EF), by value >> (0..63) or via tablearg. >> >> Matching DSCP is done via another opcode (O_DSCP) which accepts several >> classes at once (af11,af22,be). Classes are stored in bitmask (2 u32 words). > [snip] >> Modified: head/sys/netpfil/ipfw/ip_fw_sockopt.c >> ============================================================================== >> --- head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Mar 20 09:56:20 2013 (r248551) >> +++ head/sys/netpfil/ipfw/ip_fw_sockopt.c Wed Mar 20 10:35:33 2013 (r248552) >> @@ -671,6 +671,10 @@ check_ipfw_struct(struct ip_fw *rule, in >> case O_IPID: >> case O_IPTTL: >> case O_IPLEN: >> + case O_DSCP: >> + if (cmdlen != F_INSN_SIZE(ipfw_insn_u32) + 1) >> + goto bad_size; >> + break; >> case O_TCPDATALEN: >> case O_TCPWIN: >> case O_TAGGED: > > Could you please double-check this part of the change? > Handling of the new O_DSCP opcode is inserted in the middle of the long > fall-through list of cases and thus it modifies behavior of the preceding cases. > The commit message does not say anything about that. Yes, my fault. I've changed O_DSCP token to accept bitmask instead of single variable and forgot to properly update given part. Fixed in r248971. > > I've just done my bi-monthly release/upgrade and ipfw now chokes on my ruleset. > There is the following message in system log: > kernel: ipfw: opcode 0 size 8 wrong > Offending rule seems to be: > allow ip from any to any via tun* > > Reverting this commit fixes the problem. > Thank you. > -- WBR, Alexander From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 11:52:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 62D309D; Mon, 1 Apr 2013 11:52:00 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ea0-x231.google.com (mail-ea0-x231.google.com [IPv6:2a00:1450:4013:c01::231]) by mx1.freebsd.org (Postfix) with ESMTP id 4D87790F; Mon, 1 Apr 2013 11:51:59 +0000 (UTC) Received: by mail-ea0-f177.google.com with SMTP id q14so976129eaj.8 for ; Mon, 01 Apr 2013 04:51:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=HSRqgN0GMhnQRlzxzroynlyTaN78VwWB3n0w6j4Puic=; b=0n4GPckZMRbu+p5ouO89X/sf47SIjjoviQb1TL+9N0+DQQQxHw7inyswuVS7Qx4gjB +eUPR2tZdjDxR8R0NSLV/P/TQEbCGVtOaicdvNb1A7K1cT2Mno1mlHGGkomIvpKWeNWR ZiU7S5k/EJG/T+KVD195pnCio/rNEvc2ceSe6q2N6uy+8ek5J+q/9Q7PIC5pr5nlfJfm ArxNngkJ56md9heQkQyUQnxcV1mOF75WtZEL6qobv8uCp8qhhJ6EsIz1SxprN5yKGbrJ pceIVoqBucuSPbYe6gCZ88uMXiW7gp7YJMJmsy7hFdTx4d29T830+wb1wVGE7FEZt7NA AiHg== X-Received: by 10.15.61.8 with SMTP id h8mr36217056eex.33.1364817118372; Mon, 01 Apr 2013 04:51:58 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id u44sm20703992eel.7.2013.04.01.04.51.56 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 01 Apr 2013 04:51:57 -0700 (PDT) Sender: Alexander Motin Message-ID: <515966CC.2000108@FreeBSD.org> Date: Mon, 01 Apr 2013 13:51:56 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130326 Thunderbird/17.0.4 MIME-Version: 1.0 To: Alexey Dokuchaev Subject: Re: svn commit: r236750 - in stable/8: share/man/man4 sys/conf sys/dev/sound/pci/hda sys/modules/sound/driver/hda References: <201206081235.q58CZiiK059149@svn.freebsd.org> <20130321162521.GA82532@FreeBSD.org> <20130401085049.GA84064@FreeBSD.org> In-Reply-To: <20130401085049.GA84064@FreeBSD.org> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@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: Mon, 01 Apr 2013 11:52:00 -0000 On 01.04.2013 11:50, Alexey Dokuchaev wrote: > On Thu, Mar 21, 2013 at 04:25:21PM +0000, Alexey Dokuchaev wrote: >> On Fri, Jun 08, 2012 at 12:35:44PM +0000, Alexander Motin wrote: >>> New Revision: 236750 >>> URL: http://svn.freebsd.org/changeset/base/236750 >>> >>> Log: >>> MFC r230130: >>> Major snd_hda driver rewrite: >>> - Huge old hdac driver was split into three independent pieces: HDA >>> controller driver (hdac), HDA CODEC driver (hdacc) and HDA sudio function >>> driver (hdaa). [...] >> >> Unfortunately, this commit apparently had broken the sound for me on my >> laptop. [...] > > While trying to debug this problem, I've noticed that though I can recompile > snd_hda(4), I cannot load it: > > # kldload ./snd_hda.ko > kldload: can't load ./snd_hda.ko: No such file or directory > > The message is clearly bogus, but in /var/log/messages I see this line: > > link_elf: symbol snd_verbose undefined > > Is this known behavior? How to remedy it? I guess it is result of some mismatch between sources used for building and the running kernel. I haven't tested it last time, but previously snd_hda perfectly worked as module. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 13:17:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EC0E0151; Mon, 1 Apr 2013 13:17:29 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DEB34302; Mon, 1 Apr 2013 13:17:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31DHT5C073593; Mon, 1 Apr 2013 13:17:29 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31DHTQu073592; Mon, 1 Apr 2013 13:17:29 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304011317.r31DHTQu073592@svn.freebsd.org> From: Edward Tomasz Napierala Date: Mon, 1 Apr 2013 13:17:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248972 - head/bin/setfacl 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: Mon, 01 Apr 2013 13:17:30 -0000 Author: trasz Date: Mon Apr 1 13:17:28 2013 New Revision: 248972 URL: http://svnweb.freebsd.org/changeset/base/248972 Log: Mention that read_attributes, write_attributes, read_acl and write_acl are always permitted for the file owner. PR: kern/174948 MFC after: 1 week Modified: head/bin/setfacl/setfacl.1 Modified: head/bin/setfacl/setfacl.1 ============================================================================== --- head/bin/setfacl/setfacl.1 Mon Apr 1 11:28:52 2013 (r248971) +++ head/bin/setfacl/setfacl.1 Mon Apr 1 13:17:28 2013 (r248972) @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 8, 2013 +.Dd April 1, 2013 .Dt SETFACL 1 .Os .Sh NAME @@ -401,6 +401,10 @@ NFSv4 ACL entries are evaluated in their .Pp Multiple ACL entries specified on the command line are separated by commas. +.Pp +Note that the file owner is always granted the read_acl, write_acl, +read_attributes, and write_attributes permissions, even if the ACL +would deny it. .Sh EXIT STATUS .Ex -std .Sh EXAMPLES From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 13:18:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 48CF02F2; Mon, 1 Apr 2013 13:18:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B7EB328; Mon, 1 Apr 2013 13:18:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31DIZHP073779; Mon, 1 Apr 2013 13:18:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31DIYSt073777; Mon, 1 Apr 2013 13:18:34 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304011318.r31DIYSt073777@svn.freebsd.org> From: Alexander Motin Date: Mon, 1 Apr 2013 13:18:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248973 - head/sys/dev/tws 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: Mon, 01 Apr 2013 13:18:35 -0000 Author: mav Date: Mon Apr 1 13:18:34 2013 New Revision: 248973 URL: http://svnweb.freebsd.org/changeset/base/248973 Log: Slightly tune locking to not call xpt_alloc_ccb() that is allowed to sleep while holding the SIM mutex. Modified: head/sys/dev/tws/tws_cam.c head/sys/dev/tws/tws_user.c Modified: head/sys/dev/tws/tws_cam.c ============================================================================== --- head/sys/dev/tws/tws_cam.c Mon Apr 1 13:17:28 2013 (r248972) +++ head/sys/dev/tws/tws_cam.c Mon Apr 1 13:18:34 2013 (r248973) @@ -217,17 +217,16 @@ tws_bus_scan(struct tws_softc *sc) TWS_TRACE_DEBUG(sc, "entry", sc, 0); if (!(sc->sim)) return(ENXIO); - mtx_assert(&sc->sim_lock, MA_OWNED); - if ((ccb = xpt_alloc_ccb()) == NULL) - return(ENOMEM); - + ccb = xpt_alloc_ccb(); + mtx_lock(&sc->sim_lock); if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, cam_sim_path(sc->sim), CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD) != CAM_REQ_CMP) { + mtx_unlock(&sc->sim_lock); xpt_free_ccb(ccb); return(EIO); } xpt_rescan(ccb); - + mtx_unlock(&sc->sim_lock); return(0); } Modified: head/sys/dev/tws/tws_user.c ============================================================================== --- head/sys/dev/tws/tws_user.c Mon Apr 1 13:17:28 2013 (r248972) +++ head/sys/dev/tws/tws_user.c Mon Apr 1 13:18:34 2013 (r248973) @@ -73,9 +73,7 @@ tws_ioctl(struct cdev *dev, u_long cmd, break; case TWS_IOCTL_SCAN_BUS : TWS_TRACE_DEBUG(sc, "scan-bus", 0, 0); - mtx_lock(&sc->sim_lock); error = tws_bus_scan(sc); - mtx_unlock(&sc->sim_lock); break; default : TWS_TRACE_DEBUG(sc, "ioctl-aen", cmd, buf); From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 13:48:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3DDCF302; Mon, 1 Apr 2013 13:48:31 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 30363721; Mon, 1 Apr 2013 13:48:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31DmVj2082508; Mon, 1 Apr 2013 13:48:31 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31DmVnW082507; Mon, 1 Apr 2013 13:48:31 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304011348.r31DmVnW082507@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Mon, 1 Apr 2013 13:48:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248975 - head/crypto/openssh 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: Mon, 01 Apr 2013 13:48:31 -0000 Author: des Date: Mon Apr 1 13:48:30 2013 New Revision: 248975 URL: http://svnweb.freebsd.org/changeset/base/248975 Log: Silence warnings about redefined macros. Modified: head/crypto/openssh/umac128.c Modified: head/crypto/openssh/umac128.c ============================================================================== --- head/crypto/openssh/umac128.c Mon Apr 1 13:27:49 2013 (r248974) +++ head/crypto/openssh/umac128.c Mon Apr 1 13:48:30 2013 (r248975) @@ -1,7 +1,11 @@ /* $FreeBSD$ */ #define UMAC_OUTPUT_LEN 16 +#undef umac_new #define umac_new ssh_umac128_new +#undef umac_update #define umac_update ssh_umac128_update +#undef umac_final #define umac_final ssh_umac128_final +#undef umac_delete #define umac_delete ssh_umac128_delete #include "umac.c" From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 15:12:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 47FB3DA8; Mon, 1 Apr 2013 15:12:40 +0000 (UTC) Date: Mon, 1 Apr 2013 15:12:40 +0000 From: Alexey Dokuchaev To: Alexander Motin Subject: Re: svn commit: r236750 - in stable/8: share/man/man4 sys/conf sys/dev/sound/pci/hda sys/modules/sound/driver/hda Message-ID: <20130401151240.GA75193@FreeBSD.org> References: <201206081235.q58CZiiK059149@svn.freebsd.org> <20130321162521.GA82532@FreeBSD.org> <20130401085049.GA84064@FreeBSD.org> <515966CC.2000108@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <515966CC.2000108@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-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: Mon, 01 Apr 2013 15:12:40 -0000 On Mon, Apr 01, 2013 at 01:51:56PM +0300, Alexander Motin wrote: > On 01.04.2013 11:50, Alexey Dokuchaev wrote: > >While trying to debug this problem, I've noticed that though I can > >recompile snd_hda(4), I cannot load it: > > > > # kldload ./snd_hda.ko > > kldload: can't load ./snd_hda.ko: No such file or directory > > > >The message is clearly bogus, but in /var/log/messages I see this line: > > > > link_elf: symbol snd_verbose undefined > > > >Is this known behavior? How to remedy it? > > I guess it is result of some mismatch between sources used for > building and the running kernel. I haven't tested it last time, but > previously snd_hda perfectly worked as module. It works perfectly as a module, indeed: if I do full "make kernel". I use modules whenever it's possible in fact. The problem is that once I rebuild (in exactly the same source base) just snd_hda(4), that is "cd /sys/modules /sound/driver/hda && make", I cannot load newly built ./snd_hda.ko anymore, while "kldload /boot/kernel/snd_hda.ko" works fine. On the same running kernel, against the very same sources. I needed sound to work very soon this time (upcoming Skype conference call), so I just rolled back your changes and did "make kernel", but honestly I find it very annoying having to rebuild entire kernel when just snd_hda(4) rebuild should suffice. BTW, any ideas why my nid patches from pre-r236750 no longer apply? ./danfe From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:14:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C8A9DB4E; Mon, 1 Apr 2013 16:14:57 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BAA0992; Mon, 1 Apr 2013 16:14:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31GEvKJ026271; Mon, 1 Apr 2013 16:14:57 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31GEv7S026270; Mon, 1 Apr 2013 16:14:57 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304011614.r31GEv7S026270@svn.freebsd.org> From: Martin Matuska Date: Mon, 1 Apr 2013 16:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248976 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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: Mon, 01 Apr 2013 16:14:57 -0000 Author: mm Date: Mon Apr 1 16:14:57 2013 New Revision: 248976 URL: http://svnweb.freebsd.org/changeset/base/248976 Log: Call dmu_snapshot_list_next() in zvol.c with dsl_pool_config lock held Submitted by: Andriy Gapon MFC after: 17 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 1 13:48:30 2013 (r248975) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Mon Apr 1 16:14:57 2013 (r248976) @@ -2197,8 +2197,10 @@ zvol_create_snapshots(objset_t *os, cons break; } + dsl_pool_config_enter(dmu_objset_pool(os), FTAG); error = dmu_snapshot_list_next(os, MAXPATHLEN - len, sname + len, &obj, &cookie, NULL); + dsl_pool_config_exit(dmu_objset_pool(os), FTAG); if (error != 0) { if (error == ENOENT) error = 0; From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:23:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5AAFAE54; Mon, 1 Apr 2013 16:23:36 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3C080110; Mon, 1 Apr 2013 16:23:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31GNamX029064; Mon, 1 Apr 2013 16:23:36 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31GNZaq029055; Mon, 1 Apr 2013 16:23:35 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304011623.r31GNZaq029055@svn.freebsd.org> From: Jim Harris Date: Mon, 1 Apr 2013 16:23:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248977 - in head/sys/dev: nvd 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: Mon, 01 Apr 2013 16:23:36 -0000 Author: jimharris Date: Mon Apr 1 16:23:34 2013 New Revision: 248977 URL: http://svnweb.freebsd.org/changeset/base/248977 Log: Add unmapped bio support to nvme(4) and nvd(4). Sponsored by: Intel Modified: head/sys/dev/nvd/nvd.c head/sys/dev/nvme/nvme.h head/sys/dev/nvme/nvme_ns.c head/sys/dev/nvme/nvme_ns_cmd.c head/sys/dev/nvme/nvme_private.h head/sys/dev/nvme/nvme_qpair.c Modified: head/sys/dev/nvd/nvd.c ============================================================================== --- head/sys/dev/nvd/nvd.c Mon Apr 1 16:14:57 2013 (r248976) +++ head/sys/dev/nvd/nvd.c Mon Apr 1 16:23:34 2013 (r248977) @@ -301,6 +301,11 @@ nvd_new_disk(struct nvme_namespace *ns, if (nvme_ns_get_flags(ns) & NVME_NS_FLUSH_SUPPORTED) disk->d_flags |= DISKFLAG_CANFLUSHCACHE; +/* ifdef used here to ease porting to stable branches at a later point. */ +#ifdef DISKFLAG_UNMAPPED_BIO + disk->d_flags |= DISKFLAG_UNMAPPED_BIO; +#endif + strlcpy(disk->d_ident, nvme_ns_get_serial_number(ns), sizeof(disk->d_ident)); Modified: head/sys/dev/nvme/nvme.h ============================================================================== --- head/sys/dev/nvme/nvme.h Mon Apr 1 16:14:57 2013 (r248976) +++ head/sys/dev/nvme/nvme.h Mon Apr 1 16:23:34 2013 (r248977) @@ -758,9 +758,13 @@ void nvme_ctrlr_cmd_get_log_page(struct int nvme_ns_cmd_write(struct nvme_namespace *ns, void *payload, uint64_t lba, uint32_t lba_count, nvme_cb_fn_t cb_fn, void *cb_arg); +int nvme_ns_cmd_write_bio(struct nvme_namespace *ns, struct bio *bp, + nvme_cb_fn_t cb_fn, void *cb_arg); int nvme_ns_cmd_read(struct nvme_namespace *ns, void *payload, uint64_t lba, uint32_t lba_count, nvme_cb_fn_t cb_fn, void *cb_arg); +int nvme_ns_cmd_read_bio(struct nvme_namespace *ns, struct bio *bp, + nvme_cb_fn_t cb_fn, void *cb_arg); int nvme_ns_cmd_deallocate(struct nvme_namespace *ns, void *payload, uint8_t num_ranges, nvme_cb_fn_t cb_fn, void *cb_arg); Modified: head/sys/dev/nvme/nvme_ns.c ============================================================================== --- head/sys/dev/nvme/nvme_ns.c Mon Apr 1 16:14:57 2013 (r248976) +++ head/sys/dev/nvme/nvme_ns.c Mon Apr 1 16:23:34 2013 (r248977) @@ -150,11 +150,17 @@ nvme_ns_strategy(struct bio *bp) static struct cdevsw nvme_ns_cdevsw = { .d_version = D_VERSION, +#ifdef NVME_UNMAPPED_BIO_SUPPORT + .d_flags = D_DISK | D_UNMAPPED_IO, + .d_read = physread, + .d_write = physwrite, +#else .d_flags = D_DISK, - .d_open = nvme_ns_open, - .d_close = nvme_ns_close, .d_read = nvme_ns_physio, .d_write = nvme_ns_physio, +#endif + .d_open = nvme_ns_open, + .d_close = nvme_ns_close, .d_strategy = nvme_ns_strategy, .d_ioctl = nvme_ns_ioctl }; @@ -233,16 +239,10 @@ nvme_ns_bio_process(struct nvme_namespac switch (bp->bio_cmd) { case BIO_READ: - err = nvme_ns_cmd_read(ns, bp->bio_data, - bp->bio_offset/nvme_ns_get_sector_size(ns), - bp->bio_bcount/nvme_ns_get_sector_size(ns), - nvme_ns_bio_done, bp); + err = nvme_ns_cmd_read_bio(ns, bp, nvme_ns_bio_done, bp); break; case BIO_WRITE: - err = nvme_ns_cmd_write(ns, bp->bio_data, - bp->bio_offset/nvme_ns_get_sector_size(ns), - bp->bio_bcount/nvme_ns_get_sector_size(ns), - nvme_ns_bio_done, bp); + err = nvme_ns_cmd_write_bio(ns, bp, nvme_ns_bio_done, bp); break; case BIO_FLUSH: err = nvme_ns_cmd_flush(ns, nvme_ns_bio_done, bp); Modified: head/sys/dev/nvme/nvme_ns_cmd.c ============================================================================== --- head/sys/dev/nvme/nvme_ns_cmd.c Mon Apr 1 16:14:57 2013 (r248976) +++ head/sys/dev/nvme/nvme_ns_cmd.c Mon Apr 1 16:23:34 2013 (r248977) @@ -54,6 +54,35 @@ nvme_ns_cmd_read(struct nvme_namespace * } int +nvme_ns_cmd_read_bio(struct nvme_namespace *ns, struct bio *bp, + nvme_cb_fn_t cb_fn, void *cb_arg) +{ + struct nvme_request *req; + struct nvme_command *cmd; + uint64_t lba; + uint64_t lba_count; + + req = nvme_allocate_request_bio(bp, cb_fn, cb_arg); + + if (req == NULL) + return (ENOMEM); + cmd = &req->cmd; + cmd->opc = NVME_OPC_READ; + cmd->nsid = ns->id; + + lba = bp->bio_offset / nvme_ns_get_sector_size(ns); + lba_count = bp->bio_bcount / nvme_ns_get_sector_size(ns); + + /* TODO: create a read command data structure */ + *(uint64_t *)&cmd->cdw10 = lba; + cmd->cdw12 = lba_count-1; + + nvme_ctrlr_submit_io_request(ns->ctrlr, req); + + return (0); +} + +int nvme_ns_cmd_write(struct nvme_namespace *ns, void *payload, uint64_t lba, uint32_t lba_count, nvme_cb_fn_t cb_fn, void *cb_arg) { @@ -80,6 +109,35 @@ nvme_ns_cmd_write(struct nvme_namespace } int +nvme_ns_cmd_write_bio(struct nvme_namespace *ns, struct bio *bp, + nvme_cb_fn_t cb_fn, void *cb_arg) +{ + struct nvme_request *req; + struct nvme_command *cmd; + uint64_t lba; + uint64_t lba_count; + + req = nvme_allocate_request_bio(bp, cb_fn, cb_arg); + + if (req == NULL) + return (ENOMEM); + cmd = &req->cmd; + cmd->opc = NVME_OPC_WRITE; + cmd->nsid = ns->id; + + lba = bp->bio_offset / nvme_ns_get_sector_size(ns); + lba_count = bp->bio_bcount / nvme_ns_get_sector_size(ns); + + /* TODO: create a write command data structure */ + *(uint64_t *)&cmd->cdw10 = lba; + cmd->cdw12 = lba_count-1; + + nvme_ctrlr_submit_io_request(ns->ctrlr, req); + + return (0); +} + +int nvme_ns_cmd_deallocate(struct nvme_namespace *ns, void *payload, uint8_t num_ranges, nvme_cb_fn_t cb_fn, void *cb_arg) { Modified: head/sys/dev/nvme/nvme_private.h ============================================================================== --- head/sys/dev/nvme/nvme_private.h Mon Apr 1 16:14:57 2013 (r248976) +++ head/sys/dev/nvme/nvme_private.h Mon Apr 1 16:23:34 2013 (r248977) @@ -30,6 +30,7 @@ #define __NVME_PRIVATE_H__ #include +#include #include #include #include @@ -114,6 +115,16 @@ MALLOC_DECLARE(M_NVME); #define CACHE_LINE_SIZE (64) #endif +/* + * Use presence of the BIO_UNMAPPED flag to determine whether unmapped I/O + * support and the bus_dmamap_load_bio API are available on the target + * kernel. This will ease porting back to earlier stable branches at a + * later point. + */ +#ifdef BIO_UNMAPPED +#define NVME_UNMAPPED_BIO_SUPPORT +#endif + extern uma_zone_t nvme_request_zone; extern int32_t nvme_retry_count; @@ -126,6 +137,9 @@ struct nvme_completion_poll_status { #define NVME_REQUEST_VADDR 1 #define NVME_REQUEST_NULL 2 /* For requests with no payload. */ #define NVME_REQUEST_UIO 3 +#ifdef NVME_UNMAPPED_BIO_SUPPORT +#define NVME_REQUEST_BIO 4 +#endif struct nvme_request { @@ -134,6 +148,7 @@ struct nvme_request { union { void *payload; struct uio *uio; + struct bio *bio; } u; uint32_t type; uint32_t payload_size; @@ -527,6 +542,25 @@ nvme_allocate_request_uio(struct uio *ui return (req); } +static __inline struct nvme_request * +nvme_allocate_request_bio(struct bio *bio, nvme_cb_fn_t cb_fn, void *cb_arg) +{ + struct nvme_request *req; + + req = _nvme_allocate_request(cb_fn, cb_arg); + if (req != NULL) { +#ifdef NVME_UNMAPPED_BIO_SUPPORT + req->type = NVME_REQUEST_BIO; + req->u.bio = bio; +#else + req->type = NVME_REQUEST_VADDR; + req->u.payload = bio->bio_data; + req->payload_size = bio->bio_bcount; +#endif + } + return (req); +} + #define nvme_free_request(req) uma_zfree(nvme_request_zone, req) void nvme_notify_async_consumers(struct nvme_controller *ctrlr, Modified: head/sys/dev/nvme/nvme_qpair.c ============================================================================== --- head/sys/dev/nvme/nvme_qpair.c Mon Apr 1 16:14:57 2013 (r248976) +++ head/sys/dev/nvme/nvme_qpair.c Mon Apr 1 16:23:34 2013 (r248977) @@ -757,6 +757,14 @@ _nvme_qpair_submit_request(struct nvme_q if (err != 0) panic("bus_dmamap_load_uio returned non-zero!\n"); break; +#ifdef NVME_UNMAPPED_BIO_SUPPORT + case NVME_REQUEST_BIO: + err = bus_dmamap_load_bio(tr->qpair->dma_tag, + tr->payload_dma_map, req->u.bio, nvme_payload_map, tr, 0); + if (err != 0) + panic("bus_dmamap_load_bio returned non-zero!\n"); + break; +#endif default: panic("unknown nvme request type 0x%x\n", req->type); break; From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:30:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A4A32C7; Mon, 1 Apr 2013 16:30:12 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4885415D; Mon, 1 Apr 2013 16:30:12 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id B686EB960; Mon, 1 Apr 2013 12:30:11 -0400 (EDT) From: John Baldwin To: "Alexander V. Chernikov" Subject: Re: svn commit: r248705 - head/sys/dev/ipmi Date: Mon, 1 Apr 2013 11:54:09 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303251430.r2PEUYcx045864@svn.freebsd.org> In-Reply-To: <201303251430.r2PEUYcx045864@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201304011154.09795.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Apr 2013 12:30:11 -0400 (EDT) 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: Mon, 01 Apr 2013 16:30:12 -0000 On Monday, March 25, 2013 10:30:34 am Alexander V. Chernikov wrote: > Author: melifaro > Date: Mon Mar 25 14:30:34 2013 > New Revision: 248705 > URL: http://svnweb.freebsd.org/changeset/base/248705 > > Log: > Unlock IPMI sc while performing requests via KCS and SMIC interfaces. > It is already done in SSIF interface code. > This reduces contention/spinning reported by many users. Eh, this was on purpose to prevent concurrent access to the hardware. SSIF doesn't do this because the smbus driver itself does locking internally. There are no followups in the PR to state how this patch helps (or if it was tested). OTOH, we should probably make KCS and SMIC perform their requests synchronously rather than kicking them over to a worker thread and only use a worker thread for SSIF. This has the advantage that you could make it interruptible so you could Ctrl-C ipmiutil and have it do something useful. Also, the current KCS/SMIC code has a timeout, it shouldn't spin forever. The fact that it is spinning forever is a different bug (possibly recently fixed by making 'ticks' volatile). That different bug is probably what should be fixed instead. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:30:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EA4A52D0; Mon, 1 Apr 2013 16:30:16 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id C8DA6163; Mon, 1 Apr 2013 16:30:16 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2A6F1B94A; Mon, 1 Apr 2013 12:30:16 -0400 (EDT) From: John Baldwin To: Antoine Brodin Subject: Re: svn commit: r248682 - head Date: Mon, 1 Apr 2013 12:14:18 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303241239.r2OCdQLY067503@svn.freebsd.org> In-Reply-To: <201303241239.r2OCdQLY067503@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201304011214.18835.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Apr 2013 12:30:16 -0400 (EDT) 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: Mon, 01 Apr 2013 16:30:17 -0000 On Sunday, March 24, 2013 8:39:26 am Antoine Brodin wrote: > Author: antoine > Date: Sun Mar 24 12:39:26 2013 > New Revision: 248682 > URL: http://svnweb.freebsd.org/changeset/base/248682 > > Log: > Add 2 more obsolete files and a missing date. > > Modified: > head/ObsoleteFiles.inc > > Modified: head/ObsoleteFiles.inc > ============================================================================== > --- head/ObsoleteFiles.inc Sun Mar 24 12:35:12 2013 (r248681) > +++ head/ObsoleteFiles.inc Sun Mar 24 12:39:26 2013 (r248682) > @@ -38,7 +38,11 @@ > # xargs -n1 | sort | uniq -d; > # done > > +# 20130316: vinum.4 removed > OLD_FILES+=usr/share/man/man4/vinum.4.gz > +# 20130312: fortunes-o removed > +OLD_FILES+=usr/share/games/fortune/fortunes-o > +OLD_FILES+=usr/share/games/fortune/fortunes-o.dat This was intentional so that people may choose to keep fortunes-o locally. In that case it would still be installed in this location (as fortune only looks in this directory). -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:30:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1391441C; Mon, 1 Apr 2013 16:30:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 92A78164; Mon, 1 Apr 2013 16:30:19 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 79EF5B964; Mon, 1 Apr 2013 12:30:18 -0400 (EDT) From: John Baldwin To: Ed Maste Subject: Re: svn commit: r248751 - head/share/mk Date: Mon, 1 Apr 2013 12:17:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303262011.r2QKBAjm094760@svn.freebsd.org> In-Reply-To: <201303262011.r2QKBAjm094760@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201304011217.41274.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Apr 2013 12:30:18 -0400 (EDT) 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: Mon, 01 Apr 2013 16:30:20 -0000 On Tuesday, March 26, 2013 4:11:10 pm Ed Maste wrote: > Author: emaste > Date: Tue Mar 26 20:11:09 2013 > New Revision: 248751 > URL: http://svnweb.freebsd.org/changeset/base/248751 > > Log: > Unconditionally include ${SRCCONF} if overridden > > This avoids silently failing to include ${SRCCONF} specified by a make(1) > invocation. > > Modified: > head/share/mk/bsd.own.mk > > Modified: head/share/mk/bsd.own.mk > ============================================================================== > --- head/share/mk/bsd.own.mk Tue Mar 26 20:04:45 2013 (r248750) > +++ head/share/mk/bsd.own.mk Tue Mar 26 20:11:09 2013 (r248751) > @@ -117,7 +117,7 @@ ____: > > .if !defined(_WITHOUT_SRCCONF) > SRCCONF?= /etc/src.conf > -.if exists(${SRCCONF}) > +.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" > .include "${SRCCONF}" > .endif > .endif Hmm, I'm confused why this matters? Was exists() failing for a file that did exist? Can you give a more specific use case? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:30:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6C38241E; Mon, 1 Apr 2013 16:30:21 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4346A165; Mon, 1 Apr 2013 16:30:21 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 8CCA6B963; Mon, 1 Apr 2013 12:30:20 -0400 (EDT) From: John Baldwin To: Will Andrews Subject: Re: svn commit: r248836 - head/gnu/usr.bin/gdb/kgdb Date: Mon, 1 Apr 2013 12:19:48 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303281704.r2SH4x3J025620@svn.freebsd.org> In-Reply-To: <201303281704.r2SH4x3J025620@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201304011219.48988.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Apr 2013 12:30:20 -0400 (EDT) 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: Mon, 01 Apr 2013 16:30:21 -0000 On Thursday, March 28, 2013 1:04:59 pm Will Andrews wrote: > Author: will > Date: Thu Mar 28 17:04:59 2013 > New Revision: 248836 > URL: http://svnweb.freebsd.org/changeset/base/248836 > > Log: > KGDB: Allow modules to be loaded from the specified kernel's directory. > > When looking up the absolute path for a kld, call find_kld_path() first. > This enables locating the module in a different directory than the one > stored in kernel memory. > > With this change, kgdb can now be run on a kernel & vmcore whose associated > modules are located in the same directory as the kernel. This makes > independent triaging of problems much easier. > > This change also does not break the normal kgdb use case where no arguments > are specified; in that case kgdb loads the running kernel and its modules. > > Reviewed by: adrian > Approved by: ken (mentor) > Sponsored by: Spectra Logic > MFC after: 1 month Sorry I didn't comment on this earlier (was away from mail). This looks good to me. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 16:35:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B98619D7; Mon, 1 Apr 2013 16:35:27 +0000 (UTC) (envelope-from utisoft@gmail.com) Received: from mail-ia0-x234.google.com (mail-ia0-x234.google.com [IPv6:2607:f8b0:4001:c02::234]) by mx1.freebsd.org (Postfix) with ESMTP id 687B71B6; Mon, 1 Apr 2013 16:35:27 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f27so1995198iae.39 for ; Mon, 01 Apr 2013 09:35:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=VIcwd3qM9C4CWGYTZX4rVxO08BEbBz2VryJFECxMWD4=; b=Fq4XrU5ndvS9pSCvj4LCvuDtzYaJD9KtrAW+mGBBWT5kRVjiZmx6IVlez+70jrfpG0 0ocHfGVWEy24S6vmFxp+MB3qjvnGQIGp4SP+HSr0jp8ZJDsAaUiDB01lTle2g9keXYle XtGHA9sOA30rulUucQyYs0ADpsYJDkGyf4cA3/5lO3abjpoCyCelR/O5OhkFaCInEL0i j5uAXUFPkNi+q/p5OU5WtqN/ElYzSrDDfAMHnylYTdPsWVRnKvtYDBm+w0fDYyrw4aox KR/joCtXxoIigOyWkYjq8x2SNAv2irDNWqVHMgCfgerof/s41+KWlKOHdZDu+2ABpKsi X8gw== X-Received: by 10.50.13.175 with SMTP id i15mr3827753igc.75.1364834127122; Mon, 01 Apr 2013 09:35:27 -0700 (PDT) MIME-Version: 1.0 Sender: utisoft@gmail.com Received: by 10.64.58.52 with HTTP; Mon, 1 Apr 2013 09:34:57 -0700 (PDT) In-Reply-To: <201304011217.41274.jhb@freebsd.org> References: <201303262011.r2QKBAjm094760@svn.freebsd.org> <201304011217.41274.jhb@freebsd.org> From: Chris Rees Date: Mon, 1 Apr 2013 17:34:57 +0100 X-Google-Sender-Auth: YTJivWteqFGj_cccmppzKlsaFAY Message-ID: Subject: Re: svn commit: r248751 - head/share/mk To: John Baldwin Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Ed Maste 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: Mon, 01 Apr 2013 16:35:27 -0000 On 1 April 2013 17:17, John Baldwin wrote: > On Tuesday, March 26, 2013 4:11:10 pm Ed Maste wrote: >> Author: emaste >> Date: Tue Mar 26 20:11:09 2013 >> New Revision: 248751 >> URL: http://svnweb.freebsd.org/changeset/base/248751 >> >> Log: >> Unconditionally include ${SRCCONF} if overridden >> >> This avoids silently failing to include ${SRCCONF} specified by a make(1) >> invocation. >> >> Modified: >> head/share/mk/bsd.own.mk >> >> Modified: head/share/mk/bsd.own.mk >> > ============================================================================== >> --- head/share/mk/bsd.own.mk Tue Mar 26 20:04:45 2013 (r248750) >> +++ head/share/mk/bsd.own.mk Tue Mar 26 20:11:09 2013 (r248751) >> @@ -117,7 +117,7 @@ ____: >> >> .if !defined(_WITHOUT_SRCCONF) >> SRCCONF?= /etc/src.conf >> -.if exists(${SRCCONF}) >> +.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" >> .include "${SRCCONF}" >> .endif >> .endif > > Hmm, I'm confused why this matters? Was exists() failing for a file that did > exist? Can you give a more specific use case? I think it's useful that if you've set SRCCONF in make.conf, the build should complain about a lack of its existence. A single character spelling error in the name of SRCCONF will have the build silently failing to include it, thus resulting in enormous frustration when your settings aren't applied for some non-obvious reason... Chris From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 17:15:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 95BFCAF1; Mon, 1 Apr 2013 17:15:05 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 795B5377; Mon, 1 Apr 2013 17:15:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31HF4lS043944; Mon, 1 Apr 2013 17:15:04 GMT (envelope-from emaste@svn.freebsd.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31HF4pi043943; Mon, 1 Apr 2013 17:15:04 GMT (envelope-from emaste@svn.freebsd.org) Message-Id: <201304011715.r31HF4pi043943@svn.freebsd.org> From: Ed Maste Date: Mon, 1 Apr 2013 17:15:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248979 - head/etc/mtree 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: Mon, 01 Apr 2013 17:15:05 -0000 Author: emaste Date: Mon Apr 1 17:15:04 2013 New Revision: 248979 URL: http://svnweb.freebsd.org/changeset/base/248979 Log: Format per etc/mtree/README - Spaces instead of tabs - Sort some i18n entries Modified: head/etc/mtree/BSD.usr.dist Modified: head/etc/mtree/BSD.usr.dist ============================================================================== --- head/etc/mtree/BSD.usr.dist Mon Apr 1 16:26:20 2013 (r248978) +++ head/etc/mtree/BSD.usr.dist Mon Apr 1 17:15:04 2013 (r248979) @@ -22,14 +22,14 @@ .. engines .. - i18n - .. + i18n + .. .. lib32 - dtrace - .. - i18n - .. + dtrace + .. + i18n + .. .. libdata gcc @@ -40,8 +40,8 @@ .. .. libexec - bsdinstall - .. + bsdinstall + .. lpr ru .. @@ -207,7 +207,7 @@ dtrace toolkit .. - .. + .. examples BSD_daemon .. @@ -330,79 +330,79 @@ fortune .. .. + i18n + csmapper + APPLE + .. + AST + .. + BIG5 + .. + CNS + .. + CP + .. + EBCDIC + .. + GB + .. + GEORGIAN + .. + ISO-8859 + .. + ISO646 + .. + JIS + .. + KAZAKH + .. + KOI + .. + KS + .. + MISC + .. + TCVN + .. + .. + esdb + APPLE + .. + AST + .. + BIG5 + .. + CP + .. + DEC + .. + EBCDIC + .. + EUC + .. + GB + .. + GEORGIAN + .. + ISO-2022 + .. + ISO-8859 + .. + ISO646 + .. + KAZAKH + .. + KOI + .. + MISC + .. + TCVN + .. + UTF + .. + .. + .. info - .. - i18n - csmapper - APPLE - .. - AST - .. - BIG5 - .. - CNS - .. - CP - .. - EBCDIC - .. - GB - .. - GEORGIAN - .. - ISO-8859 - .. - ISO646 - .. - JIS - .. - KAZAKH - .. - KOI - .. - KS - .. - MISC - .. - TCVN - .. - .. - esdb - APPLE - .. - AST - .. - BIG5 - .. - CP - .. - DEC - .. - EBCDIC - .. - EUC - .. - GB - .. - GEORGIAN - .. - ISO-2022 - .. - ISO-8859 - .. - ISO646 - .. - KAZAKH - .. - KOI - .. - MISC - .. - TCVN - .. - UTF - .. - .. .. locale UTF-8 @@ -429,26 +429,26 @@ .. ca_AD.ISO8859-1 .. - ca_ES.ISO8859-1 - .. - ca_FR.ISO8859-1 + ca_AD.ISO8859-15 .. - ca_IT.ISO8859-1 + ca_AD.UTF-8 .. - ca_AD.ISO8859-15 + ca_ES.ISO8859-1 .. ca_ES.ISO8859-15 .. - ca_FR.ISO8859-15 - .. - ca_IT.ISO8859-15 + ca_ES.UTF-8 .. - ca_AD.UTF-8 + ca_FR.ISO8859-1 .. - ca_ES.UTF-8 + ca_FR.ISO8859-15 .. ca_FR.UTF-8 .. + ca_IT.ISO8859-1 + .. + ca_IT.ISO8859-15 + .. ca_IT.UTF-8 .. cs_CZ.ISO8859-2 From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 17:17:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A51C4C8E; Mon, 1 Apr 2013 17:17:49 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) by mx1.freebsd.org (Postfix) with ESMTP id 4112C395; Mon, 1 Apr 2013 17:17:49 +0000 (UTC) Received: by mail-ob0-f181.google.com with SMTP id ni5so2041416obc.26 for ; Mon, 01 Apr 2013 10:17:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=xmvkBn0y7tHfoBgNDPKzMrlX6QNmovtWO3MF9S1E/4Y=; b=C9aPNt+H34RT411KqtAujg426TI2wvBCvoGnN9NUBrddMEDzA9rK+GZA8l4qdkM7QW 7hcALjy1dCR7JJBYba8wgonyT25vvEioi4hiP9dP7Vx2XJ7dHWM3PfOcHQufPMMST2/X 2PF9Es9d4r6Rh6aH4otLUtrB+NXNnFAa2cIj9fSP+e2QbMms52RbcPp38teqoMKxgDdy UNEONaWudq2HsREfz/q2TGutsql5v/+U6Po1bdd2/dHD8HVxFiu55+kSFzGmkOsWA6Ne JpibuF9oIUwuJgKLXe1/bqPD5ATetK+pKAydDKE+oQsA42/JS9cAu5z8WvxLK9wWZ29u D6vw== MIME-Version: 1.0 X-Received: by 10.182.139.37 with SMTP id qv5mr4155935obb.92.1364836668863; Mon, 01 Apr 2013 10:17:48 -0700 (PDT) Sender: carpeddiem@gmail.com Received: by 10.60.132.142 with HTTP; Mon, 1 Apr 2013 10:17:48 -0700 (PDT) In-Reply-To: References: <201303262011.r2QKBAjm094760@svn.freebsd.org> <201304011217.41274.jhb@freebsd.org> Date: Mon, 1 Apr 2013 13:17:48 -0400 X-Google-Sender-Auth: zTVlWeI_Ua_vWTN2jIhaP5iXq8M Message-ID: Subject: Re: svn commit: r248751 - head/share/mk From: Ed Maste To: Chris Rees Content-Type: text/plain; charset=ISO-8859-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, John Baldwin 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: Mon, 01 Apr 2013 17:17:49 -0000 On 1 April 2013 12:34, Chris Rees wrote: > On 1 April 2013 17:17, John Baldwin wrote: >> On Tuesday, March 26, 2013 4:11:10 pm Ed Maste wrote: >>> Author: emaste >>> Date: Tue Mar 26 20:11:09 2013 >>> New Revision: 248751 >>> URL: http://svnweb.freebsd.org/changeset/base/248751 >>> >>> Log: >>> Unconditionally include ${SRCCONF} if overridden >>> >>> This avoids silently failing to include ${SRCCONF} specified by a make(1) >>> invocation. >>> >>> Modified: >>> head/share/mk/bsd.own.mk >>> >>> Modified: head/share/mk/bsd.own.mk >>> >> ============================================================================== >>> --- head/share/mk/bsd.own.mk Tue Mar 26 20:04:45 2013 (r248750) >>> +++ head/share/mk/bsd.own.mk Tue Mar 26 20:11:09 2013 (r248751) >>> @@ -117,7 +117,7 @@ ____: >>> >>> .if !defined(_WITHOUT_SRCCONF) >>> SRCCONF?= /etc/src.conf >>> -.if exists(${SRCCONF}) >>> +.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" >>> .include "${SRCCONF}" >>> .endif >>> .endif >> >> Hmm, I'm confused why this matters? Was exists() failing for a file that did >> exist? Can you give a more specific use case? > > I think it's useful that if you've set SRCCONF in make.conf, the build > should complain about a lack of its existence. > > A single character spelling error in the name of SRCCONF will have the > build silently failing to include it, thus resulting in enormous > frustration when your settings aren't applied for some non-obvious > reason... Exactly. In my case I had incorrectly specified the path to my src.conf and it took longer than I'd like to admit to discover the failure. -Ed From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 17:18:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 73774E0A; Mon, 1 Apr 2013 17:18:25 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 571113C4; Mon, 1 Apr 2013 17:18:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31HIPbo044420; Mon, 1 Apr 2013 17:18:25 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31HINZ9044401; Mon, 1 Apr 2013 17:18:23 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304011718.r31HINZ9044401@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 1 Apr 2013 17:18:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248980 - head/bin/sh 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: Mon, 01 Apr 2013 17:18:25 -0000 Author: jilles Date: Mon Apr 1 17:18:22 2013 New Revision: 248980 URL: http://svnweb.freebsd.org/changeset/base/248980 Log: sh: Fix various compiler warnings. It now passes WARNS=7 with clang on i386. GCC 4.2.1 does not understand setjmp() properly so will always trigger -Wuninitialized. I will not add the volatile keywords to suppress this. Modified: head/bin/sh/exec.c head/bin/sh/expand.c head/bin/sh/input.c head/bin/sh/input.h head/bin/sh/jobs.c head/bin/sh/main.c head/bin/sh/memalloc.c head/bin/sh/memalloc.h head/bin/sh/parser.c head/bin/sh/parser.h head/bin/sh/trap.c Modified: head/bin/sh/exec.c ============================================================================== --- head/bin/sh/exec.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/exec.c Mon Apr 1 17:18:22 2013 (r248980) @@ -165,7 +165,7 @@ tryexec(char *cmd, char **argv, char **e } } *argv = cmd; - *--argv = _PATH_BSHELL; + *--argv = __DECONST(char *, _PATH_BSHELL); execve(_PATH_BSHELL, argv, envp); } errno = e; @@ -188,7 +188,7 @@ padvance(const char **path, const char * { const char *p, *start; char *q; - int len; + size_t len; if (*path == NULL) return NULL; Modified: head/bin/sh/expand.c ============================================================================== --- head/bin/sh/expand.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/expand.c Mon Apr 1 17:18:22 2013 (r248980) @@ -460,7 +460,7 @@ expbackq(union node *cmd, int quoted, in int startloc = dest - stackblock(); char const *syntax = quoted? DQSYNTAX : BASESYNTAX; int quotes = flag & (EXP_FULL | EXP_CASE | EXP_REDIR); - int nnl; + size_t nnl; INTOFF; saveifs = ifsfirst; @@ -1163,9 +1163,9 @@ nometa: static void expmeta(char *enddir, char *name) { - char *p; - char *q; - char *start; + const char *p; + const char *q; + const char *start; char *endname; int metaflag; struct stat statb; @@ -1229,7 +1229,7 @@ expmeta(char *enddir, char *name) addfname(expdir); return; } - endname = p; + endname = name + (p - name); if (start != name) { p = name; while (p < start) { @@ -1412,7 +1412,8 @@ match_charclass(const char *p, wchar_t c *end = NULL; p++; nameend = strstr(p, ":]"); - if (nameend == NULL || nameend - p >= sizeof(name) || nameend == p) + if (nameend == NULL || (size_t)(nameend - p) >= sizeof(name) || + nameend == p) return 0; memcpy(name, p, nameend - p); name[nameend - p] = '\0'; Modified: head/bin/sh/input.c ============================================================================== --- head/bin/sh/input.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/input.c Mon Apr 1 17:18:22 2013 (r248980) @@ -66,7 +66,7 @@ __FBSDID("$FreeBSD$"); struct strpush { struct strpush *prev; /* preceding string on stack */ - char *prevstring; + const char *prevstring; int prevnleft; int prevlleft; struct alias *ap; /* if push was associated with an alias */ @@ -83,7 +83,7 @@ struct parsefile { int fd; /* file descriptor (or -1 if string) */ int nleft; /* number of chars left in this line */ int lleft; /* number of lines left in this buffer */ - char *nextc; /* next char in buffer */ + const char *nextc; /* next char in buffer */ char *buf; /* input buffer */ struct strpush *strpush; /* for pushing strings at this level */ struct strpush basestrpush; /* so pushing one is fast */ @@ -93,7 +93,7 @@ struct parsefile { int plinno = 1; /* input line number */ int parsenleft; /* copy of parsefile->nleft */ MKINIT int parselleft; /* copy of parsefile->lleft */ -char *parsenextc; /* copy of parsefile->nextc */ +const char *parsenextc; /* copy of parsefile->nextc */ static char basebuf[BUFSIZ + 1];/* buffer for top level input file */ static struct parsefile basepf = { /* top level input file */ .nextc = basebuf, @@ -185,7 +185,7 @@ retry: nr = el_len; if (nr > BUFSIZ) nr = BUFSIZ; - memcpy(parsenextc, rl_cp, nr); + memcpy(parsefile->buf, rl_cp, nr); if (nr != el_len) { el_len -= nr; rl_cp += nr; @@ -194,7 +194,7 @@ retry: } } else #endif - nr = read(parsefile->fd, parsenextc, BUFSIZ); + nr = read(parsefile->fd, parsefile->buf, BUFSIZ); if (nr <= 0) { if (nr < 0) { @@ -252,7 +252,7 @@ again: } } - q = p = parsenextc; + q = p = parsefile->buf + (parsenextc - parsefile->buf); /* delete nul characters */ something = 0; @@ -439,7 +439,7 @@ setinputfd(int fd, int push) */ void -setinputstring(char *string, int push) +setinputstring(const char *string, int push) { INTOFF; if (push) Modified: head/bin/sh/input.h ============================================================================== --- head/bin/sh/input.h Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/input.h Mon Apr 1 17:18:22 2013 (r248980) @@ -42,7 +42,7 @@ */ extern int plinno; extern int parsenleft; /* number of characters left in input buffer */ -extern char *parsenextc; /* next character in input buffer */ +extern const char *parsenextc; /* next character in input buffer */ struct alias; struct parsefile; @@ -55,7 +55,7 @@ void pungetc(void); void pushstring(char *, int, struct alias *); void setinputfile(const char *, int); void setinputfd(int, int); -void setinputstring(char *, int); +void setinputstring(const char *, int); void popfile(void); struct parsefile *getcurrentfile(void); void popfilesupto(struct parsefile *); Modified: head/bin/sh/jobs.c ============================================================================== --- head/bin/sh/jobs.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/jobs.c Mon Apr 1 17:18:22 2013 (r248980) @@ -668,7 +668,8 @@ makejob(union node *node __unused, int n jobtab = jp; } jp = jobtab + njobs; - for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0); + for (i = 4 ; --i >= 0 ; jobtab[njobs++].used = 0) + ; INTON; break; } @@ -1005,7 +1006,7 @@ waitforjob(struct job *jp, int *origstat static void -dummy_handler(int sig) +dummy_handler(int sig __unused) { } Modified: head/bin/sh/main.c ============================================================================== --- head/bin/sh/main.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/main.c Mon Apr 1 17:18:22 2013 (r248980) @@ -80,7 +80,7 @@ struct jmploc main_handler; int localeisutf8, initial_localeisutf8; static void cmdloop(int); -static void read_profile(char *); +static void read_profile(const char *); static char *find_dot_file(char *); /* @@ -239,7 +239,7 @@ cmdloop(int top) */ static void -read_profile(char *name) +read_profile(const char *name) { int fd; const char *expandedname; Modified: head/bin/sh/memalloc.c ============================================================================== --- head/bin/sh/memalloc.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/memalloc.c Mon Apr 1 17:18:22 2013 (r248980) @@ -233,7 +233,8 @@ growstackblock(int min) if (min < stacknleft) min = stacknleft; - if (min >= INT_MAX / 2 - ALIGN(sizeof(struct stack_block))) + if ((unsigned int)min >= + INT_MAX / 2 - ALIGN(sizeof(struct stack_block))) error("Out of space"); min += stacknleft; min += ALIGN(sizeof(struct stack_block)); @@ -327,7 +328,7 @@ makestrspace(int min, char *p) char * -stputbin(const char *data, int len, char *p) +stputbin(const char *data, size_t len, char *p) { CHECKSTRSPACE(len, p); memcpy(p, data, len); Modified: head/bin/sh/memalloc.h ============================================================================== --- head/bin/sh/memalloc.h Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/memalloc.h Mon Apr 1 17:18:22 2013 (r248980) @@ -57,7 +57,7 @@ void setstackmark(struct stackmark *); void popstackmark(struct stackmark *); char *growstackstr(void); char *makestrspace(int, char *); -char *stputbin(const char *data, int len, char *p); +char *stputbin(const char *data, size_t len, char *p); char *stputs(const char *data, char *p); @@ -67,7 +67,7 @@ char *stputs(const char *data, char *p); #define grabstackblock(n) stalloc(n) #define STARTSTACKSTR(p) p = stackblock() #define STPUTC(c, p) do { if (p == sstrend) p = growstackstr(); *p++ = (c); } while(0) -#define CHECKSTRSPACE(n, p) { if (sstrend - p < n) p = makestrspace(n, p); } +#define CHECKSTRSPACE(n, p) { if ((size_t)(sstrend - p) < n) p = makestrspace(n, p); } #define USTPUTC(c, p) (*p++ = (c)) /* * STACKSTRNUL's use is where we want to be able to turn a stack Modified: head/bin/sh/parser.c ============================================================================== --- head/bin/sh/parser.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/parser.c Mon Apr 1 17:18:22 2013 (r248980) @@ -119,7 +119,7 @@ static void parseheredoc(void); static int peektoken(void); static int readtoken(void); static int xxreadtoken(void); -static int readtoken1(int, char const *, char *, int); +static int readtoken1(int, const char *, const char *, int); static int noexpand(char *); static void synexpect(int) __dead2; static void synerror(const char *) __dead2; @@ -983,7 +983,7 @@ parsebackq(char *out, struct nodelist ** char *volatile str; struct jmploc jmploc; struct jmploc *const savehandler = handler; - int savelen; + size_t savelen; int saveprompt; const int bq_startlinno = plinno; char *volatile ostr = NULL; @@ -1300,7 +1300,8 @@ readcstyleesc(char *out) #define PARSEARITH() {goto parsearith; parsearith_return:;} static int -readtoken1(int firstc, char const *initialsyntax, char *eofmark, int striptabs) +readtoken1(int firstc, char const *initialsyntax, const char *eofmark, + int striptabs) { int c = firstc; char *out; @@ -1521,7 +1522,7 @@ checkend: { } if (c == *eofmark) { if (pfgets(line, sizeof line) != NULL) { - char *p, *q; + const char *p, *q; p = line; for (q = eofmark + 1 ; *q && *p == *q ; p++, q++); @@ -2038,7 +2039,7 @@ getprompt(void *unused __unused) const char * -expandstr(char *ps) +expandstr(const char *ps) { union node n; struct jmploc jmploc; Modified: head/bin/sh/parser.h ============================================================================== --- head/bin/sh/parser.h Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/parser.h Mon Apr 1 17:18:22 2013 (r248980) @@ -82,4 +82,4 @@ void fixredir(union node *, const char * int goodname(const char *); int isassignment(const char *); char *getprompt(void *); -const char *expandstr(char *); +const char *expandstr(const char *); Modified: head/bin/sh/trap.c ============================================================================== --- head/bin/sh/trap.c Mon Apr 1 17:15:04 2013 (r248979) +++ head/bin/sh/trap.c Mon Apr 1 17:18:22 2013 (r248980) @@ -150,7 +150,7 @@ printsignals(void) * The trap builtin. */ int -trapcmd(int argc, char **argv) +trapcmd(int argc __unused, char **argv) { char *action; int signo; From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 18:04:58 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5A22B5F4; Mon, 1 Apr 2013 18:04:58 +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 1C383717; Mon, 1 Apr 2013 18:04:57 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::fc90:731c:6f4a:2cc8] (unknown [IPv6:2001:7b8:3a7:0:fc90:731c:6f4a:2cc8]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id E61835C44; Mon, 1 Apr 2013 20:04:48 +0200 (CEST) Content-Type: multipart/mixed; boundary="Apple-Mail=_A2CE05B9-CEAE-42DE-8F54-EF1E9DBC05C5" Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt From: Dimitry Andric In-Reply-To: <51592416.7090003@FreeBSD.org> Date: Mon, 1 Apr 2013 20:04:45 +0200 Message-Id: <784ED932-664A-4880-8BCA-A7872E947920@FreeBSD.org> References: <201303072243.r27Mhopv039449@svn.freebsd.org> <51592416.7090003@FreeBSD.org> To: Andriy Gapon X-Mailer: Apple Mail (2.1503) 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: Mon, 01 Apr 2013 18:04:58 -0000 --Apple-Mail=_A2CE05B9-CEAE-42DE-8F54-EF1E9DBC05C5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Apr 1, 2013, at 08:07, Andriy Gapon wrote: > on 08/03/2013 00:43 Dimitry Andric said the following: >> Author: dim >> Date: Thu Mar 7 22:43:50 2013 >> New Revision: 247962 >> URL: http://svnweb.freebsd.org/changeset/base/247962 >>=20 >> Log: >> Fix error in r247960: actually assign the basename to = match.iim_file. >=20 > I've got some bad news. >=20 > First of all, sorry for not being thorough enough when this change was > originally proposed. I rebuilt only ctfconvert with the patch, but = ctfmerge was > left alone. >=20 > It seems that r247960 + r247962 (this commit) broke ctfmerge in my = environment > (head + clang). While .o files have expected ctf information, = combined files > miss ctf data for functions. Do you have a good test case? I tried building a few kernel modules, but I do see ctf data for functions, at least in ctfdump output. Also, a simple test case with a pair of .o files, each containing a function, seems to work properly when processed with ctfmerge. > I haven't dug yet into this problem, but I suspect that there is some = mismatch > at another place (or even multiple places) where STT_FILE is used. The only other place is cddl/contrib/opensolaris/tools/ctf/cvt/input.c, so I more or less blindly made the attached diff, which might solve the problem. Can you please try it in your environment? --Apple-Mail=_A2CE05B9-CEAE-42DE-8F54-EF1E9DBC05C5 Content-Disposition: attachment; filename=ctf-input-stt_file-1.diff Content-Type: application/octet-stream; name="ctf-input-stt_file-1.diff" Content-Transfer-Encoding: 7bit Index: cddl/contrib/opensolaris/tools/ctf/cvt/input.c =================================================================== --- cddl/contrib/opensolaris/tools/ctf/cvt/input.c (revision 248699) +++ cddl/contrib/opensolaris/tools/ctf/cvt/input.c (working copy) @@ -387,6 +387,7 @@ GElf_Sym * symit_next(symit_data_t *si, int type) { GElf_Sym sym; + char *bname; int check_sym = (type == STT_OBJECT || type == STT_FUNC); for (; si->si_next < si->si_nument; si->si_next++) { @@ -394,8 +395,10 @@ symit_next(symit_data_t *si, int type) gelf_getsym(si->si_symd, si->si_next, &sym); si->si_curname = (caddr_t)si->si_strd->d_buf + sym.st_name; - if (GELF_ST_TYPE(sym.st_info) == STT_FILE) - si->si_curfile = si->si_curname; + if (GELF_ST_TYPE(sym.st_info) == STT_FILE) { + bname = strrchr(si->si_curname, '/'); + si->si_curfile = bname == NULL ? si->si_curname : bname + 1; + } if (GELF_ST_TYPE(sym.st_info) != type || sym.st_shndx == SHN_UNDEF) --Apple-Mail=_A2CE05B9-CEAE-42DE-8F54-EF1E9DBC05C5-- From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 19:01:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F3701D47; Mon, 1 Apr 2013 19:01:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id CD1F79C3; Mon, 1 Apr 2013 19:01:51 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 06E70B94C; Mon, 1 Apr 2013 15:01:51 -0400 (EDT) From: John Baldwin To: Ed Maste Subject: Re: svn commit: r248751 - head/share/mk Date: Mon, 1 Apr 2013 13:23:41 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303262011.r2QKBAjm094760@svn.freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201304011323.42111.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 01 Apr 2013 15:01:51 -0400 (EDT) Cc: Chris Rees , 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: Mon, 01 Apr 2013 19:01:52 -0000 On Monday, April 01, 2013 1:17:48 pm Ed Maste wrote: > On 1 April 2013 12:34, Chris Rees wrote: > > On 1 April 2013 17:17, John Baldwin wrote: > >> On Tuesday, March 26, 2013 4:11:10 pm Ed Maste wrote: > >>> Author: emaste > >>> Date: Tue Mar 26 20:11:09 2013 > >>> New Revision: 248751 > >>> URL: http://svnweb.freebsd.org/changeset/base/248751 > >>> > >>> Log: > >>> Unconditionally include ${SRCCONF} if overridden > >>> > >>> This avoids silently failing to include ${SRCCONF} specified by a make(1) > >>> invocation. > >>> > >>> Modified: > >>> head/share/mk/bsd.own.mk > >>> > >>> Modified: head/share/mk/bsd.own.mk > >>> > >> ============================================================================== > >>> --- head/share/mk/bsd.own.mk Tue Mar 26 20:04:45 2013 (r248750) > >>> +++ head/share/mk/bsd.own.mk Tue Mar 26 20:11:09 2013 (r248751) > >>> @@ -117,7 +117,7 @@ ____: > >>> > >>> .if !defined(_WITHOUT_SRCCONF) > >>> SRCCONF?= /etc/src.conf > >>> -.if exists(${SRCCONF}) > >>> +.if exists(${SRCCONF}) || ${SRCCONF} != "/etc/src.conf" > >>> .include "${SRCCONF}" > >>> .endif > >>> .endif > >> > >> Hmm, I'm confused why this matters? Was exists() failing for a file that did > >> exist? Can you give a more specific use case? > > > > I think it's useful that if you've set SRCCONF in make.conf, the build > > should complain about a lack of its existence. > > > > A single character spelling error in the name of SRCCONF will have the > > build silently failing to include it, thus resulting in enormous > > frustration when your settings aren't applied for some non-obvious > > reason... > > Exactly. In my case I had incorrectly specified the path to my > src.conf and it took longer than I'd like to admit to discover the > failure. Ahhh, ok. That makes sense then. I had parsed the log message differently somehow to mean that the file wasn't being included and that that was silent, not that there was a lack of an error for a non-existent file that was explicitly specified. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 19:13:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0EC747B4; Mon, 1 Apr 2013 19:13:48 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F2F5FA96; Mon, 1 Apr 2013 19:13:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31JDl89078771; Mon, 1 Apr 2013 19:13:47 GMT (envelope-from pfg@svn.freebsd.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31JDkU0078760; Mon, 1 Apr 2013 19:13:46 GMT (envelope-from pfg@svn.freebsd.org) Message-Id: <201304011913.r31JDkU0078760@svn.freebsd.org> From: "Pedro F. Giffuni" Date: Mon, 1 Apr 2013 19:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248983 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/... 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: Mon, 01 Apr 2013 19:13:48 -0000 Author: pfg Date: Mon Apr 1 19:13:46 2013 New Revision: 248983 URL: http://svnweb.freebsd.org/changeset/base/248983 Log: Dtrace: enablings on defunct providers prevent providers from unregistering Merge change from illumos: 1368 enablings on defunct providers prevent providers from unregistering We try to address some underlying differences between the Solaris and FreeBSD implementations: dtrace_attach() / dtrace_detach() are currently unimplemented in FreeBSD but the new code from illumos makes use of taskq so some adaptations were made to dtrace_open() and dtrace_close() to handle them appropriately. Illumos Revision: r13430:8e6add739e38 Reference: https://www.illumos.org/issues/1368 Reviewed by: gnn Tested by: Fabian Keil Obtained from: Illumos MFC after: 3 weeks Added: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh - copied unchanged from r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh - copied unchanged from r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh - copied unchanged from r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h head/sys/modules/dtrace/dtrace/Makefile Modified: head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst ============================================================================== --- head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst Mon Apr 1 19:11:43 2013 (r248982) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace/exception.lst Mon Apr 1 19:13:46 2013 (r248983) @@ -23,7 +23,6 @@ # Copyright 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # -# ident "%Z%%M% %I% %E% SMI" # Exception list: names tests that are bypassed when running in Java # mode (relative to /opt/SUNWdtrt/tst) @@ -52,14 +51,17 @@ common/usdt/tst.enabled.ksh common/usdt/tst.enabled2.ksh common/usdt/tst.entryreturn.ksh common/usdt/tst.fork.ksh -common/usdt/tst.header.ksh common/usdt/tst.guess32.ksh common/usdt/tst.guess64.ksh +common/usdt/tst.header.ksh common/usdt/tst.linkpriv.ksh common/usdt/tst.linkunpriv.ksh common/usdt/tst.multiple.ksh common/usdt/tst.nodtrace.ksh +common/usdt/tst.noreap.ksh +common/usdt/tst.noreapring.ksh common/usdt/tst.onlyenabled.ksh +common/usdt/tst.reap.ksh common/usdt/tst.reeval.ksh common/usdt/tst.static.ksh common/usdt/tst.static2.ksh Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh (from r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh Mon Apr 1 19:13:46 2013 (r248983, copy of r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreap.ksh) @@ -0,0 +1,128 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2011, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < +#include + +int +main(int argc, char **argv) +{ + DTRACE_PROBE(test_prov, probe1); +} +EOF + +cat > prov.d < 10/ + { + exit(0); + } +EOF +} + +script 2>&1 | tee test.out + +# +# It should be true that our probe was not reaped after the provider was made +# defunct: the speculative tracing action prevents reaping of any ECB in the +# enabling. +# +status=0 + +if grep D_PDESC_INVAL test.out 2> /dev/null 1>&2 ; then + status=1 +else + grep D_PROC_GRAB test.out 2> /dev/null 1>&2 + status=$? +fi + +cd / +/usr/bin/rm -rf $DIR + +exit $status Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh (from r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh Mon Apr 1 19:13:46 2013 (r248983, copy of r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.noreapring.ksh) @@ -0,0 +1,124 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2011, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < +#include + +int +main(int argc, char **argv) +{ + DTRACE_PROBE(test_prov, probe1); +} +EOF + +cat > prov.d < 10/ + { + exit(0); + } +EOF +} + +$dtrace -x bufpolicy=ring -ZwqP test_prov\* > /dev/null 2>&1 & +background=$! +echo launched ring buffered enabling as pid $background +script 2>&1 | tee test.out + +# +# It should be true that our probe was not reaped after the provider was made +# defunct: the active ring buffer in the earlier enabling prevents reaping of +# any of the earlier enabling's ECBs. +# +status=0 + +if grep D_PDESC_INVAL test.out 2> /dev/null 1>&2 ; then + status=1 +else + grep D_PROC_GRAB test.out 2> /dev/null 1>&2 + status=$? +fi + +kill $background +cd / +/usr/bin/rm -rf $DIR + +exit $status Copied: head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh (from r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh Mon Apr 1 19:13:46 2013 (r248983, copy of r248981, vendor/illumos/dist/cmd/dtrace/test/tst/common/usdt/tst.reap.ksh) @@ -0,0 +1,115 @@ +# +# CDDL HEADER START +# +# The contents of this file are subject to the terms of the +# Common Development and Distribution License (the "License"). +# You may not use this file except in compliance with the License. +# +# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE +# or http://www.opensolaris.org/os/licensing. +# See the License for the specific language governing permissions +# and limitations under the License. +# +# When distributing Covered Code, include this CDDL HEADER in each +# file and include the License file at usr/src/OPENSOLARIS.LICENSE. +# If applicable, add the following below this CDDL HEADER, with the +# fields enclosed by brackets "[]" replaced with your own identifying +# information: Portions Copyright [yyyy] [name of copyright owner] +# +# CDDL HEADER END +# + +# +# Copyright (c) 2011, Joyent, Inc. All rights reserved. +# + +if [ $# != 1 ]; then + echo expected one argument: '<'dtrace-path'>' + exit 2 +fi + +dtrace=$1 +DIR=/var/tmp/dtest.$$ + +mkdir $DIR +cd $DIR + +cat > test.c < +#include + +int +main(int argc, char **argv) +{ + DTRACE_PROBE(test_prov, probe1); +} +EOF + +cat > prov.d < 10/ + { + exit(0); + } +EOF +} + +script 2>&1 | tee test.out + +# +# It should be true that our probe was reaped over the course of the enabling, +# causing the embedded DTrace invocation to fail on an invalid probe (that is, +# D_PDESC_INVAL) instead of an inability to grab the underlying process +# (D_PROC_GRAB). +# +grep D_PDESC_INVAL test.out 2> /dev/null 1>&2 +status=$? + +cd / +/usr/bin/rm -rf $DIR + +exit $status Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Apr 1 19:11:43 2013 (r248982) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Mon Apr 1 19:13:46 2013 (r248983) @@ -182,6 +182,7 @@ int dtrace_err_verbose; hrtime_t dtrace_deadman_interval = NANOSEC; hrtime_t dtrace_deadman_timeout = (hrtime_t)10 * NANOSEC; hrtime_t dtrace_deadman_user = (hrtime_t)30 * NANOSEC; +hrtime_t dtrace_unregister_defunct_reap = (hrtime_t)60 * NANOSEC; /* * DTrace External Variables @@ -203,8 +204,8 @@ static dev_info_t *dtrace_devi; /* devi #if defined(sun) static vmem_t *dtrace_arena; /* probe ID arena */ static vmem_t *dtrace_minor; /* minor number arena */ -static taskq_t *dtrace_taskq; /* task queue */ #else +static taskq_t *dtrace_taskq; /* task queue */ static struct unrhdr *dtrace_arena; /* Probe ID number. */ #endif static dtrace_probe_t **dtrace_probes; /* array of all probes */ @@ -550,11 +551,13 @@ static dtrace_probe_t *dtrace_probe_look static void dtrace_enabling_provide(dtrace_provider_t *); static int dtrace_enabling_match(dtrace_enabling_t *, int *); static void dtrace_enabling_matchall(void); +static void dtrace_enabling_reap(void); static dtrace_state_t *dtrace_anon_grab(void); static uint64_t dtrace_helper(int, dtrace_mstate_t *, dtrace_state_t *, uint64_t, uint64_t); static dtrace_helpers_t *dtrace_helpers_create(proc_t *); static void dtrace_buffer_drop(dtrace_buffer_t *); +static int dtrace_buffer_consumed(dtrace_buffer_t *, hrtime_t when); static intptr_t dtrace_buffer_reserve(dtrace_buffer_t *, size_t, size_t, dtrace_state_t *, dtrace_mstate_t *); static int dtrace_state_option(dtrace_state_t *, dtrace_optid_t, @@ -7593,7 +7596,7 @@ dtrace_unregister(dtrace_provider_id_t i { dtrace_provider_t *old = (dtrace_provider_t *)id; dtrace_provider_t *prev = NULL; - int i, self = 0; + int i, self = 0, noreap = 0; dtrace_probe_t *probe, *first = NULL; if (old->dtpv_pops.dtps_enable == @@ -7652,14 +7655,31 @@ dtrace_unregister(dtrace_provider_id_t i continue; /* - * We have at least one ECB; we can't remove this provider. - */ + * If we are trying to unregister a defunct provider, and the + * provider was made defunct within the interval dictated by + * dtrace_unregister_defunct_reap, we'll (asynchronously) + * attempt to reap our enablings. To denote that the provider + * should reattempt to unregister itself at some point in the + * future, we will return a differentiable error code (EAGAIN + * instead of EBUSY) in this case. + */ + if (dtrace_gethrtime() - old->dtpv_defunct > + dtrace_unregister_defunct_reap) + noreap = 1; + if (!self) { mutex_exit(&dtrace_lock); mutex_exit(&mod_lock); mutex_exit(&dtrace_provider_lock); } - return (EBUSY); + + if (noreap) + return (EBUSY); + + (void) taskq_dispatch(dtrace_taskq, + (task_func_t *)dtrace_enabling_reap, NULL, TQ_SLEEP); + + return (EAGAIN); } /* @@ -7756,7 +7776,7 @@ dtrace_invalidate(dtrace_provider_id_t i mutex_enter(&dtrace_provider_lock); mutex_enter(&dtrace_lock); - pvp->dtpv_defunct = 1; + pvp->dtpv_defunct = dtrace_gethrtime(); mutex_exit(&dtrace_lock); mutex_exit(&dtrace_provider_lock); @@ -10719,6 +10739,7 @@ dtrace_buffer_switch(dtrace_buffer_t *bu caddr_t tomax = buf->dtb_tomax; caddr_t xamot = buf->dtb_xamot; dtrace_icookie_t cookie; + hrtime_t now = dtrace_gethrtime(); ASSERT(!(buf->dtb_flags & DTRACEBUF_NOSWITCH)); ASSERT(!(buf->dtb_flags & DTRACEBUF_RING)); @@ -10734,6 +10755,8 @@ dtrace_buffer_switch(dtrace_buffer_t *bu buf->dtb_drops = 0; buf->dtb_errors = 0; buf->dtb_flags &= ~(DTRACEBUF_ERROR | DTRACEBUF_DROPPED); + buf->dtb_interval = now - buf->dtb_switched; + buf->dtb_switched = now; dtrace_interrupt_enable(cookie); } @@ -11222,6 +11245,36 @@ dtrace_buffer_polish(dtrace_buffer_t *bu } } +/* + * This routine determines if data generated at the specified time has likely + * been entirely consumed at user-level. This routine is called to determine + * if an ECB on a defunct probe (but for an active enabling) can be safely + * disabled and destroyed. + */ +static int +dtrace_buffer_consumed(dtrace_buffer_t *bufs, hrtime_t when) +{ + int i; + + for (i = 0; i < NCPU; i++) { + dtrace_buffer_t *buf = &bufs[i]; + + if (buf->dtb_size == 0) + continue; + + if (buf->dtb_flags & DTRACEBUF_RING) + return (0); + + if (!buf->dtb_switched && buf->dtb_offset != 0) + return (0); + + if (buf->dtb_switched - buf->dtb_interval < when) + return (0); + } + + return (1); +} + static void dtrace_buffer_free(dtrace_buffer_t *bufs) { @@ -11693,6 +11746,85 @@ dtrace_enabling_provide(dtrace_provider_ } /* + * Called to reap ECBs that are attached to probes from defunct providers. + */ +static void +dtrace_enabling_reap(void) +{ + dtrace_provider_t *prov; + dtrace_probe_t *probe; + dtrace_ecb_t *ecb; + hrtime_t when; + int i; + + mutex_enter(&cpu_lock); + mutex_enter(&dtrace_lock); + + for (i = 0; i < dtrace_nprobes; i++) { + if ((probe = dtrace_probes[i]) == NULL) + continue; + + if (probe->dtpr_ecb == NULL) + continue; + + prov = probe->dtpr_provider; + + if ((when = prov->dtpv_defunct) == 0) + continue; + + /* + * We have ECBs on a defunct provider: we want to reap these + * ECBs to allow the provider to unregister. The destruction + * of these ECBs must be done carefully: if we destroy the ECB + * and the consumer later wishes to consume an EPID that + * corresponds to the destroyed ECB (and if the EPID metadata + * has not been previously consumed), the consumer will abort + * processing on the unknown EPID. To reduce (but not, sadly, + * eliminate) the possibility of this, we will only destroy an + * ECB for a defunct provider if, for the state that + * corresponds to the ECB: + * + * (a) There is no speculative tracing (which can effectively + * cache an EPID for an arbitrary amount of time). + * + * (b) The principal buffers have been switched twice since the + * provider became defunct. + * + * (c) The aggregation buffers are of zero size or have been + * switched twice since the provider became defunct. + * + * We use dts_speculates to determine (a) and call a function + * (dtrace_buffer_consumed()) to determine (b) and (c). Note + * that as soon as we've been unable to destroy one of the ECBs + * associated with the probe, we quit trying -- reaping is only + * fruitful in as much as we can destroy all ECBs associated + * with the defunct provider's probes. + */ + while ((ecb = probe->dtpr_ecb) != NULL) { + dtrace_state_t *state = ecb->dte_state; + dtrace_buffer_t *buf = state->dts_buffer; + dtrace_buffer_t *aggbuf = state->dts_aggbuffer; + + if (state->dts_speculates) + break; + + if (!dtrace_buffer_consumed(buf, when)) + break; + + if (!dtrace_buffer_consumed(aggbuf, when)) + break; + + dtrace_ecb_disable(ecb); + ASSERT(probe->dtpr_ecb != ecb); + dtrace_ecb_destroy(ecb); + } + } + + mutex_exit(&dtrace_lock); + mutex_exit(&cpu_lock); +} + +/* * DTrace DOF Functions */ /*ARGSUSED*/ @@ -15529,6 +15661,10 @@ dtrace_open(struct cdev *dev, int oflags #else devfs_set_cdevpriv(state, dtrace_dtr); #endif + /* This code actually belongs in dtrace_attach() */ + if (dtrace_opens == 1) + dtrace_taskq = taskq_create("dtrace_taskq", 1, maxclsyspri, + 1, INT_MAX, 0); #endif mutex_exit(&cpu_lock); @@ -15616,6 +15752,11 @@ dtrace_dtr(void *data) (void) kdi_dtrace_set(KDI_DTSET_DTRACE_DEACTIVATE); #else --dtrace_opens; + /* This code actually belongs in dtrace_detach() */ + if ((dtrace_opens == 0) && (dtrace_taskq != NULL)) { + taskq_destroy(dtrace_taskq); + dtrace_taskq = NULL; + } #endif mutex_exit(&dtrace_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Mon Apr 1 19:11:43 2013 (r248982) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Mon Apr 1 19:13:46 2013 (r248983) @@ -175,6 +175,9 @@ static volatile uint64_t fasttrap_mod_ge static uint32_t fasttrap_max; static uint32_t fasttrap_total; +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ #define FASTTRAP_TPOINTS_DEFAULT_SIZE 0x4000 #define FASTTRAP_PROVIDERS_DEFAULT_SIZE 0x100 @@ -317,7 +320,7 @@ fasttrap_pid_cleanup_cb(void *data) fasttrap_provider_t **fpp, *fp; fasttrap_bucket_t *bucket; dtrace_provider_id_t provid; - int i, later = 0; + int i, later = 0, rval; static volatile int in = 0; ASSERT(in == 0); @@ -378,9 +381,13 @@ fasttrap_pid_cleanup_cb(void *data) * clean out the unenabled probes. */ provid = fp->ftp_provid; - if (dtrace_unregister(provid) != 0) { + if ((rval = dtrace_unregister(provid)) != 0) { if (fasttrap_total > fasttrap_max / 2) (void) dtrace_condense(provid); + + if (rval == EAGAIN) + fp->ftp_marked = 1; + later += fp->ftp_marked; fpp = &fp->ftp_next; } else { @@ -408,12 +415,15 @@ fasttrap_pid_cleanup_cb(void *data) * get a chance to do that work if and when the timeout is reenabled * (if detach fails). */ - if (later > 0 && callout_active(&fasttrap_timeout)) - callout_reset(&fasttrap_timeout, hz, &fasttrap_pid_cleanup_cb, - NULL); + if (later > 0) { + if (callout_active(&fasttrap_timeout)) { + callout_reset(&fasttrap_timeout, hz, + &fasttrap_pid_cleanup_cb, NULL); + } + else if (later > 0) fasttrap_cleanup_work = 1; - else { + } else { #if !defined(sun) /* Nothing to be done for FreeBSD */ #endif Modified: head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Mon Apr 1 19:11:43 2013 (r248982) +++ head/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace_impl.h Mon Apr 1 19:13:46 2013 (r248983) @@ -26,11 +26,13 @@ * Use is subject to license terms. */ +/* + * Copyright (c) 2011, Joyent, Inc. All rights reserved. + */ + #ifndef _SYS_DTRACE_IMPL_H #define _SYS_DTRACE_IMPL_H -#pragma ident "%Z%%M% %I% %E% SMI" - #ifdef __cplusplus extern "C" { #endif @@ -429,8 +431,11 @@ typedef struct dtrace_buffer { uint32_t dtb_errors; /* number of errors */ uint32_t dtb_xamot_errors; /* errors in inactive buffer */ #ifndef _LP64 - uint64_t dtb_pad1; + uint64_t dtb_pad1; /* pad out to 64 bytes */ #endif + uint64_t dtb_switched; /* time of last switch */ + uint64_t dtb_interval; /* observed switch interval */ + uint64_t dtb_pad2[6]; /* pad to avoid false sharing */ } dtrace_buffer_t; /* @@ -1162,7 +1167,7 @@ struct dtrace_provider { dtrace_pops_t dtpv_pops; /* provider operations */ char *dtpv_name; /* provider name */ void *dtpv_arg; /* provider argument */ - uint_t dtpv_defunct; /* boolean: defunct provider */ + hrtime_t dtpv_defunct; /* when made defunct */ struct dtrace_provider *dtpv_next; /* next provider */ }; Modified: head/sys/modules/dtrace/dtrace/Makefile ============================================================================== --- head/sys/modules/dtrace/dtrace/Makefile Mon Apr 1 19:11:43 2013 (r248982) +++ head/sys/modules/dtrace/dtrace/Makefile Mon Apr 1 19:13:46 2013 (r248983) @@ -3,6 +3,7 @@ ARCHDIR= ${MACHINE_CPUARCH} .PATH: ${.CURDIR}/../../../cddl/contrib/opensolaris/uts/common/dtrace +.PATH: ${.CURDIR}/../../../cddl/compat/opensolaris/kern .PATH: ${.CURDIR}/../../../cddl/kern .PATH: ${.CURDIR}/../../../cddl/dev/dtrace .PATH: ${.CURDIR}/../../../cddl/dev/dtrace/${ARCHDIR} @@ -26,6 +27,9 @@ SRCS+= assym.s # These are needed for assym.s SRCS+= opt_compat.h opt_kstack_pages.h opt_nfs.h opt_hwpmc_hooks.h +#This is needed for dtrace.c +SRCS += opensolaris_taskq.c + .if ${MACHINE_CPUARCH} == "i386" SRCS+= opt_apic.h .endif From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:11:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 848B4D31; Mon, 1 Apr 2013 20:11:20 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 771D6DED; Mon, 1 Apr 2013 20:11:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31KBKJk095914; Mon, 1 Apr 2013 20:11:20 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31KBKxX095913; Mon, 1 Apr 2013 20:11:20 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304012011.r31KBKxX095913@svn.freebsd.org> From: Adrian Chadd Date: Mon, 1 Apr 2013 20:11:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248984 - 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: Mon, 01 Apr 2013 20:11:20 -0000 Author: adrian Date: Mon Apr 1 20:11:19 2013 New Revision: 248984 URL: http://svnweb.freebsd.org/changeset/base/248984 Log: Only unmap the RX mbuf DMA map if there's a buffer here. The normal RX path (ath_rx_pkt()) will sync and unmap the buffer before passing it up the stack. We only need to do this if we're flushing the FIFO during reset/shutdown. Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Mon Apr 1 19:13:46 2013 (r248983) +++ head/sys/dev/ath/if_ath_rx_edma.c Mon Apr 1 20:11:19 2013 (r248984) @@ -680,10 +680,12 @@ ath_edma_rxbuf_free(struct ath_softc *sc ATH_RX_LOCK_ASSERT(sc); - /* We're doing this multiple times? */ - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); - + /* + * Only unload the frame if we haven't consumed + * the mbuf via ath_rx_pkt(). + */ if (bf->bf_m) { + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); m_freem(bf->bf_m); bf->bf_m = NULL; } From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:12:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC4EBEB4; Mon, 1 Apr 2013 20:12:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A69DDE00; Mon, 1 Apr 2013 20:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31KCM6n096091; Mon, 1 Apr 2013 20:12:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31KCMn3096089; Mon, 1 Apr 2013 20:12:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304012012.r31KCMn3096089@svn.freebsd.org> From: Adrian Chadd Date: Mon, 1 Apr 2013 20:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248985 - 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: Mon, 01 Apr 2013 20:12:22 -0000 Author: adrian Date: Mon Apr 1 20:12:21 2013 New Revision: 248985 URL: http://svnweb.freebsd.org/changeset/base/248985 Log: Use ATH_MAX_SCATTER rather than ATH_TXDESC. ATH_MAX_SCATTER is used to size the ath_buf DMA segment array. We thus should use it when checking sizes of things. Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 1 20:11:19 2013 (r248984) +++ head/sys/dev/ath/if_ath.c Mon Apr 1 20:12:21 2013 (r248985) @@ -3276,7 +3276,7 @@ ath_desc_alloc(struct ath_softc *sc) int error; error = ath_descdma_setup(sc, &sc->sc_txdma, &sc->sc_txbuf, - "tx", sc->sc_tx_desclen, ath_txbuf, ATH_TXDESC); + "tx", sc->sc_tx_desclen, ath_txbuf, ATH_MAX_SCATTER); if (error != 0) { return error; } Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Mon Apr 1 20:11:19 2013 (r248984) +++ head/sys/dev/ath/if_ath_tx.c Mon Apr 1 20:12:21 2013 (r248985) @@ -312,7 +312,7 @@ ath_tx_dmasetup(struct ath_softc *sc, st BUS_DMA_NOWAIT); if (error == EFBIG) { /* XXX packet requires too many descriptors */ - bf->bf_nseg = ATH_TXDESC+1; + bf->bf_nseg = ATH_MAX_SCATTER + 1; } else if (error != 0) { sc->sc_stats.ast_tx_busdma++; ath_freetx(m0); @@ -323,9 +323,9 @@ ath_tx_dmasetup(struct ath_softc *sc, st * require too many TX descriptors. We try to convert * the latter to a cluster. */ - if (bf->bf_nseg > ATH_TXDESC) { /* too many desc's, linearize */ + if (bf->bf_nseg > ATH_MAX_SCATTER) { /* too many desc's, linearize */ sc->sc_stats.ast_tx_linear++; - m = m_collapse(m0, M_NOWAIT, ATH_TXDESC); + m = m_collapse(m0, M_NOWAIT, ATH_MAX_SCATTER); if (m == NULL) { ath_freetx(m0); sc->sc_stats.ast_tx_nombuf++; @@ -340,7 +340,7 @@ ath_tx_dmasetup(struct ath_softc *sc, st ath_freetx(m0); return error; } - KASSERT(bf->bf_nseg <= ATH_TXDESC, + KASSERT(bf->bf_nseg <= ATH_MAX_SCATTER, ("too many segments after defrag; nseg %u", bf->bf_nseg)); } else if (bf->bf_nseg == 0) { /* null packet, discard */ sc->sc_stats.ast_tx_nodata++; From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:34:12 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 43242A64; Mon, 1 Apr 2013 20:34:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id C8725F3B; Mon, 1 Apr 2013 20:34:10 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA28427; Mon, 01 Apr 2013 23:34:09 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1UMlQe-0006Tr-SJ; Mon, 01 Apr 2013 23:34:08 +0300 Message-ID: <5159EF3F.2010609@FreeBSD.org> Date: Mon, 01 Apr 2013 23:34:07 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130321 Thunderbird/17.0.4 MIME-Version: 1.0 To: "Pedro F. Giffuni" Subject: Re: svn commit: r248983 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/... References: <201304011913.r31JDkU0078760@svn.freebsd.org> In-Reply-To: <201304011913.r31JDkU0078760@svn.freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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: Mon, 01 Apr 2013 20:34:12 -0000 on 01/04/2013 22:13 Pedro F. Giffuni said the following: > Dtrace: enablings on defunct providers prevent providers from unregistering Unfortunately, we have some much larger problems in this area of the FreeBSD port. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:38:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A1EE5C0C; Mon, 1 Apr 2013 20:38:11 +0000 (UTC) (envelope-from jim.harris@gmail.com) Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by mx1.freebsd.org (Postfix) with ESMTP id 8A992F5C; Mon, 1 Apr 2013 20:38:09 +0000 (UTC) Received: by mail-ee0-f47.google.com with SMTP id t10so1182949eei.20 for ; Mon, 01 Apr 2013 13:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=i/SvZqxAa1XTojwO7lV3vurVuBIWm1t62O/tAK2vwvo=; b=Wgtx8m8yHECVcuJvGmm/rGewYJqvzWnylLCu5RinsjZvkzAqoFWbpvTAqB4KvDq4Y/ Q2TUaqkKXWdZLXK0tznGAABei1M3V/cfBtll/RrpyS2pDGm4/Au1WffoAkY0K5MMSO1t /yZ/cBzar4PagwdBX1z/52cSYwkPJygyEhd++XrVTUjnb1kFtnKCB90GV03DzQJRoHzO x41zCL2qE1qu/TdeNajgUmOQ60XHixk5DT9rC4NdSyHHCUkJW97AKaAN90bZ7ZFrshqg cYG0tN0cDSyMuwD1w8fKU/+AmTcREncbXPhxCdoVYoUCo19Q7jkPL/rwDwyy2WVNWY/O tjSA== MIME-Version: 1.0 X-Received: by 10.14.207.200 with SMTP id n48mr41741471eeo.4.1364848682822; Mon, 01 Apr 2013 13:38:02 -0700 (PDT) Received: by 10.14.96.129 with HTTP; Mon, 1 Apr 2013 13:38:02 -0700 (PDT) In-Reply-To: <784ED932-664A-4880-8BCA-A7872E947920@FreeBSD.org> References: <201303072243.r27Mhopv039449@svn.freebsd.org> <51592416.7090003@FreeBSD.org> <784ED932-664A-4880-8BCA-A7872E947920@FreeBSD.org> Date: Mon, 1 Apr 2013 13:38:02 -0700 Message-ID: Subject: Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt From: Jim Harris To: Dimitry Andric Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Andriy Gapon 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: Mon, 01 Apr 2013 20:38:11 -0000 On Mon, Apr 1, 2013 at 11:04 AM, Dimitry Andric wrote: > On Apr 1, 2013, at 08:07, Andriy Gapon wrote: > > on 08/03/2013 00:43 Dimitry Andric said the following: > >> Author: dim > >> Date: Thu Mar 7 22:43:50 2013 > >> New Revision: 247962 > >> URL: http://svnweb.freebsd.org/changeset/base/247962 > >> > >> Log: > >> Fix error in r247960: actually assign the basename to match.iim_file. > > > > I've got some bad news. > > > > First of all, sorry for not being thorough enough when this change was > > originally proposed. I rebuilt only ctfconvert with the patch, but > ctfmerge was > > left alone. > > > > It seems that r247960 + r247962 (this commit) broke ctfmerge in my > environment > > (head + clang). While .o files have expected ctf information, combined > files > > miss ctf data for functions. > Do you have a good test case? I tried building a few kernel modules, > but I do see ctf data for functions, at least in ctfdump output. > > Also, a simple test case with a pair of .o files, each containing a > function, seems to work properly when processed with ctfmerge. > > > I haven't dug yet into this problem, but I suspect that there is some > mismatch > > at another place (or even multiple places) where STT_FILE is used. > > The only other place is cddl/contrib/opensolaris/tools/ctf/cvt/input.c, > so I more or less blindly made the attached diff, which might solve the > problem. Can you please try it in your environment? > > I'm not sure if this is the same problem seen by avg@, but without your patch, I was getting lots of the following when doing "dtrace -lv": fbt_getargdesc(1309): Unknown function! Your patch fixes this issue for me. Thanks, -Jim From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:44:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AB3ECFDD; Mon, 1 Apr 2013 20:44:21 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9DE51FB8; Mon, 1 Apr 2013 20:44:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31KiLNN005262; Mon, 1 Apr 2013 20:44:21 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31KiLnZ005261; Mon, 1 Apr 2013 20:44:21 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304012044.r31KiLnZ005261@svn.freebsd.org> From: Adrian Chadd Date: Mon, 1 Apr 2013 20:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248986 - 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: Mon, 01 Apr 2013 20:44:21 -0000 Author: adrian Date: Mon Apr 1 20:44:21 2013 New Revision: 248986 URL: http://svnweb.freebsd.org/changeset/base/248986 Log: Remove an un-needed comment. Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 1 20:12:21 2013 (r248985) +++ head/sys/dev/ath/if_ath.c Mon Apr 1 20:44:21 2013 (r248986) @@ -2510,12 +2510,6 @@ _ath_getbuf_locked(struct ath_softc *sc, * so the link is correct. * * The caller must free the buffer using ath_freebuf(). - * - * XXX TODO: this call shouldn't fail as it'll cause packet loss - * XXX in the TX pathway when retries are needed. - * XXX Figure out how to keep some buffers free, or factor the - * XXX number of busy buffers into the xmit path (ath_start()) - * XXX so we don't over-commit. */ struct ath_buf * ath_buf_clone(struct ath_softc *sc, const struct ath_buf *bf) From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:45:16 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 91D2B1E3; Mon, 1 Apr 2013 20:45:16 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 1D87EFC2; Mon, 1 Apr 2013 20:45:14 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id XAA28617; Mon, 01 Apr 2013 23:45:13 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1UMlbM-0006Vp-RA; Mon, 01 Apr 2013 23:45:12 +0300 Message-ID: <5159F1D7.5080700@FreeBSD.org> Date: Mon, 01 Apr 2013 23:45:11 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130321 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jim Harris , Dimitry Andric Subject: Re: svn commit: r247962 - head/cddl/contrib/opensolaris/tools/ctf/cvt References: <201303072243.r27Mhopv039449@svn.freebsd.org> <51592416.7090003@FreeBSD.org> <784ED932-664A-4880-8BCA-A7872E947920@FreeBSD.org> In-Reply-To: X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Mon, 01 Apr 2013 20:45:16 -0000 on 01/04/2013 23:38 Jim Harris said the following: > > > > On Mon, Apr 1, 2013 at 11:04 AM, Dimitry Andric > wrote: > > On Apr 1, 2013, at 08:07, Andriy Gapon > wrote: > > on 08/03/2013 00:43 Dimitry Andric said the following: > >> Author: dim > >> Date: Thu Mar 7 22:43:50 2013 > >> New Revision: 247962 > >> URL: http://svnweb.freebsd.org/changeset/base/247962 > >> > >> Log: > >> Fix error in r247960: actually assign the basename to match.iim_file. > > > > I've got some bad news. > > > > First of all, sorry for not being thorough enough when this change was > > originally proposed. I rebuilt only ctfconvert with the patch, but > ctfmerge was > > left alone. > > > > It seems that r247960 + r247962 (this commit) broke ctfmerge in my environment > > (head + clang). While .o files have expected ctf information, combined files > > miss ctf data for functions. > Do you have a good test case? I tried building a few kernel modules, > but I do see ctf data for functions, at least in ctfdump output. > > Also, a simple test case with a pair of .o files, each containing a > function, seems to work properly when processed with ctfmerge. Were any of the functions that you looked at static? For me there were tons of the "test cases". To pick at random metaslab_activate was found in metaslab.o, but not in zfs.ko. > > I haven't dug yet into this problem, but I suspect that there is some mismatch > > at another place (or even multiple places) where STT_FILE is used. > > The only other place is cddl/contrib/opensolaris/tools/ctf/cvt/input.c, > so I more or less blindly made the attached diff, which might solve the > problem. Can you please try it in your environment? This patch does help. Thank you! > I'm not sure if this is the same problem seen by avg@, but without your patch, I > was getting lots of the following when doing "dtrace -lv": > > fbt_getargdesc(1309): Unknown function! This is a consequence of the ctfmerge problem. > Your patch fixes this issue for me. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:50:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1655A3B5; Mon, 1 Apr 2013 20:50:08 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E44E2FF9; Mon, 1 Apr 2013 20:50:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31Ko79x006083; Mon, 1 Apr 2013 20:50:07 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31Ko72j006079; Mon, 1 Apr 2013 20:50:07 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304012050.r31Ko72j006079@svn.freebsd.org> From: Jilles Tjoelker Date: Mon, 1 Apr 2013 20:50:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248987 - in head: lib/libc/gen tools/regression/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: Mon, 01 Apr 2013 20:50:08 -0000 Author: jilles Date: Mon Apr 1 20:50:07 2013 New Revision: 248987 URL: http://svnweb.freebsd.org/changeset/base/248987 Log: wordexp(): Remove wrong IFS usage. Words in shell script are separated by spaces or tabs independent of the value of IFS. The value of IFS is only relevant for the result of substitutions. Therefore, there should be a space between 'wordexp' and the words to be expanded, not an IFS character. Paranoia might dictate that the shell ignore IFS from the environment (even though our sh currently uses it), so do not depend on it in the new test case. Modified: head/lib/libc/gen/wordexp.c head/tools/regression/lib/libc/gen/test-wordexp.c Modified: head/lib/libc/gen/wordexp.c ============================================================================== --- head/lib/libc/gen/wordexp.c Mon Apr 1 20:44:21 2013 (r248986) +++ head/lib/libc/gen/wordexp.c Mon Apr 1 20:50:07 2013 (r248987) @@ -114,15 +114,12 @@ we_askshell(const char *words, wordexp_t int status; /* Child exit status */ int error; /* Our return value */ int serrno; /* errno to return */ - char *ifs; /* IFS env. var. */ char *np, *p; /* Handy pointers */ char *nstrings; /* Temporary for realloc() */ char **nwv; /* Temporary for realloc() */ sigset_t newsigblock, oldsigblock; serrno = errno; - if ((ifs = getenv("IFS")) == NULL) - ifs = " \t\n"; if (pipe(pdes) < 0) return (WRDE_NOSPACE); /* XXX */ @@ -150,7 +147,7 @@ we_askshell(const char *words, wordexp_t if (_dup2(pdes[1], STDOUT_FILENO) < 0) _exit(1); _close(pdes[1]); - if (asprintf(&cmd, "wordexp%c%s\n", *ifs, words) < 0) + if (asprintf(&cmd, "wordexp %s\n", words) < 0) _exit(1); if ((flags & WRDE_SHOWERR) == 0) { if ((devnull = _open(_PATH_DEVNULL, O_RDWR, 0666)) < 0) Modified: head/tools/regression/lib/libc/gen/test-wordexp.c ============================================================================== --- head/tools/regression/lib/libc/gen/test-wordexp.c Mon Apr 1 20:44:21 2013 (r248986) +++ head/tools/regression/lib/libc/gen/test-wordexp.c Mon Apr 1 20:50:07 2013 (r248987) @@ -208,6 +208,25 @@ main(int argc, char *argv[]) assert(strcmp(we.we_wordv[1], "world") == 0); assert(we.we_wordv[2] == NULL); wordfree(&we); + sa.sa_handler = SIG_DFL; + r = sigaction(SIGCHLD, &sa, NULL); + assert(r == 0); + + /* + * With IFS set to a non-default value (without depending on whether + * IFS is inherited or not). + */ + r = setenv("IFS", ":", 1); + assert(r == 0); + r = wordexp("hello world", &we, 0); + assert(r == 0); + assert(we.we_wordc == 2); + assert(strcmp(we.we_wordv[0], "hello") == 0); + assert(strcmp(we.we_wordv[1], "world") == 0); + assert(we.we_wordv[2] == NULL); + wordfree(&we); + r = unsetenv("IFS"); + assert(r == 0); printf("PASS wordexp()\n"); printf("PASS wordfree()\n"); From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 20:57:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 36811797; Mon, 1 Apr 2013 20:57:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A332C6; Mon, 1 Apr 2013 20:57:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31KvDf0008596; Mon, 1 Apr 2013 20:57:13 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31KvDbq008593; Mon, 1 Apr 2013 20:57:13 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304012057.r31KvDbq008593@svn.freebsd.org> From: Adrian Chadd Date: Mon, 1 Apr 2013 20:57:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248988 - 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: Mon, 01 Apr 2013 20:57:14 -0000 Author: adrian Date: Mon Apr 1 20:57:13 2013 New Revision: 248988 URL: http://svnweb.freebsd.org/changeset/base/248988 Log: Ensure that we only call the busdma unmap/flush routines once, when the buffer is being freed. * When buffers are cloned, the original mapping isn't copied but it wasn't freeing the mapping until later. To be safe, free the mapping when the buffer is cloned. * ath_freebuf() now no longer calls the busdma sync/unmap routines. * ath_tx_freebuf() now calls sync/unmap. * Call sync first, before calling unmap. Tested: * AR5416, STA mode Modified: head/sys/dev/ath/if_ath.c head/sys/dev/ath/if_ath_misc.h head/sys/dev/ath/if_ath_tx.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Mon Apr 1 20:50:07 2013 (r248987) +++ head/sys/dev/ath/if_ath.c Mon Apr 1 20:57:13 2013 (r248988) @@ -2512,7 +2512,7 @@ _ath_getbuf_locked(struct ath_softc *sc, * The caller must free the buffer using ath_freebuf(). */ struct ath_buf * -ath_buf_clone(struct ath_softc *sc, const struct ath_buf *bf) +ath_buf_clone(struct ath_softc *sc, struct ath_buf *bf) { struct ath_buf *tbf; @@ -2528,14 +2528,6 @@ ath_buf_clone(struct ath_softc *sc, cons tbf->bf_flags = bf->bf_flags & ATH_BUF_FLAGS_CLONE; tbf->bf_status = bf->bf_status; tbf->bf_m = bf->bf_m; - /* - * XXX Copy the node reference, the caller is responsible - * for deleting the node reference before it frees its - * buffer. - * - * XXX It's done like this so we don't call the net80211 - * code whilst having active TX queue locks held. - */ tbf->bf_node = bf->bf_node; /* will be setup by the chain/setup function */ tbf->bf_lastds = NULL; @@ -2547,6 +2539,23 @@ ath_buf_clone(struct ath_softc *sc, cons /* The caller has to re-init the descriptor + links */ + /* + * Free the DMA mapping here, before we NULL the mbuf. + * We must only call bus_dmamap_unload() once per mbuf chain + * or behaviour is undefined. + */ + if (bf->bf_m != NULL) { + /* + * XXX is this POSTWRITE call required? + */ + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); + } + + bf->bf_m = NULL; + bf->bf_node = NULL; + /* Copy state */ memcpy(&tbf->bf_state, &bf->bf_state, sizeof(bf->bf_state)); @@ -4220,9 +4229,6 @@ ath_txq_addholdingbuf(struct ath_softc * void ath_freebuf(struct ath_softc *sc, struct ath_buf *bf) { - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); - bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTWRITE); - KASSERT((bf->bf_node == NULL), ("%s: bf->bf_node != NULL\n", __func__)); KASSERT((bf->bf_m == NULL), ("%s: bf->bf_m != NULL\n", __func__)); @@ -4256,6 +4262,17 @@ ath_tx_freebuf(struct ath_softc *sc, str struct ieee80211_node *ni = bf->bf_node; struct mbuf *m0 = bf->bf_m; + /* + * Make sure that we only sync/unload if there's an mbuf. + * If not (eg we cloned a buffer), the unload will have already + * occured. + */ + if (bf->bf_m != NULL) { + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_POSTWRITE); + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); + } + bf->bf_node = NULL; bf->bf_m = NULL; @@ -4270,13 +4287,9 @@ ath_tx_freebuf(struct ath_softc *sc, str ieee80211_process_callback(ni, m0, status); ieee80211_free_node(ni); } - m_freem(m0); - /* - * XXX the buffer used to be freed -after-, but the DMA map was - * freed where ath_freebuf() now is. I've no idea what this - * will do. - */ + /* Finally, we don't need this mbuf any longer */ + m_freem(m0); } static struct ath_buf * Modified: head/sys/dev/ath/if_ath_misc.h ============================================================================== --- head/sys/dev/ath/if_ath_misc.h Mon Apr 1 20:50:07 2013 (r248987) +++ head/sys/dev/ath/if_ath_misc.h Mon Apr 1 20:57:13 2013 (r248988) @@ -59,7 +59,7 @@ extern struct ath_buf * ath_getbuf(struc extern struct ath_buf * _ath_getbuf_locked(struct ath_softc *sc, ath_buf_type_t btype); extern struct ath_buf * ath_buf_clone(struct ath_softc *sc, - const struct ath_buf *bf); + struct ath_buf *bf); /* XXX change this to NULL the buffer pointer? */ extern void ath_freebuf(struct ath_softc *sc, struct ath_buf *bf); extern void ath_returnbuf_head(struct ath_softc *sc, struct ath_buf *bf); Modified: head/sys/dev/ath/if_ath_tx.c ============================================================================== --- head/sys/dev/ath/if_ath_tx.c Mon Apr 1 20:50:07 2013 (r248987) +++ head/sys/dev/ath/if_ath_tx.c Mon Apr 1 20:57:13 2013 (r248988) @@ -3842,6 +3842,12 @@ ath_tx_retry_clone(struct ath_softc *sc, struct ath_buf *nbf; int error; + /* + * Clone the buffer. This will handle the dma unmap and + * copy the node reference to the new buffer. If this + * works out, 'bf' will have no DMA mapping, no mbuf + * pointer and no node reference. + */ nbf = ath_buf_clone(sc, bf); #if 0 @@ -3879,9 +3885,7 @@ ath_tx_retry_clone(struct ath_softc *sc, if (bf->bf_state.bfs_dobaw) ath_tx_switch_baw_buf(sc, an, tid, bf, nbf); - /* Free current buffer; return the older buffer */ - bf->bf_m = NULL; - bf->bf_node = NULL; + /* Free original buffer; return new buffer */ ath_freebuf(sc, bf); return nbf; From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 21:12:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7BE6CBDB; Mon, 1 Apr 2013 21:12:59 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5F8191; Mon, 1 Apr 2013 21:12:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31LCxqP013996; Mon, 1 Apr 2013 21:12:59 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31LCumA013970; Mon, 1 Apr 2013 21:12:56 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201304012112.r31LCumA013970@svn.freebsd.org> From: "Simon J. Gerraty" Date: Mon, 1 Apr 2013 21:12:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r248989 - in vendor/NetBSD/bmake/dist: . mk unit-tests 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: Mon, 01 Apr 2013 21:12:59 -0000 Author: sjg Date: Mon Apr 1 21:12:55 2013 New Revision: 248989 URL: http://svnweb.freebsd.org/changeset/base/248989 Log: Import bmake-20130330 Added: vendor/NetBSD/bmake/dist/unit-tests/export-env Modified: vendor/NetBSD/bmake/dist/ChangeLog vendor/NetBSD/bmake/dist/FILES vendor/NetBSD/bmake/dist/Makefile vendor/NetBSD/bmake/dist/bmake.1 vendor/NetBSD/bmake/dist/bmake.cat1 vendor/NetBSD/bmake/dist/boot-strap vendor/NetBSD/bmake/dist/configure vendor/NetBSD/bmake/dist/configure.in vendor/NetBSD/bmake/dist/dir.c vendor/NetBSD/bmake/dist/job.c vendor/NetBSD/bmake/dist/job.h vendor/NetBSD/bmake/dist/main.c vendor/NetBSD/bmake/dist/make.1 vendor/NetBSD/bmake/dist/make.h vendor/NetBSD/bmake/dist/meta.c vendor/NetBSD/bmake/dist/meta.h vendor/NetBSD/bmake/dist/mk/ChangeLog vendor/NetBSD/bmake/dist/mk/dirdeps.mk vendor/NetBSD/bmake/dist/mk/gendirdeps.mk vendor/NetBSD/bmake/dist/mk/install-mk vendor/NetBSD/bmake/dist/mk/meta.stage.mk vendor/NetBSD/bmake/dist/mk/meta2deps.py vendor/NetBSD/bmake/dist/mk/meta2deps.sh vendor/NetBSD/bmake/dist/mk/sys.dependfile.mk vendor/NetBSD/bmake/dist/parse.c vendor/NetBSD/bmake/dist/unit-tests/Makefile.in vendor/NetBSD/bmake/dist/unit-tests/test.exp vendor/NetBSD/bmake/dist/var.c Modified: vendor/NetBSD/bmake/dist/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/ChangeLog Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/ChangeLog Mon Apr 1 21:12:55 2013 (r248989) @@ -1,3 +1,47 @@ +2013-03-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130330 + Merge with NetBSD make, pick up + o meta.c: refine the handling of .OODATE in commands. + Rather than suppress command comparison for the entire script + as though .NOMETA_CMP had been used, only suppress it for the + one command line. + This allows something like ${.OODATE:M.NOMETA_CMP} to be used to + suppress comparison of a command without otherwise affecting it. + o make.1: document that + +2013-03-22 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130321 + yes, not quite right but its a cooler number. + Merge with NetBSD make, pick up + o parse.c: fix ParseGmakeExport to be portable + and add a unit-test. + * meta.c: call meta_init() before makefiles are read and if built + with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON + this let's makefiles test for support. + Call meta_mode_init() to process .MAKE.MODE. + +2013-03-13 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130305 + Merge with NetBSD make, pick up + o run .STALE: target when a dependency from .depend is missing. + o job.c: add Job_RunTarget() for the above and .BEGIN + +2013-03-03 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130303 + Merge with NetBSD make, pick up + o main.c: set .MAKE.OS to utsname.sysname + o job.c: more checks for read and poll errors + o var.c: lose VarChangeCase() saves 4% time + +2013-03-02 Simon J. Gerraty + + * boot-strap: remove MAKEOBJDIRPREFIX from environment since we + want to use MAKEOBJDIR + 2013-01-27 Simon J. Gerraty * Merge with NetBSD make, pick up Modified: vendor/NetBSD/bmake/dist/FILES ============================================================================== --- vendor/NetBSD/bmake/dist/FILES Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/FILES Mon Apr 1 21:12:55 2013 (r248989) @@ -102,6 +102,7 @@ unit-tests/dotwait unit-tests/error unit-tests/export unit-tests/export-all +unit-tests/export-env unit-tests/forloop unit-tests/forsubst unit-tests/hash Modified: vendor/NetBSD/bmake/dist/Makefile ============================================================================== --- vendor/NetBSD/bmake/dist/Makefile Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/Makefile Mon Apr 1 21:12:55 2013 (r248989) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.5 2013/01/28 19:31:58 sjg Exp $ +# $Id: Makefile,v 1.10 2013/03/31 05:57:19 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130123 +MAKE_VERSION= 20130330 PROG= bmake @@ -187,14 +187,14 @@ MANDIR= ${SHAREDIR}/man .if !exists(.depend) ${OBJS}: config.h .endif -.if ${MK_AUTOCONF_MK} == "yes" -.include -.endif # make sure that MAKE_VERSION gets updated. main.o: ${SRCS} ${MAKEFILE} # start-delete2 for bsd.after-import.mk +.if ${MK_AUTOCONF_MK} == "yes" +.include +.endif SHARE_MK?=${SHAREDIR}/mk MKSRC=${srcdir}/mk INSTALL?=${srcdir}/install-sh Modified: vendor/NetBSD/bmake/dist/bmake.1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.1 Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/bmake.1 Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.210 2013/01/27 18:52:01 sjg Exp $ +.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd January 23, 2013 +.Dd March 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -874,6 +874,13 @@ by appending their names to is re-exported whenever .Ql Va .MAKEOVERRIDES is modified. +.It Va .MAKE.PATH_FILEMON +If +.Nm +was built with +.Xr filemon 4 +support, this is set to the path of the device node. +This allows makefiles to test for this support. .It Va .MAKE.PID The process-id of .Nm . @@ -1757,6 +1764,20 @@ targets. Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the target will still be out of date. +The same effect applies to any command line that uses the variable +.Va .OODATE , +which can be used for that purpose even when not otherwise needed or desired: +.Bd -literal -offset indent + +skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + +.Ed +The +.Cm \&:M +pattern suppresses any expansion of the unwanted variable. .It Ic .NOPATH Do not search for the target in the directories specified by .Ic .PATH . @@ -2008,6 +2029,10 @@ If no sources are specified, the .Ic .SILENT attribute is applied to every command in the file. +.It Ic .STALE +This target gets run when a dependency file contains stale entries, having +.Va .ALLSRC +set to the name of that dependency file. .It Ic .SUFFIXES Each source specifies a suffix to .Nm . Modified: vendor/NetBSD/bmake/dist/bmake.cat1 ============================================================================== --- vendor/NetBSD/bmake/dist/bmake.cat1 Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/bmake.cat1 Mon Apr 1 21:12:55 2013 (r248989) @@ -565,6 +565,11 @@ VVAARRIIAABBLLEE AASSSSIIGG `MAKEFLAGS' is re-exported whenever `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is modified. + _._M_A_K_E_._P_A_T_H___F_I_L_E_M_O_N + If bbmmaakkee was built with filemon(4) support, this is set + to the path of the device node. This allows makefiles to + test for this support. + _._M_A_K_E_._P_I_D The process-id of bbmmaakkee. _._M_A_K_E_._P_P_I_D The parent process-id of bbmmaakkee. @@ -1106,7 +1111,19 @@ SSPPEECCIIAALL SSOOUURRCCEE Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the - target will still be out of date. + target will still be out of date. The same effect applies to + any command line that uses the variable _._O_O_D_A_T_E, which can be + used for that purpose even when not otherwise needed or + desired: + + + skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + + The ::MM pattern suppresses any expansion of the unwanted vari- + able. ..NNOOPPAATTHH Do not search for the target in the directories specified by ..PPAATTHH. @@ -1278,6 +1295,9 @@ SSPPEECCIIAALL TTAARRGGEETT sources are specified, the ..SSIILLEENNTT attribute is applied to every command in the file. + ..SSTTAALLEE This target gets run when a dependency file contains stale + entries, having _._A_L_L_S_R_C set to the name of that dependency file. + ..SSUUFFFFIIXXEESS Each source specifies a suffix to bbmmaakkee. If no sources are specified, any previously specified suffixes are deleted. It @@ -1340,4 +1360,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 January 23, 2013 NetBSD 5.1 +NetBSD 5.1 March 30, 2013 NetBSD 5.1 Modified: vendor/NetBSD/bmake/dist/boot-strap ============================================================================== --- vendor/NetBSD/bmake/dist/boot-strap Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/boot-strap Mon Apr 1 21:12:55 2013 (r248989) @@ -111,7 +111,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.42 2013/01/25 20:20:33 sjg Exp $ +# $Id: boot-strap,v 1.43 2013/03/02 18:55:23 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -159,6 +159,9 @@ source_rc() { cmd_args="$@" +# clear some things from the environment that we care about +unset MAKEOBJDIR MAKEOBJDIRPREFIX + # --install[-host-target] will set this INSTALL_PREFIX= # other things we pass to install step Modified: vendor/NetBSD/bmake/dist/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: vendor/NetBSD/bmake/dist/configure.in ============================================================================== --- vendor/NetBSD/bmake/dist/configure.in Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/configure.in Mon Apr 1 21:12:55 2013 (r248989) @@ -1,10 +1,10 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.46 2012/12/28 21:28:18 sjg Exp $ +dnl $Id: configure.in,v 1.48 2013/03/04 21:25:57 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20121212], [sjg@NetBSD.org]) +AC_INIT([bmake], [20130303], [sjg@NetBSD.org]) AC_CONFIG_HEADER(config.h) dnl make srcdir absolute Modified: vendor/NetBSD/bmake/dist/dir.c ============================================================================== --- vendor/NetBSD/bmake/dist/dir.c Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/dir.c Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"); #endif #endif /* not lint */ #endif @@ -145,6 +145,7 @@ __RCSID("$NetBSD: dir.c,v 1.65 2012/06/1 #include "make.h" #include "hash.h" #include "dir.h" +#include "job.h" /* * A search path consists of a Lst of Path structures. A Path structure @@ -1463,9 +1464,11 @@ Dir_MTime(GNode *gn, Boolean recheck) * so that we give that to the compiler. */ gn->path = bmake_strdup(fullName); - fprintf(stdout, - "%s: ignoring stale %s for %s, found %s\n", - progname, makeDependfile, gn->name, fullName); + if (!Job_RunTarget(".STALE", gn->fname)) + fprintf(stdout, + "%s: %s, %d: ignoring stale %s for %s, " + "found %s\n", progname, gn->fname, gn->lineno, + makeDependfile, gn->name, fullName); } } } Modified: vendor/NetBSD/bmake/dist/job.c ============================================================================== --- vendor/NetBSD/bmake/dist/job.c Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/job.c Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $ */ +/* $NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $"); +__RCSID("$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $"); #endif #endif /* not lint */ #endif @@ -142,6 +142,7 @@ __RCSID("$NetBSD: job.c,v 1.165 2013/01/ #include #include "wait.h" +#include #include #include #if !defined(USE_SELECT) && defined(HAVE_POLL_H) @@ -1245,8 +1246,10 @@ Job_CheckCommands(GNode *gn, void (*abor static const char msg[] = ": don't know how to make"; if (gn->flags & FROM_DEPEND) { - fprintf(stdout, "%s: ignoring stale %s for %s\n", - progname, makeDependfile, gn->name); + if (!Job_RunTarget(".STALE", gn->fname)) + fprintf(stdout, "%s: %s, %d: ignoring stale %s for %s\n", + progname, gn->fname, gn->lineno, makeDependfile, + gn->name); return TRUE; } @@ -2063,32 +2066,45 @@ Job_CatchOutput(void) (void)fflush(stdout); /* The first fd in the list is the job token pipe */ - nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); + do { + nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); + } while (nready < 0 && errno == EINTR); - if (nready < 0 || readyfd(&childExitJob)) { + if (nready < 0) + Punt("poll: %s", strerror(errno)); + + if (nready > 0 && readyfd(&childExitJob)) { char token = 0; - nready -= 1; - while (read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN) - continue; - if (token == DO_JOB_RESUME[0]) - /* Complete relay requested from our SIGCONT handler */ - JobRestartJobs(); - Job_CatchChildren(); + ssize_t count; + count = read(childExitJob.inPipe, &token, 1); + switch (count) { + case 0: + Punt("unexpected eof on token pipe"); + case -1: + Punt("token pipe read: %s", strerror(errno)); + case 1: + if (token == DO_JOB_RESUME[0]) + /* Complete relay requested from our SIGCONT handler */ + JobRestartJobs(); + break; + default: + abort(); + } + --nready; } - if (nready <= 0) - return; - - if (wantToken && readyfd(&tokenWaitJob)) - nready--; + Job_CatchChildren(); + if (nready == 0) + return; for (i = 2; i < nfds; i++) { if (!fds[i].revents) continue; job = jobfds[i]; - if (job->job_state != JOB_ST_RUNNING) - continue; - JobDoOutput(job, FALSE); + if (job->job_state == JOB_ST_RUNNING) + JobDoOutput(job, FALSE); + if (--nready == 0) + return; } } @@ -2179,8 +2195,6 @@ Job_SetPrefix(void) void Job_Init(void) { - GNode *begin; /* node for commands to do at the very start */ - /* Allocate space for all the job info */ job_table = bmake_malloc(maxJobs * sizeof *job_table); memset(job_table, 0, maxJobs * sizeof *job_table); @@ -2256,15 +2270,7 @@ Job_Init(void) ADDSIG(SIGCONT, JobContinueSig) #undef ADDSIG - begin = Targ_FindNode(".BEGIN", TARG_NOCREATE); - - if (begin != NULL) { - JobRun(begin); - if (begin->made == ERROR) { - PrintOnError(begin, "\n\nStop."); - exit(1); - } - } + (void)Job_RunTarget(".BEGIN", NULL); postCommands = Targ_FindNode(".END", TARG_CREATE); } @@ -2930,6 +2936,38 @@ Job_TokenWithdraw(void) return TRUE; } +/*- + *----------------------------------------------------------------------- + * Job_RunTarget -- + * Run the named target if found. If a filename is specified, then + * set that to the sources. + * + * Results: + * None + * + * Side Effects: + * exits if the target fails. + * + *----------------------------------------------------------------------- + */ +Boolean +Job_RunTarget(const char *target, const char *fname) { + GNode *gn = Targ_FindNode(target, TARG_NOCREATE); + + if (gn == NULL) + return FALSE; + + if (fname) + Var_Set(ALLSRC, fname, gn, 0); + + JobRun(gn); + if (gn->made == ERROR) { + PrintOnError(gn, "\n\nStop."); + exit(1); + } + return TRUE; +} + #ifdef USE_SELECT int emul_poll(struct pollfd *fd, int nfd, int timeout) Modified: vendor/NetBSD/bmake/dist/job.h ============================================================================== --- vendor/NetBSD/bmake/dist/job.h Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/job.h Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.40 2010/09/13 15:36:57 sjg Exp $ */ +/* $NetBSD: job.h,v 1.41 2013/03/05 22:01:44 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -268,5 +268,6 @@ void Job_TokenReturn(void); Boolean Job_TokenWithdraw(void); void Job_ServerStart(int, int, int); void Job_SetPrefix(void); +Boolean Job_RunTarget(const char *, const char *); #endif /* _JOB_H_ */ Modified: vendor/NetBSD/bmake/dist/main.c ============================================================================== --- vendor/NetBSD/bmake/dist/main.c Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/main.c Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $ */ +/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -119,9 +119,7 @@ __RCSID("$NetBSD: main.c,v 1.205 2013/01 #include #include #include -#ifdef MAKE_NATIVE #include -#endif #include "wait.h" #include @@ -768,7 +766,7 @@ MakeMode(const char *mode) } #if USE_META if (strstr(mode, "meta")) - meta_init(mode); + meta_mode_init(mode); #endif } if (mp) @@ -813,9 +811,7 @@ main(int argc, char **argv) static char defsyspath[] = _PATH_DEFSYSPATH; char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */ struct timeval rightnow; /* to initialize random seed */ -#ifdef MAKE_NATIVE struct utsname utsname; -#endif /* default to writing debug to stderr */ debug_file = stderr; @@ -834,7 +830,7 @@ main(int argc, char **argv) progname++; else progname = argv[0]; -#ifdef RLIMIT_NOFILE +#if defined(MAKE_NATIVE) || (defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)) /* * get rid of resource limit on file descriptors */ @@ -848,6 +844,12 @@ main(int argc, char **argv) } #endif + if (uname(&utsname) == -1) { + (void)fprintf(stderr, "%s: uname failed (%s).\n", progname, + strerror(errno)); + exit(2); + } + /* * Get the name of this type of MACHINE from utsname * so we can share an executable for similar machines. @@ -858,11 +860,6 @@ main(int argc, char **argv) */ if (!machine) { #ifdef MAKE_NATIVE - if (uname(&utsname) == -1) { - (void)fprintf(stderr, "%s: uname failed (%s).\n", progname, - strerror(errno)); - exit(2); - } machine = utsname.machine; #else #ifdef MAKE_MACHINE @@ -892,6 +889,7 @@ main(int argc, char **argv) */ Var_Init(); /* Initialize the lists of variables for * parsing arguments */ + Var_Set(".MAKE.OS", utsname.sysname, VAR_GLOBAL, 0); Var_Set("MACHINE", machine, VAR_GLOBAL, 0); Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL, 0); #ifdef MAKE_VERSION @@ -987,6 +985,9 @@ main(int argc, char **argv) } Job_SetPrefix(); +#ifdef USE_META + meta_init(); +#endif /* * First snag any flags out of the MAKE environment variable. * (Note this is *not* MAKEFLAGS since /bin/make uses that and it's @@ -1697,7 +1698,7 @@ Finish(int errors) } /* - * enunlink -- + * eunlink -- * Remove a file carefully, avoiding directories. */ int Modified: vendor/NetBSD/bmake/dist/make.1 ============================================================================== --- vendor/NetBSD/bmake/dist/make.1 Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/make.1 Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.210 2013/01/27 18:52:01 sjg Exp $ +.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd January 23, 2013 +.Dd March 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -874,6 +874,13 @@ by appending their names to is re-exported whenever .Ql Va .MAKEOVERRIDES is modified. +.It Va .MAKE.PATH_FILEMON +If +.Nm +was built with +.Xr filemon 4 +support, this is set to the path of the device node. +This allows makefiles to test for this support. .It Va .MAKE.PID The process-id of .Nm . @@ -1757,6 +1764,20 @@ targets. Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the target will still be out of date. +The same effect applies to any command line that uses the variable +.Va .OODATE , +which can be used for that purpose even when not otherwise needed or desired: +.Bd -literal -offset indent + +skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + +.Ed +The +.Cm \&:M +pattern suppresses any expansion of the unwanted variable. .It Ic .NOPATH Do not search for the target in the directories specified by .Ic .PATH . @@ -2008,6 +2029,10 @@ If no sources are specified, the .Ic .SILENT attribute is applied to every command in the file. +.It Ic .STALE +This target gets run when a dependency file contains stale entries, having +.Va .ALLSRC +set to the name of that dependency file. .It Ic .SUFFIXES Each source specifies a suffix to .Nm . Modified: vendor/NetBSD/bmake/dist/make.h ============================================================================== --- vendor/NetBSD/bmake/dist/make.h Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/make.h Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.89 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: make.h,v 1.90 2013/02/25 01:57:14 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -103,7 +103,7 @@ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ (__GNUC__ > (x))) #else /* defined(__GNUC__) */ -#define MAKE_GNUC_PREREQx, y) 0 +#define MAKE_GNUC_PREREQ(x, y) 0 #endif /* defined(__GNUC__) */ #if MAKE_GNUC_PREREQ(2, 7) Modified: vendor/NetBSD/bmake/dist/meta.c ============================================================================== --- vendor/NetBSD/bmake/dist/meta.c Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/meta.c Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.26 2013/01/19 04:23:37 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.29 2013/03/31 05:49:51 sjg Exp $ */ /* * Implement 'meta' mode. @@ -539,8 +539,24 @@ boolValue(char *s) return TRUE; } +/* + * Initialization we need before reading makefiles. + */ +void +meta_init() +{ +#ifdef USE_FILEMON + /* this allows makefiles to test if we have filemon support */ + Var_Set(".MAKE.PATH_FILEMON", _PATH_FILEMON, VAR_GLOBAL, 0); +#endif +} + + +/* + * Initialization we need after reading makefiles. + */ void -meta_init(const char *make_mode) +meta_mode_init(const char *make_mode) { static int once = 0; char *cp; @@ -1037,6 +1053,7 @@ meta_oodate(GNode *gn, Boolean oodate) char *tp = Lst_Datum(ln); Lst_Remove(missingFiles, ln); free(tp); + ln = NULL; /* we're done with it */ } } break; @@ -1196,17 +1213,19 @@ meta_oodate(GNode *gn, Boolean oodate) oodate = TRUE; } else { char *cmd = (char *)Lst_Datum(ln); + Boolean hasOODATE = FALSE; - if (!needOODATE) { - if (strstr(cmd, "$?")) - needOODATE = TRUE; - else if ((cp = strstr(cmd, ".OODATE"))) { - /* check for $[{(].OODATE[)}] */ - if (cp > cmd + 2 && cp[-2] == '$') - needOODATE = TRUE; - } - if (needOODATE && DEBUG(META)) - fprintf(debug_file, "%s: %d: cannot compare commands using .OODATE\n", fname, lineno); + if (strstr(cmd, "$?")) + hasOODATE = TRUE; + else if ((cp = strstr(cmd, ".OODATE"))) { + /* check for $[{(].OODATE[:)}] */ + if (cp > cmd + 2 && cp[-2] == '$') + hasOODATE = TRUE; + } + if (hasOODATE) { + needOODATE = TRUE; + if (DEBUG(META)) + fprintf(debug_file, "%s: %d: cannot compare command using .OODATE\n", fname, lineno); } cmd = Var_Subst(NULL, cmd, gn, TRUE); @@ -1235,7 +1254,7 @@ meta_oodate(GNode *gn, Boolean oodate) if (buf[x - 1] == '\n') buf[x - 1] = '\0'; } - if (!needOODATE && + if (!hasOODATE && !(gn->type & OP_NOMETA_CMP) && strcmp(p, cmd) != 0) { if (DEBUG(META)) Modified: vendor/NetBSD/bmake/dist/meta.h ============================================================================== --- vendor/NetBSD/bmake/dist/meta.h Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/meta.h Mon Apr 1 21:12:55 2013 (r248989) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.h,v 1.2 2011/03/30 22:03:49 sjg Exp $ */ +/* $NetBSD: meta.h,v 1.3 2013/03/23 05:31:29 sjg Exp $ */ /* * Things needed for 'meta' mode. @@ -41,7 +41,8 @@ typedef struct BuildMon { extern Boolean useMeta; struct Job; /* not defined yet */ -void meta_init(const char *); +void meta_init(void); +void meta_mode_init(const char *); void meta_job_start(struct Job *, GNode *); void meta_job_child(struct Job *); void meta_job_error(struct Job *, GNode *, int, int); Modified: vendor/NetBSD/bmake/dist/mk/ChangeLog ============================================================================== --- vendor/NetBSD/bmake/dist/mk/ChangeLog Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/mk/ChangeLog Mon Apr 1 21:12:55 2013 (r248989) @@ -1,3 +1,71 @@ +2013-03-30 Simon J. Gerraty + + * meta2deps.py (MetaFile.__init__): ensure self.cwd is initialized. + * install-mk (MK_VERSION): bump version + +2013-03-21 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * gendirdeps.mk: do not apply :tA to DPADD entries, since we lose + any trailing /., rather apply :tA only when needed. + * gendirdeps.mk: better mimic meta2deps handling of .dirdep files. + * meta.stage.mk (LN_CP_SCRIPT): Add LnCp to do the ln||cp dance + consistently. + * dirdeps.mk: better describe the dance in sys.mk for TARGET_SPEC. + +2013-03-18 Simon J. Gerraty + + * gendirdeps.mk: revert the dance around .MAKE.DEPENDFILE_DEFAULT + it is simpler to just not update when say building for "host" + (where we know we apply filters to DIRDEPS), and using a + non-machine qualified dependfile. + +2013-03-16 Simon J. Gerraty + + * dirdeps.mk: improve DIRDEPS filtering by allowing DEP_SKIP_DIR + and DEP_DIRDEPS_FILTER to vary by DEP_MACHINE and DEP_TARGET_SPEC + * gendirdeps.mk: ensure _objroot has trailing / if it needs it. + * meta2deps.py: if machine is "host", then also trim + self.host_target from any OBJROOTS. + + +2013-03-11 Simon J. Gerraty + + * gendirdeps.mk: if .MAKE.DEPENDFILE_DEFAULT is not machine + qualified but _DEPENDFILE is, and .MAKE.DEPENDFILE_DEFAULT exists + but _DEPENDFILE does not, compare the new _DEPENDFILE against + .MAKE.DEPENDFILE_DEFAULT and discard if the same. + +2013-03-08 Simon J. Gerraty + + * meta.stage.mk: use STAGE_TARGETS to control .ORDER + and hook to all: via staging: + +2013-03-07 Simon J. Gerraty + + * sys.dependfile.mk (.MAKE.DEPENDFILE_DEFAULT): + use a separate variable for the default .MAKE.DEPENDFILE value + so that it can be controlled independently of + .MAKE.DEPENDFILE_PREFERENCE + + * meta.stage.mk: throw error if cp fails etc. + Stage*() return early if passed no args. + .ORDER stage_* + +2013-03-03 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * gendirdeps.mk: handle multiple M2D_OBJROOTS better. + +2013-02-10 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version to 20130210 + * import latest dirdeps.mk, gendirdeps.mk and meta2deps.py + from Juniper. + o dirdeps.mk now fully supports TARGET_SPEC consisting of more + than just MACHINE. + o no longer use DEP_MACHINE from Makefile.depend* so remove it. + 2013-01-23 Simon J. Gerraty * install-mk (MK_VERSION): bump version to 20130123 Modified: vendor/NetBSD/bmake/dist/mk/dirdeps.mk ============================================================================== --- vendor/NetBSD/bmake/dist/mk/dirdeps.mk Mon Apr 1 20:57:13 2013 (r248988) +++ vendor/NetBSD/bmake/dist/mk/dirdeps.mk Mon Apr 1 21:12:55 2013 (r248989) @@ -1,6 +1,7 @@ -# $Id: dirdeps.mk,v 1.23 2012/11/06 05:44:03 sjg Exp $ +# $Id: dirdeps.mk,v 1.28 2013/03/25 21:11:43 sjg Exp $ -# Copyright (c) 2010-2012, Juniper Networks, Inc. +# Copyright (c) 2010-2013, Juniper Networks, Inc. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -33,21 +34,31 @@ # This is what we do with DIRDEPS # DIRDEPS: -# This is a list of directories - relative to SRCTOP, it is only -# of interest to .MAKE.LEVEL 0. +# This is a list of directories - relative to SRCTOP, it is +# normally only of interest to .MAKE.LEVEL 0. # In some cases the entry may be qualified with a . -# suffix, for example to force building something for the pseudo +# or . suffix (see TARGET_SPEC_VARS below), +# for example to force building something for the pseudo # machines "host" or "common" regardless of current ${MACHINE}. -# All unqualified entries end up being qualified with .${MACHINE} -# and _DIRDEPS_USE below, uses the suffix to set MACHINE +# +# All unqualified entries end up being qualified with .${TARGET_SPEC} +# and partially qualified (if TARGET_SPEC_VARS has multiple +# entries) are also expanded to a full .. +# The _DIRDEPS_USE target uses the suffix to set TARGET_SPEC # correctly when visiting each entry. # -# Each entry is also converted into a set of paths to look for -# Makefile.depend. to learn the dependencies of each. -# Each Makefile.depend. sets DEP_RELDIR to be the +# The fully qualified directory entries are used to construct a +# dependency graph that will drive the build later. +# +# Also, for each fully qualified directory target, we will search +# using ${.MAKE.DEPENDFILE_PREFERENCE} to find additional +# dependencies. We use Makefile.depend (default value for +# .MAKE.DEPENDFILE_PREFIX) to refer to these makefiles to +# distinguish them from others. +# +# Each Makefile.depend file sets DEP_RELDIR to be the # the RELDIR (path relative to SRCTOP) for its directory, and -# DEP_MACHINE to its suffix (), further since -# each Makefile.depend. includes dirdeps.mk, this +# since each Makefile.depend file includes dirdeps.mk, this # processing is recursive and results in .MAKE.LEVEL 0 learning the # dependencies of the tree wrt the initial directory (_DEP_RELDIR). # @@ -55,38 +66,49 @@ # Indicates whether .MAKE.LEVEL 0 builds anything: # if "no" sub-makes are used to build everything, # if "yes" sub-makes are only used to build for other machines. +# It is best to use "no", but this can require fixing some +# makefiles to not do anything at .MAKE.LEVEL 0. # # TARGET_SPEC_VARS -# All the description above (and below) assumes is the -# only data needed to control the build. -# This is not always the case. So in addition to setting -# MACHINE in the build environment we set TARGET_SPEC which is -# composed of the values of TARGET_SPEC_VARS separated by -# commas. The default is just MACHINE. +# The default value is just MACHINE, and for most environments +# this is sufficient. The _DIRDEPS_USE target actually sets +# both MACHINE and TARGET_SPEC to the suffix of the current +# target so that in the general case TARGET_SPEC can be ignored. # -# If more that MACHINE is needed then sys.mk needs to decompose +# If more than MACHINE is needed then sys.mk needs to decompose # TARGET_SPEC and set the relevant variables accordingly. -# It is important that MACHINE be included in TARGET_SPEC_VARS -# since if there is more the value passed as MACHINE will infact -# be the TARGET_SPEC. +# It is important that MACHINE be included in and actually be +# the first member of TARGET_SPEC_VARS. This allows other +# variables to be considered optional, and some of the treatment +# below relies on MACHINE being the first entry. # Note: TARGET_SPEC cannot contain any '.'s so the target -# tripple used by compiler folk won't work (directly anyway). +# triple used by compiler folk won't work (directly anyway). # # For example: # -# # variables other than MACHINE might be optional +# # Always list MACHINE first, +# # other variables might be optional. # TARGET_SPEC_VARS = MACHINE TARGET_OS # .if ${TARGET_SPEC:Uno:M*,*} != "" # _tspec := ${TARGET_SPEC:S/,/ /g} # MACHINE := ${_tspec:[1]} # TARGET_OS := ${_tspec:[2]} # # etc. +# # We need to stop that TARGET_SPEC affecting any submakes +# # and deal with MACHINE=${TARGET_SPEC} in the environment. +# TARGET_SPEC = +# # export but do not track +# .export-env TARGET_SPEC +# .export ${TARGET_SPEC_VARS} # .for v in ${TARGET_SPEC_VARS:O:u} # .if empty($v) # .undef $v # .endif # .endfor # .endif +# # make sure we know what TARGET_SPEC is +# # as we may need it to find Makefile.depend* +# TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} # .if ${.MAKE.LEVEL} == 0 @@ -100,14 +122,48 @@ # do some setup we only need once _CURDIR ?= ${.CURDIR} +# make sure these are empty to start with +_DEP_TARGET_SPEC = +_DIRDEP_CHECKED = + # If TARGET_SPEC_VARS is other than just MACHINE # it should be set by sys.mk or similar by now. # TARGET_SPEC must not contain any '.'s. TARGET_SPEC_VARS ?= MACHINE +# this is what we started with TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} +# this is what we mostly use below +DEP_TARGET_SPEC = ${TARGET_SPEC_VARS:S,^,DEP_,:@v@${$v:U}@:ts,} +# make sure we have defaults +.for v in ${TARGET_SPEC_VARS} +DEP_$v ?= ${$v} +.endfor + +.if ${TARGET_SPEC_VARS:[#]} > 1 +# Ok, this gets more complex (putting it mildly). +# In order to stay sane, we need to ensure that all the build_dirs +# we compute below are fully qualified wrt DEP_TARGET_SPEC. +# The makefiles may only partially specify (eg. MACHINE only), +# so we need to construct a set of modifiers to fill in the gaps. +# jot 10 should output 1 2 3 .. 10 +JOT ?= jot +_tspec_x := ${${JOT} ${TARGET_SPEC_VARS:[#]}:L:sh} +# this handles unqualified entries +M_dep_qual_fixes = C;(/[^/.,]+)$$;\1.${DEP_TARGET_SPEC}; +# there needs to be at least one item missing for these to make sense +.for i in ${_tspec_x:[2..-1]} +_tspec_m$i := ${TARGET_SPEC_VARS:[2..$i]:@w@[^,]+@:ts,} +_tspec_a$i := ,${TARGET_SPEC_VARS:[$i..-1]:@v@$${DEP_$v}@:ts,} +M_dep_qual_fixes += C;(\.${_tspec_m$i})$$;\1${_tspec_a$i}; +.endfor *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 21:13:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2E17ED3C; Mon, 1 Apr 2013 21:13:57 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 06DC819A; Mon, 1 Apr 2013 21:13:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31LDuCD014160; Mon, 1 Apr 2013 21:13:56 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31LDuSp014159; Mon, 1 Apr 2013 21:13:56 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201304012113.r31LDuSp014159@svn.freebsd.org> From: "Simon J. Gerraty" Date: Mon, 1 Apr 2013 21:13:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r248990 - vendor/NetBSD/bmake/20130330 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: Mon, 01 Apr 2013 21:13:57 -0000 Author: sjg Date: Mon Apr 1 21:13:56 2013 New Revision: 248990 URL: http://svnweb.freebsd.org/changeset/base/248990 Log: Tag bmake-20130330 Added: vendor/NetBSD/bmake/20130330/ - copied from r248989, vendor/NetBSD/bmake/dist/ From owner-svn-src-all@FreeBSD.ORG Mon Apr 1 21:16:33 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 27EC1F96; Mon, 1 Apr 2013 21:16:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 19C701BA; Mon, 1 Apr 2013 21:16:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r31LGWdf014567; Mon, 1 Apr 2013 21:16:32 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r31LGWUG014566; Mon, 1 Apr 2013 21:16:32 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304012116.r31LGWUG014566@svn.freebsd.org> From: Dimitry Andric Date: Mon, 1 Apr 2013 21:16:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248991 - head/cddl/contrib/opensolaris/tools/ctf/cvt 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: Mon, 01 Apr 2013 21:16:33 -0000 Author: dim Date: Mon Apr 1 21:16:32 2013 New Revision: 248991 URL: http://svnweb.freebsd.org/changeset/base/248991 Log: Follow up to r247960 and rr247960 by also amending ctfmerge. For the only other case where STT_FILE symbols are used, in symit_next() in cddl/contrib/opensolaris/tools/ctf/cvt/input.c, save the basename of the symbol, instead of the full pathname. Reported by: avg Tested by: avg, jimharris MFC after: 1 week Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Modified: head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c ============================================================================== --- head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Mon Apr 1 21:13:56 2013 (r248990) +++ head/cddl/contrib/opensolaris/tools/ctf/cvt/input.c Mon Apr 1 21:16:32 2013 (r248991) @@ -387,6 +387,7 @@ GElf_Sym * symit_next(symit_data_t *si, int type) { GElf_Sym sym; + char *bname; int check_sym = (type == STT_OBJECT || type == STT_FUNC); for (; si->si_next < si->si_nument; si->si_next++) { @@ -394,8 +395,10 @@ symit_next(symit_data_t *si, int type) gelf_getsym(si->si_symd, si->si_next, &sym); si->si_curname = (caddr_t)si->si_strd->d_buf + sym.st_name; - if (GELF_ST_TYPE(sym.st_info) == STT_FILE) - si->si_curfile = si->si_curname; + if (GELF_ST_TYPE(sym.st_info) == STT_FILE) { + bname = strrchr(si->si_curname, '/'); + si->si_curfile = bname == NULL ? si->si_curname : bname + 1; + } if (GELF_ST_TYPE(sym.st_info) != type || sym.st_shndx == SHN_UNDEF) From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 00:06:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6205093 for ; Tue, 2 Apr 2013 00:06:47 +0000 (UTC) (envelope-from giffunip@yahoo.com) Received: from nm12-vm0.bullet.mail.bf1.yahoo.com (nm12-vm0.bullet.mail.bf1.yahoo.com [98.139.213.140]) by mx1.freebsd.org (Postfix) with SMTP id 0532B90A for ; Tue, 2 Apr 2013 00:06:46 +0000 (UTC) Received: from [98.139.212.152] by nm12.bullet.mail.bf1.yahoo.com with NNFMP; 02 Apr 2013 00:06:40 -0000 Received: from [98.139.212.233] by tm9.bullet.mail.bf1.yahoo.com with NNFMP; 02 Apr 2013 00:06:40 -0000 Received: from [127.0.0.1] by omp1042.mail.bf1.yahoo.com with NNFMP; 02 Apr 2013 00:06:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 620371.66456.bm@omp1042.mail.bf1.yahoo.com Received: (qmail 40101 invoked by uid 60001); 2 Apr 2013 00:06:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1364861200; bh=fQgi4/5AJ7+zKT1I9BFNclMZyJg2x99r/J1UE61hi3o=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=PSwQybxqPiLPDTE0Ykqeecu6bdA53Y+btZbTPXkme8QmxxFoga5MYswOTADGrrFOfD4BA9ToqDgGWdRPlyOkPQtFoEP1vq5EcDtcYkrcU/ypFh9c6FjU/K4C/YHllV3HMXSadMxeoxhXn4kTiVxv0LEzLRcRNhyEuQY/d5ITQ1Q= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-RocketYMMF:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=pMPgclw1wflxOmGJz9YmaPRBQUV/Qj2AQgtXwgdcaNodnJ4/PDDHden0ZDPc+7FNDG7uTTIF33JEEN2Ka6p6lmXsp+XTpvAYaKMWtHgZsf8hbncez3s/UvR/GoE6QhXreCJnuDCrSzCMWLVWT0PNfNDuKMa2koutbBxEZBM7nME=; X-YMail-OSG: CeSTsaMVM1n33plGrU_xt4tWicHf3ufy9M1vNQTKMOjdsOH 5OFIXuJwTf1o4hJC94t0fqRJQ7AtQ5SJuZL0furXWCXNJXIwBKw23C0uz424 x2z4OYbfUWzlk8dYZAd.y0wfuyLTU.bfr1CYEd_0.iV_AAM4dvfqOryj94UW 1onVpBfMtKBbE6FbO9ESyYMdWfPOCak4jgXg00PYSojyfg2WwxDyYFbaKo96 t2K4lHXFT_CKkcHkSP2vUfU3f.d0xz6G.1cE4RzlxFTWvVrA8qjs2I5EBPrO lbTiTg3qyi3QpZFzXHwep9PMr5uc2ayTbd2ewhBPfhSDtG3IK66Z1oH8.V.o 32K8ogEi4i4Z_o61xVAUT3ZGM4E9hK_j819SDHNK9ewdIQ6Ub6dtg778AqbW pxku141akngjG59wEaRtUe9.4Xypa50FtVp3UolxXo.MCE5Kc0bi9icueHI5 rTfClQVJnsYr0UWCoEz34fSvTax2dEuVoQs3mzwwA1HEJQI_5zOGZUKHpy09 I6JUKgmZ08o3iTR5eD7QWOb5Qqq3WpfXnLA7q7_vIDJOsipNVQx5t27bWRdU neomeeLDEr5EAiBhR0Z9ECYYFguQ2jIGbcPlFkjosmzfxJ8s1jHOYFgw9IvH lKDGq6_.qhKo- Received: from [190.157.126.109] by web162102.mail.bf1.yahoo.com via HTTP; Mon, 01 Apr 2013 17:06:40 PDT X-Rocket-MIMEInfo: 002.001, Cj4gRGE6IEFuZHJpeSBHYXBvbgo.IAo.b24gMDEvMDQvMjAxMyAyMjoxMyBQZWRybyBGLiBHaWZmdW5pIHNhaWQgdGhlIGZvbGxvd2luZzoKPj4gRHRyYWNlOiBlbmFibGluZ3Mgb24gZGVmdW5jdCBwcm92aWRlcnMgcHJldmVudCBwcm92aWRlcnMgZnJvbSB1bnJlZ2lzdGVyaW5nCj4KPlVuZm9ydHVuYXRlbHksIHdlIGhhdmUgc29tZSBtdWNoIGxhcmdlciBwcm9ibGVtcyBpbiB0aGlzIGFyZWEgb2YgdGhlIEZyZWVCU0QgcG9ydC4KPgoKSXQgZG9lcyBoZWxwIHRvIGJlIGluIHN5bmMgd2l0aCBpbGx1bW9zIHQBMAEBAQE- X-RocketYMMF: giffunip X-Mailer: YahooMailWebService/0.8.140.532 References: <201304011913.r31JDkU0078760@svn.freebsd.org> <5159EF3F.2010609@FreeBSD.org> Message-ID: <1364861200.66265.YahooMailNeo@web162102.mail.bf1.yahoo.com> Date: Mon, 1 Apr 2013 17:06:40 -0700 (PDT) From: Pedro Giffuni Subject: Re: svn commit: r248983 - in head: cddl/contrib/opensolaris/cmd/dtrace/test/cmd/jdtrace cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/usdt sys/cddl/contrib/opensolaris/uts/common/dtrace sys/cddl/... To: Andriy Gapon In-Reply-To: <5159EF3F.2010609@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Cc: "svn-src-head@FreeBSD.org" , "svn-src-all@FreeBSD.org" , "src-committers@FreeBSD.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pedro Giffuni List-Id: "SVN commit messages 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, 02 Apr 2013 00:06:47 -0000 =0A> Da: Andriy Gapon=0A> =0A>on 01/04/2013 22:13 Pedro F. Giffuni said the= following:=0A>> Dtrace: enablings on defunct providers prevent providers f= rom unregistering=0A>=0A>Unfortunately, we have some much larger problems i= n this area of the FreeBSD port.=0A>=0A=0AIt does help to be in sync with i= llumos though.=0A=0AThe change seems to be required by this feature:=0A=0Ah= ttp://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/=0A=0A=0ARegar= ds,=0A=0APedro. From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 00:11:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7ED3626D; Tue, 2 Apr 2013 00:11:36 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 70A15940; Tue, 2 Apr 2013 00:11:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r320BZ5Z066773; Tue, 2 Apr 2013 00:11:35 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r320BZ1q066771; Tue, 2 Apr 2013 00:11:35 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201304020011.r320BZ1q066771@svn.freebsd.org> From: Steven Hartland Date: Tue, 2 Apr 2013 00:11:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248992 - 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: Tue, 02 Apr 2013 00:11:36 -0000 Author: smh Date: Tue Apr 2 00:11:35 2013 New Revision: 248992 URL: http://svnweb.freebsd.org/changeset/base/248992 Log: Added ATA Pass-Through support to CAM sys/cam/scsi/scsi_all.c: - Added scsi_ata_pass_16 method Which use ATA Pass-Through to send commands to the attached disk. sys/cam/scsi/scsi_all.h: - Added defines for all missing ATA Pass-Through commands values. - Added scsi_ata_pass_16 method. - Fixed a comment typo while I'm here Reviewed by: mav Approved by: pjd (mentor) MFC after: 2 weeks Modified: head/sys/cam/scsi/scsi_all.c head/sys/cam/scsi/scsi_all.h Modified: head/sys/cam/scsi/scsi_all.c ============================================================================== --- head/sys/cam/scsi/scsi_all.c Mon Apr 1 21:16:32 2013 (r248991) +++ head/sys/cam/scsi/scsi_all.c Tue Apr 2 00:11:35 2013 (r248992) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifndef _KERNEL #include @@ -5855,6 +5856,50 @@ scsi_write_same(struct ccb_scsiio *csio, } void +scsi_ata_pass_16(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int32_t flags, u_int8_t tag_action, + u_int8_t protocol, u_int8_t ata_flags, u_int16_t features, + u_int16_t sector_count, uint64_t lba, u_int8_t command, + u_int8_t control, u_int8_t *data_ptr, u_int16_t dxfer_len, + u_int8_t sense_len, u_int32_t timeout) +{ + struct ata_pass_16 *ata_cmd; + + ata_cmd = (struct ata_pass_16 *)&csio->cdb_io.cdb_bytes; + ata_cmd->opcode = ATA_PASS_16; + ata_cmd->protocol = protocol; + ata_cmd->flags = ata_flags; + ata_cmd->features_ext = features >> 8; + ata_cmd->features = features; + ata_cmd->sector_count_ext = sector_count >> 8; + ata_cmd->sector_count = sector_count; + ata_cmd->lba_low = lba; + ata_cmd->lba_mid = lba >> 8; + ata_cmd->lba_high = lba >> 16; + ata_cmd->device = ATA_DEV_LBA; + if (protocol & AP_EXTEND) { + ata_cmd->lba_low_ext = lba >> 24; + ata_cmd->lba_mid_ext = lba >> 32; + ata_cmd->lba_high_ext = lba >> 40; + } else + ata_cmd->device |= (lba >> 24) & 0x0f; + ata_cmd->command = command; + ata_cmd->control = control; + + cam_fill_csio(csio, + retries, + cbfcnp, + flags, + tag_action, + data_ptr, + dxfer_len, + sense_len, + sizeof(*ata_cmd), + timeout); +} + +void scsi_unmap(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t byte2, Modified: head/sys/cam/scsi/scsi_all.h ============================================================================== --- head/sys/cam/scsi/scsi_all.h Mon Apr 1 21:16:32 2013 (r248991) +++ head/sys/cam/scsi/scsi_all.h Tue Apr 2 00:11:35 2013 (r248992) @@ -908,6 +908,19 @@ struct scsi_start_stop_unit struct ata_pass_12 { u_int8_t opcode; u_int8_t protocol; +#define AP_PROTO_HARD_RESET (0x00 << 1) +#define AP_PROTO_SRST (0x01 << 1) +#define AP_PROTO_NON_DATA (0x03 << 1) +#define AP_PROTO_PIO_IN (0x04 << 1) +#define AP_PROTO_PIO_OUT (0x05 << 1) +#define AP_PROTO_DMA (0x06 << 1) +#define AP_PROTO_DMA_QUEUED (0x07 << 1) +#define AP_PROTO_DEVICE_DIAG (0x08 << 1) +#define AP_PROTO_DEVICE_RESET (0x09 << 1) +#define AP_PROTO_UDMA_IN (0x10 << 1) +#define AP_PROTO_UDMA_OUT (0x11 << 1) +#define AP_PROTO_FPDMA (0x12 << 1) +#define AP_PROTO_RESP_INFO (0x15 << 1) #define AP_MULTI 0xe0 u_int8_t flags; #define AP_T_LEN 0x03 @@ -943,6 +956,15 @@ struct ata_pass_16 { u_int8_t protocol; #define AP_EXTEND 0x01 u_int8_t flags; +#define AP_FLAG_TLEN_NO_DATA (0 << 0) +#define AP_FLAG_TLEN_FEAT (1 << 0) +#define AP_FLAG_TLEN_SECT_CNT (2 << 0) +#define AP_FLAG_TLEN_STPSIU (3 << 0) +#define AP_FLAG_BYT_BLOK_BYTES (0 << 2) +#define AP_FLAG_BYT_BLOK_BLOCKS (1 << 2) +#define AP_FLAG_TDIR_TO_DEV (0 << 3) +#define AP_FLAG_TDIR_FROM_DEV (1 << 3) +#define AP_FLAG_CHK_COND (1 << 5) u_int8_t features_ext; u_int8_t features; u_int8_t sector_count_ext; @@ -1064,7 +1086,7 @@ struct ata_pass_16 { /* * This length is the initial inquiry length used by the probe code, as - * well as the legnth necessary for scsi_print_inquiry() to function + * well as the length necessary for scsi_print_inquiry() to function * correctly. If either use requires a different length in the future, * the two values should be de-coupled. */ @@ -2374,6 +2396,14 @@ void scsi_write_same(struct ccb_scsiio * u_int32_t dxfer_len, u_int8_t sense_len, u_int32_t timeout); +void scsi_ata_pass_16(struct ccb_scsiio *csio, u_int32_t retries, + void (*cbfcnp)(struct cam_periph *, union ccb *), + u_int32_t flags, u_int8_t tag_action, + u_int8_t protocol, u_int8_t ata_flags, u_int16_t features, + u_int16_t sector_count, uint64_t lba, u_int8_t command, + u_int8_t control, u_int8_t *data_ptr, u_int16_t dxfer_len, + u_int8_t sense_len, u_int32_t timeout); + void scsi_unmap(struct ccb_scsiio *csio, u_int32_t retries, void (*cbfcnp)(struct cam_periph *, union ccb *), u_int8_t tag_action, u_int8_t byte2, From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 00:57:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 78FF4A21; Tue, 2 Apr 2013 00:57:55 +0000 (UTC) (envelope-from yongari@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6BAC1A7D; Tue, 2 Apr 2013 00:57:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r320vt0X079194; Tue, 2 Apr 2013 00:57:55 GMT (envelope-from yongari@svn.freebsd.org) Received: (from yongari@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r320vtwj079193; Tue, 2 Apr 2013 00:57:55 GMT (envelope-from yongari@svn.freebsd.org) Message-Id: <201304020057.r320vtwj079193@svn.freebsd.org> From: Pyun YongHyeon Date: Tue, 2 Apr 2013 00:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248993 - 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: Tue, 02 Apr 2013 00:57:55 -0000 Author: yongari Date: Tue Apr 2 00:57:54 2013 New Revision: 248993 URL: http://svnweb.freebsd.org/changeset/base/248993 Log: Fix a typo. Reported by: David Imhoff via brad@OpenBSD Tested by: hrs Reviewed by: davidch Modified: head/sys/dev/bge/if_bge.c Modified: head/sys/dev/bge/if_bge.c ============================================================================== --- head/sys/dev/bge/if_bge.c Tue Apr 2 00:11:35 2013 (r248992) +++ head/sys/dev/bge/if_bge.c Tue Apr 2 00:57:54 2013 (r248993) @@ -680,7 +680,7 @@ bge_ape_lock_init(struct bge_softc *sc) bit = BGE_APE_LOCK_GRANT_DRIVER0; break; default: - if (sc->bge_func_addr != 0) + if (sc->bge_func_addr == 0) bit = BGE_APE_LOCK_GRANT_DRIVER0; else bit = (1 << sc->bge_func_addr); From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 05:30:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C03B7817; Tue, 2 Apr 2013 05:30:43 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B062B8FF; Tue, 2 Apr 2013 05:30:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r325UhbI060403; Tue, 2 Apr 2013 05:30:43 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r325UggX060396; Tue, 2 Apr 2013 05:30:42 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201304020530.r325UggX060396@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 2 Apr 2013 05:30:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248995 - in head: contrib/libarchive/libarchive contrib/libarchive/libarchive/test lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys usr.sbin/extattr 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, 02 Apr 2013 05:30:43 -0000 Author: mdf Date: Tue Apr 2 05:30:41 2013 New Revision: 248995 URL: http://svnweb.freebsd.org/changeset/base/248995 Log: Fix return type of extattr_set_* and fix rmextattr(8) utility. extattr_set_{fd,file,link} is logically a write(2)-like operation and should return ssize_t, just like extattr_get_*. Also, the user-space utility was using an int for the return value of extattr_get_* and extattr_list_*, both of which return an ssize_t. MFC after: 1 week Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c head/lib/libc/sys/extattr_get_file.2 head/sys/compat/freebsd32/syscalls.master head/sys/kern/syscalls.master head/sys/sys/extattr.h head/usr.sbin/extattr/rmextattr.c Modified: head/contrib/libarchive/libarchive/archive_write_disk_posix.c ============================================================================== --- head/contrib/libarchive/libarchive/archive_write_disk_posix.c Tue Apr 2 04:12:17 2013 (r248994) +++ head/contrib/libarchive/libarchive/archive_write_disk_posix.c Tue Apr 2 05:30:41 2013 (r248995) @@ -3707,7 +3707,7 @@ set_xattrs(struct archive_write_disk *a) size_t size; archive_entry_xattr_next(entry, &name, &value, &size); if (name != NULL) { - int e; + ssize_t e; int namespace; if (strncmp(name, "user.", 5) == 0) { @@ -3734,7 +3734,7 @@ set_xattrs(struct archive_write_disk *a) e = extattr_set_file(archive_entry_pathname(entry), namespace, name, value, size); } - if (e != (int)size) { + if (e != (ssize_t)size) { if (errno == ENOTSUP || errno == ENOSYS) { if (!warning_done) { warning_done = 1; Modified: head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c ============================================================================== --- head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c Tue Apr 2 04:12:17 2013 (r248994) +++ head/contrib/libarchive/libarchive/test/test_extattr_freebsd.c Tue Apr 2 05:30:41 2013 (r248995) @@ -47,7 +47,8 @@ DEFINE_TEST(test_extattr_freebsd) struct stat st; struct archive *a; struct archive_entry *ae; - int n, fd; + ssize_t n; + int fd; int extattr_privilege_bug = 0; /* Modified: head/lib/libc/sys/extattr_get_file.2 ============================================================================== --- head/lib/libc/sys/extattr_get_file.2 Tue Apr 2 04:12:17 2013 (r248994) +++ head/lib/libc/sys/extattr_get_file.2 Tue Apr 2 05:30:41 2013 (r248995) @@ -50,7 +50,7 @@ .In sys/extattr.h .Ft ssize_t .Fn extattr_get_fd "int fd" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" -.Ft int +.Ft ssize_t .Fn extattr_set_fd "int fd" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft int .Fn extattr_delete_fd "int fd" "int attrnamespace" "const char *attrname" @@ -58,7 +58,7 @@ .Fn extattr_list_fd "int fd" "int attrnamespace" "void *data" "size_t nbytes" .Ft ssize_t .Fn extattr_get_file "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" -.Ft int +.Ft ssize_t .Fn extattr_set_file "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft int .Fn extattr_delete_file "const char *path" "int attrnamespace" "const char *attrname" @@ -66,7 +66,7 @@ .Fn extattr_list_file "const char *path" "int attrnamespace" "void *data" "size_t nbytes" .Ft ssize_t .Fn extattr_get_link "const char *path" "int attrnamespace" "const char *attrname" "void *data" "size_t nbytes" -.Ft int +.Ft ssize_t .Fn extattr_set_link "const char *path" "int attrnamespace" "const char *attrname" "const void *data" "size_t nbytes" .Ft int .Fn extattr_delete_link "const char *path" "int attrnamespace" "const char *attrname" Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Tue Apr 2 04:12:17 2013 (r248994) +++ head/sys/compat/freebsd32/syscalls.master Tue Apr 2 05:30:41 2013 (r248995) @@ -634,7 +634,7 @@ 355 AUE_EXTATTRCTL NOPROTO { int extattrctl(const char *path, int cmd, \ const char *filename, int attrnamespace, \ const char *attrname); } -356 AUE_EXTATTR_SET_FILE NOPROTO { int extattr_set_file( \ +356 AUE_EXTATTR_SET_FILE NOPROTO { ssize_t extattr_set_file( \ const char *path, int attrnamespace, \ const char *attrname, void *data, \ size_t nbytes); } @@ -665,7 +665,7 @@ 368 AUE_NULL UNIMPL __cap_set_fd 369 AUE_NULL UNIMPL __cap_set_file 370 AUE_NULL UNIMPL nosys -371 AUE_EXTATTR_SET_FD NOPROTO { int extattr_set_fd(int fd, \ +371 AUE_EXTATTR_SET_FD NOPROTO { ssize_t extattr_set_fd(int fd, \ int attrnamespace, const char *attrname, \ void *data, size_t nbytes); } 372 AUE_EXTATTR_GET_FD NOPROTO { ssize_t extattr_get_fd(int fd, \ @@ -726,7 +726,7 @@ 409 AUE_NULL UNIMPL __mac_get_pid 410 AUE_NULL UNIMPL __mac_get_link 411 AUE_NULL UNIMPL __mac_set_link -412 AUE_EXTATTR_SET_LINK NOPROTO { int extattr_set_link( \ +412 AUE_EXTATTR_SET_LINK NOPROTO { ssize_t extattr_set_link( \ const char *path, int attrnamespace, \ const char *attrname, void *data, \ size_t nbytes); } Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Tue Apr 2 04:12:17 2013 (r248994) +++ head/sys/kern/syscalls.master Tue Apr 2 05:30:41 2013 (r248995) @@ -632,7 +632,7 @@ 355 AUE_EXTATTRCTL STD { int extattrctl(const char *path, int cmd, \ const char *filename, int attrnamespace, \ const char *attrname); } -356 AUE_EXTATTR_SET_FILE STD { int extattr_set_file( \ +356 AUE_EXTATTR_SET_FILE STD { ssize_t extattr_set_file( \ const char *path, int attrnamespace, \ const char *attrname, void *data, \ size_t nbytes); } @@ -662,7 +662,7 @@ 368 AUE_NULL UNIMPL __cap_set_fd 369 AUE_NULL UNIMPL __cap_set_file 370 AUE_NULL UNIMPL nosys -371 AUE_EXTATTR_SET_FD STD { int extattr_set_fd(int fd, \ +371 AUE_EXTATTR_SET_FD STD { ssize_t extattr_set_fd(int fd, \ int attrnamespace, const char *attrname, \ void *data, size_t nbytes); } 372 AUE_EXTATTR_GET_FD STD { ssize_t extattr_get_fd(int fd, \ @@ -731,7 +731,7 @@ struct mac *mac_p); } 411 AUE_NULL STD { int __mac_set_link(const char *path_p, \ struct mac *mac_p); } -412 AUE_EXTATTR_SET_LINK STD { int extattr_set_link( \ +412 AUE_EXTATTR_SET_LINK STD { ssize_t extattr_set_link( \ const char *path, int attrnamespace, \ const char *attrname, void *data, \ size_t nbytes); } Modified: head/sys/sys/extattr.h ============================================================================== --- head/sys/sys/extattr.h Tue Apr 2 04:12:17 2013 (r248994) +++ head/sys/sys/extattr.h Tue Apr 2 05:30:41 2013 (r248995) @@ -92,11 +92,11 @@ ssize_t extattr_list_file(const char *_p size_t _nbytes); ssize_t extattr_list_link(const char *_path, int _attrnamespace, void *_data, size_t _nbytes); -int extattr_set_fd(int _fd, int _attrnamespace, const char *_attrname, +ssize_t extattr_set_fd(int _fd, int _attrnamespace, const char *_attrname, const void *_data, size_t _nbytes); -int extattr_set_file(const char *_path, int _attrnamespace, +ssize_t extattr_set_file(const char *_path, int _attrnamespace, const char *_attrname, const void *_data, size_t _nbytes); -int extattr_set_link(const char *_path, int _attrnamespace, +ssize_t extattr_set_link(const char *_path, int _attrnamespace, const char *_attrname, const void *_data, size_t _nbytes); __END_DECLS Modified: head/usr.sbin/extattr/rmextattr.c ============================================================================== --- head/usr.sbin/extattr/rmextattr.c Tue Apr 2 04:12:17 2013 (r248994) +++ head/usr.sbin/extattr/rmextattr.c Tue Apr 2 05:30:41 2013 (r248995) @@ -102,6 +102,8 @@ main(int argc, char *argv[]) char *buf, *visbuf, *p; const char *options, *attrname; + size_t len; + ssize_t ret; int buflen, visbuflen, ch, error, i, arg_counter, attrnamespace, minargc; @@ -200,80 +202,84 @@ main(int argc, char *argv[]) continue; break; case EASET: + len = strlen(buf) + flag_null; if (flag_nofollow) - error = extattr_set_link(argv[arg_counter], - attrnamespace, attrname, buf, - strlen(buf) + flag_null); - else - error = extattr_set_file(argv[arg_counter], - attrnamespace, attrname, buf, - strlen(buf) + flag_null); - if (error >= 0) + ret = extattr_set_link(argv[arg_counter], + attrnamespace, attrname, buf, len); + else + ret = extattr_set_file(argv[arg_counter], + attrnamespace, attrname, buf, len); + if (ret >= 0) { + if ((size_t)ret != len && !flag_quiet) { + warnx("Set %zd bytes of %zu for %s", + ret, len, attrname); + } continue; + } break; case EALS: if (flag_nofollow) - error = extattr_list_link(argv[arg_counter], + ret = extattr_list_link(argv[arg_counter], attrnamespace, NULL, 0); else - error = extattr_list_file(argv[arg_counter], + ret = extattr_list_file(argv[arg_counter], attrnamespace, NULL, 0); - if (error < 0) + if (ret < 0) break; - mkbuf(&buf, &buflen, error); + mkbuf(&buf, &buflen, ret); if (flag_nofollow) - error = extattr_list_link(argv[arg_counter], + ret = extattr_list_link(argv[arg_counter], attrnamespace, buf, buflen); else - error = extattr_list_file(argv[arg_counter], + ret = extattr_list_file(argv[arg_counter], attrnamespace, buf, buflen); - if (error < 0) + if (ret < 0) break; if (!flag_quiet) printf("%s\t", argv[arg_counter]); - for (i = 0; i < error; i += ch + 1) { + for (i = 0; i < ret; i += ch + 1) { /* The attribute name length is unsigned. */ ch = (unsigned char)buf[i]; printf("%s%*.*s", i ? "\t" : "", ch, ch, buf + i + 1); } - if (!flag_quiet || error > 0) + if (!flag_quiet || ret > 0) printf("\n"); continue; case EAGET: if (flag_nofollow) - error = extattr_get_link(argv[arg_counter], + ret = extattr_get_link(argv[arg_counter], attrnamespace, attrname, NULL, 0); else - error = extattr_get_file(argv[arg_counter], + ret = extattr_get_file(argv[arg_counter], attrnamespace, attrname, NULL, 0); - if (error < 0) + if (ret < 0) break; - mkbuf(&buf, &buflen, error); + mkbuf(&buf, &buflen, ret); if (flag_nofollow) - error = extattr_get_link(argv[arg_counter], + ret = extattr_get_link(argv[arg_counter], attrnamespace, attrname, buf, buflen); else - error = extattr_get_file(argv[arg_counter], + ret = extattr_get_file(argv[arg_counter], attrnamespace, attrname, buf, buflen); - if (error < 0) + if (ret < 0) break; if (!flag_quiet) printf("%s\t", argv[arg_counter]); if (flag_string) { - mkbuf(&visbuf, &visbuflen, error * 4 + 1); - strvisx(visbuf, buf, error, + mkbuf(&visbuf, &visbuflen, ret * 4 + 1); + strvisx(visbuf, buf, ret, VIS_SAFE | VIS_WHITE); printf("\"%s\"\n", visbuf); continue; } else if (flag_hex) { - for (i = 0; i < error; i++) + for (i = 0; i < ret; i++) printf("%s%02x", i ? " " : "", buf[i]); printf("\n"); continue; } else { - fwrite(buf, error, 1, stdout); + fwrite(buf, ret, 1, stdout); printf("\n"); continue; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 05:30:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9FB02932; Tue, 2 Apr 2013 05:30:54 +0000 (UTC) (envelope-from mdf@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 91C2A900; Tue, 2 Apr 2013 05:30:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r325UsK2060626; Tue, 2 Apr 2013 05:30:54 GMT (envelope-from mdf@svn.freebsd.org) Received: (from mdf@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r325UqYd060610; Tue, 2 Apr 2013 05:30:52 GMT (envelope-from mdf@svn.freebsd.org) Message-Id: <201304020530.r325UqYd060610@svn.freebsd.org> From: Matthew D Fleming Date: Tue, 2 Apr 2013 05:30:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248996 - in head/sys: compat/freebsd32 kern sys 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, 02 Apr 2013 05:30:54 -0000 Author: mdf Date: Tue Apr 2 05:30:52 2013 New Revision: 248996 URL: http://svnweb.freebsd.org/changeset/base/248996 Log: Regen. MFC after: 1 week Modified: head/sys/compat/freebsd32/freebsd32_proto.h head/sys/compat/freebsd32/freebsd32_syscall.h head/sys/compat/freebsd32/freebsd32_syscalls.c head/sys/compat/freebsd32/freebsd32_sysent.c head/sys/compat/freebsd32/freebsd32_systrace_args.c head/sys/kern/init_sysent.c head/sys/kern/syscalls.c head/sys/kern/systrace_args.c head/sys/sys/syscall.h head/sys/sys/syscall.mk head/sys/sys/sysproto.h Modified: head/sys/compat/freebsd32/freebsd32_proto.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_proto.h Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/compat/freebsd32/freebsd32_proto.h Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ #ifndef _FREEBSD32_SYSPROTO_H_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ #define FREEBSD32_SYS_syscall 0 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ const char *freebsd32_syscallnames[] = { Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ #include "opt_compat.h" Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Tue Apr 2 05:30:52 2013 (r248996) @@ -9493,7 +9493,7 @@ systrace_return_setargdesc(int sysnum, i /* extattr_set_file */ case 356: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* extattr_get_file */ case 357: @@ -9530,7 +9530,7 @@ systrace_return_setargdesc(int sysnum, i /* extattr_set_fd */ case 371: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* extattr_get_fd */ case 372: @@ -9645,7 +9645,7 @@ systrace_return_setargdesc(int sysnum, i /* extattr_set_link */ case 412: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* extattr_get_link */ case 413: Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/kern/init_sysent.c Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ #include "opt_compat.h" Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/kern/syscalls.c Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ const char *syscallnames[] = { Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/kern/systrace_args.c Tue Apr 2 05:30:52 2013 (r248996) @@ -10077,7 +10077,7 @@ systrace_return_setargdesc(int sysnum, i /* extattr_set_file */ case 356: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* extattr_get_file */ case 357: @@ -10114,7 +10114,7 @@ systrace_return_setargdesc(int sysnum, i /* extattr_set_fd */ case 371: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* extattr_get_fd */ case 372: @@ -10284,7 +10284,7 @@ systrace_return_setargdesc(int sysnum, i /* extattr_set_link */ case 412: if (ndx == 0 || ndx == 1) - p = "int"; + p = "ssize_t"; break; /* extattr_get_link */ case 413: Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/sys/syscall.h Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ #define SYS_syscall 0 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/sys/syscall.mk Tue Apr 2 05:30:52 2013 (r248996) @@ -1,7 +1,7 @@ # FreeBSD system call names. # DO NOT EDIT-- this file is automatically generated. # $FreeBSD$ -# created from FreeBSD: head/sys/kern/syscalls.master 248599 2013-03-21 22:59:01Z pjd +# created from FreeBSD MIASM = \ syscall.o \ exit.o \ Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Tue Apr 2 05:30:41 2013 (r248995) +++ head/sys/sys/sysproto.h Tue Apr 2 05:30:52 2013 (r248996) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 248599 2013-03-21 22:59:01Z pjd + * created from FreeBSD */ #ifndef _SYS_SYSPROTO_H_ From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 05:57:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 57FEEEE9; Tue, 2 Apr 2013 05:57:37 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4A9E39AC; Tue, 2 Apr 2013 05:57:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r325vbHJ069101; Tue, 2 Apr 2013 05:57:37 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r325vbnA069100; Tue, 2 Apr 2013 05:57:37 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201304020557.r325vbnA069100@svn.freebsd.org> From: Kevin Lo Date: Tue, 2 Apr 2013 05:57:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248997 - head/sys/conf 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, 02 Apr 2013 05:57:37 -0000 Author: kevlo Date: Tue Apr 2 05:57:36 2013 New Revision: 248997 URL: http://svnweb.freebsd.org/changeset/base/248997 Log: Add VIMAGE to NOTES. Reviewed by: zec Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Apr 2 05:30:52 2013 (r248996) +++ head/sys/conf/NOTES Tue Apr 2 05:57:36 2013 (r248997) @@ -755,6 +755,10 @@ options NGATM_CCATM device mn # Munich32x/Falc54 Nx64kbit/sec cards. +# Network stack virtualization. +options VIMAGE +options VNET_DEBUG # debug for VIMAGE + # # Network interfaces: # The `loop' device is MANDATORY when networking is enabled. From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 06:21:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E28CA435; Tue, 2 Apr 2013 06:21:37 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D4AEBA65; Tue, 2 Apr 2013 06:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r326LbOk077049; Tue, 2 Apr 2013 06:21:37 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r326Lbxx077047; Tue, 2 Apr 2013 06:21:37 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304020621.r326Lbxx077047@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Apr 2013 06:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248998 - 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: Tue, 02 Apr 2013 06:21:38 -0000 Author: adrian Date: Tue Apr 2 06:21:37 2013 New Revision: 248998 URL: http://svnweb.freebsd.org/changeset/base/248998 Log: Add a missing unmap; if we're freeing this mbuf then we must really both sync/unmap the dmamap before freeing it. Modified: head/sys/dev/ath/if_ath_rx.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Tue Apr 2 05:57:36 2013 (r248997) +++ head/sys/dev/ath/if_ath_rx.c Tue Apr 2 06:21:37 2013 (r248998) @@ -621,6 +621,7 @@ rx_error: (rs->rs_status & sc->sc_monpass)) { bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); /* NB: bpf needs the mbuf length setup */ len = rs->rs_datalen; m->m_pkthdr.len = m->m_len = len; From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 06:24:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 544CD5DE; Tue, 2 Apr 2013 06:24:23 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2E667A88; Tue, 2 Apr 2013 06:24:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r326ONhi077468; Tue, 2 Apr 2013 06:24:23 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r326ONGW077467; Tue, 2 Apr 2013 06:24:23 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304020624.r326ONGW077467@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Apr 2013 06:24:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248999 - 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: Tue, 02 Apr 2013 06:24:23 -0000 Author: adrian Date: Tue Apr 2 06:24:22 2013 New Revision: 248999 URL: http://svnweb.freebsd.org/changeset/base/248999 Log: Some TX dmamap cleanups. * Don't use BUS_DMA_ALLOCNOW for descriptor DMA maps; we never use bounce buffers for the descriptors themselves. * Add some XXX's to mark where the ath_buf has its mbuf ripped from underneath it without actually cleaning up the dmamap. I haven't audited those particular code paths to see if the DMA map is guaranteed to be setup there; I'll do that later. * Print out a warning if the descdma tidyup code is given some descriptors w/ maps to free. Ideally the owner will free the mbufs and unmap the descriptors before freeing the descriptor/ath_buf pairs, but right now that's not guaranteed to be done. Reviewed by: scottl (BUS_DMA_ALLOCNOW tag) Modified: head/sys/dev/ath/if_ath.c Modified: head/sys/dev/ath/if_ath.c ============================================================================== --- head/sys/dev/ath/if_ath.c Tue Apr 2 06:21:37 2013 (r248998) +++ head/sys/dev/ath/if_ath.c Tue Apr 2 06:24:22 2013 (r248999) @@ -2742,6 +2742,7 @@ ath_start(struct ifnet *ifp) "%s: flush fragmented packet, state %s\n", __func__, ieee80211_state_name[ni->ni_vap->iv_state]); + /* XXX dmamap */ ath_freetx(next); goto reclaim; } @@ -3031,6 +3032,9 @@ ath_descdma_alloc_desc(struct ath_softc /* * Setup DMA descriptor area. + * + * BUS_DMA_ALLOCNOW is not used; we never use bounce + * buffers for the descriptors themselves. */ error = bus_dma_tag_create(bus_get_dma_tag(sc->sc_dev), /* parent */ PAGE_SIZE, 0, /* alignment, bounds */ @@ -3040,7 +3044,7 @@ ath_descdma_alloc_desc(struct ath_softc dd->dd_desc_len, /* maxsize */ 1, /* nsegments */ dd->dd_desc_len, /* maxsegsize */ - BUS_DMA_ALLOCNOW, /* flags */ + 0, /* flags */ NULL, /* lockfunc */ NULL, /* lockarg */ &dd->dd_dmat); @@ -3237,6 +3241,7 @@ ath_descdma_cleanup(struct ath_softc *sc { struct ath_buf *bf; struct ieee80211_node *ni; + int do_warning = 0; if (dd->dd_dmamap != 0) { bus_dmamap_unload(dd->dd_dmat, dd->dd_dmamap); @@ -3247,6 +3252,23 @@ ath_descdma_cleanup(struct ath_softc *sc if (head != NULL) { TAILQ_FOREACH(bf, head, bf_list) { if (bf->bf_m) { + /* + * XXX warn if there's buffers here. + * XXX it should have been freed by the + * owner! + */ + + if (do_warning == 0) { + do_warning = 1; + device_printf(sc->sc_dev, + "%s: %s: mbuf should've been" + " unmapped/freed!\n", + __func__, + dd->dd_name); + } + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); m_freem(bf->bf_m); bf->bf_m = NULL; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 06:25:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2F48274B; Tue, 2 Apr 2013 06:25:11 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 21E71A8C; Tue, 2 Apr 2013 06:25:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r326PBnL077617; Tue, 2 Apr 2013 06:25:11 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r326PB8d077616; Tue, 2 Apr 2013 06:25:11 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304020625.r326PB8d077616@svn.freebsd.org> From: Adrian Chadd Date: Tue, 2 Apr 2013 06:25:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249000 - 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: Tue, 02 Apr 2013 06:25:11 -0000 Author: adrian Date: Tue Apr 2 06:25:10 2013 New Revision: 249000 URL: http://svnweb.freebsd.org/changeset/base/249000 Log: Mark a couple of places where I think the dmamap isn't being unmapped before the TX path is being aborted. Right now it's in the TDMA code and I can live with that; but it really should get fixed. I'll do a more thorough audit of this code soon. 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 Tue Apr 2 06:24:22 2013 (r248999) +++ head/sys/dev/ath/if_ath_tx.c Tue Apr 2 06:25:10 2013 (r249000) @@ -1615,6 +1615,7 @@ ath_tx_normal_setup(struct ath_softc *sc if_printf(ifp, "bogus frame type 0x%x (%s)\n", wh->i_fc[0] & IEEE80211_FC0_TYPE_MASK, __func__); /* XXX statistic */ + /* XXX free tx dmamap */ ath_freetx(m0); return EIO; } @@ -1670,6 +1671,7 @@ ath_tx_normal_setup(struct ath_softc *sc DPRINTF(sc, ATH_DEBUG_TDMA, "%s: discard frame, ACK required w/ TDMA\n", __func__); sc->sc_stats.ast_tdma_ack++; + /* XXX free tx dmamap */ ath_freetx(m0); return EIO; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 06:49:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C2A41B71; Tue, 2 Apr 2013 06:49:44 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B432FB47; Tue, 2 Apr 2013 06:49:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r326niLu084208; Tue, 2 Apr 2013 06:49:44 GMT (envelope-from ae@svn.freebsd.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r326niVe084207; Tue, 2 Apr 2013 06:49:44 GMT (envelope-from ae@svn.freebsd.org) Message-Id: <201304020649.r326niVe084207@svn.freebsd.org> From: "Andrey V. Elsukov" Date: Tue, 2 Apr 2013 06:49:44 +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: r249002 - stable/9/sys/netpfil/ipfw 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, 02 Apr 2013 06:49:44 -0000 Author: ae Date: Tue Apr 2 06:49:44 2013 New Revision: 249002 URL: http://svnweb.freebsd.org/changeset/base/249002 Log: MFC r248697: When we are removing a specific set, call ipfw_expire_dyn_rules only once. Modified: stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c ============================================================================== --- stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Apr 2 06:48:29 2013 (r249001) +++ stable/9/sys/netpfil/ipfw/ip_fw_sockopt.c Tue Apr 2 06:49:44 2013 (r249002) @@ -377,14 +377,15 @@ del_entry(struct ip_fw_chain *chain, uin /* 4. swap the maps (under BH_LOCK) */ map = swap_map(chain, map, chain->n_rules - n); /* 5. now remove the rules deleted from the old map */ + if (cmd == 1) + ipfw_expire_dyn_rules(chain, NULL, new_set); for (i = start; i < end; i++) { - int l; rule = map[i]; if (keep_rule(rule, cmd, new_set, num)) continue; - l = RULESIZE(rule); - chain->static_len -= l; - ipfw_expire_dyn_rules(chain, rule, RESVD_SET); + chain->static_len -= RULESIZE(rule); + if (cmd != 1) + ipfw_expire_dyn_rules(chain, rule, RESVD_SET); rule->x_next = chain->reap; chain->reap = rule; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 08:15:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7C9EB8CA; Tue, 2 Apr 2013 08:15:40 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6B46EEC2; Tue, 2 Apr 2013 08:15:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r328FdPn010339; Tue, 2 Apr 2013 08:15:39 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r328FdBY010337; Tue, 2 Apr 2013 08:15:39 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304020815.r328FdBY010337@svn.freebsd.org> From: Martin Matuska Date: Tue, 2 Apr 2013 08:15:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249004 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 02 Apr 2013 08:15:40 -0000 Author: mm Date: Tue Apr 2 08:15:39 2013 New Revision: 249004 URL: http://svnweb.freebsd.org/changeset/base/249004 Log: Do not check against uninitialized rc and comment out vendor code MFC after: 16 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c 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 Tue Apr 2 07:28:14 2013 (r249003) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Tue Apr 2 08:15:39 2013 (r249004) @@ -5713,11 +5713,11 @@ zfsdev_ioctl(struct cdev *dev, u_long zc { zfs_cmd_t *zc; uint_t vecnum; - int error, rc, len; #ifdef illumos + int error, rc, len; minor_t minor = getminor(dev); #else - int cflag, cmd, oldvecnum; + int error, len, cflag, cmd, oldvecnum; cred_t *cr = td->td_ucred; #endif const zfs_ioc_vec_t *vec; @@ -5904,8 +5904,11 @@ zfsdev_ioctl(struct cdev *dev, u_long zc out: nvlist_free(innvl); +#ifdef illumos + rc = ddi_copyout(zc, (void *)arg, sizeof (zfs_cmd_t), flag); if (error == 0 && rc != 0) error = EFAULT; +#endif if (error == 0 && vec->zvec_allow_log) { char *s = tsd_get(zfs_allow_log_key); if (s != NULL) From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 08:41:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E6196C9; Tue, 2 Apr 2013 08:41:39 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C9DFDFBF; Tue, 2 Apr 2013 08:41:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r328fdEb018493; Tue, 2 Apr 2013 08:41:39 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r328fdCO018489; Tue, 2 Apr 2013 08:41:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304020841.r328fdCO018489@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 2 Apr 2013 08:41:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249005 - vendor-crypto/openssh/dist X-SVN-Group: vendor-crypto 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, 02 Apr 2013 08:41:40 -0000 Author: des Date: Tue Apr 2 08:41:38 2013 New Revision: 249005 URL: http://svnweb.freebsd.org/changeset/base/249005 Log: Pull in a patchset from upstream to silence spurious "no such identity file" warnings. Modified: vendor-crypto/openssh/dist/readconf.c vendor-crypto/openssh/dist/readconf.h vendor-crypto/openssh/dist/ssh.c vendor-crypto/openssh/dist/sshconnect2.c Modified: vendor-crypto/openssh/dist/readconf.c ============================================================================== --- vendor-crypto/openssh/dist/readconf.c Tue Apr 2 08:15:39 2013 (r249004) +++ vendor-crypto/openssh/dist/readconf.c Tue Apr 2 08:41:38 2013 (r249005) @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.194 2011/09/23 07:45:05 markus Exp $ */ +/* $OpenBSD: readconf.c,v 1.195 2013/02/17 23:16:57 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -326,6 +326,26 @@ clear_forwardings(Options *options) options->tun_open = SSH_TUNMODE_NO; } +void +add_identity_file(Options *options, const char *dir, const char *filename, + int userprovided) +{ + char *path; + + if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES) + fatal("Too many identity files specified (max %d)", + SSH_MAX_IDENTITY_FILES); + + if (dir == NULL) /* no dir, filename is absolute */ + path = xstrdup(filename); + else + (void)xasprintf(&path, "%.100s%.100s", dir, filename); + + options->identity_file_userprovided[options->num_identity_files] = + userprovided; + options->identity_files[options->num_identity_files++] = path; +} + /* * Returns the number of the token pointed to by cp or oBadOption. */ @@ -586,9 +606,7 @@ parse_yesnoask: if (*intptr >= SSH_MAX_IDENTITY_FILES) fatal("%.200s line %d: Too many identity files specified (max %d).", filename, linenum, SSH_MAX_IDENTITY_FILES); - charptr = &options->identity_files[*intptr]; - *charptr = xstrdup(arg); - *intptr = *intptr + 1; + add_identity_file(options, NULL, arg, 1); } break; Modified: vendor-crypto/openssh/dist/readconf.h ============================================================================== --- vendor-crypto/openssh/dist/readconf.h Tue Apr 2 08:15:39 2013 (r249004) +++ vendor-crypto/openssh/dist/readconf.h Tue Apr 2 08:41:38 2013 (r249005) @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.h,v 1.91 2011/09/23 07:45:05 markus Exp $ */ +/* $OpenBSD: readconf.h,v 1.92 2013/02/17 23:16:57 dtucker Exp $ */ /* * Author: Tatu Ylonen @@ -96,6 +96,7 @@ typedef struct { int num_identity_files; /* Number of files for RSA/DSA identities. */ char *identity_files[SSH_MAX_IDENTITY_FILES]; + int identity_file_userprovided[SSH_MAX_IDENTITY_FILES]; Key *identity_keys[SSH_MAX_IDENTITY_FILES]; /* Local TCP/IP forward requests. */ @@ -158,5 +159,6 @@ process_config_line(Options *, const cha void add_local_forward(Options *, const Forward *); void add_remote_forward(Options *, const Forward *); +void add_identity_file(Options *, const char *, const char *, int); #endif /* READCONF_H */ Modified: vendor-crypto/openssh/dist/ssh.c ============================================================================== --- vendor-crypto/openssh/dist/ssh.c Tue Apr 2 08:15:39 2013 (r249004) +++ vendor-crypto/openssh/dist/ssh.c Tue Apr 2 08:41:38 2013 (r249005) @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.370 2012/07/06 01:47:38 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.371 2013/02/17 23:16:57 dtucker Exp $ */ /* * Author: Tatu Ylonen * Copyright (c) 1995 Tatu Ylonen , Espoo, Finland @@ -405,12 +405,7 @@ main(int ac, char **av) strerror(errno)); break; } - if (options.num_identity_files >= - SSH_MAX_IDENTITY_FILES) - fatal("Too many identity files specified " - "(max %d)", SSH_MAX_IDENTITY_FILES); - options.identity_files[options.num_identity_files++] = - xstrdup(optarg); + add_identity_file(&options, NULL, optarg, 1); break; case 'I': #ifdef ENABLE_PKCS11 Modified: vendor-crypto/openssh/dist/sshconnect2.c ============================================================================== --- vendor-crypto/openssh/dist/sshconnect2.c Tue Apr 2 08:15:39 2013 (r249004) +++ vendor-crypto/openssh/dist/sshconnect2.c Tue Apr 2 08:41:38 2013 (r249005) @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.191 2013/02/15 00:21:01 dtucker Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.192 2013/02/17 23:16:57 dtucker Exp $ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. * Copyright (c) 2008 Damien Miller. All rights reserved. @@ -1384,7 +1384,7 @@ pubkey_prepare(Authctxt *authctxt) id = xcalloc(1, sizeof(*id)); id->key = key; id->filename = xstrdup(options.identity_files[i]); - id->userprovided = 1; + id->userprovided = options.identity_file_userprovided[i]; TAILQ_INSERT_TAIL(&files, id, next); } /* Prefer PKCS11 keys that are explicitly listed */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 09:38:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 52164940; Tue, 2 Apr 2013 09:38:05 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 454153FE; Tue, 2 Apr 2013 09:38:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r329c5j3034226; Tue, 2 Apr 2013 09:38:05 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r329c5b6034225; Tue, 2 Apr 2013 09:38:05 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304020938.r329c5b6034225@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 09:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249008 - 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: Tue, 02 Apr 2013 09:38:05 -0000 Author: trasz Date: Tue Apr 2 09:38:04 2013 New Revision: 249008 URL: http://svnweb.freebsd.org/changeset/base/249008 Log: Fix panic in the error path caused by recursive acquisition of XPT topology lock. Reviewed by: ken Modified: head/sys/cam/cam_periph.c Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Tue Apr 2 09:33:22 2013 (r249007) +++ head/sys/cam/cam_periph.c Tue Apr 2 09:38:04 2013 (r249008) @@ -218,9 +218,9 @@ cam_periph_alloc(periph_ctor_t *periph_c } if (*p_drv == NULL) { printf("cam_periph_alloc: invalid periph name '%s'\n", name); + xpt_unlock_buses(); xpt_free_path(periph->path); free(periph, M_CAMPERIPH); - xpt_unlock_buses(); return (CAM_REQ_INVALID); } periph->unit_number = camperiphunit(*p_drv, path_id, target_id, lun_id); From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 09:42:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D435FB9E; Tue, 2 Apr 2013 09:42:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B69F6613; Tue, 2 Apr 2013 09:42:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r329giXr036455; Tue, 2 Apr 2013 09:42:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r329ggWj036438; Tue, 2 Apr 2013 09:42:42 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304020942.r329ggWj036438@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 09:42:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249009 - in head: share/man/man4 sys/cam/ctl sys/modules sys/modules/ctl usr.bin/ctlstat usr.sbin/ctladm 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, 02 Apr 2013 09:42:44 -0000 Author: trasz Date: Tue Apr 2 09:42:42 2013 New Revision: 249009 URL: http://svnweb.freebsd.org/changeset/base/249009 Log: Make it possible to build CTL as a module. Reviewed by: ken Sponsored by: FreeBSD Foundation Added: head/share/man/man4/ctl.4 (contents, props changed) head/sys/modules/ctl/ head/sys/modules/ctl/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/cam/ctl/README.ctl.txt head/sys/cam/ctl/ctl.c head/sys/cam/ctl/ctl_frontend_cam_sim.c head/sys/cam/ctl/ctl_frontend_internal.c head/sys/cam/ctl/scsi_ctl.c head/sys/modules/Makefile head/usr.bin/ctlstat/ctlstat.8 head/usr.sbin/ctladm/ctladm.8 Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Tue Apr 2 09:38:04 2013 (r249008) +++ head/share/man/man4/Makefile Tue Apr 2 09:42:42 2013 (r249009) @@ -99,6 +99,7 @@ MAN= aac.4 \ ${_cpuctl.4} \ cpufreq.4 \ crypto.4 \ + ctl.4 \ cue.4 \ cxgb.4 \ cxgbe.4 \ Added: head/share/man/man4/ctl.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/ctl.4 Tue Apr 2 09:42:42 2013 (r249009) @@ -0,0 +1,90 @@ +.\" Copyright (c) 2013 Edward Tomasz Napierala +.\" 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 March 8, 2013 +.Dt CTL 4 +.Os +.Sh NAME +.Nm ctl +.Nd CAM Target Layer +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following line in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device ctl" +.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 +ctl_load="YES" +.Ed +.Sh DESCRIPTION +The +.Nm +subsystem provides SCSI disk and processor emulation. +It supports features such as: +.Pp +.Bl -bullet -compact +.It +Disk and processor device emulation +.It +Tagged queueing +.It +SCSI task attribute support (ordered, head of queue, simple tags) +.It +SCSI implicit command ordering support. +.It +Full task management support (abort, LUN reset, target reset, etc.) +.It +Support for multiple ports +.It +Support for multiple simultaneous initiators +.It +Support for multiple simultaneous backing stores +.It +Persistent reservation support +.It +Mode sense/select support +.It +Error injection support +.It +All I/O handled in-kernel, no userland context switch overhead +.El +.Sh SEE ALSO +.Xr ctladm 8 , +.Xr ctlstat 8 +.Sh HISTORY +The +.Nm +subsystem first appeared in +.Fx 9.1 . +.Sh AUTHORS +The +.Nm +subsystem was written by +.An Kenneth Merry Aq ken@FreeBSD.org . Modified: head/sys/cam/ctl/README.ctl.txt ============================================================================== --- head/sys/cam/ctl/README.ctl.txt Tue Apr 2 09:38:04 2013 (r249008) +++ head/sys/cam/ctl/README.ctl.txt Tue Apr 2 09:42:42 2013 (r249009) @@ -227,9 +227,6 @@ Revision 1.2 Changes To Do List: ========== - - Make CTL buildable as a module. Work needs to be done on initialization, - and on freeing resources and LUNs when it is built as a module. - - Use devstat(9) for CTL's statistics collection. CTL uses a home-grown statistics collection system that is similar to devstat(9). ctlstat should be retired in favor of iostat, etc., once aggregation modes are Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Apr 2 09:38:04 2013 (r249008) +++ head/sys/cam/ctl/ctl.c Tue Apr 2 09:42:42 2013 (r249009) @@ -52,6 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -338,7 +339,7 @@ TUNABLE_INT("kern.cam.ctl.disable", &ctl static void ctl_isc_event_handler(ctl_ha_channel chanel, ctl_ha_event event, int param); static void ctl_copy_sense_data(union ctl_ha_msg *src, union ctl_io *dest); -static void ctl_init(void); +static int ctl_init(void); void ctl_shutdown(void); static int ctl_open(struct cdev *dev, int flags, int fmt, struct thread *td); static int ctl_close(struct cdev *dev, int flags, int fmt, struct thread *td); @@ -458,11 +459,16 @@ static struct cdevsw ctl_cdevsw = { MALLOC_DEFINE(M_CTL, "ctlmem", "Memory used for CTL"); -/* - * If we have the CAM SIM, we may or may not have another SIM that will - * cause CTL to get initialized. If not, we need to initialize it. - */ -SYSINIT(ctl_init, SI_SUB_CONFIGURE, SI_ORDER_THIRD, ctl_init, NULL); +static int ctl_module_event_handler(module_t, int /*modeventtype_t*/, void *); + +static moduledata_t ctl_moduledata = { + "ctl", + ctl_module_event_handler, + NULL +}; + +DECLARE_MODULE(ctl, ctl_moduledata, SI_SUB_CONFIGURE, SI_ORDER_THIRD); +MODULE_VERSION(ctl, 1); static void ctl_isc_handler_finish_xfer(struct ctl_softc *ctl_softc, @@ -942,7 +948,7 @@ ctl_copy_sense_data(union ctl_ha_msg *sr dest->io_hdr.status = src->hdr.status; } -static void +static int ctl_init(void) { struct ctl_softc *softc; @@ -953,7 +959,7 @@ ctl_init(void) #if 0 int i; #endif - int retval; + int error, retval; //int isc_retval; retval = 0; @@ -962,7 +968,7 @@ ctl_init(void) /* If we're disabled, don't initialize. */ if (ctl_disable != 0) - return; + return (0); control_softc = malloc(sizeof(*control_softc), M_DEVBUF, M_WAITOK | M_ZERO); @@ -991,7 +997,7 @@ ctl_init(void) destroy_dev(softc->dev); free(control_softc, M_DEVBUF); control_softc = NULL; - return; + return (ENOMEM); } SYSCTL_ADD_INT(&softc->sysctl_ctx, @@ -1053,7 +1059,7 @@ ctl_init(void) &internal_pool)!= 0){ printf("ctl: can't allocate %d entry internal pool, " "exiting\n", CTL_POOL_ENTRIES_INTERNAL); - return; + return (ENOMEM); } if (ctl_pool_create(softc, CTL_POOL_EMERGENCY, @@ -1061,7 +1067,7 @@ ctl_init(void) printf("ctl: can't allocate %d entry emergency pool, " "exiting\n", CTL_POOL_ENTRIES_EMERGENCY); ctl_pool_free(softc, internal_pool); - return; + return (ENOMEM); } if (ctl_pool_create(softc, CTL_POOL_4OTHERSC, CTL_POOL_ENTRIES_OTHER_SC, @@ -1071,7 +1077,7 @@ ctl_init(void) "exiting\n", CTL_POOL_ENTRIES_OTHER_SC); ctl_pool_free(softc, internal_pool); ctl_pool_free(softc, emergency_pool); - return; + return (ENOMEM); } softc->internal_pool = internal_pool; @@ -1092,14 +1098,15 @@ ctl_init(void) mtx_unlock(&softc->ctl_lock); #endif - if (kproc_create(ctl_work_thread, softc, &softc->work_thread, 0, 0, - "ctl_thrd") != 0) { + error = kproc_create(ctl_work_thread, softc, &softc->work_thread, 0, 0, + "ctl_thrd"); + if (error != 0) { printf("error creating CTL work thread!\n"); ctl_free_lun(lun); ctl_pool_free(softc, internal_pool); ctl_pool_free(softc, emergency_pool); ctl_pool_free(softc, other_pool); - return; + return (error); } printf("ctl: CAM Target Layer loaded\n"); @@ -1139,10 +1146,11 @@ ctl_init(void) if (sizeof(struct callout) > CTL_TIMER_BYTES) { printf("sizeof(struct callout) %zd > CTL_TIMER_BYTES %zd\n", sizeof(struct callout), CTL_TIMER_BYTES); - return; + return (EINVAL); } #endif /* CTL_IO_DELAY */ + return (0); } void @@ -1199,6 +1207,20 @@ ctl_shutdown(void) printf("ctl: CAM Target Layer unloaded\n"); } +static int +ctl_module_event_handler(module_t mod, int what, void *arg) +{ + + switch (what) { + case MOD_LOAD: + return (ctl_init()); + case MOD_UNLOAD: + return (EBUSY); + default: + return (EOPNOTSUPP); + } +} + /* * XXX KDM should we do some access checks here? Bump a reference count to * prevent a CTL module from being unloaded while someone has it open? Modified: head/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Apr 2 09:38:04 2013 (r249008) +++ head/sys/cam/ctl/ctl_frontend_cam_sim.c Tue Apr 2 09:42:42 2013 (r249009) @@ -121,12 +121,23 @@ struct cfcs_softc cfcs_softc; static int cfcs_max_sense = sizeof(struct scsi_sense_data); extern int ctl_disable; -SYSINIT(cfcs_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfcs_init, NULL); SYSCTL_NODE(_kern_cam, OID_AUTO, ctl2cam, CTLFLAG_RD, 0, "CAM Target Layer SIM frontend"); SYSCTL_INT(_kern_cam_ctl2cam, OID_AUTO, max_sense, CTLFLAG_RW, &cfcs_max_sense, 0, "Maximum sense data size"); +static int cfcs_module_event_handler(module_t, int /*modeventtype_t*/, void *); + +static moduledata_t cfcs_moduledata = { + "ctlcfcs", + cfcs_module_event_handler, + NULL +}; + +DECLARE_MODULE(ctlcfcs, cfcs_moduledata, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); +MODULE_VERSION(ctlcfcs, 1); +MODULE_DEPEND(ctlcfi, ctl, 1, 1, 1); +MODULE_DEPEND(ctlcfi, cam, 1, 1, 1); int cfcs_init(void) @@ -176,7 +187,7 @@ cfcs_init(void) printf("%s: ctl_frontend_register() failed with error %d!\n", __func__, retval); mtx_destroy(&softc->lock); - return (1); + return (retval); } /* @@ -236,7 +247,7 @@ cfcs_init(void) CAM_LUN_WILDCARD) != CAM_REQ_CMP) { printf("%s: error creating path\n", __func__); xpt_bus_deregister(cam_sim_path(softc->sim)); - retval = 1; + retval = EINVAL; goto bailout; } @@ -274,6 +285,20 @@ cfcs_shutdown(void) } +static int +cfcs_module_event_handler(module_t mod, int what, void *arg) +{ + + switch (what) { + case MOD_LOAD: + return (cfcs_init()); + case MOD_UNLOAD: + return (EBUSY); + default: + return (EOPNOTSUPP); + } +} + static void cfcs_onoffline(void *arg, int online) { Modified: head/sys/cam/ctl/ctl_frontend_internal.c ============================================================================== --- head/sys/cam/ctl/ctl_frontend_internal.c Tue Apr 2 09:38:04 2013 (r249008) +++ head/sys/cam/ctl/ctl_frontend_internal.c Tue Apr 2 09:42:42 2013 (r249009) @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -189,7 +190,7 @@ MALLOC_DEFINE(M_CTL_CFI, "ctlcfi", "CTL static struct cfi_softc fetd_internal_softc; extern int ctl_disable; -void cfi_init(void); +int cfi_init(void); void cfi_shutdown(void) __unused; static void cfi_online(void *arg); static void cfi_offline(void *arg); @@ -217,9 +218,19 @@ static void cfi_metatask_io_done(union c static void cfi_err_recovery_done(union ctl_io *io); static void cfi_lun_io_done(union ctl_io *io); -SYSINIT(cfi_init, SI_SUB_CONFIGURE, SI_ORDER_FOURTH, cfi_init, NULL); +static int cfi_module_event_handler(module_t, int /*modeventtype_t*/, void *); -void +static moduledata_t cfi_moduledata = { + "ctlcfi", + cfi_module_event_handler, + NULL +}; + +DECLARE_MODULE(ctlcfi, cfi_moduledata, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); +MODULE_VERSION(ctlcfi, 1); +MODULE_DEPEND(ctlcfi, ctl, 1, 1, 1); + +int cfi_init(void) { struct cfi_softc *softc; @@ -234,7 +245,7 @@ cfi_init(void) /* If we're disabled, don't initialize */ if (ctl_disable != 0) - return; + return (0); if (sizeof(struct cfi_lun_io) > CTL_PORT_PRIV_SIZE) { printf("%s: size of struct cfi_lun_io %zd > " @@ -292,7 +303,7 @@ cfi_init(void) } bailout: - return; + return (0); bailout_error: @@ -309,6 +320,8 @@ bailout_error: default: break; } + + return (ENOMEM); } void @@ -331,6 +344,20 @@ cfi_shutdown(void) printf("%s: error shrinking LUN pool\n", __func__); } +static int +cfi_module_event_handler(module_t mod, int what, void *arg) +{ + + switch (what) { + case MOD_LOAD: + return (cfi_init()); + case MOD_UNLOAD: + return (EBUSY); + default: + return (EOPNOTSUPP); + } +} + static void cfi_online(void *arg) { Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Apr 2 09:38:04 2013 (r249008) +++ head/sys/cam/ctl/scsi_ctl.c Tue Apr 2 09:42:42 2013 (r249009) @@ -225,11 +225,28 @@ static struct periph_driver ctlfe_driver ctlfeinit, "ctl", TAILQ_HEAD_INITIALIZER(ctlfe_driver.units), /*generation*/ 0 }; -PERIPHDRIVER_DECLARE(ctl, ctlfe_driver); + +static int ctlfe_module_event_handler(module_t, int /*modeventtype_t*/, void *); + +/* + * We're not using PERIPHDRIVER_DECLARE(), because it runs at SI_SUB_DRIVERS, + * and that happens before CTL gets initialised. + */ +static moduledata_t ctlfe_moduledata = { + "ctlfe", + ctlfe_module_event_handler, + NULL +}; + +DECLARE_MODULE(ctlfe, ctlfe_moduledata, SI_SUB_CONFIGURE, SI_ORDER_FOURTH); +MODULE_VERSION(ctlfe, 1); +MODULE_DEPEND(ctlfe, ctl, 1, 1, 1); +MODULE_DEPEND(ctlfe, cam, 1, 1, 1); extern struct ctl_softc *control_softc; extern int ctl_disable; +#ifdef seems_unused int ctlfeinitialize(void) { @@ -257,6 +274,7 @@ ctlfeinitialize(void) return (0); } +#endif void ctlfeshutdown(void) @@ -288,6 +306,21 @@ ctlfeinit(void) } } +static int +ctlfe_module_event_handler(module_t mod, int what, void *arg) +{ + + switch (what) { + case MOD_LOAD: + periphdriver_register(&ctlfe_driver); + return (0); + case MOD_UNLOAD: + return (EBUSY); + default: + return (EOPNOTSUPP); + } +} + static void ctlfeasync(void *callback_arg, uint32_t code, struct cam_path *path, void *arg) { @@ -1971,7 +2004,6 @@ ctlfe_lun_enable(void *arg, struct ctl_i struct cam_sim *sim; cam_status status; - bus_softc = (struct ctlfe_softc *)arg; sim = bus_softc->sim; Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Tue Apr 2 09:38:04 2013 (r249008) +++ head/sys/modules/Makefile Tue Apr 2 09:42:42 2013 (r249009) @@ -78,6 +78,7 @@ SUBDIR= \ ${_cs} \ ${_ct} \ ${_ctau} \ + ctl \ ${_cxgb} \ cxgbe \ ${_cyclic} \ Added: head/sys/modules/ctl/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/ctl/Makefile Tue Apr 2 09:42:42 2013 (r249009) @@ -0,0 +1,26 @@ +# $FreeBSD$ + +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../cam/ctl + +KMOD= ctl + +SRCS= ctl.c +SRCS+= ctl_backend.c +SRCS+= ctl_backend_block.c +SRCS+= ctl_backend_ramdisk.c +SRCS+= ctl_cmd_table.c +SRCS+= ctl_frontend.c +SRCS+= ctl_frontend_cam_sim.c +SRCS+= ctl_frontend_internal.c +SRCS+= ctl_mem_pool.c +SRCS+= ctl_scsi_all.c +SRCS+= ctl_error.c +SRCS+= ctl_util.c +SRCS+= scsi_ctl.c +SRCS+= bus_if.h +SRCS+= device_if.h +SRCS+= vnode_if.h + +.include Modified: head/usr.bin/ctlstat/ctlstat.8 ============================================================================== --- head/usr.bin/ctlstat/ctlstat.8 Tue Apr 2 09:38:04 2013 (r249008) +++ head/usr.bin/ctlstat/ctlstat.8 Tue Apr 2 09:42:42 2013 (r249009) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.bin/ctlstat/ctlstat.8#2 $ .\" $FreeBSD$ .\" -.Dd June 4, 2010 +.Dd March 6, 2013 .Dt CTLSTAT 8 .Os .Sh NAME @@ -113,6 +113,7 @@ every 10 seconds. .Sh SEE ALSO .Xr cam 3 , .Xr cam 4 , +.Xr ctl 4 , .Xr xpt 4 , .Xr camcontrol 8 , .Xr ctladm 8 , Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Tue Apr 2 09:38:04 2013 (r249008) +++ head/usr.sbin/ctladm/ctladm.8 Tue Apr 2 09:42:42 2013 (r249009) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd March 6, 2012 +.Dd March 6, 2013 .Dt CTLADM 8 .Os .Sh NAME @@ -975,6 +975,7 @@ This will result in a sense key of NOT R .Xr cam 3 , .Xr cam_cdbparse 3 , .Xr cam 4 , +.Xr ctl 4 , .Xr xpt 4 , .Xr camcontrol 8 .Sh HISTORY From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 09:45:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 453C9E66; Tue, 2 Apr 2013 09:45:00 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 371DF635; Tue, 2 Apr 2013 09:45:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r329j0SX036862; Tue, 2 Apr 2013 09:45:00 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r329ixjE036847; Tue, 2 Apr 2013 09:44:59 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304020944.r329ixjE036847@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 09:44:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249011 - in head: share/man/man4 usr.sbin/ctladm 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, 02 Apr 2013 09:45:00 -0000 Author: trasz Date: Tue Apr 2 09:44:59 2013 New Revision: 249011 URL: http://svnweb.freebsd.org/changeset/base/249011 Log: Fix dates in manual pages modified in 249009. Modified: head/share/man/man4/ctl.4 head/usr.sbin/ctladm/ctladm.8 Modified: head/share/man/man4/ctl.4 ============================================================================== --- head/share/man/man4/ctl.4 Tue Apr 2 09:44:12 2013 (r249010) +++ head/share/man/man4/ctl.4 Tue Apr 2 09:44:59 2013 (r249011) @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" $FreeBSD$ -.Dd March 8, 2013 +.Dd April 2, 2013 .Dt CTL 4 .Os .Sh NAME Modified: head/usr.sbin/ctladm/ctladm.8 ============================================================================== --- head/usr.sbin/ctladm/ctladm.8 Tue Apr 2 09:44:12 2013 (r249010) +++ head/usr.sbin/ctladm/ctladm.8 Tue Apr 2 09:44:59 2013 (r249011) @@ -34,7 +34,7 @@ .\" $Id: //depot/users/kenm/FreeBSD-test2/usr.sbin/ctladm/ctladm.8#3 $ .\" $FreeBSD$ .\" -.Dd March 6, 2013 +.Dd April 2, 2013 .Dt CTLADM 8 .Os .Sh NAME From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 09:45:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 59093FE8; Tue, 2 Apr 2013 09:45:35 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4BB66645; Tue, 2 Apr 2013 09:45:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r329jZnO037013; Tue, 2 Apr 2013 09:45:35 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r329jZTE037012; Tue, 2 Apr 2013 09:45:35 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304020945.r329jZTE037012@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 09:45:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249012 - 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: Tue, 02 Apr 2013 09:45:35 -0000 Author: trasz Date: Tue Apr 2 09:45:34 2013 New Revision: 249012 URL: http://svnweb.freebsd.org/changeset/base/249012 Log: Remove unused code. Reviewed by: ken Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Apr 2 09:44:59 2013 (r249011) +++ head/sys/cam/ctl/scsi_ctl.c Tue Apr 2 09:45:34 2013 (r249012) @@ -246,36 +246,6 @@ MODULE_DEPEND(ctlfe, cam, 1, 1, 1); extern struct ctl_softc *control_softc; extern int ctl_disable; -#ifdef seems_unused -int -ctlfeinitialize(void) -{ - cam_status status; - - /* Don't initialize if we're disabled */ - if (ctl_disable != 0) - return (0); - - STAILQ_INIT(&ctlfe_softc_list); - - mtx_init(&ctlfe_list_mtx, ctlfe_mtx_desc, NULL, MTX_DEF); - - xpt_lock_buses(); - periphdriver_register(&ctlfe_driver); - xpt_unlock_buses(); - - status = xpt_register_async(AC_PATH_REGISTERED | AC_PATH_DEREGISTERED | - AC_CONTRACT, ctlfeasync, NULL, NULL); - - if (status != CAM_REQ_CMP) { - printf("ctl: Failed to attach async callback due to CAM " - "status 0x%x!\n", status); - } - - return (0); -} -#endif - void ctlfeshutdown(void) { From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 11:42:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 20DB0BE5; Tue, 2 Apr 2013 11:42:40 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EF2F9CF4; Tue, 2 Apr 2013 11:42:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32Bgdaf072360; Tue, 2 Apr 2013 11:42:39 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32Bgd8b072359; Tue, 2 Apr 2013 11:42:39 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304021142.r32Bgd8b072359@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 2 Apr 2013 11:42:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249015 - head/crypto/openssh 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, 02 Apr 2013 11:42:40 -0000 Author: des Date: Tue Apr 2 11:42:39 2013 New Revision: 249015 URL: http://svnweb.freebsd.org/changeset/base/249015 Log: Silence printf format warnings. Modified: head/crypto/openssh/krl.c Modified: head/crypto/openssh/krl.c ============================================================================== --- head/crypto/openssh/krl.c Tue Apr 2 10:05:30 2013 (r249014) +++ head/crypto/openssh/krl.c Tue Apr 2 11:42:39 2013 (r249015) @@ -502,8 +502,11 @@ choose_next_state(int current_state, u_i } debug3("%s: contig %llu last_gap %llu next_gap %llu final %d, costs:" "list %llu range %llu bitmap %llu new bitmap %llu, " - "selected 0x%02x%s", __func__, contig, last_gap, next_gap, final, - cost_list, cost_range, cost_bitmap, cost_bitmap_restart, new_state, + "selected 0x%02x%s", __func__, (unsigned long long)contig, + (unsigned long long)last_gap, (unsigned long long)next_gap, final, + (unsigned long long)cost_list, (unsigned long long)cost_range, + (unsigned long long)cost_bitmap, + (unsigned long long)cost_bitmap_restart, new_state, *force_new_section ? " restart" : ""); return new_state; } @@ -539,7 +542,8 @@ revoked_certs_generate(struct revoked_ce rs != NULL; rs = RB_NEXT(revoked_serial_tree, &rc->revoked_serials, rs)) { debug3("%s: serial %llu:%llu state 0x%02x", __func__, - rs->lo, rs->hi, state); + (unsigned long long)rs->lo, (unsigned long long)rs->hi, + state); /* Check contiguous length and gap to next section (if any) */ nrs = RB_NEXT(revoked_serial_tree, &rc->revoked_serials, rs); @@ -928,8 +932,9 @@ ssh_krl_from_blob(Buffer *buf, struct ss } format_timestamp(krl->generated_date, timestamp, sizeof(timestamp)); - debug("KRL version %llu generated at %s%s%s", krl->krl_version, - timestamp, *krl->comment ? ": " : "", krl->comment); + debug("KRL version %llu generated at %s%s%s", + (unsigned long long)krl->krl_version, timestamp, + *krl->comment ? ": " : "", krl->comment); /* * 1st pass: verify signatures, if any. This is done to avoid From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 11:44:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0AB88FE8; Tue, 2 Apr 2013 11:44:57 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F124AD2D; Tue, 2 Apr 2013 11:44:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32Biue2072738; Tue, 2 Apr 2013 11:44:56 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32BiuWx072734; Tue, 2 Apr 2013 11:44:56 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304021144.r32BiuWx072734@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Tue, 2 Apr 2013 11:44:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249016 - head/crypto/openssh 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, 02 Apr 2013 11:44:57 -0000 Author: des Date: Tue Apr 2 11:44:55 2013 New Revision: 249016 URL: http://svnweb.freebsd.org/changeset/base/249016 Log: Merge upstream patch to silence spurious "no such identity file" warnings. Modified: head/crypto/openssh/readconf.c head/crypto/openssh/readconf.h head/crypto/openssh/ssh.c head/crypto/openssh/sshconnect2.c Directory Properties: head/crypto/openssh/ (props changed) Modified: head/crypto/openssh/readconf.c ============================================================================== --- head/crypto/openssh/readconf.c Tue Apr 2 11:42:39 2013 (r249015) +++ head/crypto/openssh/readconf.c Tue Apr 2 11:44:55 2013 (r249016) @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.c,v 1.194 2011/09/23 07:45:05 markus Exp $ */ +/* $OpenBSD: readconf.c,v 1.195 2013/02/17 23:16:57 dtucker Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -356,6 +356,26 @@ clear_forwardings(Options *options) options->tun_open = SSH_TUNMODE_NO; } +void +add_identity_file(Options *options, const char *dir, const char *filename, + int userprovided) +{ + char *path; + + if (options->num_identity_files >= SSH_MAX_IDENTITY_FILES) + fatal("Too many identity files specified (max %d)", + SSH_MAX_IDENTITY_FILES); + + if (dir == NULL) /* no dir, filename is absolute */ + path = xstrdup(filename); + else + (void)xasprintf(&path, "%.100s%.100s", dir, filename); + + options->identity_file_userprovided[options->num_identity_files] = + userprovided; + options->identity_files[options->num_identity_files++] = path; +} + /* * Returns the number of the token pointed to by cp or oBadOption. */ @@ -616,9 +636,7 @@ parse_yesnoask: if (*intptr >= SSH_MAX_IDENTITY_FILES) fatal("%.200s line %d: Too many identity files specified (max %d).", filename, linenum, SSH_MAX_IDENTITY_FILES); - charptr = &options->identity_files[*intptr]; - *charptr = xstrdup(arg); - *intptr = *intptr + 1; + add_identity_file(options, NULL, arg, 1); } break; Modified: head/crypto/openssh/readconf.h ============================================================================== --- head/crypto/openssh/readconf.h Tue Apr 2 11:42:39 2013 (r249015) +++ head/crypto/openssh/readconf.h Tue Apr 2 11:44:55 2013 (r249016) @@ -1,4 +1,4 @@ -/* $OpenBSD: readconf.h,v 1.91 2011/09/23 07:45:05 markus Exp $ */ +/* $OpenBSD: readconf.h,v 1.92 2013/02/17 23:16:57 dtucker Exp $ */ /* $FreeBSD$ */ /* @@ -97,6 +97,7 @@ typedef struct { int num_identity_files; /* Number of files for RSA/DSA identities. */ char *identity_files[SSH_MAX_IDENTITY_FILES]; + int identity_file_userprovided[SSH_MAX_IDENTITY_FILES]; Key *identity_keys[SSH_MAX_IDENTITY_FILES]; /* Local TCP/IP forward requests. */ @@ -172,5 +173,6 @@ process_config_line(Options *, const cha void add_local_forward(Options *, const Forward *); void add_remote_forward(Options *, const Forward *); +void add_identity_file(Options *, const char *, const char *, int); #endif /* READCONF_H */ Modified: head/crypto/openssh/ssh.c ============================================================================== --- head/crypto/openssh/ssh.c Tue Apr 2 11:42:39 2013 (r249015) +++ head/crypto/openssh/ssh.c Tue Apr 2 11:44:55 2013 (r249016) @@ -1,4 +1,4 @@ -/* $OpenBSD: ssh.c,v 1.370 2012/07/06 01:47:38 djm Exp $ */ +/* $OpenBSD: ssh.c,v 1.371 2013/02/17 23:16:57 dtucker Exp $ */ /* $FreeBSD$ */ /* * Author: Tatu Ylonen @@ -407,12 +407,7 @@ main(int ac, char **av) strerror(errno)); break; } - if (options.num_identity_files >= - SSH_MAX_IDENTITY_FILES) - fatal("Too many identity files specified " - "(max %d)", SSH_MAX_IDENTITY_FILES); - options.identity_files[options.num_identity_files++] = - xstrdup(optarg); + add_identity_file(&options, NULL, optarg, 1); break; case 'I': #ifdef ENABLE_PKCS11 Modified: head/crypto/openssh/sshconnect2.c ============================================================================== --- head/crypto/openssh/sshconnect2.c Tue Apr 2 11:42:39 2013 (r249015) +++ head/crypto/openssh/sshconnect2.c Tue Apr 2 11:44:55 2013 (r249016) @@ -1,4 +1,4 @@ -/* $OpenBSD: sshconnect2.c,v 1.191 2013/02/15 00:21:01 dtucker Exp $ */ +/* $OpenBSD: sshconnect2.c,v 1.192 2013/02/17 23:16:57 dtucker Exp $ */ /* $FreeBSD$ */ /* * Copyright (c) 2000 Markus Friedl. All rights reserved. @@ -1418,7 +1418,7 @@ pubkey_prepare(Authctxt *authctxt) id = xcalloc(1, sizeof(*id)); id->key = key; id->filename = xstrdup(options.identity_files[i]); - id->userprovided = 1; + id->userprovided = options.identity_file_userprovided[i]; TAILQ_INSERT_TAIL(&files, id, next); } /* Prefer PKCS11 keys that are explicitly listed */ From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 12:22:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D7E18B08; Tue, 2 Apr 2013 12:22:44 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CA492EE4; Tue, 2 Apr 2013 12:22:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32CMiFF084208; Tue, 2 Apr 2013 12:22:44 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32CMiq8084207; Tue, 2 Apr 2013 12:22:44 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304021222.r32CMiq8084207@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 12:22:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249019 - 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: Tue, 02 Apr 2013 12:22:44 -0000 Author: trasz Date: Tue Apr 2 12:22:44 2013 New Revision: 249019 URL: http://svnweb.freebsd.org/changeset/base/249019 Log: Fix comment formatting. Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Tue Apr 2 11:48:06 2013 (r249018) +++ head/sys/cam/ctl/ctl.c Tue Apr 2 12:22:44 2013 (r249019) @@ -92,9 +92,9 @@ struct ctl_softc *control_softc = NULL; #define CTL_DONE_THREAD /* - * * Use the serial number and device ID provided by the backend, rather than - * * making up our own. - * */ + * Use the serial number and device ID provided by the backend, rather than + * making up our own. + */ #define CTL_USE_BACKEND_SN /* @@ -7893,7 +7893,7 @@ ctl_persistent_reserve_out(struct ctl_sc return (CTL_RETVAL_COMPLETE); } } else if ((cdb->action & SPRO_ACTION_MASK) != SPRO_REGISTER) { - /* + /* * We are not registered */ mtx_unlock(&softc->ctl_lock); From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 12:40:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 085E7FFA; Tue, 2 Apr 2013 12:40:02 +0000 (UTC) (envelope-from eadler@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D6D46FA9; Tue, 2 Apr 2013 12:40:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32Ce1SE088108; Tue, 2 Apr 2013 12:40:01 GMT (envelope-from eadler@svn.freebsd.org) Received: (from eadler@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32Ce1wi088106; Tue, 2 Apr 2013 12:40:01 GMT (envelope-from eadler@svn.freebsd.org) Message-Id: <201304021240.r32Ce1wi088106@svn.freebsd.org> From: Eitan Adler Date: Tue, 2 Apr 2013 12:40:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249020 - in head/share/man: man5 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: Tue, 02 Apr 2013 12:40:02 -0000 Author: eadler Date: Tue Apr 2 12:40:01 2013 New Revision: 249020 URL: http://svnweb.freebsd.org/changeset/base/249020 Log: Remove obsolete references to sysinstall. This change is not intended for MFC. PR: docs/177570 Submitted by: Garrett Cooper (partial) Approved by: bcr (mentor) Modified: head/share/man/man5/rc.conf.5 head/share/man/man7/hier.7 Modified: head/share/man/man5/rc.conf.5 ============================================================================== --- head/share/man/man5/rc.conf.5 Tue Apr 2 12:22:44 2013 (r249019) +++ head/share/man/man5/rc.conf.5 Tue Apr 2 12:40:01 2013 (r249020) @@ -38,8 +38,7 @@ details for any potential network interf started up at system initial boot time. In new installations, the .Nm -file is generally initialized by the system installation utility, -.Xr sysinstall 8 . +file is generally initialized by the system installation utility. .Pp The purpose of .Nm @@ -2452,10 +2451,6 @@ This command is intended to synchronize the system clock only .Em once from some standard reference. -An option to set this up initially -(from a list of known servers) is also provided by the -.Xr sysinstall 8 -program when the system is first installed. .It Va ntpdate_config .Pq Vt str Configuration file for Modified: head/share/man/man7/hier.7 ============================================================================== --- head/share/man/man7/hier.7 Tue Apr 2 12:22:44 2013 (r249019) +++ head/share/man/man7/hier.7 Tue Apr 2 12:40:01 2013 (r249020) @@ -62,16 +62,12 @@ see .El .It Pa /cdrom/ default mount point for CD-ROM drives -(created by -.Xr sysinstall 8 ) .It Pa /compat/ normally a link to .Pa /usr/compat . If not, then the .Pa /usr/compat comments apply -(created by -.Xr sysinstall 8 ) .It Pa /dev/ device special files managed by .Xr devfs 5 @@ -84,9 +80,6 @@ see .It Pa net/ network devices .El -.It Pa /dist/ -mount point used by -.Xr sysinstall 8 .It Pa /etc/ system configuration files and scripts .Pp @@ -190,8 +183,6 @@ common utilities, programming tools, and .It Pa compat/ files needed to support binary compatibility with other operating systems, such as Linux -(created by -.Xr sysinstall 8 ) .It Pa games/ useful and semi-frivolous programs .It Pa include/ From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 13:44:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5473ACB9; Tue, 2 Apr 2013 13:44:53 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by mx1.freebsd.org (Postfix) with ESMTP id 14291360; Tue, 2 Apr 2013 13:44:53 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id bj3so302661pad.34 for ; Tue, 02 Apr 2013 06:44:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:x-mailer:from:subject:date :to; bh=wCgrFvoHGBMF98GjvrC0qgeuCbHGc7KJwRAPZdj5RLg=; b=fRotJpPmgPeayJzmi5IfaJ3n6um3uR/SsVbUtND0veUOsXoyvq/e3zhqPHbUqGgam7 6GDgmCfmvEnB5MaGd2jHEYFUNtiOedQHBthnO7Y5JLkccBALWT9GiInquHYwWFiVwAaV do4r+D/Mn9ch12H3ZY1d27ZQOm92T8mZ3ClFulZYdLiO3cSg64p5eMOFRPnN/tBb+Df1 YaNPuT/lH+4xYqDMhzwHs/VG6kBmXGnl3idPAfWFVm1pwG5KAzW3I2DwaKYrOHh1CFxj 3aCtXBxH0TffGF/tDveDNDp39h4a+udBn5ZyLqfy4NdUyc7QfcdrEVtXsXpq5uAaFY7o kvLw== X-Received: by 10.66.25.147 with SMTP id c19mr24864035pag.207.1364910292583; Tue, 02 Apr 2013 06:44:52 -0700 (PDT) Received: from [192.168.20.12] (c-24-19-191-56.hsd1.wa.comcast.net. [24.19.191.56]) by mx.google.com with ESMTPS id wm3sm1849457pbc.4.2013.04.02.06.44.51 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 02 Apr 2013 06:44:51 -0700 (PDT) References: <201304021240.r32Ce1wi088106@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201304021240.r32Ce1wi088106@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: <602ABB23-1C3E-4049-A8E3-164CD6A01253@gmail.com> X-Mailer: iPhone Mail (10B329) From: Garrett Cooper Subject: Re: svn commit: r249020 - in head/share/man: man5 man7 Date: Tue, 2 Apr 2013 06:44:50 -0700 To: Eitan Adler 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, 02 Apr 2013 13:44:53 -0000 /cdrom isn't created by bsdinstall nowadays.. Otherwise, looks good :)! Thanks! -Garrett Sent from my iPhone On Apr 2, 2013, at 5:40 AM, Eitan Adler wrote: > Author: eadler > Date: Tue Apr 2 12:40:01 2013 > New Revision: 249020 > URL: http://svnweb.freebsd.org/changeset/base/249020 >=20 > Log: > Remove obsolete references to sysinstall. >=20 > This change is not intended for MFC. >=20 > PR: docs/177570 > Submitted by: Garrett Cooper (partial) > Approved by: bcr (mentor) >=20 > Modified: > head/share/man/man5/rc.conf.5 > head/share/man/man7/hier.7 >=20 > Modified: head/share/man/man5/rc.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 > --- head/share/man/man5/rc.conf.5 Tue Apr 2 12:22:44 2013 (r249019)= > +++ head/share/man/man5/rc.conf.5 Tue Apr 2 12:40:01 2013 (r249020)= > @@ -38,8 +38,7 @@ details for any potential network interf > started up at system initial boot time. > In new installations, the > .Nm > -file is generally initialized by the system installation utility, > -.Xr sysinstall 8 . > +file is generally initialized by the system installation utility. > .Pp > The purpose of > .Nm > @@ -2452,10 +2451,6 @@ This command is intended to > synchronize the system clock only > .Em once > from some standard reference. > -An option to set this up initially > -(from a list of known servers) is also provided by the > -.Xr sysinstall 8 > -program when the system is first installed. > .It Va ntpdate_config > .Pq Vt str > Configuration file for >=20 > Modified: head/share/man/man7/hier.7 > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=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/man/man7/hier.7 Tue Apr 2 12:22:44 2013 (r249019) > +++ head/share/man/man7/hier.7 Tue Apr 2 12:40:01 2013 (r249020) > @@ -62,16 +62,12 @@ see > .El > .It Pa /cdrom/ > default mount point for CD-ROM drives > -(created by > -.Xr sysinstall 8 ) > .It Pa /compat/ > normally a link to > .Pa /usr/compat . > If not, then the > .Pa /usr/compat > comments apply > -(created by > -.Xr sysinstall 8 ) > .It Pa /dev/ > device special files managed by > .Xr devfs 5 > @@ -84,9 +80,6 @@ see > .It Pa net/ > network devices > .El > -.It Pa /dist/ > -mount point used by > -.Xr sysinstall 8 > .It Pa /etc/ > system configuration files and scripts > .Pp > @@ -190,8 +183,6 @@ common utilities, programming tools, and > .It Pa compat/ > files needed to support binary compatibility with other operating systems,= > such as Linux > -(created by > -.Xr sysinstall 8 ) > .It Pa games/ > useful and semi-frivolous programs > .It Pa include/ > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 13:52:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5B3D02E6; Tue, 2 Apr 2013 13:52:10 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4DC4E3E5; Tue, 2 Apr 2013 13:52:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32DqAOL010959; Tue, 2 Apr 2013 13:52:10 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32DqAOH010958; Tue, 2 Apr 2013 13:52:10 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304021352.r32DqAOH010958@svn.freebsd.org> From: Gleb Smirnoff Date: Tue, 2 Apr 2013 13:52:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249022 - head/sys/modules/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: Tue, 02 Apr 2013 13:52:10 -0000 Author: glebius Date: Tue Apr 2 13:52:09 2013 New Revision: 249022 URL: http://svnweb.freebsd.org/changeset/base/249022 Log: - Remove extra $FreeBSD$ - Touch options headers to make module buildable. Reviewed by: trasz Modified: head/sys/modules/ctl/Makefile Modified: head/sys/modules/ctl/Makefile ============================================================================== --- head/sys/modules/ctl/Makefile Tue Apr 2 13:42:20 2013 (r249021) +++ head/sys/modules/ctl/Makefile Tue Apr 2 13:52:09 2013 (r249022) @@ -1,7 +1,5 @@ # $FreeBSD$ -# $FreeBSD$ - .PATH: ${.CURDIR}/../../cam/ctl KMOD= ctl @@ -22,5 +20,8 @@ SRCS+= scsi_ctl.c SRCS+= bus_if.h SRCS+= device_if.h SRCS+= vnode_if.h +SRCS+= opt_cam.h +SRCS+= opt_ctl.h +SRCS+= opt_kdtrace.h .include From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 14:10:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 520E8BD1; Tue, 2 Apr 2013 14:10:23 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 44BB66B1; Tue, 2 Apr 2013 14:10:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32EANoj016766; Tue, 2 Apr 2013 14:10:23 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32EANZf016765; Tue, 2 Apr 2013 14:10:23 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201304021410.r32EANZf016765@svn.freebsd.org> From: Devin Teske Date: Tue, 2 Apr 2013 14:10:23 +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: r249023 - stable/8/usr.sbin/sysinstall 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, 02 Apr 2013 14:10:23 -0000 Author: dteske Date: Tue Apr 2 14:10:22 2013 New Revision: 249023 URL: http://svnweb.freebsd.org/changeset/base/249023 Log: Oops, r240972 (Add DEBUG kernel distribution) forgot to make said distribution optional (such as the long-standing "local" distribution; also optional). This fixes a regression in the install process when the user selects "All" as the distribution-set. This is a direct commit to stable/8. PR: bin/177309 Reviewed by: eadler Modified: stable/8/usr.sbin/sysinstall/dist.c Modified: stable/8/usr.sbin/sysinstall/dist.c ============================================================================== --- stable/8/usr.sbin/sysinstall/dist.c Tue Apr 2 13:52:09 2013 (r249022) +++ stable/8/usr.sbin/sysinstall/dist.c Tue Apr 2 14:10:22 2013 (r249023) @@ -756,7 +756,9 @@ distExtract(char *parent, Distribution * &me[i] == BASE_DIST); if (!status) { dialog_clear_norefresh(); - if (me[i].my_bit != DIST_LOCAL) { + if (me[i].my_bit != DIST_LOCAL && + me[i].my_bit != DIST_KERNEL_DEBUG) + { status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n" "Do you want to try to retrieve it again?", me[i].my_name, mediaDevice->name); @@ -767,7 +769,7 @@ distExtract(char *parent, Distribution * status = FALSE; } else { - // ignore any failures with DIST_LOCAL + // ignore any failures with DIST_LOCAL/_KERNEL_DEBUG status = TRUE; } } @@ -906,8 +908,8 @@ distExtractAll(dialogMenuItem *self) if ((old_dists & DIST_KERNEL) && !(Dists & DIST_KERNEL)) status |= installFixupKernel(self, old_kernel); - /* Clear any local dist flags now */ - Dists &= ~DIST_LOCAL; + /* Clear any optional dist flags now */ + Dists &= ~(DIST_LOCAL|DIST_KERNEL_DEBUG); if (Dists) { int col = 0; From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 16:34:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 59630C7; Tue, 2 Apr 2013 16:34:20 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id 3688FECF; Tue, 2 Apr 2013 16:34:20 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 95B11B968; Tue, 2 Apr 2013 12:34:19 -0400 (EDT) From: John Baldwin To: Kevin Lo Subject: Re: svn commit: r248997 - head/sys/conf Date: Tue, 2 Apr 2013 12:34:00 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201304020557.r325vbnA069100@svn.freebsd.org> In-Reply-To: <201304020557.r325vbnA069100@svn.freebsd.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <201304021234.00772.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 02 Apr 2013 12:34:19 -0400 (EDT) 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, 02 Apr 2013 16:34:20 -0000 On Tuesday, April 02, 2013 1:57:37 am Kevin Lo wrote: > Author: kevlo > Date: Tue Apr 2 05:57:36 2013 > New Revision: 248997 > URL: http://svnweb.freebsd.org/changeset/base/248997 > > Log: > Add VIMAGE to NOTES. > > Reviewed by: zec > > Modified: > head/sys/conf/NOTES Hmm, we've intentionally not done that to date (see how x86 conf Makefiles create separate LINT-VIMAGE configs). It might be good to keep these but comment them out? We need to build both LINTS to get good coverage. Also, I thought VIMAGE wasn't known to be buildable on non-x86? -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 16:49:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 176AC629; Tue, 2 Apr 2013 16:49:50 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 09BE9F6E; Tue, 2 Apr 2013 16:49:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32GnncK062270; Tue, 2 Apr 2013 16:49:49 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32GnnV5062269; Tue, 2 Apr 2013 16:49:49 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304021649.r32GnnV5062269@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 2 Apr 2013 16:49:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249025 - 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: Tue, 02 Apr 2013 16:49:50 -0000 Author: ken Date: Tue Apr 2 16:49:49 2013 New Revision: 249025 URL: http://svnweb.freebsd.org/changeset/base/249025 Log: Add support for XPT_CONT_TARGET_IO CCBs in _bus_dmamap_load_ccb(). Declare CCB types in their respective switch blocks. Sponsored by: Spectra Logic Modified: head/sys/kern/subr_bus_dma.c Modified: head/sys/kern/subr_bus_dma.c ============================================================================== --- head/sys/kern/subr_bus_dma.c Tue Apr 2 14:27:44 2013 (r249024) +++ head/sys/kern/subr_bus_dma.c Tue Apr 2 16:49:49 2013 (r249025) @@ -158,8 +158,6 @@ static int _bus_dmamap_load_ccb(bus_dma_tag_t dmat, bus_dmamap_t map, union ccb *ccb, int *nsegs, int flags) { - struct ccb_ataio *ataio; - struct ccb_scsiio *csio; struct ccb_hdr *ccb_h; void *data_ptr; int error; @@ -169,18 +167,33 @@ _bus_dmamap_load_ccb(bus_dma_tag_t dmat, error = 0; ccb_h = &ccb->ccb_h; switch (ccb_h->func_code) { - case XPT_SCSI_IO: + case XPT_SCSI_IO: { + struct ccb_scsiio *csio; + csio = &ccb->csio; data_ptr = csio->data_ptr; dxfer_len = csio->dxfer_len; sglist_cnt = csio->sglist_cnt; break; - case XPT_ATA_IO: + } + case XPT_CONT_TARGET_IO: { + struct ccb_scsiio *ctio; + + ctio = &ccb->ctio; + data_ptr = ctio->data_ptr; + dxfer_len = ctio->dxfer_len; + sglist_cnt = ctio->sglist_cnt; + break; + } + case XPT_ATA_IO: { + struct ccb_ataio *ataio; + ataio = &ccb->ataio; data_ptr = ataio->data_ptr; dxfer_len = ataio->dxfer_len; sglist_cnt = 0; break; + } default: panic("_bus_dmamap_load_ccb: Unsupported func code %d", ccb_h->func_code); From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 16:50:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EBDC07B2; Tue, 2 Apr 2013 16:50:50 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DEDDCF82; Tue, 2 Apr 2013 16:50:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32Goo03064020; Tue, 2 Apr 2013 16:50:50 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32GooXp064019; Tue, 2 Apr 2013 16:50:50 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304021650.r32GooXp064019@svn.freebsd.org> From: Edward Tomasz Napierala Date: Tue, 2 Apr 2013 16:50:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249026 - 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: Tue, 02 Apr 2013 16:50:51 -0000 Author: trasz Date: Tue Apr 2 16:50:50 2013 New Revision: 249026 URL: http://svnweb.freebsd.org/changeset/base/249026 Log: Don't directly dereference userland pointer; instead use kernel pointer copied in from userspace. This fixes instant panic when creating CTL LUN on sparc64. Not a security problem, since the API is root-only. Reviewed by: ken Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Tue Apr 2 16:49:49 2013 (r249025) +++ head/sys/cam/ctl/ctl_backend_block.c Tue Apr 2 16:50:50 2013 (r249026) @@ -1658,7 +1658,7 @@ ctl_be_block_create(struct ctl_be_block_ if (be_lun->ctl_be_lun.lun_type == T_DIRECT) { for (i = 0; i < req->num_be_args; i++) { - if (strcmp(req->kern_be_args[i].name, "file") == 0) { + if (strcmp(req->kern_be_args[i].kname, "file") == 0) { file_arg = &req->kern_be_args[i]; break; } @@ -1673,7 +1673,7 @@ ctl_be_block_create(struct ctl_be_block_ be_lun->dev_path = malloc(file_arg->vallen, M_CTLBLK, M_WAITOK | M_ZERO); - strlcpy(be_lun->dev_path, (char *)file_arg->value, + strlcpy(be_lun->dev_path, (char *)file_arg->kvalue, file_arg->vallen); retval = ctl_be_block_open(softc, be_lun, req); @@ -1712,7 +1712,7 @@ ctl_be_block_create(struct ctl_be_block_ * the loop above, */ for (i = 0; i < req->num_be_args; i++) { - if (strcmp(req->kern_be_args[i].name, "num_threads") == 0) { + if (strcmp(req->kern_be_args[i].kname, "num_threads") == 0) { struct ctl_be_arg *thread_arg; char num_thread_str[16]; int tmp_num_threads; @@ -1720,7 +1720,7 @@ ctl_be_block_create(struct ctl_be_block_ thread_arg = &req->kern_be_args[i]; - strlcpy(num_thread_str, (char *)thread_arg->value, + strlcpy(num_thread_str, (char *)thread_arg->kvalue, min(thread_arg->vallen, sizeof(num_thread_str))); From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 17:11:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 61E3C163; Tue, 2 Apr 2013 17:11:08 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 54C6A16C; Tue, 2 Apr 2013 17:11:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32HB8fj069955; Tue, 2 Apr 2013 17:11:08 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32HB8m6069954; Tue, 2 Apr 2013 17:11:08 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201304021711.r32HB8m6069954@svn.freebsd.org> From: Devin Teske Date: Tue, 2 Apr 2013 17:11:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249027 - releng/8.4/usr.sbin/sysinstall 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: Tue, 02 Apr 2013 17:11:08 -0000 Author: dteske Date: Tue Apr 2 17:11:07 2013 New Revision: 249027 URL: http://svnweb.freebsd.org/changeset/base/249027 Log: MFS8 r249023: Oops, r240972 (Add DEBUG kernel distribution) forgot to make said distribution optional (such as the long-standing "local" distribution; also optional). This fixes a regression in the install process when the user selects "All" as the distribution-set. This is a direct commit to stable/8. PR: bin/177309 Reviewed by: eadler Approved by: re (glebius) Modified: releng/8.4/usr.sbin/sysinstall/dist.c Directory Properties: releng/8.4/usr.sbin/sysinstall/ (props changed) Modified: releng/8.4/usr.sbin/sysinstall/dist.c ============================================================================== --- releng/8.4/usr.sbin/sysinstall/dist.c Tue Apr 2 16:50:50 2013 (r249026) +++ releng/8.4/usr.sbin/sysinstall/dist.c Tue Apr 2 17:11:07 2013 (r249027) @@ -756,7 +756,9 @@ distExtract(char *parent, Distribution * &me[i] == BASE_DIST); if (!status) { dialog_clear_norefresh(); - if (me[i].my_bit != DIST_LOCAL) { + if (me[i].my_bit != DIST_LOCAL && + me[i].my_bit != DIST_KERNEL_DEBUG) + { status = msgYesNo("Unable to transfer the %s distribution from\n%s.\n\n" "Do you want to try to retrieve it again?", me[i].my_name, mediaDevice->name); @@ -767,7 +769,7 @@ distExtract(char *parent, Distribution * status = FALSE; } else { - // ignore any failures with DIST_LOCAL + // ignore any failures with DIST_LOCAL/_KERNEL_DEBUG status = TRUE; } } @@ -906,8 +908,8 @@ distExtractAll(dialogMenuItem *self) if ((old_dists & DIST_KERNEL) && !(Dists & DIST_KERNEL)) status |= installFixupKernel(self, old_kernel); - /* Clear any local dist flags now */ - Dists &= ~DIST_LOCAL; + /* Clear any optional dist flags now */ + Dists &= ~(DIST_LOCAL|DIST_KERNEL_DEBUG); if (Dists) { int col = 0; From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 17:29:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2E8D37EA; Tue, 2 Apr 2013 17:29:18 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2135028A; Tue, 2 Apr 2013 17:29:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32HTH85073870; Tue, 2 Apr 2013 17:29:17 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32HTHAw073869; Tue, 2 Apr 2013 17:29:17 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304021729.r32HTHAw073869@svn.freebsd.org> From: "Kenneth D. Merry" Date: Tue, 2 Apr 2013 17:29:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249028 - 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: Tue, 02 Apr 2013 17:29:18 -0000 Author: ken Date: Tue Apr 2 17:29:17 2013 New Revision: 249028 URL: http://svnweb.freebsd.org/changeset/base/249028 Log: Fix sending virtual scatter/gather lists from the CTL CAM frontend peripheral. Sponsored by: Spectra Logic Modified: head/sys/cam/ctl/scsi_ctl.c Modified: head/sys/cam/ctl/scsi_ctl.c ============================================================================== --- head/sys/cam/ctl/scsi_ctl.c Tue Apr 2 17:11:07 2013 (r249027) +++ head/sys/cam/ctl/scsi_ctl.c Tue Apr 2 17:29:17 2013 (r249028) @@ -916,7 +916,7 @@ ctlfestart(struct cam_periph *periph, un if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) flags |= CAM_DATA_SG_PADDR; else - flags &= ~CAM_DATA_SG; + flags |= CAM_DATA_SG; data_ptr = (uint8_t *)cam_sglist; dxfer_len = io->scsiio.kern_data_len; } else { @@ -938,6 +938,10 @@ ctlfestart(struct cam_periph *periph, un data_ptr = sglist[*ti].addr; dxfer_len = sglist[*ti].len; csio->sglist_cnt = 0; + if (io->io_hdr.flags & CTL_FLAG_BUS_ADDR) + flags |= CAM_DATA_PADDR; + else + flags |= CAM_DATA_VADDR; cmd_info->flags |= CTLFE_CMD_PIECEWISE; (*ti)++; } From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 17:34:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7B547AAD; Tue, 2 Apr 2013 17:34:49 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6A8502E9; Tue, 2 Apr 2013 17:34:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32HYnGh076276; Tue, 2 Apr 2013 17:34:49 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32HYgxX076233; Tue, 2 Apr 2013 17:34:42 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304021734.r32HYgxX076233@svn.freebsd.org> From: Xin LI Date: Tue, 2 Apr 2013 17:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249029 - in releng: 8.3 8.3/crypto/openssl 8.3/crypto/openssl/apps 8.3/crypto/openssl/crypto 8.3/crypto/openssl/crypto/asn1 8.3/crypto/openssl/crypto/bio 8.3/crypto/openssl/crypto/bn 8... 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: Tue, 02 Apr 2013 17:34:49 -0000 Author: delphij Date: Tue Apr 2 17:34:42 2013 New Revision: 249029 URL: http://svnweb.freebsd.org/changeset/base/249029 Log: Fix OpenSSL multiple vulnerabilities. [13:03] Fix BIND remote denial of service. [13:04] Security: CVE-2013-0166, CVE-2013-0169 Security: FreeBSD-SA-13:03.openssl Security: CVE-2013-2266 Security: FreeBSD-SA-13:04.bind Approved by: so Added: releng/8.3/crypto/openssl/ssl/s3_cbc.c releng/9.0/crypto/openssl/ssl/s3_cbc.c releng/9.1/crypto/openssl/ssl/s3_cbc.c Modified: releng/8.3/UPDATING releng/8.3/crypto/openssl/CHANGES releng/8.3/crypto/openssl/Configure releng/8.3/crypto/openssl/FAQ releng/8.3/crypto/openssl/LICENSE releng/8.3/crypto/openssl/Makefile releng/8.3/crypto/openssl/NEWS releng/8.3/crypto/openssl/README releng/8.3/crypto/openssl/apps/apps.c releng/8.3/crypto/openssl/apps/asn1pars.c releng/8.3/crypto/openssl/apps/cms.c releng/8.3/crypto/openssl/apps/dhparam.c releng/8.3/crypto/openssl/apps/openssl.cnf releng/8.3/crypto/openssl/apps/pkcs12.c releng/8.3/crypto/openssl/apps/s_client.c releng/8.3/crypto/openssl/apps/s_server.c releng/8.3/crypto/openssl/apps/x509.c releng/8.3/crypto/openssl/config releng/8.3/crypto/openssl/crypto/asn1/a_object.c releng/8.3/crypto/openssl/crypto/asn1/a_strex.c releng/8.3/crypto/openssl/crypto/asn1/a_strnid.c releng/8.3/crypto/openssl/crypto/asn1/a_verify.c releng/8.3/crypto/openssl/crypto/asn1/asn1.h releng/8.3/crypto/openssl/crypto/asn1/asn_mime.c releng/8.3/crypto/openssl/crypto/asn1/x_name.c releng/8.3/crypto/openssl/crypto/asn1/x_pubkey.c releng/8.3/crypto/openssl/crypto/bio/bf_buff.c releng/8.3/crypto/openssl/crypto/bio/bio.h releng/8.3/crypto/openssl/crypto/bio/bss_dgram.c releng/8.3/crypto/openssl/crypto/bn/asm/mo-586.pl releng/8.3/crypto/openssl/crypto/bn/asm/ppc.pl releng/8.3/crypto/openssl/crypto/bn/bn_blind.c releng/8.3/crypto/openssl/crypto/bn/bn_gf2m.c releng/8.3/crypto/openssl/crypto/bn/bn_word.c releng/8.3/crypto/openssl/crypto/cms/cms.h releng/8.3/crypto/openssl/crypto/cms/cms_enc.c releng/8.3/crypto/openssl/crypto/cms/cms_env.c releng/8.3/crypto/openssl/crypto/cms/cms_io.c releng/8.3/crypto/openssl/crypto/cms/cms_lcl.h releng/8.3/crypto/openssl/crypto/cms/cms_smime.c releng/8.3/crypto/openssl/crypto/comp/c_rle.c releng/8.3/crypto/openssl/crypto/conf/conf_api.c releng/8.3/crypto/openssl/crypto/cryptlib.c releng/8.3/crypto/openssl/crypto/crypto.h releng/8.3/crypto/openssl/crypto/ec/ec2_smpl.c releng/8.3/crypto/openssl/crypto/ec/ec_key.c releng/8.3/crypto/openssl/crypto/ec/ecp_smpl.c releng/8.3/crypto/openssl/crypto/ecdsa/ecdsatest.c releng/8.3/crypto/openssl/crypto/ecdsa/ecs_ossl.c releng/8.3/crypto/openssl/crypto/evp/evp_test.c releng/8.3/crypto/openssl/crypto/o_init.c releng/8.3/crypto/openssl/crypto/ocsp/ocsp_lib.c releng/8.3/crypto/openssl/crypto/ocsp/ocsp_vfy.c releng/8.3/crypto/openssl/crypto/opensslv.h releng/8.3/crypto/openssl/crypto/perlasm/cbc.pl releng/8.3/crypto/openssl/crypto/pkcs7/pk7_smime.c releng/8.3/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl releng/8.3/crypto/openssl/crypto/rc4/rc4_skey.c releng/8.3/crypto/openssl/crypto/rsa/rsa_eay.c releng/8.3/crypto/openssl/crypto/rsa/rsa_oaep.c releng/8.3/crypto/openssl/crypto/symhacks.h releng/8.3/crypto/openssl/crypto/x509/x509_vfy.c releng/8.3/crypto/openssl/crypto/x509v3/v3_addr.c releng/8.3/crypto/openssl/crypto/x509v3/v3_asid.c releng/8.3/crypto/openssl/doc/HOWTO/proxy_certificates.txt releng/8.3/crypto/openssl/doc/apps/CA.pl.pod releng/8.3/crypto/openssl/doc/apps/ca.pod releng/8.3/crypto/openssl/doc/apps/dgst.pod releng/8.3/crypto/openssl/doc/crypto/engine.pod releng/8.3/crypto/openssl/doc/ssl/SSL_clear.pod releng/8.3/crypto/openssl/engines/e_capi.c releng/8.3/crypto/openssl/engines/e_capi_err.h releng/8.3/crypto/openssl/fips/fips_canister.c releng/8.3/crypto/openssl/openssl.spec releng/8.3/crypto/openssl/ssl/Makefile releng/8.3/crypto/openssl/ssl/bio_ssl.c releng/8.3/crypto/openssl/ssl/d1_both.c releng/8.3/crypto/openssl/ssl/d1_clnt.c releng/8.3/crypto/openssl/ssl/d1_enc.c releng/8.3/crypto/openssl/ssl/d1_lib.c releng/8.3/crypto/openssl/ssl/d1_pkt.c releng/8.3/crypto/openssl/ssl/d1_srvr.c releng/8.3/crypto/openssl/ssl/s2_clnt.c releng/8.3/crypto/openssl/ssl/s2_pkt.c releng/8.3/crypto/openssl/ssl/s2_srvr.c releng/8.3/crypto/openssl/ssl/s3_both.c releng/8.3/crypto/openssl/ssl/s3_clnt.c releng/8.3/crypto/openssl/ssl/s3_enc.c releng/8.3/crypto/openssl/ssl/s3_lib.c releng/8.3/crypto/openssl/ssl/s3_pkt.c releng/8.3/crypto/openssl/ssl/s3_srvr.c releng/8.3/crypto/openssl/ssl/ssl.h releng/8.3/crypto/openssl/ssl/ssl_ciph.c releng/8.3/crypto/openssl/ssl/ssl_err.c releng/8.3/crypto/openssl/ssl/ssl_lib.c releng/8.3/crypto/openssl/ssl/ssl_locl.h releng/8.3/crypto/openssl/ssl/t1_enc.c releng/8.3/crypto/openssl/ssl/t1_lib.c releng/8.3/crypto/openssl/util/fipslink.pl releng/8.3/crypto/openssl/util/libeay.num releng/8.3/crypto/openssl/util/mkerr.pl releng/8.3/crypto/openssl/util/pl/VC-32.pl releng/8.3/secure/lib/libcrypto/Makefile.inc releng/8.3/secure/lib/libssl/Makefile releng/8.3/sys/conf/newvers.sh releng/9.0/UPDATING releng/9.0/crypto/openssl/CHANGES releng/9.0/crypto/openssl/Configure releng/9.0/crypto/openssl/FAQ releng/9.0/crypto/openssl/LICENSE releng/9.0/crypto/openssl/Makefile releng/9.0/crypto/openssl/NEWS releng/9.0/crypto/openssl/README releng/9.0/crypto/openssl/apps/apps.c releng/9.0/crypto/openssl/apps/asn1pars.c releng/9.0/crypto/openssl/apps/cms.c releng/9.0/crypto/openssl/apps/dhparam.c releng/9.0/crypto/openssl/apps/openssl.cnf releng/9.0/crypto/openssl/apps/pkcs12.c releng/9.0/crypto/openssl/apps/s_client.c releng/9.0/crypto/openssl/apps/s_server.c releng/9.0/crypto/openssl/apps/x509.c releng/9.0/crypto/openssl/config releng/9.0/crypto/openssl/crypto/asn1/a_object.c releng/9.0/crypto/openssl/crypto/asn1/a_strex.c releng/9.0/crypto/openssl/crypto/asn1/a_strnid.c releng/9.0/crypto/openssl/crypto/asn1/a_verify.c releng/9.0/crypto/openssl/crypto/asn1/asn1.h releng/9.0/crypto/openssl/crypto/asn1/asn_mime.c releng/9.0/crypto/openssl/crypto/asn1/x_name.c releng/9.0/crypto/openssl/crypto/asn1/x_pubkey.c releng/9.0/crypto/openssl/crypto/bio/bf_buff.c releng/9.0/crypto/openssl/crypto/bio/bio.h releng/9.0/crypto/openssl/crypto/bio/bss_dgram.c releng/9.0/crypto/openssl/crypto/bn/asm/mo-586.pl releng/9.0/crypto/openssl/crypto/bn/asm/ppc.pl releng/9.0/crypto/openssl/crypto/bn/bn_blind.c releng/9.0/crypto/openssl/crypto/bn/bn_gf2m.c releng/9.0/crypto/openssl/crypto/bn/bn_word.c releng/9.0/crypto/openssl/crypto/cms/cms.h releng/9.0/crypto/openssl/crypto/cms/cms_enc.c releng/9.0/crypto/openssl/crypto/cms/cms_env.c releng/9.0/crypto/openssl/crypto/cms/cms_io.c releng/9.0/crypto/openssl/crypto/cms/cms_lcl.h releng/9.0/crypto/openssl/crypto/cms/cms_smime.c releng/9.0/crypto/openssl/crypto/comp/c_rle.c releng/9.0/crypto/openssl/crypto/conf/conf_api.c releng/9.0/crypto/openssl/crypto/cryptlib.c releng/9.0/crypto/openssl/crypto/crypto.h releng/9.0/crypto/openssl/crypto/ec/ec2_smpl.c releng/9.0/crypto/openssl/crypto/ec/ec_key.c releng/9.0/crypto/openssl/crypto/ec/ecp_smpl.c releng/9.0/crypto/openssl/crypto/ecdsa/ecdsatest.c releng/9.0/crypto/openssl/crypto/ecdsa/ecs_ossl.c releng/9.0/crypto/openssl/crypto/evp/evp_test.c releng/9.0/crypto/openssl/crypto/o_init.c releng/9.0/crypto/openssl/crypto/ocsp/ocsp_lib.c releng/9.0/crypto/openssl/crypto/ocsp/ocsp_vfy.c releng/9.0/crypto/openssl/crypto/opensslv.h releng/9.0/crypto/openssl/crypto/perlasm/cbc.pl releng/9.0/crypto/openssl/crypto/pkcs7/pk7_smime.c releng/9.0/crypto/openssl/crypto/rc4/asm/rc4-x86_64.pl releng/9.0/crypto/openssl/crypto/rc4/rc4_skey.c releng/9.0/crypto/openssl/crypto/rsa/rsa_eay.c releng/9.0/crypto/openssl/crypto/rsa/rsa_oaep.c releng/9.0/crypto/openssl/crypto/symhacks.h releng/9.0/crypto/openssl/crypto/x509/x509_vfy.c releng/9.0/crypto/openssl/crypto/x509v3/v3_addr.c releng/9.0/crypto/openssl/crypto/x509v3/v3_asid.c releng/9.0/crypto/openssl/doc/HOWTO/proxy_certificates.txt releng/9.0/crypto/openssl/doc/apps/CA.pl.pod releng/9.0/crypto/openssl/doc/apps/ca.pod releng/9.0/crypto/openssl/doc/apps/dgst.pod releng/9.0/crypto/openssl/doc/crypto/engine.pod releng/9.0/crypto/openssl/doc/ssl/SSL_clear.pod releng/9.0/crypto/openssl/engines/e_capi.c releng/9.0/crypto/openssl/engines/e_capi_err.h releng/9.0/crypto/openssl/fips/fips_canister.c releng/9.0/crypto/openssl/openssl.spec releng/9.0/crypto/openssl/ssl/Makefile releng/9.0/crypto/openssl/ssl/bio_ssl.c releng/9.0/crypto/openssl/ssl/d1_both.c releng/9.0/crypto/openssl/ssl/d1_clnt.c releng/9.0/crypto/openssl/ssl/d1_enc.c releng/9.0/crypto/openssl/ssl/d1_lib.c releng/9.0/crypto/openssl/ssl/d1_pkt.c releng/9.0/crypto/openssl/ssl/d1_srvr.c releng/9.0/crypto/openssl/ssl/s2_clnt.c releng/9.0/crypto/openssl/ssl/s2_pkt.c releng/9.0/crypto/openssl/ssl/s2_srvr.c releng/9.0/crypto/openssl/ssl/s3_both.c releng/9.0/crypto/openssl/ssl/s3_clnt.c releng/9.0/crypto/openssl/ssl/s3_enc.c releng/9.0/crypto/openssl/ssl/s3_lib.c releng/9.0/crypto/openssl/ssl/s3_pkt.c releng/9.0/crypto/openssl/ssl/s3_srvr.c releng/9.0/crypto/openssl/ssl/ssl.h releng/9.0/crypto/openssl/ssl/ssl_ciph.c releng/9.0/crypto/openssl/ssl/ssl_err.c releng/9.0/crypto/openssl/ssl/ssl_lib.c releng/9.0/crypto/openssl/ssl/ssl_locl.h releng/9.0/crypto/openssl/ssl/t1_enc.c releng/9.0/crypto/openssl/ssl/t1_lib.c releng/9.0/crypto/openssl/util/fipslink.pl releng/9.0/crypto/openssl/util/libeay.num releng/9.0/crypto/openssl/util/mkerr.pl releng/9.0/crypto/openssl/util/pl/VC-32.pl releng/9.0/lib/bind/config.h releng/9.0/secure/lib/libcrypto/Makefile.inc releng/9.0/secure/lib/libssl/Makefile releng/9.0/sys/conf/newvers.sh releng/9.1/UPDATING releng/9.1/crypto/openssl/CHANGES releng/9.1/crypto/openssl/Configure releng/9.1/crypto/openssl/FAQ releng/9.1/crypto/openssl/Makefile releng/9.1/crypto/openssl/NEWS releng/9.1/crypto/openssl/README releng/9.1/crypto/openssl/apps/Makefile releng/9.1/crypto/openssl/apps/apps.c releng/9.1/crypto/openssl/apps/dhparam.c releng/9.1/crypto/openssl/apps/s_server.c releng/9.1/crypto/openssl/crypto/asn1/a_strex.c releng/9.1/crypto/openssl/crypto/asn1/a_verify.c releng/9.1/crypto/openssl/crypto/asn1/x_pubkey.c releng/9.1/crypto/openssl/crypto/bn/bn_word.c releng/9.1/crypto/openssl/crypto/cryptlib.c releng/9.1/crypto/openssl/crypto/crypto.h releng/9.1/crypto/openssl/crypto/o_init.c releng/9.1/crypto/openssl/crypto/ocsp/ocsp_vfy.c releng/9.1/crypto/openssl/crypto/opensslv.h releng/9.1/crypto/openssl/crypto/rsa/rsa_oaep.c releng/9.1/crypto/openssl/crypto/symhacks.h releng/9.1/crypto/openssl/doc/apps/CA.pl.pod releng/9.1/crypto/openssl/engines/e_capi.c releng/9.1/crypto/openssl/openssl.spec releng/9.1/crypto/openssl/ssl/Makefile releng/9.1/crypto/openssl/ssl/d1_enc.c releng/9.1/crypto/openssl/ssl/d1_pkt.c releng/9.1/crypto/openssl/ssl/s2_clnt.c releng/9.1/crypto/openssl/ssl/s2_pkt.c releng/9.1/crypto/openssl/ssl/s3_both.c releng/9.1/crypto/openssl/ssl/s3_clnt.c releng/9.1/crypto/openssl/ssl/s3_enc.c releng/9.1/crypto/openssl/ssl/s3_pkt.c releng/9.1/crypto/openssl/ssl/s3_srvr.c releng/9.1/crypto/openssl/ssl/ssl.h releng/9.1/crypto/openssl/ssl/ssl_err.c releng/9.1/crypto/openssl/ssl/ssl_lib.c releng/9.1/crypto/openssl/ssl/ssl_locl.h releng/9.1/crypto/openssl/ssl/t1_enc.c releng/9.1/crypto/openssl/ssl/t1_lib.c releng/9.1/crypto/openssl/util/libeay.num releng/9.1/lib/bind/config.h releng/9.1/secure/lib/libcrypto/Makefile.inc releng/9.1/secure/lib/libssl/Makefile releng/9.1/sys/conf/newvers.sh Modified: releng/8.3/UPDATING ============================================================================== --- releng/8.3/UPDATING Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/UPDATING Tue Apr 2 17:34:42 2013 (r249029) @@ -15,6 +15,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8. debugging tools present in HEAD were left in place because sun4v support still needs work to become production ready. +20130402: p7 FreeBSD-SA-13:03.openssl + Fix multiple vulnerabilities in OpenSSL. + 20130218: p6 FreeBSD-SA-13:02.libc Fix Denial of Service vulnerability in libc's glob(3) functionality. Modified: releng/8.3/crypto/openssl/CHANGES ============================================================================== --- releng/8.3/crypto/openssl/CHANGES Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/CHANGES Tue Apr 2 17:34:42 2013 (r249029) @@ -2,6 +2,171 @@ OpenSSL CHANGES _______________ + Changes between 0.9.8x and 0.9.8y [5 Feb 2013] + + *) Make the decoding of SSLv3, TLS and DTLS CBC records constant time. + + This addresses the flaw in CBC record processing discovered by + Nadhem Alfardan and Kenny Paterson. Details of this attack can be found + at: http://www.isg.rhul.ac.uk/tls/ + + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and Adam Langley and + Emilia Käsper for the initial patch. + (CVE-2013-0169) + [Emilia Käsper, Adam Langley, Ben Laurie, Andy Polyakov, Steve Henson] + + *) Return an error when checking OCSP signatures when key is NULL. + This fixes a DoS attack. (CVE-2013-0166) + [Steve Henson] + + *) Call OCSP Stapling callback after ciphersuite has been chosen, so + the right response is stapled. Also change SSL_get_certificate() + so it returns the certificate actually sent. + See http://rt.openssl.org/Ticket/Display.html?id=2836. + (This is a backport) + [Rob Stradling ] + + *) Fix possible deadlock when decoding public keys. + [Steve Henson] + + Changes between 0.9.8w and 0.9.8x [10 May 2012] + + *) Sanity check record length before skipping explicit IV in DTLS + to fix DoS attack. + + Thanks to Codenomicon for discovering this issue using Fuzz-o-Matic + fuzzing as a service testing platform. + (CVE-2012-2333) + [Steve Henson] + + *) Initialise tkeylen properly when encrypting CMS messages. + Thanks to Solar Designer of Openwall for reporting this issue. + [Steve Henson] + + Changes between 0.9.8v and 0.9.8w [23 Apr 2012] + + *) The fix for CVE-2012-2110 did not take into account that the + 'len' argument to BUF_MEM_grow and BUF_MEM_grow_clean is an + int in OpenSSL 0.9.8, making it still vulnerable. Fix by + rejecting negative len parameter. (CVE-2012-2131) + [Tomas Hoger ] + + Changes between 0.9.8u and 0.9.8v [19 Apr 2012] + + *) Check for potentially exploitable overflows in asn1_d2i_read_bio + BUF_mem_grow and BUF_mem_grow_clean. Refuse attempts to shrink buffer + in CRYPTO_realloc_clean. + + Thanks to Tavis Ormandy, Google Security Team, for discovering this + issue and to Adam Langley for fixing it. + (CVE-2012-2110) + [Adam Langley (Google), Tavis Ormandy, Google Security Team] + + Changes between 0.9.8t and 0.9.8u [12 Mar 2012] + + *) Fix MMA (Bleichenbacher's attack on PKCS #1 v1.5 RSA padding) weakness + in CMS and PKCS7 code. When RSA decryption fails use a random key for + content decryption and always return the same error. Note: this attack + needs on average 2^20 messages so it only affects automated senders. The + old behaviour can be reenabled in the CMS code by setting the + CMS_DEBUG_DECRYPT flag: this is useful for debugging and testing where + an MMA defence is not necessary. + Thanks to Ivan Nestlerode for discovering + this issue. (CVE-2012-0884) + [Steve Henson] + + *) Fix CVE-2011-4619: make sure we really are receiving a + client hello before rejecting multiple SGC restarts. Thanks to + Ivan Nestlerode for discovering this bug. + [Steve Henson] + + Changes between 0.9.8s and 0.9.8t [18 Jan 2012] + + *) Fix for DTLS DoS issue introduced by fix for CVE-2011-4109. + Thanks to Antonio Martin, Enterprise Secure Access Research and + Development, Cisco Systems, Inc. for discovering this bug and + preparing a fix. (CVE-2012-0050) + [Antonio Martin] + + Changes between 0.9.8r and 0.9.8s [4 Jan 2012] + + *) Nadhem Alfardan and Kenny Paterson have discovered an extension + of the Vaudenay padding oracle attack on CBC mode encryption + which enables an efficient plaintext recovery attack against + the OpenSSL implementation of DTLS. Their attack exploits timing + differences arising during decryption processing. A research + paper describing this attack can be found at: + http://www.isg.rhul.ac.uk/~kp/dtls.pdf + Thanks go to Nadhem Alfardan and Kenny Paterson of the Information + Security Group at Royal Holloway, University of London + (www.isg.rhul.ac.uk) for discovering this flaw and to Robin Seggelmann + and Michael Tuexen + for preparing the fix. (CVE-2011-4108) + [Robin Seggelmann, Michael Tuexen] + + *) Stop policy check failure freeing same buffer twice. (CVE-2011-4109) + [Ben Laurie, Kasper ] + + *) Clear bytes used for block padding of SSL 3.0 records. + (CVE-2011-4576) + [Adam Langley (Google)] + + *) Only allow one SGC handshake restart for SSL/TLS. Thanks to George + Kadianakis for discovering this issue and + Adam Langley for preparing the fix. (CVE-2011-4619) + [Adam Langley (Google)] + + *) Prevent malformed RFC3779 data triggering an assertion failure. + Thanks to Andrew Chi, BBN Technologies, for discovering the flaw + and Rob Austein for fixing it. (CVE-2011-4577) + [Rob Austein ] + + *) Fix ssl_ciph.c set-up race. + [Adam Langley (Google)] + + *) Fix spurious failures in ecdsatest.c. + [Emilia Käsper (Google)] + + *) Fix the BIO_f_buffer() implementation (which was mixing different + interpretations of the '..._len' fields). + [Adam Langley (Google)] + + *) Fix handling of BN_BLINDING: now BN_BLINDING_invert_ex (rather than + BN_BLINDING_invert_ex) calls BN_BLINDING_update, ensuring that concurrent + threads won't reuse the same blinding coefficients. + + This also avoids the need to obtain the CRYPTO_LOCK_RSA_BLINDING + lock to call BN_BLINDING_invert_ex, and avoids one use of + BN_BLINDING_update for each BN_BLINDING structure (previously, + the last update always remained unused). + [Emilia Käsper (Google)] + + *) Fix SSL memory handling for (EC)DH ciphersuites, in particular + for multi-threaded use of ECDH. + [Adam Langley (Google)] + + *) Fix x509_name_ex_d2i memory leak on bad inputs. + [Bodo Moeller] + + *) Add protection against ECDSA timing attacks as mentioned in the paper + by Billy Bob Brumley and Nicola Tuveri, see: + + http://eprint.iacr.org/2011/232.pdf + + [Billy Bob Brumley and Nicola Tuveri] + + Changes between 0.9.8q and 0.9.8r [8 Feb 2011] + + *) Fix parsing of OCSP stapling ClientHello extension. CVE-2011-0014 + [Neel Mehta, Adam Langley, Bodo Moeller (Google)] + + *) Fix bug in string printing code: if *any* escaping is enabled we must + escape the escape character (backslash) or the resulting string is + ambiguous. + [Steve Henson] + Changes between 0.9.8p and 0.9.8q [2 Dec 2010] *) Disable code workaround for ancient and obsolete Netscape browsers Modified: releng/8.3/crypto/openssl/Configure ============================================================================== --- releng/8.3/crypto/openssl/Configure Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/Configure Tue Apr 2 17:34:42 2013 (r249029) @@ -162,6 +162,7 @@ my %table=( "debug-ben-openbsd","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-openbsd-debug","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DPEDANTIC -DDEBUG_SAFESTACK -DOPENSSL_OPENBSD_DEV_CRYPTO -DOPENSSL_NO_ASM -g3 -O2 -pedantic -Wall -Wshadow -Werror -pipe::(unknown)::::", "debug-ben-debug", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -O2 -pipe::(unknown)::::::", +"debug-ben-debug-64", "gcc:$gcc_devteam_warn -DBN_DEBUG -DCONF_DEBUG -DDEBUG_SAFESTACK -DDEBUG_UNUSED -g3 -O3 -pipe::${BSDthreads}:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:elf:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-ben-debug-noopt", "gcc:$gcc_devteam_warn -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -ggdb3 -pipe::(unknown)::::::", "debug-ben-strict", "gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DCRYPTO_MDEBUG -DCONST_STRICT -O2 -Wall -Wshadow -Werror -Wpointer-arith -Wcast-qual -Wwrite-strings -pipe::(unknown)::::::", "debug-rse","cc:-DTERMIOS -DL_ENDIAN -pipe -O -g -ggdb3 -Wall::(unknown):::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}", @@ -172,10 +173,10 @@ my %table=( "debug-steve-opt", "gcc:$gcc_devteam_warn -m64 -O3 -DL_ENDIAN -DTERMIO -DCONF_DEBUG -DDEBUG_SAFESTACK -g -DMD32_REG_T=int::-D_REENTRANT::-ldl:SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_UNROLL:${x86_64_asm}:dlfcn:linux-shared:-fPIC:-m64:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-steve", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DPEDANTIC -m32 -g -pedantic -Wno-long-long -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared", "debug-steve-linux-pseudo64", "gcc:-DL_ENDIAN -DREF_CHECK -DCONF_DEBUG -DBN_CTX_DEBUG -DDEBUG_SAFESTACK -DCRYPTO_MDEBUG_ALL -DOPENSSL_NO_ASM -g -mcpu=i486 -Wall -Werror -Wshadow -pipe::-D_REENTRANT::-rdynamic -ldl:SIXTY_FOUR_BIT:${no_asm}:dlfcn:linux-shared", -"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", -"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -D_POSIX_SOURCE -DPEDANTIC -ggdb -g3 -mcpu=i486 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm","gcc:-DLEVITTE_DEBUG -DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -ggdb -g3 -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-elf-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", +"debug-levitte-linux-noasm-extreme","gcc:-DLEVITTE_DEBUG -DREF_CHECK -DCONF_DEBUG -DBN_DEBUG -DBN_DEBUG_RAND -DCRYPTO_MDEBUG -DENGINE_CONF_DEBUG -DOPENSSL_NO_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -ggdb -g3 -pedantic -ansi -Wall -W -Wundef -Wshadow -Wcast-align -Wstrict-prototypes -Wmissing-prototypes -Wno-long-long -Wundef -Wconversion -pipe::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-geoff","gcc:-DBN_DEBUG -DBN_DEBUG_RAND -DBN_STRICT -DPURIFY -DOPENSSL_NO_DEPRECATED -DOPENSSL_NO_ASM -DOPENSSL_NO_INLINE_ASM -DL_ENDIAN -DTERMIO -DPEDANTIC -O1 -ggdb2 -Wall -Werror -Wundef -pedantic -Wshadow -Wpointer-arith -Wbad-function-cast -Wcast-align -Wsign-compare -Wmissing-prototypes -Wmissing-declarations -Wno-long-long::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "debug-linux-pentium","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentium -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", "debug-linux-ppro","gcc:-DBN_DEBUG -DREF_CHECK -DCONF_DEBUG -DCRYPTO_MDEBUG -DL_ENDIAN -DTERMIO -g -mcpu=pentiumpro -Wall::-D_REENTRANT::-ldl:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_elf_asm}:dlfcn", @@ -371,6 +372,9 @@ my %table=( "linux-alpha-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", "linux-alpha+bwx-ccc","ccc:-fast -readonly_strings -DL_ENDIAN -DTERMIO::-D_REENTRANT:::SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_PTR DES_RISC1 DES_UNROLL:${no_asm}", +# Android: Linux but without -DTERMIO and pointers to headers and libs. +"android","gcc:-mandroid -I\$(ANDROID_DEV)/include -B\$(ANDROID_DEV)/lib -O3 -fomit-frame-pointer -Wall::-D_REENTRANT::-ldl:BN_LLONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL BF_PTR:${no_asm}:dlfcn:linux-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", + #### *BSD [do see comment about ${BSDthreads} above!] "BSD-generic32","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG RC2_CHAR RC4_INDEX DES_INT DES_UNROLL:${no_asm}:dlfcn:bsd-gcc-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", "BSD-x86", "gcc:-DL_ENDIAN -DTERMIOS -O3 -fomit-frame-pointer -Wall::${BSDthreads}:::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${x86_out_asm}:dlfcn:bsd-shared:-fPIC::.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)", @@ -425,8 +429,8 @@ my %table=( "aix64-gcc","gcc:-maix64 -O -DB_ENDIAN::-pthread:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-maix64 -shared -Wl,-G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X64", # Below targets assume AIX 5. Idea is to effectively disregard $OBJECT_MODE # at build time. $OBJECT_MODE is respected at ./config stage! -"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", -"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", +"aix-cc", "cc:-q32 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::BN_LLONG RC4_CHAR::aix_ppc32.o::::::::::dlfcn:aix-shared::-q32 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 32", +"aix64-cc", "cc:-q64 -O -DB_ENDIAN -qmaxmem=16384 -qro -qroconst::-qthreaded -D_THREAD_SAFE:AIX::SIXTY_FOUR_BIT_LONG RC4_CHAR::aix_ppc64.o::::::::::dlfcn:aix-shared::-q64 -G:.so.\$(SHLIB_MAJOR).\$(SHLIB_MINOR)::-X 64", # # Cray T90 and similar (SDSC) Modified: releng/8.3/crypto/openssl/FAQ ============================================================================== --- releng/8.3/crypto/openssl/FAQ Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/FAQ Tue Apr 2 17:34:42 2013 (r249029) @@ -10,6 +10,7 @@ OpenSSL - Frequently Asked Questions * Why aren't tools like 'autoconf' and 'libtool' used? * What is an 'engine' version? * How do I check the authenticity of the OpenSSL distribution? +* How does the versioning scheme work? [LEGAL] Legal questions @@ -82,7 +83,7 @@ OpenSSL - Frequently Asked Questions * Which is the current version of OpenSSL? The current version is available from . -OpenSSL 1.0.0c was released on Dec 2nd, 2010. +OpenSSL 1.0.1d was released on Feb 5th, 2013. In addition to the current stable release, you can also access daily snapshots of the OpenSSL development version at . Note that the online documents refer to the very latest development versions of OpenSSL and may include features not present in released versions. If in doubt refer to the documentation -that came with the version of OpenSSL you are using. +that came with the version of OpenSSL you are using. The pod format +documentation is included in each OpenSSL distribution under the docs +directory. For information on parts of libcrypto that are not yet documented, you might want to read Ariel Glenn's documentation on SSLeay 0.9, OpenSSL's @@ -173,6 +176,19 @@ just do: pgp TARBALL.asc +* How does the versioning scheme work? + +After the release of OpenSSL 1.0.0 the versioning scheme changed. Letter +releases (e.g. 1.0.1a) can only contain bug and security fixes and no +new features. Minor releases change the last number (e.g. 1.0.2) and +can contain new features that retain binary compatibility. Changes to +the middle number are considered major releases and neither source nor +binary compatibility is guaranteed. + +Therefore the answer to the common question "when will feature X be +backported to OpenSSL 1.0.0/0.9.8?" is "never" but it could appear +in the next minor release. + [LEGAL] ======================================================================= * Do I need patent licenses to use OpenSSL? @@ -284,7 +300,7 @@ current directory in this case, but this Check out the CA.pl(1) manual page. This provides a simple wrapper round the 'req', 'verify', 'ca' and 'pkcs12' utilities. For finer control check out the manual pages for the individual utilities and the certificate -extensions documentation (currently in doc/openssl.txt). +extensions documentation (in ca(1), req(1), x509v3_config(5) ) * Why can't I create certificate requests? Modified: releng/8.3/crypto/openssl/LICENSE ============================================================================== --- releng/8.3/crypto/openssl/LICENSE Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/LICENSE Tue Apr 2 17:34:42 2013 (r249029) @@ -12,7 +12,7 @@ --------------- /* ==================================================================== - * Copyright (c) 1998-2008 The OpenSSL Project. All rights reserved. + * Copyright (c) 1998-2011 The OpenSSL Project. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions Modified: releng/8.3/crypto/openssl/Makefile ============================================================================== --- releng/8.3/crypto/openssl/Makefile Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/Makefile Tue Apr 2 17:34:42 2013 (r249029) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=0.9.8q +VERSION=0.9.8y MAJOR=0 MINOR=9.8 SHLIB_VERSION_NUMBER=0.9.8 Modified: releng/8.3/crypto/openssl/NEWS ============================================================================== --- releng/8.3/crypto/openssl/NEWS Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/NEWS Tue Apr 2 17:34:42 2013 (r249029) @@ -5,6 +5,45 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 0.9.8x and OpenSSL 0.9.8y: + + o Fix for SSL/TLS/DTLS CBC plaintext recovery attack CVE-2013-0169 + o Fix OCSP bad key DoS attack CVE-2013-0166 + + Major changes between OpenSSL 0.9.8w and OpenSSL 0.9.8x: + + o Fix DTLS record length checking bug CVE-2012-2333 + + Major changes between OpenSSL 0.9.8v and OpenSSL 0.9.8w: + + o Fix for CVE-2012-2131 (corrected fix for 0.9.8 and CVE-2012-2110) + + Major changes between OpenSSL 0.9.8u and OpenSSL 0.9.8v: + + o Fix for ASN1 overflow bug CVE-2012-2110 + + Major changes between OpenSSL 0.9.8t and OpenSSL 0.9.8u: + + o Fix for CMS/PKCS#7 MMA CVE-2012-0884 + o Corrected fix for CVE-2011-4619 + o Various DTLS fixes. + + Major changes between OpenSSL 0.9.8s and OpenSSL 0.9.8t: + + o Fix for DTLS DoS issue CVE-2012-0050 + + Major changes between OpenSSL 0.9.8r and OpenSSL 0.9.8s: + + o Fix for DTLS plaintext recovery attack CVE-2011-4108 + o Fix policy check double free error CVE-2011-4109 + o Clear block padding bytes of SSL 3.0 records CVE-2011-4576 + o Only allow one SGC handshake restart for SSL/TLS CVE-2011-4619 + o Check for malformed RFC3779 data CVE-2011-4577 + + Major changes between OpenSSL 0.9.8q and OpenSSL 0.9.8r: + + o Fix for security issue CVE-2011-0014 + Major changes between OpenSSL 0.9.8p and OpenSSL 0.9.8q: o Fix for security issue CVE-2010-4180 @@ -181,6 +220,11 @@ o Added initial support for Win64. o Added alternate pkg-config files. + Major changes between OpenSSL 0.9.7l and OpenSSL 0.9.7m: + + o FIPS 1.1.1 module linking. + o Various ciphersuite selection fixes. + Major changes between OpenSSL 0.9.7k and OpenSSL 0.9.7l: o Introduce limits to prevent malicious key DoS (CVE-2006-2940) Modified: releng/8.3/crypto/openssl/README ============================================================================== --- releng/8.3/crypto/openssl/README Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/README Tue Apr 2 17:34:42 2013 (r249029) @@ -1,7 +1,7 @@ - OpenSSL 0.9.8q 2 Dec 2010 + OpenSSL 0.9.8y 5 Feb 2013 - Copyright (c) 1998-2009 The OpenSSL Project + Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson All rights reserved. Modified: releng/8.3/crypto/openssl/apps/apps.c ============================================================================== --- releng/8.3/crypto/openssl/apps/apps.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/apps.c Tue Apr 2 17:34:42 2013 (r249029) @@ -2052,7 +2052,7 @@ X509_NAME *parse_name(char *subject, lon X509_NAME *n = NULL; int nid; - if (!buf || !ne_types || !ne_values) + if (!buf || !ne_types || !ne_values || !mval) { BIO_printf(bio_err, "malloc error\n"); goto error; @@ -2156,6 +2156,7 @@ X509_NAME *parse_name(char *subject, lon OPENSSL_free(ne_values); OPENSSL_free(ne_types); OPENSSL_free(buf); + OPENSSL_free(mval); return n; error: @@ -2164,6 +2165,8 @@ error: OPENSSL_free(ne_values); if (ne_types) OPENSSL_free(ne_types); + if (mval) + OPENSSL_free(mval); if (buf) OPENSSL_free(buf); return NULL; Modified: releng/8.3/crypto/openssl/apps/asn1pars.c ============================================================================== --- releng/8.3/crypto/openssl/apps/asn1pars.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/asn1pars.c Tue Apr 2 17:34:42 2013 (r249029) @@ -408,6 +408,7 @@ static int do_generate(BIO *bio, char *g atyp = ASN1_generate_nconf(genstr, cnf); NCONF_free(cnf); + cnf = NULL; if (!atyp) return -1; Modified: releng/8.3/crypto/openssl/apps/cms.c ============================================================================== --- releng/8.3/crypto/openssl/apps/cms.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/cms.c Tue Apr 2 17:34:42 2013 (r249029) @@ -226,6 +226,8 @@ int MAIN(int argc, char **argv) else if (!strcmp(*args,"-camellia256")) cipher = EVP_camellia_256_cbc(); #endif + else if (!strcmp (*args, "-debug_decrypt")) + flags |= CMS_DEBUG_DECRYPT; else if (!strcmp (*args, "-text")) flags |= CMS_TEXT; else if (!strcmp (*args, "-nointern")) @@ -611,7 +613,7 @@ int MAIN(int argc, char **argv) BIO_printf (bio_err, "-certsout file certificate output file\n"); BIO_printf (bio_err, "-signer file signer certificate file\n"); BIO_printf (bio_err, "-recip file recipient certificate file for decryption\n"); - BIO_printf (bio_err, "-skeyid use subject key identifier\n"); + BIO_printf (bio_err, "-keyid use subject key identifier\n"); BIO_printf (bio_err, "-in file input file\n"); BIO_printf (bio_err, "-inform arg input format SMIME (default), PEM or DER\n"); BIO_printf (bio_err, "-inkey file input private key (if not signer or recipient)\n"); @@ -1013,6 +1015,8 @@ int MAIN(int argc, char **argv) ret = 4; if (operation == SMIME_DECRYPT) { + if (flags & CMS_DEBUG_DECRYPT) + CMS_decrypt(cms, NULL, NULL, NULL, NULL, flags); if (secret_key) { Modified: releng/8.3/crypto/openssl/apps/dhparam.c ============================================================================== --- releng/8.3/crypto/openssl/apps/dhparam.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/dhparam.c Tue Apr 2 17:34:42 2013 (r249029) @@ -332,7 +332,6 @@ bad: BIO_printf(bio_err,"This is going to take a long time\n"); if(!dh || !DH_generate_parameters_ex(dh, num, g, &cb)) { - if(dh) DH_free(dh); ERR_print_errors(bio_err); goto end; } Modified: releng/8.3/crypto/openssl/apps/openssl.cnf ============================================================================== --- releng/8.3/crypto/openssl/apps/openssl.cnf Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/openssl.cnf Tue Apr 2 17:34:42 2013 (r249029) @@ -142,7 +142,7 @@ localityName = Locality Name (eg, city organizationalUnitName = Organizational Unit Name (eg, section) #organizationalUnitName_default = -commonName = Common Name (eg, YOUR name) +commonName = Common Name (e.g. server FQDN or YOUR name) commonName_max = 64 emailAddress = Email Address Modified: releng/8.3/crypto/openssl/apps/pkcs12.c ============================================================================== --- releng/8.3/crypto/openssl/apps/pkcs12.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/pkcs12.c Tue Apr 2 17:34:42 2013 (r249029) @@ -659,7 +659,7 @@ int MAIN(int argc, char **argv) if (!twopass) BUF_strlcpy(macpass, pass, sizeof macpass); - if (options & INFO) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); + if ((options & INFO) && p12->mac) BIO_printf (bio_err, "MAC Iteration %ld\n", p12->mac->iter ? ASN1_INTEGER_get (p12->mac->iter) : 1); if(macver) { #ifdef CRYPTO_MDEBUG CRYPTO_push_info("verify MAC"); Modified: releng/8.3/crypto/openssl/apps/s_client.c ============================================================================== --- releng/8.3/crypto/openssl/apps/s_client.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/s_client.c Tue Apr 2 17:34:42 2013 (r249029) @@ -345,13 +345,7 @@ int MAIN(int argc, char **argv) char *jpake_secret = NULL; #endif -#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) meth=SSLv23_client_method(); -#elif !defined(OPENSSL_NO_SSL3) - meth=SSLv3_client_method(); -#elif !defined(OPENSSL_NO_SSL2) - meth=SSLv2_client_method(); -#endif apps_startup(); c_Pause=0; Modified: releng/8.3/crypto/openssl/apps/s_server.c ============================================================================== --- releng/8.3/crypto/openssl/apps/s_server.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/s_server.c Tue Apr 2 17:34:42 2013 (r249029) @@ -781,13 +781,7 @@ int MAIN(int argc, char *argv[]) tlsextctx tlsextcbp = {NULL, NULL, SSL_TLSEXT_ERR_ALERT_WARNING}; #endif -#if !defined(OPENSSL_NO_SSL2) && !defined(OPENSSL_NO_SSL3) meth=SSLv23_server_method(); -#elif !defined(OPENSSL_NO_SSL3) - meth=SSLv3_server_method(); -#elif !defined(OPENSSL_NO_SSL2) - meth=SSLv2_server_method(); -#endif local_argc=argc; local_argv=argv; @@ -1556,6 +1550,12 @@ end: if (dpass) OPENSSL_free(dpass); #ifndef OPENSSL_NO_TLSEXT + if (tlscstatp.host) + OPENSSL_free(tlscstatp.host); + if (tlscstatp.port) + OPENSSL_free(tlscstatp.port); + if (tlscstatp.path) + OPENSSL_free(tlscstatp.path); if (ctx2 != NULL) SSL_CTX_free(ctx2); if (s_cert2) X509_free(s_cert2); Modified: releng/8.3/crypto/openssl/apps/x509.c ============================================================================== --- releng/8.3/crypto/openssl/apps/x509.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/apps/x509.c Tue Apr 2 17:34:42 2013 (r249029) @@ -969,7 +969,7 @@ bad: else { pk=load_key(bio_err, - keyfile, FORMAT_PEM, 0, + keyfile, keyformat, 0, passin, e, "request key"); if (pk == NULL) goto end; } Modified: releng/8.3/crypto/openssl/config ============================================================================== --- releng/8.3/crypto/openssl/config Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/config Tue Apr 2 17:34:42 2013 (r249029) @@ -790,6 +790,10 @@ esac # options="$options -DATALLA" #fi +($CC -Wa,--help -c -o /dev/null -x assembler /dev/null 2>&1 | \ + grep \\--noexecstack) 2>&1 > /dev/null && \ + options="$options -Wa,--noexecstack" + # gcc < 2.8 does not support -march=ultrasparc if [ "$OUT" = solaris-sparcv9-gcc -a $GCCVER -lt 28 ] then Modified: releng/8.3/crypto/openssl/crypto/asn1/a_object.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/a_object.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/a_object.c Tue Apr 2 17:34:42 2013 (r249029) @@ -139,7 +139,7 @@ int a2d_ASN1_OBJECT(unsigned char *out, ASN1err(ASN1_F_A2D_ASN1_OBJECT,ASN1_R_INVALID_DIGIT); goto err; } - if (!use_bn && l > (ULONG_MAX / 10L)) + if (!use_bn && l >= ((ULONG_MAX - 80) / 10L)) { use_bn = 1; if (!bl) @@ -294,7 +294,7 @@ ASN1_OBJECT *c2i_ASN1_OBJECT(ASN1_OBJECT /* Sanity check OID encoding: can't have leading 0x80 in * subidentifiers, see: X.690 8.19.2 */ - for (i = 0, p = *pp + 1; i < len - 1; i++, p++) + for (i = 0, p = *pp; i < len; i++, p++) { if (*p == 0x80 && (!i || !(p[-1] & 0x80))) { Modified: releng/8.3/crypto/openssl/crypto/asn1/a_strex.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/a_strex.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/a_strex.c Tue Apr 2 17:34:42 2013 (r249029) @@ -74,6 +74,11 @@ #define CHARTYPE_BS_ESC (ASN1_STRFLGS_ESC_2253 | CHARTYPE_FIRST_ESC_2253 | CHARTYPE_LAST_ESC_2253) +#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \ + ASN1_STRFLGS_ESC_QUOTE | \ + ASN1_STRFLGS_ESC_CTRL | \ + ASN1_STRFLGS_ESC_MSB) + /* Three IO functions for sending data to memory, a BIO and * and a FILE pointer. @@ -148,6 +153,13 @@ static int do_esc_char(unsigned long c, if(!io_ch(arg, tmphex, 3)) return -1; return 3; } + /* If we get this far and do any escaping at all must escape + * the escape character itself: backslash. + */ + if (chtmp == '\\' && flags & ESC_FLAGS) { + if(!io_ch(arg, "\\\\", 2)) return -1; + return 2; + } if(!io_ch(arg, &chtmp, 1)) return -1; return 1; } @@ -292,11 +304,6 @@ static const signed char tag2nbyte[] = { 4, -1, 2 /* 28-30 */ }; -#define ESC_FLAGS (ASN1_STRFLGS_ESC_2253 | \ - ASN1_STRFLGS_ESC_QUOTE | \ - ASN1_STRFLGS_ESC_CTRL | \ - ASN1_STRFLGS_ESC_MSB) - /* This is the main function, print out an * ASN1_STRING taking note of various escape * and display options. Returns number of @@ -560,6 +567,7 @@ int ASN1_STRING_to_UTF8(unsigned char ** if(mbflag == -1) return -1; mbflag |= MBSTRING_FLAG; stmp.data = NULL; + stmp.length = 0; ret = ASN1_mbstring_copy(&str, in->data, in->length, mbflag, B_ASN1_UTF8STRING); if(ret < 0) return ret; *out = stmp.data; Modified: releng/8.3/crypto/openssl/crypto/asn1/a_strnid.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/a_strnid.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/a_strnid.c Tue Apr 2 17:34:42 2013 (r249029) @@ -96,7 +96,7 @@ unsigned long ASN1_STRING_get_default_ma * default: the default value, Printable, T61, BMP. */ -int ASN1_STRING_set_default_mask_asc(char *p) +int ASN1_STRING_set_default_mask_asc(const char *p) { unsigned long mask; char *end; Modified: releng/8.3/crypto/openssl/crypto/asn1/a_verify.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/a_verify.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/a_verify.c Tue Apr 2 17:34:42 2013 (r249029) @@ -138,6 +138,12 @@ int ASN1_item_verify(const ASN1_ITEM *it unsigned char *buf_in=NULL; int ret= -1,i,inl; + if (!pkey) + { + ASN1err(ASN1_F_ASN1_ITEM_VERIFY, ERR_R_PASSED_NULL_PARAMETER); + return -1; + } + EVP_MD_CTX_init(&ctx); i=OBJ_obj2nid(a->algorithm); type=EVP_get_digestbyname(OBJ_nid2sn(i)); Modified: releng/8.3/crypto/openssl/crypto/asn1/asn1.h ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/asn1.h Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/asn1.h Tue Apr 2 17:34:42 2013 (r249029) @@ -1051,7 +1051,7 @@ ASN1_STRING *ASN1_pack_string(void *obj, ASN1_STRING *ASN1_item_pack(void *obj, const ASN1_ITEM *it, ASN1_OCTET_STRING **oct); void ASN1_STRING_set_default_mask(unsigned long mask); -int ASN1_STRING_set_default_mask_asc(char *p); +int ASN1_STRING_set_default_mask_asc(const char *p); unsigned long ASN1_STRING_get_default_mask(void); int ASN1_mbstring_copy(ASN1_STRING **out, const unsigned char *in, int len, int inform, unsigned long mask); Modified: releng/8.3/crypto/openssl/crypto/asn1/asn_mime.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/asn_mime.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/asn_mime.c Tue Apr 2 17:34:42 2013 (r249029) @@ -418,9 +418,9 @@ ASN1_VALUE *SMIME_read_ASN1(BIO *bio, BI if(strcmp(hdr->value, "application/x-pkcs7-signature") && strcmp(hdr->value, "application/pkcs7-signature")) { - sk_MIME_HEADER_pop_free(headers, mime_hdr_free); ASN1err(ASN1_F_SMIME_READ_ASN1,ASN1_R_SIG_INVALID_MIME_TYPE); ERR_add_error_data(2, "type: ", hdr->value); + sk_MIME_HEADER_pop_free(headers, mime_hdr_free); sk_BIO_pop_free(parts, BIO_vfree); return NULL; } @@ -790,12 +790,17 @@ static int mime_hdr_addparam(MIME_HEADER static int mime_hdr_cmp(const MIME_HEADER * const *a, const MIME_HEADER * const *b) { + if (!(*a)->name || !(*b)->name) + return !!(*a)->name - !!(*b)->name; + return(strcmp((*a)->name, (*b)->name)); } static int mime_param_cmp(const MIME_PARAM * const *a, const MIME_PARAM * const *b) { + if (!(*a)->param_name || !(*b)->param_name) + return !!(*a)->param_name - !!(*b)->param_name; return(strcmp((*a)->param_name, (*b)->param_name)); } Modified: releng/8.3/crypto/openssl/crypto/asn1/x_name.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/x_name.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/x_name.c Tue Apr 2 17:34:42 2013 (r249029) @@ -196,7 +196,9 @@ static int x509_name_ex_d2i(ASN1_VALUE * *val = nm.a; *in = p; return ret; - err: +err: + if (nm.x != NULL) + X509_NAME_free(nm.x); ASN1err(ASN1_F_X509_NAME_EX_D2I, ERR_R_NESTED_ASN1_ERROR); return 0; } Modified: releng/8.3/crypto/openssl/crypto/asn1/x_pubkey.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/asn1/x_pubkey.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/asn1/x_pubkey.c Tue Apr 2 17:34:42 2013 (r249029) @@ -367,7 +367,19 @@ EVP_PKEY *X509_PUBKEY_get(X509_PUBKEY *k goto err; } - key->pkey = ret; + /* Check to see if another thread set key->pkey first */ + CRYPTO_w_lock(CRYPTO_LOCK_EVP_PKEY); + if (key->pkey) + { + CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY); + EVP_PKEY_free(ret); + ret = key->pkey; + } + else + { + key->pkey = ret; + CRYPTO_w_unlock(CRYPTO_LOCK_EVP_PKEY); + } CRYPTO_add(&ret->references, 1, CRYPTO_LOCK_EVP_PKEY); return(ret); err: Modified: releng/8.3/crypto/openssl/crypto/bio/bf_buff.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/bio/bf_buff.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bio/bf_buff.c Tue Apr 2 17:34:42 2013 (r249029) @@ -209,7 +209,7 @@ start: /* add to buffer and return */ if (i >= inl) { - memcpy(&(ctx->obuf[ctx->obuf_len]),in,inl); + memcpy(&(ctx->obuf[ctx->obuf_off+ctx->obuf_len]),in,inl); ctx->obuf_len+=inl; return(num+inl); } @@ -219,7 +219,7 @@ start: { if (i > 0) /* lets fill it up if we can */ { - memcpy(&(ctx->obuf[ctx->obuf_len]),in,i); + memcpy(&(ctx->obuf[ctx->obuf_off+ctx->obuf_len]),in,i); in+=i; inl-=i; num+=i; @@ -294,9 +294,9 @@ static long buffer_ctrl(BIO *b, int cmd, case BIO_C_GET_BUFF_NUM_LINES: ret=0; p1=ctx->ibuf; - for (i=ctx->ibuf_off; iibuf_len; i++) + for (i=0; iibuf_len; i++) { - if (p1[i] == '\n') ret++; + if (p1[ctx->ibuf_off + i] == '\n') ret++; } break; case BIO_CTRL_WPENDING: @@ -399,17 +399,18 @@ static long buffer_ctrl(BIO *b, int cmd, for (;;) { BIO_clear_retry_flags(b); - if (ctx->obuf_len > ctx->obuf_off) + if (ctx->obuf_len > 0) { r=BIO_write(b->next_bio, &(ctx->obuf[ctx->obuf_off]), - ctx->obuf_len-ctx->obuf_off); + ctx->obuf_len); #if 0 -fprintf(stderr,"FLUSH [%3d] %3d -> %3d\n",ctx->obuf_off,ctx->obuf_len-ctx->obuf_off,r); +fprintf(stderr,"FLUSH [%3d] %3d -> %3d\n",ctx->obuf_off,ctx->obuf_len,r); #endif BIO_copy_next_retry(b); if (r <= 0) return((long)r); ctx->obuf_off+=r; + ctx->obuf_len-=r; } else { Modified: releng/8.3/crypto/openssl/crypto/bio/bio.h ============================================================================== --- releng/8.3/crypto/openssl/crypto/bio/bio.h Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bio/bio.h Tue Apr 2 17:34:42 2013 (r249029) @@ -145,6 +145,7 @@ extern "C" { /* #endif */ #define BIO_CTRL_DGRAM_QUERY_MTU 40 /* as kernel for current MTU */ +#define BIO_CTRL_DGRAM_GET_FALLBACK_MTU 47 #define BIO_CTRL_DGRAM_GET_MTU 41 /* get cached value for MTU */ #define BIO_CTRL_DGRAM_SET_MTU 42 /* set cached value for * MTU. want to use this @@ -321,6 +322,15 @@ DECLARE_STACK_OF(BIO) typedef struct bio_f_buffer_ctx_struct { + /* Buffers are setup like this: + * + * <---------------------- size -----------------------> + * +---------------------------------------------------+ + * | consumed | remaining | free space | + * +---------------------------------------------------+ + * <-- off --><------- len -------> + */ + /* BIO *bio; */ /* this is now in the BIO struct */ int ibuf_size; /* how big is the input buffer */ int obuf_size; /* how big is the output buffer */ Modified: releng/8.3/crypto/openssl/crypto/bio/bss_dgram.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/bio/bss_dgram.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bio/bss_dgram.c Tue Apr 2 17:34:42 2013 (r249029) @@ -57,7 +57,6 @@ * */ -#ifndef OPENSSL_NO_DGRAM #include #include @@ -65,6 +64,7 @@ #include "cryptlib.h" #include +#ifndef OPENSSL_NO_DGRAM #if defined(OPENSSL_SYS_WIN32) || defined(OPENSSL_SYS_VMS) #include @@ -288,7 +288,6 @@ static int dgram_read(BIO *b, char *out, */ dgram_adjust_rcv_timeout(b); ret=recvfrom(b->num,out,outl,0,&peer,(void *)&peerlen); - dgram_reset_rcv_timeout(b); if ( ! data->connected && ret >= 0) BIO_ctrl(b, BIO_CTRL_DGRAM_SET_PEER, 0, &peer); @@ -302,6 +301,8 @@ static int dgram_read(BIO *b, char *out, data->_errno = get_last_socket_error(); } } + + dgram_reset_rcv_timeout(b); } return(ret); } @@ -493,6 +494,9 @@ static long dgram_ctrl(BIO *b, int cmd, ret = 0; #endif break; + case BIO_CTRL_DGRAM_GET_FALLBACK_MTU: + ret = 576 - 20 - 8; + break; case BIO_CTRL_DGRAM_GET_MTU: return data->mtu; break; @@ -654,9 +658,13 @@ static int BIO_dgram_should_retry(int i) { err=get_last_socket_error(); -#if defined(OPENSSL_SYS_WINDOWS) && 0 /* more microsoft stupidity? perhaps not? Ben 4/1/99 */ - if ((i == -1) && (err == 0)) - return(1); +#if defined(OPENSSL_SYS_WINDOWS) + /* If the socket return value (i) is -1 + * and err is unexpectedly 0 at this point, + * the error code was overwritten by + * another system call before this error + * handling is called. + */ #endif return(BIO_dgram_non_fatal_error(err)); @@ -719,7 +727,6 @@ int BIO_dgram_non_fatal_error(int err) } return(0); } -#endif static void get_current_time(struct timeval *t) { @@ -737,3 +744,5 @@ static void get_current_time(struct time gettimeofday(t, NULL); #endif } + +#endif Modified: releng/8.3/crypto/openssl/crypto/bn/asm/mo-586.pl ============================================================================== --- releng/8.3/crypto/openssl/crypto/bn/asm/mo-586.pl Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bn/asm/mo-586.pl Tue Apr 2 17:34:42 2013 (r249029) @@ -539,8 +539,10 @@ $sbit=$num; &jle (&label("sqradd")); &mov ($carry,"edx"); - &lea ("edx",&DWP(0,$sbit,"edx",2)); + &add ("edx","edx"); &shr ($carry,31); + &add ("edx",$sbit); + &adc ($carry,0); &set_label("sqrlast"); &mov ($word,$_n0); &mov ($inp,$_np); Modified: releng/8.3/crypto/openssl/crypto/bn/asm/ppc.pl ============================================================================== --- releng/8.3/crypto/openssl/crypto/bn/asm/ppc.pl Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bn/asm/ppc.pl Tue Apr 2 17:34:42 2013 (r249029) @@ -1039,7 +1039,7 @@ sub data { addze r11,r0 #mul_add_c(a[3],b[2],c3,c1,c2); $LD r6,`3*$BNSZ`(r4) - $LD r7,`2*$BNSZ`(r4) + $LD r7,`2*$BNSZ`(r5) $UMULL r8,r6,r7 $UMULH r9,r6,r7 addc r12,r8,r12 Modified: releng/8.3/crypto/openssl/crypto/bn/bn_blind.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/bn/bn_blind.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bn/bn_blind.c Tue Apr 2 17:34:42 2013 (r249029) @@ -123,7 +123,7 @@ struct bn_blinding_st BIGNUM *mod; /* just a reference */ unsigned long thread_id; /* added in OpenSSL 0.9.6j and 0.9.7b; * used only by crypto/rsa/rsa_eay.c, rsa_lib.c */ - unsigned int counter; + int counter; unsigned long flags; BN_MONT_CTX *m_ctx; int (*bn_mod_exp)(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, @@ -157,7 +157,10 @@ BN_BLINDING *BN_BLINDING_new(const BIGNU if (BN_get_flags(mod, BN_FLG_CONSTTIME) != 0) BN_set_flags(ret->mod, BN_FLG_CONSTTIME); - ret->counter = BN_BLINDING_COUNTER; + /* Set the counter to the special value -1 + * to indicate that this is never-used fresh blinding + * that does not need updating before first use. */ + ret->counter = -1; return(ret); err: if (ret != NULL) BN_BLINDING_free(ret); @@ -186,7 +189,10 @@ int BN_BLINDING_update(BN_BLINDING *b, B goto err; } - if (--(b->counter) == 0 && b->e != NULL && + if (b->counter == -1) + b->counter = 0; + + if (++b->counter == BN_BLINDING_COUNTER && b->e != NULL && !(b->flags & BN_BLINDING_NO_RECREATE)) { /* re-create blinding parameters */ @@ -201,8 +207,8 @@ int BN_BLINDING_update(BN_BLINDING *b, B ret=1; err: - if (b->counter == 0) - b->counter = BN_BLINDING_COUNTER; + if (b->counter == BN_BLINDING_COUNTER) + b->counter = 0; return(ret); } @@ -223,6 +229,12 @@ int BN_BLINDING_convert_ex(BIGNUM *n, BI return(0); } + if (b->counter == -1) + /* Fresh blinding, doesn't need updating. */ + b->counter = 0; + else if (!BN_BLINDING_update(b,ctx)) + return(0); + if (r != NULL) { if (!BN_copy(r, b->Ai)) ret=0; @@ -243,22 +255,19 @@ int BN_BLINDING_invert_ex(BIGNUM *n, con int ret; bn_check_top(n); - if ((b->A == NULL) || (b->Ai == NULL)) - { - BNerr(BN_F_BN_BLINDING_INVERT_EX,BN_R_NOT_INITIALIZED); - return(0); - } if (r != NULL) ret = BN_mod_mul(n, n, r, b->mod, ctx); else - ret = BN_mod_mul(n, n, b->Ai, b->mod, ctx); - - if (ret >= 0) { - if (!BN_BLINDING_update(b,ctx)) + if (b->Ai == NULL) + { + BNerr(BN_F_BN_BLINDING_INVERT_EX,BN_R_NOT_INITIALIZED); return(0); + } + ret = BN_mod_mul(n, n, b->Ai, b->mod, ctx); } + bn_check_top(n); return(ret); } Modified: releng/8.3/crypto/openssl/crypto/bn/bn_gf2m.c ============================================================================== --- releng/8.3/crypto/openssl/crypto/bn/bn_gf2m.c Tue Apr 2 17:29:17 2013 (r249028) +++ releng/8.3/crypto/openssl/crypto/bn/bn_gf2m.c Tue Apr 2 17:34:42 2013 (r249029) @@ -607,6 +607,7 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIG { while (!BN_is_odd(u)) { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 17:59:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 13A95FEB; Tue, 2 Apr 2013 17:59:01 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id AAE263F5; Tue, 2 Apr 2013 17:58:59 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id r32Hx3Aw085456; Tue, 2 Apr 2013 12:59:03 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id r32Hx3w7085455; Tue, 2 Apr 2013 12:59:03 -0500 (CDT) (envelope-from brooks) Date: Tue, 2 Apr 2013 12:59:03 -0500 From: Brooks Davis To: John Baldwin Subject: Re: svn commit: r248352 - in stable/9: etc share/mk Message-ID: <20130402175903.GA85393@lor.one-eyed-alien.net> References: <201303152132.r2FLWfwx076672@svn.freebsd.org> <20130319200631.GC80942@lor.one-eyed-alien.net> <201303200918.08803.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="UlVJffcvxoiEqYs2" Content-Disposition: inline In-Reply-To: <201303200918.08803.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Brooks Davis , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , svn-src-stable-9@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, 02 Apr 2013 17:59:01 -0000 --UlVJffcvxoiEqYs2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote: > On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote: > > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote: > > > On Tue, 19 Mar 2013, Brooks Davis wrote: > > >=20 > > > > > > Replace all known uses of ln in the build process with approp= riate > > > > > > install -l invocations via new INSTALL_LINK and INSTALL_SYMLI= NK > > > > > > variables. > > > > >=20 > > > > > It seems this merge breaks ``make distribution'' and hence mergem= aster if your=20 > > > > > base system is not updated yet (for example, while updating jail): > > > >=20 > > > > Sorry for the delay in responding. I missed this yesterday. > > > >=20 > > > > It works for me on a older 9.0-STABLE system where the base install > > > > doesn't support -l. Did you build world or run "make toolchain" in= that > > > > source tree to build the bootstrap copy of install? > > >=20 > > > Yes, this is after full ``make buildworld buildkernel'' process. > >=20 > > I've found the problem thanks to misc/177055. It is that mergemaster > > (and etcupdate) set MAKEOBJDIRPREFIX to something in their > > temporary directory and thus deprive themselves of bootstrap tools. > > Unfortunately, I don't see a trivial fix so I've backed this out for > > now and will work on this in HEAD. >=20 > Hummmm. In the case of etcupdate you can use 'etcupdate -B'. That is ac= tually safe > to do in the common case where you've just updated /usr/src and built the= corresponding > world in /usr/obj. It should possibly even by the default for etcupdate = if a DESTDIR > is not specified. Finally getting back to this... etcupdate -B would correct the immediate problem for etcupdate. I do think that making it the default if the tree exists makes sense. It won't be more broken than a cross installworld is. I did a quick test when I first found this issue and it would be easy to reuse the existing MAKEOBJDIRPREFIX in mergemaster as well. I think we'll want to update UPDATING to recommend that the mergemaster -p stage (and the equivalent for etcupdate) be run using the version in the source tree, not the installed one. I do wonder if it would make sense for them to attempt to find and invoke that version so simplify bootstrapping. -- Brooks --UlVJffcvxoiEqYs2 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFRWxxmXY6L6fI4GtQRAtcmAJ97CIgMrktZlbUNZiz8nISGM3XLqgCg2P7m nJnWURO7LGk5i+JRCS1nxhY= =R+vd -----END PGP SIGNATURE----- --UlVJffcvxoiEqYs2-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 19:33:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18391424; Tue, 2 Apr 2013 19:33:36 +0000 (UTC) (envelope-from gavin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0A697303; Tue, 2 Apr 2013 19:33:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32JXZEC024035; Tue, 2 Apr 2013 19:33:35 GMT (envelope-from gavin@svn.freebsd.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32JXZqg024034; Tue, 2 Apr 2013 19:33:35 GMT (envelope-from gavin@svn.freebsd.org) Message-Id: <201304021933.r32JXZqg024034@svn.freebsd.org> From: Gavin Atkinson Date: Tue, 2 Apr 2013 19:33:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249031 - releng/8.4/lib/libc/stdlib 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: Tue, 02 Apr 2013 19:33:36 -0000 Author: gavin Date: Tue Apr 2 19:33:35 2013 New Revision: 249031 URL: http://svnweb.freebsd.org/changeset/base/249031 Log: When r241373 was merged, one file appears to have been missed from the commit. Merge it: 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'. No mergeinfo changes with this commit as r241475 already updated the mergeinfo. Approved by: re (jpaetzel) Modified: releng/8.4/lib/libc/stdlib/random.c Modified: releng/8.4/lib/libc/stdlib/random.c ============================================================================== --- releng/8.4/lib/libc/stdlib/random.c Tue Apr 2 19:07:11 2013 (r249030) +++ releng/8.4/lib/libc/stdlib/random.c Tue Apr 2 19:33:35 2013 (r249031) @@ -315,10 +315,9 @@ srandomdev() if (!done) { struct timeval tv; - 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 Apr 2 19:39:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1E136727; Tue, 2 Apr 2013 19:39:32 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 107E738E; Tue, 2 Apr 2013 19:39:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32JdVg4024826; Tue, 2 Apr 2013 19:39:31 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32JdVdE024825; Tue, 2 Apr 2013 19:39:31 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304021939.r32JdVdE024825@svn.freebsd.org> From: Konstantin Belousov Date: Tue, 2 Apr 2013 19:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249032 - head/sys/dev/md 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, 02 Apr 2013 19:39:32 -0000 Author: kib Date: Tue Apr 2 19:39:31 2013 New Revision: 249032 URL: http://svnweb.freebsd.org/changeset/base/249032 Log: Do not declare that preloaded md(4) supports unmapped bio requests, it does not. Reported by: Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/md/md.c Modified: head/sys/dev/md/md.c ============================================================================== --- head/sys/dev/md/md.c Tue Apr 2 19:33:35 2013 (r249031) +++ head/sys/dev/md/md.c Tue Apr 2 19:39:31 2013 (r249032) @@ -1008,7 +1008,15 @@ mdinit(struct md_s *sc) pp = g_new_providerf(gp, "md%d", sc->unit); pp->mediasize = sc->mediasize; pp->sectorsize = sc->sectorsize; - pp->flags |= G_PF_ACCEPT_UNMAPPED; + switch (sc->type) { + case MD_MALLOC: + case MD_VNODE: + case MD_SWAP: + pp->flags |= G_PF_ACCEPT_UNMAPPED; + break; + case MD_PRELOAD: + break; + } sc->gp = gp; sc->pp = pp; g_error_provider(pp, 0); From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 21:08:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 09615E7D; Tue, 2 Apr 2013 21:08:06 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) by mx1.freebsd.org (Postfix) with ESMTP id D928FAB8; Tue, 2 Apr 2013 21:08:05 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 2CEBAB943; Tue, 2 Apr 2013 17:08:05 -0400 (EDT) From: John Baldwin To: Brooks Davis Subject: Re: svn commit: r248352 - in stable/9: etc share/mk Date: Tue, 2 Apr 2013 15:50:43 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p25; KDE/4.5.5; amd64; ; ) References: <201303152132.r2FLWfwx076672@svn.freebsd.org> <201303200918.08803.jhb@freebsd.org> <20130402175903.GA85393@lor.one-eyed-alien.net> In-Reply-To: <20130402175903.GA85393@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201304021550.43701.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 02 Apr 2013 17:08:05 -0400 (EDT) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dmitry Morozovsky , svn-src-stable-9@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, 02 Apr 2013 21:08:06 -0000 On Tuesday, April 02, 2013 1:59:03 pm Brooks Davis wrote: > On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote: > > On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote: > > > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote: > > > > On Tue, 19 Mar 2013, Brooks Davis wrote: > > > > > > > > > > > Replace all known uses of ln in the build process with appropriate > > > > > > > install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK > > > > > > > variables. > > > > > > > > > > > > It seems this merge breaks ``make distribution'' and hence mergemaster if your > > > > > > base system is not updated yet (for example, while updating jail): > > > > > > > > > > Sorry for the delay in responding. I missed this yesterday. > > > > > > > > > > It works for me on a older 9.0-STABLE system where the base install > > > > > doesn't support -l. Did you build world or run "make toolchain" in that > > > > > source tree to build the bootstrap copy of install? > > > > > > > > Yes, this is after full ``make buildworld buildkernel'' process. > > > > > > I've found the problem thanks to misc/177055. It is that mergemaster > > > (and etcupdate) set MAKEOBJDIRPREFIX to something in their > > > temporary directory and thus deprive themselves of bootstrap tools. > > > Unfortunately, I don't see a trivial fix so I've backed this out for > > > now and will work on this in HEAD. > > > > Hummmm. In the case of etcupdate you can use 'etcupdate -B'. That is actually safe > > to do in the common case where you've just updated /usr/src and built the corresponding > > world in /usr/obj. It should possibly even by the default for etcupdate if a DESTDIR > > is not specified. > > Finally getting back to this... > > etcupdate -B would correct the immediate problem for etcupdate. I do > think that making it the default if the tree exists makes sense. It > won't be more broken than a cross installworld is. Hmmm, checking for the obj tree is a bit hackish. I'd rather it were more deterministic. I think I'd like to make it just default to -B and require a new -b flag to build a new tree, but perhaps have it check for a tree and error out if it doesn't exist and you don't give it -b? > I did a quick test when I first found this issue and it would be easy to > reuse the existing MAKEOBJDIRPREFIX in mergemaster as well. > > I think we'll want to update UPDATING to recommend that the > mergemaster -p stage (and the equivalent for etcupdate) be run using the > version in the source tree, not the installed one. I do wonder if it > would make sense for them to attempt to find and invoke that version so > simplify bootstrapping. Currently etcupdate doesn't implement something like -p. I need to add that as I would prefer to use its conflict resolution for adding users. (That would also let it serve as a full replacement for mergemaster for those who prefer it.) -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 21:31:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8F9DF617; Tue, 2 Apr 2013 21:31:15 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7EA99CD6; Tue, 2 Apr 2013 21:31:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32LVFZV058868; Tue, 2 Apr 2013 21:31:15 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32LVBtO058844; Tue, 2 Apr 2013 21:31:11 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201304022131.r32LVBtO058844@svn.freebsd.org> From: "Simon J. Gerraty" Date: Tue, 2 Apr 2013 21:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249033 - in head: contrib/bmake contrib/bmake/mk contrib/bmake/unit-tests usr.bin/bmake usr.bin/bmake/unit-tests 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, 02 Apr 2013 21:31:15 -0000 Author: sjg Date: Tue Apr 2 21:31:11 2013 New Revision: 249033 URL: http://svnweb.freebsd.org/changeset/base/249033 Log: Update to bmake-20130330 Added: head/contrib/bmake/unit-tests/export-env - copied unchanged from r248991, vendor/NetBSD/bmake/dist/unit-tests/export-env Modified: head/contrib/bmake/ChangeLog head/contrib/bmake/FILES head/contrib/bmake/Makefile head/contrib/bmake/bmake.1 head/contrib/bmake/bmake.cat1 head/contrib/bmake/boot-strap head/contrib/bmake/configure head/contrib/bmake/configure.in head/contrib/bmake/dir.c head/contrib/bmake/job.c head/contrib/bmake/job.h head/contrib/bmake/main.c head/contrib/bmake/make.1 head/contrib/bmake/make.h head/contrib/bmake/meta.c head/contrib/bmake/meta.h head/contrib/bmake/mk/ChangeLog head/contrib/bmake/mk/dirdeps.mk head/contrib/bmake/mk/gendirdeps.mk head/contrib/bmake/mk/install-mk head/contrib/bmake/mk/meta.stage.mk head/contrib/bmake/mk/meta2deps.py head/contrib/bmake/mk/meta2deps.sh head/contrib/bmake/mk/sys.dependfile.mk head/contrib/bmake/parse.c head/contrib/bmake/unit-tests/Makefile.in head/contrib/bmake/unit-tests/test.exp head/contrib/bmake/var.c head/usr.bin/bmake/Makefile head/usr.bin/bmake/config.h head/usr.bin/bmake/unit-tests/Makefile Directory Properties: head/contrib/bmake/ (props changed) Modified: head/contrib/bmake/ChangeLog ============================================================================== --- head/contrib/bmake/ChangeLog Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/ChangeLog Tue Apr 2 21:31:11 2013 (r249033) @@ -1,3 +1,47 @@ +2013-03-30 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130330 + Merge with NetBSD make, pick up + o meta.c: refine the handling of .OODATE in commands. + Rather than suppress command comparison for the entire script + as though .NOMETA_CMP had been used, only suppress it for the + one command line. + This allows something like ${.OODATE:M.NOMETA_CMP} to be used to + suppress comparison of a command without otherwise affecting it. + o make.1: document that + +2013-03-22 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130321 + yes, not quite right but its a cooler number. + Merge with NetBSD make, pick up + o parse.c: fix ParseGmakeExport to be portable + and add a unit-test. + * meta.c: call meta_init() before makefiles are read and if built + with filemon support set .MAKE.PATH_FILEMON to _PATH_FILEMON + this let's makefiles test for support. + Call meta_mode_init() to process .MAKE.MODE. + +2013-03-13 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130305 + Merge with NetBSD make, pick up + o run .STALE: target when a dependency from .depend is missing. + o job.c: add Job_RunTarget() for the above and .BEGIN + +2013-03-03 Simon J. Gerraty + + * Makefile (MAKE_VERSION): 20130303 + Merge with NetBSD make, pick up + o main.c: set .MAKE.OS to utsname.sysname + o job.c: more checks for read and poll errors + o var.c: lose VarChangeCase() saves 4% time + +2013-03-02 Simon J. Gerraty + + * boot-strap: remove MAKEOBJDIRPREFIX from environment since we + want to use MAKEOBJDIR + 2013-01-27 Simon J. Gerraty * Merge with NetBSD make, pick up Modified: head/contrib/bmake/FILES ============================================================================== --- head/contrib/bmake/FILES Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/FILES Tue Apr 2 21:31:11 2013 (r249033) @@ -102,6 +102,7 @@ unit-tests/dotwait unit-tests/error unit-tests/export unit-tests/export-all +unit-tests/export-env unit-tests/forloop unit-tests/forsubst unit-tests/hash Modified: head/contrib/bmake/Makefile ============================================================================== --- head/contrib/bmake/Makefile Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/Makefile Tue Apr 2 21:31:11 2013 (r249033) @@ -1,7 +1,7 @@ -# $Id: Makefile,v 1.5 2013/01/28 19:31:58 sjg Exp $ +# $Id: Makefile,v 1.10 2013/03/31 05:57:19 sjg Exp $ # Base version on src date -MAKE_VERSION= 20130123 +MAKE_VERSION= 20130330 PROG= bmake @@ -187,14 +187,14 @@ MANDIR= ${SHAREDIR}/man .if !exists(.depend) ${OBJS}: config.h .endif -.if ${MK_AUTOCONF_MK} == "yes" -.include -.endif # make sure that MAKE_VERSION gets updated. main.o: ${SRCS} ${MAKEFILE} # start-delete2 for bsd.after-import.mk +.if ${MK_AUTOCONF_MK} == "yes" +.include +.endif SHARE_MK?=${SHAREDIR}/mk MKSRC=${srcdir}/mk INSTALL?=${srcdir}/install-sh Modified: head/contrib/bmake/bmake.1 ============================================================================== --- head/contrib/bmake/bmake.1 Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/bmake.1 Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.210 2013/01/27 18:52:01 sjg Exp $ +.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd January 23, 2013 +.Dd March 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -874,6 +874,13 @@ by appending their names to is re-exported whenever .Ql Va .MAKEOVERRIDES is modified. +.It Va .MAKE.PATH_FILEMON +If +.Nm +was built with +.Xr filemon 4 +support, this is set to the path of the device node. +This allows makefiles to test for this support. .It Va .MAKE.PID The process-id of .Nm . @@ -1757,6 +1764,20 @@ targets. Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the target will still be out of date. +The same effect applies to any command line that uses the variable +.Va .OODATE , +which can be used for that purpose even when not otherwise needed or desired: +.Bd -literal -offset indent + +skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + +.Ed +The +.Cm \&:M +pattern suppresses any expansion of the unwanted variable. .It Ic .NOPATH Do not search for the target in the directories specified by .Ic .PATH . @@ -2008,6 +2029,10 @@ If no sources are specified, the .Ic .SILENT attribute is applied to every command in the file. +.It Ic .STALE +This target gets run when a dependency file contains stale entries, having +.Va .ALLSRC +set to the name of that dependency file. .It Ic .SUFFIXES Each source specifies a suffix to .Nm . Modified: head/contrib/bmake/bmake.cat1 ============================================================================== --- head/contrib/bmake/bmake.cat1 Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/bmake.cat1 Tue Apr 2 21:31:11 2013 (r249033) @@ -565,6 +565,11 @@ VVAARRIIAABBLLEE AASSSSIIGG `MAKEFLAGS' is re-exported whenever `_._M_A_K_E_O_V_E_R_R_I_D_E_S' is modified. + _._M_A_K_E_._P_A_T_H___F_I_L_E_M_O_N + If bbmmaakkee was built with filemon(4) support, this is set + to the path of the device node. This allows makefiles to + test for this support. + _._M_A_K_E_._P_I_D The process-id of bbmmaakkee. _._M_A_K_E_._P_P_I_D The parent process-id of bbmmaakkee. @@ -1106,7 +1111,19 @@ SSPPEECCIIAALL SSOOUURRCCEE Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the - target will still be out of date. + target will still be out of date. The same effect applies to + any command line that uses the variable _._O_O_D_A_T_E, which can be + used for that purpose even when not otherwise needed or + desired: + + + skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + + The ::MM pattern suppresses any expansion of the unwanted vari- + able. ..NNOOPPAATTHH Do not search for the target in the directories specified by ..PPAATTHH. @@ -1278,6 +1295,9 @@ SSPPEECCIIAALL TTAARRGGEETT sources are specified, the ..SSIILLEENNTT attribute is applied to every command in the file. + ..SSTTAALLEE This target gets run when a dependency file contains stale + entries, having _._A_L_L_S_R_C set to the name of that dependency file. + ..SSUUFFFFIIXXEESS Each source specifies a suffix to bbmmaakkee. If no sources are specified, any previously specified suffixes are deleted. It @@ -1340,4 +1360,4 @@ BBUUGGSS There is no way of escaping a space character in a filename. -NetBSD 5.1 January 23, 2013 NetBSD 5.1 +NetBSD 5.1 March 30, 2013 NetBSD 5.1 Modified: head/contrib/bmake/boot-strap ============================================================================== --- head/contrib/bmake/boot-strap Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/boot-strap Tue Apr 2 21:31:11 2013 (r249033) @@ -111,7 +111,7 @@ # Simon J. Gerraty # RCSid: -# $Id: boot-strap,v 1.42 2013/01/25 20:20:33 sjg Exp $ +# $Id: boot-strap,v 1.43 2013/03/02 18:55:23 sjg Exp $ # # @(#) Copyright (c) 2001 Simon J. Gerraty # @@ -159,6 +159,9 @@ source_rc() { cmd_args="$@" +# clear some things from the environment that we care about +unset MAKEOBJDIR MAKEOBJDIRPREFIX + # --install[-host-target] will set this INSTALL_PREFIX= # other things we pass to install step Modified: head/contrib/bmake/configure ============================================================================== Binary file (source and/or target). No diff available. Modified: head/contrib/bmake/configure.in ============================================================================== --- head/contrib/bmake/configure.in Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/configure.in Tue Apr 2 21:31:11 2013 (r249033) @@ -1,10 +1,10 @@ dnl dnl RCSid: -dnl $Id: configure.in,v 1.46 2012/12/28 21:28:18 sjg Exp $ +dnl $Id: configure.in,v 1.48 2013/03/04 21:25:57 sjg Exp $ dnl dnl Process this file with autoconf to produce a configure script dnl -AC_INIT([bmake], [20121212], [sjg@NetBSD.org]) +AC_INIT([bmake], [20130303], [sjg@NetBSD.org]) AC_CONFIG_HEADER(config.h) dnl make srcdir absolute Modified: head/contrib/bmake/dir.c ============================================================================== --- head/contrib/bmake/dir.c Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/dir.c Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $ */ +/* $NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"; +static char rcsid[] = "$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)dir.c 8.2 (Berkeley) 1/2/94"; #else -__RCSID("$NetBSD: dir.c,v 1.65 2012/06/12 19:21:50 joerg Exp $"); +__RCSID("$NetBSD: dir.c,v 1.67 2013/03/05 22:01:43 christos Exp $"); #endif #endif /* not lint */ #endif @@ -145,6 +145,7 @@ __RCSID("$NetBSD: dir.c,v 1.65 2012/06/1 #include "make.h" #include "hash.h" #include "dir.h" +#include "job.h" /* * A search path consists of a Lst of Path structures. A Path structure @@ -1463,9 +1464,11 @@ Dir_MTime(GNode *gn, Boolean recheck) * so that we give that to the compiler. */ gn->path = bmake_strdup(fullName); - fprintf(stdout, - "%s: ignoring stale %s for %s, found %s\n", - progname, makeDependfile, gn->name, fullName); + if (!Job_RunTarget(".STALE", gn->fname)) + fprintf(stdout, + "%s: %s, %d: ignoring stale %s for %s, " + "found %s\n", progname, gn->fname, gn->lineno, + makeDependfile, gn->name, fullName); } } } Modified: head/contrib/bmake/job.c ============================================================================== --- head/contrib/bmake/job.c Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/job.c Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $ */ +/* $NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -70,14 +70,14 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $"; +static char rcsid[] = "$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $"; #else #include #ifndef lint #if 0 static char sccsid[] = "@(#)job.c 8.2 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: job.c,v 1.165 2013/01/26 15:52:59 christos Exp $"); +__RCSID("$NetBSD: job.c,v 1.172 2013/03/05 22:01:43 christos Exp $"); #endif #endif /* not lint */ #endif @@ -142,6 +142,7 @@ __RCSID("$NetBSD: job.c,v 1.165 2013/01/ #include #include "wait.h" +#include #include #include #if !defined(USE_SELECT) && defined(HAVE_POLL_H) @@ -1245,8 +1246,10 @@ Job_CheckCommands(GNode *gn, void (*abor static const char msg[] = ": don't know how to make"; if (gn->flags & FROM_DEPEND) { - fprintf(stdout, "%s: ignoring stale %s for %s\n", - progname, makeDependfile, gn->name); + if (!Job_RunTarget(".STALE", gn->fname)) + fprintf(stdout, "%s: %s, %d: ignoring stale %s for %s\n", + progname, gn->fname, gn->lineno, makeDependfile, + gn->name); return TRUE; } @@ -2063,32 +2066,45 @@ Job_CatchOutput(void) (void)fflush(stdout); /* The first fd in the list is the job token pipe */ - nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); + do { + nready = poll(fds + 1 - wantToken, nfds - 1 + wantToken, POLL_MSEC); + } while (nready < 0 && errno == EINTR); - if (nready < 0 || readyfd(&childExitJob)) { + if (nready < 0) + Punt("poll: %s", strerror(errno)); + + if (nready > 0 && readyfd(&childExitJob)) { char token = 0; - nready -= 1; - while (read(childExitJob.inPipe, &token, 1) == -1 && errno == EAGAIN) - continue; - if (token == DO_JOB_RESUME[0]) - /* Complete relay requested from our SIGCONT handler */ - JobRestartJobs(); - Job_CatchChildren(); + ssize_t count; + count = read(childExitJob.inPipe, &token, 1); + switch (count) { + case 0: + Punt("unexpected eof on token pipe"); + case -1: + Punt("token pipe read: %s", strerror(errno)); + case 1: + if (token == DO_JOB_RESUME[0]) + /* Complete relay requested from our SIGCONT handler */ + JobRestartJobs(); + break; + default: + abort(); + } + --nready; } - if (nready <= 0) - return; - - if (wantToken && readyfd(&tokenWaitJob)) - nready--; + Job_CatchChildren(); + if (nready == 0) + return; for (i = 2; i < nfds; i++) { if (!fds[i].revents) continue; job = jobfds[i]; - if (job->job_state != JOB_ST_RUNNING) - continue; - JobDoOutput(job, FALSE); + if (job->job_state == JOB_ST_RUNNING) + JobDoOutput(job, FALSE); + if (--nready == 0) + return; } } @@ -2179,8 +2195,6 @@ Job_SetPrefix(void) void Job_Init(void) { - GNode *begin; /* node for commands to do at the very start */ - /* Allocate space for all the job info */ job_table = bmake_malloc(maxJobs * sizeof *job_table); memset(job_table, 0, maxJobs * sizeof *job_table); @@ -2256,15 +2270,7 @@ Job_Init(void) ADDSIG(SIGCONT, JobContinueSig) #undef ADDSIG - begin = Targ_FindNode(".BEGIN", TARG_NOCREATE); - - if (begin != NULL) { - JobRun(begin); - if (begin->made == ERROR) { - PrintOnError(begin, "\n\nStop."); - exit(1); - } - } + (void)Job_RunTarget(".BEGIN", NULL); postCommands = Targ_FindNode(".END", TARG_CREATE); } @@ -2930,6 +2936,38 @@ Job_TokenWithdraw(void) return TRUE; } +/*- + *----------------------------------------------------------------------- + * Job_RunTarget -- + * Run the named target if found. If a filename is specified, then + * set that to the sources. + * + * Results: + * None + * + * Side Effects: + * exits if the target fails. + * + *----------------------------------------------------------------------- + */ +Boolean +Job_RunTarget(const char *target, const char *fname) { + GNode *gn = Targ_FindNode(target, TARG_NOCREATE); + + if (gn == NULL) + return FALSE; + + if (fname) + Var_Set(ALLSRC, fname, gn, 0); + + JobRun(gn); + if (gn->made == ERROR) { + PrintOnError(gn, "\n\nStop."); + exit(1); + } + return TRUE; +} + #ifdef USE_SELECT int emul_poll(struct pollfd *fd, int nfd, int timeout) Modified: head/contrib/bmake/job.h ============================================================================== --- head/contrib/bmake/job.h Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/job.h Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: job.h,v 1.40 2010/09/13 15:36:57 sjg Exp $ */ +/* $NetBSD: job.h,v 1.41 2013/03/05 22:01:44 christos Exp $ */ /* * Copyright (c) 1988, 1989, 1990 The Regents of the University of California. @@ -268,5 +268,6 @@ void Job_TokenReturn(void); Boolean Job_TokenWithdraw(void); void Job_ServerStart(int, int, int); void Job_SetPrefix(void); +Boolean Job_RunTarget(const char *, const char *); #endif /* _JOB_H_ */ Modified: head/contrib/bmake/main.c ============================================================================== --- head/contrib/bmake/main.c Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/main.c Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $ */ +/* $NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -69,7 +69,7 @@ */ #ifndef MAKE_NATIVE -static char rcsid[] = "$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $"; +static char rcsid[] = "$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"; #else #include #ifndef lint @@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19 #if 0 static char sccsid[] = "@(#)main.c 8.3 (Berkeley) 3/19/94"; #else -__RCSID("$NetBSD: main.c,v 1.205 2013/01/26 15:53:00 christos Exp $"); +__RCSID("$NetBSD: main.c,v 1.210 2013/03/23 05:31:29 sjg Exp $"); #endif #endif /* not lint */ #endif @@ -119,9 +119,7 @@ __RCSID("$NetBSD: main.c,v 1.205 2013/01 #include #include #include -#ifdef MAKE_NATIVE #include -#endif #include "wait.h" #include @@ -768,7 +766,7 @@ MakeMode(const char *mode) } #if USE_META if (strstr(mode, "meta")) - meta_init(mode); + meta_mode_init(mode); #endif } if (mp) @@ -813,9 +811,7 @@ main(int argc, char **argv) static char defsyspath[] = _PATH_DEFSYSPATH; char found_path[MAXPATHLEN + 1]; /* for searching for sys.mk */ struct timeval rightnow; /* to initialize random seed */ -#ifdef MAKE_NATIVE struct utsname utsname; -#endif /* default to writing debug to stderr */ debug_file = stderr; @@ -834,7 +830,7 @@ main(int argc, char **argv) progname++; else progname = argv[0]; -#ifdef RLIMIT_NOFILE +#if defined(MAKE_NATIVE) || (defined(HAVE_SETRLIMIT) && defined(RLIMIT_NOFILE)) /* * get rid of resource limit on file descriptors */ @@ -848,6 +844,12 @@ main(int argc, char **argv) } #endif + if (uname(&utsname) == -1) { + (void)fprintf(stderr, "%s: uname failed (%s).\n", progname, + strerror(errno)); + exit(2); + } + /* * Get the name of this type of MACHINE from utsname * so we can share an executable for similar machines. @@ -858,11 +860,6 @@ main(int argc, char **argv) */ if (!machine) { #ifdef MAKE_NATIVE - if (uname(&utsname) == -1) { - (void)fprintf(stderr, "%s: uname failed (%s).\n", progname, - strerror(errno)); - exit(2); - } machine = utsname.machine; #else #ifdef MAKE_MACHINE @@ -892,6 +889,7 @@ main(int argc, char **argv) */ Var_Init(); /* Initialize the lists of variables for * parsing arguments */ + Var_Set(".MAKE.OS", utsname.sysname, VAR_GLOBAL, 0); Var_Set("MACHINE", machine, VAR_GLOBAL, 0); Var_Set("MACHINE_ARCH", machine_arch, VAR_GLOBAL, 0); #ifdef MAKE_VERSION @@ -987,6 +985,9 @@ main(int argc, char **argv) } Job_SetPrefix(); +#ifdef USE_META + meta_init(); +#endif /* * First snag any flags out of the MAKE environment variable. * (Note this is *not* MAKEFLAGS since /bin/make uses that and it's @@ -1697,7 +1698,7 @@ Finish(int errors) } /* - * enunlink -- + * eunlink -- * Remove a file carefully, avoiding directories. */ int Modified: head/contrib/bmake/make.1 ============================================================================== --- head/contrib/bmake/make.1 Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/make.1 Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -.\" $NetBSD: make.1,v 1.210 2013/01/27 18:52:01 sjg Exp $ +.\" $NetBSD: make.1,v 1.213 2013/03/31 05:49:51 sjg Exp $ .\" .\" Copyright (c) 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -29,7 +29,7 @@ .\" .\" from: @(#)make.1 8.4 (Berkeley) 3/19/94 .\" -.Dd January 23, 2013 +.Dd March 30, 2013 .Dt MAKE 1 .Os .Sh NAME @@ -874,6 +874,13 @@ by appending their names to is re-exported whenever .Ql Va .MAKEOVERRIDES is modified. +.It Va .MAKE.PATH_FILEMON +If +.Nm +was built with +.Xr filemon 4 +support, this is set to the path of the device node. +This allows makefiles to test for this support. .It Va .MAKE.PID The process-id of .Nm . @@ -1757,6 +1764,20 @@ targets. Ignore differences in commands when deciding if target is out of date. This is useful if the command contains a value which always changes. If the number of commands change, though, the target will still be out of date. +The same effect applies to any command line that uses the variable +.Va .OODATE , +which can be used for that purpose even when not otherwise needed or desired: +.Bd -literal -offset indent + +skip-compare-for-some: + @echo this will be compared + @echo this will not ${.OODATE:M.NOMETA_CMP} + @echo this will also be compared + +.Ed +The +.Cm \&:M +pattern suppresses any expansion of the unwanted variable. .It Ic .NOPATH Do not search for the target in the directories specified by .Ic .PATH . @@ -2008,6 +2029,10 @@ If no sources are specified, the .Ic .SILENT attribute is applied to every command in the file. +.It Ic .STALE +This target gets run when a dependency file contains stale entries, having +.Va .ALLSRC +set to the name of that dependency file. .It Ic .SUFFIXES Each source specifies a suffix to .Nm . Modified: head/contrib/bmake/make.h ============================================================================== --- head/contrib/bmake/make.h Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/make.h Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: make.h,v 1.89 2012/06/12 19:21:51 joerg Exp $ */ +/* $NetBSD: make.h,v 1.90 2013/02/25 01:57:14 dholland Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -103,7 +103,7 @@ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \ (__GNUC__ > (x))) #else /* defined(__GNUC__) */ -#define MAKE_GNUC_PREREQx, y) 0 +#define MAKE_GNUC_PREREQ(x, y) 0 #endif /* defined(__GNUC__) */ #if MAKE_GNUC_PREREQ(2, 7) Modified: head/contrib/bmake/meta.c ============================================================================== --- head/contrib/bmake/meta.c Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/meta.c Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.c,v 1.26 2013/01/19 04:23:37 sjg Exp $ */ +/* $NetBSD: meta.c,v 1.29 2013/03/31 05:49:51 sjg Exp $ */ /* * Implement 'meta' mode. @@ -539,8 +539,24 @@ boolValue(char *s) return TRUE; } +/* + * Initialization we need before reading makefiles. + */ +void +meta_init() +{ +#ifdef USE_FILEMON + /* this allows makefiles to test if we have filemon support */ + Var_Set(".MAKE.PATH_FILEMON", _PATH_FILEMON, VAR_GLOBAL, 0); +#endif +} + + +/* + * Initialization we need after reading makefiles. + */ void -meta_init(const char *make_mode) +meta_mode_init(const char *make_mode) { static int once = 0; char *cp; @@ -1037,6 +1053,7 @@ meta_oodate(GNode *gn, Boolean oodate) char *tp = Lst_Datum(ln); Lst_Remove(missingFiles, ln); free(tp); + ln = NULL; /* we're done with it */ } } break; @@ -1196,17 +1213,19 @@ meta_oodate(GNode *gn, Boolean oodate) oodate = TRUE; } else { char *cmd = (char *)Lst_Datum(ln); + Boolean hasOODATE = FALSE; - if (!needOODATE) { - if (strstr(cmd, "$?")) - needOODATE = TRUE; - else if ((cp = strstr(cmd, ".OODATE"))) { - /* check for $[{(].OODATE[)}] */ - if (cp > cmd + 2 && cp[-2] == '$') - needOODATE = TRUE; - } - if (needOODATE && DEBUG(META)) - fprintf(debug_file, "%s: %d: cannot compare commands using .OODATE\n", fname, lineno); + if (strstr(cmd, "$?")) + hasOODATE = TRUE; + else if ((cp = strstr(cmd, ".OODATE"))) { + /* check for $[{(].OODATE[:)}] */ + if (cp > cmd + 2 && cp[-2] == '$') + hasOODATE = TRUE; + } + if (hasOODATE) { + needOODATE = TRUE; + if (DEBUG(META)) + fprintf(debug_file, "%s: %d: cannot compare command using .OODATE\n", fname, lineno); } cmd = Var_Subst(NULL, cmd, gn, TRUE); @@ -1235,7 +1254,7 @@ meta_oodate(GNode *gn, Boolean oodate) if (buf[x - 1] == '\n') buf[x - 1] = '\0'; } - if (!needOODATE && + if (!hasOODATE && !(gn->type & OP_NOMETA_CMP) && strcmp(p, cmd) != 0) { if (DEBUG(META)) Modified: head/contrib/bmake/meta.h ============================================================================== --- head/contrib/bmake/meta.h Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/meta.h Tue Apr 2 21:31:11 2013 (r249033) @@ -1,4 +1,4 @@ -/* $NetBSD: meta.h,v 1.2 2011/03/30 22:03:49 sjg Exp $ */ +/* $NetBSD: meta.h,v 1.3 2013/03/23 05:31:29 sjg Exp $ */ /* * Things needed for 'meta' mode. @@ -41,7 +41,8 @@ typedef struct BuildMon { extern Boolean useMeta; struct Job; /* not defined yet */ -void meta_init(const char *); +void meta_init(void); +void meta_mode_init(const char *); void meta_job_start(struct Job *, GNode *); void meta_job_child(struct Job *); void meta_job_error(struct Job *, GNode *, int, int); Modified: head/contrib/bmake/mk/ChangeLog ============================================================================== --- head/contrib/bmake/mk/ChangeLog Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/mk/ChangeLog Tue Apr 2 21:31:11 2013 (r249033) @@ -1,3 +1,71 @@ +2013-03-30 Simon J. Gerraty + + * meta2deps.py (MetaFile.__init__): ensure self.cwd is initialized. + * install-mk (MK_VERSION): bump version + +2013-03-21 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * gendirdeps.mk: do not apply :tA to DPADD entries, since we lose + any trailing /., rather apply :tA only when needed. + * gendirdeps.mk: better mimic meta2deps handling of .dirdep files. + * meta.stage.mk (LN_CP_SCRIPT): Add LnCp to do the ln||cp dance + consistently. + * dirdeps.mk: better describe the dance in sys.mk for TARGET_SPEC. + +2013-03-18 Simon J. Gerraty + + * gendirdeps.mk: revert the dance around .MAKE.DEPENDFILE_DEFAULT + it is simpler to just not update when say building for "host" + (where we know we apply filters to DIRDEPS), and using a + non-machine qualified dependfile. + +2013-03-16 Simon J. Gerraty + + * dirdeps.mk: improve DIRDEPS filtering by allowing DEP_SKIP_DIR + and DEP_DIRDEPS_FILTER to vary by DEP_MACHINE and DEP_TARGET_SPEC + * gendirdeps.mk: ensure _objroot has trailing / if it needs it. + * meta2deps.py: if machine is "host", then also trim + self.host_target from any OBJROOTS. + + +2013-03-11 Simon J. Gerraty + + * gendirdeps.mk: if .MAKE.DEPENDFILE_DEFAULT is not machine + qualified but _DEPENDFILE is, and .MAKE.DEPENDFILE_DEFAULT exists + but _DEPENDFILE does not, compare the new _DEPENDFILE against + .MAKE.DEPENDFILE_DEFAULT and discard if the same. + +2013-03-08 Simon J. Gerraty + + * meta.stage.mk: use STAGE_TARGETS to control .ORDER + and hook to all: via staging: + +2013-03-07 Simon J. Gerraty + + * sys.dependfile.mk (.MAKE.DEPENDFILE_DEFAULT): + use a separate variable for the default .MAKE.DEPENDFILE value + so that it can be controlled independently of + .MAKE.DEPENDFILE_PREFERENCE + + * meta.stage.mk: throw error if cp fails etc. + Stage*() return early if passed no args. + .ORDER stage_* + +2013-03-03 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version + * gendirdeps.mk: handle multiple M2D_OBJROOTS better. + +2013-02-10 Simon J. Gerraty + + * install-mk (MK_VERSION): bump version to 20130210 + * import latest dirdeps.mk, gendirdeps.mk and meta2deps.py + from Juniper. + o dirdeps.mk now fully supports TARGET_SPEC consisting of more + than just MACHINE. + o no longer use DEP_MACHINE from Makefile.depend* so remove it. + 2013-01-23 Simon J. Gerraty * install-mk (MK_VERSION): bump version to 20130123 Modified: head/contrib/bmake/mk/dirdeps.mk ============================================================================== --- head/contrib/bmake/mk/dirdeps.mk Tue Apr 2 19:39:31 2013 (r249032) +++ head/contrib/bmake/mk/dirdeps.mk Tue Apr 2 21:31:11 2013 (r249033) @@ -1,6 +1,7 @@ -# $Id: dirdeps.mk,v 1.23 2012/11/06 05:44:03 sjg Exp $ +# $Id: dirdeps.mk,v 1.28 2013/03/25 21:11:43 sjg Exp $ -# Copyright (c) 2010-2012, Juniper Networks, Inc. +# Copyright (c) 2010-2013, Juniper Networks, Inc. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -33,21 +34,31 @@ # This is what we do with DIRDEPS # DIRDEPS: -# This is a list of directories - relative to SRCTOP, it is only -# of interest to .MAKE.LEVEL 0. +# This is a list of directories - relative to SRCTOP, it is +# normally only of interest to .MAKE.LEVEL 0. # In some cases the entry may be qualified with a . -# suffix, for example to force building something for the pseudo +# or . suffix (see TARGET_SPEC_VARS below), +# for example to force building something for the pseudo # machines "host" or "common" regardless of current ${MACHINE}. -# All unqualified entries end up being qualified with .${MACHINE} -# and _DIRDEPS_USE below, uses the suffix to set MACHINE +# +# All unqualified entries end up being qualified with .${TARGET_SPEC} +# and partially qualified (if TARGET_SPEC_VARS has multiple +# entries) are also expanded to a full .. +# The _DIRDEPS_USE target uses the suffix to set TARGET_SPEC # correctly when visiting each entry. # -# Each entry is also converted into a set of paths to look for -# Makefile.depend. to learn the dependencies of each. -# Each Makefile.depend. sets DEP_RELDIR to be the +# The fully qualified directory entries are used to construct a +# dependency graph that will drive the build later. +# +# Also, for each fully qualified directory target, we will search +# using ${.MAKE.DEPENDFILE_PREFERENCE} to find additional +# dependencies. We use Makefile.depend (default value for +# .MAKE.DEPENDFILE_PREFIX) to refer to these makefiles to +# distinguish them from others. +# +# Each Makefile.depend file sets DEP_RELDIR to be the # the RELDIR (path relative to SRCTOP) for its directory, and -# DEP_MACHINE to its suffix (), further since -# each Makefile.depend. includes dirdeps.mk, this +# since each Makefile.depend file includes dirdeps.mk, this # processing is recursive and results in .MAKE.LEVEL 0 learning the # dependencies of the tree wrt the initial directory (_DEP_RELDIR). # @@ -55,38 +66,49 @@ # Indicates whether .MAKE.LEVEL 0 builds anything: # if "no" sub-makes are used to build everything, # if "yes" sub-makes are only used to build for other machines. +# It is best to use "no", but this can require fixing some +# makefiles to not do anything at .MAKE.LEVEL 0. # # TARGET_SPEC_VARS -# All the description above (and below) assumes is the -# only data needed to control the build. -# This is not always the case. So in addition to setting -# MACHINE in the build environment we set TARGET_SPEC which is -# composed of the values of TARGET_SPEC_VARS separated by -# commas. The default is just MACHINE. +# The default value is just MACHINE, and for most environments +# this is sufficient. The _DIRDEPS_USE target actually sets +# both MACHINE and TARGET_SPEC to the suffix of the current +# target so that in the general case TARGET_SPEC can be ignored. # -# If more that MACHINE is needed then sys.mk needs to decompose +# If more than MACHINE is needed then sys.mk needs to decompose # TARGET_SPEC and set the relevant variables accordingly. -# It is important that MACHINE be included in TARGET_SPEC_VARS -# since if there is more the value passed as MACHINE will infact -# be the TARGET_SPEC. +# It is important that MACHINE be included in and actually be +# the first member of TARGET_SPEC_VARS. This allows other +# variables to be considered optional, and some of the treatment +# below relies on MACHINE being the first entry. # Note: TARGET_SPEC cannot contain any '.'s so the target -# tripple used by compiler folk won't work (directly anyway). +# triple used by compiler folk won't work (directly anyway). # # For example: # -# # variables other than MACHINE might be optional +# # Always list MACHINE first, +# # other variables might be optional. # TARGET_SPEC_VARS = MACHINE TARGET_OS # .if ${TARGET_SPEC:Uno:M*,*} != "" # _tspec := ${TARGET_SPEC:S/,/ /g} # MACHINE := ${_tspec:[1]} # TARGET_OS := ${_tspec:[2]} # # etc. +# # We need to stop that TARGET_SPEC affecting any submakes +# # and deal with MACHINE=${TARGET_SPEC} in the environment. +# TARGET_SPEC = +# # export but do not track +# .export-env TARGET_SPEC +# .export ${TARGET_SPEC_VARS} # .for v in ${TARGET_SPEC_VARS:O:u} # .if empty($v) # .undef $v # .endif # .endfor # .endif +# # make sure we know what TARGET_SPEC is +# # as we may need it to find Makefile.depend* +# TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} # .if ${.MAKE.LEVEL} == 0 @@ -100,14 +122,48 @@ # do some setup we only need once _CURDIR ?= ${.CURDIR} +# make sure these are empty to start with +_DEP_TARGET_SPEC = +_DIRDEP_CHECKED = + # If TARGET_SPEC_VARS is other than just MACHINE # it should be set by sys.mk or similar by now. # TARGET_SPEC must not contain any '.'s. TARGET_SPEC_VARS ?= MACHINE +# this is what we started with TARGET_SPEC = ${TARGET_SPEC_VARS:@v@${$v:U}@:ts,} +# this is what we mostly use below +DEP_TARGET_SPEC = ${TARGET_SPEC_VARS:S,^,DEP_,:@v@${$v:U}@:ts,} +# make sure we have defaults +.for v in ${TARGET_SPEC_VARS} +DEP_$v ?= ${$v} +.endfor + +.if ${TARGET_SPEC_VARS:[#]} > 1 +# Ok, this gets more complex (putting it mildly). +# In order to stay sane, we need to ensure that all the build_dirs +# we compute below are fully qualified wrt DEP_TARGET_SPEC. +# The makefiles may only partially specify (eg. MACHINE only), +# so we need to construct a set of modifiers to fill in the gaps. +# jot 10 should output 1 2 3 .. 10 +JOT ?= jot +_tspec_x := ${${JOT} ${TARGET_SPEC_VARS:[#]}:L:sh} +# this handles unqualified entries +M_dep_qual_fixes = C;(/[^/.,]+)$$;\1.${DEP_TARGET_SPEC}; +# there needs to be at least one item missing for these to make sense +.for i in ${_tspec_x:[2..-1]} +_tspec_m$i := ${TARGET_SPEC_VARS:[2..$i]:@w@[^,]+@:ts,} +_tspec_a$i := ,${TARGET_SPEC_VARS:[$i..-1]:@v@$${DEP_$v}@:ts,} +M_dep_qual_fixes += C;(\.${_tspec_m$i})$$;\1${_tspec_a$i}; +.endfor *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 21:34:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 864897DE; Tue, 2 Apr 2013 21:34:39 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 786E3CFD; Tue, 2 Apr 2013 21:34:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32LYdAl059382; Tue, 2 Apr 2013 21:34:39 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32LYdrc059381; Tue, 2 Apr 2013 21:34:39 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304022134.r32LYdrc059381@svn.freebsd.org> From: Jilles Tjoelker Date: Tue, 2 Apr 2013 21:34:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249034 - head/bin/sh 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, 02 Apr 2013 21:34:39 -0000 Author: jilles Date: Tue Apr 2 21:34:38 2013 New Revision: 249034 URL: http://svnweb.freebsd.org/changeset/base/249034 Log: sh: Write as much into the heredoc pipe as possible, to avoid forking. Use non-blocking I/O to write as much as the pipe will accept (often 64K, but it can be as little as 4K), avoiding the need for the ugly PIPESIZE constant. If PIPESIZE was set too high, a deadlock would occur. Modified: head/bin/sh/redir.c Modified: head/bin/sh/redir.c ============================================================================== --- head/bin/sh/redir.c Tue Apr 2 21:31:11 2013 (r249033) +++ head/bin/sh/redir.c Tue Apr 2 21:34:38 2013 (r249034) @@ -64,7 +64,6 @@ __FBSDID("$FreeBSD$"); #define EMPTY -2 /* marks an unused slot in redirtab */ #define CLOSED -1 /* fd was not open before redir */ -#define PIPESIZE 4096 /* amount of buffering in a pipe */ MKINIT @@ -253,7 +252,9 @@ openhere(union node *redir) { char *p; int pip[2]; - int len = 0; + size_t len = 0; + int flags; + ssize_t written = 0; if (pipe(pip) < 0) error("Pipe call failed: %s", strerror(errno)); @@ -263,9 +264,16 @@ openhere(union node *redir) else p = redir->nhere.doc->narg.text; len = strlen(p); - if (len <= PIPESIZE) { - xwrite(pip[1], p, len); + if (len == 0) goto out; + flags = fcntl(pip[1], F_GETFL, 0); + if (flags != -1 && fcntl(pip[1], F_SETFL, flags | O_NONBLOCK) != -1) { + written = write(pip[1], p, len); + if (written < 0) + written = 0; + if ((size_t)written == len) + goto out; + fcntl(pip[1], F_SETFL, flags); } if (forkshell((struct job *)NULL, (union node *)NULL, FORK_NOJOB) == 0) { @@ -275,7 +283,7 @@ openhere(union node *redir) signal(SIGHUP, SIG_IGN); signal(SIGTSTP, SIG_IGN); signal(SIGPIPE, SIG_DFL); - xwrite(pip[1], p, len); + xwrite(pip[1], p + written, len - written); _exit(0); } out: From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 21:35:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EC6DEA33; Tue, 2 Apr 2013 21:35:30 +0000 (UTC) (envelope-from brooks@lor.one-eyed-alien.net) Received: from lor.one-eyed-alien.net (lor.one-eyed-alien.net [69.66.77.232]) by mx1.freebsd.org (Postfix) with ESMTP id 3F7FFD0C; Tue, 2 Apr 2013 21:35:30 +0000 (UTC) Received: from lor.one-eyed-alien.net (localhost [127.0.0.1]) by lor.one-eyed-alien.net (8.14.5/8.14.5) with ESMTP id r32LZYw8086446; Tue, 2 Apr 2013 16:35:34 -0500 (CDT) (envelope-from brooks@lor.one-eyed-alien.net) Received: (from brooks@localhost) by lor.one-eyed-alien.net (8.14.5/8.14.5/Submit) id r32LZYiG086445; Tue, 2 Apr 2013 16:35:34 -0500 (CDT) (envelope-from brooks) Date: Tue, 2 Apr 2013 16:35:34 -0500 From: Brooks Davis To: John Baldwin Subject: Re: svn commit: r248352 - in stable/9: etc share/mk Message-ID: <20130402213534.GA86221@lor.one-eyed-alien.net> References: <201303152132.r2FLWfwx076672@svn.freebsd.org> <201303200918.08803.jhb@freebsd.org> <20130402175903.GA85393@lor.one-eyed-alien.net> <201304021550.43701.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="0F1p//8PRICkK4MW" Content-Disposition: inline In-Reply-To: <201304021550.43701.jhb@freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Brooks Davis , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , svn-src-stable-9@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, 02 Apr 2013 21:35:31 -0000 --0F1p//8PRICkK4MW Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Apr 02, 2013 at 03:50:43PM -0400, John Baldwin wrote: > On Tuesday, April 02, 2013 1:59:03 pm Brooks Davis wrote: > > On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote: > > > On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote: > > > > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote: > > > > > On Tue, 19 Mar 2013, Brooks Davis wrote: > > > > >=20 > > > > > > > > Replace all known uses of ln in the build process with ap= propriate > > > > > > > > install -l invocations via new INSTALL_LINK and INSTALL_S= YMLINK > > > > > > > > variables. > > > > > > >=20 > > > > > > > It seems this merge breaks ``make distribution'' and hence me= rgemaster if your=20 > > > > > > > base system is not updated yet (for example, while updating j= ail): > > > > > >=20 > > > > > > Sorry for the delay in responding. I missed this yesterday. > > > > > >=20 > > > > > > It works for me on a older 9.0-STABLE system where the base ins= tall > > > > > > doesn't support -l. Did you build world or run "make toolchain= " in that > > > > > > source tree to build the bootstrap copy of install? > > > > >=20 > > > > > Yes, this is after full ``make buildworld buildkernel'' process. > > > >=20 > > > > I've found the problem thanks to misc/177055. It is that mergemast= er > > > > (and etcupdate) set MAKEOBJDIRPREFIX to something in their > > > > temporary directory and thus deprive themselves of bootstrap tools. > > > > Unfortunately, I don't see a trivial fix so I've backed this out for > > > > now and will work on this in HEAD. > > >=20 > > > Hummmm. In the case of etcupdate you can use 'etcupdate -B'. That i= s actually safe > > > to do in the common case where you've just updated /usr/src and built= the corresponding > > > world in /usr/obj. It should possibly even by the default for etcupd= ate if a DESTDIR > > > is not specified. > >=20 > > Finally getting back to this... > >=20 > > etcupdate -B would correct the immediate problem for etcupdate. I do > > think that making it the default if the tree exists makes sense. It > > won't be more broken than a cross installworld is. >=20 > Hmmm, checking for the obj tree is a bit hackish. I'd rather it were more > deterministic. I think I'd like to make it just default to -B and require > a new -b flag to build a new tree, but perhaps have it check for a tree > and error out if it doesn't exist and you don't give it -b? Just switching the default seems fine in practice. I guess it would probably be useful to keep an option to enable the old behavior. > > I did a quick test when I first found this issue and it would be easy to > > reuse the existing MAKEOBJDIRPREFIX in mergemaster as well. > >=20 > > I think we'll want to update UPDATING to recommend that the > > mergemaster -p stage (and the equivalent for etcupdate) be run using the > > version in the source tree, not the installed one. I do wonder if it > > would make sense for them to attempt to find and invoke that version so > > simplify bootstrapping. >=20 > Currently etcupdate doesn't implement something like -p. I need to add t= hat as > I would prefer to use its conflict resolution for adding users. (That wo= uld > also let it serve as a full replacement for mergemaster for those who pre= fer it.) OK, I'll look at switching the default behavior in mergemaster and adding an option to revert to the old behavior. I'll also change UPDATING to suggest using the mergemaster.sh from the source tree for mergemaster -p. - Brooks --0F1p//8PRICkK4MW Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iD8DBQFRW08mXY6L6fI4GtQRAmQfAKDRXZ2X1pp5dxfAVJxbfrhAwH4hswCg6BsR LoUgP+mDyC1z82yjgm7U+ls= =Hcx7 -----END PGP SIGNATURE----- --0F1p//8PRICkK4MW-- From owner-svn-src-all@FreeBSD.ORG Tue Apr 2 23:41:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 158E1853; Tue, 2 Apr 2013 23:41:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ED2253E7; Tue, 2 Apr 2013 23:41:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r32NfL1C096958; Tue, 2 Apr 2013 23:41:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r32NfL8L096954; Tue, 2 Apr 2013 23:41:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304022341.r32NfL8L096954@svn.freebsd.org> From: Xin LI Date: Tue, 2 Apr 2013 23:41:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249035 - 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, 02 Apr 2013 23:41:22 -0000 Author: delphij Date: Tue Apr 2 23:41:20 2013 New Revision: 249035 URL: http://svnweb.freebsd.org/changeset/base/249035 Log: Replace access to /dev/random with the kernel pseudo-random number source sysctl(KERN_ARND) and remove the fallback code. Obtained from: OpenBSD Reviewed by: secteam MFC after: 1 month Modified: head/lib/libc/stdlib/rand.3 head/lib/libc/stdlib/rand.c head/lib/libc/stdlib/random.3 head/lib/libc/stdlib/random.c Modified: head/lib/libc/stdlib/rand.3 ============================================================================== --- head/lib/libc/stdlib/rand.3 Tue Apr 2 21:34:38 2013 (r249034) +++ head/lib/libc/stdlib/rand.3 Tue Apr 2 23:41:20 2013 (r249035) @@ -32,7 +32,7 @@ .\" @(#)rand.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 4, 2012 +.Dd April 2, 2013 .Dt RAND 3 .Os .Sh NAME @@ -91,9 +91,7 @@ seeded with a value of 1. .Pp The .Fn sranddev -function initializes a seed using the -.Xr random 4 -random number device which returns good random numbers. +function initializes a seed using pseudo-random numbers obtained from the kernel. .Pp The .Fn rand_r Modified: head/lib/libc/stdlib/rand.c ============================================================================== --- head/lib/libc/stdlib/rand.c Tue Apr 2 21:34:38 2013 (r249034) +++ head/lib/libc/stdlib/rand.c Tue Apr 2 23:41:20 2013 (r249035) @@ -36,11 +36,10 @@ static char sccsid[] = "@(#)rand.c 8.1 ( __FBSDID("$FreeBSD$"); #include "namespace.h" -#include /* for sranddev() */ +#include +#include #include -#include /* for sranddev() */ #include -#include /* for sranddev() */ #include "un-namespace.h" #ifdef TEST @@ -112,28 +111,20 @@ u_int seed; * sranddev: * * Many programs choose the seed value in a totally predictable manner. - * This often causes problems. We seed the generator using the much more - * secure random(4) interface. + * This often causes problems. We seed the generator using pseudo-random + * data from the kernel. */ void sranddev() { - int fd, done; + int mib[2]; + size_t len; - done = 0; - fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0); - if (fd >= 0) { - if (_read(fd, (void *) &next, sizeof(next)) == sizeof(next)) - done = 1; - _close(fd); - } - - if (!done) { - struct timeval tv; - - gettimeofday(&tv, NULL); - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); - } + len = sizeof(next); + + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + sysctl(mib, 2, (void *)&next, &len, NULL, 0); } Modified: head/lib/libc/stdlib/random.3 ============================================================================== --- head/lib/libc/stdlib/random.3 Tue Apr 2 21:34:38 2013 (r249034) +++ head/lib/libc/stdlib/random.3 Tue Apr 2 23:41:20 2013 (r249035) @@ -28,7 +28,7 @@ .\" @(#)random.3 8.1 (Berkeley) 6/4/93 .\" $FreeBSD$ .\" -.Dd September 4, 2012 +.Dd April 2, 2013 .Dt RANDOM 3 .Os .Sh NAME @@ -106,8 +106,8 @@ as the seed. .Pp The .Fn srandomdev -routine initializes a state array using data from -.Xr random 4 . +routine initializes a state array using +pseudo-random numbers obtained from the kernel. Note that this particular seeding procedure can generate states which are impossible to reproduce by calling Modified: head/lib/libc/stdlib/random.c ============================================================================== --- head/lib/libc/stdlib/random.c Tue Apr 2 21:34:38 2013 (r249034) +++ head/lib/libc/stdlib/random.c Tue Apr 2 23:41:20 2013 (r249035) @@ -34,12 +34,11 @@ static char sccsid[] = "@(#)random.c 8.2 __FBSDID("$FreeBSD$"); #include "namespace.h" -#include /* for srandomdev() */ -#include /* for srandomdev() */ +#include +#include #include #include #include -#include /* for srandomdev() */ #include "un-namespace.h" /* @@ -284,39 +283,28 @@ srandom(unsigned long x) * srandomdev: * * Many programs choose the seed value in a totally predictable manner. - * This often causes problems. We seed the generator using the much more - * secure random(4) interface. Note that this particular seeding - * procedure can generate states which are impossible to reproduce by - * calling srandom() with any value, since the succeeding terms in the - * state buffer are no longer derived from the LC algorithm applied to - * a fixed seed. + * This often causes problems. We seed the generator using pseudo-random + * data from the kernel. + * + * Note that this particular seeding procedure can generate states + * which are impossible to reproduce by calling srandom() with any + * value, since the succeeding terms in the state buffer are no longer + * derived from the LC algorithm applied to a fixed seed. */ void srandomdev(void) { - int fd, done; + int mib[2]; size_t len; if (rand_type == TYPE_0) - len = sizeof state[0]; + len = sizeof(state[0]); else - len = rand_deg * sizeof state[0]; - - done = 0; - fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0); - if (fd >= 0) { - if (_read(fd, (void *) state, len) == (ssize_t) len) - done = 1; - _close(fd); - } + len = rand_deg * sizeof(state[0]); - if (!done) { - struct timeval tv; - - gettimeofday(&tv, NULL); - srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); - return; - } + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + sysctl(mib, 2, state, &len, NULL, 0); if (rand_type != TYPE_0) { fptr = &state[rand_sep]; From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 01:27:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DB52F969; Wed, 3 Apr 2013 01:27:16 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CDF87A14; Wed, 3 Apr 2013 01:27:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r331RGsU027595; Wed, 3 Apr 2013 01:27:16 GMT (envelope-from kevlo@svn.freebsd.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r331RGJA027594; Wed, 3 Apr 2013 01:27:16 GMT (envelope-from kevlo@svn.freebsd.org) Message-Id: <201304030127.r331RGJA027594@svn.freebsd.org> From: Kevin Lo Date: Wed, 3 Apr 2013 01:27:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249036 - head/sys/conf 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, 03 Apr 2013 01:27:16 -0000 Author: kevlo Date: Wed Apr 3 01:27:15 2013 New Revision: 249036 URL: http://svnweb.freebsd.org/changeset/base/249036 Log: Comment out the VIMAGE since we need to build both LINTS to get good coverage. Pointed out by: jhb Modified: head/sys/conf/NOTES Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Tue Apr 2 23:41:20 2013 (r249035) +++ head/sys/conf/NOTES Wed Apr 3 01:27:15 2013 (r249036) @@ -756,8 +756,8 @@ options NGATM_CCATM device mn # Munich32x/Falc54 Nx64kbit/sec cards. # Network stack virtualization. -options VIMAGE -options VNET_DEBUG # debug for VIMAGE +#options VIMAGE +#options VNET_DEBUG # debug for VIMAGE # # Network interfaces: From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 01:51:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 118291F4; Wed, 3 Apr 2013 01:51:55 +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 90577BDA; Wed, 3 Apr 2013 01:51:54 +0000 (UTC) Received: from srg.kevlo.org (ns.kevlo.org [220.128.136.52]) by ns.kevlo.org (8.14.6/8.14.6) with ESMTP id r331phex076686; Wed, 3 Apr 2013 09:51:43 +0800 (CST) (envelope-from kevlo@FreeBSD.org) Message-ID: <515B8B37.9000807@FreeBSD.org> Date: Wed, 03 Apr 2013 09:51:51 +0800 From: Kevin Lo User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130207 Thunderbird/17.0.2 MIME-Version: 1.0 To: John Baldwin Subject: Re: Re: svn commit: r248997 - head/sys/conf References: <201304020557.r325vbnA069100@svn.freebsd.org> <201304021234.00772.jhb@freebsd.org> In-Reply-To: <201304021234.00772.jhb@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Wed, 03 Apr 2013 01:51:55 -0000 On 2013/04/03 00:34, John Baldwin wrote: > On Tuesday, April 02, 2013 1:57:37 am Kevin Lo wrote: >> Author: kevlo >> Date: Tue Apr 2 05:57:36 2013 >> New Revision: 248997 >> URL: http://svnweb.freebsd.org/changeset/base/248997 >> >> Log: >> Add VIMAGE to NOTES. >> >> Reviewed by: zec >> >> Modified: >> head/sys/conf/NOTES > Hmm, we've intentionally not done that to date (see how x86 conf Makefiles > create separate LINT-VIMAGE configs). It might be good to keep these but > comment them out? We need to build both LINTS to get good coverage. Ok, fixed. Thanks for pointing that out. > Also, I thought VIMAGE wasn't known to be buildable on non-x86? > I'm not sure if VIMAGE doesn't support on non-x86 arches. I'll try it out on my ARM platform. Kevin From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 06:37:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B848E873; Wed, 3 Apr 2013 06:37:25 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C6577F1; Wed, 3 Apr 2013 06:37:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r336bPq6019173; Wed, 3 Apr 2013 06:37:25 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r336bPiv019172; Wed, 3 Apr 2013 06:37:25 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201304030637.r336bPiv019172@svn.freebsd.org> From: Alan Cox Date: Wed, 3 Apr 2013 06:37:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249038 - 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: Wed, 03 Apr 2013 06:37:25 -0000 Author: alc Date: Wed Apr 3 06:37:25 2013 New Revision: 249038 URL: http://svnweb.freebsd.org/changeset/base/249038 Log: Replace the remaining uses of vm_radix_node_page() by vm_radix_isleaf() and vm_radix_topage(). This transformation eliminates some unnecessary conditional branches from the inner loops of vm_radix_insert(), vm_radix_lookup{,_ge,_le}(), and vm_radix_remove(). Simplify the control flow of vm_radix_lookup_{ge,le}(). Reviewed by: attilio (an earlier version) Tested by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Wed Apr 3 06:29:26 2013 (r249037) +++ head/sys/vm/vm_radix.c Wed Apr 3 06:37:25 2013 (r249038) @@ -199,15 +199,13 @@ vm_radix_isleaf(struct vm_radix_node *rn } /* - * Returns the associated page extracted from rnode if available, - * and NULL otherwise. + * Returns the associated page extracted from rnode. */ static __inline vm_page_t -vm_radix_node_page(struct vm_radix_node *rnode) +vm_radix_topage(struct vm_radix_node *rnode) { - return ((((uintptr_t)rnode & VM_RADIX_ISLEAF) != 0) ? - (vm_page_t)((uintptr_t)rnode & ~VM_RADIX_FLAGS) : NULL); + return ((vm_page_t)((uintptr_t)rnode & ~VM_RADIX_FLAGS)); } /* @@ -428,8 +426,8 @@ vm_radix_insert(struct vm_radix *rtree, } do { slot = vm_radix_slot(index, rnode->rn_clev); - m = vm_radix_node_page(rnode->rn_child[slot]); - if (m != NULL) { + if (vm_radix_isleaf(rnode->rn_child[slot])) { + m = vm_radix_topage(rnode->rn_child[slot]); if (m->pindex == index) panic("%s: key %jx is already present", __func__, (uintmax_t)index); @@ -503,8 +501,8 @@ vm_radix_lookup(struct vm_radix *rtree, return (NULL); slot = vm_radix_slot(index, rnode->rn_clev); rnode = rnode->rn_child[slot]; - m = vm_radix_node_page(rnode); - if (m != NULL) { + if (vm_radix_isleaf(rnode)) { + m = vm_radix_topage(rnode); if (m->pindex == index) return (m); else @@ -522,7 +520,7 @@ vm_radix_lookup_ge(struct vm_radix *rtre { vm_pindex_t inc; vm_page_t m; - struct vm_radix_node *rnode; + struct vm_radix_node *child, *rnode; int slot; uint16_t difflev; boolean_t maplevels[VM_RADIX_LIMIT + 1]; @@ -560,13 +558,13 @@ restart: goto restart; } slot = vm_radix_slot(index, rnode->rn_clev); - m = vm_radix_node_page(rnode->rn_child[slot]); - if (m != NULL && m->pindex >= index) - return (m); - if (rnode->rn_child[slot] != NULL && m == NULL) { - rnode = rnode->rn_child[slot]; - continue; - } + child = rnode->rn_child[slot]; + if (vm_radix_isleaf(child)) { + m = vm_radix_topage(child); + if (m->pindex >= index) + return (m); + } else if (child != NULL) + goto descend; /* * Look for an available edge or page within the current @@ -575,30 +573,31 @@ restart: if (slot < (VM_RADIX_COUNT - 1)) { inc = VM_RADIX_UNITLEVEL(rnode->rn_clev); index = vm_radix_trimkey(index, rnode->rn_clev); - index += inc; - slot++; - for (;; index += inc, slot++) { - m = vm_radix_node_page(rnode->rn_child[slot]); - if (m != NULL && m->pindex >= index) - return (m); - if ((rnode->rn_child[slot] != NULL && - m == NULL) || slot == (VM_RADIX_COUNT - 1)) - break; - } + do { + index += inc; + slot++; + child = rnode->rn_child[slot]; + if (vm_radix_isleaf(child)) { + m = vm_radix_topage(child); + if (m->pindex >= index) + return (m); + } else if (child != NULL) + goto descend; + } while (slot < (VM_RADIX_COUNT - 1)); } + KASSERT(child == NULL || vm_radix_isleaf(child), + ("vm_radix_lookup_ge: child is radix node")); /* * If a valid page or edge bigger than the search slot is * found in the traversal, skip to the next higher-level key. */ - if (slot == (VM_RADIX_COUNT - 1) && - (rnode->rn_child[slot] == NULL || m != NULL)) { - if (rnode->rn_clev == 0 || vm_radix_addlev(&index, - maplevels, rnode->rn_clev - 1) > 0) - break; - goto restart; - } - rnode = rnode->rn_child[slot]; + if (rnode->rn_clev == 0 || vm_radix_addlev(&index, maplevels, + rnode->rn_clev - 1) > 0) + break; + goto restart; +descend: + rnode = child; } return (NULL); } @@ -611,7 +610,7 @@ vm_radix_lookup_le(struct vm_radix *rtre { vm_pindex_t inc; vm_page_t m; - struct vm_radix_node *rnode; + struct vm_radix_node *child, *rnode; int slot; uint16_t difflev; boolean_t maplevels[VM_RADIX_LIMIT + 1]; @@ -649,13 +648,13 @@ restart: goto restart; } slot = vm_radix_slot(index, rnode->rn_clev); - m = vm_radix_node_page(rnode->rn_child[slot]); - if (m != NULL && m->pindex <= index) - return (m); - if (rnode->rn_child[slot] != NULL && m == NULL) { - rnode = rnode->rn_child[slot]; - continue; - } + child = rnode->rn_child[slot]; + if (vm_radix_isleaf(child)) { + m = vm_radix_topage(child); + if (m->pindex <= index) + return (m); + } else if (child != NULL) + goto descend; /* * Look for an available edge or page within the current @@ -665,29 +664,31 @@ restart: inc = VM_RADIX_UNITLEVEL(rnode->rn_clev); index = vm_radix_trimkey(index, rnode->rn_clev); index |= inc - 1; - index -= inc; - slot--; - for (;; index -= inc, slot--) { - m = vm_radix_node_page(rnode->rn_child[slot]); - if (m != NULL && m->pindex <= index) - return (m); - if ((rnode->rn_child[slot] != NULL && - m == NULL) || slot == 0) - break; - } + do { + index -= inc; + slot--; + child = rnode->rn_child[slot]; + if (vm_radix_isleaf(child)) { + m = vm_radix_topage(child); + if (m->pindex <= index) + return (m); + } else if (child != NULL) + goto descend; + } while (slot > 0); } + KASSERT(child == NULL || vm_radix_isleaf(child), + ("vm_radix_lookup_le: child is radix node")); /* * If a valid page or edge smaller than the search slot is * found in the traversal, skip to the next higher-level key. */ - if (slot == 0 && (rnode->rn_child[slot] == NULL || m != NULL)) { - if (rnode->rn_clev == 0 || vm_radix_declev(&index, - maplevels, rnode->rn_clev - 1) > 0) - break; - goto restart; - } - rnode = rnode->rn_child[slot]; + if (rnode->rn_clev == 0 || vm_radix_declev(&index, maplevels, + rnode->rn_clev - 1) > 0) + break; + goto restart; +descend: + rnode = child; } return (NULL); } @@ -709,8 +710,10 @@ vm_radix_remove(struct vm_radix *rtree, if (rnode == NULL) panic("vm_radix_remove: impossible to locate the key"); slot = vm_radix_slot(index, rnode->rn_clev); - m = vm_radix_node_page(rnode->rn_child[slot]); - if (m != NULL && m->pindex == index) { + if (vm_radix_isleaf(rnode->rn_child[slot])) { + m = vm_radix_topage(rnode->rn_child[slot]); + if (m->pindex != index) + panic("%s: invalid key found", __func__); rnode->rn_child[slot] = NULL; rnode->rn_count--; if (rnode->rn_count > 1) @@ -736,8 +739,6 @@ vm_radix_remove(struct vm_radix *rtree, vm_radix_node_put(rnode); break; } - if (m != NULL && m->pindex != index) - panic("%s: invalid key found", __func__); parent = rnode; rnode = rnode->rn_child[slot]; } @@ -779,7 +780,8 @@ DB_SHOW_COMMAND(radixnode, db_show_radix if (rnode->rn_child[i] != NULL) db_printf("slot: %d, val: %p, page: %p, clev: %d\n", i, (void *)rnode->rn_child[i], - (void *)vm_radix_node_page(rnode->rn_child[i]), + vm_radix_isleaf(rnode->rn_child[i]) ? + vm_radix_topage(rnode->rn_child[i]) : NULL, rnode->rn_clev); } #endif /* DDB */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 06:45:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4DCC8A5D; Wed, 3 Apr 2013 06:45:22 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 40E6F830; Wed, 3 Apr 2013 06:45:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r336jMAb021856; Wed, 3 Apr 2013 06:45:22 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r336jLUV021854; Wed, 3 Apr 2013 06:45:21 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201304030645.r336jLUV021854@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 3 Apr 2013 06:45:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249039 - in head/sys/dev/usb: . misc 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, 03 Apr 2013 06:45:22 -0000 Author: hselasky Date: Wed Apr 3 06:45:21 2013 New Revision: 249039 URL: http://svnweb.freebsd.org/changeset/base/249039 Log: Add new USB ID. MFC after: 1 week Submitted by: Bruce Simpson Modified: head/sys/dev/usb/misc/udbp.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/misc/udbp.c ============================================================================== --- head/sys/dev/usb/misc/udbp.c Wed Apr 3 06:37:25 2013 (r249038) +++ head/sys/dev/usb/misc/udbp.c Wed Apr 3 06:45:21 2013 (r249039) @@ -291,6 +291,7 @@ udbp_modload(module_t mod, int event, vo static const STRUCT_USB_HOST_ID udbp_devs[] = { {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_TURBOCONNECT, 0)}, + {USB_VPI(USB_VENDOR_NETCHIP, USB_PRODUCT_NETCHIP_GADGETZERO, 0)}, {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2301, 0)}, {USB_VPI(USB_VENDOR_PROLIFIC, USB_PRODUCT_PROLIFIC_PL2302, 0)}, {USB_VPI(USB_VENDOR_ANCHOR, USB_PRODUCT_ANCHOR_EZLINK, 0)}, Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Wed Apr 3 06:37:25 2013 (r249038) +++ head/sys/dev/usb/usbdevs Wed Apr 3 06:45:21 2013 (r249039) @@ -3009,6 +3009,7 @@ product NETAC ONLYDISK 0x0003 OnlyDisk /* NetChip Technology Products */ product NETCHIP TURBOCONNECT 0x1080 Turbo-Connect product NETCHIP CLIK_40 0xa140 USB Clik! 40 +product NETCHIP GADGETZERO 0xa4a0 Linux Gadget Zero product NETCHIP ETHERNETGADGET 0xa4a2 Linux Ethernet/RNDIS gadget on pxa210/25x/26x /* Netgear products */ From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 06:48:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E1BDDC0A; Wed, 3 Apr 2013 06:48:47 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA21284F; Wed, 3 Apr 2013 06:48:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r336mlOK022331; Wed, 3 Apr 2013 06:48:47 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r336mlT5022329; Wed, 3 Apr 2013 06:48:47 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304030648.r336mlT5022329@svn.freebsd.org> From: Dimitry Andric Date: Wed, 3 Apr 2013 06:48:47 +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: r249040 - in stable/9/contrib/binutils: bfd binutils 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, 03 Apr 2013 06:48:48 -0000 Author: dim Date: Wed Apr 3 06:48:47 2013 New Revision: 249040 URL: http://svnweb.freebsd.org/changeset/base/249040 Log: MFC r248802: Similar to r239870 and r239872, teach the other binutils tools about the DW_FORM_flag_present dwarf attribute, so they do not print errors or warnings on files that contain it. (This attribute can be emitted by newer versions of clang and gcc.) Modified: stable/9/contrib/binutils/bfd/dwarf2.c stable/9/contrib/binutils/binutils/dwarf.c Directory Properties: stable/9/contrib/binutils/ (props changed) Modified: stable/9/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/9/contrib/binutils/bfd/dwarf2.c Wed Apr 3 06:45:21 2013 (r249039) +++ stable/9/contrib/binutils/bfd/dwarf2.c Wed Apr 3 06:48:47 2013 (r249040) @@ -633,6 +633,9 @@ read_attribute_value (struct attribute * attr->u.val = read_1_byte (abfd, info_ptr); info_ptr += 1; break; + case DW_FORM_flag_present: + attr->u.val = 1; + break; case DW_FORM_sdata: attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; Modified: stable/9/contrib/binutils/binutils/dwarf.c ============================================================================== --- stable/9/contrib/binutils/binutils/dwarf.c Wed Apr 3 06:45:21 2013 (r249039) +++ stable/9/contrib/binutils/binutils/dwarf.c Wed Apr 3 06:48:47 2013 (r249040) @@ -557,6 +557,7 @@ get_FORM_name (unsigned long form) case DW_FORM_ref8: return "DW_FORM_ref8"; case DW_FORM_ref_udata: return "DW_FORM_ref_udata"; case DW_FORM_indirect: return "DW_FORM_indirect"; + case DW_FORM_flag_present: return "DW_FORM_flag_present"; default: { static char buffer[100]; @@ -969,6 +970,10 @@ read_and_display_attr_value (unsigned lo data += offset_size; break; + case DW_FORM_flag_present: + uvalue = 1; + break; + case DW_FORM_ref1: case DW_FORM_flag: case DW_FORM_data1: @@ -1030,6 +1035,7 @@ read_and_display_attr_value (unsigned lo printf (" %#lx", uvalue); break; + case DW_FORM_flag_present: case DW_FORM_flag: case DW_FORM_data1: case DW_FORM_data2: From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 07:04:59 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 03FF8EE4; Wed, 3 Apr 2013 07:04:59 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from fallbackmx07.syd.optusnet.com.au (fallbackmx07.syd.optusnet.com.au [211.29.132.9]) by mx1.freebsd.org (Postfix) with ESMTP id 8035B8DD; Wed, 3 Apr 2013 07:04:57 +0000 (UTC) Received: from mail36.syd.optusnet.com.au (mail36.syd.optusnet.com.au [211.29.133.76]) by fallbackmx07.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3374mZq031874; Wed, 3 Apr 2013 18:04:48 +1100 Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail36.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r3374baV013283 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 3 Apr 2013 18:04:39 +1100 Date: Wed, 3 Apr 2013 18:04:37 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Xin LI Subject: Re: svn commit: r249035 - head/lib/libc/stdlib In-Reply-To: <201304022341.r32NfL8L096954@svn.freebsd.org> Message-ID: <20130403165736.F819@besplex.bde.org> References: <201304022341.r32NfL8L096954@svn.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=fzJqrta_5x4A:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=ys8XlwWUekEA:10 a=B_BkEhnI1Mf147ghvr8A:9 a=CjuIK1q_8ugA:10 a=yIbjSOY98VjwACzz:21 a=abnDXnK00Rrm2gJP:21 a=TEtd8y5WR3g2ypngnwZWYw==:117 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: Wed, 03 Apr 2013 07:04:59 -0000 On Tue, 2 Apr 2013, Xin LI wrote: > Log: > Replace access to /dev/random with the kernel pseudo-random number > source sysctl(KERN_ARND) and remove the fallback code. > > Obtained from: OpenBSD > Reviewed by: secteam Really? > Modified: head/lib/libc/stdlib/rand.3 > ============================================================================== > --- head/lib/libc/stdlib/rand.3 Tue Apr 2 21:34:38 2013 (r249034) > +++ head/lib/libc/stdlib/rand.3 Tue Apr 2 23:41:20 2013 (r249035) > @@ -32,7 +32,7 @@ > .\" @(#)rand.3 8.1 (Berkeley) 6/4/93 > .\" $FreeBSD$ > .\" > -.Dd September 4, 2012 > +.Dd April 2, 2013 > .Dt RAND 3 > .Os > .Sh NAME > @@ -91,9 +91,7 @@ seeded with a value of 1. > .Pp > The > .Fn sranddev > -function initializes a seed using the > -.Xr random 4 > -random number device which returns good random numbers. > +function initializes a seed using pseudo-random numbers obtained from the kernel. It no longer claims to return good random numbers. Better not give implementation details. Lexical style bug: line longer than 80 characters. > Modified: head/lib/libc/stdlib/rand.c > ============================================================================== > --- head/lib/libc/stdlib/rand.c Tue Apr 2 21:34:38 2013 (r249034) > +++ head/lib/libc/stdlib/rand.c Tue Apr 2 23:41:20 2013 (r249035) > ... > @@ -112,28 +111,20 @@ u_int seed; > * sranddev: > * > * Many programs choose the seed value in a totally predictable manner. > - * This often causes problems. We seed the generator using the much more > - * secure random(4) interface. > + * This often causes problems. We seed the generator using pseudo-random > + * data from the kernel. > */ > void > sranddev() > { > - int fd, done; > + int mib[2]; > + size_t len; > > - done = 0; > - fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0); > - if (fd >= 0) { > - if (_read(fd, (void *) &next, sizeof(next)) == sizeof(next)) > - done = 1; > - _close(fd); > - } > - > - if (!done) { > - struct timeval tv; > - > - gettimeofday(&tv, NULL); > - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); > - } _open() and _read() are unlikely to fail, but there was error checking and handling for them. There was no error checking for the gettimeofday() call in the error handling. The man page's documentaion of the implementation details was wrong if the error handling was used. This is part of the implementation of the STANDARD library, so it cannot use POSIX extensions directly. It was careful about this for _open() and _close(), but not for gettimeofday() or getpid(). This is completely backwards. _open and _read are in namespace.h so there is no need to spell them with an underscore, while gettimeofday and getpid is not in namespace.h so they do need to be spelled with an underscore. This file has massive other (link-time) namespace pollution which makes the above namespace errors moot. The STANDARD functions that it implements are rand() and srand(). It implements the extensions rand_r() and sranddev(). These are not hidden in any way, so they break public symbols of the same name in the application namespace. They are not used by rand() or srand(), so they don't break calls to these functions. They should break linkage to the standard function if the application has public symbols of the same name. Such breakage is good for detecting the error, but it only works with static linkage. > + len = sizeof(next); > + > + mib[0] = CTL_KERN; > + mib[1] = KERN_ARND; > + sysctl(mib, 2, (void *)&next, &len, NULL, 0); > } The sysctl() is certain to fail on old kernels (like open of /dev/random on even older kernels), but there is no longer any error checking or handling. The contents of `next' on error is indeterminate (not documented in the man page), but is probably unchanged. Applications can actually detect this error although though the API doesn't support this, by using the documented implementation details and assuming that errno is properly left changed if the syscall fails (set errno to 0 before the call here and check it after). sysctl() is not even in any version POSIX.1, so it is further from being directly usable than _open() and _read(). It is like gettimeofday() above -- not in namespace.h. Style bugs: - blank line that separates the initialization of `len' from its use - unsorted initializations (`len' is a secondary part of the sysctl data so it might as well be initialized after 'mib' - use of sysctl() instead of sysctlbyname() - existence of KERN_ARND so that use of sysctl() is possible. KERN_ARND is much newer than sysctlbyname(), so it should have been OID_AUTO. Maybe it exists for compatibility with other OS's, but it shouldn't be used in new code in FreeBSD. - bogus cast of &next. In the old code, the cast had an additional style bug (space after it), but it was necessary and probably sufficient for supporting K&R with no prototypes. Now it is certainly insufficient, since the NULL and 0 args to sysctl() are not cast. After changing to use sysctlbyname(), most of the other style bugs go away automatically, and the code becomes cleaner, but restoring the error handling would make it messy again. > Modified: head/lib/libc/stdlib/random.c > ============================================================================== > --- head/lib/libc/stdlib/random.c Tue Apr 2 21:34:38 2013 (r249034) > +++ head/lib/libc/stdlib/random.c Tue Apr 2 23:41:20 2013 (r249035) > void > srandomdev(void) > { > - int fd, done; > + int mib[2]; > size_t len; > > if (rand_type == TYPE_0) > - len = sizeof state[0]; > + len = sizeof(state[0]); > else > - len = rand_deg * sizeof state[0]; > - > - done = 0; > - fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0); > - if (fd >= 0) { > - if (_read(fd, (void *) state, len) == (ssize_t) len) > - done = 1; > - _close(fd); > - } > + len = rand_deg * sizeof(state[0]); > > - if (!done) { > - struct timeval tv; > - > - gettimeofday(&tv, NULL); > - srandom((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); > - return; > - } > + mib[0] = CTL_KERN; > + mib[1] = KERN_ARND; > + sysctl(mib, 2, state, &len, NULL, 0); > > if (rand_type != TYPE_0) { > fptr = &state[rand_sep]; Now the function is a BSD extension, so there are no namespace problems. There are the same error handling problems as above. The style bug of casting `state' is fixed. It was a larger style bug in the old version, since the function definition isn't K&R. Bruce From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 07:31:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D9B503A3 for ; Wed, 3 Apr 2013 07:31:47 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-lb0-f173.google.com (mail-lb0-f173.google.com [209.85.217.173]) by mx1.freebsd.org (Postfix) with ESMTP id 630189C4 for ; Wed, 3 Apr 2013 07:31:46 +0000 (UTC) Received: by mail-lb0-f173.google.com with SMTP id w20so1288406lbh.32 for ; Wed, 03 Apr 2013 00:31:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:openpgp:content-type :content-transfer-encoding:x-gm-message-state; bh=suWjH/TiuR7QjYBAukLXO3bL0C9DTgbvXi+nWPEH/tI=; b=RpSUnhWXuEv9/Cl/liKpFMcKsOmybz4dY4IXwqn/wC5Yo8x0uF6inRJJhIgdQEewb7 09apYLnhCusHK/pQXCfZxdFQ9l+AjgzzWO5wpnwSO1qlkgDnrzHptBpQMG/Y4e1w99gA WbZtO+9Xs8sCfXU7QwTEIIZUaensBXxrvu2EUE8EwyI77gITX3MPCHvCd6ssb14Q1B3o cafJZpfJrYNLzSS8fSd7xyzvbJ5rZiGQo4Ej0Cws4IVvkCMs5ULf8h/9ZheVPx8QpwAD EtigPqasnz27EwbbjoZ0FvunrzWplGsuz2s2gwGvrG8SY3Td8ds6HdkEiUwqnHy75dL5 k41w== X-Received: by 10.152.133.133 with SMTP id pc5mr304104lab.32.1364974305643; Wed, 03 Apr 2013 00:31:45 -0700 (PDT) Received: from [192.168.1.2] ([89.169.163.3]) by mx.google.com with ESMTPS id m9sm359385lbm.3.2013.04.03.00.31.44 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 03 Apr 2013 00:31:44 -0700 (PDT) Message-ID: <515BDADF.8060303@freebsd.org> Date: Wed, 03 Apr 2013 11:31:43 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: Bruce Evans Subject: Re: svn commit: r249035 - head/lib/libc/stdlib References: <201304022341.r32NfL8L096954@svn.freebsd.org> <20130403165736.F819@besplex.bde.org> In-Reply-To: <20130403165736.F819@besplex.bde.org> OpenPGP: id=964474DD Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Gm-Message-State: ALoCoQlSLGTu4Qe2k6YgEzzB6mWwkEBrUBhckF/X7OMYuo7Bb1ssHpMazaDqOjqus7wJ4ki/Slfn Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI 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, 03 Apr 2013 07:31:47 -0000 On 03.04.2013 11:04, Bruce Evans wrote: >> + mib[0] = CTL_KERN; >> + mib[1] = KERN_ARND; >> + sysctl(mib, 2, (void *)&next, &len, NULL, 0); >> } > > The sysctl() is certain to fail on old kernels (like open of /dev/random > on even older kernels), but there is no longer any error checking or > handling. The contents of `next' on error is indeterminate (not documented > in the man page), but is probably unchanged. Applications can actually > detect this error although though the API doesn't support this, by > using the documented implementation details and assuming that errno > is properly left changed if the syscall fails (set errno to 0 before > the call here and check it after). Even in case sysctl is not fail, kernel's arc4 is very poorly initialized right after the boot. See the comment in the libkern/arc4random.c arc4_randomstir(), it is about device not loaded case, but it is the same even if device is loaded but not harvest enough. NetBSD implementation of kernel's arc4 is different from ours. Really I am _very_ tired to tell people about the problem, to write patches for the problem, etc., so anybody who are interested can search more details and patches in the mail archives. From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 08:27:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5E465C6F; Wed, 3 Apr 2013 08:27:36 +0000 (UTC) (envelope-from dumbbell@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4260CCB0; Wed, 3 Apr 2013 08:27:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r338Ratn051811; Wed, 3 Apr 2013 08:27:36 GMT (envelope-from dumbbell@svn.freebsd.org) Received: (from dumbbell@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r338RZih051806; Wed, 3 Apr 2013 08:27:35 GMT (envelope-from dumbbell@svn.freebsd.org) Message-Id: <201304030827.r338RZih051806@svn.freebsd.org> From: Jean-Sebastien Pedron Date: Wed, 3 Apr 2013 08:27:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249041 - in head/sys/dev/drm2: . i915 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, 03 Apr 2013 08:27:36 -0000 Author: dumbbell Date: Wed Apr 3 08:27:35 2013 New Revision: 249041 URL: http://svnweb.freebsd.org/changeset/base/249041 Log: drm and i915: Left-shift iic_msg.slave at creation time This is required because, in the radeon driver, we can't left-shift in a central place, like it was done in the i915 driver. Reviewed by: kib@, kan@, avg@ Tested by: kib@, avg@ Modified: head/sys/dev/drm2/drm_edid.c head/sys/dev/drm2/i915/intel_iic.c head/sys/dev/drm2/i915/intel_modes.c head/sys/dev/drm2/i915/intel_sdvo.c Modified: head/sys/dev/drm2/drm_edid.c ============================================================================== --- head/sys/dev/drm2/drm_edid.c Wed Apr 3 06:48:47 2013 (r249040) +++ head/sys/dev/drm2/drm_edid.c Wed Apr 3 08:27:35 2013 (r249041) @@ -264,12 +264,12 @@ drm_do_probe_ddc_edid(device_t adapter, do { struct iic_msg msgs[] = { { - .slave = DDC_ADDR, + .slave = DDC_ADDR << 1, .flags = IIC_M_WR, .len = 1, .buf = &start, }, { - .slave = DDC_ADDR, + .slave = DDC_ADDR << 1, .flags = IIC_M_RD, .len = len, .buf = buf, Modified: head/sys/dev/drm2/i915/intel_iic.c ============================================================================== --- head/sys/dev/drm2/i915/intel_iic.c Wed Apr 3 06:48:47 2013 (r249040) +++ head/sys/dev/drm2/i915/intel_iic.c Wed Apr 3 08:27:35 2013 (r249041) @@ -256,7 +256,7 @@ intel_gmbus_transfer(device_t idev, stru I915_WRITE(GMBUS1 + reg_offset, GMBUS_CYCLE_WAIT | (i + 1 == nmsgs ? GMBUS_CYCLE_STOP : 0) | (len << GMBUS_BYTE_COUNT_SHIFT) | - (msgs[i].slave << GMBUS_SLAVE_ADDR_SHIFT) | + (msgs[i].slave << (GMBUS_SLAVE_ADDR_SHIFT - 1)) | GMBUS_SLAVE_READ | GMBUS_SW_RDY); POSTING_READ(GMBUS2 + reg_offset); do { @@ -287,7 +287,7 @@ intel_gmbus_transfer(device_t idev, stru I915_WRITE(GMBUS1 + reg_offset, GMBUS_CYCLE_WAIT | (i + 1 == nmsgs ? GMBUS_CYCLE_STOP : 0) | (msgs[i].len << GMBUS_BYTE_COUNT_SHIFT) | - (msgs[i].slave << GMBUS_SLAVE_ADDR_SHIFT) | + (msgs[i].slave << (GMBUS_SLAVE_ADDR_SHIFT - 1)) | GMBUS_SLAVE_WRITE | GMBUS_SW_RDY); POSTING_READ(GMBUS2+reg_offset); @@ -397,17 +397,11 @@ intel_iic_quirk_xfer(device_t idev, stru IICBB_SETSCL(bridge_dev, 1); DELAY(I2C_RISEFALL_TIME); - /* convert slave addresses to format expected by iicbb */ - for (i = 0; i < nmsgs; i++) { - msgs[i].slave <<= 1; + for (i = 0; i < nmsgs - 1; i++) { /* force use of repeated start instead of default stop+start */ - if (i != (nmsgs - 1)) - msgs[i].flags |= IIC_M_NOSTOP; + msgs[i].flags |= IIC_M_NOSTOP; } ret = iicbus_transfer(idev, msgs, nmsgs); - /* restore the addresses */ - for (i = 0; i < nmsgs; i++) - msgs[i].slave >>= 1; IICBB_SETSDA(bridge_dev, 1); IICBB_SETSCL(bridge_dev, 1); intel_iic_quirk_set(dev_priv, false); Modified: head/sys/dev/drm2/i915/intel_modes.c ============================================================================== --- head/sys/dev/drm2/i915/intel_modes.c Wed Apr 3 06:48:47 2013 (r249040) +++ head/sys/dev/drm2/i915/intel_modes.c Wed Apr 3 08:27:35 2013 (r249041) @@ -45,13 +45,13 @@ bool intel_ddc_probe(struct intel_encode u8 buf[2]; struct iic_msg msgs[] = { { - .slave = DDC_ADDR, + .slave = DDC_ADDR << 1, .flags = IIC_M_WR, .len = 1, .buf = out_buf, }, { - .slave = DDC_ADDR, + .slave = DDC_ADDR << 1, .flags = IIC_M_RD, .len = 1, .buf = buf, Modified: head/sys/dev/drm2/i915/intel_sdvo.c ============================================================================== --- head/sys/dev/drm2/i915/intel_sdvo.c Wed Apr 3 06:48:47 2013 (r249040) +++ head/sys/dev/drm2/i915/intel_sdvo.c Wed Apr 3 08:27:35 2013 (r249041) @@ -266,13 +266,13 @@ static bool intel_sdvo_read_byte(struct { struct iic_msg msgs[] = { { - .slave = intel_sdvo->slave_addr, + .slave = intel_sdvo->slave_addr << 1, .flags = 0, .len = 1, .buf = &addr, }, { - .slave = intel_sdvo->slave_addr, + .slave = intel_sdvo->slave_addr << 1, .flags = IIC_M_RD, .len = 1, .buf = ch, @@ -454,14 +454,14 @@ intel_sdvo_write_cmd(struct intel_sdvo * intel_sdvo_debug_write(intel_sdvo, cmd, args, args_len); for (i = 0; i < args_len; i++) { - msgs[i].slave = intel_sdvo->slave_addr; + msgs[i].slave = intel_sdvo->slave_addr << 1; msgs[i].flags = 0; msgs[i].len = 2; msgs[i].buf = buf + 2 *i; buf[2*i + 0] = SDVO_I2C_ARG_0 - i; buf[2*i + 1] = ((const u8*)args)[i]; } - msgs[i].slave = intel_sdvo->slave_addr; + msgs[i].slave = intel_sdvo->slave_addr << 1; msgs[i].flags = 0; msgs[i].len = 2; msgs[i].buf = buf + 2*i; @@ -470,12 +470,12 @@ intel_sdvo_write_cmd(struct intel_sdvo * /* the following two are to read the response */ status = SDVO_I2C_CMD_STATUS; - msgs[i+1].slave = intel_sdvo->slave_addr; + msgs[i+1].slave = intel_sdvo->slave_addr << 1; msgs[i+1].flags = 0; msgs[i+1].len = 1; msgs[i+1].buf = &status; - msgs[i+2].slave = intel_sdvo->slave_addr; + msgs[i+2].slave = intel_sdvo->slave_addr << 1; msgs[i+2].flags = IIC_M_RD; msgs[i+2].len = 1; msgs[i+2].buf = &status; From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 09:52:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 387F03C7; Wed, 3 Apr 2013 09:52:31 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2A26A134; Wed, 3 Apr 2013 09:52:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r339qUYt077625; Wed, 3 Apr 2013 09:52:30 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r339qUI9077624; Wed, 3 Apr 2013 09:52:30 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304030952.r339qUI9077624@svn.freebsd.org> From: Martin Matuska Date: Wed, 3 Apr 2013 09:52:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249042 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 03 Apr 2013 09:52:31 -0000 Author: mm Date: Wed Apr 3 09:52:30 2013 New Revision: 249042 URL: http://svnweb.freebsd.org/changeset/base/249042 Log: Fix possible pool hold leak in dmu_send_impl() Problem reported to vendor: https://www.illumos.org/issues/3645 Reported by: Andriy Gapon MFC after: 15 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Apr 3 08:27:35 2013 (r249041) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Wed Apr 3 09:52:30 2013 (r249042) @@ -500,14 +500,14 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, list_insert_head(&ds->ds_sendstreams, dsp); mutex_exit(&ds->ds_sendstream_lock); + dsl_dataset_long_hold(ds, FTAG); + dsl_pool_rele(dp, tag); + if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) { err = dsp->dsa_err; goto out; } - dsl_dataset_long_hold(ds, FTAG); - dsl_pool_rele(dp, tag); - err = traverse_dataset(ds, fromtxg, TRAVERSE_PRE | TRAVERSE_PREFETCH, backup_cb, dsp); From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 10:31:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A00E6B77; Wed, 3 Apr 2013 10:31:14 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9276D314; Wed, 3 Apr 2013 10:31:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33AVDMY089211; Wed, 3 Apr 2013 10:31:13 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33AVDBl089210; Wed, 3 Apr 2013 10:31:13 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201304031031.r33AVDBl089210@svn.freebsd.org> From: Hans Petter Selasky Date: Wed, 3 Apr 2013 10:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249043 - head/sys/dev/usb 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, 03 Apr 2013 10:31:14 -0000 Author: hselasky Date: Wed Apr 3 10:31:13 2013 New Revision: 249043 URL: http://svnweb.freebsd.org/changeset/base/249043 Log: Add missing ifdef's for reduced feature compilations. Modified: head/sys/dev/usb/usb_device.c Modified: head/sys/dev/usb/usb_device.c ============================================================================== --- head/sys/dev/usb/usb_device.c Wed Apr 3 09:52:30 2013 (r249042) +++ head/sys/dev/usb/usb_device.c Wed Apr 3 10:31:13 2013 (r249043) @@ -1854,6 +1854,7 @@ repeat_set_config: config_index++; goto repeat_set_config; } +#if USB_HAVE_MSCTEST if (config_index == 0) { /* * Try to figure out if we have an @@ -1866,7 +1867,9 @@ repeat_set_config: goto repeat_set_config; } } +#endif } +#if USB_HAVE_MSCTEST if (set_config_failed == 0 && config_index == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_SYNC_CACHE) == 0 && usb_test_quirk(&uaa, UQ_MSC_NO_GETMAXLUN) == 0) { @@ -1882,6 +1885,7 @@ repeat_set_config: goto repeat_set_config; } } +#endif config_done: DPRINTF("new dev (addr %d), udev=%p, parent_hub=%p\n", From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 11:00:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E27EE4F5; Wed, 3 Apr 2013 11:00:50 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D3A93670; Wed, 3 Apr 2013 11:00:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33B0omJ098138; Wed, 3 Apr 2013 11:00:50 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33B0oQQ098137; Wed, 3 Apr 2013 11:00:50 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304031100.r33B0oQQ098137@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 3 Apr 2013 11:00:50 +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: r249046 - stable/9/etc/rc.d 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, 03 Apr 2013 11:00:51 -0000 Author: des Date: Wed Apr 3 11:00:50 2013 New Revision: 249046 URL: http://svnweb.freebsd.org/changeset/base/249046 Log: MFH (r246358): load pfsync.ko if necessary. Modified: stable/9/etc/rc.d/pfsync Directory Properties: stable/9/etc/ (props changed) Modified: stable/9/etc/rc.d/pfsync ============================================================================== --- stable/9/etc/rc.d/pfsync Wed Apr 3 10:49:05 2013 (r249045) +++ stable/9/etc/rc.d/pfsync Wed Apr 3 11:00:50 2013 (r249046) @@ -35,6 +35,7 @@ pfsync_start() if [ -n "${pfsync_syncpeer}" ]; then _syncpeer="syncpeer ${pfsync_syncpeer}" fi + load_kld pfsync ifconfig pfsync0 $_syncpeer syncdev $pfsync_syncdev $pfsync_ifconfig up } From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 11:06:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4A9606B9; Wed, 3 Apr 2013 11:06:27 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3CCDD6A3; Wed, 3 Apr 2013 11:06:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33B6RXK098959; Wed, 3 Apr 2013 11:06:27 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33B6R0G098958; Wed, 3 Apr 2013 11:06:27 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201304031106.r33B6R0G098958@svn.freebsd.org> From: Andriy Gapon Date: Wed, 3 Apr 2013 11:06:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249047 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 03 Apr 2013 11:06:27 -0000 Author: avg Date: Wed Apr 3 11:06:26 2013 New Revision: 249047 URL: http://svnweb.freebsd.org/changeset/base/249047 Log: spa_open_common: fix argument to zvol_create_minors Prior to r248571 spa_open was always called with a bare pool name, but now it is called with a dataset name instead (spa_lookup handles that). So, when a ZFS root is mounted spa_open is called with a name of a root dataset, which can very well be different from the pool name. But zvol_create_minors should be called with the pool name, because it performs a recursive traversal of all datasets under the name to find all those that are volumes. MFC after: 7 days Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Apr 3 11:00:50 2013 (r249046) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Wed Apr 3 11:06:26 2013 (r249047) @@ -2885,7 +2885,7 @@ spa_open_common(const char *pool, spa_t #ifdef __FreeBSD__ #ifdef _KERNEL if (firstopen) - zvol_create_minors(pool); + zvol_create_minors(spa->spa_name); #endif #endif } From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 11:30:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BF04430C; Wed, 3 Apr 2013 11:30:18 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B21277D5; Wed, 3 Apr 2013 11:30:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33BUIhs005686; Wed, 3 Apr 2013 11:30:18 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33BUI6P005685; Wed, 3 Apr 2013 11:30:18 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304031130.r33BUI6P005685@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Apr 2013 11:30:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249048 - 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, 03 Apr 2013 11:30:18 -0000 Author: mav Date: Wed Apr 3 11:30:18 2013 New Revision: 249048 URL: http://svnweb.freebsd.org/changeset/base/249048 Log: Add xpt_release_ccb()'s missed at r248872. That made `shutdown -p` stuck on controller with small number of queue slots and several disks connected. Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Wed Apr 3 11:06:26 2013 (r249047) +++ head/sys/cam/ata/ata_da.c Wed Apr 3 11:30:18 2013 (r249048) @@ -1886,6 +1886,7 @@ adaflush(void) softc->disk->d_devstat); if (error != 0) xpt_print(periph->path, "Synchronize cache failed\n"); + xpt_release_ccb(ccb); cam_periph_unlock(periph); } } @@ -1931,6 +1932,7 @@ adaspindown(uint8_t cmd, int flags) softc->disk->d_devstat); if (error != 0) xpt_print(periph->path, "Spin-down disk failed\n"); + xpt_release_ccb(ccb); cam_periph_unlock(periph); } } Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Wed Apr 3 11:06:26 2013 (r249047) +++ head/sys/cam/scsi/scsi_da.c Wed Apr 3 11:30:18 2013 (r249048) @@ -2897,6 +2897,7 @@ dashutdown(void * arg, int howto) softc->disk->d_devstat); if (error != 0) xpt_print(periph->path, "Synchronize cache failed\n"); + xpt_release_ccb(ccb); cam_periph_unlock(periph); } } From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 11:51:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C1D2FDB9; Wed, 3 Apr 2013 11:51:12 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B3BD88F8; Wed, 3 Apr 2013 11:51:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33BpCxt013440; Wed, 3 Apr 2013 11:51:12 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33BpCcD013437; Wed, 3 Apr 2013 11:51:12 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304031151.r33BpCcD013437@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 3 Apr 2013 11:51: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: r249049 - in stable/9: etc/rc.d usr.sbin/rtadvd 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, 03 Apr 2013 11:51:12 -0000 Author: des Date: Wed Apr 3 11:51:11 2013 New Revision: 249049 URL: http://svnweb.freebsd.org/changeset/base/249049 Log: MFH (r247270, r247271): allow starting rtadvd without any interfaces. Modified: stable/9/etc/rc.d/rtadvd stable/9/usr.sbin/rtadvd/rtadvd.8 stable/9/usr.sbin/rtadvd/rtadvd.c Directory Properties: stable/9/etc/ (props changed) stable/9/usr.sbin/rtadvd/ (props changed) Modified: stable/9/etc/rc.d/rtadvd ============================================================================== --- stable/9/etc/rc.d/rtadvd Wed Apr 3 11:30:18 2013 (r249048) +++ stable/9/etc/rc.d/rtadvd Wed Apr 3 11:51:11 2013 (r249049) @@ -45,6 +45,9 @@ rtadvd_precmd() fi done ;; + [Nn][Oo][Nn][Ee]) + rtadvd_interfaces="" + ;; esac command_args="${rtadvd_interfaces}" Modified: stable/9/usr.sbin/rtadvd/rtadvd.8 ============================================================================== --- stable/9/usr.sbin/rtadvd/rtadvd.8 Wed Apr 3 11:30:18 2013 (r249048) +++ stable/9/usr.sbin/rtadvd/rtadvd.8 Wed Apr 3 11:51:11 2013 (r249049) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 14, 2011 +.Dd February 25, 2013 .Dt RTADVD 8 .Os .Sh NAME @@ -39,13 +39,19 @@ .Nm .Op Fl dDfRs .Op Fl c Ar configfile +.Op Fl C Ar ctlsock .Op Fl M Ar ifname .Op Fl p Ar pidfile -.Ar interface ... +.Op Ar interface ... .Sh DESCRIPTION .Nm sends router advertisement packets to the specified .Ar interfaces . +If no interfaces are specified, +.Nm +will still run, but will not advertise any routes until interfaces are +added using +.Xr rtadvctl 8 . .Pp The program will daemonize itself on invocation. It will then send router advertisement packets periodically, as well @@ -121,6 +127,11 @@ for the configuration file. By default, .Pa /etc/rtadvd.conf is used. +.It Fl C +Specify an alternate location for the control socket used by +.Xr rtadvctl 8 . +The default is +.Pa /var/run/rtadvd.sock . .It Fl d Print debugging information. .It Fl D @@ -185,6 +196,7 @@ The default process ID file. .Ex -std .Sh SEE ALSO .Xr rtadvd.conf 5 , +.Xr rtadvctl 8 , .Xr rtsol 8 .Rs .%A Thomas Narten Modified: stable/9/usr.sbin/rtadvd/rtadvd.c ============================================================================== --- stable/9/usr.sbin/rtadvd/rtadvd.c Wed Apr 3 11:30:18 2013 (r249048) +++ stable/9/usr.sbin/rtadvd/rtadvd.c Wed Apr 3 11:51:11 2013 (r249049) @@ -166,6 +166,15 @@ static void rtmsg_input(struct sockinfo static void set_short_delay(struct ifinfo *); static int check_accept_rtadv(int); +static void +usage(void) +{ + + fprintf(stderr, "usage: rtadvd [-dDfRs] " + "[-c configfile] [-C ctlsock] [-M ifname] [-p pidfile]\n"); + exit(1); +} + int main(int argc, char *argv[]) { @@ -177,7 +186,7 @@ main(int argc, char *argv[]) pid_t pid, otherpid; /* get command line options and arguments */ - while ((ch = getopt(argc, argv, "c:C:dDfM:p:Rs")) != -1) { + while ((ch = getopt(argc, argv, "c:C:dDfhM:p:Rs")) != -1) { switch (ch) { case 'c': conffile = optarg; @@ -209,17 +218,12 @@ main(int argc, char *argv[]) case 'p': pidfilename = optarg; break; + default: + usage(); } } argc -= optind; argv += optind; - if (argc == 0) { - fprintf(stderr, - "usage: rtadvd [-dDfRs] [-c conffile] " - "[-C ctrlsockname] [-M ifname] " - "[-p pidfile] interfaces...\n"); - exit(1); - } logopt = LOG_NDELAY | LOG_PID; if (fflag) From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 12:17:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E952D7F5; Wed, 3 Apr 2013 12:17:36 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CCD7BABC; Wed, 3 Apr 2013 12:17:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33CHann020322; Wed, 3 Apr 2013 12:17:36 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33CHaDm020319; Wed, 3 Apr 2013 12:17:36 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304031217.r33CHaDm020319@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 3 Apr 2013 12:17:36 +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: r249050 - in stable/9/contrib/openpam: doc/man lib 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, 03 Apr 2013 12:17:37 -0000 Author: des Date: Wed Apr 3 12:17:35 2013 New Revision: 249050 URL: http://svnweb.freebsd.org/changeset/base/249050 Log: MFH (r247810): correctly parse mixed quoted / unquoted text. Modified: stable/9/contrib/openpam/doc/man/openpam_straddch.3 stable/9/contrib/openpam/lib/openpam_readline.c stable/9/contrib/openpam/lib/openpam_readword.c Directory Properties: stable/9/contrib/openpam/ (props changed) Modified: stable/9/contrib/openpam/doc/man/openpam_straddch.3 ============================================================================== --- stable/9/contrib/openpam/doc/man/openpam_straddch.3 Wed Apr 3 11:51:11 2013 (r249049) +++ stable/9/contrib/openpam/doc/man/openpam_straddch.3 Wed Apr 3 12:17:35 2013 (r249050) @@ -34,7 +34,7 @@ .\" .\" $Id$ .\" -.Dd May 26, 2012 +.Dd March 3, 2013 .Dt OPENPAM_STRADDCH 3 .Os .Sh NAME @@ -73,6 +73,21 @@ and argument point to variables used to hold the size of the buffer and the length of the string it contains, respectively. .Pp +The final argument, +.Fa ch , +is the character that should be appended to +the string. If +.Fa ch +is 0, nothing is appended, but a new buffer is +still allocated if +.Fa str +is NULL. This can be used to +.Do +bootstrap +.Dc +the +string. +.Pp If a new buffer is allocated or an existing buffer is reallocated to make room for the additional character, .Fa str @@ -91,7 +106,9 @@ If the function is successful, it increments the integer variable pointed to by .Fa len -and returns 0. +(unless +.Fa ch +was 0) and returns 0. Otherwise, it leaves the variables pointed to by .Fa str , .Fa size Modified: stable/9/contrib/openpam/lib/openpam_readline.c ============================================================================== --- stable/9/contrib/openpam/lib/openpam_readline.c Wed Apr 3 11:51:11 2013 (r249049) +++ stable/9/contrib/openpam/lib/openpam_readline.c Wed Apr 3 12:17:35 2013 (r249050) @@ -62,11 +62,9 @@ openpam_readline(FILE *f, int *lineno, s size_t len, size; int ch; - if ((line = malloc(size = MIN_LINE_LENGTH)) == NULL) { - openpam_log(PAM_LOG_ERROR, "malloc(): %m"); + line = NULL; + if (openpam_straddch(&line, &size, &len, 0) != 0) return (NULL); - } - len = 0; for (;;) { ch = fgetc(f); /* strip comment */ Modified: stable/9/contrib/openpam/lib/openpam_readword.c ============================================================================== --- stable/9/contrib/openpam/lib/openpam_readword.c Wed Apr 3 11:51:11 2013 (r249049) +++ stable/9/contrib/openpam/lib/openpam_readword.c Wed Apr 3 12:17:35 2013 (r249050) @@ -86,13 +86,8 @@ openpam_readword(FILE *f, int *lineno, s /* begin quote */ quote = ch; /* edge case: empty quoted string */ - if (word == NULL && (word = malloc(1)) == NULL) { - openpam_log(PAM_LOG_ERROR, "malloc(): %m"); - errno = ENOMEM; + if (openpam_straddch(&word, &size, &len, 0) != 0) return (NULL); - } - *word = '\0'; - size = 1; } else if (ch == quote && !escape) { /* end quote */ quote = 0; From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 12:20:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4CCB6996; Wed, 3 Apr 2013 12:20:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 37A51AD0; Wed, 3 Apr 2013 12:20:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33CK9H8020728; Wed, 3 Apr 2013 12:20:09 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33CK9oT020727; Wed, 3 Apr 2013 12:20:09 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304031220.r33CK9oT020727@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Wed, 3 Apr 2013 12:20:09 +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: r249051 - stable/9 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, 03 Apr 2013 12:20:09 -0000 Author: des Date: Wed Apr 3 12:20:08 2013 New Revision: 249051 URL: http://svnweb.freebsd.org/changeset/base/249051 Log: MFH (r247285): always bootstrap liby along with yacc. Modified: stable/9/Makefile.inc1 (contents, props changed) Directory Properties: stable/9/ (props changed) Modified: stable/9/Makefile.inc1 ============================================================================== --- stable/9/Makefile.inc1 Wed Apr 3 12:17:35 2013 (r249050) +++ stable/9/Makefile.inc1 Wed Apr 3 12:20:08 2013 (r249051) @@ -1083,7 +1083,8 @@ _lex= usr.bin/lex .endif .if ${BOOTSTRAPPING} < 900006 || ${BOOTSTRAPPING} >= 1000013 -_yacc= usr.bin/yacc +_yacc= lib/liby \ + usr.bin/yacc .endif .if ${BOOTSTRAPPING} < 1000026 From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 14:10:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 00D41D2F; Wed, 3 Apr 2013 14:10:38 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D718E27B; Wed, 3 Apr 2013 14:10:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33EAcft052962; Wed, 3 Apr 2013 14:10:38 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33EAc5S052960; Wed, 3 Apr 2013 14:10:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304031410.r33EAc5S052960@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Apr 2013 14:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249052 - 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, 03 Apr 2013 14:10:39 -0000 Author: mav Date: Wed Apr 3 14:10:37 2013 New Revision: 249052 URL: http://svnweb.freebsd.org/changeset/base/249052 Log: Add some more ATA_CAM ifdefs. Submitted by: marius (partially) MFC after: 1 week Modified: head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Wed Apr 3 12:20:08 2013 (r249051) +++ head/sys/dev/ata/ata-all.c Wed Apr 3 14:10:37 2013 (r249052) @@ -166,9 +166,11 @@ ata_attach(device_t dev) ch->state = ATA_IDLE; bzero(&ch->state_mtx, sizeof(struct mtx)); mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); +#ifndef ATA_CAM bzero(&ch->queue_mtx, sizeof(struct mtx)); mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF); TAILQ_INIT(&ch->ata_queue); +#endif TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); #ifdef ATA_CAM for (i = 0; i < 16; i++) { @@ -340,7 +342,9 @@ ata_detach(device_t dev) ch->dma.free(dev); mtx_destroy(&ch->state_mtx); +#ifndef ATA_CAM mtx_destroy(&ch->queue_mtx); +#endif return 0; } @@ -1107,6 +1111,7 @@ ata_default_registers(device_t dev) ch->r_io[ATA_ALTSTAT].offset = ch->r_io[ATA_CONTROL].offset; } +#ifndef ATA_CAM void ata_modify_if_48bit(struct ata_request *request) { @@ -1208,6 +1213,7 @@ ata_modify_if_48bit(struct ata_request * request->flags |= ATA_R_48BIT; } } +#endif void ata_udelay(int interval) @@ -1453,7 +1459,7 @@ bpack(int8_t *src, int8_t *dst, int len) #endif #ifdef ATA_CAM -void +static void ata_cam_begin_transaction(device_t dev, union ccb *ccb) { struct ata_channel *ch = device_get_softc(dev); Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Wed Apr 3 12:20:08 2013 (r249051) +++ head/sys/dev/ata/ata-all.h Wed Apr 3 14:10:37 2013 (r249052) @@ -580,9 +580,11 @@ struct ata_channel { #define ATA_ACTIVE 0x0001 #define ATA_STALL_QUEUE 0x0002 +#ifndef ATA_CAM struct mtx queue_mtx; /* queue lock */ TAILQ_HEAD(, ata_request) ata_queue; /* head of ATA queue */ struct ata_request *freezepoint; /* composite freezepoint */ +#endif struct ata_request *running; /* currently running request */ struct task conntask; /* PHY events handling task */ #ifdef ATA_CAM @@ -621,24 +623,24 @@ int ata_resume(device_t dev); void ata_interrupt(void *data); int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data); int ata_getparam(struct ata_device *atadev, int init); -int ata_identify(device_t dev); void ata_default_registers(device_t dev); -void ata_modify_if_48bit(struct ata_request *request); void ata_udelay(int interval); const char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); +void ata_setmode(device_t dev); +void ata_print_cable(device_t dev, u_int8_t *who); int ata_str2mode(const char *str); const char *ata_satarev2str(int rev); int ata_atapi(device_t dev, int target); +#ifndef ATA_CAM +int ata_identify(device_t dev); +void ata_modify_if_48bit(struct ata_request *request); int ata_pmode(struct ata_params *ap); int ata_wmode(struct ata_params *ap); int ata_umode(struct ata_params *ap); int ata_limit_mode(device_t dev, int mode, int maxmode); -void ata_setmode(device_t dev); -void ata_print_cable(device_t dev, u_int8_t *who); int ata_check_80pin(device_t dev, int mode); -#ifdef ATA_CAM -void ata_cam_begin_transaction(device_t dev, union ccb *ccb); +#else void ata_cam_end_transaction(device_t dev, struct ata_request *request); #endif From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 14:14:02 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4A307EED; Wed, 3 Apr 2013 14:14:02 +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 14AEC2A0; Wed, 3 Apr 2013 14:14:01 +0000 (UTC) Received: from localhost (58.wheelsystems.com [83.12.187.58]) by mail.dawidek.net (Postfix) with ESMTPSA id 82DA4CBD; Wed, 3 Apr 2013 16:10:31 +0200 (CEST) Date: Wed, 3 Apr 2013 16:15:57 +0200 From: Pawel Jakub Dawidek To: Bruce Evans Subject: Re: svn commit: r249035 - head/lib/libc/stdlib Message-ID: <20130403141557.GB1349@garage.freebsd.pl> References: <201304022341.r32NfL8L096954@svn.freebsd.org> <20130403165736.F819@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uQr8t48UFsdbeI+V" Content-Disposition: inline In-Reply-To: <20130403165736.F819@besplex.bde.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, Xin LI 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, 03 Apr 2013 14:14:02 -0000 --uQr8t48UFsdbeI+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 03, 2013 at 06:04:37PM +1100, Bruce Evans wrote: > On Tue, 2 Apr 2013, Xin LI wrote: > > void > > sranddev() > > { > > - int fd, done; > > + int mib[2]; > > + size_t len; > > > > - done =3D 0; > > - fd =3D _open("/dev/random", O_RDONLY | O_CLOEXEC, 0); > > - if (fd >=3D 0) { > > - if (_read(fd, (void *) &next, sizeof(next)) =3D=3D sizeof(next)) > > - done =3D 1; > > - _close(fd); > > - } > > - > > - if (!done) { > > - struct timeval tv; > > - > > - gettimeofday(&tv, NULL); > > - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); > > - } >=20 > _open() and _read() are unlikely to fail, [...] They are very likely to fail when the process is sandboxed. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com FreeBSD committer http://www.FreeBSD.org Am I Evil? Yes, I Am! http://tupytaj.pl --uQr8t48UFsdbeI+V Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlFcOZ0ACgkQForvXbEpPzRj+gCgpya1sbMIKDsE90d5qAeoZM3i x90AoJLTeA78UOEL6v7OIPyKkZM1iN9W =/5CI -----END PGP SIGNATURE----- --uQr8t48UFsdbeI+V-- From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 15:34:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C11DEF73; Wed, 3 Apr 2013 15:34:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B29B7A33; Wed, 3 Apr 2013 15:34:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33FYPA6078292; Wed, 3 Apr 2013 15:34:25 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33FYPQR078291; Wed, 3 Apr 2013 15:34:25 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304031534.r33FYPQR078291@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Apr 2013 15:34:25 +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: r249053 - 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, 03 Apr 2013 15:34:25 -0000 Author: kib Date: Wed Apr 3 15:34:25 2013 New Revision: 249053 URL: http://svnweb.freebsd.org/changeset/base/249053 Log: MFC r248562: Move the vn_start_write() call in the dounmount() before setting the MNTK_UNMOUNT flag. Modified: stable/9/sys/kern/vfs_mount.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_mount.c ============================================================================== --- stable/9/sys/kern/vfs_mount.c Wed Apr 3 14:10:37 2013 (r249052) +++ stable/9/sys/kern/vfs_mount.c Wed Apr 3 15:34:25 2013 (r249053) @@ -1260,12 +1260,14 @@ dounmount(mp, flags, td) return (error); } + vn_start_write(NULL, &mp, V_WAIT); MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0 || !TAILQ_EMPTY(&mp->mnt_uppers)) { MNT_IUNLOCK(mp); if (coveredvp) VOP_UNLOCK(coveredvp, 0); + vn_finished_write(mp); return (EBUSY); } mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ; @@ -1285,7 +1287,6 @@ dounmount(mp, flags, td) KASSERT(error == 0, ("%s: invalid return value for msleep in the drain path @ %s:%d", __func__, __FILE__, __LINE__)); - vn_start_write(NULL, &mp, V_WAIT); if (mp->mnt_flag & MNT_EXPUBLIC) vfs_setpublicfs(NULL, NULL, NULL); From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 15:38:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 297972E3; Wed, 3 Apr 2013 15:38:45 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A1BAA8D; Wed, 3 Apr 2013 15:38:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33FciOS078905; Wed, 3 Apr 2013 15:38:44 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33FciW4078904; Wed, 3 Apr 2013 15:38:44 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304031538.r33FciW4078904@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Apr 2013 15:38:44 +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: r249054 - 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, 03 Apr 2013 15:38:45 -0000 Author: kib Date: Wed Apr 3 15:38:44 2013 New Revision: 249054 URL: http://svnweb.freebsd.org/changeset/base/249054 Log: MFC r248563: Increment the write ref counter for the buffer object before calling bundirty(). Modified: stable/9/sys/kern/vfs_bio.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/kern/vfs_bio.c ============================================================================== --- stable/9/sys/kern/vfs_bio.c Wed Apr 3 15:34:25 2013 (r249053) +++ stable/9/sys/kern/vfs_bio.c Wed Apr 3 15:38:44 2013 (r249054) @@ -936,7 +936,13 @@ bufwrite(struct buf *bp) else vp_md = 0; - /* Mark the buffer clean */ + /* + * Mark the buffer clean. Increment the bufobj write count + * before bundirty() call, to prevent other thread from seeing + * empty dirty list and zero counter for writes in progress, + * falsely indicating that the bufobj is clean. + */ + bufobj_wref(bp->b_bufobj); bundirty(bp); bp->b_flags &= ~B_DONE; @@ -944,7 +950,6 @@ bufwrite(struct buf *bp) bp->b_flags |= B_CACHE; bp->b_iocmd = BIO_WRITE; - bufobj_wref(bp->b_bufobj); vfs_busy_pages(bp, 1); /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 15:57:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9C2A3D4A; Wed, 3 Apr 2013 15:57:18 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E6F1C10; Wed, 3 Apr 2013 15:57:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33FvI76084689; Wed, 3 Apr 2013 15:57:18 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33FvIbw084688; Wed, 3 Apr 2013 15:57:18 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304031557.r33FvIbw084688@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Apr 2013 15: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: r249055 - 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, 03 Apr 2013 15:57:18 -0000 Author: kib Date: Wed Apr 3 15:57:18 2013 New Revision: 249055 URL: http://svnweb.freebsd.org/changeset/base/249055 Log: MFC r248562: Move the vn_start_write() call in the dounmount() before setting the MNTK_UNMOUNT flag. Modified: stable/8/sys/kern/vfs_mount.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/vfs_mount.c ============================================================================== --- stable/8/sys/kern/vfs_mount.c Wed Apr 3 15:38:44 2013 (r249054) +++ stable/8/sys/kern/vfs_mount.c Wed Apr 3 15:57:18 2013 (r249055) @@ -1247,11 +1247,13 @@ dounmount(mp, flags, td) return (error); } + vn_start_write(NULL, &mp, V_WAIT); MNT_ILOCK(mp); if (mp->mnt_kern_flag & MNTK_UNMOUNT) { MNT_IUNLOCK(mp); if (coveredvp) VOP_UNLOCK(coveredvp, 0); + vn_finished_write(mp); return (EBUSY); } mp->mnt_kern_flag |= MNTK_UNMOUNT | MNTK_NOINSMNTQ; @@ -1271,7 +1273,6 @@ dounmount(mp, flags, td) KASSERT(error == 0, ("%s: invalid return value for msleep in the drain path @ %s:%d", __func__, __FILE__, __LINE__)); - vn_start_write(NULL, &mp, V_WAIT); if (mp->mnt_flag & MNT_EXPUBLIC) vfs_setpublicfs(NULL, NULL, NULL); From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 16:02:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 53DC41CD; Wed, 3 Apr 2013 16:02:02 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 46180CD5; Wed, 3 Apr 2013 16:02:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33G22m5087042; Wed, 3 Apr 2013 16:02:02 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33G22Hj087041; Wed, 3 Apr 2013 16:02:02 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304031602.r33G22Hj087041@svn.freebsd.org> From: Konstantin Belousov Date: Wed, 3 Apr 2013 16:02:02 +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: r249056 - 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, 03 Apr 2013 16:02:02 -0000 Author: kib Date: Wed Apr 3 16:02:01 2013 New Revision: 249056 URL: http://svnweb.freebsd.org/changeset/base/249056 Log: MFC r248563: Increment the write ref counter for the buffer object before calling bundirty(). Modified: stable/8/sys/kern/vfs_bio.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/kern/ (props changed) Modified: stable/8/sys/kern/vfs_bio.c ============================================================================== --- stable/8/sys/kern/vfs_bio.c Wed Apr 3 15:57:18 2013 (r249055) +++ stable/8/sys/kern/vfs_bio.c Wed Apr 3 16:02:01 2013 (r249056) @@ -892,7 +892,13 @@ bufwrite(struct buf *bp) else vp_md = 0; - /* Mark the buffer clean */ + /* + * Mark the buffer clean. Increment the bufobj write count + * before bundirty() call, to prevent other thread from seeing + * empty dirty list and zero counter for writes in progress, + * falsely indicating that the bufobj is clean. + */ + bufobj_wref(bp->b_bufobj); bundirty(bp); bp->b_flags &= ~B_DONE; @@ -900,7 +906,6 @@ bufwrite(struct buf *bp) bp->b_flags |= B_CACHE; bp->b_iocmd = BIO_WRITE; - bufobj_wref(bp->b_bufobj); vfs_busy_pages(bp, 1); /* From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 16:20:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id BF54CBD5; Wed, 3 Apr 2013 16:20:22 +0000 (UTC) (envelope-from sjg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B2229E01; Wed, 3 Apr 2013 16:20:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33GKMZL091083; Wed, 3 Apr 2013 16:20:22 GMT (envelope-from sjg@svn.freebsd.org) Received: (from sjg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33GKMBt091082; Wed, 3 Apr 2013 16:20:22 GMT (envelope-from sjg@svn.freebsd.org) Message-Id: <201304031620.r33GKMBt091082@svn.freebsd.org> From: "Simon J. Gerraty" Date: Wed, 3 Apr 2013 16:20:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249057 - 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: Wed, 03 Apr 2013 16:20:22 -0000 Author: sjg Date: Wed Apr 3 16:20:21 2013 New Revision: 249057 URL: http://svnweb.freebsd.org/changeset/base/249057 Log: Tell bmake to use the FreeBSD preferred makefile preference list. PR: 177593 Reviewed by: obrien Modified: head/share/mk/sys.mk Modified: head/share/mk/sys.mk ============================================================================== --- head/share/mk/sys.mk Wed Apr 3 16:02:01 2013 (r249056) +++ head/share/mk/sys.mk Wed Apr 3 16:20:21 2013 (r249057) @@ -333,6 +333,9 @@ OBJFORMAT?= elf # Tell bmake to expand -V VAR by default .MAKE.EXPAND_VARIABLES= yes +# Tell bmake the makefile preference +.MAKE.MAKEFILE_PREFERENCE?= BSDmakefile makefile Makefile + .if !defined(.PARSEDIR) # We are not bmake, which is more aggressive about searching .PATH # It is sometime necessary to curb its enthusiasm with .NOPATH From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 16:26:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3D56FDF5; Wed, 3 Apr 2013 16:26:59 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 16A36E5C; Wed, 3 Apr 2013 16:26:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33GQwPF093619; Wed, 3 Apr 2013 16:26:58 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33GQwL7093617; Wed, 3 Apr 2013 16:26:58 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304031626.r33GQwL7093617@svn.freebsd.org> From: Dimitry Andric Date: Wed, 3 Apr 2013 16:26:58 +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: r249058 - in stable/8/contrib/binutils: bfd binutils 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, 03 Apr 2013 16:26:59 -0000 Author: dim Date: Wed Apr 3 16:26:58 2013 New Revision: 249058 URL: http://svnweb.freebsd.org/changeset/base/249058 Log: MFC r248802: Similar to r239870 and r239872, teach the other binutils tools about the DW_FORM_flag_present dwarf attribute, so they do not print errors or warnings on files that contain it. (This attribute can be emitted by newer versions of clang and gcc.) Modified: stable/8/contrib/binutils/bfd/dwarf2.c stable/8/contrib/binutils/binutils/readelf.c Directory Properties: stable/8/contrib/binutils/ (props changed) Modified: stable/8/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/8/contrib/binutils/bfd/dwarf2.c Wed Apr 3 16:20:21 2013 (r249057) +++ stable/8/contrib/binutils/bfd/dwarf2.c Wed Apr 3 16:26:58 2013 (r249058) @@ -617,6 +617,9 @@ read_attribute_value (struct attribute * attr->u.val = read_1_byte (abfd, info_ptr); info_ptr += 1; break; + case DW_FORM_flag_present: + attr->u.val = 1; + break; case DW_FORM_sdata: attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; Modified: stable/8/contrib/binutils/binutils/readelf.c ============================================================================== --- stable/8/contrib/binutils/binutils/readelf.c Wed Apr 3 16:20:21 2013 (r249057) +++ stable/8/contrib/binutils/binutils/readelf.c Wed Apr 3 16:26:58 2013 (r249058) @@ -6997,6 +6997,7 @@ get_FORM_name (unsigned long form) case DW_FORM_ref8: return "DW_FORM_ref8"; case DW_FORM_ref_udata: return "DW_FORM_ref_udata"; case DW_FORM_indirect: return "DW_FORM_indirect"; + case DW_FORM_flag_present: return "DW_FORM_flag_present"; default: { static char buffer[100]; @@ -7888,6 +7889,10 @@ read_and_display_attr_value (unsigned lo data += offset_size; break; + case DW_FORM_flag_present: + uvalue = 1; + break; + case DW_FORM_ref1: case DW_FORM_flag: case DW_FORM_data1: @@ -7943,6 +7948,7 @@ read_and_display_attr_value (unsigned lo printf (" %#lx", uvalue); break; + case DW_FORM_flag_present: case DW_FORM_flag: case DW_FORM_data1: case DW_FORM_data2: From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 16:31:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 56995FCD; Wed, 3 Apr 2013 16:31:31 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 304D7E9E; Wed, 3 Apr 2013 16:31:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33GVVN0095853; Wed, 3 Apr 2013 16:31:31 GMT (envelope-from dim@svn.freebsd.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33GVUQc095851; Wed, 3 Apr 2013 16:31:30 GMT (envelope-from dim@svn.freebsd.org) Message-Id: <201304031631.r33GVUQc095851@svn.freebsd.org> From: Dimitry Andric Date: Wed, 3 Apr 2013 16:31:30 +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: r249059 - in stable/7/contrib/binutils: bfd binutils 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, 03 Apr 2013 16:31:31 -0000 Author: dim Date: Wed Apr 3 16:31:30 2013 New Revision: 249059 URL: http://svnweb.freebsd.org/changeset/base/249059 Log: MFC r248802: Similar to r239870 and r239872, teach the other binutils tools about the DW_FORM_flag_present dwarf attribute, so they do not print errors or warnings on files that contain it. (This attribute can be emitted by newer versions of clang and gcc.) Modified: stable/7/contrib/binutils/bfd/dwarf2.c stable/7/contrib/binutils/binutils/readelf.c Directory Properties: stable/7/contrib/binutils/ (props changed) Modified: stable/7/contrib/binutils/bfd/dwarf2.c ============================================================================== --- stable/7/contrib/binutils/bfd/dwarf2.c Wed Apr 3 16:26:58 2013 (r249058) +++ stable/7/contrib/binutils/bfd/dwarf2.c Wed Apr 3 16:31:30 2013 (r249059) @@ -617,6 +617,9 @@ read_attribute_value (struct attribute * attr->u.val = read_1_byte (abfd, info_ptr); info_ptr += 1; break; + case DW_FORM_flag_present: + attr->u.val = 1; + break; case DW_FORM_sdata: attr->u.sval = read_signed_leb128 (abfd, info_ptr, &bytes_read); info_ptr += bytes_read; Modified: stable/7/contrib/binutils/binutils/readelf.c ============================================================================== --- stable/7/contrib/binutils/binutils/readelf.c Wed Apr 3 16:26:58 2013 (r249058) +++ stable/7/contrib/binutils/binutils/readelf.c Wed Apr 3 16:31:30 2013 (r249059) @@ -6997,6 +6997,7 @@ get_FORM_name (unsigned long form) case DW_FORM_ref8: return "DW_FORM_ref8"; case DW_FORM_ref_udata: return "DW_FORM_ref_udata"; case DW_FORM_indirect: return "DW_FORM_indirect"; + case DW_FORM_flag_present: return "DW_FORM_flag_present"; default: { static char buffer[100]; @@ -7888,6 +7889,10 @@ read_and_display_attr_value (unsigned lo data += offset_size; break; + case DW_FORM_flag_present: + uvalue = 1; + break; + case DW_FORM_ref1: case DW_FORM_flag: case DW_FORM_data1: @@ -7943,6 +7948,7 @@ read_and_display_attr_value (unsigned lo printf (" %#lx", uvalue); break; + case DW_FORM_flag_present: case DW_FORM_flag: case DW_FORM_data1: case DW_FORM_data2: From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 18:30:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C9CC4677; Wed, 3 Apr 2013 18:30:09 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BCCC86B0; Wed, 3 Apr 2013 18:30:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33IU9HR029441; Wed, 3 Apr 2013 18:30:09 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33IU9Fs029436; Wed, 3 Apr 2013 18:30:09 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304031830.r33IU9Fs029436@svn.freebsd.org> From: Alexander Motin Date: Wed, 3 Apr 2013 18:30:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249062 - in head/sys/dev/ata: . chipsets 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, 03 Apr 2013 18:30:09 -0000 Author: mav Date: Wed Apr 3 18:30:09 2013 New Revision: 249062 URL: http://svnweb.freebsd.org/changeset/base/249062 Log: Since ATA_CAM mode has no implemented support for serializing access to the different ATA channels, required for acard and pc98 ATA controllers, block access to second channels of both, hoping that one working channel is better then none. I have an idea how that support could be implemented, but I have no hardware to work on that. MFC after: 1 week Modified: head/sys/dev/ata/ata-cbus.c head/sys/dev/ata/chipsets/ata-acard.c Modified: head/sys/dev/ata/ata-cbus.c ============================================================================== --- head/sys/dev/ata/ata-cbus.c Wed Apr 3 17:19:26 2013 (r249061) +++ head/sys/dev/ata/ata-cbus.c Wed Apr 3 18:30:09 2013 (r249062) @@ -53,10 +53,13 @@ struct ata_cbus_controller { struct resource *bankio; struct resource *irq; void *ih; +#ifndef ATA_CAM struct mtx bank_mtx; int locked_bank; int restart_bank; int hardware_bank; +#endif + int channels; struct { void (*function)(void *); void *argument; @@ -65,7 +68,9 @@ struct ata_cbus_controller { /* local prototypes */ static void ata_cbus_intr(void *); +#ifndef ATA_CAM static int ata_cbuschannel_banking(device_t dev, int flags); +#endif static int ata_cbus_probe(device_t dev) @@ -155,12 +160,19 @@ ata_cbus_attach(device_t dev) return ENXIO; } +#ifndef ATA_CAM + ctlr->channels = 2; mtx_init(&ctlr->bank_mtx, "ATA cbus bank lock", NULL, MTX_DEF); ctlr->hardware_bank = -1; ctlr->locked_bank = -1; ctlr->restart_bank = -1; +#else + /* Work around the lack of channel serialization in ATA_CAM. */ + ctlr->channels = 1; + device_printf(dev, "second channel ignored\n"); +#endif - for (unit = 0; unit < 2; unit++) { + for (unit = 0; unit < ctlr->channels; unit++) { child = device_add_child(dev, "ata", unit); if (child == NULL) device_printf(dev, "failed to add ata child device\n"); @@ -229,10 +241,12 @@ ata_cbus_intr(void *data) struct ata_channel *ch; int unit; - for (unit = 0; unit < 2; unit++) { + for (unit = 0; unit < ctlr->channels; unit++) { if (!(ch = ctlr->interrupt[unit].argument)) continue; +#ifndef ATA_CAM if (ata_cbuschannel_banking(ch->dev, ATA_LF_WHICH) == unit) +#endif ctlr->interrupt[unit].function(ch); } } @@ -335,18 +349,16 @@ ata_cbuschannel_resume(device_t dev) return ata_resume(dev); } +#ifndef ATA_CAM static int ata_cbuschannel_banking(device_t dev, int flags) { struct ata_cbus_controller *ctlr = device_get_softc(device_get_parent(dev)); -#ifndef ATA_CAM struct ata_channel *ch = device_get_softc(dev); -#endif int res; mtx_lock(&ctlr->bank_mtx); switch (flags) { -#ifndef ATA_CAM case ATA_LF_LOCK: if (ctlr->locked_bank == -1) ctlr->locked_bank = ch->unit; @@ -371,7 +383,6 @@ ata_cbuschannel_banking(device_t dev, in } } break; -#endif case ATA_LF_WHICH: break; @@ -380,6 +391,7 @@ ata_cbuschannel_banking(device_t dev, in mtx_unlock(&ctlr->bank_mtx); return res; } +#endif static device_method_t ata_cbuschannel_methods[] = { /* device interface */ Modified: head/sys/dev/ata/chipsets/ata-acard.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acard.c Wed Apr 3 17:19:26 2013 (r249061) +++ head/sys/dev/ata/chipsets/ata-acard.c Wed Apr 3 18:30:09 2013 (r249062) @@ -124,6 +124,10 @@ ata_acard_chipinit(device_t dev) M_ATAPCI, M_WAITOK | M_ZERO); ata_serialize_init(serial); ctlr->chipset_data = serial; +#else + /* Work around the lack of channel serialization in ATA_CAM. */ + ctlr->channels = 1; + device_printf(dev, "second channel ignored\n"); #endif } else From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 19:19:46 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3EA077BC; Wed, 3 Apr 2013 19:19:46 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 318F895D; Wed, 3 Apr 2013 19:19:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33JJkr7043940; Wed, 3 Apr 2013 19:19:46 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33JJkGL043939; Wed, 3 Apr 2013 19:19:46 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201304031919.r33JJkGL043939@svn.freebsd.org> From: Brooks Davis Date: Wed, 3 Apr 2013 19:19:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249063 - head/bin/dd 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, 03 Apr 2013 19:19:46 -0000 Author: brooks Date: Wed Apr 3 19:19:45 2013 New Revision: 249063 URL: http://svnweb.freebsd.org/changeset/base/249063 Log: IFP4 change 222074. Introduce an explicit close of the output descriptor so that work done on close is accounted for in the summary output triggered at exit (implicit close()s occur after atexit() hooks). This is useful because some devices such as cfi(4) may perform signficant work after a close occurs (e.g. erasing and rewriting a block of flash). Modified: head/bin/dd/dd.c Modified: head/bin/dd/dd.c ============================================================================== --- head/bin/dd/dd.c Wed Apr 3 18:30:09 2013 (r249062) +++ head/bin/dd/dd.c Wed Apr 3 19:19:45 2013 (r249063) @@ -98,6 +98,13 @@ main(int argc __unused, char *argv[]) dd_in(); dd_close(); + /* + * Some devices such as cfi(4) may perform significant amounts + * of work when a write descriptor is closed. Close the out + * descriptor explicitly so that the summary handler (called + * from an atexit() hook) includes this work. + */ + close(out.fd); exit(0); } From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 19:26:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CD452A8F; Wed, 3 Apr 2013 19:26:32 +0000 (UTC) (envelope-from mckusick@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BFEDD9BD; Wed, 3 Apr 2013 19:26:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33JQWCc046467; Wed, 3 Apr 2013 19:26:32 GMT (envelope-from mckusick@svn.freebsd.org) Received: (from mckusick@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33JQWOP046466; Wed, 3 Apr 2013 19:26:32 GMT (envelope-from mckusick@svn.freebsd.org) Message-Id: <201304031926.r33JQWOP046466@svn.freebsd.org> From: Kirk McKusick Date: Wed, 3 Apr 2013 19:26:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249064 - head/sys/ufs/ffs 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, 03 Apr 2013 19:26:32 -0000 Author: mckusick Date: Wed Apr 3 19:26:32 2013 New Revision: 249064 URL: http://svnweb.freebsd.org/changeset/base/249064 Log: The code in clear_remove() and clear_inodedeps() skips one entry in the pagedep and inodedep hash tables. An entry in the table is skipped because 'pagedep_hash' and 'inodedep_hash' hold the size of the hash tables - 1. The chance that this would have any operational failure is extremely unlikely. These funtions only need to find a single entry and are only called when there are too many entries. The chance that they would fail because all the entries are on the single skipped hash chain are remote. Submitted by: Pedro Martelletto Reviewed by: kib MFC after: 2 weeks Modified: head/sys/ufs/ffs/ffs_softdep.c Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Wed Apr 3 19:19:45 2013 (r249063) +++ head/sys/ufs/ffs/ffs_softdep.c Wed Apr 3 19:26:32 2013 (r249064) @@ -13022,9 +13022,9 @@ clear_remove(void) mtx_assert(&lk, MA_OWNED); - for (cnt = 0; cnt < pagedep_hash; cnt++) { + for (cnt = 0; cnt <= pagedep_hash; cnt++) { pagedephd = &pagedep_hashtbl[next++]; - if (next >= pagedep_hash) + if (next > pagedep_hash) next = 0; LIST_FOREACH(pagedep, pagedephd, pd_hash) { if (LIST_EMPTY(&pagedep->pd_dirremhd)) @@ -13085,9 +13085,9 @@ clear_inodedeps(void) * We will then gather up all the inodes in its block * that have dependencies and flush them out. */ - for (cnt = 0; cnt < inodedep_hash; cnt++) { + for (cnt = 0; cnt <= inodedep_hash; cnt++) { inodedephd = &inodedep_hashtbl[next++]; - if (next >= inodedep_hash) + if (next > inodedep_hash) next = 0; if ((inodedep = LIST_FIRST(inodedephd)) != NULL) break; From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 20:26:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EBB46535; Wed, 3 Apr 2013 20:26:53 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C5821D33; Wed, 3 Apr 2013 20:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33KQrWG064117; Wed, 3 Apr 2013 20:26:53 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33KQrqE064116; Wed, 3 Apr 2013 20:26:53 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304032026.r33KQrqE064116@svn.freebsd.org> From: Edward Tomasz Napierala Date: Wed, 3 Apr 2013 20:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249065 - 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: Wed, 03 Apr 2013 20:26:54 -0000 Author: trasz Date: Wed Apr 3 20:26:52 2013 New Revision: 249065 URL: http://svnweb.freebsd.org/changeset/base/249065 Log: Fix locking problem in ctl_maintenance_in() - one cannot use M_WAITOK or call ctl_done() with mutex held. Reviewed by: ken Sponsored by: FreeBSD Foundation Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Wed Apr 3 19:26:32 2013 (r249064) +++ head/sys/cam/ctl/ctl.c Wed Apr 3 20:26:52 2013 (r249065) @@ -6926,7 +6926,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct struct scsi_maintenance_in *cdb; int retval; int alloc_len, total_len = 0; - int num_target_port_groups; + int num_target_port_groups, single; struct ctl_lun *lun; struct ctl_softc *softc; struct scsi_target_group_data *rtg_ptr; @@ -6941,7 +6941,6 @@ ctl_maintenance_in(struct ctl_scsiio *ct lun = (struct ctl_lun *)ctsio->io_hdr.ctl_private[CTL_PRIV_LUN].ptr; retval = CTL_RETVAL_COMPLETE; - mtx_lock(&softc->ctl_lock); if ((cdb->byte2 & SERVICE_ACTION_MASK) != SA_RPRT_TRGT_GRP) { ctl_set_invalid_field(/*ctsio*/ ctsio, @@ -6954,7 +6953,11 @@ ctl_maintenance_in(struct ctl_scsiio *ct return(retval); } - if (ctl_is_single) + mtx_lock(&softc->ctl_lock); + single = ctl_is_single; + mtx_unlock(&softc->ctl_lock); + + if (single) num_target_port_groups = NUM_TARGET_PORT_GROUPS - 1; else num_target_port_groups = NUM_TARGET_PORT_GROUPS; @@ -6990,9 +6993,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct tp_desc_ptr1_2 = (struct scsi_target_port_descriptor *) &tp_desc_ptr1_1->desc_list[0]; - - - if (ctl_is_single == 0) { + if (single == 0) { tpg_desc_ptr2 = (struct scsi_target_port_group_descriptor *) &tp_desc_ptr1_2->desc_list[0]; tp_desc_ptr2_1 = &tpg_desc_ptr2->descriptors[0]; @@ -7005,7 +7006,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct } scsi_ulto4b(total_len - 4, rtg_ptr->length); - if (ctl_is_single == 0) { + if (single == 0) { if (ctsio->io_hdr.nexus.targ_port < CTL_MAX_PORTS) { if (lun->flags & CTL_LUN_PRIMARY_SC) { tpg_desc_ptr1->pref_state = TPG_PRIMARY; @@ -7035,7 +7036,7 @@ ctl_maintenance_in(struct ctl_scsiio *ct tpg_desc_ptr1->status = TPG_IMPLICIT; tpg_desc_ptr1->target_port_count= NUM_PORTS_PER_GRP; - if (ctl_is_single == 0) { + if (single == 0) { tpg_desc_ptr2->support = 0; tpg_desc_ptr2->target_port_group[1] = 2; tpg_desc_ptr2->status = TPG_IMPLICIT; @@ -7056,8 +7057,6 @@ ctl_maintenance_in(struct ctl_scsiio *ct } } - mtx_unlock(&softc->ctl_lock); - ctsio->be_move_done = ctl_config_move_done; CTL_DEBUG_PRINT(("buf = %x %x %x %x %x %x %x %x\n", From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 20:31:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7FA907C4; Wed, 3 Apr 2013 20:31:11 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 711E8D66; Wed, 3 Apr 2013 20:31:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33KVBvT067420; Wed, 3 Apr 2013 20:31:11 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33KVBXg067419; Wed, 3 Apr 2013 20:31:11 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <201304032031.r33KVBXg067419@svn.freebsd.org> From: John Baldwin Date: Wed, 3 Apr 2013 20:31:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249066 - head/sys/ofed/drivers/infiniband/ulp/sdp 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, 03 Apr 2013 20:31:11 -0000 Author: jhb Date: Wed Apr 3 20:31:10 2013 New Revision: 249066 URL: http://svnweb.freebsd.org/changeset/base/249066 Log: Check for SS_NBIO in the socket state field rather than socket buffer flags. Submitted by: Vijay Singh MFC after: 1 week Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Modified: head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Wed Apr 3 20:26:52 2013 (r249065) +++ head/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c Wed Apr 3 20:31:10 2013 (r249066) @@ -1267,7 +1267,7 @@ sdp_sorecv(struct socket *so, struct soc /* Socket buffer is empty and we shall not block. */ if (sb->sb_cc == 0 && - ((sb->sb_flags & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) { + ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)))) { error = EAGAIN; goto out; } @@ -1297,7 +1297,7 @@ restart: /* Socket buffer got some data that we shall deliver now. */ if (sb->sb_cc > 0 && !(flags & MSG_WAITALL) && - ((sb->sb_flags & SS_NBIO) || + ((so->so_state & SS_NBIO) || (flags & (MSG_DONTWAIT|MSG_NBIO)) || sb->sb_cc >= sb->sb_lowat || sb->sb_cc >= uio->uio_resid || From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 20:52:17 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C6FA2CF5; Wed, 3 Apr 2013 20:52:17 +0000 (UTC) (envelope-from jimharris@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B8589E51; Wed, 3 Apr 2013 20:52:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33KqHGA073380; Wed, 3 Apr 2013 20:52:17 GMT (envelope-from jimharris@svn.freebsd.org) Received: (from jimharris@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33KqHnL073379; Wed, 3 Apr 2013 20:52:17 GMT (envelope-from jimharris@svn.freebsd.org) Message-Id: <201304032052.r33KqHnL073379@svn.freebsd.org> From: Jim Harris Date: Wed, 3 Apr 2013 20:52:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249067 - head/sbin/nvmecontrol 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, 03 Apr 2013 20:52:17 -0000 Author: jimharris Date: Wed Apr 3 20:52:17 2013 New Revision: 249067 URL: http://svnweb.freebsd.org/changeset/base/249067 Log: Fix typo (devicde -> device). Modified: head/sbin/nvmecontrol/nvmecontrol.c Modified: head/sbin/nvmecontrol/nvmecontrol.c ============================================================================== --- head/sbin/nvmecontrol/nvmecontrol.c Wed Apr 3 20:31:10 2013 (r249066) +++ head/sbin/nvmecontrol/nvmecontrol.c Wed Apr 3 20:52:17 2013 (r249067) @@ -438,7 +438,7 @@ identify(int argc, char *argv[]) optind = 1; /* - * If devicde node contains "ns", we consider it a namespace, + * If device node contains "ns", we consider it a namespace, * otherwise, consider it a controller. */ if (strstr(target, "ns") == NULL) From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 21:15:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 89D313A2; Wed, 3 Apr 2013 21:15:22 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 7A43CF45; Wed, 3 Apr 2013 21:15:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33LFMgk079823; Wed, 3 Apr 2013 21:15:22 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33LFMDl079822; Wed, 3 Apr 2013 21:15:22 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304032115.r33LFMDl079822@svn.freebsd.org> From: Xin LI Date: Wed, 3 Apr 2013 21:15: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: r249068 - stable/8/cddl/contrib/opensolaris/cmd/zpool 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, 03 Apr 2013 21:15:22 -0000 Author: delphij Date: Wed Apr 3 21:15:21 2013 New Revision: 249068 URL: http://svnweb.freebsd.org/changeset/base/249068 Log: The current ZFS version in 8-STABLE supports feature flags, which enables many new features but makes it impossible to import pools created on earlier released FreeBSD 9.x releases, including 9.0 and 9.1-RELEASE, where the feature flags are not yet supported because they predates the merge (r243674), and 9.2-RELEASE will not be released before 8.4-RELEASE. To avoid surprises when users "upgrade" to 9.1-RELEASE, limit the creation version to 28 by default on stable/8. The user will still be able to upgrade the pool by using "zpool upgrade" or at create time by explicitly specifying "zpool create -o version=5000". This is a direct commit to stable/8 because it's not applicable to -HEAD, and can be reverted once 9.2-RELEASE is released. Requested by: re (jpaetzel, hrs) Reviewed by: mm Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Apr 3 20:52:17 2013 (r249067) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Wed Apr 3 21:15:21 2013 (r249068) @@ -856,6 +856,19 @@ zpool_do_create(int argc, char **argv) } } +#ifdef __FreeBSD__ + /* Compatiblity with FreeBSD 9.0 and 9.1: Use version 28 if unspecified */ + if (nvlist_lookup_string(props, + zpool_prop_to_name(ZPOOL_PROP_VERSION), + &propval) != 0) { + if (add_prop_list(zpool_prop_to_name( + ZPOOL_PROP_VERSION), "28", &props, B_TRUE)) + goto errout; + enable_all_pool_feat = B_FALSE; + } else if (enable_all_pool_feat) + nvlist_remove_all(props, zpool_prop_to_name(ZPOOL_PROP_VERSION)); +#endif /* __FreeBSD__ */ + argc -= optind; argv += optind; From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 21:34:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7937B8D7; Wed, 3 Apr 2013 21:34:36 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 68A5DF1; Wed, 3 Apr 2013 21:34:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33LYaa4085571; Wed, 3 Apr 2013 21:34:36 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33LYZLJ085567; Wed, 3 Apr 2013 21:34:35 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304032134.r33LYZLJ085567@svn.freebsd.org> From: Sean Bruno Date: Wed, 3 Apr 2013 21:34:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249069 - head/sys/dev/hwpmc 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, 03 Apr 2013 21:34:36 -0000 Author: sbruno Date: Wed Apr 3 21:34:35 2013 New Revision: 249069 URL: http://svnweb.freebsd.org/changeset/base/249069 Log: Trailing whitespace cleanup along with 80 column enforcemnt. Submitted by: hiren.panchasara@gmail.com Reviewed by: sbruno@freebsd.org Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/hwpmc_intel.c head/sys/dev/hwpmc/hwpmc_uncore.c head/sys/dev/hwpmc/pmc_events.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Wed Apr 3 21:15:21 2013 (r249068) +++ head/sys/dev/hwpmc/hwpmc_core.c Wed Apr 3 21:34:35 2013 (r249069) @@ -604,7 +604,7 @@ static struct iap_event_descr iap_events IAPDESCR(03H_00H, 0x03, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(03H_01H, 0x03, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_SBX), - IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | + IAPDESCR(03H_02H, 0x03, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(03H_04H, 0x03, 0x04, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_I7O), IAPDESCR(03H_08H, 0x03, 0x08, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | IAP_F_SB | @@ -622,8 +622,8 @@ static struct iap_event_descr iap_events IAPDESCR(05H_00H, 0x05, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(05H_01H, 0x05, 0x01, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAPDESCR(05H_02H, 0x05, 0x02, IAP_F_FM | IAP_F_I7O | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(05H_03H, 0x05, 0x03, IAP_F_FM | IAP_F_I7O), IAPDESCR(06H_00H, 0x06, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2 | @@ -635,7 +635,7 @@ static struct iap_event_descr iap_events IAPDESCR(06H_0FH, 0x06, 0x0F, IAP_F_FM | IAP_F_I7O), IAPDESCR(07H_00H, 0x07, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | + IAPDESCR(07H_01H, 0x07, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(07H_02H, 0x07, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), @@ -683,8 +683,8 @@ static struct iap_event_descr iap_events IAPDESCR(0DH_03H, 0x0D, 0x03, IAP_F_FM | IAP_F_SB | IAP_F_SBX | IAP_F_HW), IAPDESCR(0DH_40H, 0x0D, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), - IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAPDESCR(0EH_01H, 0x0E, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(0EH_02H, 0x0E, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), @@ -698,7 +698,7 @@ static struct iap_event_descr iap_events IAPDESCR(0FH_80H, 0x0F, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_00H, 0x10, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), - IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAPDESCR(10H_01H, 0x10, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX), IAPDESCR(10H_02H, 0x10, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(10H_04H, 0x10, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -737,7 +737,7 @@ static struct iap_event_descr iap_events IAPDESCR(13H_81H, 0x13, 0x81, IAP_F_FM | IAP_F_CA), IAPDESCR(14H_00H, 0x14, 0x00, IAP_F_FM | IAP_F_CC | IAP_F_CC2), - IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | + IAPDESCR(14H_01H, 0x14, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(14H_02H, 0x14, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -764,37 +764,37 @@ static struct iap_event_descr iap_events IAPDESCR(23H, 0x23, IAP_M_CORE, IAP_F_ALLCPUSCORE2), IAPDESCR(24H, 0x24, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_01H, 0x24, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_02H, 0x24, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_03H, 0x24, 0x03, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_04H, 0x24, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_08H, 0x24, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_0CH, 0x24, 0x0C, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_10H, 0x24, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_20H, 0x24, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_21H, 0x24, 0x21, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_22H, 0x24, 0x22, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_24H, 0x24, 0x24, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_27H, 0x24, 0x27, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_30H, 0x24, 0x30, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAPDESCR(24H_40H, 0x24, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_41H, 0x24, 0x41, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_42H, 0x24, 0x42, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_44H, 0x24, 0x44, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_50H, 0x24, 0x50, IAP_F_FM | IAP_F_HW), - IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), - IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_80H, 0x24, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(24H_C0H, 0x24, 0xC0, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(24H_E1H, 0x24, 0xE1, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_E2H, 0x24, 0xE2, IAP_F_FM | IAP_F_HW), IAPDESCR(24H_E4H, 0x24, 0xE4, IAP_F_FM | IAP_F_HW), @@ -820,16 +820,16 @@ static struct iap_event_descr iap_events IAPDESCR(26H_FFH, 0x26, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H, 0x27, IAP_M_CORE | IAP_M_PREFETCH, IAP_F_ALLCPUSCORE2), - IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(27H_01H, 0x27, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(27H_02H, 0x27, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_04H, 0x27, 0x04, IAP_F_FM | IAP_F_I7O | IAP_F_SB | IAP_F_SBX), - IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(27H_08H, 0x27, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(27H_0EH, 0x27, 0x0E, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAPDESCR(27H_0FH, 0x27, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), IAPDESCR(27H_10H, 0x27, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_20H, 0x27, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(27H_40H, 0x27, 0x40, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -839,15 +839,15 @@ static struct iap_event_descr iap_events IAPDESCR(27H_F0H, 0x27, 0xF0, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(28H, 0x28, IAP_M_CORE | IAP_M_MESI, IAP_F_ALLCPUSCORE2), - IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX), - IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SBX), - IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAPDESCR(28H_01H, 0x28, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | + IAPDESCR(28H_02H, 0x28, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SBX), + IAPDESCR(28H_04H, 0x28, 0x04, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_08H, 0x28, 0x08, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | + IAP_F_IB | IAP_F_SBX | IAP_F_IBX), + IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX | IAP_F_IBX), - IAPDESCR(28H_0FH, 0x28, 0x0F, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_IB | IAP_F_SBX | - IAP_F_IBX), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI, IAP_F_CC), IAPDESCR(29H, 0x29, IAP_M_CORE | IAP_M_MESI | IAP_M_PREFETCH, @@ -875,9 +875,11 @@ static struct iap_event_descr iap_events IAPDESCR(3BH_C0H, 0x3B, 0xC0, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3CH_00H, 0x3C, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW), IAPDESCR(3CH_01H, 0x3C, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW), IAPDESCR(3CH_02H, 0x3C, 0x02, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(3DH_01H, 0x3D, 0x01, IAP_F_FM | IAP_F_I7O), @@ -924,14 +926,16 @@ static struct iap_event_descr iap_events IAPDESCR(49H_00H, 0x49, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(49H_01H, 0x49, 0x01, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW), IAPDESCR(49H_02H, 0x49, 0x02, IAP_F_FM | IAP_F_CA | IAP_F_CC2 | - IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | + IAP_F_HW), IAPDESCR(49H_04H, 0x49, 0x04, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(49H_0EH, 0x49, 0x0E, IAP_F_FM | IAP_F_HW), IAPDESCR(49H_10H, 0x49, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | - IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW), @@ -994,7 +998,7 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(5CH_02H, 0x5C, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - + IAPDESCR(5EH_01H, 0x5E, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), @@ -1079,7 +1083,7 @@ static struct iap_event_descr iap_events IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), IAPDESCR(79H_24H, 0x79, 0x24, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW), - + IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), IAPDESCR(7BH, 0x7B, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1198,7 +1202,7 @@ static struct iap_event_descr iap_events IAPDESCR(94H_00H, 0x94, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(9CH_01H, 0x9C, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX | IAP_F_HW), + IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(97H_00H, 0x97, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), IAPDESCR(98H_00H, 0x98, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1224,7 +1228,7 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(A1H_80H, 0xA1, 0x80, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - + IAPDESCR(A2H_00H, 0xA2, 0x00, IAP_F_FM | IAP_F_CC), IAPDESCR(A2H_01H, 0xA2, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), @@ -1501,7 +1505,7 @@ static struct iap_event_descr iap_events IAPDESCR(CDH_01H, 0xCD, 0x01, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(CDH_02H, 0xCD, 0x02, IAP_F_FM | IAP_F_SB | IAP_F_IB | - IAP_F_SBX | IAP_F_IBX), + IAP_F_SBX | IAP_F_IBX), IAPDESCR(CEH_00H, 0xCE, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(CFH_00H, 0xCF, 0x00, IAP_F_FM | IAP_F_CA | IAP_F_CC2), @@ -1519,7 +1523,7 @@ static struct iap_event_descr iap_events IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(D0H_80H, 0xD0, 0X80, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), - + IAPDESCR(D1H_01H, 0xD1, 0x01, IAP_F_FM | IAP_F_WM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW), IAPDESCR(D1H_02H, 0xD1, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM | @@ -1809,7 +1813,7 @@ iap_event_westmere_ok_on_counter(enum pm case PMC_EV_IAP_EVENT_60H_01H: case PMC_EV_IAP_EVENT_60H_02H: case PMC_EV_IAP_EVENT_60H_04H: - case PMC_EV_IAP_EVENT_60H_08H: + case PMC_EV_IAP_EVENT_60H_08H: case PMC_EV_IAP_EVENT_B3H_01H: case PMC_EV_IAP_EVENT_B3H_02H: case PMC_EV_IAP_EVENT_B3H_04H: @@ -1937,12 +1941,12 @@ iap_allocate_pmc(int cpu, int ri, struct * A small number of events are not supported in all the * processors based on a given microarchitecture. */ - if (ev == PMC_EV_IAP_EVENT_0FH_01H || ev == PMC_EV_IAP_EVENT_0FH_80H) { + if (ev == PMC_EV_IAP_EVENT_0FH_01H || ev == PMC_EV_IAP_EVENT_0FH_80H) { model = ((cpu_id & 0xF0000) >> 12) | ((cpu_id & 0xF0) >> 4); - if (core_cputype == PMC_CPU_INTEL_COREI7 && model != 0x2E) - return (EINVAL); + if (core_cputype == PMC_CPU_INTEL_COREI7 && model != 0x2E) + return (EINVAL); } - + switch (core_cputype) { case PMC_CPU_INTEL_COREI7: if (iap_event_corei7_ok_on_counter(ev, ri) == 0) @@ -1996,10 +2000,10 @@ iap_allocate_pmc(int cpu, int ri, struct case PMC_CPU_INTEL_IVYBRIDGE_XEON: cpuflag = IAP_F_IBX; break; - case PMC_CPU_INTEL_SANDYBRIDGE: + case PMC_CPU_INTEL_SANDYBRIDGE: cpuflag = IAP_F_SB; break; - case PMC_CPU_INTEL_SANDYBRIDGE_XEON: + case PMC_CPU_INTEL_SANDYBRIDGE_XEON: cpuflag = IAP_F_SBX; break; case PMC_CPU_INTEL_WESTMERE: @@ -2459,7 +2463,7 @@ core_intr(int cpu, struct trapframe *tf) if (error) continue; - wrmsr(IAP_EVSEL0 + ri, msr | (pm->pm_md.pm_iap.pm_iap_evsel | + wrmsr(IAP_EVSEL0 + ri, msr | (pm->pm_md.pm_iap.pm_iap_evsel | IAP_EN)); } @@ -2539,8 +2543,8 @@ core2_intr(int cpu, struct trapframe *tf /* Reload sampling count. */ wrmsr(IAF_CTR0 + n, v); - PMCDBG(MDP,INT, 1, "iaf-intr cpu=%d error=%d v=%jx(%jx)", cpu, error, - (uintmax_t) v, (uintmax_t) rdpmc(IAF_RI_TO_MSR(n))); + PMCDBG(MDP,INT, 1, "iaf-intr cpu=%d error=%d v=%jx(%jx)", cpu, + error, (uintmax_t) v, (uintmax_t) rdpmc(IAF_RI_TO_MSR(n))); } /* Modified: head/sys/dev/hwpmc/hwpmc_intel.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_intel.c Wed Apr 3 21:15:21 2013 (r249068) +++ head/sys/dev/hwpmc/hwpmc_intel.c Wed Apr 3 21:34:35 2013 (r249069) @@ -68,7 +68,7 @@ intel_switch_out(struct pmc_cpu *pc, str (uintmax_t) rcr4()); /* always turn off the RDPMC instruction */ - load_cr4(rcr4() & ~CR4_PCE); + load_cr4(rcr4() & ~CR4_PCE); return 0; } @@ -131,8 +131,14 @@ pmc_intel_initialize(void) nclasses = 3; break; case 0x1A: - case 0x1E: /* Per Intel document 253669-032 9/2009, pages A-2 and A-57 */ - case 0x1F: /* Per Intel document 253669-032 9/2009, pages A-2 and A-57 */ + case 0x1E: /* + * Per Intel document 253669-032 9/2009, + * pages A-2 and A-57 + */ + case 0x1F: /* + * Per Intel document 253669-032 9/2009, + * pages A-2 and A-57 + */ case 0x2E: cputype = PMC_CPU_INTEL_COREI7; nclasses = 5; @@ -180,7 +186,7 @@ pmc_intel_initialize(void) /* Allocate base class and initialize machine dependent struct */ pmc_mdep = pmc_mdep_alloc(nclasses); - pmc_mdep->pmd_cputype = cputype; + pmc_mdep->pmd_cputype = cputype; pmc_mdep->pmd_switch_in = intel_switch_in; pmc_mdep->pmd_switch_out = intel_switch_out; Modified: head/sys/dev/hwpmc/hwpmc_uncore.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_uncore.c Wed Apr 3 21:15:21 2013 (r249068) +++ head/sys/dev/hwpmc/hwpmc_uncore.c Wed Apr 3 21:34:35 2013 (r249069) @@ -754,13 +754,13 @@ static struct ucp_event_descr ucp_events UCPDESCR(66H_04H, 0x66, 0x04, UCP_F_FM | UCP_F_I7 | UCP_F_WM), UCPDESCR(67H_01H, 0x67, 0x01, UCP_F_FM | UCP_F_WM), - + UCPDESCR(80H_01H, 0x80, 0x01, UCP_F_FM | UCP_F_WM | UCP_F_SB | UCP_F_HW), UCPDESCR(80H_02H, 0x80, 0x02, UCP_F_FM | UCP_F_WM), UCPDESCR(80H_04H, 0x80, 0x04, UCP_F_FM | UCP_F_WM), UCPDESCR(80H_08H, 0x80, 0x08, UCP_F_FM | UCP_F_WM), - + UCPDESCR(81H_01H, 0x81, 0x01, UCP_F_FM | UCP_F_WM | UCP_F_SB | UCP_F_HW), UCPDESCR(81H_02H, 0x81, 0x02, UCP_F_FM | UCP_F_WM), @@ -770,13 +770,13 @@ static struct ucp_event_descr ucp_events UCPDESCR(81H_80H, 0x81, 0x80, UCP_F_FM | UCP_F_SB | UCP_F_HW), UCPDESCR(82H_01H, 0x82, 0x01, UCP_F_FM | UCP_F_WM), - + UCPDESCR(83H_01H, 0x83, 0x01, UCP_F_FM | UCP_F_WM | UCP_F_SB | UCP_F_HW), UCPDESCR(83H_02H, 0x83, 0x02, UCP_F_FM | UCP_F_WM), UCPDESCR(83H_04H, 0x83, 0x04, UCP_F_FM | UCP_F_WM), UCPDESCR(83H_08H, 0x83, 0x08, UCP_F_FM | UCP_F_WM), - + UCPDESCR(84H_01H, 0x84, 0x01, UCP_F_FM | UCP_F_WM | UCP_F_SB | UCP_F_HW), UCPDESCR(84H_02H, 0x84, 0x02, UCP_F_FM | UCP_F_WM), @@ -808,20 +808,20 @@ static int ucp_event_sb_hw_ok_on_counter(enum pmc_event pe, int ri) { uint32_t mask; - + switch (pe) { - /* + /* * Events valid only on counter 0. */ case PMC_EV_UCP_EVENT_80H_01H: case PMC_EV_UCP_EVENT_83H_01H: mask = (1 << 0); break; - + default: mask = ~0; /* Any row index is ok. */ } - + return (mask & (1 << ri)); } @@ -855,7 +855,7 @@ ucp_allocate_pmc(int cpu, int ri, struct default: break; } - + /* * Look for an event descriptor with matching CPU and event id @@ -1045,9 +1045,9 @@ ucp_start_pmc(int cpu, int ri) evsel = pm->pm_md.pm_ucp.pm_ucp_evsel; - PMCDBG(MDP,STA,2, - "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", - cpu, ri, SELECTSEL(uncore_cputype) + ri, evsel); + PMCDBG(MDP,STA,2, + "ucp-start/2 cpu=%d ri=%d evselmsr=0x%x evsel=0x%x", + cpu, ri, SELECTSEL(uncore_cputype) + ri, evsel); /* Event specific configuration. */ switch (pm->pm_event) { @@ -1067,12 +1067,12 @@ ucp_start_pmc(int cpu, int ri) case PMC_EV_UCP_EVENT_0CH_08H_S: wrmsr(MSR_GQ_SNOOP_MESF,0x4); break; - default: + default: break; } wrmsr(SELECTSEL(uncore_cputype) + ri, evsel); - + do { cc->pc_resync = 0; cc->pc_globalctrl |= (1ULL << ri); Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Wed Apr 3 21:15:21 2013 (r249068) +++ head/sys/dev/hwpmc/pmc_events.h Wed Apr 3 21:34:35 2013 (r249069) @@ -29,7 +29,7 @@ #ifndef _DEV_HWPMC_PMC_EVENTS_H_ #define _DEV_HWPMC_PMC_EVENTS_H_ -/* +/* * Note: Documentation on adding events can be found both in * the source tree at src/share/doc/papers/hwpmc/hwpmc.ms * as well as on-line at: @@ -889,11 +889,11 @@ __PMC_EV(IAP, EVENT_A2H_10H) \ __PMC_EV(IAP, EVENT_A2H_20H) \ __PMC_EV(IAP, EVENT_A2H_40H) \ __PMC_EV(IAP, EVENT_A2H_80H) \ -__PMC_EV(IAP, EVENT_A3H_01H) \ -__PMC_EV(IAP, EVENT_A3H_02H) \ -__PMC_EV(IAP, EVENT_A3H_04H) \ -__PMC_EV(IAP, EVENT_A3H_05H) \ -__PMC_EV(IAP, EVENT_A3H_08H) \ +__PMC_EV(IAP, EVENT_A3H_01H) \ +__PMC_EV(IAP, EVENT_A3H_02H) \ +__PMC_EV(IAP, EVENT_A3H_04H) \ +__PMC_EV(IAP, EVENT_A3H_05H) \ +__PMC_EV(IAP, EVENT_A3H_08H) \ __PMC_EV(IAP, EVENT_A6H_01H) \ __PMC_EV(IAP, EVENT_A7H_01H) \ __PMC_EV(IAP, EVENT_A8H_01H) \ @@ -1195,7 +1195,7 @@ __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED" __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED_NOT_TAKEN", \ IAP_EVENT_C4H_02H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.MISPRED_TAKEN", IAP_EVENT_C4H_08H) \ -__PMC_EV_ALIAS("BR_INST_RETIRED.PRED_NOT_TAKEN",IAP_EVENT_C4H_01H) \ +__PMC_EV_ALIAS("BR_INST_RETIRED.PRED_NOT_TAKEN", IAP_EVENT_C4H_01H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.PRED_TAKEN", IAP_EVENT_C4H_04H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.TAKEN", IAP_EVENT_C4H_0CH) \ __PMC_EV_ALIAS("BR_MISSP_EXEC", IAP_EVENT_89H_00H) \ @@ -1416,139 +1416,139 @@ __PMC_EV_ALIAS("X87_OPS_RETIRED.FXCH", /* * Aliases for Core PMC events. */ -#define __PMC_EV_ALIAS_CORE() \ -__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ -__PMC_EV_ALIAS("BAClears", IAP_EVENT_E6H_00H) \ -__PMC_EV_ALIAS("BTB_Misses", IAP_EVENT_E2H_00H) \ -__PMC_EV_ALIAS("Br_BAC_Missp_Exec", IAP_EVENT_8AH_00H) \ -__PMC_EV_ALIAS("Br_Bogus", IAP_EVENT_E4H_00H) \ -__PMC_EV_ALIAS("Br_Call_Exec", IAP_EVENT_92H_00H) \ -__PMC_EV_ALIAS("Br_Call_Missp_Exec", IAP_EVENT_93H_00H) \ -__PMC_EV_ALIAS("Br_Cnd_Exec", IAP_EVENT_8BH_00H) \ -__PMC_EV_ALIAS("Br_Cnd_Missp_Exec", IAP_EVENT_8CH_00H) \ -__PMC_EV_ALIAS("Br_Ind_Call_Exec", IAP_EVENT_94H_00H) \ -__PMC_EV_ALIAS("Br_Ind_Exec", IAP_EVENT_8DH_00H) \ -__PMC_EV_ALIAS("Br_Ind_Missp_Exec", IAP_EVENT_8EH_00H) \ -__PMC_EV_ALIAS("Br_Inst_Exec", IAP_EVENT_88H_00H) \ -__PMC_EV_ALIAS("Br_Instr_Decoded", IAP_EVENT_E0H_00H) \ -__PMC_EV_ALIAS("Br_Instr_Ret", IAP_EVENT_C4H_00H) \ -__PMC_EV_ALIAS("Br_MisPred_Ret", IAP_EVENT_C5H_00H) \ -__PMC_EV_ALIAS("Br_MisPred_Taken_Ret", IAP_EVENT_CAH_00H) \ -__PMC_EV_ALIAS("Br_Missp_Exec", IAP_EVENT_89H_00H) \ -__PMC_EV_ALIAS("Br_Ret_BAC_Missp_Exec", IAP_EVENT_91H_00H) \ -__PMC_EV_ALIAS("Br_Ret_Exec", IAP_EVENT_8FH_00H) \ -__PMC_EV_ALIAS("Br_Ret_Missp_Exec", IAP_EVENT_90H_00H) \ -__PMC_EV_ALIAS("Br_Taken_Ret", IAP_EVENT_C9H_00H) \ -__PMC_EV_ALIAS("Bus_BNR_Clocks", IAP_EVENT_61H_00H) \ -__PMC_EV_ALIAS("Bus_DRDY_Clocks", IAP_EVENT_62H_00H) \ -__PMC_EV_ALIAS("Bus_Data_Rcv", IAP_EVENT_64H_40H) \ -__PMC_EV_ALIAS("Bus_Locks_Clocks", IAP_EVENT_63H) \ -__PMC_EV_ALIAS("Bus_Not_In_Use", IAP_EVENT_7DH) \ -__PMC_EV_ALIAS("Bus_Req_Outstanding", IAP_EVENT_60H) \ -__PMC_EV_ALIAS("Bus_Snoop_Stall", IAP_EVENT_7EH_00H) \ -__PMC_EV_ALIAS("Bus_Snoops", IAP_EVENT_77H) \ -__PMC_EV_ALIAS("Bus_Trans_Any", IAP_EVENT_70H) \ -__PMC_EV_ALIAS("Bus_Trans_Brd", IAP_EVENT_65H) \ -__PMC_EV_ALIAS("Bus_Trans_Burst", IAP_EVENT_6EH) \ -__PMC_EV_ALIAS("Bus_Trans_Def", IAP_EVENT_6DH) \ -__PMC_EV_ALIAS("Bus_Trans_IO", IAP_EVENT_6CH) \ -__PMC_EV_ALIAS("Bus_Trans_Ifetch", IAP_EVENT_68H) \ -__PMC_EV_ALIAS("Bus_Trans_Inval", IAP_EVENT_69H) \ -__PMC_EV_ALIAS("Bus_Trans_Mem", IAP_EVENT_6FH) \ -__PMC_EV_ALIAS("Bus_Trans_P", IAP_EVENT_6BH) \ -__PMC_EV_ALIAS("Bus_Trans_Pwr", IAP_EVENT_6AH) \ -__PMC_EV_ALIAS("Bus_Trans_RFO", IAP_EVENT_66H) \ -__PMC_EV_ALIAS("Bus_Trans_WB", IAP_EVENT_67H) \ -__PMC_EV_ALIAS("Cycles_Div_Busy", IAP_EVENT_14H_00H) \ -__PMC_EV_ALIAS("Cycles_Int_Masked", IAP_EVENT_C6H_00H) \ -__PMC_EV_ALIAS("Cycles_Int_Pending_Masked", IAP_EVENT_C7H_00H) \ -__PMC_EV_ALIAS("DCU_Snoop_To_Share", IAP_EVENT_78H) \ -__PMC_EV_ALIAS("DCache_Cache_LD", IAP_EVENT_40H) \ -__PMC_EV_ALIAS("DCache_Cache_Lock", IAP_EVENT_42H) \ -__PMC_EV_ALIAS("DCache_Cache_ST", IAP_EVENT_41H) \ -__PMC_EV_ALIAS("DCache_M_Evict", IAP_EVENT_47H_00H) \ -__PMC_EV_ALIAS("DCache_M_Repl", IAP_EVENT_46H_00H) \ -__PMC_EV_ALIAS("DCache_Pend_Miss", IAP_EVENT_48H_00H) \ -__PMC_EV_ALIAS("DCache_Repl", IAP_EVENT_45H_0FH) \ -__PMC_EV_ALIAS("Data_Mem_Cache_Ref", IAP_EVENT_44H_02H) \ -__PMC_EV_ALIAS("Data_Mem_Ref", IAP_EVENT_43H_01H) \ -__PMC_EV_ALIAS("Dbus_Busy", IAP_EVENT_22H) \ -__PMC_EV_ALIAS("Dbus_Busy_Rd", IAP_EVENT_23H) \ -__PMC_EV_ALIAS("Div", IAP_EVENT_13H_00H) \ -__PMC_EV_ALIAS("Dtlb_Miss", IAP_EVENT_49H_00H) \ -__PMC_EV_ALIAS("ESP_Uops", IAP_EVENT_D7H_00H) \ -__PMC_EV_ALIAS("EST_Trans", IAP_EVENT_3AH) \ -__PMC_EV_ALIAS("FP_Assist", IAP_EVENT_11H_00H) \ -__PMC_EV_ALIAS("FP_Comp_Instr_Ret", IAP_EVENT_C1H_00H) \ -__PMC_EV_ALIAS("FP_Comps_Op_Exe", IAP_EVENT_10H_00H) \ -__PMC_EV_ALIAS("FP_MMX_Trans", IAP_EVENT_CCH_01H) \ -__PMC_EV_ALIAS("Fused_Ld_Uops_Ret", IAP_EVENT_DAH_01H) \ -__PMC_EV_ALIAS("Fused_St_Uops_Ret", IAP_EVENT_DAH_02H) \ -__PMC_EV_ALIAS("Fused_Uops_Ret", IAP_EVENT_DAH_00H) \ -__PMC_EV_ALIAS("HW_Int_Rx", IAP_EVENT_C8H_00H) \ -__PMC_EV_ALIAS("ICache_Misses", IAP_EVENT_81H_00H) \ -__PMC_EV_ALIAS("ICache_Reads", IAP_EVENT_80H_00H) \ -__PMC_EV_ALIAS("IFU_Mem_Stall", IAP_EVENT_86H_00H) \ -__PMC_EV_ALIAS("ILD_Stall", IAP_EVENT_87H_00H) \ -__PMC_EV_ALIAS("ITLB_Misses", IAP_EVENT_85H_00H) \ -__PMC_EV_ALIAS("Instr_Decoded", IAP_EVENT_D0H_00H) \ -__PMC_EV_ALIAS("Instr_Ret", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("L1_Pref_Req", IAP_EVENT_4FH_00H) \ -__PMC_EV_ALIAS("L2_ADS", IAP_EVENT_21H) \ -__PMC_EV_ALIAS("L2_IFetch", IAP_EVENT_28H) \ -__PMC_EV_ALIAS("L2_LD", IAP_EVENT_29H) \ -__PMC_EV_ALIAS("L2_Lines_In", IAP_EVENT_24H) \ -__PMC_EV_ALIAS("L2_Lines_Out", IAP_EVENT_26H) \ -__PMC_EV_ALIAS("L2_M_Lines_In", IAP_EVENT_25H) \ -__PMC_EV_ALIAS("L2_M_Lines_Out", IAP_EVENT_27H) \ -__PMC_EV_ALIAS("L2_No_Request_Cycles", IAP_EVENT_32H) \ -__PMC_EV_ALIAS("L2_Reject_Cycles", IAP_EVENT_30H) \ -__PMC_EV_ALIAS("L2_Rqsts", IAP_EVENT_2EH) \ -__PMC_EV_ALIAS("L2_ST", IAP_EVENT_2AH) \ -__PMC_EV_ALIAS("LD_Blocks", IAP_EVENT_03H_00H) \ -__PMC_EV_ALIAS("LLC_Misses", IAP_EVENT_2EH_41H) \ -__PMC_EV_ALIAS("LLC_Reference", IAP_EVENT_2EH_4FH) \ -__PMC_EV_ALIAS("MMX_Assist", IAP_EVENT_CDH_00H) \ -__PMC_EV_ALIAS("MMX_FP_Trans", IAP_EVENT_CCH_00H) \ -__PMC_EV_ALIAS("MMX_Instr_Exec", IAP_EVENT_B0H_00H) \ -__PMC_EV_ALIAS("MMX_Instr_Ret", IAP_EVENT_CEH_00H) \ -__PMC_EV_ALIAS("Misalign_Mem_Ref", IAP_EVENT_05H_00H) \ -__PMC_EV_ALIAS("Mul", IAP_EVENT_12H_00H) \ -__PMC_EV_ALIAS("NonHlt_Ref_Cycles", IAP_EVENT_3CH_01H) \ -__PMC_EV_ALIAS("Pref_Rqsts_Dn", IAP_EVENT_F8H_00H) \ -__PMC_EV_ALIAS("Pref_Rqsts_Up", IAP_EVENT_F0H_00H) \ -__PMC_EV_ALIAS("Resource_Stall", IAP_EVENT_A2H_00H) \ -__PMC_EV_ALIAS("SD_Drains", IAP_EVENT_04H_00H) \ -__PMC_EV_ALIAS("SIMD_FP_DP_P_Comp_Ret", IAP_EVENT_D9H_02H) \ -__PMC_EV_ALIAS("SIMD_FP_DP_P_Ret", IAP_EVENT_D8H_02H) \ -__PMC_EV_ALIAS("SIMD_FP_DP_S_Comp_Ret", IAP_EVENT_D9H_03H) \ -__PMC_EV_ALIAS("SIMD_FP_DP_S_Ret", IAP_EVENT_D8H_03H) \ -__PMC_EV_ALIAS("SIMD_FP_SP_P_Comp_Ret", IAP_EVENT_D9H_00H) \ -__PMC_EV_ALIAS("SIMD_FP_SP_Ret", IAP_EVENT_D8H_00H) \ -__PMC_EV_ALIAS("SIMD_FP_SP_S_Comp_Ret", IAP_EVENT_D9H_01H) \ -__PMC_EV_ALIAS("SIMD_FP_SP_S_Ret", IAP_EVENT_D8H_01H) \ -__PMC_EV_ALIAS("SIMD_Int_128_Ret", IAP_EVENT_D8H_04H) \ -__PMC_EV_ALIAS("SIMD_Int_Pari_Exec", IAP_EVENT_B3H_20H) \ -__PMC_EV_ALIAS("SIMD_Int_Pck_Exec", IAP_EVENT_B3H_04H) \ -__PMC_EV_ALIAS("SIMD_Int_Plog_Exec", IAP_EVENT_B3H_10H) \ -__PMC_EV_ALIAS("SIMD_Int_Pmul_Exec", IAP_EVENT_B3H_01H) \ -__PMC_EV_ALIAS("SIMD_Int_Psft_Exec", IAP_EVENT_B3H_02H) \ -__PMC_EV_ALIAS("SIMD_Int_Sat_Exec", IAP_EVENT_B1H_00H) \ -__PMC_EV_ALIAS("SIMD_Int_Upck_Exec", IAP_EVENT_B3H_08H) \ -__PMC_EV_ALIAS("SMC_Detected", IAP_EVENT_C3H_00H) \ -__PMC_EV_ALIAS("SSE_NTStores_Miss", IAP_EVENT_4BH_03H) \ -__PMC_EV_ALIAS("SSE_NTStores_Ret", IAP_EVENT_07H_03H) \ -__PMC_EV_ALIAS("SSE_PrefNta_Miss", IAP_EVENT_4BH_00H) \ -__PMC_EV_ALIAS("SSE_PrefNta_Ret", IAP_EVENT_07H_00H) \ -__PMC_EV_ALIAS("SSE_PrefT1_Miss", IAP_EVENT_4BH_01H) \ -__PMC_EV_ALIAS("SSE_PrefT1_Ret", IAP_EVENT_07H_01H) \ -__PMC_EV_ALIAS("SSE_PrefT2_Miss", IAP_EVENT_4BH_02H) \ -__PMC_EV_ALIAS("SSE_PrefT2_Ret", IAP_EVENT_07H_02H) \ -__PMC_EV_ALIAS("Seg_Reg_Loads", IAP_EVENT_06H_00H) \ -__PMC_EV_ALIAS("Serial_Execution_Cycles", IAP_EVENT_3CH_02H) \ -__PMC_EV_ALIAS("Thermal_Trip", IAP_EVENT_3BH_C0H) \ -__PMC_EV_ALIAS("Unfusion", IAP_EVENT_DBH_00H) \ -__PMC_EV_ALIAS("Unhalted_Core_Cycles", IAP_EVENT_3CH_00H) \ +#define __PMC_EV_ALIAS_CORE() \ +__PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ +__PMC_EV_ALIAS("BAClears", IAP_EVENT_E6H_00H) \ +__PMC_EV_ALIAS("BTB_Misses", IAP_EVENT_E2H_00H) \ +__PMC_EV_ALIAS("Br_BAC_Missp_Exec", IAP_EVENT_8AH_00H) \ +__PMC_EV_ALIAS("Br_Bogus", IAP_EVENT_E4H_00H) \ +__PMC_EV_ALIAS("Br_Call_Exec", IAP_EVENT_92H_00H) \ +__PMC_EV_ALIAS("Br_Call_Missp_Exec", IAP_EVENT_93H_00H) \ +__PMC_EV_ALIAS("Br_Cnd_Exec", IAP_EVENT_8BH_00H) \ +__PMC_EV_ALIAS("Br_Cnd_Missp_Exec", IAP_EVENT_8CH_00H) \ +__PMC_EV_ALIAS("Br_Ind_Call_Exec", IAP_EVENT_94H_00H) \ +__PMC_EV_ALIAS("Br_Ind_Exec", IAP_EVENT_8DH_00H) \ +__PMC_EV_ALIAS("Br_Ind_Missp_Exec", IAP_EVENT_8EH_00H) \ +__PMC_EV_ALIAS("Br_Inst_Exec", IAP_EVENT_88H_00H) \ +__PMC_EV_ALIAS("Br_Instr_Decoded", IAP_EVENT_E0H_00H) \ +__PMC_EV_ALIAS("Br_Instr_Ret", IAP_EVENT_C4H_00H) \ +__PMC_EV_ALIAS("Br_MisPred_Ret", IAP_EVENT_C5H_00H) \ +__PMC_EV_ALIAS("Br_MisPred_Taken_Ret", IAP_EVENT_CAH_00H) \ +__PMC_EV_ALIAS("Br_Missp_Exec", IAP_EVENT_89H_00H) \ +__PMC_EV_ALIAS("Br_Ret_BAC_Missp_Exec", IAP_EVENT_91H_00H) \ +__PMC_EV_ALIAS("Br_Ret_Exec", IAP_EVENT_8FH_00H) \ +__PMC_EV_ALIAS("Br_Ret_Missp_Exec", IAP_EVENT_90H_00H) \ +__PMC_EV_ALIAS("Br_Taken_Ret", IAP_EVENT_C9H_00H) \ +__PMC_EV_ALIAS("Bus_BNR_Clocks", IAP_EVENT_61H_00H) \ +__PMC_EV_ALIAS("Bus_DRDY_Clocks", IAP_EVENT_62H_00H) \ +__PMC_EV_ALIAS("Bus_Data_Rcv", IAP_EVENT_64H_40H) \ +__PMC_EV_ALIAS("Bus_Locks_Clocks", IAP_EVENT_63H) \ +__PMC_EV_ALIAS("Bus_Not_In_Use", IAP_EVENT_7DH) \ +__PMC_EV_ALIAS("Bus_Req_Outstanding", IAP_EVENT_60H) \ +__PMC_EV_ALIAS("Bus_Snoop_Stall", IAP_EVENT_7EH_00H) \ +__PMC_EV_ALIAS("Bus_Snoops", IAP_EVENT_77H) \ +__PMC_EV_ALIAS("Bus_Trans_Any", IAP_EVENT_70H) \ +__PMC_EV_ALIAS("Bus_Trans_Brd", IAP_EVENT_65H) \ +__PMC_EV_ALIAS("Bus_Trans_Burst", IAP_EVENT_6EH) \ +__PMC_EV_ALIAS("Bus_Trans_Def", IAP_EVENT_6DH) \ +__PMC_EV_ALIAS("Bus_Trans_IO", IAP_EVENT_6CH) \ +__PMC_EV_ALIAS("Bus_Trans_Ifetch", IAP_EVENT_68H) \ +__PMC_EV_ALIAS("Bus_Trans_Inval", IAP_EVENT_69H) \ +__PMC_EV_ALIAS("Bus_Trans_Mem", IAP_EVENT_6FH) \ +__PMC_EV_ALIAS("Bus_Trans_P", IAP_EVENT_6BH) \ +__PMC_EV_ALIAS("Bus_Trans_Pwr", IAP_EVENT_6AH) \ +__PMC_EV_ALIAS("Bus_Trans_RFO", IAP_EVENT_66H) \ +__PMC_EV_ALIAS("Bus_Trans_WB", IAP_EVENT_67H) \ +__PMC_EV_ALIAS("Cycles_Div_Busy", IAP_EVENT_14H_00H) \ +__PMC_EV_ALIAS("Cycles_Int_Masked", IAP_EVENT_C6H_00H) \ +__PMC_EV_ALIAS("Cycles_Int_Pending_Masked", IAP_EVENT_C7H_00H) \ +__PMC_EV_ALIAS("DCU_Snoop_To_Share", IAP_EVENT_78H) \ +__PMC_EV_ALIAS("DCache_Cache_LD", IAP_EVENT_40H) \ +__PMC_EV_ALIAS("DCache_Cache_Lock", IAP_EVENT_42H) \ +__PMC_EV_ALIAS("DCache_Cache_ST", IAP_EVENT_41H) \ +__PMC_EV_ALIAS("DCache_M_Evict", IAP_EVENT_47H_00H) \ +__PMC_EV_ALIAS("DCache_M_Repl", IAP_EVENT_46H_00H) \ +__PMC_EV_ALIAS("DCache_Pend_Miss", IAP_EVENT_48H_00H) \ +__PMC_EV_ALIAS("DCache_Repl", IAP_EVENT_45H_0FH) \ +__PMC_EV_ALIAS("Data_Mem_Cache_Ref", IAP_EVENT_44H_02H) \ +__PMC_EV_ALIAS("Data_Mem_Ref", IAP_EVENT_43H_01H) \ +__PMC_EV_ALIAS("Dbus_Busy", IAP_EVENT_22H) \ +__PMC_EV_ALIAS("Dbus_Busy_Rd", IAP_EVENT_23H) \ +__PMC_EV_ALIAS("Div", IAP_EVENT_13H_00H) \ +__PMC_EV_ALIAS("Dtlb_Miss", IAP_EVENT_49H_00H) \ +__PMC_EV_ALIAS("ESP_Uops", IAP_EVENT_D7H_00H) \ +__PMC_EV_ALIAS("EST_Trans", IAP_EVENT_3AH) \ +__PMC_EV_ALIAS("FP_Assist", IAP_EVENT_11H_00H) \ +__PMC_EV_ALIAS("FP_Comp_Instr_Ret", IAP_EVENT_C1H_00H) \ +__PMC_EV_ALIAS("FP_Comps_Op_Exe", IAP_EVENT_10H_00H) \ +__PMC_EV_ALIAS("FP_MMX_Trans", IAP_EVENT_CCH_01H) \ +__PMC_EV_ALIAS("Fused_Ld_Uops_Ret", IAP_EVENT_DAH_01H) \ +__PMC_EV_ALIAS("Fused_St_Uops_Ret", IAP_EVENT_DAH_02H) \ +__PMC_EV_ALIAS("Fused_Uops_Ret", IAP_EVENT_DAH_00H) \ +__PMC_EV_ALIAS("HW_Int_Rx", IAP_EVENT_C8H_00H) \ +__PMC_EV_ALIAS("ICache_Misses", IAP_EVENT_81H_00H) \ +__PMC_EV_ALIAS("ICache_Reads", IAP_EVENT_80H_00H) \ +__PMC_EV_ALIAS("IFU_Mem_Stall", IAP_EVENT_86H_00H) \ +__PMC_EV_ALIAS("ILD_Stall", IAP_EVENT_87H_00H) \ +__PMC_EV_ALIAS("ITLB_Misses", IAP_EVENT_85H_00H) \ +__PMC_EV_ALIAS("Instr_Decoded", IAP_EVENT_D0H_00H) \ +__PMC_EV_ALIAS("Instr_Ret", IAP_EVENT_C0H_00H) \ +__PMC_EV_ALIAS("L1_Pref_Req", IAP_EVENT_4FH_00H) \ +__PMC_EV_ALIAS("L2_ADS", IAP_EVENT_21H) \ +__PMC_EV_ALIAS("L2_IFetch", IAP_EVENT_28H) \ +__PMC_EV_ALIAS("L2_LD", IAP_EVENT_29H) \ +__PMC_EV_ALIAS("L2_Lines_In", IAP_EVENT_24H) \ +__PMC_EV_ALIAS("L2_Lines_Out", IAP_EVENT_26H) \ +__PMC_EV_ALIAS("L2_M_Lines_In", IAP_EVENT_25H) \ +__PMC_EV_ALIAS("L2_M_Lines_Out", IAP_EVENT_27H) \ +__PMC_EV_ALIAS("L2_No_Request_Cycles", IAP_EVENT_32H) \ +__PMC_EV_ALIAS("L2_Reject_Cycles", IAP_EVENT_30H) \ +__PMC_EV_ALIAS("L2_Rqsts", IAP_EVENT_2EH) \ +__PMC_EV_ALIAS("L2_ST", IAP_EVENT_2AH) \ +__PMC_EV_ALIAS("LD_Blocks", IAP_EVENT_03H_00H) \ +__PMC_EV_ALIAS("LLC_Misses", IAP_EVENT_2EH_41H) \ +__PMC_EV_ALIAS("LLC_Reference", IAP_EVENT_2EH_4FH) \ +__PMC_EV_ALIAS("MMX_Assist", IAP_EVENT_CDH_00H) \ +__PMC_EV_ALIAS("MMX_FP_Trans", IAP_EVENT_CCH_00H) \ +__PMC_EV_ALIAS("MMX_Instr_Exec", IAP_EVENT_B0H_00H) \ +__PMC_EV_ALIAS("MMX_Instr_Ret", IAP_EVENT_CEH_00H) \ +__PMC_EV_ALIAS("Misalign_Mem_Ref", IAP_EVENT_05H_00H) \ +__PMC_EV_ALIAS("Mul", IAP_EVENT_12H_00H) \ +__PMC_EV_ALIAS("NonHlt_Ref_Cycles", IAP_EVENT_3CH_01H) \ +__PMC_EV_ALIAS("Pref_Rqsts_Dn", IAP_EVENT_F8H_00H) \ +__PMC_EV_ALIAS("Pref_Rqsts_Up", IAP_EVENT_F0H_00H) \ +__PMC_EV_ALIAS("Resource_Stall", IAP_EVENT_A2H_00H) \ +__PMC_EV_ALIAS("SD_Drains", IAP_EVENT_04H_00H) \ +__PMC_EV_ALIAS("SIMD_FP_DP_P_Comp_Ret", IAP_EVENT_D9H_02H) \ +__PMC_EV_ALIAS("SIMD_FP_DP_P_Ret", IAP_EVENT_D8H_02H) \ +__PMC_EV_ALIAS("SIMD_FP_DP_S_Comp_Ret", IAP_EVENT_D9H_03H) \ +__PMC_EV_ALIAS("SIMD_FP_DP_S_Ret", IAP_EVENT_D8H_03H) \ +__PMC_EV_ALIAS("SIMD_FP_SP_P_Comp_Ret", IAP_EVENT_D9H_00H) \ +__PMC_EV_ALIAS("SIMD_FP_SP_Ret", IAP_EVENT_D8H_00H) \ +__PMC_EV_ALIAS("SIMD_FP_SP_S_Comp_Ret", IAP_EVENT_D9H_01H) \ +__PMC_EV_ALIAS("SIMD_FP_SP_S_Ret", IAP_EVENT_D8H_01H) \ +__PMC_EV_ALIAS("SIMD_Int_128_Ret", IAP_EVENT_D8H_04H) \ +__PMC_EV_ALIAS("SIMD_Int_Pari_Exec", IAP_EVENT_B3H_20H) \ +__PMC_EV_ALIAS("SIMD_Int_Pck_Exec", IAP_EVENT_B3H_04H) \ +__PMC_EV_ALIAS("SIMD_Int_Plog_Exec", IAP_EVENT_B3H_10H) \ +__PMC_EV_ALIAS("SIMD_Int_Pmul_Exec", IAP_EVENT_B3H_01H) \ +__PMC_EV_ALIAS("SIMD_Int_Psft_Exec", IAP_EVENT_B3H_02H) \ +__PMC_EV_ALIAS("SIMD_Int_Sat_Exec", IAP_EVENT_B1H_00H) \ +__PMC_EV_ALIAS("SIMD_Int_Upck_Exec", IAP_EVENT_B3H_08H) \ +__PMC_EV_ALIAS("SMC_Detected", IAP_EVENT_C3H_00H) \ +__PMC_EV_ALIAS("SSE_NTStores_Miss", IAP_EVENT_4BH_03H) \ +__PMC_EV_ALIAS("SSE_NTStores_Ret", IAP_EVENT_07H_03H) \ +__PMC_EV_ALIAS("SSE_PrefNta_Miss", IAP_EVENT_4BH_00H) \ +__PMC_EV_ALIAS("SSE_PrefNta_Ret", IAP_EVENT_07H_00H) \ +__PMC_EV_ALIAS("SSE_PrefT1_Miss", IAP_EVENT_4BH_01H) \ +__PMC_EV_ALIAS("SSE_PrefT1_Ret", IAP_EVENT_07H_01H) \ +__PMC_EV_ALIAS("SSE_PrefT2_Miss", IAP_EVENT_4BH_02H) \ +__PMC_EV_ALIAS("SSE_PrefT2_Ret", IAP_EVENT_07H_02H) \ +__PMC_EV_ALIAS("Seg_Reg_Loads", IAP_EVENT_06H_00H) \ +__PMC_EV_ALIAS("Serial_Execution_Cycles", IAP_EVENT_3CH_02H) \ +__PMC_EV_ALIAS("Thermal_Trip", IAP_EVENT_3BH_C0H) \ +__PMC_EV_ALIAS("Unfusion", IAP_EVENT_DBH_00H) \ +__PMC_EV_ALIAS("Unhalted_Core_Cycles", IAP_EVENT_3CH_00H) \ __PMC_EV_ALIAS("Uops_Ret", IAP_EVENT_C2H_00H) /* @@ -1880,7 +1880,7 @@ __PMC_EV_ALIAS("SEGMENT_REG_LOADS", IAP_ */ #define __PMC_EV_ALIAS_COREI7() \ __PMC_EV_ALIAS_INTEL_ARCHITECTURAL() \ -__PMC_EV_ALIAS("SB_DRAIN.ANY", IAP_EVENT_04H_07H) \ +__PMC_EV_ALIAS("SB_DRAIN.ANY", IAP_EVENT_04H_07H) \ __PMC_EV_ALIAS("STORE_BLOCKS.AT_RET", IAP_EVENT_06H_04H) \ __PMC_EV_ALIAS("STORE_BLOCKS.L1D_BLOCK", IAP_EVENT_06H_08H) \ __PMC_EV_ALIAS("PARTIAL_ADDRESS_ALIAS", IAP_EVENT_07H_01H) \ @@ -1889,11 +1889,11 @@ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_CO __PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT", IAP_EVENT_08H_10H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDE_MISS", IAP_EVENT_08H_20H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.LARGE_WALK_COMPLETED", \ - IAP_EVENT_08H_80H) \ + IAP_EVENT_08H_80H) \ __PMC_EV_ALIAS("MEM_INST_RETIRED.LOADS", IAP_EVENT_0BH_01H) \ __PMC_EV_ALIAS("MEM_INST_RETIRED.STORES", IAP_EVENT_0BH_02H) \ __PMC_EV_ALIAS("MEM_INST_RETIRED.LATENCY_ABOVE_THRESHOLD", \ - IAP_EVENT_0BH_10H) \ + IAP_EVENT_0BH_10H) \ __PMC_EV_ALIAS("MEM_STORE_RETIRED.DTLB_MISS", IAP_EVENT_0CH_01H) \ __PMC_EV_ALIAS("UOPS_ISSUED.ANY", IAP_EVENT_0EH_01H) \ __PMC_EV_ALIAS("UOPS_ISSUED.STALLED_CYCLES", IAP_EVENT_0EH_01H) \ @@ -2192,7 +2192,7 @@ __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE2_INT __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_FP_PACKED", IAP_EVENT_10H_10H) \ __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_FP_SCALAR", IAP_EVENT_10H_20H) \ __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_SINGLE_PRECISION", \ - IAP_EVENT_10H_40H) \ + IAP_EVENT_10H_40H) \ __PMC_EV_ALIAS("FP_COMP_OPS_EXE.SSE_DOUBLE_PRECISION", \ IAP_EVENT_10H_80H) \ __PMC_EV_ALIAS("SIMD_INT_128.PACKED_MPY", IAP_EVENT_12H_01H) \ @@ -2371,11 +2371,11 @@ __PMC_EV_ALIAS("UOPS_RETIRED.MACRO_FUSED __PMC_EV_ALIAS("MACHINE_CLEARS.CYCLES", IAP_EVENT_C3H_01H) \ __PMC_EV_ALIAS("MACHINE_CLEARS.MEM_ORDER", IAP_EVENT_C3H_02H) \ __PMC_EV_ALIAS("MACHINE_CLEARS.SMC", IAP_EVENT_C3H_04H) \ -__PMC_EV_ALIAS("BR_INST_RETIRED.ANY_P", IAP_EVENT_C4H_00H) \ +__PMC_EV_ALIAS("BR_INST_RETIRED.ANY_P", IAP_EVENT_C4H_00H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.CONDITIONAL", IAP_EVENT_C4H_01H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.NEAR_CALL", IAP_EVENT_C4H_02H) \ __PMC_EV_ALIAS("BR_INST_RETIRED.ALL_BRANCHES", IAP_EVENT_C4H_04H) \ -__PMC_EV_ALIAS("BR_MISP_RETIRED.ANY_P", IAP_EVENT_C5H_00H) \ +__PMC_EV_ALIAS("BR_MISP_RETIRED.ANY_P", IAP_EVENT_C5H_00H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.CONDITIONAL", IAP_EVENT_C5H_01H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.NEAR_CALL", IAP_EVENT_C5H_02H) \ __PMC_EV_ALIAS("BR_MISP_RETIRED.ALL_BRANCHES", IAP_EVENT_C5H_04H) \ @@ -2449,299 +2449,330 @@ __PMC_EV_ALIAS("SIMD_INT_64.SHUFFLE_MOVE /* * Aliases for Haswell core PMC events */ -#define __PMC_EV_ALIAS_HASWELL() \ -__PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ -__PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ -__PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05H_02H) \ +#define __PMC_EV_ALIAS_HASWELL() \ +__PMC_EV_ALIAS("LD_BLOCKS.STORE_FORWARD", IAP_EVENT_03H_02H) \ +__PMC_EV_ALIAS("MISALIGN_MEM_REF.LOADS", IAP_EVENT_05H_01H) \ +__PMC_EV_ALIAS("MISALIGN_MEM_REF.STORES", IAP_EVENT_05H_02H) \ __PMC_EV_ALIAS("LD_BLOCKS_PARTIAL.ADDRESS_ALIAS", IAP_EVENT_07H_01H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H) \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_08H_01H)\ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_4K", IAP_EVENT_08H_02H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K", IAP_EVENT_08H_02H) \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4K", \ + IAP_EVENT_08H_02H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_COMPLETED", IAP_EVENT_08H_0EH) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.WALK_DURATION", IAP_EVENT_08H_10H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT_4K", IAP_EVENT_08H_20H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT_2M", IAP_EVENT_08H_40H) \ -__PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT", IAP_EVENT_08H_60H) \ +__PMC_EV_ALIAS("DTLB_LOAD_MISSES.STLB_HIT", IAP_EVENT_08H_60H) \ __PMC_EV_ALIAS("DTLB_LOAD_MISSES.PDE_CACHE_MISS", IAP_EVENT_08H_80H) \ -__PMC_EV_ALIAS("INT_MISC.RECOVERY_CYCLES", IAP_EVENT_0DH_03H) \ -__PMC_EV_ALIAS("UOPS_ISSUED.ANY", IAP_EVENT_0EH_01H) \ -__PMC_EV_ALIAS("UOPS_ISSUED.FLAGS_MERGE", IAP_EVENT_0EH_10H) \ -__PMC_EV_ALIAS("UOPS_ISSUED.SLOW_LEA", IAP_EVENT_0EH_20H) \ -__PMC_EV_ALIAS("UOPS_ISSUED.SiNGLE_MUL", IAP_EVENT_0EH_40H) \ +__PMC_EV_ALIAS("INT_MISC.RECOVERY_CYCLES", IAP_EVENT_0DH_03H) \ +__PMC_EV_ALIAS("UOPS_ISSUED.ANY", IAP_EVENT_0EH_01H) \ +__PMC_EV_ALIAS("UOPS_ISSUED.FLAGS_MERGE", IAP_EVENT_0EH_10H) \ +__PMC_EV_ALIAS("UOPS_ISSUED.SLOW_LEA", IAP_EVENT_0EH_20H) \ +__PMC_EV_ALIAS("UOPS_ISSUED.SiNGLE_MUL", IAP_EVENT_0EH_40H) \ __PMC_EV_ALIAS("L2_RQSTS.DEMAND_DATA_RD_MISS", IAP_EVENT_24H_21H) \ __PMC_EV_ALIAS("L2_RQSTS.DEMAND_DATA_RD_HIT", IAP_EVENT_24H_41H) \ __PMC_EV_ALIAS("L2_RQSTS.ALL_DEMAND_DATA_RD", IAP_EVENT_24H_E1H) \ -__PMC_EV_ALIAS("L2_RQSTS.RFO_HIT", IAP_EVENT_24H_42H) \ -__PMC_EV_ALIAS("L2_RQSTS.RFO_MISS", IAP_EVENT_24H_22H) \ -__PMC_EV_ALIAS("L2_RQSTS.ALL_RFO", IAP_EVENT_24H_E2H) \ -__PMC_EV_ALIAS("L2_RQSTS.CODE_RD_HIT", IAP_EVENT_24H_44H) \ -__PMC_EV_ALIAS("L2_RQSTS.CODE_RD_MISS", IAP_EVENT_24H_24H) \ -__PMC_EV_ALIAS("L2_RQSTS.ALL_DEMAND_MISS", IAP_EVENT_24H_27H) \ +__PMC_EV_ALIAS("L2_RQSTS.RFO_HIT", IAP_EVENT_24H_42H) \ +__PMC_EV_ALIAS("L2_RQSTS.RFO_MISS", IAP_EVENT_24H_22H) \ +__PMC_EV_ALIAS("L2_RQSTS.ALL_RFO", IAP_EVENT_24H_E2H) \ +__PMC_EV_ALIAS("L2_RQSTS.CODE_RD_HIT", IAP_EVENT_24H_44H) \ +__PMC_EV_ALIAS("L2_RQSTS.CODE_RD_MISS", IAP_EVENT_24H_24H) \ +__PMC_EV_ALIAS("L2_RQSTS.ALL_DEMAND_MISS", IAP_EVENT_24H_27H) \ __PMC_EV_ALIAS("L2_RQSTS.ALL_DEMAND_REFERENCES", IAP_EVENT_24H_E7H) \ -__PMC_EV_ALIAS("L2_RQSTS.ALL_CODE_RD", IAP_EVENT_24H_E4H) \ -__PMC_EV_ALIAS("L2_RQSTS.L2_PF_HIT", IAP_EVENT_24H_50H) \ -__PMC_EV_ALIAS("L2_RQSTS.L2_PF_MISS", IAP_EVENT_24H_30H) \ -__PMC_EV_ALIAS("L2_RQSTS.ALL_PF", IAP_EVENT_24H_F8H) \ -__PMC_EV_ALIAS("L2_RQSTS.MISS", IAP_EVENT_24H_3FH) \ -__PMC_EV_ALIAS("L2_RQSTS.REFERENCES", IAP_EVENT_24H_FFH) \ -__PMC_EV_ALIAS("L2_DEMAND_RQSTS.WB_HIT", IAP_EVENT_27H_50H) \ +__PMC_EV_ALIAS("L2_RQSTS.ALL_CODE_RD", IAP_EVENT_24H_E4H) \ +__PMC_EV_ALIAS("L2_RQSTS.L2_PF_HIT", IAP_EVENT_24H_50H) \ +__PMC_EV_ALIAS("L2_RQSTS.L2_PF_MISS", IAP_EVENT_24H_30H) \ +__PMC_EV_ALIAS("L2_RQSTS.ALL_PF", IAP_EVENT_24H_F8H) \ +__PMC_EV_ALIAS("L2_RQSTS.MISS", IAP_EVENT_24H_3FH) \ +__PMC_EV_ALIAS("L2_RQSTS.REFERENCES", IAP_EVENT_24H_FFH) \ +__PMC_EV_ALIAS("L2_DEMAND_RQSTS.WB_HIT", IAP_EVENT_27H_50H) \ __PMC_EV_ALIAS("LONGEST_LAT_CACHE.REFERENCE", IAP_EVENT_2EH_4FH) \ -__PMC_EV_ALIAS("LONGEST_LAT_CACHE.MISS", IAP_EVENT_2EH_41H) \ -__PMC_EV_ALIAS("CPU_CLK_UNHALTED.THREAD_P", IAP_EVENT_3CH_00H) \ +__PMC_EV_ALIAS("LONGEST_LAT_CACHE.MISS", IAP_EVENT_2EH_41H) \ +__PMC_EV_ALIAS("CPU_CLK_UNHALTED.THREAD_P", IAP_EVENT_3CH_00H) \ __PMC_EV_ALIAS("CPU_CLK_THREAD_UNHALTED.REF_XCLK", IAP_EVENT_3CH_01H) \ -__PMC_EV_ALIAS("L1D_PEND_MISS.PENDING", IAP_EVENT_48H_01H) \ -__PMC_EV_ALIAS("DTLB_STORE_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_49H_01H) \ -__PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_COMPLETED_4K", IAP_EVENT_49H_02H) \ -__PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M", IAP_EVENT_49H_04H) \ +__PMC_EV_ALIAS("L1D_PEND_MISS.PENDING", IAP_EVENT_48H_01H) \ +__PMC_EV_ALIAS("DTLB_STORE_MISSES.MISS_CAUSES_A_WALK", \ + IAP_EVENT_49H_01H) \ +__PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_COMPLETED_4K", \ + IAP_EVENT_49H_02H) \ +__PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M", \ + IAP_EVENT_49H_04H) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_COMPLETED", IAP_EVENT_49H_0EH) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.WALK_DURATION", IAP_EVENT_49H_10H) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.STLB_HIT_4K", IAP_EVENT_49H_20H) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.STLB_HIT_2M", IAP_EVENT_49H_40H) \ -__PMC_EV_ALIAS("DTLB_STORE_MISSES.STLB_HIT", IAP_EVENT_49H_60H) \ +__PMC_EV_ALIAS("DTLB_STORE_MISSES.STLB_HIT", IAP_EVENT_49H_60H) \ __PMC_EV_ALIAS("DTLB_STORE_MISSES.PDE_CACHE_MISS", IAP_EVENT_49H_80H) \ -__PMC_EV_ALIAS("LOAD_HIT_PRE.SW_PF", IAP_EVENT_4CH_01H) \ -__PMC_EV_ALIAS("LOAD_HIT_PRE.HW_PF", IAP_EVENT_4CH_02H) \ -__PMC_EV_ALIAS("L1D.REPLACEMENT", IAP_EVENT_51H_01H) \ -__PMC_EV_ALIAS("MOVE_ELIMINATION.INT_NOT_ELIMINATED", IAP_EVENT_58H_04H) \ -__PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED", IAP_EVENT_58H_08H) \ +__PMC_EV_ALIAS("LOAD_HIT_PRE.SW_PF", IAP_EVENT_4CH_01H) \ +__PMC_EV_ALIAS("LOAD_HIT_PRE.HW_PF", IAP_EVENT_4CH_02H) \ +__PMC_EV_ALIAS("L1D.REPLACEMENT", IAP_EVENT_51H_01H) \ +__PMC_EV_ALIAS("MOVE_ELIMINATION.INT_NOT_ELIMINATED", \ + IAP_EVENT_58H_04H) \ +__PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_NOT_ELIMINATED", \ + IAP_EVENT_58H_08H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.INT_ELIMINATED", IAP_EVENT_58H_01H) \ __PMC_EV_ALIAS("MOVE_ELIMINATION.SMID_ELIMINATED", IAP_EVENT_58H_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H) \ -__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H) \ -__PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H) \ -__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD", IAP_EVENT_60H_01H) \ -__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CORE_RD", IAP_EVENT_60H_02H) \ -__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO", IAP_EVENT_60H_04H) \ -__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", IAP_EVENT_60H_08H) \ -__PMC_EV_ALIAS("LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION", IAP_EVENT_63H_01H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING0", IAP_EVENT_5CH_02H) \ +__PMC_EV_ALIAS("CPL_CYCLES.RING123", IAP_EVENT_5CH_01H) \ +__PMC_EV_ALIAS("RS_EVENTS.EMPTY_CYCLES", IAP_EVENT_5EH_01H) \ +__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_DATA_RD", \ + IAP_EVENT_60H_01H) \ +__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_CORE_RD", \ + IAP_EVENT_60H_02H) \ +__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.DEMAND_RFO", \ + IAP_EVENT_60H_04H) \ +__PMC_EV_ALIAS("OFFCORE_REQUESTS_OUTSTANDING.ALL_DATA_RD", \ + IAP_EVENT_60H_08H) \ +__PMC_EV_ALIAS("LOCK_CYCLES.SPLIT_LOCK_UC_LOCK_DURATION", \ + IAP_EVENT_63H_01H) \ __PMC_EV_ALIAS("LOCK_CYCLES.CACHE_LOCK_DURATION", IAP_EVENT_63H_02H) \ -__PMC_EV_ALIAS("IDQ.EMPTY", IAP_EVENT_79H_02H) \ -__PMC_EV_ALIAS("IDQ.MITE_UOPS", IAP_EVENT_79H_04H) \ -__PMC_EV_ALIAS("IDQ.DSB_UOPS", IAP_EVENT_79H_08H) \ -__PMC_EV_ALIAS("IDQ.MS_DSB_UOPS", IAP_EVENT_79H_10H) \ -__PMC_EV_ALIAS("IDQ.MS_MITE_UOPS", IAP_EVENT_79H_20H) \ -__PMC_EV_ALIAS("IDQ.MS_UOPS", IAP_EVENT_79H_30H) \ +__PMC_EV_ALIAS("IDQ.EMPTY", IAP_EVENT_79H_02H) \ +__PMC_EV_ALIAS("IDQ.MITE_UOPS", IAP_EVENT_79H_04H) \ +__PMC_EV_ALIAS("IDQ.DSB_UOPS", IAP_EVENT_79H_08H) \ +__PMC_EV_ALIAS("IDQ.MS_DSB_UOPS", IAP_EVENT_79H_10H) \ +__PMC_EV_ALIAS("IDQ.MS_MITE_UOPS", IAP_EVENT_79H_20H) \ +__PMC_EV_ALIAS("IDQ.MS_UOPS", IAP_EVENT_79H_30H) \ __PMC_EV_ALIAS("IDQ.ALL_DSB_CYCLES_ANY_UOPS", IAP_EVENT_79H_18H) \ -__PMC_EV_ALIAS("IDQ.ALL_DSB_CYCLES_4_UOPS", IAP_EVENT_79H_18H) \ +__PMC_EV_ALIAS("IDQ.ALL_DSB_CYCLES_4_UOPS", IAP_EVENT_79H_18H) \ __PMC_EV_ALIAS("IDQ.ALL_MITE_CYCLES_ANY_UOPS", IAP_EVENT_79H_24H) \ -__PMC_EV_ALIAS("IDQ.ALL_MITE_CYCLES_4_UOPS", IAP_EVENT_79H_24H) \ -__PMC_EV_ALIAS("IDQ.MITE_ALL_UOPS", IAP_EVENT_79H_3CH) \ -__PMC_EV_ALIAS("ICACHE.MISSES", IAP_EVENT_80H_02H) \ +__PMC_EV_ALIAS("IDQ.ALL_MITE_CYCLES_4_UOPS", IAP_EVENT_79H_24H) \ +__PMC_EV_ALIAS("IDQ.MITE_ALL_UOPS", IAP_EVENT_79H_3CH) \ +__PMC_EV_ALIAS("ICACHE.MISSES", IAP_EVENT_80H_02H) \ __PMC_EV_ALIAS("ITLB_MISSES.MISS_CAUSES_A_WALK", IAP_EVENT_85H_01H) \ __PMC_EV_ALIAS("ITLB_MISSES.WALK_COMPLETED_4K", IAP_EVENT_85H_02H) \ __PMC_EV_ALIAS("TLB_MISSES.WALK_COMPLETED_2M_4M", IAP_EVENT_85H_04H) \ -__PMC_EV_ALIAS("ITLB_MISSES.WALK_COMPLETED", IAP_EVENT_85H_0EH) \ -__PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_85H_10H) \ -__PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_4K", IAP_EVENT_85H_20H) \ -__PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_2M", IAP_EVENT_85H_40H) \ -__PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_60H) \ -__PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ -__PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", IAP_EVENT_88H_04H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ +__PMC_EV_ALIAS("ITLB_MISSES.WALK_COMPLETED", IAP_EVENT_85H_0EH) \ +__PMC_EV_ALIAS("ITLB_MISSES.WALK_DURATION", IAP_EVENT_85H_10H) \ +__PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_4K", IAP_EVENT_85H_20H) \ +__PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT_2M", IAP_EVENT_85H_40H) \ +__PMC_EV_ALIAS("ITLB_MISSES.STLB_HIT", IAP_EVENT_85H_60H) \ +__PMC_EV_ALIAS("ILD_STALL.LCP", IAP_EVENT_87H_01H) \ +__PMC_EV_ALIAS("ILD_STALL.IQ_FULL", IAP_EVENT_87H_04H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.COND", IAP_EVENT_88H_01H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_JMP", IAP_EVENT_88H_02H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_JMP_NON_CALL_RET", \ + IAP_EVENT_88H_04H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.RETURN_NEAR", IAP_EVENT_88H_08H) \ __PMC_EV_ALIAS("BR_INST_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_88H_10H) \ __PMC_EV_ALIAS("BR_INST_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_88H_20H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ -__PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", IAP_EVENT_89H_04H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.NONTAKEN", IAP_EVENT_88H_40H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.TAKEN", IAP_EVENT_88H_80H) \ +__PMC_EV_ALIAS("BR_INST_EXEC.ALL_BRANCHES", IAP_EVENT_88H_FFH) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.COND", IAP_EVENT_89H_01H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_JMP_NON_CALL_RET", \ + IAP_EVENT_89H_04H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.RETURN_NEAR", IAP_EVENT_89H_08H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.DIRECT_NEAR_CALL", IAP_EVENT_89H_10H) \ __PMC_EV_ALIAS("BR_MISP_EXEC.INDIRECT_NEAR_CALL", IAP_EVENT_89H_20H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ -__PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.NONTAKEN", IAP_EVENT_89H_40H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.TAKEN", IAP_EVENT_89H_80H) \ +__PMC_EV_ALIAS("BR_MISP_EXEC.ALL_BRANCHES", IAP_EVENT_89H_FFH) \ __PMC_EV_ALIAS("IDQ_UOPS_NOT_DELIVERED.CORE", IAP_EVENT_9CH_01H) \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 21:55:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B0AC6E5A; Wed, 3 Apr 2013 21:55:20 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A1B7D1D6; Wed, 3 Apr 2013 21:55:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33LtK82091485; Wed, 3 Apr 2013 21:55:20 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33LtKaf091483; Wed, 3 Apr 2013 21:55:20 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304032155.r33LtKaf091483@svn.freebsd.org> From: Sean Bruno Date: Wed, 3 Apr 2013 21:55:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249070 - in head: share/man/man4 sys/dev/e1000 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, 03 Apr 2013 21:55:20 -0000 Author: sbruno Date: Wed Apr 3 21:55:19 2013 New Revision: 249070 URL: http://svnweb.freebsd.org/changeset/base/249070 Log: Update man page for igb(4) with a little bit of information about hw.igb.num_queues for those so inclined. PR: kern/177384 Submitted by: hiren.panchasara@gmail.com Reviewed by: sbruno@ Approved by: jfv@ Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/share/man/man4/igb.4 head/sys/dev/e1000/if_igb.c Modified: head/share/man/man4/igb.4 ============================================================================== --- head/share/man/man4/igb.4 Wed Apr 3 21:34:35 2013 (r249069) +++ head/share/man/man4/igb.4 Wed Apr 3 21:55:19 2013 (r249070) @@ -31,7 +31,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 12, 2012 +.Dd March 25, 2013 .Dt IGB 4 .Os .Sh NAME @@ -160,6 +160,11 @@ The minimum is 80, and the maximum is 40 .It Va hw.igb.enable_aim If set to 1, enable Adaptive Interrupt Moderation. The default is to enable Adaptive Interrupt Moderation. +.It Va hw.igb.num_queues +Numer of queues used for data transfer. +If set to 0, number of queues will be configured +automatically based on number of CPUs and max +supported MSI-X messages on the device. .It Va kern.ipc.nmbclusters The maximum number of mbuf clusters allowed. If the system has more than one igb card or jumbo frames are Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Apr 3 21:34:35 2013 (r249069) +++ head/sys/dev/e1000/if_igb.c Wed Apr 3 21:55:19 2013 (r249070) @@ -375,7 +375,8 @@ SYSCTL_INT(_hw_igb, OID_AUTO, header_spl /* ** This will autoconfigure based on -** the number of CPUs if left at 0. +** the number of CPUs and max supported MSI-X messages +** if left at 0. */ static int igb_num_queues = 0; TUNABLE_INT("hw.igb.num_queues", &igb_num_queues); From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 22:24:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5EE177C5; Wed, 3 Apr 2013 22:24:37 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 38BBB372; Wed, 3 Apr 2013 22:24:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33MObSY000289; Wed, 3 Apr 2013 22:24:37 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33MOaax000285; Wed, 3 Apr 2013 22:24:36 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201304032224.r33MOaax000285@svn.freebsd.org> From: Brooks Davis Date: Wed, 3 Apr 2013 22:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249071 - in head/sys: conf 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, 03 Apr 2013 22:24:37 -0000 Author: brooks Date: Wed Apr 3 22:24:36 2013 New Revision: 249071 URL: http://svnweb.freebsd.org/changeset/base/249071 Log: MFP4 change 210763 Allow boothowto and bootverbose to be set via kernel options, which is useful on architectures that are unable to rely on a boot loader to pass configuration variables to the kernel. Submitted by: rwatson Modified: head/sys/conf/NOTES head/sys/conf/options head/sys/kern/init_main.c Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Wed Apr 3 21:55:19 2013 (r249070) +++ head/sys/conf/NOTES Wed Apr 3 22:24:36 2013 (r249071) @@ -139,6 +139,12 @@ options MAXPHYS=(128*1024) # options INCLUDE_CONFIG_FILE # Include this file in kernel +# +# Compile-time defaults for various boot parameters +# +options BOOTVERBOSE=1 +options BOOTHOWTO=RB_MULTIPLE + options GEOM_AES # Don't use, use GEOM_BDE options GEOM_BDE # Disk encryption. options GEOM_BSD # BSD disklabels Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Wed Apr 3 21:55:19 2013 (r249070) +++ head/sys/conf/options Wed Apr 3 22:24:36 2013 (r249071) @@ -68,6 +68,8 @@ TEXTDUMP_VERBOSE opt_ddb.h ADAPTIVE_LOCKMGRS ALQ AUDIT opt_global.h +BOOTHOWTO opt_global.h +BOOTVERBOSE opt_global.h CALLOUT_PROFILING CAPABILITIES opt_capsicum.h CAPABILITY_MODE opt_capsicum.h Modified: head/sys/kern/init_main.c ============================================================================== --- head/sys/kern/init_main.c Wed Apr 3 21:55:19 2013 (r249070) +++ head/sys/kern/init_main.c Wed Apr 3 22:24:36 2013 (r249071) @@ -101,10 +101,17 @@ struct thread thread0 __aligned(16); struct vmspace vmspace0; struct proc *initproc; -int boothowto = 0; /* initialized so that it can be patched */ +#ifndef BOOTHOWTO +#define BOOTHOWTO 0 +#endif +int boothowto = BOOTHOWTO; /* initialized so that it can be patched */ SYSCTL_INT(_debug, OID_AUTO, boothowto, CTLFLAG_RD, &boothowto, 0, "Boot control flags, passed from loader"); -int bootverbose; + +#ifndef BOOTVERBOSE +#define BOOTVERBOSE 0 +#endif +int bootverbose = BOOTVERBOSE; SYSCTL_INT(_debug, OID_AUTO, bootverbose, CTLFLAG_RW, &bootverbose, 0, "Control the output of verbose kernel messages"); From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 22:37:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0F4B7A03; Wed, 3 Apr 2013 22:37:42 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DCE153FC; Wed, 3 Apr 2013 22:37:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33MbfDj003624; Wed, 3 Apr 2013 22:37:41 GMT (envelope-from brooks@svn.freebsd.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33MbfNw003622; Wed, 3 Apr 2013 22:37:41 GMT (envelope-from brooks@svn.freebsd.org) Message-Id: <201304032237.r33MbfNw003622@svn.freebsd.org> From: Brooks Davis Date: Wed, 3 Apr 2013 22:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249072 - in head/sys: conf dev/cfi 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, 03 Apr 2013 22:37:42 -0000 Author: brooks Date: Wed Apr 3 22:37:40 2013 New Revision: 249072 URL: http://svnweb.freebsd.org/changeset/base/249072 Log: MFP4 change 217313 and part of 222068: Add a simple nexus attachment for cfi(4). Added: head/sys/dev/cfi/cfi_bus_nexus.c - copied, changed from r249062, head/sys/dev/cfi/cfi_bus_ixp4xx.c Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Wed Apr 3 22:24:36 2013 (r249071) +++ head/sys/conf/files Wed Apr 3 22:37:40 2013 (r249072) @@ -1051,6 +1051,7 @@ dev/cardbus/cardbus.c optional cardbus dev/cardbus/cardbus_cis.c optional cardbus dev/cardbus/cardbus_device.c optional cardbus dev/cas/if_cas.c optional cas +dev/cfi/cfi_bus_nexus.c optional cfi dev/cfi/cfi_core.c optional cfi dev/cfi/cfi_dev.c optional cfi dev/cfi/cfi_disk.c optional cfid Copied and modified: head/sys/dev/cfi/cfi_bus_nexus.c (from r249062, head/sys/dev/cfi/cfi_bus_ixp4xx.c) ============================================================================== --- head/sys/dev/cfi/cfi_bus_ixp4xx.c Wed Apr 3 18:30:09 2013 (r249062, copy source) +++ head/sys/dev/cfi/cfi_bus_nexus.c Wed Apr 3 22:37:40 2013 (r249072) @@ -1,4 +1,5 @@ /*- + * Copyright (c) 2012 SRI International * Copyright (c) 2009 Roelof Jonkman, Carlson Wireless Inc. * Copyright (c) 2009 Sam Leffler, Errno Consulting * All rights reserved. @@ -41,40 +42,25 @@ __FBSDID("$FreeBSD$"); #include -#include -#include - static int -cfi_ixp4xx_probe(device_t dev) +cfi_nexus_probe(device_t dev) { - struct cfi_softc *sc = device_get_softc(dev); - /* - * NB: we assume the boot loader sets up EXP_TIMING_CS0_OFFSET - * according to the flash on the board. If it does not then it - * can be done here. - */ - if (bootverbose) { - struct ixp425_softc *sa = - device_get_softc(device_get_parent(dev)); - device_printf(dev, "EXP_TIMING_CS0_OFFSET 0x%x\n", - EXP_BUS_READ_4(sa, EXP_TIMING_CS0_OFFSET)); - } - sc->sc_width = 2; /* NB: don't probe interface width */ + return cfi_probe(dev); } -static device_method_t cfi_ixp4xx_methods[] = { +static device_method_t cfi_nexus_methods[] = { /* device interface */ - DEVMETHOD(device_probe, cfi_ixp4xx_probe), + DEVMETHOD(device_probe, cfi_nexus_probe), DEVMETHOD(device_attach, cfi_attach), DEVMETHOD(device_detach, cfi_detach), - DEVMETHOD_END + {0, 0} }; -static driver_t cfi_ixp4xx_driver = { +static driver_t cfi_nexus_driver = { cfi_driver_name, - cfi_ixp4xx_methods, + cfi_nexus_methods, sizeof(struct cfi_softc), }; -DRIVER_MODULE(cfi, ixp, cfi_ixp4xx_driver, cfi_devclass, 0, 0); +DRIVER_MODULE(cfi, nexus, cfi_nexus_driver, cfi_devclass, 0, 0); From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 23:11:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 03290E18; Wed, 3 Apr 2013 23:11:16 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E8DC1717; Wed, 3 Apr 2013 23:11:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33NBFvq014495; Wed, 3 Apr 2013 23:11:15 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33NBFLu014493; Wed, 3 Apr 2013 23:11:15 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304032311.r33NBFLu014493@svn.freebsd.org> From: Sean Bruno Date: Wed, 3 Apr 2013 23:11:15 +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: r249073 - stable/7/sys/contrib/dev/acpica 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, 03 Apr 2013 23:11:16 -0000 Author: sbruno Date: Wed Apr 3 23:11:15 2013 New Revision: 249073 URL: http://svnweb.freebsd.org/changeset/base/249073 Log: Resolve kernel panic that occurs on callback from sysctl when setting hw.ciss.expose_hidden_physical=1 on a HP ProLiant DL360 G6 (and possibly others) due to mishandling of error value in acpica on stable/7 Note that this is a direct commit as this code has been fixed in stable/8 (8.4 included) and higher release for quite some time. PR: kern/152250 Submitted by: Loic Pefferkorn Reviewed by: avg@ Modified: stable/7/sys/contrib/dev/acpica/nsxfname.c Modified: stable/7/sys/contrib/dev/acpica/nsxfname.c ============================================================================== --- stable/7/sys/contrib/dev/acpica/nsxfname.c Wed Apr 3 22:37:40 2013 (r249072) +++ stable/7/sys/contrib/dev/acpica/nsxfname.c Wed Apr 3 23:11:15 2013 (r249073) @@ -361,6 +361,7 @@ AcpiGetObjectInfo ( if (!Node) { (void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE); + Status = AE_BAD_PARAMETER; goto Cleanup; } From owner-svn-src-all@FreeBSD.ORG Wed Apr 3 23:39:55 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A27AA3A6; Wed, 3 Apr 2013 23:39:55 +0000 (UTC) (envelope-from jfv@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 85B9D876; Wed, 3 Apr 2013 23:39:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r33NdtVY021391; Wed, 3 Apr 2013 23:39:55 GMT (envelope-from jfv@svn.freebsd.org) Received: (from jfv@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r33Ndssw021388; Wed, 3 Apr 2013 23:39:54 GMT (envelope-from jfv@svn.freebsd.org) Message-Id: <201304032339.r33Ndssw021388@svn.freebsd.org> From: Jack F Vogel Date: Wed, 3 Apr 2013 23:39:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249074 - head/sys/dev/e1000 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, 03 Apr 2013 23:39:55 -0000 Author: jfv Date: Wed Apr 3 23:39:54 2013 New Revision: 249074 URL: http://svnweb.freebsd.org/changeset/base/249074 Log: Correct the multicast handling in the E1000 drivers as was done in ixgbe, thanks to Mike Karels for this fix. When exiting promiscuous mode MPE bit was being unconditionally cleared, this should not be done if we are in MAX multicast groups. Modified: head/sys/dev/e1000/if_em.c head/sys/dev/e1000/if_igb.c head/sys/dev/e1000/if_lem.c Modified: head/sys/dev/e1000/if_em.c ============================================================================== --- head/sys/dev/e1000/if_em.c Wed Apr 3 23:11:15 2013 (r249073) +++ head/sys/dev/e1000/if_em.c Wed Apr 3 23:39:54 2013 (r249074) @@ -94,7 +94,7 @@ int em_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char em_driver_version[] = "7.3.7"; +char em_driver_version[] = "7.3.8"; /********************************************************************* * PCI Device ID Table @@ -2133,12 +2133,37 @@ em_set_promisc(struct adapter *adapter) static void em_disable_promisc(struct adapter *adapter) { - u32 reg_rctl; + struct ifnet *ifp = adapter->ifp; + u32 reg_rctl; + int mcnt = 0; reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); - reg_rctl &= (~E1000_RCTL_UPE); - reg_rctl &= (~E1000_RCTL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 800000 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 800000 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + /* Don't disable if in MAX groups */ + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg_rctl &= (~E1000_RCTL_MPE); reg_rctl &= (~E1000_RCTL_SBP); E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); } Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Wed Apr 3 23:11:15 2013 (r249073) +++ head/sys/dev/e1000/if_igb.c Wed Apr 3 23:39:54 2013 (r249074) @@ -100,7 +100,7 @@ int igb_display_debug_stats = 0; /********************************************************************* * Driver version: *********************************************************************/ -char igb_driver_version[] = "version - 2.3.9"; +char igb_driver_version[] = "version - 2.3.10"; /********************************************************************* @@ -374,9 +374,9 @@ SYSCTL_INT(_hw_igb, OID_AUTO, header_spl "Enable receive mbuf header split"); /* -** This will autoconfigure based on -** the number of CPUs and max supported MSI-X messages -** if left at 0. +** This will autoconfigure based on the +** number of CPUs and max supported +** MSIX messages if left at 0. */ static int igb_num_queues = 0; TUNABLE_INT("hw.igb.num_queues", &igb_num_queues); @@ -2096,7 +2096,9 @@ static void igb_disable_promisc(struct adapter *adapter) { struct e1000_hw *hw = &adapter->hw; + struct ifnet *ifp = adapter->ifp; u32 reg; + int mcnt = 0; if (adapter->vf_ifp) { e1000_promisc_set_vf(hw, e1000_promisc_disabled); @@ -2104,7 +2106,31 @@ igb_disable_promisc(struct adapter *adap } reg = E1000_READ_REG(hw, E1000_RCTL); reg &= (~E1000_RCTL_UPE); - reg &= (~E1000_RCTL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 800000 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 800000 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + /* Don't disable if in MAX groups */ + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg &= (~E1000_RCTL_MPE); E1000_WRITE_REG(hw, E1000_RCTL, reg); } Modified: head/sys/dev/e1000/if_lem.c ============================================================================== --- head/sys/dev/e1000/if_lem.c Wed Apr 3 23:11:15 2013 (r249073) +++ head/sys/dev/e1000/if_lem.c Wed Apr 3 23:39:54 2013 (r249074) @@ -85,7 +85,7 @@ /********************************************************************* * Legacy Em Driver version: *********************************************************************/ -char lem_driver_version[] = "1.0.5"; +char lem_driver_version[] = "1.0.6"; /********************************************************************* * PCI Device ID Table @@ -1856,12 +1856,37 @@ lem_set_promisc(struct adapter *adapter) static void lem_disable_promisc(struct adapter *adapter) { - u32 reg_rctl; + struct ifnet *ifp = adapter->ifp; + u32 reg_rctl; + int mcnt = 0; reg_rctl = E1000_READ_REG(&adapter->hw, E1000_RCTL); - reg_rctl &= (~E1000_RCTL_UPE); - reg_rctl &= (~E1000_RCTL_MPE); + if (ifp->if_flags & IFF_ALLMULTI) + mcnt = MAX_NUM_MULTICAST_ADDRESSES; + else { + struct ifmultiaddr *ifma; +#if __FreeBSD_version < 800000 + IF_ADDR_LOCK(ifp); +#else + if_maddr_rlock(ifp); +#endif + TAILQ_FOREACH(ifma, &ifp->if_multiaddrs, ifma_link) { + if (ifma->ifma_addr->sa_family != AF_LINK) + continue; + if (mcnt == MAX_NUM_MULTICAST_ADDRESSES) + break; + mcnt++; + } +#if __FreeBSD_version < 800000 + IF_ADDR_UNLOCK(ifp); +#else + if_maddr_runlock(ifp); +#endif + } + /* Don't disable if in MAX groups */ + if (mcnt < MAX_NUM_MULTICAST_ADDRESSES) + reg_rctl &= (~E1000_RCTL_MPE); reg_rctl &= (~E1000_RCTL_SBP); E1000_WRITE_REG(&adapter->hw, E1000_RCTL, reg_rctl); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:04:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E3079BA; Thu, 4 Apr 2013 05:04:49 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 60B92678; Thu, 4 Apr 2013 05:04:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3454m9c018096; Thu, 4 Apr 2013 05:04:48 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3454mXj018095; Thu, 4 Apr 2013 05:04:48 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040504.r3454mXj018095@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:04:48 +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: r249075 - stable/9/sys/x86/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: Thu, 04 Apr 2013 05:04:49 -0000 Author: kib Date: Thu Apr 4 05:04:48 2013 New Revision: 249075 URL: http://svnweb.freebsd.org/changeset/base/249075 Log: MFC r248968: Record the correct error in the trace. 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 Wed Apr 3 23:39:54 2013 (r249074) +++ stable/9/sys/x86/x86/busdma_machdep.c Thu Apr 4 05:04:48 2013 (r249075) @@ -252,7 +252,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, M_ZERO | M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", - __func__, newtag, 0, error); + __func__, newtag, 0, ENOMEM); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:16:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D29AAC0D; Thu, 4 Apr 2013 05:16:14 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C35616AE; Thu, 4 Apr 2013 05:16:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345GEa0021344; Thu, 4 Apr 2013 05:16:14 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345GEOv021342; Thu, 4 Apr 2013 05:16:14 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040516.r345GEOv021342@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:16:14 +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: r249076 - in stable/8/sys: amd64/amd64 i386/i386 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, 04 Apr 2013 05:16:14 -0000 Author: kib Date: Thu Apr 4 05:16:14 2013 New Revision: 249076 URL: http://svnweb.freebsd.org/changeset/base/249076 Log: MFC r248968: Record the correct error in the trace. Modified: stable/8/sys/amd64/amd64/busdma_machdep.c stable/8/sys/i386/i386/busdma_machdep.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/x86/ (props changed) Modified: stable/8/sys/amd64/amd64/busdma_machdep.c ============================================================================== --- stable/8/sys/amd64/amd64/busdma_machdep.c Thu Apr 4 05:04:48 2013 (r249075) +++ stable/8/sys/amd64/amd64/busdma_machdep.c Thu Apr 4 05:16:14 2013 (r249076) @@ -235,7 +235,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, M_ZERO | M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", - __func__, newtag, 0, error); + __func__, newtag, 0, ENOMEM); return (ENOMEM); } Modified: stable/8/sys/i386/i386/busdma_machdep.c ============================================================================== --- stable/8/sys/i386/i386/busdma_machdep.c Thu Apr 4 05:04:48 2013 (r249075) +++ stable/8/sys/i386/i386/busdma_machdep.c Thu Apr 4 05:16:14 2013 (r249076) @@ -247,7 +247,7 @@ bus_dma_tag_create(bus_dma_tag_t parent, M_ZERO | M_NOWAIT); if (newtag == NULL) { CTR4(KTR_BUSDMA, "%s returned tag %p tag flags 0x%x error %d", - __func__, newtag, 0, error); + __func__, newtag, 0, ENOMEM); return (ENOMEM); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:20:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C8204D8F; Thu, 4 Apr 2013 05:20:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AC6A36C3; Thu, 4 Apr 2013 05:20:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345Kqes023559; Thu, 4 Apr 2013 05:20:52 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345Kqut023558; Thu, 4 Apr 2013 05:20:52 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040520.r345Kqut023558@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:20: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: r249077 - stable/9/sys/fs/nfsclient 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, 04 Apr 2013 05:20:52 -0000 Author: kib Date: Thu Apr 4 05:20:52 2013 New Revision: 249077 URL: http://svnweb.freebsd.org/changeset/base/249077 Log: MFC r248967: Strip the unnneeded spaces, mostly at the end of lines. Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clbio.c Thu Apr 4 05:16:14 2013 (r249076) +++ stable/9/sys/fs/nfsclient/nfs_clbio.c Thu Apr 4 05:20:52 2013 (r249077) @@ -73,7 +73,7 @@ int ncl_pbuf_freecnt = -1; /* start out static struct buf *nfs_getcacheblk(struct vnode *vp, daddr_t bn, int size, struct thread *td); -static int nfs_directio_write(struct vnode *vp, struct uio *uiop, +static int nfs_directio_write(struct vnode *vp, struct uio *uiop, struct ucred *cred, int ioflag); /* @@ -120,7 +120,7 @@ ncl_getpages(struct vop_getpages_args *a mtx_lock(&nmp->nm_mtx); if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && - (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { + (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { mtx_unlock(&nmp->nm_mtx); /* We'll never get here for v4, because we always have fsinfo */ (void)ncl_fsinfo(nmp, vp, cred, td); @@ -269,7 +269,7 @@ ncl_putpages(struct vop_putpages_args *a rtvals = ap->a_rtvals; npages = btoc(count); offset = IDX_TO_OFF(pages[0]->pindex); - + mtx_lock(&nmp->nm_mtx); if ((nmp->nm_flag & NFSMNT_NFSV3) != 0 && (nmp->nm_state & NFSSTA_GOTFSINFO) == 0) { @@ -279,9 +279,9 @@ ncl_putpages(struct vop_putpages_args *a mtx_unlock(&nmp->nm_mtx); mtx_lock(&np->n_mtx); - if (newnfs_directio_enable && !newnfs_directio_allow_mmap && + if (newnfs_directio_enable && !newnfs_directio_allow_mmap && (np->n_flag & NNONCACHE) && (vp->v_type == VREG)) { - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); ncl_printf("ncl_putpages: called on noncache-able vnode??\n"); mtx_lock(&np->n_mtx); } @@ -362,7 +362,7 @@ nfs_bioread_check_cons(struct vnode *vp, struct vattr vattr; struct nfsnode *np = VTONFS(vp); int old_lock; - + /* * Grab the exclusive lock before checking whether the cache is * consistent. @@ -414,7 +414,7 @@ nfs_bioread_check_cons(struct vnode *vp, } mtx_unlock(&np->n_mtx); } -out: +out: ncl_downgrade_vnlock(vp, old_lock); return error; } @@ -456,10 +456,10 @@ ncl_bioread(struct vnode *vp, struct uio tmp_off = uio->uio_offset + uio->uio_resid; if (vp->v_type != VDIR && (tmp_off > nmp->nm_maxfilesize || tmp_off < uio->uio_offset)) { - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&nmp->nm_mtx); return (EFBIG); } - mtx_unlock(&nmp->nm_mtx); + mtx_unlock(&nmp->nm_mtx); if (newnfs_directio_enable && (ioflag & IO_DIRECT) && (vp->v_type == VREG)) /* No caching/ no readaheads. Just read data into the user buffer */ @@ -467,17 +467,17 @@ ncl_bioread(struct vnode *vp, struct uio biosize = vp->v_bufobj.bo_bsize; seqcount = (int)((off_t)(ioflag >> IO_SEQSHIFT) * biosize / BKVASIZE); - + error = nfs_bioread_check_cons(vp, td, cred); if (error) return error; do { u_quad_t nsize; - + mtx_lock(&np->n_mtx); nsize = np->n_size; - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); switch (vp->v_type) { case VREG: @@ -710,13 +710,13 @@ ncl_bioread(struct vnode *vp, struct uio } /* - * The NFS write path cannot handle iovecs with len > 1. So we need to + * The NFS write path cannot handle iovecs with len > 1. So we need to * break up iovecs accordingly (restricting them to wsize). - * For the SYNC case, we can do this with 1 copy (user buffer -> mbuf). - * For the ASYNC case, 2 copies are needed. The first a copy from the + * For the SYNC case, we can do this with 1 copy (user buffer -> mbuf). + * For the ASYNC case, 2 copies are needed. The first a copy from the * user buffer to a staging buffer and then a second copy from the staging * buffer to mbufs. This can be optimized by copying from the user buffer - * directly into mbufs and passing the chain down, but that requires a + * directly into mbufs and passing the chain down, but that requires a * fair amount of re-working of the relevant codepaths (and can be done * later). */ @@ -732,7 +732,7 @@ nfs_directio_write(vp, uiop, cred, iofla struct thread *td = uiop->uio_td; int size; int wsize; - + mtx_lock(&nmp->nm_mtx); wsize = nmp->nm_wsize; mtx_unlock(&nmp->nm_mtx); @@ -756,7 +756,7 @@ do_sync: iomode = NFSWRITE_FILESYNC; error = ncl_writerpc(vp, &uio, cred, &iomode, &must_commit, 0); - KASSERT((must_commit == 0), + KASSERT((must_commit == 0), ("ncl_directio_write: Did not commit write")); if (error) return (error); @@ -766,7 +766,7 @@ do_sync: uiop->uio_iovcnt--; uiop->uio_iov++; } else { - uiop->uio_iov->iov_base = + uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + size; uiop->uio_iov->iov_len -= size; } @@ -775,14 +775,14 @@ do_sync: struct uio *t_uio; struct iovec *t_iov; struct buf *bp; - + /* * Break up the write into blocksize chunks and hand these * over to nfsiod's for write back. - * Unfortunately, this incurs a copy of the data. Since - * the user could modify the buffer before the write is + * Unfortunately, this incurs a copy of the data. Since + * the user could modify the buffer before the write is * initiated. - * + * * The obvious optimization here is that one of the 2 copies * in the async write path can be eliminated by copying the * data here directly into mbufs and passing the mbuf chain @@ -825,8 +825,8 @@ do_sync: if (cred != NOCRED) { crhold(cred); bp->b_wcred = cred; - } else - bp->b_wcred = NOCRED; + } else + bp->b_wcred = NOCRED; bp->b_caller1 = (void *)t_uio; bp->b_vp = vp; error = ncl_asyncio(nmp, bp, NOCRED, td); @@ -847,7 +847,7 @@ err_free: uiop->uio_iovcnt--; uiop->uio_iov++; } else { - uiop->uio_iov->iov_base = + uiop->uio_iov->iov_base = (char *)uiop->uio_iov->iov_base + size; uiop->uio_iov->iov_len -= size; } @@ -980,7 +980,7 @@ flush_and_restart: mtx_lock(&np->n_mtx); nflag = np->n_flag; - mtx_unlock(&np->n_mtx); + mtx_unlock(&np->n_mtx); int needrestart = 0; if (nmp->nm_wcommitsize < uio->uio_resid) { /* @@ -1293,11 +1293,11 @@ nfs_getcacheblk(struct vnode *vp, daddr_ nmp = VFSTONFS(mp); if (nmp->nm_flag & NFSMNT_INT) { - sigset_t oldset; + sigset_t oldset; - newnfs_set_sigmask(td, &oldset); + newnfs_set_sigmask(td, &oldset); bp = getblk(vp, bn, size, NFS_PCATCH, 0, 0); - newnfs_restore_sigmask(td, &oldset); + newnfs_restore_sigmask(td, &oldset); while (bp == NULL) { if (newnfs_sigintr(nmp, td)) return (NULL); @@ -1322,7 +1322,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag struct nfsnode *np = VTONFS(vp); struct nfsmount *nmp = VFSTONFS(vp->v_mount); int error = 0, slpflag, slptimeo; - int old_lock = 0; + int old_lock = 0; ASSERT_VOP_LOCKED(vp, "ncl_vinvalbuf"); @@ -1358,7 +1358,7 @@ ncl_vinvalbuf(struct vnode *vp, int flag VM_OBJECT_UNLOCK(vp->v_bufobj.bo_object); /* * If the page clean was interrupted, fail the invalidation. - * Not doing so, we run the risk of losing dirty pages in the + * Not doing so, we run the risk of losing dirty pages in the * vinvalbuf() call below. */ if (intrflg && (error = newnfs_sigintr(nmp, td))) @@ -1466,13 +1466,13 @@ again: NFS_DPF(ASYNCIO, ("ncl_asyncio: waiting for mount %p queue to drain\n", nmp)); nmp->nm_bufqwant = TRUE; - error = newnfs_msleep(td, &nmp->nm_bufq, + error = newnfs_msleep(td, &nmp->nm_bufq, &ncl_iod_mutex, slpflag | PRIBIO, "nfsaio", - slptimeo); + slptimeo); if (error) { error2 = newnfs_sigintr(nmp, td); if (error2) { - mtx_unlock(&ncl_iod_mutex); + mtx_unlock(&ncl_iod_mutex); return (error2); } if (slpflag == NFS_PCATCH) { @@ -1508,7 +1508,7 @@ again: TAILQ_INSERT_TAIL(&nmp->nm_bufq, bp, b_freelist); nmp->nm_bufqlen++; if ((bp->b_flags & B_DIRECT) && bp->b_iocmd == BIO_WRITE) { - mtx_lock(&(VTONFS(bp->b_vp))->n_mtx); + mtx_lock(&(VTONFS(bp->b_vp))->n_mtx); VTONFS(bp->b_vp)->n_flag |= NMODIFIED; VTONFS(bp->b_vp)->n_directio_asyncwr++; mtx_unlock(&(VTONFS(bp->b_vp))->n_mtx); @@ -1533,7 +1533,7 @@ ncl_doio_directwrite(struct buf *bp) int iomode, must_commit; struct uio *uiop = (struct uio *)bp->b_caller1; char *iov_base = uiop->uio_iov->iov_base; - + iomode = NFSWRITE_FILESYNC; uiop->uio_td = NULL; /* NULL since we're in nfsiod */ ncl_writerpc(bp->b_vp, uiop, bp->b_wcred, &iomode, &must_commit, 0); @@ -1574,7 +1574,7 @@ ncl_doio(struct vnode *vp, struct buf *b struct iovec io; struct proc *p = td ? td->td_proc : NULL; uint8_t iocmd; - + np = VTONFS(vp); nmp = VFSTONFS(vp->v_mount); uiop = &uio; @@ -1758,20 +1758,20 @@ ncl_doio(struct vnode *vp, struct buf *b * bp in this case is not an NFS cache block so we should * be safe. XXX * - * The logic below breaks up errors into recoverable and + * The logic below breaks up errors into recoverable and * unrecoverable. For the former, we clear B_INVAL|B_NOCACHE * and keep the buffer around for potential write retries. * For the latter (eg ESTALE), we toss the buffer away (B_INVAL) - * and save the error in the nfsnode. This is less than ideal + * and save the error in the nfsnode. This is less than ideal * but necessary. Keeping such buffers around could potentially * cause buffer exhaustion eventually (they can never be written * out, so will get constantly be re-dirtied). It also causes - * all sorts of vfs panics. For non-recoverable write errors, + * all sorts of vfs panics. For non-recoverable write errors, * also invalidate the attrcache, so we'll be forced to go over * the wire for this object, returning an error to user on next * call (most of the time). */ - if (error == EINTR || error == EIO || error == ETIMEDOUT + if (error == EINTR || error == EIO || error == ETIMEDOUT || (!error && (bp->b_flags & B_NEEDCOMMIT))) { int s; @@ -1785,7 +1785,7 @@ ncl_doio(struct vnode *vp, struct buf *b (bp->b_flags & B_ASYNC) == 0) bp->b_flags |= B_EINTR; splx(s); - } else { + } else { if (error) { bp->b_ioflags |= BIO_ERROR; bp->b_flags |= B_INVAL; @@ -1838,7 +1838,7 @@ ncl_meta_setsize(struct vnode *vp, struc int bufsize; /* - * vtruncbuf() doesn't get the buffer overlapping the + * vtruncbuf() doesn't get the buffer overlapping the * truncation point. We may have a B_DELWRI and/or B_CACHE * buffer that now needs to be truncated. */ @@ -1846,8 +1846,8 @@ ncl_meta_setsize(struct vnode *vp, struc lbn = nsize / biosize; bufsize = nsize & (biosize - 1); bp = nfs_getcacheblk(vp, lbn, bufsize, td); - if (!bp) - return EINTR; + if (!bp) + return EINTR; if (bp->b_dirtyoff > bp->b_bcount) bp->b_dirtyoff = bp->b_bcount; if (bp->b_dirtyend > bp->b_bcount) From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:24:01 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 28046F17; Thu, 4 Apr 2013 05:24:01 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCD16D9; Thu, 4 Apr 2013 05:24:01 +0000 (UTC) Received: from delphij-macbook.local (c-67-188-85-47.hsd1.ca.comcast.net [67.188.85.47]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id 9D595608A; Wed, 3 Apr 2013 22:24:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1365053040; bh=zDShSr4eMqOuWJUNmGQHTDOS0Yl8A/JSDDn7wpRfIE4=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=d/gNuZWZUWs+FNfQhIcEiHIbuYrvvDZS83XLoG8nH+cjxUQWpDEbF2LKzboMCGPyY fZlecb4KOei+swlLwFC/M/RPcD/cK1YWYsjLFsrmIIn4U5/UcQogHdxFd+XJPjQ1yA ninwxTj2pw1B+yJcqQJ1eGUOIPhmp8WXXB/nmacM= Message-ID: <515D0E70.8050701@delphij.net> Date: Wed, 03 Apr 2013 22:24:00 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Andrey Chernov Subject: Re: svn commit: r249035 - head/lib/libc/stdlib References: <201304022341.r32NfL8L096954@svn.freebsd.org> <20130403165736.F819@besplex.bde.org> <515BDADF.8060303@freebsd.org> In-Reply-To: <515BDADF.8060303@freebsd.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI , Bruce Evans X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: "SVN commit messages 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, 04 Apr 2013 05:24:01 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 On 4/3/13 12:31 AM, Andrey Chernov wrote: > On 03.04.2013 11:04, Bruce Evans wrote: >>> + mib[0] = CTL_KERN; + mib[1] = KERN_ARND; + >>> sysctl(mib, 2, (void *)&next, &len, NULL, 0); } >> >> The sysctl() is certain to fail on old kernels (like open of >> /dev/random on even older kernels), but there is no longer any >> error checking or handling. The contents of `next' on error is >> indeterminate (not documented in the man page), but is probably >> unchanged. Applications can actually detect this error although >> though the API doesn't support this, by using the documented >> implementation details and assuming that errno is properly left >> changed if the syscall fails (set errno to 0 before the call here >> and check it after). > > Even in case sysctl is not fail, kernel's arc4 is very poorly > initialized right after the boot. See the comment in the > libkern/arc4random.c arc4_randomstir(), it is about device not > loaded case, but it is the same even if device is loaded but not > harvest enough. NetBSD implementation of kernel's arc4 is different > from ours. True, but keep mind that neither random(3) nor rand(3) is intended to satisfy cryptographically secure needs, and I don't see a reason why kernel arc4 can not be improved. By the way, /dev/random won't even block about 5 weeks and was broken in 2006. > Really I am _very_ tired to tell people about the problem, to > write patches for the problem, etc., so anybody who are interested > can search more details and patches in the mail archives. To be honest, I don't personally have access to the archive (nor I'm aware there was one, the arc4 change you are talking about may predate my membership on secteam@ by the way). How about sending the patch again and let's see how we can work it out? Cheers, -----BEGIN PGP SIGNATURE----- iQEcBAEBCAAGBQJRXQ5wAAoJEG80Jeu8UPuzsO0IALeYwGvIVG7xhyTEihKublqg 2B/6TdfklfRtR3wnY6xtnHxSjRYB/S1HLsATCB9SVgiq8NMgaEB5KdDFFbgPYUcv i4+BB30x6O3GvUQxAGZTbPm0mhTfpFmbhBb5hPM9CNbHzKoAYQqA/01rxf9DJJIj /Ob7lN287IfGDibWSX4iw867PrLSwlVJR/9bXigzQ6Zm21i/5rvXAqHhAwf1wQ3S frQ19XvadjipPe0+iBngJL2yclmHeyHw3NmocI+X7gZr2gAlKCNcabeDtzSs6UUm fUcQii0Onk7XnFRJnvXMmMlHAzVLTosR9HlFysPUbbytZvyHXeRPmnDcDP/3PlU= =/MFC -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:26:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3B3EE174; Thu, 4 Apr 2013 05:26:23 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1527D6F0; Thu, 4 Apr 2013 05:26:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345QMlI024397; Thu, 4 Apr 2013 05:26:22 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345QMPB024396; Thu, 4 Apr 2013 05:26:22 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040526.r345QMPB024396@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:26:22 +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: r249078 - stable/9/sys/fs/nfsclient 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, 04 Apr 2013 05:26:23 -0000 Author: kib Date: Thu Apr 4 05:26:22 2013 New Revision: 249078 URL: http://svnweb.freebsd.org/changeset/base/249078 Log: MFC r248567: Do not call vnode_pager_setsize() while a NFS node mutex is locked. vnode_pager_setsize() might sleep waiting for the page after EOF be unbusied. Call vnode_pager_setsize() both for the regular and directory vnodes. MFC r248581: Initialize the variable to avoid (false) compiler warning about use of an uninitialized local. Modified: stable/9/sys/fs/nfsclient/nfs_clport.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/nfsclient/nfs_clport.c ============================================================================== --- stable/9/sys/fs/nfsclient/nfs_clport.c Thu Apr 4 05:20:52 2013 (r249077) +++ stable/9/sys/fs/nfsclient/nfs_clport.c Thu Apr 4 05:26:22 2013 (r249078) @@ -367,6 +367,8 @@ nfscl_loadattrcache(struct vnode **vpp, struct nfsnode *np; struct nfsmount *nmp; struct timespec mtime_save; + u_quad_t nsize; + int setnsize; /* * If v_type == VNON it is a new node, so fill in the v_type, @@ -424,6 +426,8 @@ nfscl_loadattrcache(struct vnode **vpp, } else vap->va_fsid = vp->v_mount->mnt_stat.f_fsid.val[0]; np->n_attrstamp = time_second; + setnsize = 0; + nsize = 0; if (vap->va_size != np->n_size) { if (vap->va_type == VREG) { if (dontshrink && vap->va_size < np->n_size) { @@ -450,10 +454,13 @@ nfscl_loadattrcache(struct vnode **vpp, np->n_size = vap->va_size; np->n_flag |= NSIZECHANGED; } - vnode_pager_setsize(vp, np->n_size); } else { np->n_size = vap->va_size; } + if (vap->va_type == VREG || vap->va_type == VDIR) { + setnsize = 1; + nsize = vap->va_size; + } } /* * The following checks are added to prevent a race between (say) @@ -486,6 +493,8 @@ nfscl_loadattrcache(struct vnode **vpp, KDTRACE_NFS_ATTRCACHE_LOAD_DONE(vp, vap, 0); #endif NFSUNLOCKNODE(np); + if (setnsize) + vnode_pager_setsize(vp, nsize); return (0); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:29:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3C72A304; Thu, 4 Apr 2013 05:29:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2ED84708; Thu, 4 Apr 2013 05:29:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345Tch6024859; Thu, 4 Apr 2013 05:29:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345Tcfo024858; Thu, 4 Apr 2013 05:29:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040529.r345Tcfo024858@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:29:38 +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: r249079 - 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: Thu, 04 Apr 2013 05:29:38 -0000 Author: kib Date: Thu Apr 4 05:29:37 2013 New Revision: 249079 URL: http://svnweb.freebsd.org/changeset/base/249079 Log: MFC r248815: Release the v_writecount reference on the vnode in case of error, before the vnode is vput() in vm_mmap_vnode(). Modified: stable/9/sys/vm/vm_mmap.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/vm/vm_mmap.c ============================================================================== --- stable/9/sys/vm/vm_mmap.c Thu Apr 4 05:26:22 2013 (r249078) +++ stable/9/sys/vm/vm_mmap.c Thu Apr 4 05:29:37 2013 (r249079) @@ -1352,6 +1352,10 @@ mark_atime: vfs_mark_atime(vp, cred); done: + if (error != 0 && *writecounted) { + *writecounted = FALSE; + vnode_pager_update_writecount(obj, objsize, 0); + } vput(vp); VFS_UNLOCK_GIANT(vfslocked); return (error); From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:36:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 9BE4E4AA; Thu, 4 Apr 2013 05:36:11 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8D9B872D; Thu, 4 Apr 2013 05:36:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345aBSx027419; Thu, 4 Apr 2013 05:36:11 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345aBqr027418; Thu, 4 Apr 2013 05:36:11 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040536.r345aBqr027418@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:36:11 +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: r249080 - stable/9/sys/dev/drm2 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, 04 Apr 2013 05:36:11 -0000 Author: kib Date: Thu Apr 4 05:36:11 2013 New Revision: 249080 URL: http://svnweb.freebsd.org/changeset/base/249080 Log: MFC r247832: Import the likely() compat macro. MFC r247838: Correct the r247832. Modified: stable/9/sys/dev/drm2/drmP.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drmP.h ============================================================================== --- stable/9/sys/dev/drm2/drmP.h Thu Apr 4 05:29:37 2013 (r249079) +++ stable/9/sys/dev/drm2/drmP.h Thu Apr 4 05:36:11 2013 (r249080) @@ -228,6 +228,7 @@ typedef void irqreturn_t; #define IRQ_NONE /* nothing */ #define unlikely(x) __builtin_expect(!!(x), 0) +#define likely(x) __builtin_expect(!!(x), 1) #define container_of(ptr, type, member) ({ \ __typeof( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );}) From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:39:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DAED0630; Thu, 4 Apr 2013 05:39:38 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B056D741; Thu, 4 Apr 2013 05:39:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345dcMd027930; Thu, 4 Apr 2013 05:39:38 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345dcY8027925; Thu, 4 Apr 2013 05:39:38 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040539.r345dcY8027925@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:39:38 +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: r249081 - stable/9/sys/dev/drm2 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, 04 Apr 2013 05:39:38 -0000 Author: kib Date: Thu Apr 4 05:39:37 2013 New Revision: 249081 URL: http://svnweb.freebsd.org/changeset/base/249081 Log: MFC r247833: Import the drm_mm_debug_table() function. Modified: stable/9/sys/dev/drm2/drm_mm.c stable/9/sys/dev/drm2/drm_mm.h Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/drm2/drm_mm.c ============================================================================== --- stable/9/sys/dev/drm2/drm_mm.c Thu Apr 4 05:36:11 2013 (r249080) +++ stable/9/sys/dev/drm2/drm_mm.c Thu Apr 4 05:39:37 2013 (r249081) @@ -561,3 +561,40 @@ void drm_mm_takedown(struct drm_mm * mm) KASSERT(mm->num_unused == 0, ("num_unused != 0")); } + +void drm_mm_debug_table(struct drm_mm *mm, const char *prefix) +{ + struct drm_mm_node *entry; + unsigned long total_used = 0, total_free = 0, total = 0; + unsigned long hole_start, hole_end, hole_size; + + hole_start = drm_mm_hole_node_start(&mm->head_node); + hole_end = drm_mm_hole_node_end(&mm->head_node); + hole_size = hole_end - hole_start; + if (hole_size) + printf("%s 0x%08lx-0x%08lx: %8lu: free\n", + prefix, hole_start, hole_end, + hole_size); + total_free += hole_size; + + drm_mm_for_each_node(entry, mm) { + printf("%s 0x%08lx-0x%08lx: %8lu: used\n", + prefix, entry->start, entry->start + entry->size, + entry->size); + total_used += entry->size; + + if (entry->hole_follows) { + hole_start = drm_mm_hole_node_start(entry); + hole_end = drm_mm_hole_node_end(entry); + hole_size = hole_end - hole_start; + printf("%s 0x%08lx-0x%08lx: %8lu: free\n", + prefix, hole_start, hole_end, + hole_size); + total_free += hole_size; + } + } + total = total_free + total_used; + + printf("%s total: %lu, used %lu free %lu\n", prefix, total, + total_used, total_free); +} Modified: stable/9/sys/dev/drm2/drm_mm.h ============================================================================== --- stable/9/sys/dev/drm2/drm_mm.h Thu Apr 4 05:36:11 2013 (r249080) +++ stable/9/sys/dev/drm2/drm_mm.h Thu Apr 4 05:39:37 2013 (r249081) @@ -182,4 +182,6 @@ void drm_mm_init_scan_with_range(struct int drm_mm_scan_add_block(struct drm_mm_node *node); int drm_mm_scan_remove_block(struct drm_mm_node *node); +void drm_mm_debug_table(struct drm_mm *mm, const char *prefix); + #endif From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 05:47:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4229B7E0; Thu, 4 Apr 2013 05:47:51 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 32C1976C; Thu, 4 Apr 2013 05:47:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r345lp8L030714; Thu, 4 Apr 2013 05:47:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r345loBc030711; Thu, 4 Apr 2013 05:47:50 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304040547.r345loBc030711@svn.freebsd.org> From: Konstantin Belousov Date: Thu, 4 Apr 2013 05:47:50 +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: r249082 - in stable/9/sys: dev/drm2 modules/drm2/drm2 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, 04 Apr 2013 05:47:51 -0000 Author: kib Date: Thu Apr 4 05:47:50 2013 New Revision: 249082 URL: http://svnweb.freebsd.org/changeset/base/249082 Log: MFC r247834: Import the drm_global references helpers. MFC r247839 (by dumbbell): Destroy sx in drm_global_release(). Added: stable/9/sys/dev/drm2/drm_global.c - copied, changed from r247834, head/sys/dev/drm2/drm_global.c stable/9/sys/dev/drm2/drm_global.h - copied unchanged from r247834, head/sys/dev/drm2/drm_global.h Modified: stable/9/sys/modules/drm2/drm2/Makefile Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/modules/ (props changed) Copied and modified: stable/9/sys/dev/drm2/drm_global.c (from r247834, head/sys/dev/drm2/drm_global.c) ============================================================================== --- head/sys/dev/drm2/drm_global.c Tue Mar 5 09:27:21 2013 (r247834, copy source) +++ stable/9/sys/dev/drm2/drm_global.c Thu Apr 4 05:47:50 2013 (r249082) @@ -63,6 +63,7 @@ void drm_global_release(void) struct drm_global_item *item = &glob[i]; MPASS(item->object == NULL); MPASS(item->refcount == 0); + sx_destroy(&item->mutex); } } Copied: stable/9/sys/dev/drm2/drm_global.h (from r247834, head/sys/dev/drm2/drm_global.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/sys/dev/drm2/drm_global.h Thu Apr 4 05:47:50 2013 (r249082, copy of r247834, head/sys/dev/drm2/drm_global.h) @@ -0,0 +1,56 @@ +/************************************************************************** + * + * Copyright 2008-2009 VMware, Inc., Palo Alto, CA., USA + * All Rights Reserved. + * + * Permission is hereby granted, free of charge, to any person obtaining a + * copy of this software and associated documentation files (the + * "Software"), to deal in the Software without restriction, including + * without limitation the rights to use, copy, modify, merge, publish, + * distribute, sub license, and/or sell copies of the Software, and to + * permit persons to whom the Software is furnished to do so, subject to + * the following conditions: + * + * The above copyright notice and this permission notice (including the + * next paragraph) shall be included in all copies or substantial portions + * of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL + * THE COPYRIGHT HOLDERS, AUTHORS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, + * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE + * USE OR OTHER DEALINGS IN THE SOFTWARE. + * + **************************************************************************/ +/* + * Authors: Thomas Hellstrom + */ +/* $FreeBSD$ */ + +#ifndef _DRM_GLOBAL_H_ +#define _DRM_GLOBAL_H_ +enum drm_global_types { + DRM_GLOBAL_TTM_MEM = 0, + DRM_GLOBAL_TTM_BO, + DRM_GLOBAL_TTM_OBJECT, + DRM_GLOBAL_NUM +}; + +struct drm_global_reference { + enum drm_global_types global_type; + size_t size; + void *object; + int (*init) (struct drm_global_reference *); + void (*release) (struct drm_global_reference *); +}; + +extern void drm_global_init(void); +extern void drm_global_release(void); +extern int drm_global_item_ref(struct drm_global_reference *ref); +extern void drm_global_item_unref(struct drm_global_reference *ref); + +MALLOC_DECLARE(M_DRM_GLOBAL); + +#endif Modified: stable/9/sys/modules/drm2/drm2/Makefile ============================================================================== --- stable/9/sys/modules/drm2/drm2/Makefile Thu Apr 4 05:39:37 2013 (r249081) +++ stable/9/sys/modules/drm2/drm2/Makefile Thu Apr 4 05:47:50 2013 (r249082) @@ -18,6 +18,7 @@ SRCS = \ drm_fops.c \ drm_gem.c \ drm_gem_names.c \ + drm_global.c \ drm_hashtab.c \ drm_ioctl.c \ drm_irq.c \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 07:12:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 8FB1C113; Thu, 4 Apr 2013 07:12:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80BFDA08; Thu, 4 Apr 2013 07:12:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r347CSbp056270; Thu, 4 Apr 2013 07:12:28 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r347COpN056243; Thu, 4 Apr 2013 07:12:24 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304040712.r347COpN056243@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 07:12:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249083 - in head: rescue/rescue sbin sbin/atacontrol share/man/man4 sys/amd64/conf sys/arm/conf sys/cam/ata sys/conf sys/dev/ata sys/dev/ata/chipsets sys/i386/conf sys/ia64/conf sys/mi... 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, 04 Apr 2013 07:12:29 -0000 Author: mav Date: Thu Apr 4 07:12:24 2013 New Revision: 249083 URL: http://svnweb.freebsd.org/changeset/base/249083 Log: Remove all legacy ATA code parts, not used since options ATA_CAM enabled in most kernels before FreeBSD 9.0. Remove such modules and respective kernel options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the atacontrol utility and some man pages. Remove useless now options ATA_CAM. No objections: current@, stable@ MFC after: never Deleted: head/sbin/atacontrol/ head/share/man/man4/atapicam.4 head/share/man/man4/ataraid.4 head/sys/dev/ata/ata-disk.c head/sys/dev/ata/ata-disk.h head/sys/dev/ata/ata-raid-ddf.h head/sys/dev/ata/ata-raid.c head/sys/dev/ata/ata-raid.h head/sys/dev/ata/atapi-cam.c head/sys/dev/ata/atapi-cd.c head/sys/dev/ata/atapi-cd.h head/sys/dev/ata/atapi-fd.c head/sys/dev/ata/atapi-fd.h head/sys/dev/ata/atapi-tape.c head/sys/dev/ata/atapi-tape.h head/sys/modules/ata/atacam/ head/sys/modules/ata/atadisk/ head/sys/modules/ata/atapicam/ head/sys/modules/ata/atapicd/ head/sys/modules/ata/atapifd/ head/sys/modules/ata/atapist/ head/sys/modules/ata/ataraid/ Modified: head/rescue/rescue/Makefile head/sbin/Makefile head/share/man/man4/Makefile head/share/man/man4/ata.4 head/sys/amd64/conf/GENERIC head/sys/arm/conf/AC100 head/sys/arm/conf/ARMADAXP head/sys/arm/conf/AVILA head/sys/arm/conf/CAMBRIA head/sys/arm/conf/CRB head/sys/arm/conf/CUBIEBOARD head/sys/arm/conf/EFIKA_MX head/sys/arm/conf/EP80219 head/sys/arm/conf/IQ31244 head/sys/arm/conf/TS7800 head/sys/cam/ata/ata_da.c head/sys/conf/NOTES head/sys/conf/files head/sys/conf/files.sparc64 head/sys/conf/options head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-cbus.c head/sys/dev/ata/ata-dma.c head/sys/dev/ata/ata-lowlevel.c head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-pci.h head/sys/dev/ata/ata-queue.c head/sys/dev/ata/ata-sata.c head/sys/dev/ata/ata_if.m head/sys/dev/ata/chipsets/ata-acard.c head/sys/dev/ata/chipsets/ata-acerlabs.c head/sys/dev/ata/chipsets/ata-intel.c head/sys/dev/ata/chipsets/ata-ite.c head/sys/dev/ata/chipsets/ata-serverworks.c head/sys/dev/ata/chipsets/ata-siliconimage.c head/sys/i386/conf/GENERIC head/sys/i386/conf/XBOX head/sys/ia64/conf/GENERIC head/sys/mips/conf/OCTEON1 head/sys/mips/conf/XLR head/sys/mips/conf/XLR64 head/sys/mips/conf/XLRN32 head/sys/mips/conf/std.SWARM head/sys/mips/conf/std.XLP head/sys/mips/malta/std.malta head/sys/modules/ata/Makefile head/sys/pc98/conf/GENERIC head/sys/pc98/conf/NOTES head/sys/powerpc/conf/GENERIC head/sys/powerpc/conf/GENERIC64 head/sys/powerpc/conf/MPC85XX head/sys/sparc64/conf/GENERIC Modified: head/rescue/rescue/Makefile ============================================================================== --- head/rescue/rescue/Makefile Thu Apr 4 05:47:50 2013 (r249082) +++ head/rescue/rescue/Makefile Thu Apr 4 07:12:24 2013 (r249083) @@ -87,7 +87,7 @@ CRUNCH_SUPPRESS_LINK_-tcsh= 1 # headers in addition to the standard 'paths.h' header. # CRUNCH_SRCDIRS+= sbin -CRUNCH_PROGS_sbin= atacontrol badsect \ +CRUNCH_PROGS_sbin= badsect \ camcontrol ccdconfig clri devfs dmesg dump \ dumpfs dumpon fsck fsck_ffs fsck_msdosfs fsdb \ fsirand gbde geom ifconfig init \ Modified: head/sbin/Makefile ============================================================================== --- head/sbin/Makefile Thu Apr 4 05:47:50 2013 (r249082) +++ head/sbin/Makefile Thu Apr 4 07:12:24 2013 (r249083) @@ -6,7 +6,6 @@ # XXX MISSING: icheck ncheck SUBDIR=adjkerntz \ - atacontrol \ badsect \ camcontrol \ ccdconfig \ Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Apr 4 05:47:50 2013 (r249082) +++ head/share/man/man4/Makefile Thu Apr 4 07:12:24 2013 (r249083) @@ -51,8 +51,6 @@ MAN= aac.4 \ ${_asmc.4} \ asr.4 \ ata.4 \ - atapicam.4 \ - ataraid.4 \ ath.4 \ ath_ahb.4 \ ath_hal.4 \ Modified: head/share/man/man4/ata.4 ============================================================================== --- head/share/man/man4/ata.4 Thu Apr 4 05:47:50 2013 (r249082) +++ head/share/man/man4/ata.4 Thu Apr 4 07:12:24 2013 (r249083) @@ -36,7 +36,6 @@ kernel configuration file: .Bd -ragged -offset indent .Cd "device scbus" .Cd "device ata" -.Cd "options ATA_CAM" .Ed .Pp Alternatively, to load the driver as set of modules at boot time, @@ -79,12 +78,6 @@ prerequisite for the other modules. The next three lines are generic bus-specific drivers. Of the rest, ataahci is the AHCI driver. The others are vendor-specific PCI drivers. -The -.Dv ATA_CAM -option should always remain in the kernel configuration, to make -the driver work as a -.Xr CAM 4 -subsystem module. .Pp The following tunables are settable from the .Xr loader 8 : Modified: head/sys/amd64/conf/GENERIC ============================================================================== --- head/sys/amd64/conf/GENERIC Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/amd64/conf/GENERIC Thu Apr 4 07:12:24 2013 (r249083) @@ -102,7 +102,6 @@ device fdc # ATA controllers device ahci # AHCI-compatible SATA controllers device ata # Legacy ATA/SATA controllers -options ATA_CAM # Handle legacy controllers with CAM options ATA_STATIC_ID # Static device numbering device mvs # Marvell 88SX50XX/88SX60XX/88SX70XX/SoC SATA device siis # SiliconImage SiI3124/SiI3132/SiI3531 SATA Modified: head/sys/arm/conf/AC100 ============================================================================== --- head/sys/arm/conf/AC100 Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/AC100 Thu Apr 4 07:12:24 2013 (r249083) @@ -76,7 +76,6 @@ device md # SATA #device ata -#device atadisk #device mvs # Serial ports Modified: head/sys/arm/conf/ARMADAXP ============================================================================== --- head/sys/arm/conf/ARMADAXP Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/ARMADAXP Thu Apr 4 07:12:24 2013 (r249083) @@ -76,7 +76,6 @@ device da # SATA device ata -device atadisk #device mvs # Serial ports Modified: head/sys/arm/conf/AVILA ============================================================================== --- head/sys/arm/conf/AVILA Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/AVILA Thu Apr 4 07:12:24 2013 (r249083) @@ -93,7 +93,6 @@ device avila_gpio # GPIO pins on J8 device ata device avila_ata # Gateworks CF/IDE support -options ATA_CAM device npe # Network Processing Engine device npe_fw Modified: head/sys/arm/conf/CAMBRIA ============================================================================== --- head/sys/arm/conf/CAMBRIA Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/CAMBRIA Thu Apr 4 07:12:24 2013 (r249083) @@ -96,7 +96,6 @@ device cambria_gpio # GPIO pins on J11 device ata device avila_ata # Gateworks CF/IDE support -options ATA_CAM device npe # Network Processing Engine device npe_fw Modified: head/sys/arm/conf/CRB ============================================================================== --- head/sys/arm/conf/CRB Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/CRB Thu Apr 4 07:12:24 2013 (r249083) @@ -73,7 +73,6 @@ device uart device pci device ata -options ATA_CAM options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/CUBIEBOARD ============================================================================== --- head/sys/arm/conf/CUBIEBOARD Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/CUBIEBOARD Thu Apr 4 07:12:24 2013 (r249083) @@ -83,7 +83,6 @@ options ROOTDEVNAME=\"ufs:/dev/da0s2\" # ATA controllers #device ahci # AHCI-compatible SATA controllers #device ata # Legacy ATA/SATA controllers -#options ATA_CAM # Handle legacy controllers with CAM #options ATA_STATIC_ID # Static device numbering # Console and misc Modified: head/sys/arm/conf/EFIKA_MX ============================================================================== --- head/sys/arm/conf/EFIKA_MX Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/EFIKA_MX Thu Apr 4 07:12:24 2013 (r249083) @@ -111,7 +111,6 @@ options ALT_BREAK_TO_DEBUGGER device ata device atapci # Only for helper functions device imxata -options ATA_CAM options ATA_STATIC_ID # Static device numbering device iomux # IO Multiplexor Modified: head/sys/arm/conf/EP80219 ============================================================================== --- head/sys/arm/conf/EP80219 Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/EP80219 Thu Apr 4 07:12:24 2013 (r249083) @@ -73,7 +73,6 @@ device uart device pci device ata -options ATA_CAM options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/IQ31244 ============================================================================== --- head/sys/arm/conf/IQ31244 Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/IQ31244 Thu Apr 4 07:12:24 2013 (r249083) @@ -72,7 +72,6 @@ device uart device pci device ata -options ATA_CAM options ATA_STATIC_ID # Static device numbering device scbus # SCSI bus (required for ATA/SCSI) Modified: head/sys/arm/conf/TS7800 ============================================================================== --- head/sys/arm/conf/TS7800 Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/arm/conf/TS7800 Thu Apr 4 07:12:24 2013 (r249083) @@ -70,7 +70,6 @@ device da # SATA device ata -options ATA_CAM # Flattened Device Tree options FDT Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/cam/ata/ata_da.c Thu Apr 4 07:12:24 2013 (r249083) @@ -411,11 +411,7 @@ static void adasuspend(void *arg); static void adaresume(void *arg); #ifndef ADA_DEFAULT_LEGACY_ALIASES -#ifdef ATA_CAM #define ADA_DEFAULT_LEGACY_ALIASES 1 -#else -#define ADA_DEFAULT_LEGACY_ALIASES 0 -#endif #endif #ifndef ADA_DEFAULT_TIMEOUT Modified: head/sys/conf/NOTES ============================================================================== --- head/sys/conf/NOTES Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/conf/NOTES Thu Apr 4 07:12:24 2013 (r249083) @@ -1706,21 +1706,14 @@ device mvs device siis # -# The 'ATA' driver supports all ATA and ATAPI devices, including PC Card -# devices. You only need one "device ata" for it to find all +# The 'ATA' driver supports all legacy ATA/ATAPI controllers, including +# PC Card devices. You only need one "device ata" for it to find all # PCI and PC Card ATA/ATAPI devices on modern machines. # Alternatively, individual bus and chipset drivers may be chosen by using # the 'atacore' driver then selecting the drivers on a per vendor basis. # For example to build a system which only supports a VIA chipset, # omit 'ata' and include the 'atacore', 'atapci' and 'atavia' drivers. device ata -#device atadisk # ATA disk drives -#device ataraid # ATA RAID drives -#device atapicd # ATAPI CDROM drives -#device atapifd # ATAPI floppy drives -#device atapist # ATAPI tape drives -#device atapicam # emulate ATAPI devices as SCSI ditto via CAM - # needs CAM to be present (scbus & pass) # Modular ATA #device atacore # Core ATA functionality @@ -1770,15 +1763,9 @@ hint.ata.1.irq="15" # else the device numbers are dynamically allocated. # ATA_REQUEST_TIMEOUT: the number of seconds to wait for an ATA request # before timing out. -# ATA_CAM: Turn ata(4) subsystem controller drivers into cam(4) -# interface modules. This deprecates all ata(4) -# peripheral device drivers (atadisk, ataraid, atapicd, -# atapifd, atapist, atapicam) and all user-level APIs. -# cam(4) drivers and APIs will be connected instead. options ATA_STATIC_ID #options ATA_REQUEST_TIMEOUT=10 -options ATA_CAM # # Standard floppy disk controllers and floppy tapes, supports Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/conf/files Thu Apr 4 07:12:24 2013 (r249083) @@ -705,12 +705,6 @@ dev/ata/chipsets/ata-serverworks.c optio dev/ata/chipsets/ata-siliconimage.c optional ata pci | atasiliconimage | ataati dev/ata/chipsets/ata-sis.c optional ata pci | atasis dev/ata/chipsets/ata-via.c optional ata pci | atavia -dev/ata/ata-disk.c optional atadisk -dev/ata/ata-raid.c optional ataraid -dev/ata/atapi-cd.c optional atapicd -dev/ata/atapi-fd.c optional atapifd -dev/ata/atapi-tape.c optional atapist -dev/ata/atapi-cam.c optional atapicam # dev/ath/if_ath_pci.c optional ath_pci pci \ compile-with "${NORMAL_C} -I$S/dev/ath" Modified: head/sys/conf/files.sparc64 ============================================================================== --- head/sys/conf/files.sparc64 Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/conf/files.sparc64 Thu Apr 4 07:12:24 2013 (r249083) @@ -88,7 +88,7 @@ sparc64/pci/schizo.c optional pci sparc64/sbus/dma_sbus.c optional sbus sparc64/sbus/sbus.c optional sbus sparc64/sbus/lsi64854.c optional sbus -sparc64/sparc64/ata_machdep.c optional ada | atadisk | da +sparc64/sparc64/ata_machdep.c optional ada | da sparc64/sparc64/autoconf.c standard sparc64/sparc64/bus_machdep.c standard sparc64/sparc64/cache.c standard Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/conf/options Thu Apr 4 07:12:24 2013 (r249083) @@ -366,7 +366,6 @@ ISCSI_INITIATOR_DEBUG opt_iscsi_initiato ATA_STATIC_ID opt_ata.h ATA_NOPCI opt_ata.h ATA_REQUEST_TIMEOUT opt_ata.h -ATA_CAM opt_ata.h # Net stuff. ACCEPT_FILTER_DATA Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Thu Apr 4 05:47:50 2013 (r249082) +++ head/sys/dev/ata/ata-all.c Thu Apr 4 07:12:24 2013 (r249083) @@ -51,90 +51,33 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef ATA_CAM #include #include #include #include #include -#endif - -#ifndef ATA_CAM -/* device structure */ -static d_ioctl_t ata_ioctl; -static struct cdevsw ata_cdevsw = { - .d_version = D_VERSION, - .d_flags = D_NEEDGIANT, /* we need this as newbus isn't mpsafe */ - .d_ioctl = ata_ioctl, - .d_name = "ata", -}; -#endif /* prototypes */ -#ifndef ATA_CAM -static void ata_boot_attach(void); -static device_t ata_add_child(device_t, struct ata_device *, int); -#else static void ataaction(struct cam_sim *sim, union ccb *ccb); static void atapoll(struct cam_sim *sim); -#endif static void ata_conn_event(void *, int); -#ifndef ATA_CAM -static void bswap(int8_t *, int); -static void btrim(int8_t *, int); -static void bpack(int8_t *, int8_t *, int); -#endif static void ata_interrupt_locked(void *data); -#ifdef ATA_CAM static void ata_periodic_poll(void *data); -#endif /* global vars */ MALLOC_DEFINE(M_ATA, "ata_generic", "ATA driver generic layer"); int (*ata_raid_ioctl_func)(u_long cmd, caddr_t data) = NULL; -#ifndef ATA_CAM -struct intr_config_hook *ata_delayed_attach = NULL; -#endif devclass_t ata_devclass; uma_zone_t ata_request_zone; -uma_zone_t ata_composite_zone; -#ifndef ATA_CAM -int ata_wc = 1; -int ata_setmax = 0; -#endif int ata_dma_check_80pin = 1; -/* local vars */ -#ifndef ATA_CAM -static int ata_dma = 1; -static int atapi_dma = 1; -#endif - /* sysctl vars */ static SYSCTL_NODE(_hw, OID_AUTO, ata, CTLFLAG_RD, 0, "ATA driver parameters"); -#ifndef ATA_CAM -TUNABLE_INT("hw.ata.ata_dma", &ata_dma); -SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma, CTLFLAG_RDTUN, &ata_dma, 0, - "ATA disk DMA mode control"); -#endif TUNABLE_INT("hw.ata.ata_dma_check_80pin", &ata_dma_check_80pin); SYSCTL_INT(_hw_ata, OID_AUTO, ata_dma_check_80pin, CTLFLAG_RW, &ata_dma_check_80pin, 1, "Check for 80pin cable before setting ATA DMA mode"); -#ifndef ATA_CAM -TUNABLE_INT("hw.ata.atapi_dma", &atapi_dma); -SYSCTL_INT(_hw_ata, OID_AUTO, atapi_dma, CTLFLAG_RDTUN, &atapi_dma, 0, - "ATAPI device DMA mode control"); -TUNABLE_INT("hw.ata.wc", &ata_wc); -SYSCTL_INT(_hw_ata, OID_AUTO, wc, CTLFLAG_RDTUN, &ata_wc, 0, - "ATA disk write caching"); -TUNABLE_INT("hw.ata.setmax", &ata_setmax); -SYSCTL_INT(_hw_ata, OID_AUTO, setmax, CTLFLAG_RDTUN, &ata_setmax, 0, - "ATA disk set max native address"); -#endif -#ifdef ATA_CAM FEATURE(ata_cam, "ATA devices are accessed through the cam(4) driver"); -#endif /* * newbus device interface related functions @@ -150,12 +93,10 @@ ata_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); int error, rid; -#ifdef ATA_CAM struct cam_devq *devq; const char *res; char buf[64]; int i, mode; -#endif /* check that we have a virgin channel to attach */ if (ch->r_irq) @@ -166,13 +107,7 @@ ata_attach(device_t dev) ch->state = ATA_IDLE; bzero(&ch->state_mtx, sizeof(struct mtx)); mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); -#ifndef ATA_CAM - bzero(&ch->queue_mtx, sizeof(struct mtx)); - mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF); - TAILQ_INIT(&ch->ata_queue); -#endif TASK_INIT(&ch->conntask, 0, ata_conn_event, dev); -#ifdef ATA_CAM for (i = 0; i < 16; i++) { ch->user[i].revision = 0; snprintf(buf, sizeof(buf), "dev%d.sata_rev", i); @@ -207,15 +142,6 @@ ata_attach(device_t dev) ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ; } callout_init(&ch->poll_callout, 1); -#endif - -#ifndef ATA_CAM - /* reset the controller HW, the channel and device(s) */ - while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) - pause("ataatch", 1); - ATA_RESET(dev); - ATA_LOCKING(dev, ATA_LF_UNLOCK); -#endif /* allocate DMA resources if DMA HW present*/ if (ch->dma.alloc) @@ -236,12 +162,6 @@ ata_attach(device_t dev) return error; } -#ifndef ATA_CAM - /* probe and attach devices on this channel unless we are in early boot */ - if (!ata_delayed_attach) - ata_identify(dev); - return (0); -#else if (ch->flags & ATA_PERIODIC_POLL) callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); mtx_lock(&ch->state_mtx); @@ -286,17 +206,12 @@ err1: if (ch->flags & ATA_PERIODIC_POLL) callout_drain(&ch->poll_callout); return (error); -#endif } int ata_detach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); -#ifndef ATA_CAM - device_t *children; - int nchildren, i; -#endif /* check that we have a valid channel to detach */ if (!ch->r_irq) @@ -306,23 +221,11 @@ ata_detach(device_t dev) mtx_lock(&ch->state_mtx); ch->state |= ATA_STALL_QUEUE; mtx_unlock(&ch->state_mtx); -#ifdef ATA_CAM if (ch->flags & ATA_PERIODIC_POLL) callout_drain(&ch->poll_callout); -#endif -#ifndef ATA_CAM - /* detach & delete all children */ - if (!device_get_children(dev, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) - if (children[i]) - device_delete_child(dev, children[i]); - free(children, M_TEMP); - } -#endif taskqueue_drain(taskqueue_thread, &ch->conntask); -#ifdef ATA_CAM mtx_lock(&ch->state_mtx); xpt_async(AC_LOST_DEVICE, ch->path, NULL); xpt_free_path(ch->path); @@ -330,7 +233,6 @@ ata_detach(device_t dev) cam_sim_free(ch->sim, /*free_devq*/TRUE); ch->sim = NULL; mtx_unlock(&ch->state_mtx); -#endif /* release resources */ bus_teardown_intr(dev, ch->r_irq, ch->ih); @@ -342,9 +244,6 @@ ata_detach(device_t dev) ch->dma.free(dev); mtx_destroy(&ch->state_mtx); -#ifndef ATA_CAM - mtx_destroy(&ch->queue_mtx); -#endif return 0; } @@ -352,7 +251,6 @@ static void ata_conn_event(void *context, int dummy) { device_t dev = (device_t)context; -#ifdef ATA_CAM struct ata_channel *ch = device_get_softc(dev); union ccb *ccb; @@ -372,9 +270,6 @@ ata_conn_event(void *context, int dummy) } xpt_rescan(ccb); mtx_unlock(&ch->state_mtx); -#else - ata_reinit(dev); -#endif } int @@ -382,94 +277,7 @@ ata_reinit(device_t dev) { struct ata_channel *ch = device_get_softc(dev); struct ata_request *request; -#ifndef ATA_CAM - device_t *children; - int nchildren, i; - - /* check that we have a valid channel to reinit */ - if (!ch || !ch->r_irq) - return ENXIO; - - if (bootverbose) - device_printf(dev, "reiniting channel ..\n"); - - /* poll for locking the channel */ - while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) - pause("atarini", 1); - - /* catch eventual request in ch->running */ - mtx_lock(&ch->state_mtx); - if (ch->state & ATA_STALL_QUEUE) { - /* Recursive reinits and reinits during detach prohobited. */ - mtx_unlock(&ch->state_mtx); - return (ENXIO); - } - if ((request = ch->running)) - callout_stop(&request->callout); - ch->running = NULL; - - /* unconditionally grap the channel lock */ - ch->state |= ATA_STALL_QUEUE; - mtx_unlock(&ch->state_mtx); - - /* reset the controller HW, the channel and device(s) */ - ATA_RESET(dev); - - /* reinit the children and delete any that fails */ - if (!device_get_children(dev, &children, &nchildren)) { - mtx_lock(&Giant); /* newbus suckage it needs Giant */ - for (i = 0; i < nchildren; i++) { - /* did any children go missing ? */ - if (children[i] && device_is_attached(children[i]) && - ATA_REINIT(children[i])) { - /* - * if we had a running request and its device matches - * this child we need to inform the request that the - * device is gone. - */ - if (request && request->dev == children[i]) { - request->result = ENXIO; - device_printf(request->dev, "FAILURE - device detached\n"); - - /* if not timeout finish request here */ - if (!(request->flags & ATA_R_TIMEOUT)) - ata_finish(request); - request = NULL; - } - device_delete_child(dev, children[i]); - } - } - free(children, M_TEMP); - mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ - } - - /* if we still have a good request put it on the queue again */ - if (request && !(request->flags & ATA_R_TIMEOUT)) { - device_printf(request->dev, - "WARNING - %s requeued due to channel reset", - ata_cmd2str(request)); - if (!(request->flags & (ATA_R_ATAPI | ATA_R_CONTROL))) - printf(" LBA=%ju", request->u.ata.lba); - printf("\n"); - request->flags |= ATA_R_REQUEUE; - ata_queue_request(request); - } - - /* we're done release the channel for new work */ - mtx_lock(&ch->state_mtx); - ch->state = ATA_IDLE; - mtx_unlock(&ch->state_mtx); - ATA_LOCKING(dev, ATA_LF_UNLOCK); - - /* Add new children. */ -/* ata_identify(dev); */ - - if (bootverbose) - device_printf(dev, "reinit done ..\n"); - /* kick off requests on the queue */ - ata_start(dev); -#else xpt_freeze_simq(ch->sim, 1); if ((request = ch->running)) { ch->running = NULL; @@ -486,7 +294,6 @@ ata_reinit(device_t dev) /* Tell the XPT about the event */ xpt_async(AC_BUS_RESET, ch->path, NULL); xpt_release_simq(ch->sim, TRUE); -#endif return(0); } @@ -499,7 +306,6 @@ ata_suspend(device_t dev) if (!dev || !(ch = device_get_softc(dev))) return ENXIO; -#ifdef ATA_CAM if (ch->flags & ATA_PERIODIC_POLL) callout_drain(&ch->poll_callout); mtx_lock(&ch->state_mtx); @@ -507,20 +313,6 @@ ata_suspend(device_t dev) while (ch->state != ATA_IDLE) msleep(ch, &ch->state_mtx, PRIBIO, "atasusp", hz/100); mtx_unlock(&ch->state_mtx); -#else - /* wait for the channel to be IDLE or detached before suspending */ - while (ch->r_irq) { - mtx_lock(&ch->state_mtx); - if (ch->state == ATA_IDLE) { - ch->state = ATA_ACTIVE; - mtx_unlock(&ch->state_mtx); - break; - } - mtx_unlock(&ch->state_mtx); - tsleep(ch, PRIBIO, "atasusp", hz/10); - } - ATA_LOCKING(dev, ATA_LF_UNLOCK); -#endif return(0); } @@ -534,36 +326,25 @@ ata_resume(device_t dev) if (!dev || !(ch = device_get_softc(dev))) return ENXIO; -#ifdef ATA_CAM mtx_lock(&ch->state_mtx); error = ata_reinit(dev); xpt_release_simq(ch->sim, TRUE); mtx_unlock(&ch->state_mtx); if (ch->flags & ATA_PERIODIC_POLL) callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); -#else - /* reinit the devices, we dont know what mode/state they are in */ - error = ata_reinit(dev); - /* kick off requests on the queue */ - ata_start(dev); -#endif return error; } void ata_interrupt(void *data) { -#ifdef ATA_CAM struct ata_channel *ch = (struct ata_channel *)data; mtx_lock(&ch->state_mtx); xpt_batch_start(ch->sim); -#endif ata_interrupt_locked(data); -#ifdef ATA_CAM xpt_batch_done(ch->sim); mtx_unlock(&ch->state_mtx); -#endif } static void @@ -572,9 +353,6 @@ ata_interrupt_locked(void *data) struct ata_channel *ch = (struct ata_channel *)data; struct ata_request *request; -#ifndef ATA_CAM - mtx_lock(&ch->state_mtx); -#endif do { /* ignore interrupt if its not for us */ if (ch->hw.status && !ch->hw.status(ch->dev)) @@ -600,22 +378,12 @@ ata_interrupt_locked(void *data) ch->running = NULL; if (ch->state == ATA_ACTIVE) ch->state = ATA_IDLE; -#ifdef ATA_CAM ata_cam_end_transaction(ch->dev, request); -#else - mtx_unlock(&ch->state_mtx); - ATA_LOCKING(ch->dev, ATA_LF_UNLOCK); - ata_finish(request); -#endif return; } } while (0); -#ifndef ATA_CAM - mtx_unlock(&ch->state_mtx); -#endif } -#ifdef ATA_CAM static void ata_periodic_poll(void *data) { @@ -624,7 +392,6 @@ ata_periodic_poll(void *data) callout_reset(&ch->poll_callout, hz, ata_periodic_poll, ch); ata_interrupt(ch); } -#endif void ata_print_cable(device_t dev, u_int8_t *who) @@ -633,468 +400,9 @@ ata_print_cable(device_t dev, u_int8_t * "DMA limited to UDMA33, %s found non-ATA66 cable\n", who); } -#ifndef ATA_CAM -int -ata_check_80pin(device_t dev, int mode) -{ - struct ata_device *atadev = device_get_softc(dev); - - if (!ata_dma_check_80pin) { - if (bootverbose) - device_printf(dev, "Skipping 80pin cable check\n"); - return mode; - } - - if (mode > ATA_UDMA2 && !(atadev->param.hwres & ATA_CABLE_ID)) { - ata_print_cable(dev, "device"); - mode = ATA_UDMA2; - } - return mode; -} -#endif - -#ifndef ATA_CAM -void -ata_setmode(device_t dev) -{ - struct ata_channel *ch = device_get_softc(device_get_parent(dev)); - struct ata_device *atadev = device_get_softc(dev); - int error, mode, pmode; - - mode = atadev->mode; - do { - pmode = mode = ata_limit_mode(dev, mode, ATA_DMA_MAX); - mode = ATA_SETMODE(device_get_parent(dev), atadev->unit, mode); - if ((ch->flags & (ATA_CHECKS_CABLE | ATA_SATA)) == 0) - mode = ata_check_80pin(dev, mode); - } while (pmode != mode); /* Interate till successfull negotiation. */ - error = ata_controlcmd(dev, ATA_SETFEATURES, ATA_SF_SETXFER, 0, mode); - if (bootverbose) - device_printf(dev, "%ssetting %s\n", - (error) ? "FAILURE " : "", ata_mode2str(mode)); - atadev->mode = mode; -} -#endif - -/* - * device related interfaces - */ -#ifndef ATA_CAM -static int -ata_ioctl(struct cdev *dev, u_long cmd, caddr_t data, - int32_t flag, struct thread *td) -{ - device_t device, *children; - struct ata_ioc_devices *devices = (struct ata_ioc_devices *)data; - int *value = (int *)data; - int i, nchildren, error = ENOTTY; - - switch (cmd) { - case IOCATAGMAXCHANNEL: - /* In case we have channel 0..n this will return n+1. */ - *value = devclass_get_maxunit(ata_devclass); - error = 0; - break; - - case IOCATAREINIT: - if (*value >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) - return ENXIO; - error = ata_reinit(device); - break; - - case IOCATAATTACH: - if (*value >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) - return ENXIO; - error = DEVICE_ATTACH(device); - break; - - case IOCATADETACH: - if (*value >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, *value)) || - !device_is_attached(device)) - return ENXIO; - error = DEVICE_DETACH(device); - break; - - case IOCATADEVICES: - if (devices->channel >= devclass_get_maxunit(ata_devclass) || - !(device = devclass_get_device(ata_devclass, devices->channel)) || - !device_is_attached(device)) - return ENXIO; - bzero(devices->name[0], 32); - bzero(&devices->params[0], sizeof(struct ata_params)); - bzero(devices->name[1], 32); - bzero(&devices->params[1], sizeof(struct ata_params)); - if (!device_get_children(device, &children, &nchildren)) { - for (i = 0; i < nchildren; i++) { - if (children[i] && device_is_attached(children[i])) { - struct ata_device *atadev = device_get_softc(children[i]); - - if (atadev->unit == ATA_MASTER) { /* XXX SOS PM */ - strncpy(devices->name[0], - device_get_nameunit(children[i]), 32); - bcopy(&atadev->param, &devices->params[0], - sizeof(struct ata_params)); - } - if (atadev->unit == ATA_SLAVE) { /* XXX SOS PM */ - strncpy(devices->name[1], - device_get_nameunit(children[i]), 32); - bcopy(&atadev->param, &devices->params[1], - sizeof(struct ata_params)); - } - } - } - free(children, M_TEMP); - error = 0; - } - else - error = ENODEV; - break; - - default: - if (ata_raid_ioctl_func) - error = ata_raid_ioctl_func(cmd, data); - } - return error; -} -#endif - -#ifndef ATA_CAM -int -ata_device_ioctl(device_t dev, u_long cmd, caddr_t data) -{ - struct ata_device *atadev = device_get_softc(dev); - struct ata_channel *ch = device_get_softc(device_get_parent(dev)); - struct ata_ioc_request *ioc_request = (struct ata_ioc_request *)data; - struct ata_params *params = (struct ata_params *)data; - int *mode = (int *)data; - struct ata_request *request; - caddr_t buf; - int error; - - switch (cmd) { - case IOCATAREQUEST: - if (ioc_request->count > - (ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS)) { - return (EFBIG); - } - if (!(buf = malloc(ioc_request->count, M_ATA, M_NOWAIT))) { - return ENOMEM; - } - if (!(request = ata_alloc_request())) { - free(buf, M_ATA); - return ENOMEM; - } - request->dev = atadev->dev; - if (ioc_request->flags & ATA_CMD_WRITE) { - error = copyin(ioc_request->data, buf, ioc_request->count); - if (error) { - free(buf, M_ATA); - ata_free_request(request); - return error; - } - } - if (ioc_request->flags & ATA_CMD_ATAPI) { - request->flags = ATA_R_ATAPI; - bcopy(ioc_request->u.atapi.ccb, request->u.atapi.ccb, 16); - } - else { - request->u.ata.command = ioc_request->u.ata.command; - request->u.ata.feature = ioc_request->u.ata.feature; - request->u.ata.lba = ioc_request->u.ata.lba; - request->u.ata.count = ioc_request->u.ata.count; - } - request->timeout = ioc_request->timeout; - request->data = buf; - request->bytecount = ioc_request->count; - request->transfersize = request->bytecount; - if (ioc_request->flags & ATA_CMD_CONTROL) - request->flags |= ATA_R_CONTROL; - if (ioc_request->flags & ATA_CMD_READ) - request->flags |= ATA_R_READ; - if (ioc_request->flags & ATA_CMD_WRITE) - request->flags |= ATA_R_WRITE; - ata_queue_request(request); - if (request->flags & ATA_R_ATAPI) { - bcopy(&request->u.atapi.sense, &ioc_request->u.atapi.sense, - sizeof(struct atapi_sense)); - } - else { - ioc_request->u.ata.command = request->u.ata.command; - ioc_request->u.ata.feature = request->u.ata.feature; - ioc_request->u.ata.lba = request->u.ata.lba; - ioc_request->u.ata.count = request->u.ata.count; - } - ioc_request->error = request->result; - if (ioc_request->flags & ATA_CMD_READ) - error = copyout(buf, ioc_request->data, ioc_request->count); - else - error = 0; - free(buf, M_ATA); - ata_free_request(request); - return error; - - case IOCATAGPARM: - ata_getparam(atadev, 0); - bcopy(&atadev->param, params, sizeof(struct ata_params)); - return 0; - - case IOCATASMODE: - atadev->mode = *mode; - ata_setmode(dev); - return 0; - - case IOCATAGMODE: - *mode = atadev->mode | - (ATA_GETREV(device_get_parent(dev), atadev->unit) << 8); - return 0; - case IOCATASSPINDOWN: - atadev->spindown = *mode; - return 0; - case IOCATAGSPINDOWN: - *mode = atadev->spindown; - return 0; - default: - return ENOTTY; - } -} -#endif - -#ifndef ATA_CAM -static void -ata_boot_attach(void) -{ - struct ata_channel *ch; - int ctlr; - - mtx_lock(&Giant); /* newbus suckage it needs Giant */ - - /* kick off probe and attach on all channels */ - for (ctlr = 0; ctlr < devclass_get_maxunit(ata_devclass); ctlr++) { - if ((ch = devclass_get_softc(ata_devclass, ctlr))) { - ata_identify(ch->dev); - } - } - - /* release the hook that got us here, we are only needed once during boot */ - if (ata_delayed_attach) { - config_intrhook_disestablish(ata_delayed_attach); - free(ata_delayed_attach, M_TEMP); - ata_delayed_attach = NULL; - } - - mtx_unlock(&Giant); /* newbus suckage dealt with, release Giant */ -} -#endif - /* * misc support functions */ -#ifndef ATA_CAM -static device_t -ata_add_child(device_t parent, struct ata_device *atadev, int unit) -{ - device_t child; - - if ((child = device_add_child(parent, (unit < 0) ? NULL : "ad", unit))) { - device_set_softc(child, atadev); - device_quiet(child); - atadev->dev = child; - atadev->max_iosize = DEV_BSIZE; - atadev->mode = ATA_PIO_MAX; - } - return child; -} -#endif - -#ifndef ATA_CAM -int -ata_getparam(struct ata_device *atadev, int init) -{ - struct ata_channel *ch = device_get_softc(device_get_parent(atadev->dev)); - struct ata_request *request; - const char *res; - char buf[64]; - u_int8_t command = 0; - int error = ENOMEM, retries = 2, mode = -1; - - if (ch->devices & (ATA_ATA_MASTER << atadev->unit)) - command = ATA_ATA_IDENTIFY; - if (ch->devices & (ATA_ATAPI_MASTER << atadev->unit)) - command = ATA_ATAPI_IDENTIFY; - if (!command) - return ENXIO; - - while (retries-- > 0 && error) { - if (!(request = ata_alloc_request())) - break; - request->dev = atadev->dev; - request->timeout = 1; - request->retries = 0; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 07:19:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6A4B9326 for ; Thu, 4 Apr 2013 07:19:02 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-x233.google.com (mail-la0-x233.google.com [IPv6:2a00:1450:4010:c03::233]) by mx1.freebsd.org (Postfix) with ESMTP id DF1FDA57 for ; Thu, 4 Apr 2013 07:19:01 +0000 (UTC) Received: by mail-la0-f51.google.com with SMTP id fo13so2208059lab.10 for ; Thu, 04 Apr 2013 00:19:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:cc :subject:references:in-reply-to:openpgp:content-type :x-gm-message-state; bh=f6pYlbOIWMDK+dN6WtNx4j3oPd4R8JsxIZCmAgdoVOQ=; b=btTlsM1xV6w3obVGGw2ROeDh0zmEGl2X1Y4YaLJhE5gicFG9LnYNK2kEMHn61mN8Tr kB0QSzLVvuIuAqYgNWs0HUPUwO8Jyi+rxrKgb0n0eoyBuJyAKcZR5SYj0eZr5FaHfsEX KyY3jkCpJT7UIVU0B2dXEXbk3EFeAKRBaoZWGapbGQVdim8/Gn1kOr3MnM0ivv6LhzK0 L+C/3UdayZH6HAQlGhpgMD7qVmqjQbQamC0QYZeH2tb8i+v0PLp8GoANnw1r+GGbprQp 5Jyxmjxf2aMCAarbHs6WmHol7J2BRdY1Jw9h2qMSX9hfKkE3BoLnorfyg09eKLhQ4Qfo f8WQ== X-Received: by 10.112.100.166 with SMTP id ez6mr2707159lbb.86.1365059940681; Thu, 04 Apr 2013 00:19:00 -0700 (PDT) Received: from [192.168.1.2] ([89.169.163.3]) by mx.google.com with ESMTPS id x9sm3470076lbi.15.2013.04.04.00.18.59 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Apr 2013 00:19:00 -0700 (PDT) Message-ID: <515D295A.3020407@freebsd.org> Date: Thu, 04 Apr 2013 11:18:50 +0400 From: Andrey Chernov User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130307 Thunderbird/17.0.4 MIME-Version: 1.0 To: d@delphij.net Subject: Re: svn commit: r249035 - head/lib/libc/stdlib References: <201304022341.r32NfL8L096954@svn.freebsd.org> <20130403165736.F819@besplex.bde.org> <515BDADF.8060303@freebsd.org> <515D0E70.8050701@delphij.net> In-Reply-To: <515D0E70.8050701@delphij.net> OpenPGP: id=964474DD Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="----enig2VJSJGFXUBPAQWALRLPIA" X-Gm-Message-State: ALoCoQnrqM2WsPGl6febgoGCXB1Tf551P3d4fGsLKvfJGJowa0aH3Tcug2johB7qqWsl/cot9i2h Cc: src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, Xin LI , Bruce Evans , svn-src-head@FreeBSD.org, Xin Li 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, 04 Apr 2013 07:19:02 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) ------enig2VJSJGFXUBPAQWALRLPIA Content-Type: multipart/mixed; boundary="------------060206030706080906020705" This is a multi-part message in MIME format. --------------060206030706080906020705 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: quoted-printable On 04.04.2013 9:24, Xin Li wrote: > True, but keep mind that neither random(3) nor rand(3) is intended to > satisfy cryptographically secure needs, and I don't see a reason why > kernel arc4 can not be improved. Danger level here is not to get something cryptographically less secure, but even much probability to get the same sequence after boot. > To be honest, I don't personally have access to the archive (nor I'm > aware there was one, the arc4 change you are talking about may predate > my membership on secteam@ by the way). >=20 > How about sending the patch again and let's see how we can work it out?= Ok, patches are attached, one with atomic, and another one - without. They try to reseed arc4 immediately after we have enough of entropy. Only one of them is needed, not both. Atomic version works 100% right and non-atomic may cause chained arc4 reseed in edge case, which not harms arc4 itself, just takes time. --------------060206030706080906020705 Content-Type: text/plain; charset=windows-1251; name="atomic.patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="atomic.patch.txt" --- sys/libkern.h.old 2012-01-16 07:15:12.000000000 +0400 +++ sys/libkern.h 2012-01-28 08:49:19.000000000 +0400 @@ -70,6 +70,11 @@ static __inline int abs(int a) { return=20 static __inline long labs(long a) { return (a < 0 ? -a : a); } static __inline quad_t qabs(quad_t a) { return (a < 0 ? -a : a); } =20 +#define ARC4_ENTR_NONE 0 /* Don't have entropy yet. */ +#define ARC4_ENTR_HAVE 1 /* Have entropy. */ +#define ARC4_ENTR_SEED 2 /* Reseeding. */ +extern int arc4rand_iniseed_state; + /* Prototypes for non-quad routines. */ struct malloc_type; uint32_t arc4random(void); --- dev/random/randomdev_soft.c.old 2011-03-02 01:42:19.000000000 +0300 +++ dev/random/randomdev_soft.c 2012-01-28 08:48:22.000000000 +0400 @@ -366,6 +366,8 @@ random_yarrow_unblock(void) selwakeuppri(&random_systat.rsel, PUSER); wakeup(&random_systat); } + (void)atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_NONE, + ARC4_ENTR_HAVE); } =20 static int --- libkern/arc4random.c.old 2008-08-08 01:51:09.000000000 +0400 +++ libkern/arc4random.c 2012-01-28 08:51:12.000000000 +0400 @@ -24,6 +24,8 @@ __FBSDID("$FreeBSD: src/sys/libkern/arc4 #define ARC4_RESEED_SECONDS 300 #define ARC4_KEYBYTES (256 / 8) =20 +int arc4rand_iniseed_state =3D ARC4_ENTR_NONE; + static u_int8_t arc4_i, arc4_j; static int arc4_numruns =3D 0; static u_int8_t arc4_sbox[256]; @@ -130,7 +132,8 @@ arc4rand(void *ptr, u_int len, int resee struct timeval tv; =20 getmicrouptime(&tv); - if (reseed ||=20 + if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, + ARC4_ENTR_SEED) || reseed || (arc4_numruns > ARC4_RESEED_BYTES) || (tv.tv_sec > arc4_t_reseed)) arc4_randomstir(); --------------060206030706080906020705 Content-Type: text/plain; charset=windows-1251; name="non-atomic.patch.txt" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="non-atomic.patch.txt" --- sys/libkern.h.bak 2012-01-16 07:15:12.000000000 +0400 +++ sys/libkern.h 2012-01-25 17:31:49.000000000 +0400 @@ -72,6 +72,7 @@ static __inline quad_t qabs(quad_t a) {=20 =20 /* Prototypes for non-quad routines. */ struct malloc_type; +extern int arc4rand_iniseed_state; uint32_t arc4random(void); void arc4rand(void *ptr, u_int len, int reseed); int bcmp(const void *, const void *, size_t); --- dev/random/randomdev_soft.c.bak 2011-03-02 01:42:19.000000000 +0300 +++ dev/random/randomdev_soft.c 2012-01-25 17:28:19.000000000 +0400 @@ -366,6 +366,8 @@ random_yarrow_unblock(void) selwakeuppri(&random_systat.rsel, PUSER); wakeup(&random_systat); } + if (arc4rand_iniseed_state =3D=3D 0) + arc4rand_iniseed_state =3D 1; } =20 static int --- libkern/arc4random.c.bak 2008-08-08 01:51:09.000000000 +0400 +++ libkern/arc4random.c 2012-01-25 17:30:30.000000000 +0400 @@ -24,6 +24,8 @@ __FBSDID("$FreeBSD: src/sys/libkern/arc4 #define ARC4_RESEED_SECONDS 300 #define ARC4_KEYBYTES (256 / 8) =20 +int arc4rand_iniseed_state =3D 0; + static u_int8_t arc4_i, arc4_j; static int arc4_numruns =3D 0; static u_int8_t arc4_sbox[256]; @@ -74,6 +76,8 @@ arc4_randomstir (void) /* Reset for next reseed cycle. */ arc4_t_reseed =3D tv_now.tv_sec + ARC4_RESEED_SECONDS; arc4_numruns =3D 0; + if (arc4rand_iniseed_state =3D=3D 1) + arc4rand_iniseed_state =3D -1; =20 /* * Throw away the first N words of output, as suggested in the @@ -130,7 +134,7 @@ arc4rand(void *ptr, u_int len, int resee struct timeval tv; =20 getmicrouptime(&tv); - if (reseed ||=20 + if (reseed || arc4rand_iniseed_state =3D=3D 1 || (arc4_numruns > ARC4_RESEED_BYTES) || (tv.tv_sec > arc4_t_reseed)) arc4_randomstir(); --------------060206030706080906020705-- ------enig2VJSJGFXUBPAQWALRLPIA 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.13 (MingW32) iEYEARECAAYFAlFdKWMACgkQVg5YK5ZEdN3qowCeMwh5r/DBs9doWBnaKRshd/yZ uIEAn0746bHQ/3TmCNotRrHTqnKf5jo1 =If4t -----END PGP SIGNATURE----- ------enig2VJSJGFXUBPAQWALRLPIA-- From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 07:36:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6108B67A; Thu, 4 Apr 2013 07:36:23 +0000 (UTC) (envelope-from zeising@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 1839DB27; Thu, 4 Apr 2013 07:36:23 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 92CBD40002; Thu, 4 Apr 2013 09:36:21 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 88A8F40006; Thu, 4 Apr 2013 09:36:21 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (h-45-105.a163.priv.bahnhof.se [94.254.45.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id 60DFA40002; Thu, 4 Apr 2013 09:36:21 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3ZhGDj0Bpxz8ggx; Thu, 4 Apr 2013 09:36:21 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([10.1.0.3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [10.1.0.6]) (amavisd-new, port 10025) with ESMTPS id s_UX_XIYP9VS; Thu, 4 Apr 2013 09:36:18 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [IPv6:2001:470:dca9:0:1::4]) by mx.daemonic.se (Postfix) with ESMTPS id 3ZhGDf68KZz8ggv; Thu, 4 Apr 2013 09:36:18 +0200 (CEST) Received: from [IPv6:::1] (celes.daemonic.se [IPv6:2001:470:dca9:1::3]) by mail.daemonic.se (Postfix) with ESMTPSA id 3ZhGDf3s85z9Ctj; Thu, 4 Apr 2013 09:36:18 +0200 (CEST) Message-ID: <515D2D6D.5030409@daemonic.se> Date: Thu, 04 Apr 2013 09:36:13 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Alexander Motin Subject: Re: svn commit: r249083 - in head: rescue/rescue sbin sbin/atacontrol share/man/man4 sys/amd64/conf sys/arm/conf sys/cam/ata sys/conf sys/dev/ata sys/dev/ata/chipsets sys/i386/conf sys/ia64/conf sys/mi... References: <201304040712.r347COpN056243@svn.freebsd.org> In-Reply-To: <201304040712.r347COpN056243@svn.freebsd.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 130403-1, 2013-04-03), Outbound message X-Antivirus-Status: Clean X-Virus-Scanned: ClamAV using ClamSMTP 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: Thu, 04 Apr 2013 07:36:23 -0000 On 2013-04-04 09:12, Alexander Motin wrote: > > Deleted: > head/sbin/atacontrol/ > head/share/man/man4/atapicam.4 > head/share/man/man4/ataraid.4 Those three should probably be added to ObsoleteFiles.inc as well. Regards! -- Niclas From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 07:57:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EA2ACAC6; Thu, 4 Apr 2013 07:57:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DE70CD0F; Thu, 4 Apr 2013 07:57:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r347vW6R068519; Thu, 4 Apr 2013 07:57:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r347vWc4068518; Thu, 4 Apr 2013 07:57:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304040757.r347vWc4068518@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 07:57:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249084 - 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: Thu, 04 Apr 2013 07:57:33 -0000 Author: mav Date: Thu Apr 4 07:57:32 2013 New Revision: 249084 URL: http://svnweb.freebsd.org/changeset/base/249084 Log: Remove obsolete files of the legacy ATA stack. Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 4 07:12:24 2013 (r249083) +++ head/ObsoleteFiles.inc Thu Apr 4 07:57:32 2013 (r249084) @@ -38,6 +38,11 @@ # xargs -n1 | sort | uniq -d; # done +# 20130404: legacy ATA stack removed +OLD_FILES+=sbin/atacontrol +OLD_FILES+=usr/share/man/man8/atacontrol.8.gz +OLD_FILES+=usr/share/man/man4/atapicam.4.gz +OLD_FILES+=usr/share/man/man4/ataraid.4.gz # 20130316: vinum.4 removed OLD_FILES+=usr/share/man/man4/vinum.4.gz # 20130312: fortunes-o removed From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 08:21:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C34DF404; Thu, 4 Apr 2013 08:21:57 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B585DE4C; Thu, 4 Apr 2013 08:21:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r348Lvu8076595; Thu, 4 Apr 2013 08:21:57 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r348Lup5076592; Thu, 4 Apr 2013 08:21:56 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304040821.r348Lup5076592@svn.freebsd.org> From: Adrian Chadd Date: Thu, 4 Apr 2013 08:21:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249085 - 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: Thu, 04 Apr 2013 08:21:57 -0000 Author: adrian Date: Thu Apr 4 08:21:56 2013 New Revision: 249085 URL: http://svnweb.freebsd.org/changeset/base/249085 Log: Fix the busdma logic to work with EDMA chipsets when using bounce buffers (ie, >4GB on amd64.) The underlying problem was that PREREAD doesn't sync the mbuf with the DMA memory (ie, bounce buffer), so the bounce buffer may have had stale information. Thus it was always considering the buffer completed and things just went off the rails. This change does the following: * Make ath_rx_pkt() always consume the mbuf somehow; it no longer passes error mbufs (eg CRC errors, crypt errors, etc) back up to the RX path to recycle. This means that a new mbuf is always allocated each time, but it's cleaner. * Push the RX buffer map/unmap to occur in the RX path, not ath_rx_pkt(). Thus, ath_rx_pkt() now assumes (a) it has to consume the mbuf somehow, and (b) that it's already been unmapped and synced. * For the legacy path, the descriptor isn't mapped, it comes out of coherent, DMA memory anyway. So leave it there. * For the EDMA path, the RX descriptor has to be cleared before its passed to the hardware, so that when we check with a POSTREAD sync, we actually get either a blank (not finished) or a filled out descriptor (finished.) Otherwise we get stale data in the DMA memory. * .. so, for EDMA RX path, we need PREREAD|PREWRITE to sync the data -> DMA memory, then POSTREAD|POSTWRITE to finish syncing the DMA memory -> data. * Whilst we're here, make sure that in EDMA buffer setup (ie, bzero'ing the descriptor part) is done before the mbuf is map/synched. NOTE: there's been a lot of commits besides this one with regards to tidying up the busdma handling in ath(4). Please check the recent commit history. Discussed with and thanks to: scottl Tested: * AR5416 (non-EDMA) on i386, with the DMA tag for the driver set to 2^^30, not 2^^32, STA * AR9580 (EDMA) on i386, as above, STA * User - tested AR9380 on amd64 with 32GB RAM. PR: kern/177530 Modified: head/sys/dev/ath/if_ath_rx.c head/sys/dev/ath/if_ath_rx.h head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx.c ============================================================================== --- head/sys/dev/ath/if_ath_rx.c Thu Apr 4 07:57:32 2013 (r249084) +++ head/sys/dev/ath/if_ath_rx.c Thu Apr 4 08:21:56 2013 (r249085) @@ -502,12 +502,21 @@ ath_handle_micerror(struct ieee80211com } } +/* + * Process a single packet. + * + * The mbuf must already be synced, unmapped and removed from bf->bf_m + * by this stage. + * + * The mbuf must be consumed by this routine - either passed up the + * net80211 stack, put on the holding queue, or freed. + */ int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, - uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf) + uint64_t tsf, int nf, HAL_RX_QUEUE qtype, struct ath_buf *bf, + struct mbuf *m) { struct ath_hal *ah = sc->sc_ah; - struct mbuf *m = bf->bf_m; uint64_t rstamp; int len, type; struct ifnet *ifp = sc->sc_ifp; @@ -548,10 +557,6 @@ ath_rx_pkt(struct ath_softc *sc, struct /* Process DFS radar events */ if ((rs->rs_phyerr == HAL_PHYERR_RADAR) || (rs->rs_phyerr == HAL_PHYERR_FALSE_RADAR_EXT)) { - /* Since we're touching the frame data, sync it */ - bus_dmamap_sync(sc->sc_dmat, - bf->bf_dmamap, - BUS_DMASYNC_POSTREAD); /* Now pass it to the radar processing code */ ath_dfs_process_phy_err(sc, m, rstamp, rs); } @@ -593,9 +598,6 @@ ath_rx_pkt(struct ath_softc *sc, struct /* XXX frag's and qos frames */ len = rs->rs_datalen; if (len >= sizeof (struct ieee80211_frame)) { - bus_dmamap_sync(sc->sc_dmat, - bf->bf_dmamap, - BUS_DMASYNC_POSTREAD); ath_handle_micerror(ic, mtod(m, struct ieee80211_frame *), sc->sc_splitmic ? @@ -619,35 +621,20 @@ rx_error: */ if (ieee80211_radiotap_active(ic) && (rs->rs_status & sc->sc_monpass)) { - bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, - BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); /* NB: bpf needs the mbuf length setup */ len = rs->rs_datalen; m->m_pkthdr.len = m->m_len = len; - bf->bf_m = NULL; ath_rx_tap(ifp, m, rs, rstamp, nf); #ifdef ATH_ENABLE_RADIOTAP_VENDOR_EXT ath_rx_tap_vendor(ifp, m, rs, rstamp, nf); #endif /* ATH_ENABLE_RADIOTAP_VENDOR_EXT */ ieee80211_radiotap_rx_all(ic, m); - m_freem(m); } /* XXX pass MIC errors up for s/w reclaculation */ + m_freem(m); m = NULL; goto rx_next; } rx_accept: - /* - * Sync and unmap the frame. At this point we're - * committed to passing the mbuf somewhere so clear - * bf_m; this means a new mbuf must be allocated - * when the rx descriptor is setup again to receive - * another frame. - */ - bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); - bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); - bf->bf_m = NULL; - len = rs->rs_datalen; m->m_len = len; @@ -665,6 +652,7 @@ rx_accept: m->m_pkthdr.rcvif = ifp; m->m_pkthdr.len = len; re->m_rxpending = m; + m = NULL; goto rx_next; } else if (re->m_rxpending != NULL) { /* @@ -744,7 +732,7 @@ rx_accept: /* NB: in particular this captures ack's */ ieee80211_radiotap_rx_all(ic, m); } - m_freem(m); + m_freem(m); m = NULL; goto rx_next; } @@ -788,6 +776,7 @@ rx_accept: */ type = ieee80211_input(ni, m, rs->rs_rssi, nf); ieee80211_free_node(ni); + m = NULL; /* * Arrange to update the last rx timestamp only for * frames from our ap when operating in station mode. @@ -799,7 +788,14 @@ rx_accept: is_good = 1; } else { type = ieee80211_input_all(ic, m, rs->rs_rssi, nf); + m = NULL; } + + /* + * At this point we have passed the frame up the stack; thus + * the mbuf is no longer ours. + */ + /* * Track rx rssi and do any rx antenna management. */ @@ -837,6 +833,16 @@ rx_accept: ath_led_event(sc, 0); } rx_next: + /* + * Debugging - complain if we didn't NULL the mbuf pointer + * here. + */ + if (m != NULL) { + device_printf(sc->sc_dev, + "%s: mbuf %p should've been freed!\n", + __func__, + m); + } return (is_good); } @@ -952,7 +958,10 @@ ath_rx_proc(struct ath_softc *sc, int re /* * Process a single frame. */ - if (ath_rx_pkt(sc, rs, status, tsf, nf, HAL_RX_QUEUE_HP, bf)) + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, BUS_DMASYNC_POSTREAD); + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); + bf->bf_m = NULL; + if (ath_rx_pkt(sc, rs, status, tsf, nf, HAL_RX_QUEUE_HP, bf, m)) ngood++; rx_proc_next: TAILQ_INSERT_TAIL(&sc->sc_rxbuf, bf, bf_list); Modified: head/sys/dev/ath/if_ath_rx.h ============================================================================== --- head/sys/dev/ath/if_ath_rx.h Thu Apr 4 07:57:32 2013 (r249084) +++ head/sys/dev/ath/if_ath_rx.h Thu Apr 4 08:21:56 2013 (r249085) @@ -58,7 +58,7 @@ extern int ath_startrecv(struct ath_soft extern int ath_rx_pkt(struct ath_softc *sc, struct ath_rx_status *rs, HAL_STATUS status, uint64_t tsf, int nf, HAL_RX_QUEUE qtype, - struct ath_buf *bf); + struct ath_buf *bf, struct mbuf *m); extern void ath_recv_setup_legacy(struct ath_softc *sc); Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Thu Apr 4 07:57:32 2013 (r249084) +++ head/sys/dev/ath/if_ath_rx_edma.c Thu Apr 4 08:21:56 2013 (r249085) @@ -362,11 +362,10 @@ ath_edma_recv_proc_queue(struct ath_soft /* * Sync descriptor memory - this also syncs the buffer for us. - * * EDMA descriptors are in cached memory. */ bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, - BUS_DMASYNC_POSTREAD); + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); rs = &bf->bf_status.ds_rxstat; bf->bf_rxstatus = ath_hal_rxprocdesc(ah, ds, bf->bf_daddr, NULL, rs); @@ -384,16 +383,17 @@ ath_edma_recv_proc_queue(struct ath_soft /* * Completed descriptor. - * - * In the future we'll call ath_rx_pkt(), but it first - * has to be taught about EDMA RX queues (so it can - * access sc_rxpending correctly.) */ DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Q%d: completed!\n", __func__, qtype); npkts++; /* + * We've been synced already, so unmap. + */ + bus_dmamap_unload(sc->sc_dmat, bf->bf_dmamap); + + /* * Remove the FIFO entry and place it on the completion * queue. */ @@ -468,6 +468,7 @@ ath_edma_recv_proc_deferred_queue(struct struct ath_rx_status *rs; int16_t nf; ath_bufhead rxlist; + struct mbuf *m; TAILQ_INIT(&rxlist); @@ -492,12 +493,11 @@ ath_edma_recv_proc_deferred_queue(struct m_adj(bf->bf_m, sc->sc_rx_statuslen); /* Handle the frame */ - /* - * Note: this may or may not free bf->bf_m and sync/unmap - * the frame. - */ + rs = &bf->bf_status.ds_rxstat; - if (ath_rx_pkt(sc, rs, bf->bf_rxstatus, tsf, nf, qtype, bf)) + m = bf->bf_m; + bf->bf_m = NULL; + if (ath_rx_pkt(sc, rs, bf->bf_rxstatus, tsf, nf, qtype, bf, m)) ngood++; } @@ -605,10 +605,27 @@ ath_edma_rxbuf_init(struct ath_softc *sc m->m_pkthdr.len = m->m_len = m->m_ext.ext_size; /* + * Populate ath_buf fields. + */ + bf->bf_desc = mtod(m, struct ath_desc *); + bf->bf_lastds = bf->bf_desc; /* XXX only really for TX? */ + bf->bf_m = m; + + /* + * Zero the descriptor and ensure it makes it out to the + * bounce buffer if one is required. + * + * XXX PREWRITE will copy the whole buffer; we only needed it + * to sync the first 32 DWORDS. Oh well. + */ + memset(bf->bf_desc, '\0', sc->sc_rx_statuslen); + + /* * Create DMA mapping. */ error = bus_dmamap_load_mbuf_sg(sc->sc_dmat, bf->bf_dmamap, m, bf->bf_segs, &bf->bf_nseg, BUS_DMA_NOWAIT); + if (error != 0) { device_printf(sc->sc_dev, "%s: failed; error=%d\n", __func__, @@ -618,30 +635,27 @@ ath_edma_rxbuf_init(struct ath_softc *sc } /* - * Populate ath_buf fields. + * Set daddr to the physical mapping page. */ - - bf->bf_desc = mtod(m, struct ath_desc *); bf->bf_daddr = bf->bf_segs[0].ds_addr; - bf->bf_lastds = bf->bf_desc; /* XXX only really for TX? */ - bf->bf_m = m; - - /* Zero the descriptor */ - memset(bf->bf_desc, '\0', sc->sc_rx_statuslen); -#if 0 /* - * Adjust mbuf header and length/size to compensate for the - * descriptor size. + * Prepare for the upcoming read. + * + * We need to both sync some data into the buffer (the zero'ed + * descriptor payload) and also prepare for the read that's going + * to occur. */ - m_adj(m, sc->sc_rx_statuslen); -#endif + bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, + BUS_DMASYNC_PREREAD | BUS_DMASYNC_PREWRITE); /* Finish! */ - return (0); } +/* + * Allocate a RX buffer. + */ static struct ath_buf * ath_edma_rxbuf_alloc(struct ath_softc *sc) { @@ -653,8 +667,11 @@ ath_edma_rxbuf_alloc(struct ath_softc *s /* Allocate buffer */ bf = TAILQ_FIRST(&sc->sc_rxbuf); /* XXX shouldn't happen upon startup? */ - if (bf == NULL) + if (bf == NULL) { + device_printf(sc->sc_dev, "%s: nothing on rxbuf?!\n", + __func__); return (NULL); + } /* Remove it from the free list */ TAILQ_REMOVE(&sc->sc_rxbuf, bf, bf_list); @@ -743,18 +760,13 @@ ath_edma_rxfifo_alloc(struct ath_softc * re->m_fifo[re->m_fifo_tail] = bf; - /* - * Flush the descriptor contents before it's handed to the - * hardware. - */ - bus_dmamap_sync(sc->sc_dmat, bf->bf_dmamap, - BUS_DMASYNC_PREREAD); - /* Write to the RX FIFO */ - DPRINTF(sc, ATH_DEBUG_EDMA_RX, "%s: Q%d: putrxbuf=%p\n", + DPRINTF(sc, ATH_DEBUG_EDMA_RX, + "%s: Q%d: putrxbuf=%p (0x%jx)\n", __func__, qtype, - bf->bf_desc); + bf->bf_desc, + (uintmax_t) bf->bf_daddr); ath_hal_putrxbuf(sc->sc_ah, bf->bf_daddr, qtype); re->m_fifo_depth++; From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 08:30:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C131B692; Thu, 4 Apr 2013 08:30:04 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9C232EA8; Thu, 4 Apr 2013 08:30:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r348U4gc077763; Thu, 4 Apr 2013 08:30:04 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r348U4iC077762; Thu, 4 Apr 2013 08:30:04 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304040830.r348U4iC077762@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Apr 2013 08:30:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249086 - 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: Thu, 04 Apr 2013 08:30:04 -0000 Author: joel (doc committer) Date: Thu Apr 4 08:30:04 2013 New Revision: 249086 URL: http://svnweb.freebsd.org/changeset/base/249086 Log: Remove atapicam(4) reference. Modified: head/share/man/man5/devfs.conf.5 Modified: head/share/man/man5/devfs.conf.5 ============================================================================== --- head/share/man/man5/devfs.conf.5 Thu Apr 4 08:21:56 2013 (r249085) +++ head/share/man/man5/devfs.conf.5 Thu Apr 4 08:30:04 2013 (r249086) @@ -100,8 +100,6 @@ To create a .Pa /dev/cdrom link that points to the first .Xr SCSI 4 -or -.Xr atapicam 4 CD-ROM, the following may be added to .Nm : From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 08:45:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 97D86969; Thu, 4 Apr 2013 08:45:38 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 70926F22; Thu, 4 Apr 2013 08:45:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r348jcjj082999; Thu, 4 Apr 2013 08:45:38 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r348jbmj082996; Thu, 4 Apr 2013 08:45:37 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304040845.r348jbmj082996@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Apr 2013 08:45:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249087 - in head: sbin/geom/class/raid sbin/geom/class/stripe 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, 04 Apr 2013 08:45:38 -0000 Author: joel (doc committer) Date: Thu Apr 4 08:45:37 2013 New Revision: 249087 URL: http://svnweb.freebsd.org/changeset/base/249087 Log: Remove references to ataraid(4) and atacontrol(8). Modified: head/sbin/geom/class/raid/graid.8 head/sbin/geom/class/stripe/gstripe.8 head/share/man/man5/periodic.conf.5 Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Thu Apr 4 08:30:04 2013 (r249086) +++ head/sbin/geom/class/raid/graid.8 Thu Apr 4 08:45:37 2013 (r249087) @@ -242,8 +242,7 @@ RAID5 (3+ disks), RAID10 (4+ disks), SIN Configurations not supported by NVIDIA MediaShield RAID BIOS, but enforceable on your own risk: RAID1 (3+ disks). .It Promise -The format used by Promise and AMD/ATI RAID BIOSes and FreeBSD ataraid(4) -driver. +The format used by Promise and AMD/ATI RAID BIOSes. Supports multiple volumes per array. Each disk can be split to be used by up to two arbitrary volumes. Supports configurations: RAID0 (2+ disks), RAID1 (2 disks), Modified: head/sbin/geom/class/stripe/gstripe.8 ============================================================================== --- head/sbin/geom/class/stripe/gstripe.8 Thu Apr 4 08:30:04 2013 (r249086) +++ head/sbin/geom/class/stripe/gstripe.8 Thu Apr 4 08:45:37 2013 (r249087) @@ -213,8 +213,6 @@ The interleave is in number of bytes, unlike .Xr ccdconfig 8 -and -.Xr atacontrol 8 which use the number of sectors. A .Xr ccdconfig 8 @@ -229,7 +227,6 @@ for .Sh SEE ALSO .Xr geom 4 , .Xr loader.conf 5 , -.Xr atacontrol 8 , .Xr ccdconfig 8 , .Xr geom 8 , .Xr gvinum 8 , Modified: head/share/man/man5/periodic.conf.5 ============================================================================== --- head/share/man/man5/periodic.conf.5 Thu Apr 4 08:30:04 2013 (r249086) +++ head/share/man/man5/periodic.conf.5 Thu Apr 4 08:45:37 2013 (r249087) @@ -357,15 +357,6 @@ Requires .Va daily_status_zfs_enable to be set to .Li YES . -.It Va daily_status_ata_raid_enable -.Pq Vt bool -Set to -.Dq Li YES -if you want to run -.Nm atacontrol Cm status -on your -.Xr ataraid 4 -arrays. .It Va daily_status_gmirror_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 08:57:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 29174C30; Thu, 4 Apr 2013 08:57:30 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1B715F8A; Thu, 4 Apr 2013 08:57:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r348vTDZ086170; Thu, 4 Apr 2013 08:57:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r348vTk2086169; Thu, 4 Apr 2013 08:57:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304040857.r348vTk2086169@svn.freebsd.org> From: Adrian Chadd Date: Thu, 4 Apr 2013 08:57:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249088 - 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: Thu, 04 Apr 2013 08:57:30 -0000 Author: adrian Date: Thu Apr 4 08:57:29 2013 New Revision: 249088 URL: http://svnweb.freebsd.org/changeset/base/249088 Log: Update comments! Modified: head/sys/dev/ath/if_ath_rx_edma.c Modified: head/sys/dev/ath/if_ath_rx_edma.c ============================================================================== --- head/sys/dev/ath/if_ath_rx_edma.c Thu Apr 4 08:45:37 2013 (r249087) +++ head/sys/dev/ath/if_ath_rx_edma.c Thu Apr 4 08:57:29 2013 (r249088) @@ -571,10 +571,6 @@ ath_edma_recv_tasklet(void *arg, int npe * * + Allocate a 4KB mbuf; * + Setup the DMA map for the given buffer; - * + Keep a pointer to the start of the mbuf - that's where the - * descriptor lies; - * + Take a pointer to the start of the RX buffer, set the - * mbuf "start" to be there; * + Return that. */ static int From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 09:15:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 72051C0; Thu, 4 Apr 2013 09:15:20 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6353ACD; Thu, 4 Apr 2013 09:15:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r349FKLb091829; Thu, 4 Apr 2013 09:15:20 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r349FKkY091828; Thu, 4 Apr 2013 09:15:20 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304040915.r349FKkY091828@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 09:15:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249089 - head/sys/dev/ahci 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, 04 Apr 2013 09:15:20 -0000 Author: mav Date: Thu Apr 4 09:15:19 2013 New Revision: 249089 URL: http://svnweb.freebsd.org/changeset/base/249089 Log: Check status of ahci_em_reset() on attach and abort if reset failed. For now it is just a hypothetical case. Submitted by: Dmitry Luhtionov Modified: head/sys/dev/ahci/ahciem.c Modified: head/sys/dev/ahci/ahciem.c ============================================================================== --- head/sys/dev/ahci/ahciem.c Thu Apr 4 08:57:29 2013 (r249088) +++ head/sys/dev/ahci/ahciem.c Thu Apr 4 09:15:19 2013 (r249089) @@ -104,7 +104,10 @@ ahci_em_attach(device_t dev) } else enc->r_memr = NULL; mtx_lock(&enc->mtx); - ahci_em_reset(dev); + if (ahci_em_reset(dev) != 0) { + error = ENXIO; + goto err1; + } rid = ATA_IRQ_RID; /* Create the device queue for our SIM. */ devq = cam_simq_alloc(1); From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 09:21:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 11415289; Thu, 4 Apr 2013 09:21:26 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03B07FE; Thu, 4 Apr 2013 09:21:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r349LPwN094225; Thu, 4 Apr 2013 09:21:25 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r349LPpR094223; Thu, 4 Apr 2013 09:21:25 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304040921.r349LPpR094223@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 09:21:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249090 - in head: . usr.sbin usr.sbin/burncd 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, 04 Apr 2013 09:21:26 -0000 Author: mav Date: Thu Apr 4 09:21:24 2013 New Revision: 249090 URL: http://svnweb.freebsd.org/changeset/base/249090 Log: Remove usr.sbin/burncd, useless after legacy ATA stack removal. Deleted: head/usr.sbin/burncd/ Modified: head/ObsoleteFiles.inc head/usr.sbin/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Apr 4 09:15:19 2013 (r249089) +++ head/ObsoleteFiles.inc Thu Apr 4 09:21:24 2013 (r249090) @@ -43,6 +43,8 @@ OLD_FILES+=sbin/atacontrol OLD_FILES+=usr/share/man/man8/atacontrol.8.gz OLD_FILES+=usr/share/man/man4/atapicam.4.gz OLD_FILES+=usr/share/man/man4/ataraid.4.gz +OLD_FILES+=usr.sbin/burncd +OLD_FILES+=usr/share/man/man8/burncd.8.gz # 20130316: vinum.4 removed OLD_FILES+=usr/share/man/man4/vinum.4.gz # 20130312: fortunes-o removed Modified: head/usr.sbin/Makefile ============================================================================== --- head/usr.sbin/Makefile Thu Apr 4 09:15:19 2013 (r249089) +++ head/usr.sbin/Makefile Thu Apr 4 09:21:24 2013 (r249090) @@ -6,7 +6,6 @@ SUBDIR= adduser \ arp \ bootparamd \ - burncd \ bsdinstall \ cdcontrol \ chkgrp \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 10:19:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id EF19EB1C; Thu, 4 Apr 2013 10:19:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E1A38344; Thu, 4 Apr 2013 10:19:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34AJ6Vh009924; Thu, 4 Apr 2013 10:19:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34AJ6AC009923; Thu, 4 Apr 2013 10:19:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041019.r34AJ6AC009923@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 10:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249091 - 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, 04 Apr 2013 10:19:07 -0000 Author: mav Date: Thu Apr 4 10:19:05 2013 New Revision: 249091 URL: http://svnweb.freebsd.org/changeset/base/249091 Log: Use xpt_lock_buses() instead of equivalent mtx_lock(&xsoftc.xpt_topo_lock) to unify the code. Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Apr 4 09:21:24 2013 (r249090) +++ head/sys/cam/cam_xpt.c Thu Apr 4 10:19:05 2013 (r249091) @@ -654,7 +654,7 @@ xptioctl(struct cdev *dev, u_long cmd, c } /* Keep the list from changing while we traverse it */ - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); ptstartover: cur_generation = xsoftc.xpt_generation; @@ -664,7 +664,7 @@ ptstartover: break; if (*p_drv == NULL) { - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); ccb->ccb_h.status = CAM_REQ_CMP_ERR; ccb->cgdl.status = CAM_GDEVLIST_ERROR; *ccb->cgdl.periph_name = '\0'; @@ -686,8 +686,8 @@ ptstartover: if (periph->unit_number == unit) { break; } else if (--splbreaknum == 0) { - mtx_unlock(&xsoftc.xpt_topo_lock); - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); + xpt_lock_buses(); splbreaknum = 100; if (cur_generation != xsoftc.xpt_generation) goto ptstartover; @@ -776,7 +776,7 @@ ptstartover: "your kernel config file\n"); } } - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); break; } default: @@ -1024,9 +1024,9 @@ xpt_add_periph(struct cam_periph *periph SLIST_INSERT_HEAD(periph_head, periph, periph_links); } - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); xsoftc.xpt_generation++; - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); return (status); } @@ -1054,12 +1054,12 @@ xpt_remove_periph(struct cam_periph *per } if (topology_lock_held == 0) - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); xsoftc.xpt_generation++; if (topology_lock_held == 0) - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); } @@ -2031,7 +2031,7 @@ xptbustraverse(struct cam_eb *start_bus, retval = 1; - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); for (bus = (start_bus ? start_bus : TAILQ_FIRST(&xsoftc.xpt_busses)); bus != NULL; bus = next_bus) { @@ -2042,22 +2042,22 @@ xptbustraverse(struct cam_eb *start_bus, * XXX The locking here is obviously very complex. We * should work to simplify it. */ - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); CAM_SIM_LOCK(bus->sim); retval = tr_func(bus, arg); CAM_SIM_UNLOCK(bus->sim); - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); next_bus = TAILQ_NEXT(bus, links); - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); xpt_release_bus(bus); if (retval == 0) return(retval); - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); } - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); return(retval); } @@ -2073,7 +2073,7 @@ xpt_sim_opened(struct cam_sim *sim) KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); mtx_assert(sim->mtx, MA_OWNED); - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { if (bus->sim != sim) continue; @@ -2083,7 +2083,7 @@ xpt_sim_opened(struct cam_sim *sim) SLIST_FOREACH(periph, &device->periphs, periph_links) { if (periph->refcount > 0) { - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); return (1); } } @@ -2091,7 +2091,7 @@ xpt_sim_opened(struct cam_sim *sim) } } - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); return (0); } @@ -3550,14 +3550,14 @@ xpt_path_counts(struct cam_path *path, u uint32_t *periph_ref, uint32_t *target_ref, uint32_t *device_ref) { - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); if (bus_ref) { if (path->bus) *bus_ref = path->bus->refcount; else *bus_ref = 0; } - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); if (periph_ref) { if (path->periph) *periph_ref = path->periph->refcount; @@ -3873,7 +3873,7 @@ xpt_bus_register(struct cam_sim *sim, de new_bus->refcount = 1; /* Held until a bus_deregister event */ new_bus->generation = 0; - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); old_bus = TAILQ_FIRST(&xsoftc.xpt_busses); while (old_bus != NULL && old_bus->path_id < new_bus->path_id) @@ -3883,7 +3883,7 @@ xpt_bus_register(struct cam_sim *sim, de else TAILQ_INSERT_TAIL(&xsoftc.xpt_busses, new_bus, links); xsoftc.bus_generation++; - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); /* * Set a default transport so that a PATH_INQ can be issued to @@ -3969,7 +3969,7 @@ xptnextfreepathid(void) const char *strval; pathid = 0; - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); bus = TAILQ_FIRST(&xsoftc.xpt_busses); retry: /* Find an unoccupied pathid */ @@ -3978,7 +3978,7 @@ retry: pathid++; bus = TAILQ_NEXT(bus, links); } - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); /* * Ensure that this pathid is not reserved for @@ -3987,7 +3987,7 @@ retry: if (resource_string_value("scbus", pathid, "at", &strval) == 0) { ++pathid; /* Start the search over */ - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); goto retry; } return (pathid); @@ -4436,17 +4436,17 @@ static void xpt_release_bus(struct cam_eb *bus) { - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); KASSERT(bus->refcount >= 1, ("bus->refcount >= 1")); if ((--bus->refcount == 0) && (TAILQ_FIRST(&bus->et_entries) == NULL)) { TAILQ_REMOVE(&xsoftc.xpt_busses, bus, links); xsoftc.bus_generation++; - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); cam_sim_release(bus->sim); free(bus, M_CAMXPT); } else - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); } static struct cam_et * @@ -4470,9 +4470,9 @@ xpt_alloc_target(struct cam_eb *bus, tar * Hold a reference to our parent bus so it * will not go away before we do. */ - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); bus->refcount++; - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); /* Insertion sort into our bus's target list */ cur_target = TAILQ_FIRST(&bus->et_entries); @@ -4662,7 +4662,7 @@ xpt_find_bus(path_id_t path_id) { struct cam_eb *bus; - mtx_lock(&xsoftc.xpt_topo_lock); + xpt_lock_buses(); for (bus = TAILQ_FIRST(&xsoftc.xpt_busses); bus != NULL; bus = TAILQ_NEXT(bus, links)) { @@ -4671,7 +4671,7 @@ xpt_find_bus(path_id_t path_id) break; } } - mtx_unlock(&xsoftc.xpt_topo_lock); + xpt_unlock_buses(); return (bus); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 10:26:09 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B9755D43; Thu, 4 Apr 2013 10:26:09 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ABC5C398; Thu, 4 Apr 2013 10:26:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34AQ9hQ012480; Thu, 4 Apr 2013 10:26:09 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34AQ9PY012479; Thu, 4 Apr 2013 10:26:09 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304041026.r34AQ9PY012479@svn.freebsd.org> From: Joel Dahl Date: Thu, 4 Apr 2013 10:26:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249092 - head/sbin/geom/class/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: Thu, 04 Apr 2013 10:26:09 -0000 Author: joel (doc committer) Date: Thu Apr 4 10:26:09 2013 New Revision: 249092 URL: http://svnweb.freebsd.org/changeset/base/249092 Log: Minor rewording. Discussed with: mav Modified: head/sbin/geom/class/raid/graid.8 Modified: head/sbin/geom/class/raid/graid.8 ============================================================================== --- head/sbin/geom/class/raid/graid.8 Thu Apr 4 10:19:05 2013 (r249091) +++ head/sbin/geom/class/raid/graid.8 Thu Apr 4 10:26:09 2013 (r249092) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd January 16, 2013 +.Dd April 4, 2013 .Dt GRAID 8 .Os .Sh NAME @@ -305,7 +305,7 @@ Time to wait for missing array component .It Va kern.geom.raid. Ns Ar X Ns Va .enable : No 1 Enable taste for specific metadata or transformation module. .It Va kern.geom.raid.legacy_aliases : No 0 -Enable geom raid emulation of /dev/ar%d devices from ataraid(4) +Enable geom raid emulation of legacy /dev/ar%d devices. This should aid the upgrade of systems from legacy to modern releases. .El .Sh EXIT STATUS From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 10:46:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 631BB115; Thu, 4 Apr 2013 10:46:34 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 54B9D66D; Thu, 4 Apr 2013 10:46:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34AkYfi018358; Thu, 4 Apr 2013 10:46:34 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34AkYBS018356; Thu, 4 Apr 2013 10:46:34 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304041046.r34AkYBS018356@svn.freebsd.org> From: Adrian Chadd Date: Thu, 4 Apr 2013 10:46:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249093 - in head/sys/mips: atheros conf 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, 04 Apr 2013 10:46:34 -0000 Author: adrian Date: Thu Apr 4 10:46:33 2013 New Revision: 249093 URL: http://svnweb.freebsd.org/changeset/base/249093 Log: Implement AR933x polled IO uart bus code. This implements the bus transmit/receive/sigchg/ipend methods with a polled interrupt handler (ipend) rather than enabling hardware interrupts. The FIFO is faked at 16 bytes deep for now, just so the transmit IO side doesn't suck too bad (the callout frequency limits how quickly IO is flushed to the sender, rather than scheduling the callout more frequently whilst there's active TX. But I digress.) Tested: * Atheros AP121 (AR9330) reference board, booting to multi-user interactive mode. Modified: head/sys/mips/atheros/uart_dev_ar933x.c head/sys/mips/conf/AR933X_BASE.hints Modified: head/sys/mips/atheros/uart_dev_ar933x.c ============================================================================== --- head/sys/mips/atheros/uart_dev_ar933x.c Thu Apr 4 10:26:09 2013 (r249092) +++ head/sys/mips/atheros/uart_dev_ar933x.c Thu Apr 4 10:46:33 2013 (r249093) @@ -80,72 +80,54 @@ ar933x_clrint(struct uart_bas *bas) } #endif -#if 0 static int ar933x_drain(struct uart_bas *bas, int what) { - int delay, limit; - - delay = ar933x_delay(bas); + int limit; if (what & UART_DRAIN_TRANSMITTER) { - /* - * Pick an arbitrary high limit to avoid getting stuck in - * an infinite loop when the hardware is broken. Make the - * limit high enough to handle large FIFOs. - */ limit = 10*1024; - while ((uart_getreg(bas, REG_LSR) & LSR_TEMT) == 0 && --limit) - DELAY(delay); + + /* Loop over until the TX FIFO shows entirely clear */ + while (--limit) { + if ((ar933x_getreg(bas, AR933X_UART_CS_REG) + & AR933X_UART_CS_TX_BUSY) == 0) + break; + } if (limit == 0) { - /* printf("ns8250: transmitter appears stuck... "); */ return (EIO); } } if (what & UART_DRAIN_RECEIVER) { - /* - * Pick an arbitrary high limit to avoid getting stuck in - * an infinite loop when the hardware is broken. Make the - * limit high enough to handle large FIFOs and integrated - * UARTs. The HP rx2600 for example has 3 UARTs on the - * management board that tend to get a lot of data send - * to it when the UART is first activated. - */ limit=10*4096; - while ((uart_getreg(bas, REG_LSR) & LSR_RXRDY) && --limit) { - (void)uart_getreg(bas, REG_DATA); + while (--limit) { + + /* XXX duplicated from ar933x_getc() */ + /* XXX TODO: refactor! */ + + /* If there's nothing to read, stop! */ + if ((ar933x_getreg(bas, AR933X_UART_DATA_REG) & + AR933X_UART_DATA_RX_CSR) == 0) { + break; + } + + /* Read the top of the RX FIFO */ + (void) ar933x_getreg(bas, AR933X_UART_DATA_REG); + + /* Remove that entry from said RX FIFO */ + ar933x_setreg(bas, AR933X_UART_DATA_REG, + AR933X_UART_DATA_RX_CSR); + uart_barrier(bas); - DELAY(delay << 2); + DELAY(2); } if (limit == 0) { - /* printf("ns8250: receiver appears broken... "); */ return (EIO); } } return (0); } -#endif - -#if 0 -/* - * We can only flush UARTs with FIFOs. UARTs without FIFOs should be - * drained. WARNING: this function clobbers the FIFO setting! - */ -static void -ar933x_flush(struct uart_bas *bas, int what) -{ - uint8_t fcr; - - fcr = FCR_ENABLE; - if (what & UART_FLUSH_TRANSMITTER) - fcr |= FCR_XMT_RST; - if (what & UART_FLUSH_RECEIVER) - fcr |= FCR_RCV_RST; - uart_setreg(bas, REG_FCR, fcr); - uart_barrier(bas); -} -#endif /* * Calculate the baud from the given chip configuration parameters. @@ -404,56 +386,12 @@ struct uart_class uart_ar933x_class = { static int ar933x_bus_attach(struct uart_softc *sc) { -#if 0 - struct ar933x_softc *ns8250 = (struct ar933x_softc*)sc; - struct uart_bas *bas; - unsigned int ivar; + /* XXX TODO: flush transmitter */ - bas = &sc->sc_bas; + /* XXX TODO: enable RX interrupts to kick-start things */ - ns8250->mcr = uart_getreg(bas, REG_MCR); - ns8250->fcr = FCR_ENABLE; - if (!resource_int_value("uart", device_get_unit(sc->sc_dev), "flags", - &ivar)) { - if (UART_FLAGS_FCR_RX_LOW(ivar)) - ns8250->fcr |= FCR_RX_LOW; - else if (UART_FLAGS_FCR_RX_MEDL(ivar)) - ns8250->fcr |= FCR_RX_MEDL; - else if (UART_FLAGS_FCR_RX_HIGH(ivar)) - ns8250->fcr |= FCR_RX_HIGH; - else - ns8250->fcr |= FCR_RX_MEDH; - } else - ns8250->fcr |= FCR_RX_MEDH; - - /* Get IER mask */ - ivar = 0xf0; - resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_mask", - &ivar); - ns8250->ier_mask = (uint8_t)(ivar & 0xff); - - /* Get IER RX interrupt bits */ - ivar = IER_EMSC | IER_ERLS | IER_ERXRDY; - resource_int_value("uart", device_get_unit(sc->sc_dev), "ier_rxbits", - &ivar); - ns8250->ier_rxbits = (uint8_t)(ivar & 0xff); - - uart_setreg(bas, REG_FCR, ns8250->fcr); - uart_barrier(bas); - ar933x_bus_flush(sc, UART_FLUSH_RECEIVER|UART_FLUSH_TRANSMITTER); + /* XXX TODO: enable the host interrupt now */ - if (ns8250->mcr & MCR_DTR) - sc->sc_hwsig |= SER_DTR; - if (ns8250->mcr & MCR_RTS) - sc->sc_hwsig |= SER_RTS; - ar933x_bus_getsig(sc); - - ar933x_clrint(bas); - ns8250->ier = uart_getreg(bas, REG_IER) & ns8250->ier_mask; - ns8250->ier |= ns8250->ier_rxbits; - uart_setreg(bas, REG_IER, ns8250->ier); - uart_barrier(bas); -#endif return (0); } @@ -472,54 +410,44 @@ ar933x_bus_detach(struct uart_softc *sc) uart_barrier(bas); ar933x_clrint(bas); #endif + + /* XXX TODO: Disable all interrupts */ + /* XXX TODO: Disable the host interrupt */ + return (0); } static int ar933x_bus_flush(struct uart_softc *sc, int what) { -#if 0 - struct ar933x_softc *ns8250 = (struct ar933x_softc*)sc; struct uart_bas *bas; - int error; bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - if (sc->sc_rxfifosz > 1) { - ar933x_flush(bas, what); - uart_setreg(bas, REG_FCR, ns8250->fcr); - uart_barrier(bas); - error = 0; - } else - error = ar933x_drain(bas, what); + ar933x_drain(bas, what); uart_unlock(sc->sc_hwmtx); - return (error); -#endif - return (ENXIO); + + return (0); } static int ar933x_bus_getsig(struct uart_softc *sc) { -#if 0 - uint32_t new, old, sig; - uint8_t msr; + uint32_t sig = sc->sc_hwsig; + + /* + * For now, let's just return that DSR/DCD/CTS is asserted. + * + * XXX TODO: actually verify whether this is correct! + */ + SIGCHG(1, sig, SER_DSR, SER_DDSR); + SIGCHG(1, sig, SER_CTS, SER_DCTS); + SIGCHG(1, sig, SER_DCD, SER_DDCD); + SIGCHG(1, sig, SER_RI, SER_DRI); + + sc->sc_hwsig = sig & ~SER_MASK_DELTA; - do { - old = sc->sc_hwsig; - sig = old; - uart_lock(sc->sc_hwmtx); - msr = uart_getreg(&sc->sc_bas, REG_MSR); - uart_unlock(sc->sc_hwmtx); - SIGCHG(msr & MSR_DSR, sig, SER_DSR, SER_DDSR); - SIGCHG(msr & MSR_CTS, sig, SER_CTS, SER_DCTS); - SIGCHG(msr & MSR_DCD, sig, SER_DCD, SER_DDCD); - SIGCHG(msr & MSR_RI, sig, SER_RI, SER_DRI); - new = sig & ~SER_MASK_DELTA; - } while (!atomic_cmpset_32(&sc->sc_hwsig, old, new)); return (sig); -#endif - return (0); } static int @@ -598,52 +526,47 @@ ar933x_bus_ioctl(struct uart_softc *sc, return (ENXIO); } +/* + * Bus interrupt handler. + * + * For now, system interrupts are disabled. + * So this is just called from a callout in uart_core.c + * to poll various state. + */ static int ar933x_bus_ipend(struct uart_softc *sc) { -#if 0 - struct uart_bas *bas; - struct ar933x_softc *ns8250; - int ipend; - uint8_t iir, lsr; + struct uart_bas *bas = &sc->sc_bas; + int ipend = 0; - ns8250 = (struct ar933x_softc *)sc; - bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - iir = uart_getreg(bas, REG_IIR); - if (iir & IIR_NOPEND) { - uart_unlock(sc->sc_hwmtx); - return (0); - } - ipend = 0; - if (iir & IIR_RXRDY) { - lsr = uart_getreg(bas, REG_LSR); - if (lsr & LSR_OE) - ipend |= SER_INT_OVERRUN; - if (lsr & LSR_BI) - ipend |= SER_INT_BREAK; - if (lsr & LSR_RXRDY) - ipend |= SER_INT_RXREADY; - } else { - if (iir & IIR_TXRDY) { + + /* + * Always notify the upper layer if RX is ready. + */ + if (ar933x_rxready(bas)) { + ipend |= SER_INT_RXREADY; + } + /* + * Only signal TX idle if we're not busy transmitting. + */ + if (sc->sc_txbusy) { + if ((ar933x_getreg(bas, AR933X_UART_DATA_REG) + & AR933X_UART_DATA_TX_CSR)) { ipend |= SER_INT_TXIDLE; - uart_setreg(bas, REG_IER, ns8250->ier); - } else + } else { ipend |= SER_INT_SIGCHG; + } } - if (ipend == 0) - ar933x_clrint(bas); + uart_unlock(sc->sc_hwmtx); return (ipend); -#endif - return (0); } static int ar933x_bus_param(struct uart_softc *sc, int baudrate, int databits, int stopbits, int parity) { -#if 0 struct uart_bas *bas; int error; @@ -652,193 +575,63 @@ ar933x_bus_param(struct uart_softc *sc, error = ar933x_param(bas, baudrate, databits, stopbits, parity); uart_unlock(sc->sc_hwmtx); return (error); -#endif - return (ENXIO); } static int ar933x_bus_probe(struct uart_softc *sc) { -#if 0 - struct ar933x_softc *ns8250; struct uart_bas *bas; - int count, delay, error, limit; - uint8_t lsr, mcr, ier; + int error; - ns8250 = (struct ar933x_softc *)sc; bas = &sc->sc_bas; error = ar933x_probe(bas); if (error) return (error); - mcr = MCR_IE; - if (sc->sc_sysdev == NULL) { - /* By using ar933x_init() we also set DTR and RTS. */ - ar933x_init(bas, 115200, 8, 1, UART_PARITY_NONE); - } else - mcr |= MCR_DTR | MCR_RTS; - - error = ar933x_drain(bas, UART_DRAIN_TRANSMITTER); - if (error) - return (error); - - /* - * Set loopback mode. This avoids having garbage on the wire and - * also allows us send and receive data. We set DTR and RTS to - * avoid the possibility that automatic flow-control prevents - * any data from being sent. - */ - uart_setreg(bas, REG_MCR, MCR_LOOPBACK | MCR_IE | MCR_DTR | MCR_RTS); - uart_barrier(bas); - - /* - * Enable FIFOs. And check that the UART has them. If not, we're - * done. Since this is the first time we enable the FIFOs, we reset - * them. - */ - uart_setreg(bas, REG_FCR, FCR_ENABLE); - uart_barrier(bas); - if (!(uart_getreg(bas, REG_IIR) & IIR_FIFO_MASK)) { - /* - * NS16450 or INS8250. We don't bother to differentiate - * between them. They're too old to be interesting. - */ - uart_setreg(bas, REG_MCR, mcr); - uart_barrier(bas); - sc->sc_rxfifosz = sc->sc_txfifosz = 1; - device_set_desc(sc->sc_dev, "8250 or 16450 or compatible"); - return (0); - } - - uart_setreg(bas, REG_FCR, FCR_ENABLE | FCR_XMT_RST | FCR_RCV_RST); - uart_barrier(bas); - - count = 0; - delay = ar933x_delay(bas); - - /* We have FIFOs. Drain the transmitter and receiver. */ - error = ar933x_drain(bas, UART_DRAIN_RECEIVER|UART_DRAIN_TRANSMITTER); - if (error) { - uart_setreg(bas, REG_MCR, mcr); - uart_setreg(bas, REG_FCR, 0); - uart_barrier(bas); - goto describe; - } - - /* - * We should have a sufficiently clean "pipe" to determine the - * size of the FIFOs. We send as much characters as is reasonable - * and wait for the overflow bit in the LSR register to be - * asserted, counting the characters as we send them. Based on - * that count we know the FIFO size. - */ - do { - uart_setreg(bas, REG_DATA, 0); - uart_barrier(bas); - count++; - - limit = 30; - lsr = 0; - /* - * LSR bits are cleared upon read, so we must accumulate - * them to be able to test LSR_OE below. - */ - while (((lsr |= uart_getreg(bas, REG_LSR)) & LSR_TEMT) == 0 && - --limit) - DELAY(delay); - if (limit == 0) { - ier = uart_getreg(bas, REG_IER) & ns8250->ier_mask; - uart_setreg(bas, REG_IER, ier); - uart_setreg(bas, REG_MCR, mcr); - uart_setreg(bas, REG_FCR, 0); - uart_barrier(bas); - count = 0; - goto describe; - } - } while ((lsr & LSR_OE) == 0 && count < 130); - count--; - - uart_setreg(bas, REG_MCR, mcr); - /* Reset FIFOs. */ - ar933x_flush(bas, UART_FLUSH_RECEIVER|UART_FLUSH_TRANSMITTER); - - describe: - if (count >= 14 && count <= 16) { - sc->sc_rxfifosz = 16; - device_set_desc(sc->sc_dev, "16550 or compatible"); - } else if (count >= 28 && count <= 32) { - sc->sc_rxfifosz = 32; - device_set_desc(sc->sc_dev, "16650 or compatible"); - } else if (count >= 56 && count <= 64) { - sc->sc_rxfifosz = 64; - device_set_desc(sc->sc_dev, "16750 or compatible"); - } else if (count >= 112 && count <= 128) { - sc->sc_rxfifosz = 128; - device_set_desc(sc->sc_dev, "16950 or compatible"); - } else { - sc->sc_rxfifosz = 16; - device_set_desc(sc->sc_dev, - "Non-standard ns8250 class UART with FIFOs"); - } + ar933x_drain(bas, UART_FLUSH_RECEIVER|UART_FLUSH_TRANSMITTER); - /* - * Force the Tx FIFO size to 16 bytes for now. We don't program the - * Tx trigger. Also, we assume that all data has been sent when the - * interrupt happens. - */ + /* XXX TODO: actually find out what the FIFO depth is! */ + sc->sc_rxfifosz = 16; sc->sc_txfifosz = 16; -#if 0 - /* - * XXX there are some issues related to hardware flow control and - * it's likely that uart(4) is the cause. This basicly needs more - * investigation, but we avoid using for hardware flow control - * until then. - */ - /* 16650s or higher have automatic flow control. */ - if (sc->sc_rxfifosz > 16) { - sc->sc_hwiflow = 1; - sc->sc_hwoflow = 1; - } -#endif -#endif return (0); } static int ar933x_bus_receive(struct uart_softc *sc) { -#if 0 - struct uart_bas *bas; + struct uart_bas *bas = &sc->sc_bas; int xc; - uint8_t lsr; - bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - lsr = uart_getreg(bas, REG_LSR); - while (lsr & LSR_RXRDY) { + + /* Loop over until we are full, or no data is available */ + while (ar933x_rxready(bas)) { if (uart_rx_full(sc)) { sc->sc_rxbuf[sc->sc_rxput] = UART_STAT_OVERRUN; break; } - xc = uart_getreg(bas, REG_DATA); - if (lsr & LSR_FE) - xc |= UART_STAT_FRAMERR; - if (lsr & LSR_PE) - xc |= UART_STAT_PARERR; + + /* Read the top of the RX FIFO */ + xc = ar933x_getreg(bas, AR933X_UART_DATA_REG) & 0xff; + + /* Remove that entry from said RX FIFO */ + ar933x_setreg(bas, AR933X_UART_DATA_REG, + AR933X_UART_DATA_RX_CSR); + + /* XXX frame, parity error */ uart_rx_put(sc, xc); - lsr = uart_getreg(bas, REG_LSR); - } - /* Discard everything left in the Rx FIFO. */ - while (lsr & LSR_RXRDY) { - (void)uart_getreg(bas, REG_DATA); - uart_barrier(bas); - lsr = uart_getreg(bas, REG_LSR); } + + /* + * XXX TODO: Discard everything left in the Rx FIFO? + * XXX only if we've hit an overrun condition? + */ + uart_unlock(sc->sc_hwmtx); -#endif + return (0); } @@ -879,23 +672,26 @@ ar933x_bus_setsig(struct uart_softc *sc, static int ar933x_bus_transmit(struct uart_softc *sc) { -#if 0 - struct ar933x_softc *ns8250 = (struct ar933x_softc*)sc; - struct uart_bas *bas; + struct uart_bas *bas = &sc->sc_bas; int i; - bas = &sc->sc_bas; uart_lock(sc->sc_hwmtx); - while ((uart_getreg(bas, REG_LSR) & LSR_THRE) == 0) - ; - uart_setreg(bas, REG_IER, ns8250->ier | IER_ETXRDY); - uart_barrier(bas); + + /* XXX wait for FIFO to be ready? */ + for (i = 0; i < sc->sc_txdatasz; i++) { - uart_setreg(bas, REG_DATA, sc->sc_txbuf[i]); - uart_barrier(bas); + /* Write the TX data */ + ar933x_setreg(bas, AR933X_UART_DATA_REG, + (sc->sc_txbuf[i] & 0xff) | AR933X_UART_DATA_TX_CSR); } + + /* + * Inform the upper layer that we are presently transmitting + * data to the hardware; this will be cleared when the + * TXIDLE interrupt occurs. + */ sc->sc_txbusy = 1; uart_unlock(sc->sc_hwmtx); -#endif + return (0); } Modified: head/sys/mips/conf/AR933X_BASE.hints ============================================================================== --- head/sys/mips/conf/AR933X_BASE.hints Thu Apr 4 10:26:09 2013 (r249092) +++ head/sys/mips/conf/AR933X_BASE.hints Thu Apr 4 10:46:33 2013 (r249093) @@ -14,7 +14,7 @@ hint.uart.0.at="apb0" # NB: This isn't an ns8250 UART hint.uart.0.maddr=0x18020000 hint.uart.0.msize=0x18 -hint.uart.0.irq=3 +# hint.uart.0.irq=3 #ehci - note the 0x100 offset for the AR913x/AR724x hint.ehci.0.at="nexus0" From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 12:03:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 88625F7D; Thu, 4 Apr 2013 12:03:31 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 62647A52; Thu, 4 Apr 2013 12:03:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34C3V9n041456; Thu, 4 Apr 2013 12:03:31 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34C3V9M041454; Thu, 4 Apr 2013 12:03:31 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041203.r34C3V9M041454@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 12:03:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249094 - in head/usr.sbin: bsdconfig/share pc-sysinstall/backend-query 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, 04 Apr 2013 12:03:31 -0000 Author: mav Date: Thu Apr 4 12:03:30 2013 New Revision: 249094 URL: http://svnweb.freebsd.org/changeset/base/249094 Log: Remove some more references to legacy ATA. Submitted by: Dmitry Luhtionov Modified: head/usr.sbin/bsdconfig/share/device.subr head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Modified: head/usr.sbin/bsdconfig/share/device.subr ============================================================================== --- head/usr.sbin/bsdconfig/share/device.subr Thu Apr 4 10:46:33 2013 (r249093) +++ head/usr.sbin/bsdconfig/share/device.subr Thu Apr 4 12:03:30 2013 (r249094) @@ -663,16 +663,12 @@ f_network() { f_device_name_set $DEVICE ############################################################ MAIN # CDROM, Disk, Floppy, Serial, and USB devices/names -f_cdrom "acd%d" "ATAPI/IDE CDROM" 4 f_cdrom "cd%d" "SCSI CDROM drive" 4 f_cdrom "mcd%d" "Mitsumi (old model) CDROM drive" 4 f_cdrom "scd%d" "Sony CDROM drive - CDU31/33A type" 4 f_disk "aacd%d" "Adaptec FSA RAID array" 4 -f_disk "ad%d" "ATA/IDE disk device" 16 -f_disk "ada%d" "SATA disk device" 16 -f_disk "afd%d" "ATAPI/IDE floppy device" 4 +f_disk "ada%d" "ATA/SATA disk device" 16 f_disk "amrd%d" "AMI MegaRAID drive" 4 -f_disk "ar%d" "ATA/IDE RAID device" 16 f_disk "da%d" "SCSI disk device" 16 f_disk "idad%d" "Compaq RAID array" 4 f_disk "ipsd%d" "IBM ServeRAID RAID array" 4 Modified: head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh ============================================================================== --- head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Thu Apr 4 10:46:33 2013 (r249093) +++ head/usr.sbin/pc-sysinstall/backend-query/disk-list.sh Thu Apr 4 12:03:30 2013 (r249094) @@ -82,15 +82,10 @@ do esac fi - # Try and find some identification information with camcontrol or atacontrol + # Try and find some identification information with camcontrol NEWLINE=$(camcontrol identify $DEV 2>/dev/null | sed -ne 's/^device model *//p') if [ -z "$NEWLINE" ]; then - # Now try atacontrol - NEWLINE=$(atacontrol list 2>/dev/null | sed -n "s|^.*$DEV <\(.*\)>.*|\1|p") - - if [ -z "$NEWLINE" ]; then - NEWLINE=" " - fi + NEWLINE=" " fi if [ -n "${FLAGS_MD}" ] && echo "${DEV}" | grep -E '^md[0-9]+' >/dev/null 2>/dev/null From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 14:57:44 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DE08429D; Thu, 4 Apr 2013 14:57:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 5BA1282A; Thu, 4 Apr 2013 14:57:42 +0000 (UTC) Received: from odyssey.starpoint.kiev.ua (alpha-e.starpoint.kiev.ua [212.40.38.101]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id RAA09900; Thu, 04 Apr 2013 17:57:41 +0300 (EEST) (envelope-from avg@FreeBSD.org) Message-ID: <515D94E5.2030902@FreeBSD.org> Date: Thu, 04 Apr 2013 17:57:41 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130313 Thunderbird/17.0.4 MIME-Version: 1.0 To: Jaakko Heinonen Subject: Re: svn commit: r248571 - in head: . cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd... References: <201303210838.r2L8c3OB097432@svn.freebsd.org> <20130401083731.GA1973@a91-153-126-50.elisa-laajakaista.fi> In-Reply-To: <20130401083731.GA1973@a91-153-126-50.elisa-laajakaista.fi> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Martin Matuska 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, 04 Apr 2013 14:57:44 -0000 on 01/04/2013 11:37 Jaakko Heinonen said the following: > > Hi, > > On 2013-03-21, Martin Matuska wrote: >> Merge libzfs_core branch: >> includes MFV 238590, 238592, 247580 > > I am getting the following error after this commit: > > # zpool list > failed to read pool configuration: bad address > no pools available > # zfs list > failed to read pool configuration: bad address > > Reverting sys/cddl to r248570 makes it work again. > >>From dmesg: > > ZFS filesystem version: 5 > ZFS storage pool version: features support (5000) > Any followups on this? I haven't experienced this problem, but always keep kernel and userland in sync. -- Andriy Gapon From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 15:03:13 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3227F4C1; Thu, 4 Apr 2013 15:03:13 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0C61B88B; Thu, 4 Apr 2013 15:03:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34F3CMT094464; Thu, 4 Apr 2013 15:03:12 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34F3C5l094458; Thu, 4 Apr 2013 15:03:12 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041503.r34F3C5l094458@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 15:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249095 - in head/etc: defaults 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: Thu, 04 Apr 2013 15:03:13 -0000 Author: mav Date: Thu Apr 4 15:03:12 2013 New Revision: 249095 URL: http://svnweb.freebsd.org/changeset/base/249095 Log: Remove periodic script for ataraid(4) and add instead script for graid(8). Added: head/etc/periodic/daily/401.status-graid (contents, props changed) Deleted: head/etc/periodic/daily/405.status-ata-raid Modified: head/etc/defaults/periodic.conf head/etc/periodic/daily/Makefile Modified: head/etc/defaults/periodic.conf ============================================================================== --- head/etc/defaults/periodic.conf Thu Apr 4 12:03:30 2013 (r249094) +++ head/etc/defaults/periodic.conf Thu Apr 4 15:03:12 2013 (r249095) @@ -95,13 +95,13 @@ daily_news_expire_enable="YES" # Run daily_status_disks_enable="YES" # Check disk status daily_status_disks_df_flags="-l -h" # df(1) flags for check +# 401.status-graid +daily_status_graid_enable="NO" # Check graid(8) + # 404.status-zfs daily_status_zfs_enable="NO" # Check ZFS daily_status_zfs_zpool_list_enable="YES" # List ZFS pools -# 405.status-ata_raid -daily_status_ata_raid_enable="NO" # Check ATA raid status - # 406.status-gmirror daily_status_gmirror_enable="NO" # Check gmirror(8) Added: head/etc/periodic/daily/401.status-graid ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/periodic/daily/401.status-graid Thu Apr 4 15:03:12 2013 (r249095) @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +case "$daily_status_graid_enable" in + [Yy][Ee][Ss]) + echo + echo 'Checking status of graid(8) devices:' + + if graid status; then + components="$(graid status -s | fgrep -v OPTIMAL)" + if [ "${components}" ]; then + rc=3 + else + rc=0 + fi + else + rc=2 + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: head/etc/periodic/daily/Makefile ============================================================================== --- head/etc/periodic/daily/Makefile Thu Apr 4 12:03:30 2013 (r249094) +++ head/etc/periodic/daily/Makefile Thu Apr 4 15:03:12 2013 (r249095) @@ -8,7 +8,7 @@ FILES= 100.clean-disks \ 200.backup-passwd \ 330.news \ 400.status-disks \ - 405.status-ata-raid \ + 401.status-graid \ 406.status-gmirror \ 407.status-graid3 \ 408.status-gstripe \ From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 15:16:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 877C1AAC; Thu, 4 Apr 2013 15:16:54 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79E90981; Thu, 4 Apr 2013 15:16:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34FGspk097963; Thu, 4 Apr 2013 15:16:54 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34FGsgo097962; Thu, 4 Apr 2013 15:16:54 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201304041516.r34FGsgo097962@svn.freebsd.org> From: "George V. Neville-Neil" Date: Thu, 4 Apr 2013 15:16:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249096 - head/sys/rpc/rpcsec_gss 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, 04 Apr 2013 15:16:54 -0000 Author: gnn Date: Thu Apr 4 15:16:53 2013 New Revision: 249096 URL: http://svnweb.freebsd.org/changeset/base/249096 Log: Improve error handling when unwrapping received data. Submitted by: Rick Macklem MFC after: 1 week Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c ============================================================================== --- head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:03:12 2013 (r249095) +++ head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:16:53 2013 (r249096) @@ -208,6 +208,8 @@ m_trim(struct mbuf *m, int len) struct mbuf *n; int off; + if (m == NULL) + return; n = m_getptr(m, len, &off); if (n) { n->m_len = off; @@ -251,10 +253,19 @@ xdr_rpc_gss_unwrap_data(struct mbuf **re * Extract the MIC and make it contiguous. */ cklen = get_uint32(&results); + if (!results) { + m_freem(message); + return (FALSE); + } KASSERT(cklen <= MHLEN, ("unexpected large GSS-API checksum")); mic = results; - if (cklen > mic->m_len) + if (cklen > mic->m_len) { mic = m_pullup(mic, cklen); + if (!mic) { + m_freem(message); + return (FALSE); + } + } if (cklen != RNDUP(cklen)) m_trim(mic, cklen); @@ -272,6 +283,8 @@ xdr_rpc_gss_unwrap_data(struct mbuf **re } else if (svc == rpc_gss_svc_privacy) { /* Decode databody_priv. */ len = get_uint32(&results); + if (!results) + return (FALSE); /* Decrypt databody. */ message = results; @@ -294,6 +307,8 @@ xdr_rpc_gss_unwrap_data(struct mbuf **re /* Decode rpc_gss_data_t (sequence number + arguments). */ seq_num = get_uint32(&message); + if (!message) + return (FALSE); /* Verify sequence number. */ if (seq_num != seq) { From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 15:20:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BF47FD88; Thu, 4 Apr 2013 15:20:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) by mx1.freebsd.org (Postfix) with ESMTP id 4CF739C7; Thu, 4 Apr 2013 15:20:52 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.6/8.14.6) with ESMTP id r34FKkMn000603; Thu, 4 Apr 2013 19:20:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.6/8.14.6/Submit) id r34FKkBt000602; Thu, 4 Apr 2013 19:20:46 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 4 Apr 2013 19:20:46 +0400 From: Gleb Smirnoff To: "George V. Neville-Neil" , rmacklem@FreeBSD.org Subject: Re: svn commit: r249096 - head/sys/rpc/rpcsec_gss Message-ID: <20130404152046.GO76816@FreeBSD.org> References: <201304041516.r34FGsgo097962@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <201304041516.r34FGsgo097962@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: Thu, 04 Apr 2013 15:20:53 -0000 George, Rick, On Thu, Apr 04, 2013 at 03:16:54PM +0000, George V. Neville-Neil wrote: G> Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c G> ============================================================================== G> --- head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:03:12 2013 (r249095) G> +++ head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:16:53 2013 (r249096) G> @@ -208,6 +208,8 @@ m_trim(struct mbuf *m, int len) G> struct mbuf *n; G> int off; G> G> + if (m == NULL) G> + return; G> n = m_getptr(m, len, &off); G> if (n) { G> n->m_len = off; I think the code will be much more rocksolid, if the function won't be called with NULL argument. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 15:33:51 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6918D358; Thu, 4 Apr 2013 15:33:51 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from mail.vx.sk (mail.vx.sk [176.9.45.25]) by mx1.freebsd.org (Postfix) with ESMTP id 1CD41AB7; Thu, 4 Apr 2013 15:33:51 +0000 (UTC) Received: from core.vx.sk (localhost [127.0.0.2]) by mail.vx.sk (Postfix) with ESMTP id 0823D34F29; Thu, 4 Apr 2013 17:33:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at mail.vx.sk Received: from mail.vx.sk by core.vx.sk (amavisd-new, unix socket) with LMTP id JkTf-4Dtdb-K; Thu, 4 Apr 2013 17:33:41 +0200 (CEST) Received: from [127.0.0.1] (82-119-108-118.static.chello.sk [82.119.108.118]) by mail.vx.sk (Postfix) with ESMTPSA id A6B7B34F1B; Thu, 4 Apr 2013 17:33:40 +0200 (CEST) Message-ID: <515D9D54.4060703@FreeBSD.org> Date: Thu, 04 Apr 2013 17:33:40 +0200 From: Martin Matuska User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130328 Thunderbird/17.0.5 MIME-Version: 1.0 To: Andriy Gapon Subject: Re: svn commit: r248571 - in head: . cddl/contrib/opensolaris/cmd/zdb cddl/contrib/opensolaris/cmd/zfs cddl/contrib/opensolaris/cmd/zhack cddl/contrib/opensolaris/cmd/zpool cddl/contrib/opensolaris/cmd... References: <201303210838.r2L8c3OB097432@svn.freebsd.org> <20130401083731.GA1973@a91-153-126-50.elisa-laajakaista.fi> <515D94E5.2030902@FreeBSD.org> In-Reply-To: <515D94E5.2030902@FreeBSD.org> X-Enigmail-Version: 1.5.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Antivirus: avast! (VPS 130404-0, 04/04/2013), Outbound message X-Antivirus-Status: Clean Cc: svn-src-head@FreeBSD.org, Jaakko Heinonen , 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: Thu, 04 Apr 2013 15:33:51 -0000 This has been fixed in r249004 On 4. 4. 2013 16:57, Andriy Gapon wrote: > on 01/04/2013 11:37 Jaakko Heinonen said the following: >> Hi, >> >> On 2013-03-21, Martin Matuska wrote: >>> Merge libzfs_core branch: >>> includes MFV 238590, 238592, 247580 >> I am getting the following error after this commit: >> >> # zpool list >> failed to read pool configuration: bad address >> no pools available >> # zfs list >> failed to read pool configuration: bad address >> >> Reverting sys/cddl to r248570 makes it work again. >> >> >From dmesg: >> >> ZFS filesystem version: 5 >> ZFS storage pool version: features support (5000) >> > Any followups on this? > I haven't experienced this problem, but always keep kernel and userland in sync. > -- Martin Matuska FreeBSD committer http://blog.vx.sk From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 15:40:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AA29B5AA; Thu, 4 Apr 2013 15:40:19 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9D1E0AF6; Thu, 4 Apr 2013 15:40:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34FeJbK005789; Thu, 4 Apr 2013 15:40:19 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34FeJHr005788; Thu, 4 Apr 2013 15:40:19 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201304041540.r34FeJHr005788@svn.freebsd.org> From: Rui Paulo Date: Thu, 4 Apr 2013 15:40:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249097 - head/sys/sys 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, 04 Apr 2013 15:40:19 -0000 Author: rpaulo Date: Thu Apr 4 15:40:19 2013 New Revision: 249097 URL: http://svnweb.freebsd.org/changeset/base/249097 Log: Remove a comment about devices being able to specify multiple interrupt types. This is no longer the case because interrupt types now have to map to an ithread priority (c.f. intr_priority()). Modified: head/sys/sys/bus.h Modified: head/sys/sys/bus.h ============================================================================== --- head/sys/sys/bus.h Thu Apr 4 15:16:53 2013 (r249096) +++ head/sys/sys/bus.h Thu Apr 4 15:40:19 2013 (r249097) @@ -178,11 +178,8 @@ typedef void driver_intr_t(void*); * spls implicit in names like INTR_TYPE_TTY. In the meantime, don't * confuse things by renaming them (Grog, 18 July 2000). * - * We define this in terms of bits because some devices may belong - * to multiple classes (and therefore need to be included in - * multiple interrupt masks, which is what this really serves to - * indicate. Buses which do interrupt remapping will want to - * change their type to reflect what sort of devices are underneath. + * Buses which do interrupt remapping will want to change their type + * to reflect what sort of devices are underneath. */ enum intr_type { INTR_TYPE_TTY = 1, From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 17:08:49 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C3382342; Thu, 4 Apr 2013 17:08:49 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B5D281AD; Thu, 4 Apr 2013 17:08:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34H8n5T030707; Thu, 4 Apr 2013 17:08:49 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34H8ngO030705; Thu, 4 Apr 2013 17:08:49 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041708.r34H8ngO030705@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 17:08:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249099 - 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, 04 Apr 2013 17:08:49 -0000 Author: mav Date: Thu Apr 4 17:08:49 2013 New Revision: 249099 URL: http://svnweb.freebsd.org/changeset/base/249099 Log: Remove xpt_sim_opened(), the only consumer of which was atapicam, which is now gone. Modified: head/sys/cam/cam_xpt.c head/sys/cam/cam_xpt_sim.h Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Apr 4 16:02:21 2013 (r249098) +++ head/sys/cam/cam_xpt.c Thu Apr 4 17:08:49 2013 (r249099) @@ -2062,39 +2062,6 @@ xptbustraverse(struct cam_eb *start_bus, return(retval); } -int -xpt_sim_opened(struct cam_sim *sim) -{ - struct cam_eb *bus; - struct cam_et *target; - struct cam_ed *device; - struct cam_periph *periph; - - KASSERT(sim->refcount >= 1, ("sim->refcount >= 1")); - mtx_assert(sim->mtx, MA_OWNED); - - xpt_lock_buses(); - TAILQ_FOREACH(bus, &xsoftc.xpt_busses, links) { - if (bus->sim != sim) - continue; - - TAILQ_FOREACH(target, &bus->et_entries, links) { - TAILQ_FOREACH(device, &target->ed_entries, links) { - SLIST_FOREACH(periph, &device->periphs, - periph_links) { - if (periph->refcount > 0) { - xpt_unlock_buses(); - return (1); - } - } - } - } - } - - xpt_unlock_buses(); - return (0); -} - static int xpttargettraverse(struct cam_eb *bus, struct cam_et *start_target, xpt_targetfunc_t *tr_func, void *arg) Modified: head/sys/cam/cam_xpt_sim.h ============================================================================== --- head/sys/cam/cam_xpt_sim.h Thu Apr 4 16:02:21 2013 (r249098) +++ head/sys/cam/cam_xpt_sim.h Thu Apr 4 17:08:49 2013 (r249099) @@ -49,7 +49,6 @@ void xpt_release_devq(struct cam_path * u_int count, int run_queue); void xpt_release_devq_rl(struct cam_path *path, cam_rl rl, u_int count, int run_queue); -int xpt_sim_opened(struct cam_sim *sim); void xpt_done(union ccb *done_ccb); void xpt_batch_start(struct cam_sim *sim); void xpt_batch_done(struct cam_sim *sim); From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 17:10:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1D3A54DA; Thu, 4 Apr 2013 17:10:37 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0E0D01C2; Thu, 4 Apr 2013 17:10:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34HAahg031183; Thu, 4 Apr 2013 17:10:36 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34HAa9w031182; Thu, 4 Apr 2013 17:10:36 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304041710.r34HAa9w031182@svn.freebsd.org> From: Xin LI Date: Thu, 4 Apr 2013 17:10:36 +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: r249100 - stable/8/cddl/contrib/opensolaris/cmd/zpool 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, 04 Apr 2013 17:10:37 -0000 Author: delphij Date: Thu Apr 4 17:10:36 2013 New Revision: 249100 URL: http://svnweb.freebsd.org/changeset/base/249100 Log: Per Matthew Ahrens, version 5000 should not be exposed to user and there is a problem with my first revision, namely, specifying -d -o feature@...=enable will still bail out with: 'feature@' and 'version' properties cannot be specified together. Because zpool create -o version=5000 will not likely be supported by other ZFS implementations (including ours on -CURRENT and 9-STABLE), remove the hack that make that work. Users who want feature flags support can still do an explicit 'zpool upgrade' after creating a pool. Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 4 17:08:49 2013 (r249099) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 4 17:10:36 2013 (r249100) @@ -865,8 +865,7 @@ zpool_do_create(int argc, char **argv) ZPOOL_PROP_VERSION), "28", &props, B_TRUE)) goto errout; enable_all_pool_feat = B_FALSE; - } else if (enable_all_pool_feat) - nvlist_remove_all(props, zpool_prop_to_name(ZPOOL_PROP_VERSION)); + } #endif /* __FreeBSD__ */ argc -= optind; From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 18:00:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C2D1C9D; Thu, 4 Apr 2013 18:00:19 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B574A5E3; Thu, 4 Apr 2013 18:00:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34I0J4u045946; Thu, 4 Apr 2013 18:00:19 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34I0JBu045945; Thu, 4 Apr 2013 18:00:19 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304041800.r34I0JBu045945@svn.freebsd.org> From: Edward Tomasz Napierala Date: Thu, 4 Apr 2013 18:00:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249102 - 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: Thu, 04 Apr 2013 18:00:19 -0000 Author: trasz Date: Thu Apr 4 18:00:18 2013 New Revision: 249102 URL: http://svnweb.freebsd.org/changeset/base/249102 Log: Since the CTL version in FreeBSD does not support High Availability, ctl_is_single should always be set to 1. Make it so. Previously it was always 0, because ctl_isc_start() never got to run. Suggested by: ken Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Apr 4 17:10:44 2013 (r249101) +++ head/sys/cam/ctl/ctl.c Thu Apr 4 18:00:18 2013 (r249102) @@ -318,7 +318,7 @@ static struct scsi_control_page control_ static int rcv_sync_msg; static int persis_offset; static uint8_t ctl_pause_rtr; -static int ctl_is_single; +static int ctl_is_single = 1; static int index_to_aps_page; #ifdef CTL_DISABLE int ctl_disable = 1; From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 18:59:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 3C8ADEA0; Thu, 4 Apr 2013 18:59:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 16AD4869; Thu, 4 Apr 2013 18:59:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34IxTMa063162; Thu, 4 Apr 2013 18:59:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34IxTgY063161; Thu, 4 Apr 2013 18:59:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041859.r34IxTgY063161@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 18:59:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249104 - 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, 04 Apr 2013 18:59:30 -0000 Author: mav Date: Thu Apr 4 18:59:29 2013 New Revision: 249104 URL: http://svnweb.freebsd.org/changeset/base/249104 Log: MFprojects/camlock r248928: Move CAM_DEBUG_CDB messages from the point of queuing to the point of sending to SIM. That allows to inspect real requests execution order, respecting priorities, freezing, etc. MFC after: 2 weeks Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Apr 4 18:42:23 2013 (r249103) +++ head/sys/cam/cam_xpt.c Thu Apr 4 18:59:29 2013 (r249104) @@ -2430,7 +2430,6 @@ xpt_action(union ccb *start_ccb) void xpt_action_default(union ccb *start_ccb) { - char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; struct cam_path *path; path = start_ccb->ccb_h.path; @@ -2466,11 +2465,6 @@ xpt_action_default(union ccb *start_ccb) start_ccb->ccb_h.target_lun << 5; } start_ccb->csio.scsi_status = SCSI_STATUS_OK; - CAM_DEBUG(path, CAM_DEBUG_CDB,("%s. CDB: %s\n", - scsi_op_desc(start_ccb->csio.cdb_io.cdb_bytes[0], - &path->device->inq_data), - scsi_cdb_string(start_ccb->csio.cdb_io.cdb_bytes, - cdb_str, sizeof(cdb_str)))); } /* FALLTHROUGH */ case XPT_TARGET_IO: @@ -2479,13 +2473,8 @@ xpt_action_default(union ccb *start_ccb) start_ccb->csio.resid = 0; /* FALLTHROUGH */ case XPT_ATA_IO: - if (start_ccb->ccb_h.func_code == XPT_ATA_IO) { + if (start_ccb->ccb_h.func_code == XPT_ATA_IO) start_ccb->ataio.resid = 0; - CAM_DEBUG(path, CAM_DEBUG_CDB,("%s. ACB: %s\n", - ata_op_string(&start_ccb->ataio.cmd), - ata_cmd_string(&start_ccb->ataio.cmd, - cdb_str, sizeof(cdb_str)))); - } /* FALLTHROUGH */ case XPT_RESET_DEV: case XPT_ENG_EXEC: @@ -3228,6 +3217,7 @@ static void xpt_run_dev_sendq(struct cam_eb *bus) { struct cam_devq *devq; + char cdb_str[(SCSI_MAX_CDBLEN * 3) + 1]; CAM_DEBUG_PRINT(CAM_DEBUG_XPT, ("xpt_run_dev_sendq\n")); @@ -3309,6 +3299,26 @@ xpt_run_dev_sendq(struct cam_eb *bus) work_ccb->ccb_h.flags &= ~CAM_TAG_ACTION_VALID; } + switch (work_ccb->ccb_h.func_code) { + case XPT_SCSI_IO: + CAM_DEBUG(work_ccb->ccb_h.path, + CAM_DEBUG_CDB,("%s. CDB: %s\n", + scsi_op_desc(work_ccb->csio.cdb_io.cdb_bytes[0], + &device->inq_data), + scsi_cdb_string(work_ccb->csio.cdb_io.cdb_bytes, + cdb_str, sizeof(cdb_str)))); + break; + case XPT_ATA_IO: + CAM_DEBUG(work_ccb->ccb_h.path, + CAM_DEBUG_CDB,("%s. ACB: %s\n", + ata_op_string(&work_ccb->ataio.cmd), + ata_cmd_string(&work_ccb->ataio.cmd, + cdb_str, sizeof(cdb_str)))); + break; + default: + break; + } + /* * Device queues can be shared among multiple sim instances * that reside on different busses. Use the SIM in the queue From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 19:04:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2FA30E8; Thu, 4 Apr 2013 19:04:16 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1259F892; Thu, 4 Apr 2013 19:04:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34J4Fad065532; Thu, 4 Apr 2013 19:04:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34J4F2I065527; Thu, 4 Apr 2013 19:04:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041904.r34J4F2I065527@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 19:04:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249105 - 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, 04 Apr 2013 19:04:16 -0000 Author: mav Date: Thu Apr 4 19:04:15 2013 New Revision: 249105 URL: http://svnweb.freebsd.org/changeset/base/249105 Log: MFprojects/camlock r248930: Remove extra NULL checks. d_drv1 can never be NULL during periph life cycle. MFC after: 2 weeks Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_cd.c head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Thu Apr 4 18:59:29 2013 (r249104) +++ head/sys/cam/ata/ata_da.c Thu Apr 4 19:04:15 2013 (r249105) @@ -527,10 +527,6 @@ adaopen(struct disk *dp) int error; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) { - return (ENXIO); - } - if (cam_periph_acquire(periph) != CAM_REQ_CMP) { return(ENXIO); } @@ -566,9 +562,6 @@ adaclose(struct disk *dp) union ccb *ccb; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) - return (ENXIO); - cam_periph_lock(periph); if (cam_periph_hold(periph, PRIBIO) != 0) { cam_periph_unlock(periph); @@ -646,10 +639,6 @@ adastrategy(struct bio *bp) struct ada_softc *softc; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph == NULL) { - biofinish(bp, NULL, ENXIO); - return; - } softc = (struct ada_softc *)periph->softc; cam_periph_lock(periph); @@ -704,8 +693,6 @@ adadump(void *arg, void *virtual, vm_off dp = arg; periph = dp->d_drv1; - if (periph == NULL) - return (ENXIO); softc = (struct ada_softc *)periph->softc; cam_periph_lock(periph); secsize = softc->params.secsize; @@ -1038,9 +1025,6 @@ adagetattr(struct bio *bp) struct cam_periph *periph; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph == NULL) - return (ENXIO); - cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Apr 4 18:59:29 2013 (r249104) +++ head/sys/cam/scsi/scsi_cd.c Thu Apr 4 19:04:15 2013 (r249105) @@ -386,7 +386,6 @@ cddiskgonecb(struct disk *dp) struct cam_periph *periph; periph = (struct cam_periph *)dp->d_drv1; - cam_periph_release(periph); } @@ -1073,9 +1072,6 @@ cdopen(struct disk *dp) int error; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) - return (ENXIO); - softc = (struct cd_softc *)periph->softc; if (cam_periph_acquire(periph) != CAM_REQ_CMP) @@ -1120,9 +1116,6 @@ cdclose(struct disk *dp) struct cd_softc *softc; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) - return (ENXIO); - softc = (struct cd_softc *)periph->softc; cam_periph_lock(periph); @@ -1473,11 +1466,6 @@ cdstrategy(struct bio *bp) struct cd_softc *softc; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph == NULL) { - biofinish(bp, NULL, ENXIO); - return; - } - cam_periph_lock(periph); CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("cdstrategy(%p)\n", bp)); @@ -1972,9 +1960,6 @@ cdioctl(struct disk *dp, u_long cmd, voi int nocopyout, error = 0; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) - return(ENXIO); - cam_periph_lock(periph); softc = (struct cd_softc *)periph->softc; Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Apr 4 18:59:29 2013 (r249104) +++ head/sys/cam/scsi/scsi_da.c Thu Apr 4 19:04:15 2013 (r249105) @@ -962,10 +962,6 @@ daopen(struct disk *dp) int error; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) { - return (ENXIO); - } - if (cam_periph_acquire(periph) != CAM_REQ_CMP) { return (ENXIO); } @@ -1027,9 +1023,6 @@ daclose(struct disk *dp) struct da_softc *softc; periph = (struct cam_periph *)dp->d_drv1; - if (periph == NULL) - return (0); - cam_periph_lock(periph); if (cam_periph_hold(periph, PRIBIO) != 0) { cam_periph_unlock(periph); @@ -1118,10 +1111,6 @@ dastrategy(struct bio *bp) struct da_softc *softc; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph == NULL) { - biofinish(bp, NULL, ENXIO); - return; - } softc = (struct da_softc *)periph->softc; cam_periph_lock(periph); @@ -1174,8 +1163,6 @@ dadump(void *arg, void *virtual, vm_offs dp = arg; periph = dp->d_drv1; - if (periph == NULL) - return (ENXIO); softc = (struct da_softc *)periph->softc; cam_periph_lock(periph); secsize = softc->params.secsize; @@ -1250,9 +1237,6 @@ dagetattr(struct bio *bp) struct cam_periph *periph; periph = (struct cam_periph *)bp->bio_disk->d_drv1; - if (periph == NULL) - return (ENXIO); - cam_periph_lock(periph); ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, periph->path); @@ -1295,7 +1279,6 @@ dadiskgonecb(struct disk *dp) struct cam_periph *periph; periph = (struct cam_periph *)dp->d_drv1; - cam_periph_release(periph); } From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 19:07:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 303922EC; Thu, 4 Apr 2013 19:07:39 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 225758BE; Thu, 4 Apr 2013 19:07:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34J7dmk066033; Thu, 4 Apr 2013 19:07:39 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34J7cUW066029; Thu, 4 Apr 2013 19:07:38 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304041907.r34J7cUW066029@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 19:07:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249106 - 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, 04 Apr 2013 19:07:39 -0000 Author: mav Date: Thu Apr 4 19:07:37 2013 New Revision: 249106 URL: http://svnweb.freebsd.org/changeset/base/249106 Log: MFprojects/camlock r248931: Replace some direct mutex operations with wrappers. MFC after: 2 weeks Modified: head/sys/cam/ata/ata_da.c head/sys/cam/scsi/scsi_cd.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 Thu Apr 4 19:04:15 2013 (r249105) +++ head/sys/cam/ata/ata_da.c Thu Apr 4 19:07:37 2013 (r249106) @@ -1114,7 +1114,7 @@ adaregister(struct cam_periph *periph, v * Register this media as a disk */ (void)cam_periph_hold(periph, PRIBIO); - mtx_unlock(periph->sim->mtx); + cam_periph_unlock(periph); snprintf(announce_buf, sizeof(announce_buf), "kern.cam.ada.%d.quirks", periph->unit_number); quirks = softc->quirks; @@ -1208,7 +1208,7 @@ adaregister(struct cam_periph *periph, v } else legacy_id = -1; disk_create(softc->disk, DISK_VERSION); - mtx_lock(periph->sim->mtx); + cam_periph_lock(periph); cam_periph_unhold(periph); dp = &softc->params; Modified: head/sys/cam/scsi/scsi_cd.c ============================================================================== --- head/sys/cam/scsi/scsi_cd.c Thu Apr 4 19:04:15 2013 (r249105) +++ head/sys/cam/scsi/scsi_cd.c Thu Apr 4 19:07:37 2013 (r249106) @@ -1446,7 +1446,7 @@ cdgetccb(struct cam_periph *periph, u_in softc->changer->flags |= CHANGER_MANUAL_CALL; cdrunchangerqueue(softc->changer); } else - msleep(&softc->changer, periph->sim->mtx, + cam_periph_sleep(periph, &softc->changer, PRIBIO, "cgticb", 0); } } Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Thu Apr 4 19:04:15 2013 (r249105) +++ head/sys/cam/scsi/scsi_da.c Thu Apr 4 19:07:37 2013 (r249106) @@ -988,7 +988,7 @@ daopen(struct disk *dp) dareprobe(periph); /* Wait for the disk size update. */ - error = msleep(&softc->disk->d_mediasize, periph->sim->mtx, PRIBIO, + error = cam_periph_sleep(periph, &softc->disk->d_mediasize, PRIBIO, "dareprobe", 0); if (error != 0) xpt_print(periph->path, "unable to retrieve capacity data"); @@ -1688,7 +1688,7 @@ daregister(struct cam_periph *periph, vo (da_default_timeout * hz) / DA_ORDEREDTAG_INTERVAL, dasendorderedtag, softc); - mtx_unlock(periph->sim->mtx); + cam_periph_unlock(periph); /* * RBC devices don't have to support READ(6), only READ(10). */ @@ -1773,12 +1773,12 @@ daregister(struct cam_periph *periph, vo if (cam_periph_acquire(periph) != CAM_REQ_CMP) { xpt_print(periph->path, "%s: lost periph during " "registration!\n", __func__); - mtx_lock(periph->sim->mtx); + cam_periph_lock(periph); return (CAM_REQ_CMP_ERR); } disk_create(softc->disk, DISK_VERSION); - mtx_lock(periph->sim->mtx); + cam_periph_lock(periph); /* * Add async callbacks for events of interest. Modified: head/sys/cam/scsi/scsi_pass.c ============================================================================== --- head/sys/cam/scsi/scsi_pass.c Thu Apr 4 19:04:15 2013 (r249105) +++ head/sys/cam/scsi/scsi_pass.c Thu Apr 4 19:07:37 2013 (r249106) @@ -381,7 +381,7 @@ passregister(struct cam_periph *periph, * know what the blocksize of this device is, if * it even has a blocksize. */ - mtx_unlock(periph->sim->mtx); + cam_periph_unlock(periph); no_tags = (cgd->inq_data.flags & SID_CmdQue) == 0; softc->device_stats = devstat_new_entry("pass", periph->unit_number, 0, @@ -417,7 +417,7 @@ passregister(struct cam_periph *periph, */ dev_ref(softc->dev); - mtx_lock(periph->sim->mtx); + cam_periph_lock(periph); softc->dev->si_drv1 = periph; TASK_INIT(&softc->add_physpath_task, /*priority*/0, From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 19:31:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1A1066D8; Thu, 4 Apr 2013 19:31:20 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E717297B; Thu, 4 Apr 2013 19:31:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34JVJoC074065; Thu, 4 Apr 2013 19:31:19 GMT (envelope-from rakuco@svn.freebsd.org) Received: (from rakuco@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34JVJVV074063; Thu, 4 Apr 2013 19:31:19 GMT (envelope-from rakuco@svn.freebsd.org) Message-Id: <201304041931.r34JVJVV074063@svn.freebsd.org> From: Raphael Kubo da Costa Date: Thu, 4 Apr 2013 19:31:19 +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: r249107 - in stable/8: share/man/man4 sys/netgraph/bluetooth/drivers/ubt 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, 04 Apr 2013 19:31:20 -0000 Author: rakuco (ports committer) Date: Thu Apr 4 19:31:19 2013 New Revision: 249107 URL: http://svnweb.freebsd.org/changeset/base/249107 Log: MFC r244704, r244714 and r244715: Add vendor IDs for Broadcom USB dongles (BCM20702). PR: kern/174707 Approved by: glebius Modified: stable/8/share/man/man4/ng_ubt.4 stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Directory Properties: stable/8/share/man/man4/ (props changed) stable/8/sys/ (props changed) stable/8/sys/netgraph/ (props changed) Modified: stable/8/share/man/man4/ng_ubt.4 ============================================================================== --- stable/8/share/man/man4/ng_ubt.4 Thu Apr 4 19:07:37 2013 (r249106) +++ stable/8/share/man/man4/ng_ubt.4 Thu Apr 4 19:31:19 2013 (r249107) @@ -25,7 +25,7 @@ .\" $Id: ng_ubt.4,v 1.3 2003/05/21 19:37:35 max Exp $ .\" $FreeBSD$ .\" -.Dd September 13, 2004 +.Dd December 26, 2012 .Dt NG_UBT 4 .Os .Sh NAME @@ -73,6 +73,8 @@ Mitsumi Bluetooth USB adapter MSI MS-6967 .It TDK Bluetooth USB adapter +.It +Broadcom Bluetooth USB adapter .El .Sh HOOKS This node type supports the following hooks: Modified: stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Thu Apr 4 19:07:37 2013 (r249106) +++ stable/8/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Thu Apr 4 19:31:19 2013 (r249107) @@ -398,6 +398,12 @@ static const STRUCT_USB_HOST_ID ubt_devs /* AVM USB Bluetooth-Adapter BlueFritz! v2.0 */ { USB_VPI(USB_VENDOR_AVM, 0x3800, 0) }, + + /* Broadcom USB dongles, mostly BCM20702 and BCM20702A0 */ + { USB_VENDOR(USB_VENDOR_BROADCOM), + USB_IFACE_CLASS(UICLASS_VENDOR), + USB_IFACE_SUBCLASS(UDSUBCLASS_RF), + USB_IFACE_PROTOCOL(UDPROTO_BLUETOOTH) }, }; /* @@ -1748,7 +1754,7 @@ static device_method_t ubt_methods[] = DEVMETHOD(device_probe, ubt_probe), DEVMETHOD(device_attach, ubt_attach), DEVMETHOD(device_detach, ubt_detach), - { 0, 0 } + DEVMETHOD_END }; static driver_t ubt_driver = From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 20:31:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 0D351F09; Thu, 4 Apr 2013 20:31:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F1ACBB8D; Thu, 4 Apr 2013 20:31:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34KVfAO092006; Thu, 4 Apr 2013 20:31:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34KVeb1092001; Thu, 4 Apr 2013 20:31:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304042031.r34KVeb1092001@svn.freebsd.org> From: Alexander Motin Date: Thu, 4 Apr 2013 20:31:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249108 - 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, 04 Apr 2013 20:31:42 -0000 Author: mav Date: Thu Apr 4 20:31:40 2013 New Revision: 249108 URL: http://svnweb.freebsd.org/changeset/base/249108 Log: MFprojects/camlock: r249017: Some cosmetic things: - Unify device to target insertion inside xpt_alloc_device() instead of duplicating it three times. - Remove extra checks for empty lists of devices and targets on release since zero refcount check also implies it. - Reformat code to reduce indentation. r249103: - Add lock assertions to every point where reference counters are modified. - When reference counters are reaching zero, add assertions that there are no children items left. - Add a bit more locking to the xptpdperiphtraverse(). Modified: head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_periph.c head/sys/cam/cam_sim.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 Apr 4 19:31:19 2013 (r249107) +++ head/sys/cam/ata/ata_xpt.c Thu Apr 4 20:31:40 2013 (r249108) @@ -1534,7 +1534,6 @@ ata_alloc_device(struct cam_eb *bus, str struct cam_path path; struct ata_quirk_entry *quirk; struct cam_ed *device; - struct cam_ed *cur_device; device = xpt_alloc_device(bus, target, lun_id); if (device == NULL) @@ -1559,16 +1558,6 @@ ata_alloc_device(struct cam_eb *bus, str * do. */ bus->sim->max_ccbs += device->ccbq.devq_openings; - /* Insertion sort into our target's device list */ - cur_device = TAILQ_FIRST(&target->ed_entries); - while (cur_device != NULL && cur_device->lun_id < lun_id) - cur_device = TAILQ_NEXT(cur_device, links); - if (cur_device != NULL) { - TAILQ_INSERT_BEFORE(cur_device, device, links); - } else { - TAILQ_INSERT_TAIL(&target->ed_entries, device, links); - } - target->generation++; if (lun_id != CAM_LUN_WILDCARD) { xpt_compile_path(&path, NULL, Modified: head/sys/cam/cam_periph.c ============================================================================== --- head/sys/cam/cam_periph.c Thu Apr 4 19:31:19 2013 (r249107) +++ head/sys/cam/cam_periph.c Thu Apr 4 20:31:40 2013 (r249108) @@ -378,13 +378,10 @@ cam_periph_acquire(struct cam_periph *pe void cam_periph_release_locked_buses(struct cam_periph *periph) { - if (periph->refcount != 0) { - periph->refcount--; - } else { - panic("%s: release of %p when refcount is zero\n ", __func__, - periph); - } - if (periph->refcount == 0 + + mtx_assert(periph->sim->mtx, MA_OWNED); + KASSERT(periph->refcount >= 1, ("periph->refcount >= 1")); + if (--periph->refcount == 0 && (periph->flags & CAM_PERIPH_INVALID)) { camperiphfree(periph); } @@ -583,6 +580,7 @@ cam_periph_invalidate(struct cam_periph { CAM_DEBUG(periph->path, CAM_DEBUG_INFO, ("Periph invalidated\n")); + mtx_assert(periph->sim->mtx, MA_OWNED); /* * We only call this routine the first time a peripheral is * invalidated. @@ -605,6 +603,7 @@ camperiphfree(struct cam_periph *periph) { struct periph_driver **p_drv; + mtx_assert(periph->sim->mtx, MA_OWNED); for (p_drv = periph_drivers; *p_drv != NULL; p_drv++) { if (strcmp((*p_drv)->driver_name, periph->periph_name) == 0) break; Modified: head/sys/cam/cam_sim.c ============================================================================== --- head/sys/cam/cam_sim.c Thu Apr 4 19:31:19 2013 (r249107) +++ head/sys/cam/cam_sim.c Thu Apr 4 20:31:40 2013 (r249108) @@ -109,6 +109,7 @@ cam_sim_free(struct cam_sim *sim, int fr union ccb *ccb; int error; + mtx_assert(sim->mtx, MA_OWNED); sim->refcount--; if (sim->refcount > 0) { error = msleep(sim, sim->mtx, PRIBIO, "simfree", 0); Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Thu Apr 4 19:31:19 2013 (r249107) +++ head/sys/cam/cam_xpt.c Thu Apr 4 20:31:40 2013 (r249108) @@ -2069,6 +2069,7 @@ xpttargettraverse(struct cam_eb *bus, st struct cam_et *target, *next_target; int retval; + mtx_assert(bus->sim->mtx, MA_OWNED); retval = 1; for (target = (start_target ? start_target : TAILQ_FIRST(&bus->et_entries)); @@ -2096,6 +2097,7 @@ xptdevicetraverse(struct cam_et *target, struct cam_ed *device, *next_device; int retval; + mtx_assert(target->bus->sim->mtx, MA_OWNED); retval = 1; for (device = (start_device ? start_device : TAILQ_FIRST(&target->ed_entries)); @@ -2134,6 +2136,7 @@ xptperiphtraverse(struct cam_ed *device, retval = 1; + mtx_assert(device->sim->mtx, MA_OWNED); xpt_lock_buses(); for (periph = (start_periph ? start_periph : SLIST_FIRST(&device->periphs)); @@ -2215,6 +2218,7 @@ xptpdperiphtraverse(struct periph_driver xpt_periphfunc_t *tr_func, void *arg) { struct cam_periph *periph, *next_periph; + struct cam_sim *sim; int retval; retval = 1; @@ -2243,7 +2247,10 @@ xptpdperiphtraverse(struct periph_driver * traversal function, so it can't go away. */ periph->refcount++; - + sim = periph->sim; + xpt_unlock_buses(); + CAM_SIM_LOCK(sim); + xpt_lock_buses(); retval = tr_func(periph, arg); /* @@ -2253,6 +2260,7 @@ xptpdperiphtraverse(struct periph_driver next_periph = TAILQ_NEXT(periph, unit_links); cam_periph_release_locked_buses(periph); + CAM_SIM_UNLOCK(sim); if (retval == 0) goto bailout_done; @@ -3534,13 +3542,13 @@ xpt_path_counts(struct cam_path *path, u else *bus_ref = 0; } - xpt_unlock_buses(); if (periph_ref) { if (path->periph) *periph_ref = path->periph->refcount; else *periph_ref = 0; } + xpt_unlock_buses(); if (target_ref) { if (path->target) *target_ref = path->target->refcount; @@ -4415,54 +4423,55 @@ xpt_release_bus(struct cam_eb *bus) xpt_lock_buses(); KASSERT(bus->refcount >= 1, ("bus->refcount >= 1")); - if ((--bus->refcount == 0) - && (TAILQ_FIRST(&bus->et_entries) == NULL)) { - TAILQ_REMOVE(&xsoftc.xpt_busses, bus, links); - xsoftc.bus_generation++; - xpt_unlock_buses(); - cam_sim_release(bus->sim); - free(bus, M_CAMXPT); - } else + if (--bus->refcount > 0) { xpt_unlock_buses(); + return; + } + KASSERT(TAILQ_EMPTY(&bus->et_entries), + ("refcount is zero, but target list is not empty")); + TAILQ_REMOVE(&xsoftc.xpt_busses, bus, links); + xsoftc.bus_generation++; + xpt_unlock_buses(); + cam_sim_release(bus->sim); + free(bus, M_CAMXPT); } static struct cam_et * xpt_alloc_target(struct cam_eb *bus, target_id_t target_id) { - struct cam_et *target; + struct cam_et *cur_target, *target; + mtx_assert(bus->sim->mtx, MA_OWNED); target = (struct cam_et *)malloc(sizeof(*target), M_CAMXPT, M_NOWAIT|M_ZERO); - if (target != NULL) { - struct cam_et *cur_target; - - TAILQ_INIT(&target->ed_entries); - target->bus = bus; - target->target_id = target_id; - target->refcount = 1; - target->generation = 0; - target->luns = NULL; - timevalclear(&target->last_reset); - /* - * Hold a reference to our parent bus so it - * will not go away before we do. - */ - xpt_lock_buses(); - bus->refcount++; - xpt_unlock_buses(); + if (target == NULL) + return (NULL); - /* Insertion sort into our bus's target list */ - cur_target = TAILQ_FIRST(&bus->et_entries); - while (cur_target != NULL && cur_target->target_id < target_id) - cur_target = TAILQ_NEXT(cur_target, links); + TAILQ_INIT(&target->ed_entries); + target->bus = bus; + target->target_id = target_id; + target->refcount = 1; + target->generation = 0; + target->luns = NULL; + timevalclear(&target->last_reset); + /* + * Hold a reference to our parent bus so it + * will not go away before we do. + */ + xpt_lock_buses(); + bus->refcount++; + xpt_unlock_buses(); - if (cur_target != NULL) { - TAILQ_INSERT_BEFORE(cur_target, target, links); - } else { - TAILQ_INSERT_TAIL(&bus->et_entries, target, links); - } - bus->generation++; + /* Insertion sort into our bus's target list */ + cur_target = TAILQ_FIRST(&bus->et_entries); + while (cur_target != NULL && cur_target->target_id < target_id) + cur_target = TAILQ_NEXT(cur_target, links); + if (cur_target != NULL) { + TAILQ_INSERT_BEFORE(cur_target, target, links); + } else { + TAILQ_INSERT_TAIL(&bus->et_entries, target, links); } + bus->generation++; return (target); } @@ -4470,24 +4479,24 @@ static void xpt_release_target(struct cam_et *target) { - if (target->refcount == 1) { - if (TAILQ_FIRST(&target->ed_entries) == NULL) { - TAILQ_REMOVE(&target->bus->et_entries, target, links); - target->bus->generation++; - xpt_release_bus(target->bus); - if (target->luns) - free(target->luns, M_CAMXPT); - free(target, M_CAMXPT); - } - } else - target->refcount--; + mtx_assert(target->bus->sim->mtx, MA_OWNED); + if (--target->refcount > 0) + return; + KASSERT(TAILQ_EMPTY(&target->ed_entries), + ("refcount is zero, but device list is not empty")); + TAILQ_REMOVE(&target->bus->et_entries, target, links); + target->bus->generation++; + xpt_release_bus(target->bus); + if (target->luns) + free(target->luns, M_CAMXPT); + free(target, M_CAMXPT); } static struct cam_ed * xpt_alloc_device_default(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) { - struct cam_ed *device, *cur_device; + struct cam_ed *device; device = xpt_alloc_device(bus, target, lun_id); if (device == NULL) @@ -4496,73 +4505,65 @@ xpt_alloc_device_default(struct cam_eb * device->mintags = 1; device->maxtags = 1; bus->sim->max_ccbs += device->ccbq.devq_openings; - cur_device = TAILQ_FIRST(&target->ed_entries); - while (cur_device != NULL && cur_device->lun_id < lun_id) - cur_device = TAILQ_NEXT(cur_device, links); - if (cur_device != NULL) { - TAILQ_INSERT_BEFORE(cur_device, device, links); - } else { - TAILQ_INSERT_TAIL(&target->ed_entries, device, links); - } - target->generation++; - return (device); } struct cam_ed * xpt_alloc_device(struct cam_eb *bus, struct cam_et *target, lun_id_t lun_id) { - struct cam_ed *device; - struct cam_devq *devq; + struct cam_ed *cur_device, *device; + struct cam_devq *devq; cam_status status; + mtx_assert(target->bus->sim->mtx, MA_OWNED); /* Make space for us in the device queue on our bus */ devq = bus->sim->devq; status = cam_devq_resize(devq, devq->alloc_queue.array_size + 1); + if (status != CAM_REQ_CMP) + return (NULL); - if (status != CAM_REQ_CMP) { - device = NULL; - } else { - device = (struct cam_ed *)malloc(sizeof(*device), - M_CAMDEV, M_NOWAIT|M_ZERO); - } - - if (device != NULL) { - cam_init_pinfo(&device->alloc_ccb_entry.pinfo); - device->alloc_ccb_entry.device = device; - cam_init_pinfo(&device->send_ccb_entry.pinfo); - device->send_ccb_entry.device = device; - device->target = target; - device->lun_id = lun_id; - device->sim = bus->sim; - /* Initialize our queues */ - if (camq_init(&device->drvq, 0) != 0) { - 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_CAMDEV); - return (NULL); - } - SLIST_INIT(&device->asyncs); - SLIST_INIT(&device->periphs); - device->generation = 0; - device->owner = NULL; - device->flags = CAM_DEV_UNCONFIGURED; - device->tag_delay_count = 0; - device->tag_saved_openings = 0; - device->refcount = 1; - callout_init_mtx(&device->callout, bus->sim->mtx, 0); - - /* - * Hold a reference to our parent target so it - * will not go away before we do. - */ - target->refcount++; + device = (struct cam_ed *)malloc(sizeof(*device), + M_CAMDEV, M_NOWAIT|M_ZERO); + if (device == NULL) + return (NULL); + cam_init_pinfo(&device->alloc_ccb_entry.pinfo); + device->alloc_ccb_entry.device = device; + cam_init_pinfo(&device->send_ccb_entry.pinfo); + device->send_ccb_entry.device = device; + device->target = target; + device->lun_id = lun_id; + device->sim = bus->sim; + /* Initialize our queues */ + if (camq_init(&device->drvq, 0) != 0) { + 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_CAMDEV); + return (NULL); } + SLIST_INIT(&device->asyncs); + SLIST_INIT(&device->periphs); + device->generation = 0; + device->owner = NULL; + device->flags = CAM_DEV_UNCONFIGURED; + device->tag_delay_count = 0; + device->tag_saved_openings = 0; + device->refcount = 1; + callout_init_mtx(&device->callout, bus->sim->mtx, 0); + + cur_device = TAILQ_FIRST(&target->ed_entries); + while (cur_device != NULL && cur_device->lun_id < lun_id) + cur_device = TAILQ_NEXT(cur_device, links); + if (cur_device != NULL) + TAILQ_INSERT_BEFORE(cur_device, device, links); + else + TAILQ_INSERT_TAIL(&target->ed_entries, device, links); + target->refcount++; + target->generation++; return (device); } @@ -4570,46 +4571,49 @@ void xpt_acquire_device(struct cam_ed *device) { + mtx_assert(device->sim->mtx, MA_OWNED); device->refcount++; } void xpt_release_device(struct cam_ed *device) { + struct cam_devq *devq; - if (device->refcount == 1) { - struct cam_devq *devq; + mtx_assert(device->sim->mtx, MA_OWNED); + if (--device->refcount > 0) + return; - if (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX - || device->send_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX) - panic("Removing device while still queued for ccbs"); - - if ((device->flags & CAM_DEV_REL_TIMEOUT_PENDING) != 0) - callout_stop(&device->callout); - - TAILQ_REMOVE(&device->target->ed_entries, device,links); - device->target->generation++; - device->target->bus->sim->max_ccbs -= device->ccbq.devq_openings; - /* Release our slot in the devq */ - devq = device->target->bus->sim->devq; - cam_devq_resize(devq, devq->alloc_queue.array_size - 1); - camq_fini(&device->drvq); - cam_ccbq_fini(&device->ccbq); - /* - * Free allocated memory. free(9) does nothing if the - * supplied pointer is NULL, so it is safe to call without - * checking. - */ - free(device->supported_vpds, M_CAMXPT); - free(device->device_id, M_CAMXPT); - free(device->physpath, M_CAMXPT); - free(device->rcap_buf, M_CAMXPT); - free(device->serial_num, M_CAMXPT); + KASSERT(SLIST_EMPTY(&device->periphs), + ("refcount is zero, but periphs list is not empty")); + if (device->alloc_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX + || device->send_ccb_entry.pinfo.index != CAM_UNQUEUED_INDEX) + panic("Removing device while still queued for ccbs"); + + if ((device->flags & CAM_DEV_REL_TIMEOUT_PENDING) != 0) + callout_stop(&device->callout); + + TAILQ_REMOVE(&device->target->ed_entries, device,links); + device->target->generation++; + device->target->bus->sim->max_ccbs -= device->ccbq.devq_openings; + /* Release our slot in the devq */ + devq = device->target->bus->sim->devq; + cam_devq_resize(devq, devq->alloc_queue.array_size - 1); + camq_fini(&device->drvq); + cam_ccbq_fini(&device->ccbq); + /* + * Free allocated memory. free(9) does nothing if the + * supplied pointer is NULL, so it is safe to call without + * checking. + */ + free(device->supported_vpds, M_CAMXPT); + free(device->device_id, M_CAMXPT); + free(device->physpath, M_CAMXPT); + free(device->rcap_buf, M_CAMXPT); + free(device->serial_num, M_CAMXPT); - xpt_release_target(device->target); - free(device, M_CAMDEV); - } else - device->refcount--; + xpt_release_target(device->target); + free(device, M_CAMDEV); } u_int32_t @@ -4657,6 +4661,7 @@ xpt_find_target(struct cam_eb *bus, targ { struct cam_et *target; + mtx_assert(bus->sim->mtx, MA_OWNED); for (target = TAILQ_FIRST(&bus->et_entries); target != NULL; target = TAILQ_NEXT(target, links)) { @@ -4673,6 +4678,7 @@ xpt_find_device(struct cam_et *target, l { struct cam_ed *device; + mtx_assert(target->bus->sim->mtx, MA_OWNED); for (device = TAILQ_FIRST(&target->ed_entries); device != NULL; device = TAILQ_NEXT(device, links)) { Modified: head/sys/cam/scsi/scsi_xpt.c ============================================================================== --- head/sys/cam/scsi/scsi_xpt.c Thu Apr 4 19:31:19 2013 (r249107) +++ head/sys/cam/scsi/scsi_xpt.c Thu Apr 4 20:31:40 2013 (r249108) @@ -2306,7 +2306,6 @@ scsi_alloc_device(struct cam_eb *bus, st struct cam_path path; struct scsi_quirk_entry *quirk; struct cam_ed *device; - struct cam_ed *cur_device; device = xpt_alloc_device(bus, target, lun_id); if (device == NULL) @@ -2335,16 +2334,6 @@ scsi_alloc_device(struct cam_eb *bus, st * do. */ bus->sim->max_ccbs += device->ccbq.devq_openings; - /* Insertion sort into our target's device list */ - cur_device = TAILQ_FIRST(&target->ed_entries); - while (cur_device != NULL && cur_device->lun_id < lun_id) - cur_device = TAILQ_NEXT(cur_device, links); - if (cur_device != NULL) { - TAILQ_INSERT_BEFORE(cur_device, device, links); - } else { - TAILQ_INSERT_TAIL(&target->ed_entries, device, links); - } - target->generation++; if (lun_id != CAM_LUN_WILDCARD) { xpt_compile_path(&path, NULL, From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 20:53:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 984EE34F; Thu, 4 Apr 2013 20:53:26 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-we0-x231.google.com (mail-we0-x231.google.com [IPv6:2a00:1450:400c:c03::231]) by mx1.freebsd.org (Postfix) with ESMTP id ADB0FCEC; Thu, 4 Apr 2013 20:53:25 +0000 (UTC) Received: by mail-we0-f177.google.com with SMTP id o45so2354644wer.8 for ; Thu, 04 Apr 2013 13:53:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Qh4/cM8o5QqwSugfpp4AYptHZxPn9y2znoW1p9qYjQQ=; b=K73560gMkjdbySk3jSjobeFhwaBGZ9I0M/1YlJE9votARsGAwfzo0HTfGxGSjCZPqh XkEDBA+Nl5XxycQhRedDiwTI2zSwJSm0ej/57xVLSgi2lnOakMIYXSDsuF1kbKswiObY wwyBDovpaXp0viM25JUj8aa3Ik9Uea8gk7aqh6NAxf5oxGn+2AZwn/OaEIJqBZzuE2XM ngGD1v99qhHHZ712FDvVkeJ/MJUqCK7oiuDoaTm2zU19UfwNd25yuNZgQ8WnyEaKBVBo JPk4sPIabBWZwPgCDX7uPeyoI5ijNSEDmvOdT/ml9gtlz08eFghNCmSY6+838IP6LRb9 vMgw== MIME-Version: 1.0 X-Received: by 10.180.77.226 with SMTP id v2mr1551292wiw.33.1365108804875; Thu, 04 Apr 2013 13:53:24 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.216.212.73 with HTTP; Thu, 4 Apr 2013 13:53:24 -0700 (PDT) In-Reply-To: <201304041904.r34J4F2I065527@svn.freebsd.org> References: <201304041904.r34J4F2I065527@svn.freebsd.org> Date: Thu, 4 Apr 2013 13:53:24 -0700 X-Google-Sender-Auth: uoYQITC4VhgHjAtQc0xiopSz3Qk Message-ID: Subject: Re: svn commit: r249105 - in head/sys/cam: ata scsi From: Adrian Chadd To: Alexander Motin Content-Type: text/plain; charset=ISO-8859-1 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: Thu, 04 Apr 2013 20:53:26 -0000 Hi, Isn't this a prime candidate to replace with KASSERT()? Thanks, Adrian On 4 April 2013 12:04, Alexander Motin wrote: > Author: mav > Date: Thu Apr 4 19:04:15 2013 > New Revision: 249105 > URL: http://svnweb.freebsd.org/changeset/base/249105 > > Log: > MFprojects/camlock r248930: > Remove extra NULL checks. d_drv1 can never be NULL during periph life cycle. > > MFC after: 2 weeks > > Modified: > head/sys/cam/ata/ata_da.c > head/sys/cam/scsi/scsi_cd.c > head/sys/cam/scsi/scsi_da.c > > Modified: head/sys/cam/ata/ata_da.c > ============================================================================== > --- head/sys/cam/ata/ata_da.c Thu Apr 4 18:59:29 2013 (r249104) > +++ head/sys/cam/ata/ata_da.c Thu Apr 4 19:04:15 2013 (r249105) > @@ -527,10 +527,6 @@ adaopen(struct disk *dp) > int error; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) { > - return (ENXIO); > - } > - > if (cam_periph_acquire(periph) != CAM_REQ_CMP) { > return(ENXIO); > } > @@ -566,9 +562,6 @@ adaclose(struct disk *dp) > union ccb *ccb; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) > - return (ENXIO); > - > cam_periph_lock(periph); > if (cam_periph_hold(periph, PRIBIO) != 0) { > cam_periph_unlock(periph); > @@ -646,10 +639,6 @@ adastrategy(struct bio *bp) > struct ada_softc *softc; > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > - if (periph == NULL) { > - biofinish(bp, NULL, ENXIO); > - return; > - } > softc = (struct ada_softc *)periph->softc; > > cam_periph_lock(periph); > @@ -704,8 +693,6 @@ adadump(void *arg, void *virtual, vm_off > > dp = arg; > periph = dp->d_drv1; > - if (periph == NULL) > - return (ENXIO); > softc = (struct ada_softc *)periph->softc; > cam_periph_lock(periph); > secsize = softc->params.secsize; > @@ -1038,9 +1025,6 @@ adagetattr(struct bio *bp) > struct cam_periph *periph; > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > - if (periph == NULL) > - return (ENXIO); > - > cam_periph_lock(periph); > ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, > periph->path); > > Modified: head/sys/cam/scsi/scsi_cd.c > ============================================================================== > --- head/sys/cam/scsi/scsi_cd.c Thu Apr 4 18:59:29 2013 (r249104) > +++ head/sys/cam/scsi/scsi_cd.c Thu Apr 4 19:04:15 2013 (r249105) > @@ -386,7 +386,6 @@ cddiskgonecb(struct disk *dp) > struct cam_periph *periph; > > periph = (struct cam_periph *)dp->d_drv1; > - > cam_periph_release(periph); > } > > @@ -1073,9 +1072,6 @@ cdopen(struct disk *dp) > int error; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) > - return (ENXIO); > - > softc = (struct cd_softc *)periph->softc; > > if (cam_periph_acquire(periph) != CAM_REQ_CMP) > @@ -1120,9 +1116,6 @@ cdclose(struct disk *dp) > struct cd_softc *softc; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) > - return (ENXIO); > - > softc = (struct cd_softc *)periph->softc; > > cam_periph_lock(periph); > @@ -1473,11 +1466,6 @@ cdstrategy(struct bio *bp) > struct cd_softc *softc; > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > - if (periph == NULL) { > - biofinish(bp, NULL, ENXIO); > - return; > - } > - > cam_periph_lock(periph); > CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, > ("cdstrategy(%p)\n", bp)); > @@ -1972,9 +1960,6 @@ cdioctl(struct disk *dp, u_long cmd, voi > int nocopyout, error = 0; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) > - return(ENXIO); > - > cam_periph_lock(periph); > > softc = (struct cd_softc *)periph->softc; > > Modified: head/sys/cam/scsi/scsi_da.c > ============================================================================== > --- head/sys/cam/scsi/scsi_da.c Thu Apr 4 18:59:29 2013 (r249104) > +++ head/sys/cam/scsi/scsi_da.c Thu Apr 4 19:04:15 2013 (r249105) > @@ -962,10 +962,6 @@ daopen(struct disk *dp) > int error; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) { > - return (ENXIO); > - } > - > if (cam_periph_acquire(periph) != CAM_REQ_CMP) { > return (ENXIO); > } > @@ -1027,9 +1023,6 @@ daclose(struct disk *dp) > struct da_softc *softc; > > periph = (struct cam_periph *)dp->d_drv1; > - if (periph == NULL) > - return (0); > - > cam_periph_lock(periph); > if (cam_periph_hold(periph, PRIBIO) != 0) { > cam_periph_unlock(periph); > @@ -1118,10 +1111,6 @@ dastrategy(struct bio *bp) > struct da_softc *softc; > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > - if (periph == NULL) { > - biofinish(bp, NULL, ENXIO); > - return; > - } > softc = (struct da_softc *)periph->softc; > > cam_periph_lock(periph); > @@ -1174,8 +1163,6 @@ dadump(void *arg, void *virtual, vm_offs > > dp = arg; > periph = dp->d_drv1; > - if (periph == NULL) > - return (ENXIO); > softc = (struct da_softc *)periph->softc; > cam_periph_lock(periph); > secsize = softc->params.secsize; > @@ -1250,9 +1237,6 @@ dagetattr(struct bio *bp) > struct cam_periph *periph; > > periph = (struct cam_periph *)bp->bio_disk->d_drv1; > - if (periph == NULL) > - return (ENXIO); > - > cam_periph_lock(periph); > ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, > periph->path); > @@ -1295,7 +1279,6 @@ dadiskgonecb(struct disk *dp) > struct cam_periph *periph; > > periph = (struct cam_periph *)dp->d_drv1; > - > cam_periph_release(periph); > } > From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 20:57:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5B4A1510; Thu, 4 Apr 2013 20:57:59 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f53.google.com (mail-ee0-f53.google.com [74.125.83.53]) by mx1.freebsd.org (Postfix) with ESMTP id 014A8D1B; Thu, 4 Apr 2013 20:57:57 +0000 (UTC) Received: by mail-ee0-f53.google.com with SMTP id c13so1140977eek.26 for ; Thu, 04 Apr 2013 13:57:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=s2ttozT7A06tv5yGAwpz6r60KKr5UJKZrHwknkpep8c=; b=pcZhcowGcjl6IKZglT3ewi9XFPvfBuqISnIIjeSLS6u6cuxFakgVWauE7DH/QdXAPd qscCPXFHymrjSNrWdQgAmhZyMiXi1eeGn9cUApTJEftCglle186+sC8mi2I5JagD830H VYVcoEG5bK8TdsfGmxUV/NKWoIEeb9LLoA3IGYMkpkK+uWAm53rpad825lntRN8mStrn vS+xa6+6tcycEu0XxLndVbYfciuhQdKvyZfyIP40/XhrsvsdoINgWZuo6sDumim7RdKa jbymXzF1bCskqVs56K46MlAmJzGrMAChKCqwoH/zfVxU4gcVAuvfQ/rCSk+9T0ZYplf7 PaUA== X-Received: by 10.15.35.193 with SMTP id g41mr13719956eev.45.1365109071064; Thu, 04 Apr 2013 13:57:51 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id bc1sm12444771eeb.11.2013.04.04.13.57.47 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 04 Apr 2013 13:57:50 -0700 (PDT) Sender: Alexander Motin Message-ID: <515DE949.6050309@FreeBSD.org> Date: Thu, 04 Apr 2013 23:57:45 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130326 Thunderbird/17.0.4 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r249105 - in head/sys/cam: ata scsi References: <201304041904.r34J4F2I065527@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: Thu, 04 Apr 2013 20:57:59 -0000 On 04.04.2013 23:53, Adrian Chadd wrote: > Hi, > > Isn't this a prime candidate to replace with KASSERT()? It could be, but NULL dereference attempt will crash system no less reliably then KASSERT. > On 4 April 2013 12:04, Alexander Motin wrote: >> Author: mav >> Date: Thu Apr 4 19:04:15 2013 >> New Revision: 249105 >> URL: http://svnweb.freebsd.org/changeset/base/249105 >> >> Log: >> MFprojects/camlock r248930: >> Remove extra NULL checks. d_drv1 can never be NULL during periph life cycle. >> >> MFC after: 2 weeks >> >> Modified: >> head/sys/cam/ata/ata_da.c >> head/sys/cam/scsi/scsi_cd.c >> head/sys/cam/scsi/scsi_da.c >> >> Modified: head/sys/cam/ata/ata_da.c >> ============================================================================== >> --- head/sys/cam/ata/ata_da.c Thu Apr 4 18:59:29 2013 (r249104) >> +++ head/sys/cam/ata/ata_da.c Thu Apr 4 19:04:15 2013 (r249105) >> @@ -527,10 +527,6 @@ adaopen(struct disk *dp) >> int error; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) { >> - return (ENXIO); >> - } >> - >> if (cam_periph_acquire(periph) != CAM_REQ_CMP) { >> return(ENXIO); >> } >> @@ -566,9 +562,6 @@ adaclose(struct disk *dp) >> union ccb *ccb; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> - >> cam_periph_lock(periph); >> if (cam_periph_hold(periph, PRIBIO) != 0) { >> cam_periph_unlock(periph); >> @@ -646,10 +639,6 @@ adastrategy(struct bio *bp) >> struct ada_softc *softc; >> >> periph = (struct cam_periph *)bp->bio_disk->d_drv1; >> - if (periph == NULL) { >> - biofinish(bp, NULL, ENXIO); >> - return; >> - } >> softc = (struct ada_softc *)periph->softc; >> >> cam_periph_lock(periph); >> @@ -704,8 +693,6 @@ adadump(void *arg, void *virtual, vm_off >> >> dp = arg; >> periph = dp->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> softc = (struct ada_softc *)periph->softc; >> cam_periph_lock(periph); >> secsize = softc->params.secsize; >> @@ -1038,9 +1025,6 @@ adagetattr(struct bio *bp) >> struct cam_periph *periph; >> >> periph = (struct cam_periph *)bp->bio_disk->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> - >> cam_periph_lock(periph); >> ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, >> periph->path); >> >> Modified: head/sys/cam/scsi/scsi_cd.c >> ============================================================================== >> --- head/sys/cam/scsi/scsi_cd.c Thu Apr 4 18:59:29 2013 (r249104) >> +++ head/sys/cam/scsi/scsi_cd.c Thu Apr 4 19:04:15 2013 (r249105) >> @@ -386,7 +386,6 @@ cddiskgonecb(struct disk *dp) >> struct cam_periph *periph; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - >> cam_periph_release(periph); >> } >> >> @@ -1073,9 +1072,6 @@ cdopen(struct disk *dp) >> int error; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> - >> softc = (struct cd_softc *)periph->softc; >> >> if (cam_periph_acquire(periph) != CAM_REQ_CMP) >> @@ -1120,9 +1116,6 @@ cdclose(struct disk *dp) >> struct cd_softc *softc; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> - >> softc = (struct cd_softc *)periph->softc; >> >> cam_periph_lock(periph); >> @@ -1473,11 +1466,6 @@ cdstrategy(struct bio *bp) >> struct cd_softc *softc; >> >> periph = (struct cam_periph *)bp->bio_disk->d_drv1; >> - if (periph == NULL) { >> - biofinish(bp, NULL, ENXIO); >> - return; >> - } >> - >> cam_periph_lock(periph); >> CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, >> ("cdstrategy(%p)\n", bp)); >> @@ -1972,9 +1960,6 @@ cdioctl(struct disk *dp, u_long cmd, voi >> int nocopyout, error = 0; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) >> - return(ENXIO); >> - >> cam_periph_lock(periph); >> >> softc = (struct cd_softc *)periph->softc; >> >> Modified: head/sys/cam/scsi/scsi_da.c >> ============================================================================== >> --- head/sys/cam/scsi/scsi_da.c Thu Apr 4 18:59:29 2013 (r249104) >> +++ head/sys/cam/scsi/scsi_da.c Thu Apr 4 19:04:15 2013 (r249105) >> @@ -962,10 +962,6 @@ daopen(struct disk *dp) >> int error; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) { >> - return (ENXIO); >> - } >> - >> if (cam_periph_acquire(periph) != CAM_REQ_CMP) { >> return (ENXIO); >> } >> @@ -1027,9 +1023,6 @@ daclose(struct disk *dp) >> struct da_softc *softc; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - if (periph == NULL) >> - return (0); >> - >> cam_periph_lock(periph); >> if (cam_periph_hold(periph, PRIBIO) != 0) { >> cam_periph_unlock(periph); >> @@ -1118,10 +1111,6 @@ dastrategy(struct bio *bp) >> struct da_softc *softc; >> >> periph = (struct cam_periph *)bp->bio_disk->d_drv1; >> - if (periph == NULL) { >> - biofinish(bp, NULL, ENXIO); >> - return; >> - } >> softc = (struct da_softc *)periph->softc; >> >> cam_periph_lock(periph); >> @@ -1174,8 +1163,6 @@ dadump(void *arg, void *virtual, vm_offs >> >> dp = arg; >> periph = dp->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> softc = (struct da_softc *)periph->softc; >> cam_periph_lock(periph); >> secsize = softc->params.secsize; >> @@ -1250,9 +1237,6 @@ dagetattr(struct bio *bp) >> struct cam_periph *periph; >> >> periph = (struct cam_periph *)bp->bio_disk->d_drv1; >> - if (periph == NULL) >> - return (ENXIO); >> - >> cam_periph_lock(periph); >> ret = xpt_getattr(bp->bio_data, bp->bio_length, bp->bio_attribute, >> periph->path); >> @@ -1295,7 +1279,6 @@ dadiskgonecb(struct disk *dp) >> struct cam_periph *periph; >> >> periph = (struct cam_periph *)dp->d_drv1; >> - >> cam_periph_release(periph); >> } >> -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 21:19:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7E3028A3; Thu, 4 Apr 2013 21:19:00 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6D9DCDE0; Thu, 4 Apr 2013 21:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34LJ0RM004792; Thu, 4 Apr 2013 21:19:00 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34LIw3B004769; Thu, 4 Apr 2013 21:18:58 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304042118.r34LIw3B004769@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 4 Apr 2013 21:18:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249109 - in vendor-sys/acpica/dist: . generate/unix/acpiexec generate/unix/acpihelp generate/unix/iasl source/common source/compiler source/components/debugger source/components/dispat... X-SVN-Group: vendor-sys 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, 04 Apr 2013 21:19:00 -0000 Author: jkim Date: Thu Apr 4 21:18:57 2013 New Revision: 249109 URL: http://svnweb.freebsd.org/changeset/base/249109 Log: Import ACPICA 20130328. Added: vendor-sys/acpica/dist/source/compiler/asllistsup.c (contents, props changed) vendor-sys/acpica/dist/source/compiler/asloffset.c (contents, props changed) vendor-sys/acpica/dist/source/components/utilities/utpredef.c (contents, props changed) Modified: vendor-sys/acpica/dist/changes.txt vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile vendor-sys/acpica/dist/generate/unix/iasl/Makefile vendor-sys/acpica/dist/source/common/ahpredef.c vendor-sys/acpica/dist/source/compiler/aslcompile.c vendor-sys/acpica/dist/source/compiler/aslcompiler.h vendor-sys/acpica/dist/source/compiler/asldefine.h vendor-sys/acpica/dist/source/compiler/aslerror.c vendor-sys/acpica/dist/source/compiler/aslfiles.c vendor-sys/acpica/dist/source/compiler/aslglobal.h vendor-sys/acpica/dist/source/compiler/asllisting.c vendor-sys/acpica/dist/source/compiler/aslmain.c vendor-sys/acpica/dist/source/compiler/aslpredef.c vendor-sys/acpica/dist/source/compiler/aslprepkg.c vendor-sys/acpica/dist/source/compiler/aslresource.c vendor-sys/acpica/dist/source/compiler/asltypes.h vendor-sys/acpica/dist/source/compiler/aslwalks.c vendor-sys/acpica/dist/source/components/debugger/dbmethod.c vendor-sys/acpica/dist/source/components/debugger/dbnames.c vendor-sys/acpica/dist/source/components/dispatcher/dsopcode.c vendor-sys/acpica/dist/source/components/dispatcher/dswexec.c vendor-sys/acpica/dist/source/components/events/evevent.c vendor-sys/acpica/dist/source/components/executer/exoparg2.c vendor-sys/acpica/dist/source/components/namespace/nseval.c vendor-sys/acpica/dist/source/components/namespace/nspredef.c vendor-sys/acpica/dist/source/components/tables/tbfadt.c vendor-sys/acpica/dist/source/components/tables/tbxface.c vendor-sys/acpica/dist/source/components/utilities/utdelete.c vendor-sys/acpica/dist/source/components/utilities/utmutex.c vendor-sys/acpica/dist/source/components/utilities/utosi.c vendor-sys/acpica/dist/source/components/utilities/utxface.c vendor-sys/acpica/dist/source/include/acglobal.h vendor-sys/acpica/dist/source/include/aclocal.h vendor-sys/acpica/dist/source/include/acnamesp.h vendor-sys/acpica/dist/source/include/acpixf.h vendor-sys/acpica/dist/source/include/acpredef.h vendor-sys/acpica/dist/source/include/acutils.h vendor-sys/acpica/dist/source/tools/acpihelp/ahdecode.c vendor-sys/acpica/dist/source/tools/acpisrc/astable.c Modified: vendor-sys/acpica/dist/changes.txt ============================================================================== --- vendor-sys/acpica/dist/changes.txt Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/changes.txt Thu Apr 4 21:18:57 2013 (r249109) @@ -1,4 +1,79 @@ ---------------------------------------- +28 March 2013. Summary of changes for version 20130328: + +1) ACPICA kernel-resident subsystem: + +Fixed several possible race conditions with the internal object reference +counting mechanism. Some of the external ACPICA interfaces update object +reference counts without holding the interpreter or namespace lock. This +change adds a spinlock to protect reference count updates on the internal +ACPICA objects. Reported by and with assistance from Andriy Gapon +(avg@FreeBSD.org). + +FADT support: Removed an extraneous warning for very large GPE register +sets. This change removes a size mismatch warning if the legacy length +field for a GPE register set is larger than the 64-bit GAS structure can +accommodate. GPE register sets can be larger than the 255-bit width +limitation of the GAS structure. Linn Crosetto (linn@hp.com). + +_OSI Support: handle any errors from AcpiOsAcquireMutex. Check for error +return from this interface. Handles a possible timeout case if +ACPI_WAIT_FOREVER is modified by the host to be a value less than +"forever". Jung-uk Kim. + +Predefined name support: Add allowed/required argument type information to +the master predefined info table. This change adds the infrastructure to +enable typechecking on incoming arguments for all predefined +methods/objects. It does not actually contain the code that will fully +utilize this information, this is still under development. Also condenses +some duplicate code for the predefined names into a new module, +utilities/utpredef.c + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 95.0K Code, 25.9K Data, 120.9K Total + Debug Version: 182.9K Code, 75.6K Data, 258.5K Total + Current Release: + Non-Debug Version: 95.2K Code, 26.4K Data, 121.6K Total + Debug Version: 183.0K Code, 76.0K Data, 259.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented a new option to simplify the development of ACPI-related +BIOS code. Adds support for a new "offset table" output file. The -so +option will create a C table containing the AML table offsets of various +named objects in the namespace so that BIOS code can modify them easily at +boot time. This can simplify BIOS runtime code by eliminating expensive +searches for "magic values", enhancing boot times and adding greater +reliability. With assistance from Lee Hamel. + +iASL: Allow additional predefined names to return zero-length packages. +Now, all predefined names that are defined by the ACPI specification to +return a "variable-length package of packages" are allowed to return a +zero length top-level package. This allows the BIOS to tell the host that +the requested feature is not supported, and supports existing BIOS/ASL +code and practices. + +iASL: Changed the "result not used" warning to an error. This is the case +where an ASL operator is effectively a NOOP because the result of the +operation is not stored anywhere. For example: + Add (4, Local0) +There is no target (missing 3rd argument), nor is the function return +value used. This is potentially a very serious problem -- since the code +was probably intended to do something, but for whatever reason, the value +was not stored. Therefore, this issue has been upgraded from a warning to +an error. + +AcpiHelp: Added allowable/required argument types to the predefined names +info display. This feature utilizes the recent update to the predefined +names table (above). + +---------------------------------------- 14 February 2013. Summary of changes for version 20130214: 1) ACPICA Kernel-resident Subsystem: Modified: vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/generate/unix/acpiexec/Makefile Thu Apr 4 21:18:57 2013 (r249109) @@ -202,6 +202,7 @@ OBJECTS = \ $(OBJDIR)/utobject.o\ $(OBJDIR)/utosi.o\ $(OBJDIR)/utownerid.o\ + $(OBJDIR)/utpredef.o\ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ Modified: vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/generate/unix/acpihelp/Makefile Thu Apr 4 21:18:57 2013 (r249109) @@ -34,7 +34,8 @@ OBJECTS = \ $(OBJDIR)/ahpredef.o\ $(OBJDIR)/ahmain.o\ $(OBJDIR)/getopt.o\ - $(OBJDIR)/utexcep.o + $(OBJDIR)/utexcep.o\ + $(OBJDIR)/utpredef.o # # Flags specific to acpihelp Modified: vendor-sys/acpica/dist/generate/unix/iasl/Makefile ============================================================================== --- vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/generate/unix/iasl/Makefile Thu Apr 4 21:18:57 2013 (r249109) @@ -58,12 +58,14 @@ OBJECTS = \ $(OBJDIR)/aslhex.o\ $(OBJDIR)/asllength.o\ $(OBJDIR)/asllisting.o\ + $(OBJDIR)/asllistsup.o\ $(OBJDIR)/aslload.o\ $(OBJDIR)/asllookup.o\ $(OBJDIR)/aslmain.o\ $(OBJDIR)/aslmap.o\ $(OBJDIR)/aslmethod.o\ $(OBJDIR)/aslnamesp.o\ + $(OBJDIR)/asloffset.o\ $(OBJDIR)/aslopcodes.o\ $(OBJDIR)/asloperands.o\ $(OBJDIR)/aslopt.o\ @@ -188,6 +190,7 @@ OBJECTS = \ $(OBJDIR)/utmutex.o\ $(OBJDIR)/utobject.o\ $(OBJDIR)/utownerid.o\ + $(OBJDIR)/utpredef.o\ $(OBJDIR)/utresrc.o\ $(OBJDIR)/utstate.o\ $(OBJDIR)/utstring.o\ Modified: vendor-sys/acpica/dist/source/common/ahpredef.c ============================================================================== --- vendor-sys/acpica/dist/source/common/ahpredef.c Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/common/ahpredef.c Thu Apr 4 21:18:57 2013 (r249109) @@ -61,7 +61,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = { AH_PREDEF ("_ACx", "Active Cooling", "Returns the active cooling policy threshold values"), - AH_PREDEF ("_ADR", "Address", "Returns the address of a device on its parent bus"), + AH_PREDEF ("_ADR", "Address", "Returns address of a device on parent bus, and resource field"), AH_PREDEF ("_AEI", "ACPI Event Interrupts", "Returns a list of GPIO events to be used as ACPI events"), AH_PREDEF ("_ALC", "Ambient Light Chromaticity", "Returns the ambient light color chromaticity"), AH_PREDEF ("_ALI", "Ambient Light Illuminance", "Returns the ambient light brightness"), @@ -113,7 +113,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_DGS", "Display Graphics State", "Return the current state of the output device"), AH_PREDEF ("_DIS", "Disable Device", "Disables a device"), AH_PREDEF ("_DLM", "Device Lock Mutex", "Defines mutex for OS/AML sharing"), - AH_PREDEF ("_DMA", "Direct Memory Access", "Returns a device's current resources for DMA transactions"), + AH_PREDEF ("_DMA", "Direct Memory Access", "Returns device current resources for DMA transactions, and resource field"), AH_PREDEF ("_DOD", "Display Output Devices", "Enumerate all devices attached to the display adapter"), AH_PREDEF ("_DOS", "Disable Output Switching", "Sets the display output switching mode"), AH_PREDEF ("_DPL", "Device Selection Polarity", "Polarity of Device Selection signal, Resource Descriptor field"), Modified: vendor-sys/acpica/dist/source/compiler/aslcompile.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/aslcompile.c Thu Apr 4 21:18:57 2013 (r249109) @@ -126,6 +126,7 @@ AslCompilerSignon ( break; case ASL_FILE_C_SOURCE_OUTPUT: + case ASL_FILE_C_OFFSET_OUTPUT: case ASL_FILE_C_INCLUDE_OUTPUT: Prefix = " * "; @@ -199,6 +200,7 @@ AslCompilerFileHeader ( break; case ASL_FILE_C_SOURCE_OUTPUT: + case ASL_FILE_C_OFFSET_OUTPUT: case ASL_FILE_C_INCLUDE_OUTPUT: Prefix = " * "; @@ -222,6 +224,7 @@ AslCompilerFileHeader ( switch (FileId) { case ASL_FILE_C_SOURCE_OUTPUT: + case ASL_FILE_C_OFFSET_OUTPUT: case ASL_FILE_C_INCLUDE_OUTPUT: FlPrintFile (FileId, " */\n"); break; Modified: vendor-sys/acpica/dist/source/compiler/aslcompiler.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/aslcompiler.h Thu Apr 4 21:18:57 2013 (r249109) @@ -350,22 +350,65 @@ LsDoListings ( void); void +LsWriteNodeToAsmListing ( + ACPI_PARSE_OBJECT *Op); + +void +LsWriteNode ( + ACPI_PARSE_OBJECT *Op, + UINT32 FileId); + +void +LsDumpParseTree ( + void); + + +/* + * asllistsup - Listing file support utilities + */ +void +LsDumpAscii ( + UINT32 FileId, + UINT32 Count, + UINT8 *Buffer); + +void LsDumpAsciiInComment ( UINT32 FileId, UINT32 Count, UINT8 *Buffer); void -LsWriteNodeToAsmListing ( - ACPI_PARSE_OBJECT *Op); +LsCheckException ( + UINT32 LineNumber, + UINT32 FileId); void -LsWriteNode ( - ACPI_PARSE_OBJECT *Op, +LsFlushListingBuffer ( UINT32 FileId); void -LsDumpParseTree ( +LsWriteListingHexBytes ( + UINT8 *Buffer, + UINT32 Length, + UINT32 FileId); + +void +LsWriteSourceLines ( + UINT32 ToLineNumber, + UINT32 ToLogicalLineNumber, + UINT32 FileId); + +UINT32 +LsWriteOneSourceLine ( + UINT32 FileId); + +void +LsPushNode ( + char *Filename); + +ASL_LISTING_NODE * +LsPopNode ( void); @@ -388,6 +431,24 @@ OpcAmlConstantWalk ( /* + * asloffset - generate C offset file for BIOS support + */ +ACPI_STATUS +LsAmlOffsetWalk ( + ACPI_PARSE_OBJECT *Op, + UINT32 Level, + void *Context); + +void +LsDoOffsetTableHeader ( + UINT32 FileId); + +void +LsDoOffsetTableFooter ( + UINT32 FileId); + + +/* * aslopcodes - generate AML opcodes */ ACPI_STATUS Modified: vendor-sys/acpica/dist/source/compiler/asldefine.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/asldefine.h Thu Apr 4 21:18:57 2013 (r249109) @@ -120,6 +120,7 @@ #define FILE_SUFFIX_ASM_INCLUDE "inc" #define FILE_SUFFIX_C_INCLUDE "h" #define FILE_SUFFIX_ASL_CODE "asl" +#define FILE_SUFFIX_C_OFFSET "offset.h" /* Types for input files */ @@ -138,6 +139,11 @@ #define ASL_EOF ACPI_UINT32_MAX +/* Listings */ + +#define ASL_LISTING_LINE_PREFIX ": " + + /* Support for reserved method names */ #define ACPI_VALID_RESERVED_NAME_MAX 0x80000000 Modified: vendor-sys/acpica/dist/source/compiler/aslerror.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/aslerror.c Thu Apr 4 21:18:57 2013 (r249109) @@ -302,12 +302,25 @@ AePrintException ( } else { - while (RActual && SourceByte && (SourceByte != '\n') && (Total < 256)) + /* Read/write the source line, up to the maximum line length */ + + while (RActual && SourceByte && (SourceByte != '\n')) { - if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + if (Total < 256) { - printf ("[*** iASL: Write error on output file ***]\n"); - return; + /* After the max line length, we will just read the line, no write */ + + if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + { + printf ("[*** iASL: Write error on output file ***]\n"); + return; + } + } + else if (Total == 256) + { + fprintf (OutputFile, + "\n[*** iASL: Very long input line, message below refers to column %u ***]", + Enode->Column); } RActual = fread (&SourceByte, 1, 1, SourceFile); @@ -320,13 +333,6 @@ AePrintException ( } Total++; } - - if (Total >= 256) - { - fprintf (OutputFile, - "\n[*** iASL: Long input line, an error occurred at column %u ***]", - Enode->Column); - } } } } Modified: vendor-sys/acpica/dist/source/compiler/aslfiles.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/aslfiles.c Thu Apr 4 21:18:57 2013 (r249109) @@ -675,6 +675,27 @@ FlOpenMiscOutputFiles ( AslCompilerFileHeader (ASL_FILE_C_SOURCE_OUTPUT); } + /* Create/Open a C code source output file for the offset table if asked */ + + if (Gbl_C_OffsetTableFlag) + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_C_OFFSET); + if (!Filename) + { + AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME, + 0, 0, 0, 0, NULL, NULL); + return (AE_ERROR); + } + + /* Open the C code source file, text mode */ + + FlOpenFile (ASL_FILE_C_OFFSET_OUTPUT, Filename, "w+t"); + + FlPrintFile (ASL_FILE_C_OFFSET_OUTPUT, "/*\n"); + AslCompilerSignon (ASL_FILE_C_OFFSET_OUTPUT); + AslCompilerFileHeader (ASL_FILE_C_OFFSET_OUTPUT); + } + /* Create/Open a assembly include output file if asked */ if (Gbl_AsmIncludeOutputFlag) Modified: vendor-sys/acpica/dist/source/compiler/aslglobal.h ============================================================================== --- vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/aslglobal.h Thu Apr 4 21:18:57 2013 (r249109) @@ -86,7 +86,8 @@ ASL_FILE_INFO Gbl_ {NULL, NULL, "ASM Source: ", "Assembly Code Output"}, {NULL, NULL, "C Source: ", "C Code Output"}, {NULL, NULL, "ASM Include: ", "Assembly Header Output"}, - {NULL, NULL, "C Include: ", "C Header Output"} + {NULL, NULL, "C Include: ", "C Header Output"}, + {NULL, NULL, "Offset Table: ", "C Offset Table Output"} }; #else @@ -143,6 +144,7 @@ ASL_EXTERN BOOLEAN ASL_ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DebugFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OutputFlag, FALSE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OffsetTableFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmIncludeOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_IncludeOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ListingFlag, FALSE); Modified: vendor-sys/acpica/dist/source/compiler/asllisting.c ============================================================================== --- vendor-sys/acpica/dist/source/compiler/asllisting.c Thu Apr 4 20:31:40 2013 (r249108) +++ vendor-sys/acpica/dist/source/compiler/asllisting.c Thu Apr 4 21:18:57 2013 (r249109) @@ -41,896 +41,234 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include "aslcompiler.h" #include "aslcompiler.y.h" #include "amlcode.h" #include "acparser.h" #include "acnamesp.h" -#define _COMPONENT ACPI_COMPILER - ACPI_MODULE_NAME ("aslisting") - -/* Local prototypes */ - -static void -LsDumpAscii ( - UINT32 FileId, - UINT32 Count, - UINT8 *Buffer); - -static ACPI_STATUS -LsAmlListingWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context); - -static void -LsGenerateListing ( - UINT32 FileId); - -static void -LsPushNode ( - char *Filename); - -static ASL_LISTING_NODE * -LsPopNode ( - void); - -static void -LsCheckException ( - UINT32 LineNumber, - UINT32 FileId); - -static void -LsFlushListingBuffer ( - UINT32 FileId); - -static void -LsWriteListingHexBytes ( - UINT8 *Buffer, - UINT32 Length, - UINT32 FileId); - -static UINT32 -LsWriteOneSourceLine ( - UINT32 FileId); - -static void -LsFinishSourceListing ( - UINT32 FileId); - -static void -LsWriteSourceLines ( - UINT32 ToLineNumber, - UINT32 ToLogicalLineNumber, - UINT32 FileId); - -static void -LsWriteNodeToListing ( - ACPI_PARSE_OBJECT *Op, - UINT32 FileId); - -static ACPI_STATUS -LsTreeWriteWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context); - -#define ASL_LISTING_LINE_PREFIX ": " - - -/******************************************************************************* - * - * FUNCTION: LsDoListings - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Generate all requested listing files. - * - ******************************************************************************/ - -void -LsDoListings ( - void) -{ - - if (Gbl_C_OutputFlag) - { - LsGenerateListing (ASL_FILE_C_SOURCE_OUTPUT); - } - - if (Gbl_ListingFlag) - { - LsGenerateListing (ASL_FILE_LISTING_OUTPUT); - } - - if (Gbl_AsmOutputFlag) - { - LsGenerateListing (ASL_FILE_ASM_SOURCE_OUTPUT); - } - - if (Gbl_C_IncludeOutputFlag) - { - LsGenerateListing (ASL_FILE_C_INCLUDE_OUTPUT); - } - - if (Gbl_AsmIncludeOutputFlag) - { - LsGenerateListing (ASL_FILE_ASM_INCLUDE_OUTPUT); - } -} - - -/******************************************************************************* - * - * FUNCTION: LsTreeWriteWalk - * - * PARAMETERS: ASL_WALK_CALLBACK - * - * - * RETURN: None - * - * DESCRIPTION: Dump entire parse tree, for compiler debug only - * - ******************************************************************************/ - -static ACPI_STATUS -LsTreeWriteWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context) -{ - - /* Debug output */ - - DbgPrint (ASL_TREE_OUTPUT, - "%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level); - UtPrintFormattedName (Op->Asl.ParseOpcode, Level); - - - DbgPrint (ASL_TREE_OUTPUT, "\n"); - return (AE_OK); -} - - -void -LsDumpParseTree ( - void) -{ - - if (!Gbl_DebugFlag) - { - return; - } - - DbgPrint (ASL_TREE_OUTPUT, "\nOriginal parse tree from parser:\n\n"); - TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD, - LsTreeWriteWalk, NULL, NULL); -} - - -/******************************************************************************* - * - * FUNCTION: LsDumpAscii - * - * PARAMETERS: FileId - ID of current listing file - * Count - Number of bytes to convert - * Buffer - Buffer of bytes to convert - * - * RETURN: None - * - * DESCRIPTION: Convert hex bytes to ascii - * - ******************************************************************************/ - -static void -LsDumpAscii ( - UINT32 FileId, - UINT32 Count, - UINT8 *Buffer) -{ - UINT8 BufChar; - UINT32 i; - - - FlPrintFile (FileId, " \""); - for (i = 0; i < Count; i++) - { - BufChar = Buffer[i]; - if (isprint (BufChar)) - { - FlPrintFile (FileId, "%c", BufChar); - } - else - { - /* Not a printable character, just put out a dot */ - - FlPrintFile (FileId, "."); - } - } - FlPrintFile (FileId, "\""); -} - - -/******************************************************************************* - * - * FUNCTION: LsDumpAsciiInComment - * - * PARAMETERS: FileId - ID of current listing file - * Count - Number of bytes to convert - * Buffer - Buffer of bytes to convert - * - * RETURN: None - * - * DESCRIPTION: Convert hex bytes to ascii - * - ******************************************************************************/ - -void -LsDumpAsciiInComment ( - UINT32 FileId, - UINT32 Count, - UINT8 *Buffer) -{ - UINT8 BufChar = 0; - UINT8 LastChar; - UINT32 i; - - FlPrintFile (FileId, " \""); - for (i = 0; i < Count; i++) - { - LastChar = BufChar; - BufChar = Buffer[i]; - - if (isprint (BufChar)) - { - /* Handle embedded C comment sequences */ - - if (((LastChar == '*') && (BufChar == '/')) || - ((LastChar == '/') && (BufChar == '*'))) - { - /* Insert a space to break the sequence */ - - FlPrintFile (FileId, ".", BufChar); - } - - FlPrintFile (FileId, "%c", BufChar); - } - else - { - /* Not a printable character, just put out a dot */ - - FlPrintFile (FileId, "."); - } - } - FlPrintFile (FileId, "\""); -} - - -/******************************************************************************* - * - * FUNCTION: LsAmlListingWalk - * - * PARAMETERS: ASL_WALK_CALLBACK - * - * RETURN: Status - * - * DESCRIPTION: Process one node during a listing file generation. - * - ******************************************************************************/ - -static ACPI_STATUS -LsAmlListingWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context) -{ - UINT8 FileByte; - UINT32 i; - UINT32 FileId = (UINT32) ACPI_TO_INTEGER (Context); - - - LsWriteNodeToListing (Op, FileId); - - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DATA) - { - /* Buffer is a resource template, don't dump the data all at once */ - - return (AE_OK); - } - - /* Write the hex bytes to the listing file(s) (if requested) */ - - for (i = 0; i < Op->Asl.FinalAmlLength; i++) - { - if (ACPI_FAILURE (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1))) - { - FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ); - AslAbort (); - } - LsWriteListingHexBytes (&FileByte, 1, FileId); - } - - return (AE_OK); -} - - -/******************************************************************************* - * - * FUNCTION: LsGenerateListing - * - * PARAMETERS: FileId - ID of listing file - * - * RETURN: None - * - * DESCRIPTION: Generate a listing file. This can be one of the several types - * of "listings" supported. - * - ******************************************************************************/ - -static void -LsGenerateListing ( - UINT32 FileId) -{ - - /* Start at the beginning of both the source and AML files */ - - FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0); - FlSeekFile (ASL_FILE_AML_OUTPUT, 0); - Gbl_SourceLine = 0; - Gbl_CurrentHexColumn = 0; - LsPushNode (Gbl_Files[ASL_FILE_INPUT].Filename); - - /* Process all parse nodes */ - - TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD, LsAmlListingWalk, - NULL, (void *) ACPI_TO_POINTER (FileId)); - - /* Final processing */ - - LsFinishSourceListing (FileId); -} - - -/******************************************************************************* - * - * FUNCTION: LsPushNode - * - * PARAMETERS: Filename - Pointer to the include filename - * - * RETURN: None - * - * DESCRIPTION: Push a listing node on the listing/include file stack. This - * stack enables tracking of include files (infinitely nested) - * and resumption of the listing of the parent file when the - * include file is finished. - * - ******************************************************************************/ - -static void -LsPushNode ( - char *Filename) -{ - ASL_LISTING_NODE *Lnode; - - - /* Create a new node */ - - Lnode = UtLocalCalloc (sizeof (ASL_LISTING_NODE)); - - /* Initialize */ - - Lnode->Filename = Filename; - Lnode->LineNumber = 0; - - /* Link (push) */ - - Lnode->Next = Gbl_ListingNode; - Gbl_ListingNode = Lnode; -} - - -/******************************************************************************* - * - * FUNCTION: LsPopNode - * - * PARAMETERS: None - * - * RETURN: List head after current head is popped off - * - * DESCRIPTION: Pop the current head of the list, free it, and return the - * next node on the stack (the new current node). - * - ******************************************************************************/ - -static ASL_LISTING_NODE * -LsPopNode ( - void) -{ - ASL_LISTING_NODE *Lnode; - - - /* Just grab the node at the head of the list */ - - Lnode = Gbl_ListingNode; - if ((!Lnode) || - (!Lnode->Next)) - { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL, - "Could not pop empty listing stack"); - return (Gbl_ListingNode); - } - - Gbl_ListingNode = Lnode->Next; - ACPI_FREE (Lnode); - - /* New "Current" node is the new head */ - - return (Gbl_ListingNode); -} - - -/******************************************************************************* - * - * FUNCTION: LsCheckException - * - * PARAMETERS: LineNumber - Current logical (cumulative) line # - * FileId - ID of output listing file - * - * RETURN: None - * - * DESCRIPTION: Check if there is an exception for this line, and if there is, - * put it in the listing immediately. Handles multiple errors - * per line. Gbl_NextError points to the next error in the - * sorted (by line #) list of compile errors/warnings. - * - ******************************************************************************/ - -static void -LsCheckException ( - UINT32 LineNumber, - UINT32 FileId) -{ - - if ((!Gbl_NextError) || - (LineNumber < Gbl_NextError->LogicalLineNumber )) - { - return; - } - - /* Handle multiple errors per line */ - - if (FileId == ASL_FILE_LISTING_OUTPUT) - { - while (Gbl_NextError && - (LineNumber >= Gbl_NextError->LogicalLineNumber)) - { - AePrintException (FileId, Gbl_NextError, "\n[****iasl****]\n"); - - Gbl_NextError = Gbl_NextError->Next; - } - - FlPrintFile (FileId, "\n"); - } -} - - -/******************************************************************************* - * - * FUNCTION: LsFlushListingBuffer - * - * PARAMETERS: FileId - ID of the listing file - * - * RETURN: None - * - * DESCRIPTION: Flush out the current contents of the 16-byte hex AML code - * buffer. Usually called at the termination of a single line - * of source code or when the buffer is full. - * - ******************************************************************************/ - -static void -LsFlushListingBuffer ( - UINT32 FileId) -{ - UINT32 i; - - - if (Gbl_CurrentHexColumn == 0) - { - return; - } - - /* Write the hex bytes */ - - switch (FileId) - { - case ASL_FILE_LISTING_OUTPUT: - - for (i = 0; i < Gbl_CurrentHexColumn; i++) - { - FlPrintFile (FileId, "%2.2X ", Gbl_AmlBuffer[i]); - } - - for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 3); i++) - { - FlWriteFile (FileId, ".", 1); - } - - /* Write the ASCII character associated with each of the bytes */ - - LsDumpAscii (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer); - break; - - - case ASL_FILE_ASM_SOURCE_OUTPUT: - - for (i = 0; i < Gbl_CurrentHexColumn; i++) - { - if (i > 0) - { - FlPrintFile (FileId, ","); - } - FlPrintFile (FileId, "0%2.2Xh", Gbl_AmlBuffer[i]); - } - - for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 5); i++) - { - FlWriteFile (FileId, " ", 1); - } - - FlPrintFile (FileId, " ;%8.8X", - Gbl_CurrentAmlOffset - HEX_LISTING_LINE_SIZE); - - /* Write the ASCII character associated with each of the bytes */ - - LsDumpAscii (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer); - break; - - - case ASL_FILE_C_SOURCE_OUTPUT: - - for (i = 0; i < Gbl_CurrentHexColumn; i++) - { - FlPrintFile (FileId, "0x%2.2X,", Gbl_AmlBuffer[i]); - } - - for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 5); i++) - { - FlWriteFile (FileId, " ", 1); - } - - FlPrintFile (FileId, " /* %8.8X", - Gbl_CurrentAmlOffset - HEX_LISTING_LINE_SIZE); - - /* Write the ASCII character associated with each of the bytes */ - - LsDumpAsciiInComment (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer); - FlPrintFile (FileId, " */"); - break; - - default: - /* No other types supported */ - return; - } - - FlPrintFile (FileId, "\n"); - - Gbl_CurrentHexColumn = 0; - Gbl_HexBytesWereWritten = TRUE; -} +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("asllisting") -/******************************************************************************* - * - * FUNCTION: LsWriteListingHexBytes - * - * PARAMETERS: Buffer - AML code buffer - * Length - Number of AML bytes to write - * FileId - ID of current listing file. - * - * RETURN: None - * - * DESCRIPTION: Write the contents of the AML buffer to the listing file via - * the listing buffer. The listing buffer is flushed every 16 - * AML bytes. - * - ******************************************************************************/ +/* Local prototypes */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 21:19:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 15041A1B; Thu, 4 Apr 2013 21:19:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E33D5DEE; Thu, 4 Apr 2013 21:19:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34LJd0Z004908; Thu, 4 Apr 2013 21:19:39 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34LJdut004907; Thu, 4 Apr 2013 21:19:39 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304042119.r34LJdut004907@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 4 Apr 2013 21:19:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249110 - vendor-sys/acpica/20130328 X-SVN-Group: vendor-sys 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, 04 Apr 2013 21:19:40 -0000 Author: jkim Date: Thu Apr 4 21:19:39 2013 New Revision: 249110 URL: http://svnweb.freebsd.org/changeset/base/249110 Log: Tag ACPICA 20130328. Added: vendor-sys/acpica/20130328/ - copied from r249109, vendor-sys/acpica/dist/ From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 21:27:06 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 737F0D6C; Thu, 4 Apr 2013 21:27:06 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id 184B1E5E; Thu, 4 Apr 2013 21:27:06 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id C69D63592F5; Thu, 4 Apr 2013 23:27:03 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id A3A262848C; Thu, 4 Apr 2013 23:27:03 +0200 (CEST) Date: Thu, 4 Apr 2013 23:27:03 +0200 From: Jilles Tjoelker To: Bruce Evans Subject: Re: svn commit: r249035 - head/lib/libc/stdlib Message-ID: <20130404212703.GA1179@stack.nl> References: <201304022341.r32NfL8L096954@svn.freebsd.org> <20130403165736.F819@besplex.bde.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130403165736.F819@besplex.bde.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, Xin LI 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, 04 Apr 2013 21:27:06 -0000 On Wed, Apr 03, 2013 at 06:04:37PM +1100, Bruce Evans wrote: > > Modified: head/lib/libc/stdlib/rand.c > > ============================================================================== > > --- head/lib/libc/stdlib/rand.c Tue Apr 2 21:34:38 2013 (r249034) > > +++ head/lib/libc/stdlib/rand.c Tue Apr 2 23:41:20 2013 (r249035) > > ... > > @@ -112,28 +111,20 @@ u_int seed; > > * sranddev: > > * > > * Many programs choose the seed value in a totally predictable manner. > > - * This often causes problems. We seed the generator using the much more > > - * secure random(4) interface. > > + * This often causes problems. We seed the generator using pseudo-random > > + * data from the kernel. > > */ > > void > > sranddev() > > { > > - int fd, done; > > + int mib[2]; > > + size_t len; > > > > - done = 0; > > - fd = _open("/dev/random", O_RDONLY | O_CLOEXEC, 0); > > - if (fd >= 0) { > > - if (_read(fd, (void *) &next, sizeof(next)) == sizeof(next)) > > - done = 1; > > - _close(fd); > > - } > > - > > - if (!done) { > > - struct timeval tv; > > - > > - gettimeofday(&tv, NULL); > > - srand((getpid() << 16) ^ tv.tv_sec ^ tv.tv_usec); > > - } > _open() and _read() are unlikely to fail, but there was error checking and > handling for them. There was no error checking for the gettimeofday() > call in the error handling. The man page's documentaion of the > implementation details was wrong if the error handling was used. In some sense, omitting the error handling wires down that capability mode must continue to permit KERN_ARND. > This is part of the implementation of the STANDARD library, so it > cannot use POSIX extensions directly. It was careful about this for > _open() and _close(), but not for gettimeofday() or getpid(). This > is completely backwards. _open and _read are in namespace.h so there > is no need to spell them with an underscore, while gettimeofday and > getpid is not in namespace.h so they do need to be spelled with an > underscore. The purpose of namespace.h and un-namespace.h is to declare the underscore versions using the normal headers. Therefore, all functions in namespace.h must be called from libc as their underscore versions. The functions in namespace.h are basically all functions that have or had to be overridden by a threading library, such as for cancellation points, avoiding interference with SIGTHR and libc_r's file descriptor trickery. > This file has massive other (link-time) namespace pollution which makes > the above namespace errors moot. The STANDARD functions that it > implements are rand() and srand(). It implements the extensions > rand_r() and sranddev(). These are not hidden in any way, so they > break public symbols of the same name in the application namespace. > They are not used by rand() or srand(), so they don't break calls to > these functions. They should break linkage to the standard function > if the application has public symbols of the same name. Such breakage > is good for detecting the error, but it only works with static linkage. With dynamic linking there is no error at all for functions defined by the main executable, as long as libc itself does not call the functions by their unadorned names. For example, if the application defines a public symbol rand_r, it completely hides libc's version. If the symbol is in a library belonging to the application, ld may be confused about which version to use. > > + len = sizeof(next); > > + > > + mib[0] = CTL_KERN; > > + mib[1] = KERN_ARND; > > + sysctl(mib, 2, (void *)&next, &len, NULL, 0); > > } > The sysctl() is certain to fail on old kernels (like open of /dev/random > on even older kernels), but there is no longer any error checking or > handling. The contents of `next' on error is indeterminate (not documented > in the man page), but is probably unchanged. Applications can actually > detect this error although though the API doesn't support this, by > using the documented implementation details and assuming that errno > is properly left changed if the syscall fails (set errno to 0 before > the call here and check it after). > sysctl() is not even in any version POSIX.1, so it is further from being > directly usable than _open() and _read(). It is like gettimeofday() > above -- not in namespace.h. It may indeed be useful to add more to namespace.h to avoid interference from the application. Where the functions need not be interposed or used by libthr, they should be removed from Symbol.map so they are called directly instead of via the PLT in libc.so. The fact that libthr is a separate library makes the latter part harder. > Style bugs: > - blank line that separates the initialization of `len' from its use > - unsorted initializations (`len' is a secondary part of the sysctl data > so it might as well be initialized after 'mib' > - use of sysctl() instead of sysctlbyname() > - existence of KERN_ARND so that use of sysctl() is possible. KERN_ARND > is much newer than sysctlbyname(), so it should have been OID_AUTO. > Maybe it exists for compatibility with other OS's, but it shouldn't be > used in new code in FreeBSD. I think it is fine to have static OIDs for sysctls that are very commonly used because it saves a system call to translate the name to the OID. > - bogus cast of &next. In the old code, the cast had an additional style > bug (space after it), but it was necessary and probably sufficient for > supporting K&R with no prototypes. Now it is certainly insufficient, since > the NULL and 0 args to sysctl() are not cast. The cast is indeed against style. -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 21:34:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 604B3192; Thu, 4 Apr 2013 21:34:23 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 51F6CEBC; Thu, 4 Apr 2013 21:34:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34LYNKE010121; Thu, 4 Apr 2013 21:34:23 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34LYNRw010120; Thu, 4 Apr 2013 21:34:23 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304042134.r34LYNRw010120@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 4 Apr 2013 21:34:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249111 - vendor-sys/acpica/dist/source/components/utilities X-SVN-Group: vendor-sys 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, 04 Apr 2013 21:34:23 -0000 Author: jkim Date: Thu Apr 4 21:34:22 2013 New Revision: 249111 URL: http://svnweb.freebsd.org/changeset/base/249111 Log: Fix a potential memory leak. https://github.com/acpica/acpica/pull/6 Modified: vendor-sys/acpica/dist/source/components/utilities/utosi.c Modified: vendor-sys/acpica/dist/source/components/utilities/utosi.c ============================================================================== --- vendor-sys/acpica/dist/source/components/utilities/utosi.c Thu Apr 4 21:19:39 2013 (r249110) +++ vendor-sys/acpica/dist/source/components/utilities/utosi.c Thu Apr 4 21:34:22 2013 (r249111) @@ -392,7 +392,8 @@ AcpiUtOsiImplementation ( Status = AcpiOsAcquireMutex (AcpiGbl_OsiMutex, ACPI_WAIT_FOREVER); if (ACPI_FAILURE (Status)) { - return (Status); + AcpiUtDeleteObjectDesc (ReturnDesc); + return_ACPI_STATUS (Status); } /* Lookup the interface in the global _OSI list */ From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 22:04:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B8582981; Thu, 4 Apr 2013 22:04:38 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 0D177FC4; Thu, 4 Apr 2013 22:04:37 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEALb4XVGDaFvO/2dsb2JhbABDhmS6fYJkgRt0gh8BAQQBIwRSBRYYAgINGQJZBoghBq8kkkqBI41EATMHgi2BEwOWbol1hxiDJyCBbA X-IronPort-AV: E=Sophos;i="4.87,411,1363147200"; d="scan'208";a="24496003" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 04 Apr 2013 18:04:25 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 8DF4EB402B; Thu, 4 Apr 2013 18:04:25 -0400 (EDT) Date: Thu, 4 Apr 2013 18:04:25 -0400 (EDT) From: Rick Macklem To: Gleb Smirnoff Message-ID: <1053557983.528803.1365113065570.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20130404152046.GO76816@FreeBSD.org> Subject: Re: svn commit: r249096 - head/sys/rpc/rpcsec_gss MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.203] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, "George V. Neville-Neil" , svn-src-all@freebsd.org, src-committers@freebsd.org, rmacklem@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, 04 Apr 2013 22:04:38 -0000 Glebius wrote: > George, Rick, > > On Thu, Apr 04, 2013 at 03:16:54PM +0000, George V. Neville-Neil > wrote: > G> Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c > G> > ============================================================================== > G> --- head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:03:12 > 2013 (r249095) > G> +++ head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:16:53 > 2013 (r249096) > G> @@ -208,6 +208,8 @@ m_trim(struct mbuf *m, int len) > G> struct mbuf *n; > G> int off; > G> > G> + if (m == NULL) > G> + return; Yep. If I recall correctly, my patch checked for a non-NULL argument before calling m_trim(), but adding this sanity check seems like a good idea to me, if only to avoid problems caused by modified calls to m_trim() in the future. I'd think you could just commit this without so@'s involvement? rick > G> n = m_getptr(m, len, &off); > G> if (n) { > G> n->m_len = off; > > I think the code will be much more rocksolid, if the function won't be > called with NULL argument. > > -- > Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 22:07:39 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EA0B3AFE; Thu, 4 Apr 2013 22:07:39 +0000 (UTC) (envelope-from rmacklem@uoguelph.ca) Received: from esa-jnhn.mail.uoguelph.ca (esa-jnhn.mail.uoguelph.ca [131.104.91.44]) by mx1.freebsd.org (Postfix) with ESMTP id 52375FD2; Thu, 4 Apr 2013 22:07:38 +0000 (UTC) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqAEALb4XVGDaFvO/2dsb2JhbABDhmS6fYJkgRt0gh8BAQUjBFIbGAICDRkCWQaIJ68kkkqBI41EATMHgi2BEwOWbol1hxiDJyCBbA X-IronPort-AV: E=Sophos;i="4.87,411,1363147200"; d="scan'208";a="24496452" Received: from erie.cs.uoguelph.ca (HELO zcs3.mail.uoguelph.ca) ([131.104.91.206]) by esa-jnhn.mail.uoguelph.ca with ESMTP; 04 Apr 2013 18:07:38 -0400 Received: from zcs3.mail.uoguelph.ca (localhost.localdomain [127.0.0.1]) by zcs3.mail.uoguelph.ca (Postfix) with ESMTP id 67500B4035; Thu, 4 Apr 2013 18:07:38 -0400 (EDT) Date: Thu, 4 Apr 2013 18:07:38 -0400 (EDT) From: Rick Macklem To: Gleb Smirnoff Message-ID: <2007861569.528886.1365113258414.JavaMail.root@erie.cs.uoguelph.ca> In-Reply-To: <20130404152046.GO76816@FreeBSD.org> Subject: Re: svn commit: r249096 - head/sys/rpc/rpcsec_gss MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [172.17.91.202] X-Mailer: Zimbra 6.0.10_GA_2692 (ZimbraWebClient - IE8 (Win)/6.0.10_GA_2692) Cc: svn-src-head@freebsd.org, "George V. Neville-Neil" , svn-src-all@freebsd.org, src-committers@freebsd.org, rmacklem@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, 04 Apr 2013 22:07:40 -0000 Glebius wrote: > George, Rick, > > On Thu, Apr 04, 2013 at 03:16:54PM +0000, George V. Neville-Neil > wrote: > G> Modified: head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c > G> > ============================================================================== > G> --- head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:03:12 > 2013 (r249095) > G> +++ head/sys/rpc/rpcsec_gss/rpcsec_gss_prot.c Thu Apr 4 15:16:53 > 2013 (r249096) > G> @@ -208,6 +208,8 @@ m_trim(struct mbuf *m, int len) > G> struct mbuf *n; > G> int off; > G> > G> + if (m == NULL) > G> + return; > G> n = m_getptr(m, len, &off); > G> if (n) { > G> n->m_len = off; > > I think the code will be much more rocksolid, if the function won't be > called with NULL argument. > Oops, my confusion. I thought you were suggesting the above change. I suppose the callers should be fixed as well, but having the check here seems like a good idea? Feel free to add code to the callers to check for a NULL m arguement, rick > -- > Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 22:11:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D22AECBD; Thu, 4 Apr 2013 22:11:32 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C154FC; Thu, 4 Apr 2013 22:11:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34MBWdV021546; Thu, 4 Apr 2013 22:11:32 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34MBU5T021532; Thu, 4 Apr 2013 22:11:30 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304042211.r34MBU5T021532@svn.freebsd.org> From: Jung-uk Kim Date: Thu, 4 Apr 2013 22:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249112 - in head: sys/conf sys/contrib/dev/acpica sys/contrib/dev/acpica/common sys/contrib/dev/acpica/compiler sys/contrib/dev/acpica/components/debugger sys/contrib/dev/acpica/compon... 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, 04 Apr 2013 22:11:32 -0000 Author: jkim Date: Thu Apr 4 22:11:30 2013 New Revision: 249112 URL: http://svnweb.freebsd.org/changeset/base/249112 Log: Merge ACPICA 20130328. Added: head/sys/contrib/dev/acpica/compiler/asllistsup.c - copied, changed from r249110, vendor-sys/acpica/dist/source/compiler/asllistsup.c head/sys/contrib/dev/acpica/compiler/asloffset.c - copied, changed from r249110, vendor-sys/acpica/dist/source/compiler/asloffset.c head/sys/contrib/dev/acpica/components/utilities/utpredef.c - copied, changed from r249110, vendor-sys/acpica/dist/source/components/utilities/utpredef.c Modified: head/sys/conf/files head/sys/contrib/dev/acpica/changes.txt (contents, props changed) head/sys/contrib/dev/acpica/common/ahpredef.c head/sys/contrib/dev/acpica/compiler/aslcompile.c head/sys/contrib/dev/acpica/compiler/aslcompiler.h head/sys/contrib/dev/acpica/compiler/asldefine.h head/sys/contrib/dev/acpica/compiler/aslerror.c head/sys/contrib/dev/acpica/compiler/aslfiles.c head/sys/contrib/dev/acpica/compiler/aslglobal.h head/sys/contrib/dev/acpica/compiler/asllisting.c head/sys/contrib/dev/acpica/compiler/aslmain.c head/sys/contrib/dev/acpica/compiler/aslpredef.c head/sys/contrib/dev/acpica/compiler/aslprepkg.c head/sys/contrib/dev/acpica/compiler/aslresource.c head/sys/contrib/dev/acpica/compiler/asltypes.h head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/components/debugger/dbmethod.c head/sys/contrib/dev/acpica/components/debugger/dbnames.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dswexec.c head/sys/contrib/dev/acpica/components/events/evevent.c head/sys/contrib/dev/acpica/components/executer/exoparg2.c head/sys/contrib/dev/acpica/components/namespace/nseval.c head/sys/contrib/dev/acpica/components/namespace/nspredef.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/utilities/utdelete.c head/sys/contrib/dev/acpica/components/utilities/utmutex.c head/sys/contrib/dev/acpica/components/utilities/utosi.c head/sys/contrib/dev/acpica/components/utilities/utxface.c head/sys/contrib/dev/acpica/include/acglobal.h head/sys/contrib/dev/acpica/include/aclocal.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/acpredef.h head/sys/contrib/dev/acpica/include/acutils.h head/usr.sbin/acpi/acpidb/Makefile head/usr.sbin/acpi/iasl/Makefile Directory Properties: head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/dev/acpica/common/ (props changed) head/sys/contrib/dev/acpica/compiler/ (props changed) head/sys/contrib/dev/acpica/components/debugger/ (props changed) head/sys/contrib/dev/acpica/components/dispatcher/ (props changed) head/sys/contrib/dev/acpica/components/events/ (props changed) head/sys/contrib/dev/acpica/components/executer/ (props changed) head/sys/contrib/dev/acpica/components/namespace/ (props changed) head/sys/contrib/dev/acpica/components/tables/ (props changed) head/sys/contrib/dev/acpica/components/utilities/ (props changed) head/sys/contrib/dev/acpica/include/ (props changed) Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/conf/files Thu Apr 4 22:11:30 2013 (r249112) @@ -443,6 +443,7 @@ contrib/dev/acpica/components/utilities/ contrib/dev/acpica/components/utilities/utobject.c optional acpi contrib/dev/acpica/components/utilities/utosi.c optional acpi contrib/dev/acpica/components/utilities/utownerid.c optional acpi +contrib/dev/acpica/components/utilities/utpredef.c optional acpi contrib/dev/acpica/components/utilities/utresrc.c optional acpi contrib/dev/acpica/components/utilities/utstate.c optional acpi contrib/dev/acpica/components/utilities/utstring.c optional acpi Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/changes.txt Thu Apr 4 22:11:30 2013 (r249112) @@ -1,4 +1,79 @@ ---------------------------------------- +28 March 2013. Summary of changes for version 20130328: + +1) ACPICA kernel-resident subsystem: + +Fixed several possible race conditions with the internal object reference +counting mechanism. Some of the external ACPICA interfaces update object +reference counts without holding the interpreter or namespace lock. This +change adds a spinlock to protect reference count updates on the internal +ACPICA objects. Reported by and with assistance from Andriy Gapon +(avg@FreeBSD.org). + +FADT support: Removed an extraneous warning for very large GPE register +sets. This change removes a size mismatch warning if the legacy length +field for a GPE register set is larger than the 64-bit GAS structure can +accommodate. GPE register sets can be larger than the 255-bit width +limitation of the GAS structure. Linn Crosetto (linn@hp.com). + +_OSI Support: handle any errors from AcpiOsAcquireMutex. Check for error +return from this interface. Handles a possible timeout case if +ACPI_WAIT_FOREVER is modified by the host to be a value less than +"forever". Jung-uk Kim. + +Predefined name support: Add allowed/required argument type information to +the master predefined info table. This change adds the infrastructure to +enable typechecking on incoming arguments for all predefined +methods/objects. It does not actually contain the code that will fully +utilize this information, this is still under development. Also condenses +some duplicate code for the predefined names into a new module, +utilities/utpredef.c + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Previous Release: + Non-Debug Version: 95.0K Code, 25.9K Data, 120.9K Total + Debug Version: 182.9K Code, 75.6K Data, 258.5K Total + Current Release: + Non-Debug Version: 95.2K Code, 26.4K Data, 121.6K Total + Debug Version: 183.0K Code, 76.0K Data, 259.0K Total + + +2) iASL Compiler/Disassembler and Tools: + +iASL: Implemented a new option to simplify the development of ACPI-related +BIOS code. Adds support for a new "offset table" output file. The -so +option will create a C table containing the AML table offsets of various +named objects in the namespace so that BIOS code can modify them easily at +boot time. This can simplify BIOS runtime code by eliminating expensive +searches for "magic values", enhancing boot times and adding greater +reliability. With assistance from Lee Hamel. + +iASL: Allow additional predefined names to return zero-length packages. +Now, all predefined names that are defined by the ACPI specification to +return a "variable-length package of packages" are allowed to return a +zero length top-level package. This allows the BIOS to tell the host that +the requested feature is not supported, and supports existing BIOS/ASL +code and practices. + +iASL: Changed the "result not used" warning to an error. This is the case +where an ASL operator is effectively a NOOP because the result of the +operation is not stored anywhere. For example: + Add (4, Local0) +There is no target (missing 3rd argument), nor is the function return +value used. This is potentially a very serious problem -- since the code +was probably intended to do something, but for whatever reason, the value +was not stored. Therefore, this issue has been upgraded from a warning to +an error. + +AcpiHelp: Added allowable/required argument types to the predefined names +info display. This feature utilizes the recent update to the predefined +names table (above). + +---------------------------------------- 14 February 2013. Summary of changes for version 20130214: 1) ACPICA Kernel-resident Subsystem: Modified: head/sys/contrib/dev/acpica/common/ahpredef.c ============================================================================== --- head/sys/contrib/dev/acpica/common/ahpredef.c Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/common/ahpredef.c Thu Apr 4 22:11:30 2013 (r249112) @@ -61,7 +61,7 @@ const AH_PREDEFINED_NAME AslPredefinedInfo[] = { AH_PREDEF ("_ACx", "Active Cooling", "Returns the active cooling policy threshold values"), - AH_PREDEF ("_ADR", "Address", "Returns the address of a device on its parent bus"), + AH_PREDEF ("_ADR", "Address", "Returns address of a device on parent bus, and resource field"), AH_PREDEF ("_AEI", "ACPI Event Interrupts", "Returns a list of GPIO events to be used as ACPI events"), AH_PREDEF ("_ALC", "Ambient Light Chromaticity", "Returns the ambient light color chromaticity"), AH_PREDEF ("_ALI", "Ambient Light Illuminance", "Returns the ambient light brightness"), @@ -113,7 +113,7 @@ const AH_PREDEFINED_NAME AslPredefine AH_PREDEF ("_DGS", "Display Graphics State", "Return the current state of the output device"), AH_PREDEF ("_DIS", "Disable Device", "Disables a device"), AH_PREDEF ("_DLM", "Device Lock Mutex", "Defines mutex for OS/AML sharing"), - AH_PREDEF ("_DMA", "Direct Memory Access", "Returns a device's current resources for DMA transactions"), + AH_PREDEF ("_DMA", "Direct Memory Access", "Returns device current resources for DMA transactions, and resource field"), AH_PREDEF ("_DOD", "Display Output Devices", "Enumerate all devices attached to the display adapter"), AH_PREDEF ("_DOS", "Disable Output Switching", "Sets the display output switching mode"), AH_PREDEF ("_DPL", "Device Selection Polarity", "Polarity of Device Selection signal, Resource Descriptor field"), Modified: head/sys/contrib/dev/acpica/compiler/aslcompile.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/aslcompile.c Thu Apr 4 22:11:30 2013 (r249112) @@ -126,6 +126,7 @@ AslCompilerSignon ( break; case ASL_FILE_C_SOURCE_OUTPUT: + case ASL_FILE_C_OFFSET_OUTPUT: case ASL_FILE_C_INCLUDE_OUTPUT: Prefix = " * "; @@ -199,6 +200,7 @@ AslCompilerFileHeader ( break; case ASL_FILE_C_SOURCE_OUTPUT: + case ASL_FILE_C_OFFSET_OUTPUT: case ASL_FILE_C_INCLUDE_OUTPUT: Prefix = " * "; @@ -222,6 +224,7 @@ AslCompilerFileHeader ( switch (FileId) { case ASL_FILE_C_SOURCE_OUTPUT: + case ASL_FILE_C_OFFSET_OUTPUT: case ASL_FILE_C_INCLUDE_OUTPUT: FlPrintFile (FileId, " */\n"); break; Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.h Thu Apr 4 22:11:30 2013 (r249112) @@ -350,22 +350,65 @@ LsDoListings ( void); void +LsWriteNodeToAsmListing ( + ACPI_PARSE_OBJECT *Op); + +void +LsWriteNode ( + ACPI_PARSE_OBJECT *Op, + UINT32 FileId); + +void +LsDumpParseTree ( + void); + + +/* + * asllistsup - Listing file support utilities + */ +void +LsDumpAscii ( + UINT32 FileId, + UINT32 Count, + UINT8 *Buffer); + +void LsDumpAsciiInComment ( UINT32 FileId, UINT32 Count, UINT8 *Buffer); void -LsWriteNodeToAsmListing ( - ACPI_PARSE_OBJECT *Op); +LsCheckException ( + UINT32 LineNumber, + UINT32 FileId); void -LsWriteNode ( - ACPI_PARSE_OBJECT *Op, +LsFlushListingBuffer ( UINT32 FileId); void -LsDumpParseTree ( +LsWriteListingHexBytes ( + UINT8 *Buffer, + UINT32 Length, + UINT32 FileId); + +void +LsWriteSourceLines ( + UINT32 ToLineNumber, + UINT32 ToLogicalLineNumber, + UINT32 FileId); + +UINT32 +LsWriteOneSourceLine ( + UINT32 FileId); + +void +LsPushNode ( + char *Filename); + +ASL_LISTING_NODE * +LsPopNode ( void); @@ -388,6 +431,24 @@ OpcAmlConstantWalk ( /* + * asloffset - generate C offset file for BIOS support + */ +ACPI_STATUS +LsAmlOffsetWalk ( + ACPI_PARSE_OBJECT *Op, + UINT32 Level, + void *Context); + +void +LsDoOffsetTableHeader ( + UINT32 FileId); + +void +LsDoOffsetTableFooter ( + UINT32 FileId); + + +/* * aslopcodes - generate AML opcodes */ ACPI_STATUS Modified: head/sys/contrib/dev/acpica/compiler/asldefine.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/asldefine.h Thu Apr 4 22:11:30 2013 (r249112) @@ -120,6 +120,7 @@ #define FILE_SUFFIX_ASM_INCLUDE "inc" #define FILE_SUFFIX_C_INCLUDE "h" #define FILE_SUFFIX_ASL_CODE "asl" +#define FILE_SUFFIX_C_OFFSET "offset.h" /* Types for input files */ @@ -138,6 +139,11 @@ #define ASL_EOF ACPI_UINT32_MAX +/* Listings */ + +#define ASL_LISTING_LINE_PREFIX ": " + + /* Support for reserved method names */ #define ACPI_VALID_RESERVED_NAME_MAX 0x80000000 Modified: head/sys/contrib/dev/acpica/compiler/aslerror.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/aslerror.c Thu Apr 4 22:11:30 2013 (r249112) @@ -302,12 +302,25 @@ AePrintException ( } else { - while (RActual && SourceByte && (SourceByte != '\n') && (Total < 256)) + /* Read/write the source line, up to the maximum line length */ + + while (RActual && SourceByte && (SourceByte != '\n')) { - if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + if (Total < 256) { - printf ("[*** iASL: Write error on output file ***]\n"); - return; + /* After the max line length, we will just read the line, no write */ + + if (fwrite (&SourceByte, 1, 1, OutputFile) != 1) + { + printf ("[*** iASL: Write error on output file ***]\n"); + return; + } + } + else if (Total == 256) + { + fprintf (OutputFile, + "\n[*** iASL: Very long input line, message below refers to column %u ***]", + Enode->Column); } RActual = fread (&SourceByte, 1, 1, SourceFile); @@ -320,13 +333,6 @@ AePrintException ( } Total++; } - - if (Total >= 256) - { - fprintf (OutputFile, - "\n[*** iASL: Long input line, an error occurred at column %u ***]", - Enode->Column); - } } } } Modified: head/sys/contrib/dev/acpica/compiler/aslfiles.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/aslfiles.c Thu Apr 4 22:11:30 2013 (r249112) @@ -675,6 +675,27 @@ FlOpenMiscOutputFiles ( AslCompilerFileHeader (ASL_FILE_C_SOURCE_OUTPUT); } + /* Create/Open a C code source output file for the offset table if asked */ + + if (Gbl_C_OffsetTableFlag) + { + Filename = FlGenerateFilename (FilenamePrefix, FILE_SUFFIX_C_OFFSET); + if (!Filename) + { + AslCommonError (ASL_ERROR, ASL_MSG_LISTING_FILENAME, + 0, 0, 0, 0, NULL, NULL); + return (AE_ERROR); + } + + /* Open the C code source file, text mode */ + + FlOpenFile (ASL_FILE_C_OFFSET_OUTPUT, Filename, "w+t"); + + FlPrintFile (ASL_FILE_C_OFFSET_OUTPUT, "/*\n"); + AslCompilerSignon (ASL_FILE_C_OFFSET_OUTPUT); + AslCompilerFileHeader (ASL_FILE_C_OFFSET_OUTPUT); + } + /* Create/Open a assembly include output file if asked */ if (Gbl_AsmIncludeOutputFlag) Modified: head/sys/contrib/dev/acpica/compiler/aslglobal.h ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/aslglobal.h Thu Apr 4 22:11:30 2013 (r249112) @@ -86,7 +86,8 @@ ASL_FILE_INFO Gbl_ {NULL, NULL, "ASM Source: ", "Assembly Code Output"}, {NULL, NULL, "C Source: ", "C Code Output"}, {NULL, NULL, "ASM Include: ", "Assembly Header Output"}, - {NULL, NULL, "C Include: ", "C Header Output"} + {NULL, NULL, "C Include: ", "C Header Output"}, + {NULL, NULL, "Offset Table: ", "C Offset Table Output"} }; #else @@ -143,6 +144,7 @@ ASL_EXTERN BOOLEAN ASL_ ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_DebugFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OutputFlag, FALSE); +ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_OffsetTableFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_AsmIncludeOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_C_IncludeOutputFlag, FALSE); ASL_EXTERN BOOLEAN ASL_INIT_GLOBAL (Gbl_ListingFlag, FALSE); Modified: head/sys/contrib/dev/acpica/compiler/asllisting.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Apr 4 21:34:22 2013 (r249111) +++ head/sys/contrib/dev/acpica/compiler/asllisting.c Thu Apr 4 22:11:30 2013 (r249112) @@ -41,896 +41,234 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include #include "aslcompiler.y.h" #include #include #include -#define _COMPONENT ACPI_COMPILER - ACPI_MODULE_NAME ("aslisting") - -/* Local prototypes */ - -static void -LsDumpAscii ( - UINT32 FileId, - UINT32 Count, - UINT8 *Buffer); - -static ACPI_STATUS -LsAmlListingWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context); - -static void -LsGenerateListing ( - UINT32 FileId); - -static void -LsPushNode ( - char *Filename); - -static ASL_LISTING_NODE * -LsPopNode ( - void); - -static void -LsCheckException ( - UINT32 LineNumber, - UINT32 FileId); - -static void -LsFlushListingBuffer ( - UINT32 FileId); - -static void -LsWriteListingHexBytes ( - UINT8 *Buffer, - UINT32 Length, - UINT32 FileId); - -static UINT32 -LsWriteOneSourceLine ( - UINT32 FileId); - -static void -LsFinishSourceListing ( - UINT32 FileId); - -static void -LsWriteSourceLines ( - UINT32 ToLineNumber, - UINT32 ToLogicalLineNumber, - UINT32 FileId); - -static void -LsWriteNodeToListing ( - ACPI_PARSE_OBJECT *Op, - UINT32 FileId); - -static ACPI_STATUS -LsTreeWriteWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context); - -#define ASL_LISTING_LINE_PREFIX ": " - - -/******************************************************************************* - * - * FUNCTION: LsDoListings - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Generate all requested listing files. - * - ******************************************************************************/ - -void -LsDoListings ( - void) -{ - - if (Gbl_C_OutputFlag) - { - LsGenerateListing (ASL_FILE_C_SOURCE_OUTPUT); - } - - if (Gbl_ListingFlag) - { - LsGenerateListing (ASL_FILE_LISTING_OUTPUT); - } - - if (Gbl_AsmOutputFlag) - { - LsGenerateListing (ASL_FILE_ASM_SOURCE_OUTPUT); - } - - if (Gbl_C_IncludeOutputFlag) - { - LsGenerateListing (ASL_FILE_C_INCLUDE_OUTPUT); - } - - if (Gbl_AsmIncludeOutputFlag) - { - LsGenerateListing (ASL_FILE_ASM_INCLUDE_OUTPUT); - } -} - - -/******************************************************************************* - * - * FUNCTION: LsTreeWriteWalk - * - * PARAMETERS: ASL_WALK_CALLBACK - * - * - * RETURN: None - * - * DESCRIPTION: Dump entire parse tree, for compiler debug only - * - ******************************************************************************/ - -static ACPI_STATUS -LsTreeWriteWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context) -{ - - /* Debug output */ - - DbgPrint (ASL_TREE_OUTPUT, - "%5.5d [%2d]", Op->Asl.LogicalLineNumber, Level); - UtPrintFormattedName (Op->Asl.ParseOpcode, Level); - - - DbgPrint (ASL_TREE_OUTPUT, "\n"); - return (AE_OK); -} - - -void -LsDumpParseTree ( - void) -{ - - if (!Gbl_DebugFlag) - { - return; - } - - DbgPrint (ASL_TREE_OUTPUT, "\nOriginal parse tree from parser:\n\n"); - TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD, - LsTreeWriteWalk, NULL, NULL); -} - - -/******************************************************************************* - * - * FUNCTION: LsDumpAscii - * - * PARAMETERS: FileId - ID of current listing file - * Count - Number of bytes to convert - * Buffer - Buffer of bytes to convert - * - * RETURN: None - * - * DESCRIPTION: Convert hex bytes to ascii - * - ******************************************************************************/ - -static void -LsDumpAscii ( - UINT32 FileId, - UINT32 Count, - UINT8 *Buffer) -{ - UINT8 BufChar; - UINT32 i; - - - FlPrintFile (FileId, " \""); - for (i = 0; i < Count; i++) - { - BufChar = Buffer[i]; - if (isprint (BufChar)) - { - FlPrintFile (FileId, "%c", BufChar); - } - else - { - /* Not a printable character, just put out a dot */ - - FlPrintFile (FileId, "."); - } - } - FlPrintFile (FileId, "\""); -} - - -/******************************************************************************* - * - * FUNCTION: LsDumpAsciiInComment - * - * PARAMETERS: FileId - ID of current listing file - * Count - Number of bytes to convert - * Buffer - Buffer of bytes to convert - * - * RETURN: None - * - * DESCRIPTION: Convert hex bytes to ascii - * - ******************************************************************************/ - -void -LsDumpAsciiInComment ( - UINT32 FileId, - UINT32 Count, - UINT8 *Buffer) -{ - UINT8 BufChar = 0; - UINT8 LastChar; - UINT32 i; - - FlPrintFile (FileId, " \""); - for (i = 0; i < Count; i++) - { - LastChar = BufChar; - BufChar = Buffer[i]; - - if (isprint (BufChar)) - { - /* Handle embedded C comment sequences */ - - if (((LastChar == '*') && (BufChar == '/')) || - ((LastChar == '/') && (BufChar == '*'))) - { - /* Insert a space to break the sequence */ - - FlPrintFile (FileId, ".", BufChar); - } - - FlPrintFile (FileId, "%c", BufChar); - } - else - { - /* Not a printable character, just put out a dot */ - - FlPrintFile (FileId, "."); - } - } - FlPrintFile (FileId, "\""); -} - - -/******************************************************************************* - * - * FUNCTION: LsAmlListingWalk - * - * PARAMETERS: ASL_WALK_CALLBACK - * - * RETURN: Status - * - * DESCRIPTION: Process one node during a listing file generation. - * - ******************************************************************************/ - -static ACPI_STATUS -LsAmlListingWalk ( - ACPI_PARSE_OBJECT *Op, - UINT32 Level, - void *Context) -{ - UINT8 FileByte; - UINT32 i; - UINT32 FileId = (UINT32) ACPI_TO_INTEGER (Context); - - - LsWriteNodeToListing (Op, FileId); - - if (Op->Asl.CompileFlags & NODE_IS_RESOURCE_DATA) - { - /* Buffer is a resource template, don't dump the data all at once */ - - return (AE_OK); - } - - /* Write the hex bytes to the listing file(s) (if requested) */ - - for (i = 0; i < Op->Asl.FinalAmlLength; i++) - { - if (ACPI_FAILURE (FlReadFile (ASL_FILE_AML_OUTPUT, &FileByte, 1))) - { - FlFileError (ASL_FILE_AML_OUTPUT, ASL_MSG_READ); - AslAbort (); - } - LsWriteListingHexBytes (&FileByte, 1, FileId); - } - - return (AE_OK); -} - - -/******************************************************************************* - * - * FUNCTION: LsGenerateListing - * - * PARAMETERS: FileId - ID of listing file - * - * RETURN: None - * - * DESCRIPTION: Generate a listing file. This can be one of the several types - * of "listings" supported. - * - ******************************************************************************/ - -static void -LsGenerateListing ( - UINT32 FileId) -{ - - /* Start at the beginning of both the source and AML files */ - - FlSeekFile (ASL_FILE_SOURCE_OUTPUT, 0); - FlSeekFile (ASL_FILE_AML_OUTPUT, 0); - Gbl_SourceLine = 0; - Gbl_CurrentHexColumn = 0; - LsPushNode (Gbl_Files[ASL_FILE_INPUT].Filename); - - /* Process all parse nodes */ - - TrWalkParseTree (RootNode, ASL_WALK_VISIT_DOWNWARD, LsAmlListingWalk, - NULL, (void *) ACPI_TO_POINTER (FileId)); - - /* Final processing */ - - LsFinishSourceListing (FileId); -} - - -/******************************************************************************* - * - * FUNCTION: LsPushNode - * - * PARAMETERS: Filename - Pointer to the include filename - * - * RETURN: None - * - * DESCRIPTION: Push a listing node on the listing/include file stack. This - * stack enables tracking of include files (infinitely nested) - * and resumption of the listing of the parent file when the - * include file is finished. - * - ******************************************************************************/ - -static void -LsPushNode ( - char *Filename) -{ - ASL_LISTING_NODE *Lnode; - - - /* Create a new node */ - - Lnode = UtLocalCalloc (sizeof (ASL_LISTING_NODE)); - - /* Initialize */ - - Lnode->Filename = Filename; - Lnode->LineNumber = 0; - - /* Link (push) */ - - Lnode->Next = Gbl_ListingNode; - Gbl_ListingNode = Lnode; -} - - -/******************************************************************************* - * - * FUNCTION: LsPopNode - * - * PARAMETERS: None - * - * RETURN: List head after current head is popped off - * - * DESCRIPTION: Pop the current head of the list, free it, and return the - * next node on the stack (the new current node). - * - ******************************************************************************/ - -static ASL_LISTING_NODE * -LsPopNode ( - void) -{ - ASL_LISTING_NODE *Lnode; - - - /* Just grab the node at the head of the list */ - - Lnode = Gbl_ListingNode; - if ((!Lnode) || - (!Lnode->Next)) - { - AslError (ASL_ERROR, ASL_MSG_COMPILER_INTERNAL, NULL, - "Could not pop empty listing stack"); - return (Gbl_ListingNode); - } - - Gbl_ListingNode = Lnode->Next; - ACPI_FREE (Lnode); - - /* New "Current" node is the new head */ - - return (Gbl_ListingNode); -} - - -/******************************************************************************* - * - * FUNCTION: LsCheckException - * - * PARAMETERS: LineNumber - Current logical (cumulative) line # - * FileId - ID of output listing file - * - * RETURN: None - * - * DESCRIPTION: Check if there is an exception for this line, and if there is, - * put it in the listing immediately. Handles multiple errors - * per line. Gbl_NextError points to the next error in the - * sorted (by line #) list of compile errors/warnings. - * - ******************************************************************************/ - -static void -LsCheckException ( - UINT32 LineNumber, - UINT32 FileId) -{ - - if ((!Gbl_NextError) || - (LineNumber < Gbl_NextError->LogicalLineNumber )) - { - return; - } - - /* Handle multiple errors per line */ - - if (FileId == ASL_FILE_LISTING_OUTPUT) - { - while (Gbl_NextError && - (LineNumber >= Gbl_NextError->LogicalLineNumber)) - { - AePrintException (FileId, Gbl_NextError, "\n[****iasl****]\n"); - - Gbl_NextError = Gbl_NextError->Next; - } - - FlPrintFile (FileId, "\n"); - } -} - - -/******************************************************************************* - * - * FUNCTION: LsFlushListingBuffer - * - * PARAMETERS: FileId - ID of the listing file - * - * RETURN: None - * - * DESCRIPTION: Flush out the current contents of the 16-byte hex AML code - * buffer. Usually called at the termination of a single line - * of source code or when the buffer is full. - * - ******************************************************************************/ - -static void -LsFlushListingBuffer ( - UINT32 FileId) -{ - UINT32 i; - - - if (Gbl_CurrentHexColumn == 0) - { - return; - } - - /* Write the hex bytes */ - - switch (FileId) - { - case ASL_FILE_LISTING_OUTPUT: - - for (i = 0; i < Gbl_CurrentHexColumn; i++) - { - FlPrintFile (FileId, "%2.2X ", Gbl_AmlBuffer[i]); - } - - for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 3); i++) - { - FlWriteFile (FileId, ".", 1); - } - - /* Write the ASCII character associated with each of the bytes */ - - LsDumpAscii (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer); - break; - - - case ASL_FILE_ASM_SOURCE_OUTPUT: - - for (i = 0; i < Gbl_CurrentHexColumn; i++) - { - if (i > 0) - { - FlPrintFile (FileId, ","); - } - FlPrintFile (FileId, "0%2.2Xh", Gbl_AmlBuffer[i]); - } - - for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 5); i++) - { - FlWriteFile (FileId, " ", 1); - } - - FlPrintFile (FileId, " ;%8.8X", - Gbl_CurrentAmlOffset - HEX_LISTING_LINE_SIZE); - - /* Write the ASCII character associated with each of the bytes */ - - LsDumpAscii (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer); - break; - - - case ASL_FILE_C_SOURCE_OUTPUT: - - for (i = 0; i < Gbl_CurrentHexColumn; i++) - { - FlPrintFile (FileId, "0x%2.2X,", Gbl_AmlBuffer[i]); - } - - for (i = 0; i < ((HEX_LISTING_LINE_SIZE - Gbl_CurrentHexColumn) * 5); i++) - { - FlWriteFile (FileId, " ", 1); - } - - FlPrintFile (FileId, " /* %8.8X", - Gbl_CurrentAmlOffset - HEX_LISTING_LINE_SIZE); - - /* Write the ASCII character associated with each of the bytes */ - - LsDumpAsciiInComment (FileId, Gbl_CurrentHexColumn, Gbl_AmlBuffer); - FlPrintFile (FileId, " */"); - break; - - default: - /* No other types supported */ - return; - } - - FlPrintFile (FileId, "\n"); - - Gbl_CurrentHexColumn = 0; - Gbl_HexBytesWereWritten = TRUE; -} +#define _COMPONENT ACPI_COMPILER + ACPI_MODULE_NAME ("asllisting") -/******************************************************************************* - * - * FUNCTION: LsWriteListingHexBytes - * - * PARAMETERS: Buffer - AML code buffer - * Length - Number of AML bytes to write - * FileId - ID of current listing file. - * - * RETURN: None - * - * DESCRIPTION: Write the contents of the AML buffer to the listing file via - * the listing buffer. The listing buffer is flushed every 16 - * AML bytes. - * - ******************************************************************************/ +/* Local prototypes */ static void -LsWriteListingHexBytes ( - UINT8 *Buffer, - UINT32 Length, - UINT32 FileId) -{ - UINT32 i; - - - /* Transfer all requested bytes */ - - for (i = 0; i < Length; i++) - { - /* Print line header when buffer is empty */ - - if (Gbl_CurrentHexColumn == 0) - { - if (Gbl_HasIncludeFiles) - { - FlPrintFile (FileId, "%*s", 10, " "); - } - - switch (FileId) - { - case ASL_FILE_LISTING_OUTPUT: - - FlPrintFile (FileId, "%8.8X%s", Gbl_CurrentAmlOffset, - ASL_LISTING_LINE_PREFIX); - break; - - case ASL_FILE_ASM_SOURCE_OUTPUT: - - FlPrintFile (FileId, " db "); - break; - - case ASL_FILE_C_SOURCE_OUTPUT: - *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 23:11:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 53F787EB; Thu, 4 Apr 2013 23:11:57 +0000 (UTC) (envelope-from wg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2C29F251; Thu, 4 Apr 2013 23:11:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34NBvcc039262; Thu, 4 Apr 2013 23:11:57 GMT (envelope-from wg@svn.freebsd.org) Received: (from wg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34NBu4K039259; Thu, 4 Apr 2013 23:11:56 GMT (envelope-from wg@svn.freebsd.org) Message-Id: <201304042311.r34NBu4K039259@svn.freebsd.org> From: William Grzybowski Date: Thu, 4 Apr 2013 23:11:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249113 - in head: share/misc usr.bin/calendar/calendars 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, 04 Apr 2013 23:11:57 -0000 Author: wg (ports committer) Date: Thu Apr 4 23:11:56 2013 New Revision: 249113 URL: http://svnweb.freebsd.org/changeset/base/249113 Log: Add myself as a ports committer and my mentor relationship. While in the repository, add myself to calendar.freebsd. Approved by: jpaetzel (mentor) Modified: head/share/misc/committers-ports.dot head/usr.bin/calendar/calendars/calendar.freebsd Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Thu Apr 4 22:11:30 2013 (r249112) +++ head/share/misc/committers-ports.dot Thu Apr 4 23:11:56 2013 (r249113) @@ -204,6 +204,7 @@ trhodes [label="Tom Rhodes\ntrhodes@Free uqs [label="Ulrich Spoerlein\nuqs@FreeBSD.org\n2012/01/19"] vd [label="Vasil Dimov\nvd@FreeBSD.org\n2006/01/19"] wen [label="Wen Heping\nwen@FreeBSD.org\n2010/12/13"] +wg [label="William Grzybowski\nwg@FreeBSD.org\n2013/04/01"] wxs [label="Wesley Shields\nwxs@FreeBSD.org\n2008/01/03"] xride [label="Soeren Straarup\nxride@FreeBSD.org\n2006/09/27"] yzlin [label="Yi-Jheng Lin\nyzlin@FreeBSD.org\n2009/07/19"] @@ -270,6 +271,7 @@ crees -> gblach crees -> tijl culot -> jase +culot -> wg db -> tj @@ -317,6 +319,8 @@ flz -> johans flz -> laszlof flz -> romain +jpaetzel -> wg + gabor -> lippe gabor -> pgj gabor -> stephen Modified: head/usr.bin/calendar/calendars/calendar.freebsd ============================================================================== --- head/usr.bin/calendar/calendars/calendar.freebsd Thu Apr 4 22:11:30 2013 (r249112) +++ head/usr.bin/calendar/calendars/calendar.freebsd Thu Apr 4 23:11:56 2013 (r249113) @@ -270,6 +270,7 @@ 08/29 Thomas Gellekum born in Moenchengladbach, Nordrhein-Westfalen, Germany, 1967 08/29 Max Laier born in Karlsruhe, Germany, 1981 09/01 Pyun YongHyeon born in Kimcheon, Korea, 1968 +09/01 William Grzybowski born in Parana, Brazil, 1988 09/03 Max Khon born in Novosibirsk, USSR, 1976 09/03 Cheng-Lung Sung born in Taipei, Taiwan, Republic of China, 1977 09/05 Mark Robert Vaughan Murray born in Harare, Mashonaland, Zimbabwe, 1961 From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 23:14:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 236E8979; Thu, 4 Apr 2013 23:14:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 14F36264; Thu, 4 Apr 2013 23:14:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34NEEsZ039604; Thu, 4 Apr 2013 23:14:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34NEE6M039603; Thu, 4 Apr 2013 23:14:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304042314.r34NEE6M039603@svn.freebsd.org> From: Xin LI Date: Thu, 4 Apr 2013 23:14:14 +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: r249114 - stable/8/cddl/contrib/opensolaris/cmd/zpool 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, 04 Apr 2013 23:14:15 -0000 Author: delphij Date: Thu Apr 4 23:14:14 2013 New Revision: 249114 URL: http://svnweb.freebsd.org/changeset/base/249114 Log: Further improve previous revision: - enable_all_pool_feat will be unset if version is specified. Use it as a flag instead of testing the props nvlist; - Allow user to use -d -o feature@...=enable to create a v5000 pool when desired. Without this, the implicit -o version=28 would make the utility to complain about feature@ and version being conflict, which is confusing. Reviewed by: Matthew Ahrens Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Modified: stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 4 23:11:56 2013 (r249113) +++ stable/8/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 4 23:14:14 2013 (r249114) @@ -858,9 +858,7 @@ zpool_do_create(int argc, char **argv) #ifdef __FreeBSD__ /* Compatiblity with FreeBSD 9.0 and 9.1: Use version 28 if unspecified */ - if (nvlist_lookup_string(props, - zpool_prop_to_name(ZPOOL_PROP_VERSION), - &propval) != 0) { + if (enable_all_pool_feat && !prop_list_contains_feature(props)) { if (add_prop_list(zpool_prop_to_name( ZPOOL_PROP_VERSION), "28", &props, B_TRUE)) goto errout; From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 23:19:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B2A7FB7F; Thu, 4 Apr 2013 23:19:52 +0000 (UTC) (envelope-from smh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95D652A6; Thu, 4 Apr 2013 23:19:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34NJq3M040381; Thu, 4 Apr 2013 23:19:52 GMT (envelope-from smh@svn.freebsd.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34NJqIP040377; Thu, 4 Apr 2013 23:19:52 GMT (envelope-from smh@svn.freebsd.org) Message-Id: <201304042319.r34NJqIP040377@svn.freebsd.org> From: Steven Hartland Date: Thu, 4 Apr 2013 23:19:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249115 - in head: sbin/camcontrol sys/sys 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, 04 Apr 2013 23:19:52 -0000 Author: smh Date: Thu Apr 4 23:19:51 2013 New Revision: 249115 URL: http://svnweb.freebsd.org/changeset/base/249115 Log: Adds security options to camcontrol this includes the ability to secure erase disks such as SSD's Adds the ability to run ATA commands via the SCSI ATA Pass-Through(16) comand Reviewed by: mav Approved by: pjd (mentor) MFC after: 2 weeks Modified: head/sbin/camcontrol/camcontrol.8 head/sbin/camcontrol/camcontrol.c head/sys/sys/ata.h Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Thu Apr 4 23:14:14 2013 (r249114) +++ head/sbin/camcontrol/camcontrol.8 Thu Apr 4 23:19:51 2013 (r249115) @@ -228,6 +228,21 @@ .Op Fl y .Op Fl s .Nm +.Ic security +.Op device id +.Op generic args +.Op Fl d Ar pwd +.Op Fl e Ar pwd +.Op Fl f +.Op Fl h Ar pwd +.Op Fl k Ar pwd +.Op Fl l Ar high|maximum +.Op Fl q +.Op Fl s Ar pwd +.Op Fl T Ar timeout +.Op Fl U Ar user|master +.Op Fl y +.Nm .Ic help .Sh DESCRIPTION The @@ -1072,6 +1087,123 @@ specifies automatic standby timer value .It Ic sleep Put ATA device into SLEEP state. Note that the only way get device out of this state may be reset. +.It Ic security +Update or report security settings, using an ATA identify command (0xec). +By default, +.Nm +will print out the security support and associated settings of the device. +The +.Ic security +command takes several arguments: +.Bl -tag -width 0n +.It Fl d Ar pwd +.Pp +Disable device security using the given password for the selected user according +to the devices configured security level. +.It Fl e Ar pwd +.Pp +Erase the device using the given password for the selected user. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +Issuing a secure erase will +.Em ERASE ALL +user data on the device and may take several hours to complete. +.Pp +When this command is used against an SSD drive all its cells will be marked as +empty, restoring it to factory default write performance. For SSD's this action +usually takes just a few seconds. +.It Fl f +.Pp +Freeze the security configuration of the specified device. +.Pp +After command completion any other commands that update the device lock mode +shall be command aborted. Frozen mode is disabled by power-off or hardware reset. +.It Fl h Ar pwd +.Pp +Enhanced erase the device using the given password for the selected user. +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +Issuing an enhanced secure erase will +.Em ERASE ALL +user data on the device and may take several hours to complete. +.Pp +An enhanced erase writes predetermined data patterns to all user data areas, +all previously written user data shall be overwritten, including sectors that +are no longer in use due to reallocation. +.It Fl k Ar pwd +.Pp +Unlock the device using the given password for the selected user according to +the devices configured security level. +.It Fl l Ar high|maximum +.Pp +Specifies which security level to set when issuing a +.Fl s Ar pwd +command. The security level determines device behavior when the master +password is used to unlock the device. When the security level is set to high +the device requires the unlock command and the master password to unlock. +When the security level is set to maximum the device requires a secure erase +with the master password to unlock. +.Pp +This option must be used in conjunction with one of the security action commands. +.Pp +Defaults to +.Em high +.It Fl q +.Pp +Be quiet, do not print any status messages. +This option will not disable the questions, however. +To disable questions, use the +.Fl y +argument, below. +.It Fl s Ar pwd +.Pp +Password the device (enable security) using the given password for the selected +user. This option can be combined with other options such as +.Fl e Em pwd +.Pp +A master password may be set in a addition to the user password. The purpose of +the master password is to allow an administrator to establish a password that +is kept secret from the user, and which may be used to unlock the device if the +user password is lost. +.Pp +.Em Note: +Setting the master password does not enable device security. +.Pp +If the master password is set and the drive supports a Master Revision Code +feature the Master Password Revision Code will be decremented. +.It Fl T Ar timeout +.Pp +Overrides the default timeout, specified in seconds, used for both +.Fl e +and +.Fl h +this is useful if your system has problems processing long timeouts correctly. +.Pp +Usually the timeout is calculated from the information stored on the drive if +present, otherwise it defaults to 2 hours. +.It Fl U Ar user|master +.Pp +Specifies which user to set / use for the running action command, valid values +are user or master and defaults to master if not set. +.Pp +This option must be used in conjunction with one of the security action commands. +.Pp +Defaults to +.Em master +.It Fl y +.Pp +Confirm yes to dangerous options such as +.Fl e +without prompting for confirmation. +.Pp +.El +If the password specified for any action commands doesn't match the configured +password for the specified user the command will fail. +.Pp +The password in all cases is limited to 32 characters, longer passwords will +fail. .It Ic fwdownload Program firmware of the named SCSI device using the image file provided. .Pp @@ -1240,6 +1372,33 @@ camcontrol smpcmd ses0 -v -r 4 "40 0 00 Send the SMP REPORT GENERAL command to ses0, and display the number of PHYs it contains. Display SMP errors if the command fails. +.Pp +.Bd -literal -offset indent +camcontrol security ada0 +.Ed +.Pp +Report security support and settings for ada0 +.Pp +.Bd -literal -offset indent +camcontrol security ada0 -u user -s MyPass +.Ed +.Pp +Enable security on device ada0 with the password MyPass +.Pp +.Bd -literal -offset indent +camcontrol security ada0 -u user -e MyPass +.Ed +.Pp +Secure erase ada0 which has had security enabled with user password MyPass +.Pp +.Em WARNING! WARNING! WARNING! +.Pp +This will +.Em ERASE ALL +data from the device, so backup your data before using! +.Pp +This command can be used used against an SSD drive to restoring it to +factory default write performance. .Sh SEE ALSO .Xr cam 3 , .Xr cam_cdbparse 3 , Modified: head/sbin/camcontrol/camcontrol.c ============================================================================== --- head/sbin/camcontrol/camcontrol.c Thu Apr 4 23:14:14 2013 (r249114) +++ head/sbin/camcontrol/camcontrol.c Thu Apr 4 23:19:51 2013 (r249115) @@ -87,7 +87,8 @@ typedef enum { CAM_CMD_SMP_PC = 0x00000019, CAM_CMD_SMP_PHYLIST = 0x0000001a, CAM_CMD_SMP_MANINFO = 0x0000001b, - CAM_CMD_DOWNLOAD_FW = 0x0000001c + CAM_CMD_DOWNLOAD_FW = 0x0000001c, + CAM_CMD_SECURITY = 0x0000001d } cam_cmdmask; typedef enum { @@ -140,6 +141,7 @@ static const char negotiate_opts[] = "ac static const char smprg_opts[] = "l"; static const char smppc_opts[] = "a:A:d:lm:M:o:p:s:S:T:"; static const char smpphylist_opts[] = "lq"; +static char pwd_opt; #endif static struct camcontrol_opts option_table[] = { @@ -183,6 +185,7 @@ static struct camcontrol_opts option_tab {"standby", CAM_CMD_STANDBY, CAM_ARG_NONE, "t:"}, {"sleep", CAM_CMD_SLEEP, CAM_ARG_NONE, ""}, {"fwdownload", CAM_CMD_DOWNLOAD_FW, CAM_ARG_NONE, "f:ys"}, + {"security", CAM_CMD_SECURITY, CAM_ARG_NONE, "d:e:fh:k:l:qs:T:U:y"}, #endif /* MINIMALISTIC */ {"help", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, {"-?", CAM_CMD_USAGE, CAM_ARG_NONE, NULL}, @@ -274,7 +277,10 @@ static int scsireportluns(struct cam_dev static int scsireadcapacity(struct cam_device *device, int argc, char **argv, char *combinedopt, int retry_count, int timeout); static int atapm(struct cam_device *device, int argc, char **argv, - char *combinedopt, int retry_count, int timeout); + char *combinedopt, int retry_count, int timeout); +static int atasecurity(struct cam_device *device, int retry_count, int timeout, + int argc, char **argv, char *combinedopt); + #endif /* MINIMALISTIC */ #ifndef min #define min(a,b) (((a)<(b))?(a):(b)) @@ -1328,55 +1334,93 @@ atacapprint(struct ata_params *parm) printf("free-fall %s %s\n", parm->support2 & ATA_SUPPORT_FREEFALL ? "yes" : "no", parm->enabled2 & ATA_SUPPORT_FREEFALL ? "yes" : "no"); - printf("data set management (TRIM) %s\n", - parm->support_dsm & ATA_SUPPORT_DSM_TRIM ? "yes" : "no"); + printf("Data Set Management (DSM/TRIM) "); + if (parm->support_dsm & ATA_SUPPORT_DSM_TRIM) { + printf("yes\n"); + printf("DSM - max 512byte blocks "); + if (parm->max_dsm_blocks == 0x00) + printf("yes not specified\n"); + else + printf("yes %d\n", + parm->max_dsm_blocks); + + printf("DSM - deterministic read "); + if (parm->support3 & ATA_SUPPORT_DRAT) { + if (parm->support3 & ATA_SUPPORT_RZAT) + printf("yes zeroed\n"); + else + printf("yes any value\n"); + } else { + printf("no\n"); + } + } else { + printf("no\n"); + } } static int -ataidentify(struct cam_device *device, int retry_count, int timeout) +scsi_cam_pass_16_send(struct cam_device *device, union ccb *ccb, int quiet) { - union ccb *ccb; - struct ata_params *ident_buf; - struct ccb_getdev cgd; - u_int i, error = 0; - int16_t *ptr; + struct ata_pass_16 *ata_pass_16; + struct ata_cmd ata_cmd; - if (get_cgd(device, &cgd) != 0) { - warnx("couldn't get CGD"); - return(1); - } - ccb = cam_getccb(device); + ata_pass_16 = (struct ata_pass_16 *)ccb->csio.cdb_io.cdb_bytes; + ata_cmd.command = ata_pass_16->command; + ata_cmd.control = ata_pass_16->control; + ata_cmd.features = ata_pass_16->features; - if (ccb == NULL) { - warnx("couldn't allocate CCB"); - return(1); + if (arglist & CAM_ARG_VERBOSE) { + warnx("sending ATA %s via pass_16 with timeout of %u msecs", + ata_op_string(&ata_cmd), + ccb->csio.ccb_h.timeout); } - /* cam_getccb cleans up the header, caller has to zero the payload */ - bzero(&(&ccb->ccb_h)[1], - sizeof(struct ccb_ataio) - sizeof(struct ccb_hdr)); + /* Disable freezing the device queue */ + ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; - ptr = (uint16_t *)malloc(sizeof(struct ata_params)); + if (arglist & CAM_ARG_ERR_RECOVER) + ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; - if (ptr == NULL) { - cam_freeccb(ccb); - warnx("can't malloc memory for identify\n"); - return(1); + if (cam_send_ccb(device, ccb) < 0) { + if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { + warn("error sending ATA %s via pass_16", + ata_op_string(&ata_cmd)); + } + + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + + return (1); } - bzero(ptr, sizeof(struct ata_params)); - cam_fill_ataio(&ccb->ataio, - retry_count, - NULL, - /*flags*/CAM_DIR_IN, - MSG_SIMPLE_Q_TAG, - /*data_ptr*/(u_int8_t *)ptr, - /*dxfer_len*/sizeof(struct ata_params), - timeout ? timeout : 30 * 1000); - if (cgd.protocol == PROTO_ATA) - ata_28bit_cmd(&ccb->ataio, ATA_ATA_IDENTIFY, 0, 0, 0); - else - ata_28bit_cmd(&ccb->ataio, ATA_ATAPI_IDENTIFY, 0, 0, 0); + if (!(ata_pass_16->flags & AP_FLAG_CHK_COND) && + (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { + warnx("ATA %s via pass_16 failed", + ata_op_string(&ata_cmd)); + } + if (arglist & CAM_ARG_VERBOSE) { + cam_error_print(device, ccb, CAM_ESF_ALL, + CAM_EPF_ALL, stderr); + } + + return (1); + } + + return (0); +} + + +static int +ata_cam_send(struct cam_device *device, union ccb *ccb, int quiet) +{ + if (arglist & CAM_ARG_VERBOSE) { + warnx("sending ATA %s with timeout of %u msecs", + ata_op_string(&(ccb->ataio.cmd)), + ccb->ataio.ccb_h.timeout); + } /* Disable freezing the device queue */ ccb->ccb_h.flags |= CAM_DEV_QFRZDIS; @@ -1385,47 +1429,247 @@ ataidentify(struct cam_device *device, i ccb->ccb_h.flags |= CAM_PASS_ERR_RECOVER; if (cam_send_ccb(device, ccb) < 0) { - perror("error sending ATA identify"); + if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { + warn("error sending ATA %s", + ata_op_string(&(ccb->ataio.cmd))); + } if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); } - free(ptr); - cam_freeccb(ccb); - return(1); + return (1); } if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - error = 1; + if (quiet != 1 || arglist & CAM_ARG_VERBOSE) { + warnx("ATA %s failed: %d", + ata_op_string(&(ccb->ataio.cmd)), quiet); + } if (arglist & CAM_ARG_VERBOSE) { cam_error_print(device, ccb, CAM_ESF_ALL, CAM_EPF_ALL, stderr); } + + return (1); } - cam_freeccb(ccb); + return (0); +} + +static int +ata_do_pass_16(struct cam_device *device, union ccb *ccb, int retries, + u_int32_t flags, u_int8_t protocol, u_int8_t ata_flags, + u_int8_t tag_action, u_int8_t command, u_int8_t features, + u_int64_t lba, u_int8_t sector_count, u_int8_t *data_ptr, + u_int16_t dxfer_len, int timeout, int quiet) +{ + if (data_ptr != NULL) { + ata_flags |= AP_FLAG_BYT_BLOK_BYTES | + AP_FLAG_TLEN_SECT_CNT; + if (flags & CAM_DIR_OUT) + ata_flags |= AP_FLAG_TDIR_TO_DEV; + else + ata_flags |= AP_FLAG_TDIR_FROM_DEV; + } else { + ata_flags |= AP_FLAG_TLEN_NO_DATA; + } + + bzero(&(&ccb->ccb_h)[1], + sizeof(struct ccb_scsiio) - sizeof(struct ccb_hdr)); + + scsi_ata_pass_16(&ccb->csio, + retries, + NULL, + flags, + tag_action, + protocol, + ata_flags, + features, + sector_count, + lba, + command, + /*control*/0, + data_ptr, + dxfer_len, + /*sense_len*/SSD_FULL_SIZE, + timeout); + + return scsi_cam_pass_16_send(device, ccb, quiet); +} + +static int +ata_try_pass_16(struct cam_device *device) +{ + struct ccb_pathinq cpi; + + if (get_cpi(device, &cpi) != 0) { + warnx("couldn't get CPI"); + return (-1); + } + + if (cpi.protocol == PROTO_SCSI) { + /* possibly compatible with pass_16 */ + return (1); + } + + /* likely not compatible with pass_16 */ + return (0); +} + +static int +ata_do_28bit_cmd(struct cam_device *device, union ccb *ccb, int retries, + u_int32_t flags, u_int8_t protocol, u_int8_t tag_action, + u_int8_t command, u_int8_t features, u_int32_t lba, + u_int8_t sector_count, u_int8_t *data_ptr, u_int16_t dxfer_len, + int timeout, int quiet) +{ + + + switch (ata_try_pass_16(device)) { + case -1: + return (1); + case 1: + /* Try using SCSI Passthrough */ + return ata_do_pass_16(device, ccb, retries, flags, protocol, + 0, tag_action, command, features, lba, + sector_count, data_ptr, dxfer_len, + timeout, quiet); + } + + bzero(&(&ccb->ccb_h)[1], sizeof(struct ccb_ataio) - + sizeof(struct ccb_hdr)); + cam_fill_ataio(&ccb->ataio, + retries, + NULL, + flags, + tag_action, + data_ptr, + dxfer_len, + timeout); + + ata_28bit_cmd(&ccb->ataio, command, features, lba, sector_count); + return ata_cam_send(device, ccb, quiet); +} + +static void +dump_data(uint16_t *ptr, uint32_t len) +{ + u_int i; + + for (i = 0; i < len / 2; i++) { + if ((i % 8) == 0) + printf(" %3d: ", i); + printf("%04hx ", ptr[i]); + if ((i % 8) == 7) + printf("\n"); + } + if ((i % 8) != 7) + printf("\n"); +} + +static int +ata_do_identify(struct cam_device *device, int retry_count, int timeout, + union ccb *ccb, struct ata_params** ident_bufp) +{ + struct ata_params *ident_buf; + struct ccb_pathinq cpi; + struct ccb_getdev cgd; + u_int i, error; + int16_t *ptr; + u_int8_t command, retry_command; + + if (get_cpi(device, &cpi) != 0) { + warnx("couldn't get CPI"); + return (-1); + } + + /* Neither PROTO_ATAPI or PROTO_SATAPM are used in cpi.protocol */ + if (cpi.protocol == PROTO_ATA) { + if (get_cgd(device, &cgd) != 0) { + warnx("couldn't get CGD"); + return (-1); + } + + command = (cgd.protocol == PROTO_ATA) ? + ATA_ATA_IDENTIFY : ATA_ATAPI_IDENTIFY; + retry_command = 0; + } else { + /* We don't know which for sure so try both */ + command = ATA_ATA_IDENTIFY; + retry_command = ATA_ATAPI_IDENTIFY; + } + + ptr = (uint16_t *)calloc(1, sizeof(struct ata_params)); + if (ptr == NULL) { + warnx("can't calloc memory for identify\n"); + return (1); + } + + error = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_IN, + /*protocol*/AP_PROTO_PIO_IN, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/command, + /*features*/0, + /*lba*/0, + /*sector_count*/(u_int8_t)sizeof(struct ata_params), + /*data_ptr*/(u_int8_t *)ptr, + /*dxfer_len*/sizeof(struct ata_params), + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/1); if (error != 0) { - free(ptr); - return(error); + if (retry_command == 0) { + free(ptr); + return (1); + } + error = ata_do_28bit_cmd(device, + ccb, + /*retries*/retry_count, + /*flags*/CAM_DIR_IN, + /*protocol*/AP_PROTO_PIO_IN, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/retry_command, + /*features*/0, + /*lba*/0, + /*sector_count*/(u_int8_t) + sizeof(struct ata_params), + /*data_ptr*/(u_int8_t *)ptr, + /*dxfer_len*/sizeof(struct ata_params), + /*timeout*/timeout ? timeout : 30 * 1000, + /*quiet*/0); + + if (error != 0) { + free(ptr); + return (1); + } } - for (i = 0; i < sizeof(struct ata_params) / 2; i++) + error = 1; + for (i = 0; i < sizeof(struct ata_params) / 2; i++) { ptr[i] = le16toh(ptr[i]); + if (ptr[i] != 0) + error = 0; + } + if (arglist & CAM_ARG_VERBOSE) { fprintf(stdout, "%s%d: Raw identify data:\n", device->device_name, device->dev_unit_num); - for (i = 0; i < sizeof(struct ata_params) / 2; i++) { - if ((i % 8) == 0) - fprintf(stdout, " %3d: ", i); - fprintf(stdout, "%04x ", (uint16_t)ptr[i]); - if ((i % 8) == 7) - fprintf(stdout, "\n"); - } + dump_data(ptr, sizeof(struct ata_params)); } + + /* check for invalid (all zero) response */ + if (error != 0) { + warnx("Invalid identify response detected"); + free(ptr); + return (error); + } + ident_buf = (struct ata_params *)ptr; if (strncmp(ident_buf->model, "FX", 2) && strncmp(ident_buf->model, "NEC", 3) && @@ -1446,15 +1690,636 @@ ataidentify(struct cam_device *device, i ata_bpack(ident_buf->media_serial, ident_buf->media_serial, sizeof(ident_buf->media_serial)); - fprintf(stdout, "%s%d: ", device->device_name, - device->dev_unit_num); + *ident_bufp = ident_buf; + + return (0); +} + + +static int +ataidentify(struct cam_device *device, int retry_count, int timeout) +{ + union ccb *ccb; + struct ata_params *ident_buf; + + if ((ccb = cam_getccb(device)) == NULL) { + warnx("couldn't allocate CCB"); + return (1); + } + + if (ata_do_identify(device, retry_count, timeout, ccb, &ident_buf) != 0) { + cam_freeccb(ccb); + return (1); + } + + printf("%s%d: ", device->device_name, device->dev_unit_num); ata_print_ident(ident_buf); camxferrate(device); atacapprint(ident_buf); free(ident_buf); + cam_freeccb(ccb); - return(0); + return (0); +} +#endif /* MINIMALISTIC */ + + +#ifndef MINIMALISTIC +enum { + ATA_SECURITY_ACTION_PRINT, + ATA_SECURITY_ACTION_FREEZE, + ATA_SECURITY_ACTION_UNLOCK, + ATA_SECURITY_ACTION_DISABLE, + ATA_SECURITY_ACTION_ERASE, + ATA_SECURITY_ACTION_ERASE_ENHANCED, + ATA_SECURITY_ACTION_SET_PASSWORD +} atasecurity_action; + +static void +atasecurity_print_time(u_int16_t tw) +{ + + if (tw == 0) + printf("unspecified"); + else if (tw >= 255) + printf("> 508 min"); + else + printf("%i min", 2 * tw); +} + +static u_int32_t +atasecurity_erase_timeout_msecs(u_int16_t timeout) +{ + + if (timeout == 0) + return 2 * 3600 * 1000; /* default: two hours */ + else if (timeout > 255) + return (508 + 60) * 60 * 1000; /* spec says > 508 minutes */ + + return ((2 * timeout) + 5) * 60 * 1000; /* add a 5min margin */ +} + + +static void +atasecurity_notify(u_int8_t command, struct ata_security_password *pwd) +{ + struct ata_cmd cmd; + + bzero(&cmd, sizeof(cmd)); + cmd.command = command; + printf("Issuing %s", ata_op_string(&cmd)); + + if (pwd != NULL) { + char pass[sizeof(pwd->password)+1]; + + /* pwd->password may not be null terminated */ + pass[sizeof(pwd->password)] = '\0'; + strncpy(pass, pwd->password, sizeof(pwd->password)); + printf(" password='%s', user='%s'", + pass, + (pwd->ctrl & ATA_SECURITY_PASSWORD_MASTER) ? + "master" : "user"); + + if (command == ATA_SECURITY_SET_PASSWORD) { + printf(", mode='%s'", + (pwd->ctrl & ATA_SECURITY_LEVEL_MAXIMUM) ? + "maximum" : "high"); + } + } + + printf("\n"); +} + +static int +atasecurity_freeze(struct cam_device *device, union ccb *ccb, + int retry_count, u_int32_t timeout, int quiet) +{ + + if (quiet == 0) + atasecurity_notify(ATA_SECURITY_FREEZE_LOCK, NULL); + + return ata_do_28bit_cmd(device, + ccb, + retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SECURITY_FREEZE_LOCK, + /*features*/0, + /*lba*/0, + /*sector_count*/0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout, + /*quiet*/0); +} + +static int +atasecurity_unlock(struct cam_device *device, union ccb *ccb, + int retry_count, u_int32_t timeout, + struct ata_security_password *pwd, int quiet) +{ + + if (quiet == 0) + atasecurity_notify(ATA_SECURITY_UNLOCK, pwd); + + return ata_do_28bit_cmd(device, + ccb, + retry_count, + /*flags*/CAM_DIR_OUT, + /*protocol*/AP_PROTO_PIO_OUT, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SECURITY_UNLOCK, + /*features*/0, + /*lba*/0, + /*sector_count*/0, + /*data_ptr*/(u_int8_t *)pwd, + /*dxfer_len*/sizeof(*pwd), + /*timeout*/timeout, + /*quiet*/0); +} + +static int +atasecurity_disable(struct cam_device *device, union ccb *ccb, + int retry_count, u_int32_t timeout, + struct ata_security_password *pwd, int quiet) +{ + + if (quiet == 0) + atasecurity_notify(ATA_SECURITY_DISABLE_PASSWORD, pwd); + return ata_do_28bit_cmd(device, + ccb, + retry_count, + /*flags*/CAM_DIR_OUT, + /*protocol*/AP_PROTO_PIO_OUT, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SECURITY_DISABLE_PASSWORD, + /*features*/0, + /*lba*/0, + /*sector_count*/0, + /*data_ptr*/(u_int8_t *)pwd, + /*dxfer_len*/sizeof(*pwd), + /*timeout*/timeout, + /*quiet*/0); +} + + +static int +atasecurity_erase_confirm(struct cam_device *device, + struct ata_params* ident_buf) +{ + + printf("\nYou are about to ERASE ALL DATA from the following" + " device:\n%s%d,%s%d: ", device->device_name, + device->dev_unit_num, device->given_dev_name, + device->given_unit_number); + ata_print_ident(ident_buf); + + for(;;) { + char str[50]; + printf("\nAre you SURE you want to ERASE ALL DATA? (yes/no) "); + + if (fgets(str, sizeof(str), stdin) != NULL) { + if (strncasecmp(str, "yes", 3) == 0) { + return (1); + } else if (strncasecmp(str, "no", 2) == 0) { + return (0); + } else { + printf("Please answer \"yes\" or " + "\"no\"\n"); + } + } + } + + /* NOTREACHED */ + return (0); +} + +static int +atasecurity_erase(struct cam_device *device, union ccb *ccb, + int retry_count, u_int32_t timeout, + u_int32_t erase_timeout, + struct ata_security_password *pwd, int quiet) +{ + int error; + + if (quiet == 0) + atasecurity_notify(ATA_SECURITY_ERASE_PREPARE, NULL); + + error = ata_do_28bit_cmd(device, + ccb, + retry_count, + /*flags*/CAM_DIR_NONE, + /*protocol*/AP_PROTO_NON_DATA, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SECURITY_ERASE_PREPARE, + /*features*/0, + /*lba*/0, + /*sector_count*/0, + /*data_ptr*/NULL, + /*dxfer_len*/0, + /*timeout*/timeout, + /*quiet*/0); + + if (error != 0) + return error; + + if (quiet == 0) + atasecurity_notify(ATA_SECURITY_ERASE_UNIT, pwd); + + error = ata_do_28bit_cmd(device, + ccb, + retry_count, + /*flags*/CAM_DIR_OUT, + /*protocol*/AP_PROTO_PIO_OUT, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SECURITY_ERASE_UNIT, + /*features*/0, + /*lba*/0, + /*sector_count*/0, + /*data_ptr*/(u_int8_t *)pwd, + /*dxfer_len*/sizeof(*pwd), + /*timeout*/erase_timeout, + /*quiet*/0); + + if (error == 0 && quiet == 0) + printf("\nErase Complete\n"); + + return error; +} + +static int +atasecurity_set_password(struct cam_device *device, union ccb *ccb, + int retry_count, u_int32_t timeout, + struct ata_security_password *pwd, int quiet) +{ + + if (quiet == 0) + atasecurity_notify(ATA_SECURITY_SET_PASSWORD, pwd); + + return ata_do_28bit_cmd(device, + ccb, + retry_count, + /*flags*/CAM_DIR_OUT, + /*protocol*/AP_PROTO_PIO_OUT, + /*tag_action*/MSG_SIMPLE_Q_TAG, + /*command*/ATA_SECURITY_SET_PASSWORD, + /*features*/0, + /*lba*/0, + /*sector_count*/0, + /*data_ptr*/(u_int8_t *)pwd, + /*dxfer_len*/sizeof(*pwd), + /*timeout*/timeout, + /*quiet*/0); +} + +static void +atasecurity_print(struct ata_params *parm) +{ + + printf("\nSecurity Option Value\n"); + if (arglist & CAM_ARG_VERBOSE) { + printf("status %04x\n", + parm->security_status); + } + printf("supported %s\n", + parm->security_status & ATA_SECURITY_SUPPORTED ? "yes" : "no"); + if (!(parm->security_status & ATA_SECURITY_SUPPORTED)) + return; + printf("enabled %s\n", + parm->security_status & ATA_SECURITY_ENABLED ? "yes" : "no"); + printf("drive locked %s\n", + parm->security_status & ATA_SECURITY_LOCKED ? "yes" : "no"); + printf("security config frozen %s\n", + parm->security_status & ATA_SECURITY_FROZEN ? "yes" : "no"); + printf("count expired %s\n", + parm->security_status & ATA_SECURITY_COUNT_EXP ? "yes" : "no"); + printf("security level %s\n", + parm->security_status & ATA_SECURITY_LEVEL ? "maximum" : "high"); + printf("enhanced erase supported %s\n", + parm->security_status & ATA_SECURITY_ENH_SUPP ? "yes" : "no"); + printf("erase time "); + atasecurity_print_time(parm->erase_time); + printf("\n"); + printf("enhanced erase time "); + atasecurity_print_time(parm->enhanced_erase_time); + printf("\n"); + printf("master password rev %04x%s\n", + parm->master_passwd_revision, + parm->master_passwd_revision == 0x0000 || + parm->master_passwd_revision == 0xFFFF ? " (unsupported)" : ""); +} + +/* + * Validates and copies the password in optarg to the passed buffer. + * If the password in optarg is the same length as the buffer then + * the data will still be copied but no null termination will occur. + */ +static int +ata_getpwd(u_int8_t *passwd, int max, char opt) +{ + int len; + + len = strlen(optarg); + if (len > max) { + warnx("-%c password is too long", opt); + return (1); + } else if (len == 0) { + warnx("-%c password is missing", opt); + return (1); + } else if (optarg[0] == '-'){ + warnx("-%c password starts with '-' (generic arg?)", opt); + return (1); + } else if (strlen(passwd) != 0 && strcmp(passwd, optarg) != 0) { + warnx("-%c password conflicts with existing password from -%c", + opt, pwd_opt); + return (1); + } + + /* Callers pass in a buffer which does NOT need to be terminated */ + strncpy(passwd, optarg, max); + pwd_opt = opt; + + return (0); +} + +static int +atasecurity(struct cam_device *device, int retry_count, int timeout, + int argc, char **argv, char *combinedopt) +{ + union ccb *ccb; + struct ata_params *ident_buf; + int error, confirm, quiet, c, action, actions, setpwd; + int security_enabled, erase_timeout, pwdsize; + struct ata_security_password pwd; + + actions = 0; + setpwd = 0; + erase_timeout = 0; + confirm = 0; + quiet = 0; + + memset(&pwd, 0, sizeof(pwd)); + + /* default action is to print security information */ + action = ATA_SECURITY_ACTION_PRINT; + + /* user is master by default as its safer that way */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Apr 4 23:36:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3FB8EF0C; Thu, 4 Apr 2013 23:36:15 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3041C340; Thu, 4 Apr 2013 23:36:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r34NaEh6045767; Thu, 4 Apr 2013 23:36:14 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r34NaEhT045766; Thu, 4 Apr 2013 23:36:14 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <201304042336.r34NaEhT045766@svn.freebsd.org> From: Xin LI Date: Thu, 4 Apr 2013 23:36:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249116 - releng/8.4/cddl/contrib/opensolaris/cmd/zpool 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, 04 Apr 2013 23:36:15 -0000 Author: delphij Date: Thu Apr 4 23:36:14 2013 New Revision: 249116 URL: http://svnweb.freebsd.org/changeset/base/249116 Log: MFS r249068 [1],249100,249114 [2]: Limit the creation version to 28 by default to avoid surprises when user "upgrade" to 9.1-RELEASE, which predates the merge of feature flags support to stable/9 (r243674) and is the latest stable/9 release at this time. Users who want the new features can still do "zpool upgrade" after pool creation, or by explicitly specifying feature flags and/or disabling all feature flags at creation time. Reviewed by: mm [1], Matthew Ahrens [2] Approved by: re (jpaetzel) Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: releng/8.4/cddl/contrib/opensolaris/ (props changed) Modified: releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 4 23:19:51 2013 (r249115) +++ releng/8.4/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Thu Apr 4 23:36:14 2013 (r249116) @@ -856,6 +856,16 @@ zpool_do_create(int argc, char **argv) } } +#ifdef __FreeBSD__ + /* Compatiblity with FreeBSD 9.0 and 9.1: Use version 28 if unspecified */ + if (enable_all_pool_feat && !prop_list_contains_feature(props)) { + if (add_prop_list(zpool_prop_to_name( + ZPOOL_PROP_VERSION), "28", &props, B_TRUE)) + goto errout; + enable_all_pool_feat = B_FALSE; + } +#endif /* __FreeBSD__ */ + argc -= optind; argv += optind; From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 00:21:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AC8905FD; Fri, 5 Apr 2013 00:21:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9E6846B5; Fri, 5 Apr 2013 00:21:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r350LIQb059672; Fri, 5 Apr 2013 00:21:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r350LHcL059670; Fri, 5 Apr 2013 00:21:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050021.r350LHcL059670@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 00:21:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249117 - head/sys/mips/conf 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, 05 Apr 2013 00:21:18 -0000 Author: adrian Date: Fri Apr 5 00:21:17 2013 New Revision: 249117 URL: http://svnweb.freebsd.org/changeset/base/249117 Log: Use geom_uncompress here; we need this to fit in a 4MB flash part. Modified: head/sys/mips/conf/AP121 Modified: head/sys/mips/conf/AP121 ============================================================================== --- head/sys/mips/conf/AP121 Thu Apr 4 23:36:14 2013 (r249116) +++ head/sys/mips/conf/AP121 Fri Apr 5 00:21:17 2013 (r249117) @@ -40,11 +40,11 @@ options AR71XX_REALMEM=16*1024*1 options AR71XX_ENV_UBOOT # uzip - to boot natively from flash -#device geom_uzip -#options GEOM_UZIP +device geom_uncompress +options GEOM_UNCOMPRESS # Used for the static uboot partition map device geom_map # Boot off of the rootfs, as defined in the geom_map setup. -options ROOTDEVNAME=\"ufs:map/rootfs.uzip\" +options ROOTDEVNAME=\"ufs:map/rootfs.uncompress\" From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 00:22:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4310E777; Fri, 5 Apr 2013 00:22:18 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3566D6C1; Fri, 5 Apr 2013 00:22:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r350MIBh059874; Fri, 5 Apr 2013 00:22:18 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r350MHin059872; Fri, 5 Apr 2013 00:22:17 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050022.r350MHin059872@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 00:22:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249118 - head/sys/mips/atheros 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, 05 Apr 2013 00:22:18 -0000 Author: adrian Date: Fri Apr 5 00:22:17 2013 New Revision: 249118 URL: http://svnweb.freebsd.org/changeset/base/249118 Log: * Add AR9330/AR9331 to the soc identifier enum; * Set it when probing the CPU type. Modified: head/sys/mips/atheros/ar71xx_setup.c head/sys/mips/atheros/ar71xx_setup.h Modified: head/sys/mips/atheros/ar71xx_setup.c ============================================================================== --- head/sys/mips/atheros/ar71xx_setup.c Fri Apr 5 00:21:17 2013 (r249117) +++ head/sys/mips/atheros/ar71xx_setup.c Fri Apr 5 00:22:17 2013 (r249118) @@ -148,11 +148,13 @@ ar71xx_detect_sys_type(void) rev = (id & AR933X_REV_ID_REVISION_MASK); chip = "9330"; ar71xx_cpu_ops = &ar933x_chip_def; + ar71xx_soc = AR71XX_SOC_AR9330; break; case REV_ID_MAJOR_AR9331: minor = 1; rev = (id & AR933X_REV_ID_REVISION_MASK); chip = "9331"; + ar71xx_soc = AR71XX_SOC_AR9331; ar71xx_cpu_ops = &ar933x_chip_def; break; Modified: head/sys/mips/atheros/ar71xx_setup.h ============================================================================== --- head/sys/mips/atheros/ar71xx_setup.h Fri Apr 5 00:21:17 2013 (r249117) +++ head/sys/mips/atheros/ar71xx_setup.h Fri Apr 5 00:22:17 2013 (r249118) @@ -38,7 +38,9 @@ enum ar71xx_soc_type { AR71XX_SOC_AR7241, AR71XX_SOC_AR7242, AR71XX_SOC_AR9130, - AR71XX_SOC_AR9132 + AR71XX_SOC_AR9132, + AR71XX_SOC_AR9330, + AR71XX_SOC_AR9331, }; extern enum ar71xx_soc_type ar71xx_soc; From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 00:22:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 673F08E8; Fri, 5 Apr 2013 00:22:54 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 59AF56CA; Fri, 5 Apr 2013 00:22:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r350MsKi059980; Fri, 5 Apr 2013 00:22:54 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r350Msq5059979; Fri, 5 Apr 2013 00:22:54 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050022.r350Msq5059979@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 00:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249119 - head/sys/mips/atheros 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, 05 Apr 2013 00:22:54 -0000 Author: adrian Date: Fri Apr 5 00:22:53 2013 New Revision: 249119 URL: http://svnweb.freebsd.org/changeset/base/249119 Log: AR9330/AR9331 also needs to ACK the APB interrupt register, same as AR724x. This fixes 'stuck interrupt' problems I was having when writing the uart interrupt code. Modified: head/sys/mips/atheros/apb.c Modified: head/sys/mips/atheros/apb.c ============================================================================== --- head/sys/mips/atheros/apb.c Fri Apr 5 00:22:17 2013 (r249118) +++ head/sys/mips/atheros/apb.c Fri Apr 5 00:22:53 2013 (r249119) @@ -357,6 +357,8 @@ apb_filter(void *arg) case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7241: case AR71XX_SOC_AR7242: + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: /* Ack/clear the irq on status register for AR724x */ ATH_WRITE_REG(AR71XX_MISC_INTR_STATUS, reg & ~(1 << irq)); From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 00:26:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9E95FA75; Fri, 5 Apr 2013 00:26:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 812FF6DD; Fri, 5 Apr 2013 00:26:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r350Q6fk060475; Fri, 5 Apr 2013 00:26:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r350Q6lo060474; Fri, 5 Apr 2013 00:26:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050026.r350Q6lo060474@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 00:26:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249120 - head/sys/mips/atheros 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, 05 Apr 2013 00:26:06 -0000 Author: adrian Date: Fri Apr 5 00:26:06 2013 New Revision: 249120 URL: http://svnweb.freebsd.org/changeset/base/249120 Log: Implement the AR933x interrupt driven UART code. * Enable RX and host interrupts during bus probe/attach * Disable all interrupts (+ host ISR) during bus detach * Enable TX DONE interrupt only when we start transmitting; clear it when we're done. * The RX/TX FIFO depth is still conjecture on my part. I'll fix this shortly. * The TX FIFO interrupt isn't an "empty" interrupt, it's an "almost empty" interrupt. Sigh. So.. * .. in ar933x_bus_transmit(), wait for the FIFO to drain before continuing. I dislike having to wait for the FIFO to drain, alas. Tested: * Atheros AP121 board, AR9331 SoC. TODO: * RX/TX overflow, RX error, BREAK support, etc. * Figure out the true RX/TX FIFO depth. Modified: head/sys/mips/atheros/uart_dev_ar933x.c Modified: head/sys/mips/atheros/uart_dev_ar933x.c ============================================================================== --- head/sys/mips/atheros/uart_dev_ar933x.c Fri Apr 5 00:22:53 2013 (r249119) +++ head/sys/mips/atheros/uart_dev_ar933x.c Fri Apr 5 00:26:06 2013 (r249120) @@ -53,32 +53,6 @@ __FBSDID("$FreeBSD$"); bus_space_write_4((bas)->bst, (bas)->bsh, reg, value) -#if 0 -/* - * Clear pending interrupts. THRE is cleared by reading IIR. Data - * that may have been received gets lost here. - */ -static void -ar933x_clrint(struct uart_bas *bas) -{ - uint8_t iir, lsr; - - iir = uart_getreg(bas, REG_IIR); - while ((iir & IIR_NOPEND) == 0) { - iir &= IIR_IMASK; - if (iir == IIR_RLS) { - lsr = uart_getreg(bas, REG_LSR); - if (lsr & (LSR_BI|LSR_FE|LSR_PE)) - (void)uart_getreg(bas, REG_DATA); - } else if (iir == IIR_RXRDY || iir == IIR_RXTOUT) - (void)uart_getreg(bas, REG_DATA); - else if (iir == IIR_MLSC) - (void)uart_getreg(bas, REG_MSR); - uart_barrier(bas); - iir = uart_getreg(bas, REG_IIR); - } -} -#endif static int ar933x_drain(struct uart_bas *bas, int what) @@ -386,11 +360,28 @@ struct uart_class uart_ar933x_class = { static int ar933x_bus_attach(struct uart_softc *sc) { + struct ar933x_softc *u = (struct ar933x_softc *)sc; + struct uart_bas *bas = &sc->sc_bas; + uint32_t reg; + /* XXX TODO: flush transmitter */ - /* XXX TODO: enable RX interrupts to kick-start things */ + /* + * Setup initial interrupt notifications. + * + * XXX for now, just RX FIFO valid. + * Later on (when they're handled), also handle + * RX errors/overflow. + */ + u->u_ier = AR933X_UART_INT_RX_VALID; + + /* Enable RX interrupts to kick-start things */ + ar933x_setreg(bas, AR933X_UART_INT_EN_REG, u->u_ier); - /* XXX TODO: enable the host interrupt now */ + /* Enable the host interrupt now */ + reg = ar933x_getreg(bas, AR933X_UART_CS_REG); + reg |= AR933X_UART_CS_HOST_INT_EN; + ar933x_setreg(bas, AR933X_UART_CS_REG, reg); return (0); } @@ -398,21 +389,17 @@ ar933x_bus_attach(struct uart_softc *sc) static int ar933x_bus_detach(struct uart_softc *sc) { -#if 0 - struct ar933x_softc *ns8250; - struct uart_bas *bas; - u_char ier; + struct uart_bas *bas = &sc->sc_bas; + uint32_t reg; - ns8250 = (struct ar933x_softc *)sc; - bas = &sc->sc_bas; - ier = uart_getreg(bas, REG_IER) & ns8250->ier_mask; - uart_setreg(bas, REG_IER, ier); - uart_barrier(bas); - ar933x_clrint(bas); -#endif + /* Disable all interrupts */ + ar933x_setreg(bas, AR933X_UART_INT_EN_REG, 0x00000000); - /* XXX TODO: Disable all interrupts */ - /* XXX TODO: Disable the host interrupt */ + /* Disable the host interrupt */ + reg = ar933x_getreg(bas, AR933X_UART_CS_REG); + reg &= ~AR933X_UART_CS_HOST_INT_EN; + ar933x_setreg(bas, AR933X_UART_CS_REG, reg); + uart_barrier(bas); return (0); } @@ -536,23 +523,63 @@ ar933x_bus_ioctl(struct uart_softc *sc, static int ar933x_bus_ipend(struct uart_softc *sc) { + struct ar933x_softc *u = (struct ar933x_softc *)sc; struct uart_bas *bas = &sc->sc_bas; int ipend = 0; + uint32_t isr; uart_lock(sc->sc_hwmtx); /* - * Always notify the upper layer if RX is ready. + * Fetch/ACK the ISR status. + */ + isr = ar933x_getreg(bas, AR933X_UART_INT_REG); + ar933x_setreg(bas, AR933X_UART_INT_REG, isr); + uart_barrier(bas); + + /* + * RX ready - notify upper layer. */ - if (ar933x_rxready(bas)) { + if (isr & AR933X_UART_INT_RX_VALID) { ipend |= SER_INT_RXREADY; } + + /* + * If we get this interrupt, we should disable + * it from the interrupt mask and inform the uart + * driver appropriately. + * + * We can't keep setting SER_INT_TXIDLE or SER_INT_SIGCHG + * all the time or IO stops working. So we will always + * clear this interrupt if we get it, then we only signal + * the upper layer if we were doing active TX in the + * first place. + * + * Also, the name is misleading. This actually means + * "the FIFO is almost empty." So if we just write some + * more data to the FIFO without checking whether it can + * take said data, we'll overflow the thing. + * + * Unfortunately the FreeBSD uart device has no concept of + * partial UART writes - it expects that the whole buffer + * is written to the hardware. Thus for now, ar933x_bus_transmit() + * will wait for the FIFO to finish draining before it pushes + * more frames into it. + */ + if (isr & AR933X_UART_INT_TX_EMPTY) { + /* + * Update u_ier to disable TX notifications; update hardware + */ + u->u_ier &= ~AR933X_UART_INT_TX_EMPTY; + ar933x_setreg(bas, AR933X_UART_INT_EN_REG, u->u_ier); + uart_barrier(bas); + } + /* * Only signal TX idle if we're not busy transmitting. */ if (sc->sc_txbusy) { - if ((ar933x_getreg(bas, AR933X_UART_DATA_REG) - & AR933X_UART_DATA_TX_CSR)) { + if (isr & AR933X_UART_INT_TX_EMPTY) { ipend |= SER_INT_TXIDLE; } else { ipend |= SER_INT_SIGCHG; @@ -620,6 +647,7 @@ ar933x_bus_receive(struct uart_softc *sc /* Remove that entry from said RX FIFO */ ar933x_setreg(bas, AR933X_UART_DATA_REG, AR933X_UART_DATA_RX_CSR); + uart_barrier(bas); /* XXX frame, parity error */ uart_rx_put(sc, xc); @@ -669,23 +697,52 @@ ar933x_bus_setsig(struct uart_softc *sc, return (0); } +/* + * Write the current transmit buffer to the TX FIFO. + * + * Unfortunately the FreeBSD uart device has no concept of + * partial UART writes - it expects that the whole buffer + * is written to the hardware. Thus for now, this will wait for + * the FIFO to finish draining before it pushes more frames into it. + * + * If non-blocking operation is truely needed here, either + * the FreeBSD uart device will need to handle partial writes + * in xxx_bus_transmit(), or we'll need to do TX FIFO buffering + * of our own here. + */ static int ar933x_bus_transmit(struct uart_softc *sc) { struct uart_bas *bas = &sc->sc_bas; + struct ar933x_softc *u = (struct ar933x_softc *)sc; int i; uart_lock(sc->sc_hwmtx); - /* XXX wait for FIFO to be ready? */ + /* Wait for the FIFO to be clear - see above */ + while (ar933x_getreg(bas, AR933X_UART_CS_REG) & + AR933X_UART_CS_TX_BUSY) + ; + /* + * Write some data! + */ for (i = 0; i < sc->sc_txdatasz; i++) { /* Write the TX data */ ar933x_setreg(bas, AR933X_UART_DATA_REG, (sc->sc_txbuf[i] & 0xff) | AR933X_UART_DATA_TX_CSR); + uart_barrier(bas); } /* + * Now that we're transmitting, get interrupt notification + * when the FIFO is (almost) empty - see above. + */ + u->u_ier |= AR933X_UART_INT_TX_EMPTY; + ar933x_setreg(bas, AR933X_UART_INT_EN_REG, u->u_ier); + uart_barrier(bas); + + /* * Inform the upper layer that we are presently transmitting * data to the hardware; this will be cleared when the * TXIDLE interrupt occurs. From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 00:26:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id ACD63BE2; Fri, 5 Apr 2013 00:26:29 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9F92B6E3; Fri, 5 Apr 2013 00:26:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r350QTn4060557; Fri, 5 Apr 2013 00:26:29 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r350QTZL060556; Fri, 5 Apr 2013 00:26:29 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050026.r350QTZL060556@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 00:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249121 - head/sys/mips/conf 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, 05 Apr 2013 00:26:29 -0000 Author: adrian Date: Fri Apr 5 00:26:29 2013 New Revision: 249121 URL: http://svnweb.freebsd.org/changeset/base/249121 Log: Now that interrupt driven uart IO is working, flip this back on. Modified: head/sys/mips/conf/AR933X_BASE.hints Modified: head/sys/mips/conf/AR933X_BASE.hints ============================================================================== --- head/sys/mips/conf/AR933X_BASE.hints Fri Apr 5 00:26:06 2013 (r249120) +++ head/sys/mips/conf/AR933X_BASE.hints Fri Apr 5 00:26:29 2013 (r249121) @@ -14,7 +14,7 @@ hint.uart.0.at="apb0" # NB: This isn't an ns8250 UART hint.uart.0.maddr=0x18020000 hint.uart.0.msize=0x18 -# hint.uart.0.irq=3 +hint.uart.0.irq=3 #ehci - note the 0x100 offset for the AR913x/AR724x hint.ehci.0.at="nexus0" From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 00:57:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id C8EE62EF; Fri, 5 Apr 2013 00:57:11 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BA36C7FD; Fri, 5 Apr 2013 00:57:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r350vBL2069479; Fri, 5 Apr 2013 00:57:11 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r350vB8P069477; Fri, 5 Apr 2013 00:57:11 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201304050057.r350vB8P069477@svn.freebsd.org> From: Glen Barber Date: Fri, 5 Apr 2013 00:57:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249122 - releng/8.4/sys/conf 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: Fri, 05 Apr 2013 00:57:11 -0000 Author: gjb (doc,ports committer) Date: Fri Apr 5 00:57:10 2013 New Revision: 249122 URL: http://svnweb.freebsd.org/changeset/base/249122 Log: - Update releng/8.4 branch to -RC1 status Approved by: re (jpaetzel) Modified: releng/8.4/sys/conf/newvers.sh Modified: releng/8.4/sys/conf/newvers.sh ============================================================================== --- releng/8.4/sys/conf/newvers.sh Fri Apr 5 00:26:29 2013 (r249121) +++ releng/8.4/sys/conf/newvers.sh Fri Apr 5 00:57:10 2013 (r249122) @@ -32,7 +32,7 @@ TYPE="FreeBSD" REVISION="8.4" -BRANCH="BETA1" +BRANCH="RC1" if [ "X${BRANCH_OVERRIDE}" != "X" ]; then BRANCH=${BRANCH_OVERRIDE} fi From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 01:36:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F38FB89C; Fri, 5 Apr 2013 01:36:00 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CD163949; Fri, 5 Apr 2013 01:36:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r351a0p7081359; Fri, 5 Apr 2013 01:36:00 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r351a0xX081351; Fri, 5 Apr 2013 01:36:00 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050136.r351a0xX081351@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 01:36:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249123 - head/sys/mips/atheros 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, 05 Apr 2013 01:36:01 -0000 Author: adrian Date: Fri Apr 5 01:35:59 2013 New Revision: 249123 URL: http://svnweb.freebsd.org/changeset/base/249123 Log: Implement the AR933x ethernet support. Obtained from: OpenWRT Modified: head/sys/mips/atheros/ar933x_chip.c head/sys/mips/atheros/ar933xreg.h head/sys/mips/atheros/if_arge.c Modified: head/sys/mips/atheros/ar933x_chip.c ============================================================================== --- head/sys/mips/atheros/ar933x_chip.c Fri Apr 5 00:57:10 2013 (r249122) +++ head/sys/mips/atheros/ar933x_chip.c Fri Apr 5 01:35:59 2013 (r249123) @@ -200,8 +200,23 @@ ar933x_chip_ddr_flush_ip2(void) static uint32_t ar933x_chip_get_eth_pll(unsigned int mac, int speed) { + uint32_t pll; - return (0); + switch (speed) { + case 10: + pll = AR933X_PLL_VAL_10; + break; + case 100: + pll = AR933X_PLL_VAL_100; + break; + case 1000: + pll = AR933X_PLL_VAL_1000; + break; + default: + printf("%s%d: invalid speed %d\n", __func__, mac, speed); + pll = 0; + } + return (pll); } static void Modified: head/sys/mips/atheros/ar933xreg.h ============================================================================== --- head/sys/mips/atheros/ar933xreg.h Fri Apr 5 00:57:10 2013 (r249122) +++ head/sys/mips/atheros/ar933xreg.h Fri Apr 5 01:35:59 2013 (r249123) @@ -75,4 +75,8 @@ #define AR933X_BOOTSTRAP_REF_CLK_40 (1 << 0) +#define AR933X_PLL_VAL_1000 0x00110000 +#define AR933X_PLL_VAL_100 0x00001099 +#define AR933X_PLL_VAL_10 0x00991099 + #endif /* __AR93XX_REG_H__ */ Modified: head/sys/mips/atheros/if_arge.c ============================================================================== --- head/sys/mips/atheros/if_arge.c Fri Apr 5 00:57:10 2013 (r249122) +++ head/sys/mips/atheros/if_arge.c Fri Apr 5 01:35:59 2013 (r249123) @@ -572,6 +572,8 @@ arge_attach(device_t dev) case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7241: case AR71XX_SOC_AR7242: + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG1, 0x0010ffff); ARGE_WRITE(sc, AR71XX_MAC_FIFO_CFG2, 0x015500aa); break; @@ -899,6 +901,8 @@ arge_set_pll(struct arge_softc *sc, int case AR71XX_SOC_AR7240: case AR71XX_SOC_AR7241: case AR71XX_SOC_AR7242: + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: fifo_tx = 0x01f00140; break; case AR71XX_SOC_AR9130: From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 01:38:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9D018A22; Fri, 5 Apr 2013 01:38:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8E90795A; Fri, 5 Apr 2013 01:38:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r351cEo7081704; Fri, 5 Apr 2013 01:38:14 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r351cEdl081700; Fri, 5 Apr 2013 01:38:14 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050138.r351cEdl081700@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 01:38:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249124 - head/sys/mips/conf 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, 05 Apr 2013 01:38:14 -0000 Author: adrian Date: Fri Apr 5 01:38:13 2013 New Revision: 249124 URL: http://svnweb.freebsd.org/changeset/base/249124 Log: Add AP121 ethernet / switch PHY support. * arge0 is MII * arge1 is GMII * the MDIO bus is on arge1, not arge0 * the default switch config is to have ports 0-3 as the switch group, with port 4 being an external PHY dedicated to arge0 (ie, 'cpu' port.) Whilst I'm here, remove unused bits and pieces from the config. Tested: * AP121, ping on both arge0 and arge1 * Tested switch port detection using etherswitchcfg Modified: head/sys/mips/conf/AP121 head/sys/mips/conf/AP121.hints Modified: head/sys/mips/conf/AP121 ============================================================================== --- head/sys/mips/conf/AP121 Fri Apr 5 01:35:59 2013 (r249123) +++ head/sys/mips/conf/AP121 Fri Apr 5 01:38:13 2013 (r249124) @@ -18,7 +18,7 @@ ident AP121 hints "AP121.hints" # Force the board memory - the base AP121 only has 16MB RAM -options AR71XX_REALMEM=16*1024*1024 +options AR71XX_REALMEM=(16*1024*1024) # i2c GPIO bus #device gpioiic @@ -26,11 +26,12 @@ options AR71XX_REALMEM=16*1024*1 #device iicbus #device iic -# ethernet switch device -#device etherswitch +# Options required for miiproxy and mdiobus +options ARGE_MDIO # Export an MDIO bus separate from arge +device miiproxy # MDIO bus <-> MII PHY rendezvous -# RTL8366RB support -#device rtl8366rb +device etherswitch +device arswitch # read MSDOS formatted disks - USB #options MSDOSFS Modified: head/sys/mips/conf/AP121.hints ============================================================================== --- head/sys/mips/conf/AP121.hints Fri Apr 5 01:35:59 2013 (r249123) +++ head/sys/mips/conf/AP121.hints Fri Apr 5 01:38:13 2013 (r249124) @@ -3,21 +3,28 @@ # # $FreeBSD$ -# Hard-code the PHY for now, until there's switch phy support. -# hint.arge.0.phymask=0x000c -hint.arge.0.phymask=0x0000 -hint.arge.0.media=1000 -hint.arge.0.fduplex=1 -# Where is the MAC address stored in flash for this particular unit. -hint.arge.0.eeprommac=0x1f01fc00 - -# This isn't used, but configure it anyway. -# This should eventually just not be configured, but the if then -# needs to be properly disabled or spurious interrupts occur. -hint.arge.1.phymask=0x0 - -# Where the ART is -# hint.ath.0.eepromaddr=0x1fff1000 +# mdiobus on arge1 +hint.argemdio.0.at="nexus0" +hint.argemdio.0.maddr=0x1a000000 +hint.argemdio.0.msize=0x1000 +hint.argemdio.0.order=0 + +# Embedded Atheros Switch +hint.arswitch.0.at="mdio0" +hint.arswitch.0.is_7240=1 +hint.arswitch.0.numphys=4 +hint.arswitch.0.phy4cpu=1 # phy 4 is a "CPU" separate PHY +hint.arswitch.0.is_rgmii=0 +hint.arswitch.0.is_gmii=1 # arge1 <-> switch PHY is GMII + +# arge0 - MII, autoneg, phy(4) +hint.arge.0.phymask=0x10 # PHY4 +hint.arge.0.mdio=mdioproxy1 # .. off of the switch mdiobus + +# arge1 - GMII, 1000/full +hint.arge.1.phymask=0x0 # No directly mapped PHYs +hint.arge.1.media=1000 +hint.arge.1.fduplex=1 # The AP121 4MB flash layout: # @@ -114,17 +121,3 @@ hint.gpio.0.pinmask=0x0 #hint.gpioled.3.at="gpiobus0" #hint.gpioled.3.name="wlan" #hint.gpioled.3.pins=0x0200 - -# GPIO I2C bus -#hint.gpioiic.0.at="gpiobus0" -#hint.gpioiic.0.pins=0xc0000 -#hint.gpioiic.0.scl=1 -#hint.gpioiic.0.sda=0 - -# I2C bus -# Don't be strict about I2C protocol - the relaxed semantics are required -# by the realtek switch PHY. -# hint.iicbus.0.strict=0 - -# Bit bang bus - override default delay -#hint.iicbb.0.udelay=3 From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 02:01:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4BE65D82; Fri, 5 Apr 2013 02:01:06 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3F314A23; Fri, 5 Apr 2013 02:01:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35216Dc089712; Fri, 5 Apr 2013 02:01:06 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35216tm089711; Fri, 5 Apr 2013 02:01:06 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050201.r35216tm089711@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 02:01:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249125 - head/sys/mips/atheros 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, 05 Apr 2013 02:01:06 -0000 Author: adrian Date: Fri Apr 5 02:01:05 2013 New Revision: 249125 URL: http://svnweb.freebsd.org/changeset/base/249125 Log: Fix AR933x USB support - this needs the same controller initialisation as the AR7242. Tested: * Atheros AP121, AR9331 * ZyDas wifi device, and 64MB (yes, ew) USB flash storage Modified: head/sys/mips/atheros/ar71xx_ehci.c Modified: head/sys/mips/atheros/ar71xx_ehci.c ============================================================================== --- head/sys/mips/atheros/ar71xx_ehci.c Fri Apr 5 01:38:13 2013 (r249124) +++ head/sys/mips/atheros/ar71xx_ehci.c Fri Apr 5 02:01:05 2013 (r249125) @@ -157,6 +157,8 @@ ar71xx_ehci_attach(device_t self) case AR71XX_SOC_AR7242: case AR71XX_SOC_AR9130: case AR71XX_SOC_AR9132: + case AR71XX_SOC_AR9330: + case AR71XX_SOC_AR9331: sc->sc_flags |= EHCI_SCFLG_TT | EHCI_SCFLG_NORESTERM; break; default: From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 02:02:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 35BA2F0A; Fri, 5 Apr 2013 02:02:38 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 28F86A35; Fri, 5 Apr 2013 02:02:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3522cub089947; Fri, 5 Apr 2013 02:02:38 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3522cYW089946; Fri, 5 Apr 2013 02:02:38 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050202.r3522cYW089946@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 02:02:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249126 - head/sys/mips/atheros 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, 05 Apr 2013 02:02:38 -0000 Author: adrian Date: Fri Apr 5 02:02:37 2013 New Revision: 249126 URL: http://svnweb.freebsd.org/changeset/base/249126 Log: Implement USB device reset and poweron. Tested: * Atheros AP131, AR9331 SoC Modified: head/sys/mips/atheros/ar933x_chip.c Modified: head/sys/mips/atheros/ar933x_chip.c ============================================================================== --- head/sys/mips/atheros/ar933x_chip.c Fri Apr 5 02:01:05 2013 (r249125) +++ head/sys/mips/atheros/ar933x_chip.c Fri Apr 5 02:02:37 2013 (r249126) @@ -222,43 +222,14 @@ ar933x_chip_get_eth_pll(unsigned int mac static void ar933x_chip_init_usb_peripheral(void) { -#if 0 - switch (ar71xx_soc) { - case AR71XX_SOC_AR7240: - ar71xx_device_stop(AR724X_RESET_MODULE_USB_OHCI_DLL | - AR724X_RESET_USB_HOST); - DELAY(1000); + ar71xx_device_stop(AR933X_RESET_USBSUS_OVERRIDE); + DELAY(100); - ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL | - AR724X_RESET_USB_HOST); - DELAY(1000); + ar71xx_device_start(AR933X_RESET_USB_HOST); + DELAY(100); - /* - * WAR for HW bug. Here it adjusts the duration - * between two SOFS. - */ - ATH_WRITE_REG(AR71XX_USB_CTRL_FLADJ, - (3 << USB_CTRL_FLADJ_A0_SHIFT)); - - break; - - case AR71XX_SOC_AR7241: - case AR71XX_SOC_AR7242: - ar71xx_device_start(AR724X_RESET_MODULE_USB_OHCI_DLL); - DELAY(100); - - ar71xx_device_start(AR724X_RESET_USB_HOST); - DELAY(100); - - ar71xx_device_start(AR724X_RESET_USB_PHY); - DELAY(100); - - break; - - default: - break; - } -#endif + ar71xx_device_start(AR933X_RESET_USB_PHY); + DELAY(100); } struct ar71xx_cpu_def ar933x_chip_def = { From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 02:15:10 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E78821AF; Fri, 5 Apr 2013 02:15:10 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C1B17A8B; Fri, 5 Apr 2013 02:15:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r352FAJf093229; Fri, 5 Apr 2013 02:15:10 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r352FAiP093228; Fri, 5 Apr 2013 02:15:10 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050215.r352FAiP093228@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 02:15:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249127 - head/sys/mips/conf 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, 05 Apr 2013 02:15:11 -0000 Author: adrian Date: Fri Apr 5 02:15:10 2013 New Revision: 249127 URL: http://svnweb.freebsd.org/changeset/base/249127 Log: Add the basic GPIO pin mapping to the hints file. Tested: * AP121 board, tested USB/jumpstart LEDs Modified: head/sys/mips/conf/AP121.hints Modified: head/sys/mips/conf/AP121.hints ============================================================================== --- head/sys/mips/conf/AP121.hints Fri Apr 5 02:02:37 2013 (r249126) +++ head/sys/mips/conf/AP121.hints Fri Apr 5 02:15:10 2013 (r249127) @@ -85,39 +85,23 @@ hint.map.5.readonly=1 # Don't flip on anything that isn't already enabled. # This includes leaving the SPI CS1/CS2 pins as GPIO pins as they're # not used here. -hint.gpio.0.function_set=0x00002000 +hint.gpio.0.function_set=0x00000000 hint.gpio.0.function_clear=0x00000000 # These are the GPIO LEDs and buttons which can be software controlled. #hint.gpio.0.pinmask=0x001c02ae -hint.gpio.0.pinmask=0x0 +hint.gpio.0.pinmask=0x00001803 -# pin 1 - USB (LED) -# pin 2 - System (LED) -# Pin 3 - Reset (input) -# Pin 5 - QSS (LED) -# Pin 7 - QSS Button (input) -# Pin 8 - wired into the chip reset line -# Pin 9 - WLAN -# Pin 10 - UART TX (not GPIO) -# Pin 13 - UART RX (not GPIO) -# Pin 18 - RTL8366RB switch data line -# Pin 19 - RTL8366RB switch clock line -# Pin 20 - "GPIO20" +# gpio0 - WLAN LED +# gpio1 - USB LED +# gpio11 - Jumpstart button +# gpio12 - Reset button # LEDs are configured separately and driven by the LED device -#hint.gpioled.0.at="gpiobus0" -#hint.gpioled.0.name="usb" -#hint.gpioled.0.pins=0x0002 - -#hint.gpioled.1.at="gpiobus0" -#hint.gpioled.1.name="system" -#hint.gpioled.1.pins=0x0004 - -#hint.gpioled.2.at="gpiobus0" -#hint.gpioled.2.name="qss" -#hint.gpioled.2.pins=0x0020 - -#hint.gpioled.3.at="gpiobus0" -#hint.gpioled.3.name="wlan" -#hint.gpioled.3.pins=0x0200 +hint.gpioled.0.at="gpiobus0" +hint.gpioled.0.name="wlan" +hint.gpioled.0.pins=0x0001 + +hint.gpioled.1.at="gpiobus0" +hint.gpioled.1.name="usb" +hint.gpioled.1.pins=0x0002 From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 04:08:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 09705BE3; Fri, 5 Apr 2013 04:08:05 +0000 (UTC) (envelope-from hrs@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EC81FEC9; Fri, 5 Apr 2013 04:08:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35484P1026581; Fri, 5 Apr 2013 04:08:04 GMT (envelope-from hrs@svn.freebsd.org) Received: (from hrs@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35484LS026576; Fri, 5 Apr 2013 04:08:04 GMT (envelope-from hrs@svn.freebsd.org) Message-Id: <201304050408.r35484LS026576@svn.freebsd.org> From: Hiroki Sato Date: Fri, 5 Apr 2013 04:08:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249128 - in releng/8.4/release/doc: de_DE.ISO8859-1 en_US.ISO8859-1/errata en_US.ISO8859-1/installation en_US.ISO8859-1/relnotes fr_FR.ISO8859-1 ja_JP.eucJP ru_RU.KOI8-R share/examples... 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: Fri, 05 Apr 2013 04:08:05 -0000 Author: hrs Date: Fri Apr 5 04:08:03 2013 New Revision: 249128 URL: http://svnweb.freebsd.org/changeset/base/249128 Log: Trim old imformation and bump version numbers. Approved by: re (implicit) Deleted: releng/8.4/release/doc/de_DE.ISO8859-1/ releng/8.4/release/doc/fr_FR.ISO8859-1/ releng/8.4/release/doc/ja_JP.eucJP/ releng/8.4/release/doc/ru_RU.KOI8-R/ releng/8.4/release/doc/zh_CN.GB2312/ Modified: releng/8.4/release/doc/en_US.ISO8859-1/errata/article.xml releng/8.4/release/doc/en_US.ISO8859-1/installation/article.xml releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml releng/8.4/release/doc/share/examples/Makefile.relnotesng releng/8.4/release/doc/share/xml/release.ent Modified: releng/8.4/release/doc/en_US.ISO8859-1/errata/article.xml ============================================================================== --- releng/8.4/release/doc/en_US.ISO8859-1/errata/article.xml Fri Apr 5 02:15:10 2013 (r249127) +++ releng/8.4/release/doc/en_US.ISO8859-1/errata/article.xml Fri Apr 5 04:08:03 2013 (r249128) @@ -41,7 +41,7 @@ $FreeBSD$ - 2011 + 2013 The &os; Documentation Project @@ -83,7 +83,7 @@ - will be maintained until the release of &os; &release.next;. + will be maintained until the EoL of &os; &release.branch; branch. @@ -167,13 +167,6 @@ Late-Breaking News and Corrections - A bug in OpenSSL that could cause - it to parse past the end of the message was found at the late - stage of &release.bugfix; release process. The &release.bugfix; - includes a fix for this issue by importing relevant parts from - the OpenSSL CVS. This could be triggered by an incorrectly - formatted ClientHello SSL/TLS handshake messages. The details - can be found at . + No news. Modified: releng/8.4/release/doc/en_US.ISO8859-1/installation/article.xml ============================================================================== --- releng/8.4/release/doc/en_US.ISO8859-1/installation/article.xml Fri Apr 5 02:15:10 2013 (r249127) +++ releng/8.4/release/doc/en_US.ISO8859-1/installation/article.xml Fri Apr 5 04:08:03 2013 (r249128) @@ -21,7 +21,7 @@ $FreeBSD$ - 2012 + 2013 The &os; Documentation Project @@ -62,8 +62,8 @@ . The branch tag to use for updating the source is - RELENG_8_3 for CVS. For SVN use - releng/8.3. + RELENG_8_4 for CVS. For SVN use + releng/8.4. @@ -73,11 +73,11 @@ upgrades of &arch.i386; and &arch.amd64; systems running earlier FreeBSD releases. Systems running 7.[01234]-RELEASE, - 8.[012]-RELEASE, - 8.3-BETA1, or - 8.3-RC[12] can upgrade as follows: + 8.[0123]-RELEASE, + 8.4-BETA1, or + 8.4-RC[12] can upgrade as follows: - &prompt.root; freebsd-update upgrade -r 8.3-RELEASE + &prompt.root; freebsd-update upgrade -r 8.4-RELEASE During this process, FreeBSD Update may ask the user to help by merging some configuration files or by confirming that Modified: releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Apr 5 02:15:10 2013 (r249127) +++ releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Apr 5 04:08:03 2013 (r249128) @@ -16,7 +16,8 @@ $FreeBSD$ - 2011 + 2013 + The &os; Documentation Project @@ -118,6 +119,7 @@ advisories available from . + - - SA-10:10.openssl - 29 November 2010 - OpenSSL multiple vulnerabilities - +--> Kernel Changes - The maximum number of pages - used for DMA bounce buffer pool has been increased from 256 to - 1024. - - The default value of - kern.hz has been increased from 100 to - 1000. - - The SMP kernel now works on - MPC7400-based Apple desktop machines such as - PowerMac3,3. - - &os;/powerpc now supports - DMA bounce buffer which is required on systems with larger RAM - than 4GB. - - &os;/mips support has been - improved. It now supports SMP on a SWARM with a dual-core - Sibyte processor. - - &os;/mips now supports Netlogic Microsystems' - XLR and XLS multi-core processor families. - - &os;/sparc64 now supports - reservation-based physical memory allocation which provides - better performance. - - &os;/amd64 now always sets - the KVA space as equal to or larger than physical memory size. - The default size was calculated based on one-third of the - physical memory size by a code derived from one for i386. It - has been changed because constraints for memory space are not - severe on amd64 and this change would help to prevent a - kmem_map too small panic which often occurs - when using ZFS. - - CPU topology detection - for Intel CPUs has been improved. - - ACPI suspend/resume - functionality support has been improved. - - &os; kernel now - supports kern_fpu_enter() and - kern_fpu_leave() KPIs which allow the - kernel subsystems to use XMM register files used in Intel SSE - (Streaming SIMD Extensions). - - The &man.acpi.4; - driver now uses ACPI Reset Register capability by default only - when a flag in the FADT which indicates it is available. This - behavior was controlled by a &man.sysctl.8; variable - hw.acpi.handle_reboot and the default value - was always set to 0. - - The &man.acpi.4; - driver now supports new loader tunables - hw.acpi.install_interface and - hw.acpi.remove_interface. For more - details, see &man.acpi.4; manual page. - - The &man.alq.9; support has been - improved. The alq_writen() and - alq_getn() KPIs have been extended to - support variable length messages, which is enabled at ALQ - creation time depending on the arguments passed to - alq_open(). Also, the - ALQ_NOACTIVATE and - ALQ_ORDERED flags have been added to allow - ALQ consumers to have more control over I/O scheduling and - resource acquisition respectively. These extensions are fully - backward compatible. - - The &man.alq.9; support is now provided - as a kernel module alq.ko. - - The &man.ddb.8; kernel debugger now - supports an optional delay in reset and - reboot commands. This allows an - administrator to break the system into debugger and trigger - automatic textdump when an unattended panic occurs. - - The &man.ddb.8; kernel debugger now - supports a show cdev command. This - displays the list of all created cdev's, consisting of devfs - node name and struct cdev address. - - The &os; GENERIC - kernel is now compiled with and - options. From 8.2-RELEASE the - kernel supports displaying a stack trace on panic by using - &man.stack.9; facility with no debugger backend like - &man.ddb.8;. Note that this does not change the default - behaviors of the GENERIC kernel on - panic. - - The following - &man.sysctl.8; variables are also now loader tunables: - vm.kmem_size, - vm.kmem_size_max, and - vm.kmem_size_min, - debug.kdb.stop_cpus, - debug.trace_on_panic, and - kern.sync_on_panic. Also, new - &man.sysctl.8; variables vm.kmem_map_size - for the current kmem map size and - vm.kmem_map_free for largest contiguous - free range in kmem map, vfs.ncsizefactor - for size factor for namecache, and - vfs.ncnegfactor for ratio of negative - namecache entries have been added. - - The &os; &man.memguard.9; framework has - been improved to make it able to detect use-after-free of - allocated memories over a longer time. For more details, see - &man.memguard.9; manual page. - - PT_LWPINFO request to - obtain information about the kernel thread that caused the - traced process to stop in the &man.ptrace.2; process tracing - and debugging facility has been improved. It now reports - system call entry and leave events, as well as availability of - siginfo_t accompanying the reported - signal. - - The &os; &man.crypto.4; framework - (opencrypto) now supports XTS-AES (XEX-TCB-CTS, or XEX-based - Tweaked Code Book mode with CipherText Stealing), which is - defined in IEEE Std. 1619-2007. - - Xen HVM support in - &os;/amd64 kernel has been improved. For more details, see - &man.xen.4; manual page. - - The qpi(4) pseudo bus - driver has been added. This supports extra PCI buses on Intel - QPI chipsets where various hardware such as memory controllers - for each socket is connected. + Boot Loader Changes - &os; now fully supports GPT (GUID - Partition Table). Checksums of primary header and primary - partition table are verified properly now. - - Memory - management issues that prevented &os; OpenFirmware loader - and netbooting from working have been fixed. - - The &man.pxeboot.8; now uses NFS - version 3 instead of version 2 by default. + Hardware Support - The &man.aesni.4; - driver has been added. This supports AES accelerator on - Intel CPUs and accelerates AES operations for - &man.crypto.4;. - - The &man.aibs.4; - driver has been added. This supports the hardware sensors - in ASUS motherboards and replaces the &man.acpi.aiboost.4; - driver. - - The &man.coretemp.4; - driver now supports Xeon 5500/5600 series. - - &os;/powerpc now - supports the I2C bus in Apple System Management Unit. - - A device driver that - supports CPU temperature sensors on PowerMac 11,2 has been - added. - - The &man.ehci.4;, &man.ohci.4;, and - &man.uhci.4; driver now support LOW speed BULK transfer - mode. - - The &man.ichwd.4; - driver now supports Intel NM10 Express chipset watchdog - timer. - - The &man.tpm.4; driver, which supports - Trusted Platform Module has been added. - - The xhci(4) driver, which supports - Extensible Host Controller Interface (xHCI) and USB 3.0, has - been added. + Multimedia Support - The &os; Linux emulation subsystem now supports the - video4linux API. This requires - native video4linux hardware - drivers such as the ones provided by multimedia/pwcbsd and multimedia/webcamd. - - MIDI input buffer size in the - &man.uaudio.4; driver has been changed. This fixes a - problem where the input appears several seconds - late. - - An issue in the &man.uaudio.4; - driver that prevented some USB audio devices from working - has been fixed. + Network Interface Support - The &man.alc.4; driver now supports - Atheros AR8151/AR8152 PCIe Gigabit/Fast Ethernet - controllers. - - A bug in the &man.alc.4; driver was - fixed that could lead to a system freeze when the system - was booted without a cable plugged in. This symptom was - found in AR8132 on EEE PC. - - The TX interrupt moderation timer in - the &man.alc.4; driver has been reduced from 50ms to 1ms. - The 50ms timer resulted in a poor UDP performance. - - The &man.axe.4; driver - has been improved for stability and better performance on - the TX packet rate. - - The &man.bge.4; driver now supports - BCM5718 x2 PCI Express dual-port gigabit Ethernet - controller family. This family is the successor to the - BCM5714/BCM5715 family and supports IPv4/IPv6 checksum - offloading, TSO, VLAN hardware tagging, jumbo frames, - MSI/MSIX, IOV, RSS and TSS. The current version of the - driver supports all hardware features except IOV and - RSS/TSS. - - A bug in the &man.bge.4; driver which - prevented TSO from working in BCM57780 has been - fixed. - - A bug in the &man.bge.4; driver that - could wrongly disable the TX checksum offloading feature - as well when one tries to disable only the RX checksum - offloading has been fixed. - - Some improvements for reliability of - the &man.bge.4; driver with BCM5906 controller has been - made. - - The &man.bge.4; driver now supports - hardware MAC statistics in controller's internal memory - for BCM5705 or newer Broadcom controllers. These counters - can be accessed via &man.sysctl.8; variable - dev.bge.N.stats.* - and provide useful information to diagnose driver - issues. - - UDP checksum offloading in the - &man.bge.4; driver has been disabled by default. This is - because Broadcom controllers have a bug which can generate - UDP datagrams with checksum value 0 - when TX UDP checksum offloading is enabled. The checksum - offloading can be enabled by using the following loader - tunable: - - dev.bge.N.forced_udpcsum - - A bug in the &man.bge.4; driver that - could lead to poor performance on a system with more than - 4 GB RAM has been fixed. The cause was that all of - Broadcom controllers except the BCM5755 and later have a - bug in 4 GB-boundary DMA processing and used the bounce - buffer in an inefficient way. - - The &man.bwi.4; driver, which supports - Broadcom BCM430* and BCM431* family Wireless Ethernet - controllers, has been added. This is not compiled into - the GENERIC kernel because there are - some problems. The kernel module - if_bwi.ko is available and can be - loaded without recompiling the kernel to enable this - driver. - - A bug in the &man.bwn.4; driver that - prevented WPA authentication from working has been - fixed. - - A bug in the &man.cdce.4; driver has - been fixed. - - The &man.cxgb.4; driver now supports - the following new &man.sysctl.8; variables: - hw.cxgb.nfilters sets the maximum - number of entries in the hardware filter table, - dev.cxgbc.N.pkt_timestamp - provides packet timestamp instead of connection hash, and - dev.cxgbc.N.core_clock - provides the core clock frequency in kHz. - - The &man.em.4; driver has been updated to version - 7.1.9. - - The &man.igb.4; driver has been updated to version - 2.0.7. - - The &man.em.4; and &man.igb.4; drivers - now provide statistics counters as &man.sysctl.8; MIB - objects. - - The &man.em.4; and &man.igb.4; drivers - now support the &man.led.4; interface via - /dev/led/emN - and - /dev/led/igbN - for identification LED control. The following command - line makes the LED blink on em0: - - &prompt.root; echo f2 > /dev/led/em0 - - The &man.epair.4; virtual Ethernet - interface driver now supports explicit UP/DOWN linkstate. - This fixes an issue when it is used with the &man.carp.4; - protocol. - - The &man.fxp.4; driver now supports - TSO over VLAN on i82550 and i82551 controllers. - - The &man.iwn.4; driver now supports - Intel Wireless WiFi Link 6000 series. The firmware has - been updated to version 9.221.4.1. - - The &man.ixgbe.4; - driver is now also provided as a kernel module. - - The &man.ixgbe.4; - driver has been updated to version 2.3.8. It now supports - 82599, better interrupt handling, hardware assist to LRO, - VM SRIOV interface, and so on. - - The - &man.miibus.4; has been rewritten for the generic IEEE - 802.3 annex 31B full duplex flow control support. The - &man.alc.4;, &man.bge.4;, &man.bce.4;, &man.cas.4;, - &man.fxp.4;, &man.gem.4;, &man.jme.4;, &man.msk.4;, - &man.nfe.4;, &man.re.4;, &man.stge.4;, and &man.xl.4; - drivers along with atphy(4), bmtphy(4), brgphy(4), - e1000phy(4), gentbi(4), inphy(4), ip1000phy(4), jmphy(4), - nsgphy(4), nsphyter(4), and &man.rgephy.4; have been - updated to support flow control via this facility. - - The &man.mwlfw.4; - driver is now also provided as a kernel module. - - A bug in the &man.mxge.4; driver - that prevented TSO from working has been fixed. - - The &man.nfe.4; driver now supports - WoL (Wake on LAN). - - The &man.re.4; driver now supports - 64-bit DMA addressing for RTL810xE/RTL8168/RTL8111 PCIe - controllers. - - The &man.re.4; driver now supports - hardware interrupt moderation of TX completion interrupts - on RTL8169/RTL8168 controllers. - - The &man.rl.4; driver now supports WoL - (Wake on LAN) on RTL8139B or newer controllers. - - The &man.rl.4; driver now supports - reading hardware statistics counters by setting a - &man.sysctl.8; variable - dev.rl.N.stats - to 1. - - The &man.rl.4; driver now supports a - device hint to change a way of register access. Although - some newer RTL8139 controllers support memory-mapped - register access, it is difficult to detect the support - automatically. For this reason the driver uses I/O - mapping by default and provides the following device hint. - If it is set to 0, the driver uses - memory mapping for register access. - - hint.rl.N.prefer_iomap="0" - - Note that the default value is 1. - - The &man.rl.4; driver has improved - interrupt handling. It now has better TX performance - under high RX load. - - A bug in the &man.sk.4; driver has - been fixed. It did not program the station address for - Yukon controllers and overriding the station address with - &man.ifconfig.8; was not possible. - - The &man.sk.4; driver now disables TX - checksum offloading by default. This is because some - revisions of the Yukon controller generate corrupted frames. - The checksum offloading can be enabled manually by using - option in the &man.ifconfig.8; - utility. - - The &man.sis.4; driver - now works on all supported platforms. Some stability and - performance issues have also been fixed. - - The &man.sis.4; driver now supports - WoL (Wake on LAN) on NS DP8315 controller. - - A tunable - dev.sis.N.manual_pad - for the &man.sis.4; driver has been added. This controls - whether padding with 0x00 for short frames is done by CPU, - rather than the controller. The reason why this tunable - has been added is that NS DP83815/DP83816 pads them with - 0xff though RFC 1042 specifies it should be 0x00. The - tunable is disabled by default, which means padding with - 0xff is used because padding with 0x00 by software needs - extra CPU cycles. Enabling manual_pad, - by setting this &man.sysctl.8; variable to a non-zero - value, forces the use of software padding. - - The &man.ste.4; driver now supports - a device hint to change the device register access mode. - The driver uses memory-mapped register access by default, - but this caused stability problems with some old IC Plus - Corp (formerly Sundace) controllers. The following device - hint makes the driver use I/O mapping for register - access: - - hint.ste.N.prefer_iomap="1" - - The &man.xl.4; driver now supports - WoL (Wake on LAN). Note that not all controllers support - this functionality and some need an additional remote - wakeup cable. + Network Protocols - An issue in the &man.carp.4; pseudo - interface and linkstate changes of the underlying interfaces - has been fixed. This happened when a &man.carp.4; interface - was created before the underlying interface and its - linkstate became UP. - - A bug in the &man.ipfw.4; - packet filter subsystem has been fixed. The &man.sysctl.8; - variable net.inet.ip.fw.one_pass did not - work for netgraph action and in-kernel - NAT. - - A new loader tunable - net.link.ifqmaxlen has been added. It - specifies the default value of send interface queue length. - The default value for this parameter is - 50. - - The ngtee action in - the &man.ipfw.4; packet filter subsystem has been changed. - It no longer accepts a packet. - - A possible panic in the &man.ipfw.4; - pseudo interface for logging has been fixed. - - IPsec flow distribution has been - improved for more parallel processing. - - A bug in the &os; IPv4 stack that - prevented adding a proxy ARP entry over &man.netgraph.4; - interfaces has been fixed. - - A bug in the &os; IPv6 stack that - prevented an in the &man.ping6.8; - utility from working with - net.inet6.ip6.use_defaultzone=1 has been - fixed. - - The &man.lagg.4; interface now - supports a &man.sysctl.8; variable - net.link.lagg.failover_rx_all. This - controls whether to accept input packets on any link in a - failover lagg. - - The &man.ng.eiface.4; &man.netgraph.4; - node now supports VLAN-compatible MTU and an MTU size which - is larger than 1500. - - The &man.ng.ether.4; &man.netgraph.4; - node now supports interface transfer between multiple virtual - network stacks by &man.ifconfig.8; vnet - command. A &man.ng.ether.4; node associated with a network - interface is now destroyed and recreated when the network - interface is moved to another vnet. - - A new &man.netgraph.4; node - &man.ng.patch.4; has been added. This performs data - modification of packets passing through. Modifications are - restricted to a subset of C language operations on unsigned - integers of 8, 16, 32 or 64-bit size. - - An ICMP unreachable problem in the - &man.pf.4; packet filter subsystem when TSO support is - enabled has been fixed. - - The TCP bandwidth delay product window - limiting algorithm controlled by the &man.sysctl.8; variable - net.inet.tcp.inflight.enable is now - disabled by default. It has been found that this algorithm - is inefficient on a fast network with smaller RTT than 10ms. - It had been enabled by default since 5.2-RELEASE, and then - had been disabled only if the RTT was lesser than 10ms since - 7.0-RELEASE. Pluggable TCP congestion control algorithm - modules are planned to be added for the future - releases. - - A bug in &os; TCP Path MTU discovery - which could lead to a wrong calculation for an MTU smaller - than 256 octets has been fixed. Note that this bug did not - affect MTUs equal to or larger than 256 octets. - - The &os; TCP reassembly - implementation has been improved. A long-standing - accounting bug affecting SMP systems has been fixed and the - net.inet.tcp.reass.maxqlen &man.sysctl.8; - variable has been retired in favor of a per-connection - dynamic limit based on the receive socket buffer size. &os; - receivers now handle packet loss (particularly losses caused - by queue overflows) significantly better than before which - improves connection throughput. - - The TCP initial window increase in RFC - 3390 which can be controlled by a &man.sysctl.8; variable - net.inet.tcp.rfc3390 now reduces the - congestion window to the restart window if a TCP connection - has been idle for one retransmit timeout or more. For more - details, see RFC 5681 Section 4.1. - - The &man.siftr.4;, Statistical - Information For TCP Research (SIFTR) kernel module has been - added. This is a facility that logs a range of statistics - on active TCP connections to a log file. It provides the - ability to make highly granular measurements of TCP - connection state, aimed at system administrators, developers - and researchers. - - &os; virtual network stack (vnet) now - supports IPv4 multicast routing. - - The IEEE 802.11s element identifiers have - been updated to reflect the final version of the amendment. This - update breaks compatibility with older mesh setups but is necessary - as the previous IDs are used by another amendment leading to - unexpected results when trying to associate with an accesspoint - using the affected IDs. + Disks and Storage - The &man.ahci.4; driver now disables NCQ - and PMP support on VIA VT8251 because they are unreliable - under load. - - The &man.ahci.4; driver now uses 15 - seconds for device reset timeout instead of 10 seconds - because some devices need 10 - 12 seconds to spin up. - - The &man.arcmsr.4; driver - has been updated to version 1.20.00.19. - - The &man.ada.4; driver now supports a - new &man.sysctl.8; variable - kern.cam.ada.spindown_shutdown which - controls whether or not to spin-down disks when shutting - down if the device supports the functionality. The default - value is 1. - - The &man.ata.4; driver - now supports limiting initial ATA mode for devices via - device hints - hint.devname.unit.devN.mode or - hint.devname.unit.mode. - The valid values are the same as ones supported in the - &man.atacontrol.8; and &man.camcontrol.8; utilities. - - The &man.ata.4; driver now disables - cable status check on both controller and device side - when the loader tunable - hw.ata.ata_dma_check_80pin is - 0. The check on controller side was - performed regardless of this loader tunable. - - The &man.ata.4; driver now reports - SATA power management capabilities to the &man.CAM.4; layer when - is enabled. This allows a device - to initiate transitions if controller configured to accept - it. This makes - hint.ata.N.pm_level=1 - mode work. - - The &man.ata.4; driver has been - improved on hotplugging and connection speed reporting - support for some Intel SATA controllers including ICH5 and - ICH8+ operating in legacy mode. - - An issue of device detection of - Serverworks K2 SATA controllers in the &man.ata.4; has been fixed. - - A bug in the &man.ata.4; driver that - prevented some Silicon Image chipsets from working on big - endian systems has been fixed. - - The &man.gconcat.8; GEOM class now - supports kernel crash dump. The dumping is performed to the - component where a dump partition begins. - - A bug in the &man.geli.8; GEOM class - on little endian platforms has been fixed. The metadata - version for newly created providers has been updated to - 4 due to this. Providers with the older - versions are fully interoperable with 8.2-RELEASE and later - by being treated as ones with the native byte order flag - automatically. - - The &man.geli.8; GEOM class now - supports a &man.sysctl.8; variable - kern.geom.eli.overwrites. This specifies - the number of times on-disk keys should be overwritten when - destroying them. The default value is - 5. - - The &man.geli.8; GEOM class has been - improved for preventing the same encryption key from being - used in 2^20 blocks (sectors). - - The &man.geli.8; GEOM class now uses - XTS-AES mode by default. - - A &man.sysctl.8; variable - kern.geom.eli.debug now allows a value - -1. This means turn off any log messages - of the &man.geli.8; GEOM class. - - The &man.mpt.4; driver now supports - larger I/O sizes which the device and &man.CAM.4; subsystem - can support. This was limited to 64KB, and the number of - scatter/gather segments was limited to 33 on platforms with - 4K pages. - - The &man.twa.4; - driver has been updated. The version number is - 3.80.06.003. + File Systems - The &man.linprocfs.5; Linux process - file system now supports - proc/$$/environment. - - The &os; NFS client now supports a - kernel environment variable - boot.nfsroot.nfshandlelen. This lets the - diskless root file system on boot to use NFS version 3 and - the specified file handle length. If this variable is not - set, NFS version 2 is used. - - The ZFS on-disk format has been updated - to version 15. - - The ZFS metaslab code has been updated. - This provides a noticeable improvement on write speed, - especially on pools with less than 30% of free space. The - related OpenSolaris Bug IDs are 6826241, 6869229, 6918420, - and 6917066. - - The ZFS now supports offlining of log - devices. The related OpenSolaris Bug IDs are 6599442, - 6726045, and 6803605. - - Performance improvements for the ZFS - have been imported from OpenSolaris. They include caching of - ACL permission checks, faster handling of &man.stat.2;, - mitigation of mutex lock contention. The related - OpenSolaris Bug IDs are 6802734, 6844861, 6848431, 6775100, - 6827779, 6857433, 6860318, 6865875, 6867395, 6868276, and - 6870564. - - The default value of - vfs.zfs.vdev.max_pending has been - decreased from 35 to 10 (OpenSolaris Bug ID is 6891731) to - improve latency. - - Various bugs in the ZFS subsystem have been fixed. The - related OpenSolaris Bug IDs are: 6328632, 6396518, 6501037, - 6504953, 6542860, 6551866, 6572357, 6572376, 6582163, - 6586537, 6595194, 6596237, 6604992, 6621164, 6623978, - 6633095, 6635482, 6664765, 6674216, 6696242, 6696858, - 6702206, 6710376, 6713916, 6717022, 6722540, 6722991, - 6737463, 6739487, 6739553, 6740164, 6745863, 6747596, - 6747698, 6748436, 6755435, 6757430, 6758107, 6759986, - 6759999, 6761100, 6761406, 6764124, 6765294, 6767129, - 6769612, 6770866, 6774713, 6774886, 6775697, 6776104, - 6776548, 6780491, 6784104, 6784108, 6785914, 6788152, - 6788830, 6789318, 6790064, 6790345, 6790687, 6791064, - 6791066, 6791071, 6791101, 6792134, 6792139, 6792884, - 6793430, 6794136, 6794570, 6794830, 6797109, 6797118, - 6798384, 6798878, 6799895, 6800184, 6800942, 6801507, - 6801810, 6803343, 6803822, 6804954, 6807339, 6807765, - 6809340, 6809683, 6809691, 6810367, 6815592, 6815893, - 6816124, 6818183, 6821169, 6821170, 6822816, 6824006, - 6824062, 6824968, 6826466, 6826468, 6826469, 6826470, - 6826471, 6826472, 6827260, 6830237, 6830541, 6833162, - 6833711, 6833999, 6834217, 6836714, 6836768, 6838062, - 6838344, 6841321, 6843014, 6843069, 6843235, 6844069, - 6844900, 6847229, 6848242, 6856634, 6857012, 6861983, - 6862984, 6863610, 6870564, 6880764, 6882227, 6892298, - 6898245, 6906110, 6906946, 6939941, 6950219, 6951024, and - 6953403. + Userland Changes - The &man.arp.8; utility has been improved. - It now runs faster even when a single interface has a number - of aliases. - - A bug in the &man.b64decode.1; utility that - prevented an option from handling arbitrary - breaks in a base64 encoded string has been fixed. - - The &man.calendar.1; utility now supports - repeating events which span multiple years, lunar events, and - solar events. - - The &man.dhclient.8; utility now reports a - reason for exiting and the 10-second period in which the - &man.dhclient.8; ignores routing messages has been changed to - start just after dhclient-script starts - instead of just after it finished. This change fixes a - symptom that &man.dhclient.8; silently exits under a certain - condition. - - Userland support for the &man.dtrace.1; - subsystem has been added. This allows inspection of userland - software itself and its correlation with the kernel, thus - allowing a much better picture of what exactly is going on - behind the scenes. The &man.dtruss.1; utility has been added - and the libproc library has been updated - to support the facility. - - The &man.du.1; utility now supports a - - option to display entries that exceeds the value of - threshold. If the value is - negative, it displays entries with a value less than the - absolute value of threshold. - - The &man.fdisk.8; utility now supports - partitions which are provided by &man.gjournal.8; or - &man.geli.8; GEOM classes. - - The &man.gcore.1; utility now supports an - flag which forces a full dump of all the - segments except for the malformed ones. - - The &man.geli.8; utility now supports - resize subcommand to resize encrypted file - systems after growing it. - - The &man.geli.8; utility now supports - suspend and resume - subcommands. The suspend subcommand makes - &man.geli.8; devices wait for all in-flight I/O requests, - suspend new I/O requests, remove all &man.geli.8; sensitive - data from the kernel memory (like encryption keys) and will - wait for either geli resume or - geli detach command. For more - information, see &man.geli.8; manual page. - - The &man.geli.8; utility now checks the - metadata provider size strictly. If the check fails, the - provider is not attached. A new option - can override this behavior. - - The &man.geli.8; utility now supports - and - - options for loading passphrase from a file. - - The gethost*(), - getnet*(), and - getproto*() functions now set the errno - to ERANGE and the NSS backend terminates - with NS_RETURN when the result buffer size - is too small. - - The &man.gpart.8; utility now supports a - resize command to resize partitions for all - schemes but EBR. - - The &man.gpart.8; utility now supports - backup and restore - subcommands to backup partition tables and restore - them. - - The &man.gpart.8; utility now handles - given geom/provider names with and without - /dev/ prefix. - - The &man.gpart.8; utility now supports - an option for the - destroy subcommand. This option forces - destroying of the partition table even if it is not - empty. - - The &man.gpart.8; utility now supports a - recover subcommand for GPT partition - tables. A corrupted GPT is now marked when the following - three types of corruption: - - - - Primary GPT header or table is corrupted. - - - - Secondary GPT header or table is corrupted. - - - - Secondary GPT header is not located at the last LBA. - - - - Changes to the corrupted GPT table are not allowed except - for destroy and recover - subcommands. - - The &man.gpart.8; utility now supports - GPT_ENT_ATTR_BOOTME, - GPT_ENT_ATTR_BOOTONCE, and - GPT_ENT_ATTR_BOOTFAILED attributes in GPT. - The attribute keywords in the command line are - bootme, bootonce, and - bootfailed respectively. - - An issue in the &man.newfs.8; utility - has been fixed. A UFS1 file system created with 64KB - blocksize was incorrectly recognized as one with a broken - superblock. This is because the &os; kernel checks a - partition first for a UFS2 superblock at 64KB offset while it - is possible that a UFS1 file systems with 64KB blocksize has - an alternative superblock at the same location. For example, - a file system created by newfs -U -O 1 -b 65536 -f - 8192 could lead to this symptom. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 04:53:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 69998FD1; Fri, 5 Apr 2013 04:53:44 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4C1FCA; Fri, 5 Apr 2013 04:53:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r354rikK040460; Fri, 5 Apr 2013 04:53:44 GMT (envelope-from jhibbits@svn.freebsd.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r354riNK040459; Fri, 5 Apr 2013 04:53:44 GMT (envelope-from jhibbits@svn.freebsd.org) Message-Id: <201304050453.r354riNK040459@svn.freebsd.org> From: Justin Hibbits Date: Fri, 5 Apr 2013 04:53:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249129 - head/sys/powerpc/aim 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, 05 Apr 2013 04:53:44 -0000 Author: jhibbits Date: Fri Apr 5 04:53:43 2013 New Revision: 249129 URL: http://svnweb.freebsd.org/changeset/base/249129 Log: Print out DSISR in a fatal DSI trap. Sponsored by: Modified: head/sys/powerpc/aim/trap.c Modified: head/sys/powerpc/aim/trap.c ============================================================================== --- head/sys/powerpc/aim/trap.c Fri Apr 5 04:08:03 2013 (r249128) +++ head/sys/powerpc/aim/trap.c Fri Apr 5 04:53:43 2013 (r249129) @@ -385,6 +385,8 @@ printtrap(u_int vector, struct trapframe case EXC_DSI: printf(" virtual address = 0x%" PRIxPTR "\n", frame->cpu.aim.dar); + printf(" dsisr = 0x%" PRIxPTR "\n", + frame->cpu.aim.dsisr); break; case EXC_ISE: case EXC_ISI: From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 05:01:24 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id BF86F257; Fri, 5 Apr 2013 05:01:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-bk0-x22d.google.com (mail-bk0-x22d.google.com [IPv6:2a00:1450:4008:c01::22d]) by mx1.freebsd.org (Postfix) with ESMTP id 0182E6E; Fri, 5 Apr 2013 05:01:23 +0000 (UTC) Received: by mail-bk0-f45.google.com with SMTP id j10so1854465bkw.4 for ; Thu, 04 Apr 2013 22:01:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=UIZ8SFIngzo8f7kOdELMOQmo3zT+h1Pgi/4WaQDG5Qk=; b=AFG8gEhLntWAkbuerHHyWm9vMiAM2fS576l8qVHRtPwL0Wwhq2iPpWxbczIzaF9ZRD bw95titz9Knxtz9O70v51hwIVKIEjiJXgI/BNY3xBKhK39v0RbJhtv2iX6LJB8UGRRcv WT2gyEQpI/WXtebJ6vwaOejDhQoGlvoHe3uPBZrm1Dy2J46RBNdxAa8hOC1c4TTss0Yr 3feN7MgMmRXY+33J3RK5rjNNdJ3lzd4+bfxm2V1jAUEZkIkHtksip63gaxI9LWaozJW4 AgtZx65XWUVZwSEPJyaK290x/MeQevwxTDeDpaV0tVeMC+zSXnnMnwrS+cgMPxDf193W S4MA== MIME-Version: 1.0 X-Received: by 10.204.190.143 with SMTP id di15mr6131856bkb.50.1365138082839; Thu, 04 Apr 2013 22:01:22 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.204.239.132 with HTTP; Thu, 4 Apr 2013 22:01:22 -0700 (PDT) Received: by 10.204.239.132 with HTTP; Thu, 4 Apr 2013 22:01:22 -0700 (PDT) In-Reply-To: <201304050453.r354riNK040459@svn.freebsd.org> References: <201304050453.r354riNK040459@svn.freebsd.org> Date: Thu, 4 Apr 2013 22:01:22 -0700 X-Google-Sender-Auth: fW6AZjbg0rvDj9bbMwPpoUrwPdg Message-ID: Subject: Re: svn commit: r249129 - head/sys/powerpc/aim From: Justin Hibbits To: svn-src-head@freebsd.org, src-committers@freebsd.org, svn-src-all@freebsd.org 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: Fri, 05 Apr 2013 05:01:24 -0000 Interesting, I never touched the Sponsored by: line. On Apr 4, 2013 9:53 PM, "Justin Hibbits" wrote: > Author: jhibbits > Date: Fri Apr 5 04:53:43 2013 > New Revision: 249129 > URL: http://svnweb.freebsd.org/changeset/base/249129 > > Log: > Print out DSISR in a fatal DSI trap. > > Sponsored by: > > Modified: > head/sys/powerpc/aim/trap.c > > Modified: head/sys/powerpc/aim/trap.c > > ============================================================================== > --- head/sys/powerpc/aim/trap.c Fri Apr 5 04:08:03 2013 (r249128) > +++ head/sys/powerpc/aim/trap.c Fri Apr 5 04:53:43 2013 (r249129) > @@ -385,6 +385,8 @@ printtrap(u_int vector, struct trapframe > case EXC_DSI: > printf(" virtual address = 0x%" PRIxPTR "\n", > frame->cpu.aim.dar); > + printf(" dsisr = 0x%" PRIxPTR "\n", > + frame->cpu.aim.dsisr); > break; > case EXC_ISE: > case EXC_ISI: > From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 05:06:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id AF7B343C for ; Fri, 5 Apr 2013 05:06:31 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f47.google.com (mail-pb0-f47.google.com [209.85.160.47]) by mx1.freebsd.org (Postfix) with ESMTP id 88C25D2 for ; Fri, 5 Apr 2013 05:06:31 +0000 (UTC) Received: by mail-pb0-f47.google.com with SMTP id rq13so1818132pbb.6 for ; Thu, 04 Apr 2013 22:06:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=x-received:mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=57xRJ2bR9I/5QPjT10WM9k1wN6aYPEW7ZsPsYbXTf7c=; b=eOU++Wqj0YJ1ObVp7T3U8VZcpDKwUxwI3KCIzs9zguUi66aWTZuzaXcxE/JreDgxhv xfxnhbPLUugC0UtYhGeulQauR+PXwN9NLxJ4IkGCp/MwePLpdSxYeqI++7rDd2pIfSuk UjaDK8Mfi6lbmVrq6Qj7XRYev8FhxsbJoqGUY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received: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=57xRJ2bR9I/5QPjT10WM9k1wN6aYPEW7ZsPsYbXTf7c=; b=h3vBWEzXQukQEvwwtDO2CNBPVrkUIXB+n8eCMGFA/qVLZALhOHQWbYPvDtzNmYkgt4 yu5xH2dUd3aRvJ+jXvYxi9klpOdw5JUedxJoz5crs1a0Fea7fkZXYODtJjtMdSj7Zvq1 dgpSFYShV8jqXJar+0b1tJq5AqWJZfT8ZfC7Z9QT00Qi5ikvqNcgz/E91RDZ9PPZCm0U FsyiDJNfYEyW924tfolddZgsBdu8d5dSw0G9MNDRHcaw/YTbEQfp9wKMVsm15fJp02fF CsVaDHIqw4fKhGMthgotpM0webzz+fxrqAgoVlYN1JpMMI68lkh+A2J+cdt5yOohGg9Z j1mQ== X-Received: by 10.68.138.135 with SMTP id qq7mr12574019pbb.42.1365138391079; Thu, 04 Apr 2013 22:06:31 -0700 (PDT) MIME-Version: 1.0 Sender: lists@eitanadler.com Received: by 10.66.86.34 with HTTP; Thu, 4 Apr 2013 22:06:01 -0700 (PDT) In-Reply-To: References: <201304050453.r354riNK040459@svn.freebsd.org> From: Eitan Adler Date: Fri, 5 Apr 2013 01:06:01 -0400 X-Google-Sender-Auth: YonXNQT_NVbUMSnveCO1590ZwfE Message-ID: Subject: Re: svn commit: r249129 - head/sys/powerpc/aim To: Justin Hibbits , Rui Paulo Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQkVABP87W8bmUMUqhr/cNvwAtQ1R08l0c+AQs4xz5lokYm3HVe326JlVdC9egDsd3uS05zM 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, 05 Apr 2013 05:06:31 -0000 On 5 April 2013 01:01, Justin Hibbits wrote: > Interesting, I never touched the Sponsored by: line. Did you recently rebuild Subversion (after r314983 in ports?) Rui added a patch that may have affected this, but I don't think it should magically add a sponsored by line. Do you have ORGANIZATION set in make.conf? -- Eitan Adler Source, Ports, Doc committer Bugmeister, Ports Security teams From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 05:13:14 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 42A295F6; Fri, 5 Apr 2013 05:13:14 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-bk0-x230.google.com (mail-bk0-x230.google.com [IPv6:2a00:1450:4008:c01::230]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4BB102; Fri, 5 Apr 2013 05:13:13 +0000 (UTC) Received: by mail-bk0-f48.google.com with SMTP id jf3so1915120bkc.35 for ; Thu, 04 Apr 2013 22:13:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=jqNLuTqCAjppxv/e+iSrxUbwRHTeVLndvm8QlvbfyvE=; b=A4sXhTzk4kkgo6vZ8xJR0zog/u8/F+WrIGau77QIwAAPBebMjMgTPLqe6+cchlBlpZ fml37rHnop4t29Qhf362GtRmA8YzOTusL0M1VRV8y7trcN1Qu5qhWdJI8sN0RoaWua2U ifk0HZG3LGtxpGQ4rpcw6MqyhvLd4sS3bvty9dFmLYv8sxV39PIG6oSYbwYKe+u7Fplg RE4b7PHn0MLe9kMHfo+3LZy8FzXOoqMr7pUYliOv78G33l65GbIR6c3K8P20zonaTViO X5PzPObTlS9r8op8j2u/p3zSNtx4RtdGa70xRftrsXJo28rRDp4v9T8qOdEvI9vvKa03 ee0Q== MIME-Version: 1.0 X-Received: by 10.205.2.134 with SMTP id nu6mr6167348bkb.26.1365138792136; Thu, 04 Apr 2013 22:13:12 -0700 (PDT) Sender: chmeeedalf@gmail.com Received: by 10.204.239.132 with HTTP; Thu, 4 Apr 2013 22:13:12 -0700 (PDT) Received: by 10.204.239.132 with HTTP; Thu, 4 Apr 2013 22:13:12 -0700 (PDT) In-Reply-To: References: <201304050453.r354riNK040459@svn.freebsd.org> Date: Thu, 4 Apr 2013 22:13:12 -0700 X-Google-Sender-Auth: otcXc5Zq3O2TVFuxszPLyXdOkVY Message-ID: Subject: Re: svn commit: r249129 - head/sys/powerpc/aim From: Justin Hibbits To: Eitan Adler Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Rui Paulo 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, 05 Apr 2013 05:13:14 -0000 On Apr 4, 2013 10:06 PM, "Eitan Adler" wrote: > > On 5 April 2013 01:01, Justin Hibbits wrote: > > Interesting, I never touched the Sponsored by: line. > > Did you recently rebuild Subversion (after r314983 in ports?) > > Rui added a patch that may have affected this, but I don't think it > should magically add a sponsored by line. > > Do you have ORGANIZATION set in make.conf? > > > > -- > Eitan Adler > Source, Ports, Doc committer > Bugmeister, Ports Security teams I rebuilt all ports just the other day, don't know what ports revision it corresponds to, but I did a portsnap on Monday. And I don't have ORGANIZATION set in make.conf. - Justin From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 05:52:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 74FC0A26; Fri, 5 Apr 2013 05:52:34 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (felyko.com [IPv6:2607:f2f8:a528::3:1337:ca7]) by mx1.freebsd.org (Postfix) with ESMTP id 5D4A41F6; Fri, 5 Apr 2013 05:52:34 +0000 (UTC) Received: from [IPv6:2601:9:4d00:90:9cea:1bfe:4ab3:72fa] (unknown [IPv6:2601:9:4d00:90:9cea:1bfe:4ab3:72fa]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 17B0D3981E; Thu, 4 Apr 2013 22:52:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1365141153; bh=Gd5STNzOQXeoZD3G7wSA///g1NroIB1YTtODUqXn9Ck=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=EDCHjIf+MXmIracUHcNkQQ20J2Jn9ZQYBxx1s6RH2hMtp2OacvuaHwZy77dSC+DWG 8DW6IgRVEP+jTVP9wC79V8Y+zHpcui5ST5muH3N3Pgjb+15XNOZfGFiQEZ5yYNNs6Q iSo2h9XM18tFsOsQActiDB/XjOT/MIO+0DtqWpSA= Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r249129 - head/sys/powerpc/aim From: Rui Paulo In-Reply-To: Date: Thu, 4 Apr 2013 22:52:32 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <25854D59-11DB-40BD-8C7E-EC8CE68D9A4A@felyko.com> References: <201304050453.r354riNK040459@svn.freebsd.org> To: Justin Hibbits X-Mailer: Apple Mail (2.1503) 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: Fri, 05 Apr 2013 05:52:34 -0000 On 2013/04/04, at 22:13, Justin Hibbits wrote: > I rebuilt all ports just the other day, don't know what ports revision = it corresponds to, but I did a portsnap on Monday. And I don't have = ORGANIZATION set in make.conf. How did you commit it? It's impossible for it not to appear on your = editor session. Are you sure you didn't miss it? Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 05:58:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CC78FC3A for ; Fri, 5 Apr 2013 05:58:35 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta10.emeryville.ca.mail.comcast.net (qmta10.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:43:76:96:30:17]) by mx1.freebsd.org (Postfix) with ESMTP id AFD7522B for ; Fri, 5 Apr 2013 05:58:35 +0000 (UTC) Received: from omta19.emeryville.ca.mail.comcast.net ([76.96.30.76]) by qmta10.emeryville.ca.mail.comcast.net with comcast id L5wV1l0011eYJf8AA5ybVG; Fri, 05 Apr 2013 05:58:35 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta19.emeryville.ca.mail.comcast.net with comcast id L5ya1l0031t3BNj015yaJL; Fri, 05 Apr 2013 05:58:34 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 298B073A1C; Thu, 4 Apr 2013 22:58:34 -0700 (PDT) Date: Thu, 4 Apr 2013 22:58:34 -0700 From: Jeremy Chadwick To: Brooks Davis Subject: Re: svn commit: r248352 - in stable/9: etc share/mk Message-ID: <20130405055834.GA97433@icarus.home.lan> References: <201303152132.r2FLWfwx076672@svn.freebsd.org> <201303200918.08803.jhb@freebsd.org> <20130402175903.GA85393@lor.one-eyed-alien.net> <201304021550.43701.jhb@freebsd.org> <20130402213534.GA86221@lor.one-eyed-alien.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130402213534.GA86221@lor.one-eyed-alien.net> User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1365141515; bh=AL11v+gbgrPsGKyi3+FKRi1dFBm762FM6DSGLen99V8=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=RdnWGg/CyzafByuvaijn5BYly9M1CkqzIh/JtJFOxzYJw+3k6ttDUed7LH0Utbo+8 ilG5pd0YGAM5ZkwMsEcD5dFU9NELABLexBtaSfjC8vL29w9i9DidxJMeJg84A2PaqJ 0htHqXNKMlqGfqONPzBWiRw2R0DkoI1Y5RRi9vU76p0vAtxO+m5RbWFl2W3zu9WR/f tnM5r05jkhLvptyOU2mDe6GohgcufGMcfj+xvSRQIMQRe5fsvO5UJCuVRAdJE2+N4C +Q+n/8za6gaAyrbso9kfrMrgob7hYQSVRHG8AnMkG+g6sMvxaUMZYSHJAWzeAvErl3 UpzkMXI0mTmOA== Cc: src-committers@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , svn-src-stable-9@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, 05 Apr 2013 05:58:35 -0000 On Tue, Apr 02, 2013 at 04:35:34PM -0500, Brooks Davis wrote: > On Tue, Apr 02, 2013 at 03:50:43PM -0400, John Baldwin wrote: > > On Tuesday, April 02, 2013 1:59:03 pm Brooks Davis wrote: > > > On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote: > > > > On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote: > > > > > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote: > > > > > > On Tue, 19 Mar 2013, Brooks Davis wrote: > > > > > > > > > > > > > > > Replace all known uses of ln in the build process with appropriate > > > > > > > > > install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK > > > > > > > > > variables. > > > > > > > > > > > > > > > > It seems this merge breaks ``make distribution'' and hence mergemaster if your > > > > > > > > base system is not updated yet (for example, while updating jail): > > > > > > > > > > > > > > Sorry for the delay in responding. I missed this yesterday. > > > > > > > > > > > > > > It works for me on a older 9.0-STABLE system where the base install > > > > > > > doesn't support -l. Did you build world or run "make toolchain" in that > > > > > > > source tree to build the bootstrap copy of install? > > > > > > > > > > > > Yes, this is after full ``make buildworld buildkernel'' process. > > > > > > > > > > I've found the problem thanks to misc/177055. It is that mergemaster > > > > > (and etcupdate) set MAKEOBJDIRPREFIX to something in their > > > > > temporary directory and thus deprive themselves of bootstrap tools. > > > > > Unfortunately, I don't see a trivial fix so I've backed this out for > > > > > now and will work on this in HEAD. > > > > > > > > Hummmm. In the case of etcupdate you can use 'etcupdate -B'. That is actually safe > > > > to do in the common case where you've just updated /usr/src and built the corresponding > > > > world in /usr/obj. It should possibly even by the default for etcupdate if a DESTDIR > > > > is not specified. > > > > > > Finally getting back to this... > > > > > > etcupdate -B would correct the immediate problem for etcupdate. I do > > > think that making it the default if the tree exists makes sense. It > > > won't be more broken than a cross installworld is. > > > > Hmmm, checking for the obj tree is a bit hackish. I'd rather it were more > > deterministic. I think I'd like to make it just default to -B and require > > a new -b flag to build a new tree, but perhaps have it check for a tree > > and error out if it doesn't exist and you don't give it -b? > > Just switching the default seems fine in practice. I guess it would > probably be useful to keep an option to enable the old behavior. > > > > I did a quick test when I first found this issue and it would be easy to > > > reuse the existing MAKEOBJDIRPREFIX in mergemaster as well. > > > > > > I think we'll want to update UPDATING to recommend that the > > > mergemaster -p stage (and the equivalent for etcupdate) be run using the > > > version in the source tree, not the installed one. I do wonder if it > > > would make sense for them to attempt to find and invoke that version so > > > simplify bootstrapping. > > > > Currently etcupdate doesn't implement something like -p. I need to add that as > > I would prefer to use its conflict resolution for adding users. (That would > > also let it serve as a full replacement for mergemaster for those who prefer it.) > > OK, I'll look at switching the default behavior in mergemaster and > adding an option to revert to the old behavior. > > I'll also change UPDATING to suggest using the mergemaster.sh from the > source tree for mergemaster -p. Please be sure to update the relevant comments in src/Makefile too (see roughly lines 59 onward). -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 07:37:19 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2DF6B55F; Fri, 5 Apr 2013 07:37:19 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by mx1.freebsd.org (Postfix) with ESMTP id C1C006C2; Fri, 5 Apr 2013 07:37:17 +0000 (UTC) Received: by mail-ee0-f47.google.com with SMTP id t10so1255716eei.20 for ; Fri, 05 Apr 2013 00:37:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=7cD43zr1kbamkwi0rsDhUUzEWRqkXhIWa8Yk2WLQmZk=; b=XUD3cx7w7kQWn2jFfgGIb8O3Xe652RxVeUa0tljORlD6YbzEvgFoOPm3rTTWhddI3Z /BugOgnbdaykp2E5Hijo+jri4JoK1HkIv42CLJaJlZVDUlAwoI955mIWopNWx9QuS2aX UXlPU3wU5PwrIaowBurelIDmivrQ5yJwWLLaWl+PqZ+cpLLVqYYUj6jeWSneuZzMc0VZ 110uZ5X64DqFt49YCBnMWM1coHcEZDCv0l0lLA6h9+tFZp2WjFuwBLhxSw5AWdXUF+78 d3FXH4mEhg1oEn4JnmFfvBrdPYkI4sHXkwaGDyfUuRgtZQqKWtw/s/Bi5JeEApjZLZ+6 Mt8A== X-Received: by 10.15.24.14 with SMTP id i14mr16813533eeu.25.1365147430921; Fri, 05 Apr 2013 00:37:10 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id n2sm13884439eeo.10.2013.04.05.00.37.08 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Apr 2013 00:37:09 -0700 (PDT) Sender: Alexander Motin Message-ID: <515E7F22.4010804@FreeBSD.org> Date: Fri, 05 Apr 2013 10:37:06 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130326 Thunderbird/17.0.4 MIME-Version: 1.0 To: Rui Paulo Subject: Re: svn commit: r249129 - head/sys/powerpc/aim References: <201304050453.r354riNK040459@svn.freebsd.org> <25854D59-11DB-40BD-8C7E-EC8CE68D9A4A@felyko.com> In-Reply-To: <25854D59-11DB-40BD-8C7E-EC8CE68D9A4A@felyko.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler , Justin Hibbits 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, 05 Apr 2013 07:37:19 -0000 On 05.04.2013 08:52, Rui Paulo wrote: > On 2013/04/04, at 22:13, Justin Hibbits wrote: >> I rebuilt all ports just the other day, don't know what ports revision it corresponds to, but I did a portsnap on Monday. And I don't have ORGANIZATION set in make.conf. > > How did you commit it? It's impossible for it not to appear on your editor session. Are you sure you didn't miss it? I've seen the same problem when committing from my laptop with SVN built couple of weeks ago from ports. That line was present in editor, but I expected it to be removed since I haven't touched it. But it was not removed. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 07:41:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 777A3701; Fri, 5 Apr 2013 07:41:48 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 512C06DF; Fri, 5 Apr 2013 07:41:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r357fmxd089609; Fri, 5 Apr 2013 07:41:48 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r357flwW089607; Fri, 5 Apr 2013 07:41:47 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050741.r357flwW089607@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 07:41:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249131 - head/sys/dev/ath/ath_hal 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, 05 Apr 2013 07:41:48 -0000 Author: adrian Date: Fri Apr 5 07:41:47 2013 New Revision: 249131 URL: http://svnweb.freebsd.org/changeset/base/249131 Log: HAL additions to enable MCI Bluetooth coexistence in the AR9300 HAL. * Add the rest of the missing GPIO output mux types; * Add in a new debug category; * And a new MCI btcoex configuration option in ath_hal.ah_config Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ah.h head/sys/dev/ath/ath_hal/ah_debug.h Modified: head/sys/dev/ath/ath_hal/ah.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah.h Fri Apr 5 06:55:19 2013 (r249130) +++ head/sys/dev/ath/ath_hal/ah.h Fri Apr 5 07:41:47 2013 (r249131) @@ -566,7 +566,22 @@ typedef enum { HAL_GPIO_OUTPUT_MUX_MAC_NETWORK_LED = 3, HAL_GPIO_OUTPUT_MUX_MAC_POWER_LED = 4, HAL_GPIO_OUTPUT_MUX_AS_WLAN_ACTIVE = 5, - HAL_GPIO_OUTPUT_MUX_AS_TX_FRAME = 6 + HAL_GPIO_OUTPUT_MUX_AS_TX_FRAME = 6, + + HAL_GPIO_OUTPUT_MUX_AS_MCI_WLAN_DATA, + HAL_GPIO_OUTPUT_MUX_AS_MCI_WLAN_CLK, + HAL_GPIO_OUTPUT_MUX_AS_MCI_BT_DATA, + HAL_GPIO_OUTPUT_MUX_AS_MCI_BT_CLK, + HAL_GPIO_OUTPUT_MUX_AS_WL_IN_TX, + HAL_GPIO_OUTPUT_MUX_AS_WL_IN_RX, + HAL_GPIO_OUTPUT_MUX_AS_BT_IN_TX, + HAL_GPIO_OUTPUT_MUX_AS_BT_IN_RX, + HAL_GPIO_OUTPUT_MUX_AS_RUCKUS_STROBE, + HAL_GPIO_OUTPUT_MUX_AS_RUCKUS_DATA, + HAL_GPIO_OUTPUT_MUX_AS_SMARTANT_CTRL0, + HAL_GPIO_OUTPUT_MUX_AS_SMARTANT_CTRL1, + HAL_GPIO_OUTPUT_MUX_AS_SMARTANT_CTRL2, + HAL_GPIO_OUTPUT_MUX_NUM_ENTRIES } HAL_GPIO_MUX_TYPE; typedef enum { @@ -1074,6 +1089,8 @@ typedef enum { HAL_BT_COEX_SET_ACK_PWR = 0, /* Change ACK power setting */ HAL_BT_COEX_LOWER_TX_PWR, /* Change transmit power */ HAL_BT_COEX_ANTENNA_DIVERSITY, /* Enable RX diversity for Kite */ + HAL_BT_COEX_MCI_MAX_TX_PWR, /* Set max tx power for concurrent tx */ + HAL_BT_COEX_MCI_FTP_STOMP_RX, /* Use a different weight for stomp low */ } HAL_BT_COEX_SET_PARAMETER; #define HAL_BT_COEX_FLAG_LOW_ACK_PWR 0x00000001 @@ -1244,6 +1261,7 @@ typedef struct int ath_hal_ant_ctrl_comm2g_switch_enable; int ath_hal_ext_atten_margin_cfg; int ath_hal_war70c; + uint32_t ath_hal_mci_config; } HAL_OPS_CONFIG; /* Modified: head/sys/dev/ath/ath_hal/ah_debug.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_debug.h Fri Apr 5 06:55:19 2013 (r249130) +++ head/sys/dev/ath/ath_hal/ah_debug.h Fri Apr 5 07:41:47 2013 (r249131) @@ -53,6 +53,7 @@ enum { HAL_DEBUG_QUEUE = 0x04000000, HAL_DEBUG_PRINT_REG = 0x08000000, HAL_DEBUG_FCS_RTT = 0x10000000, + HAL_DEBUG_BT_COEX = 0x20000000, HAL_DEBUG_UNMASKABLE = 0x80000000, /* always printed */ HAL_DEBUG_ANY = 0xffffffff From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 07:52:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D3DBF941; Fri, 5 Apr 2013 07:52:47 +0000 (UTC) (envelope-from zeising+freebsd@daemonic.se) Received: from mail.lysator.liu.se (mail.lysator.liu.se [IPv6:2001:6b0:17:f0a0::3]) by mx1.freebsd.org (Postfix) with ESMTP id 89B3D734; Fri, 5 Apr 2013 07:52:47 +0000 (UTC) Received: from mail.lysator.liu.se (localhost [127.0.0.1]) by mail.lysator.liu.se (Postfix) with ESMTP id 17A4440002; Fri, 5 Apr 2013 09:52:45 +0200 (CEST) Received: by mail.lysator.liu.se (Postfix, from userid 1004) id 0CAC740017; Fri, 5 Apr 2013 09:52:45 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bernadotte.lysator.liu.se X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.3.1 X-Spam-Score: 0.0 Received: from mx.daemonic.se (h-45-105.a163.priv.bahnhof.se [94.254.45.105]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.lysator.liu.se (Postfix) with ESMTPSA id DC57040002; Fri, 5 Apr 2013 09:52:44 +0200 (CEST) Received: from mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) by mx.daemonic.se (Postfix) with ESMTPS id 3ZhtY83r92z8ggx; Fri, 5 Apr 2013 09:52:44 +0200 (CEST) X-Virus-Scanned: amavisd-new at daemonic.se Received: from mx.daemonic.se ([IPv6:2001:470:dca9:0:1::3]) (using TLS with cipher CAMELLIA256-SHA) by mailscanner.daemonic.se (mailscanner.daemonic.se [IPv6:2001:470:dca9:0:1::6]) (amavisd-new, port 10025) with ESMTPS id EOy6n3RcjSMC; Fri, 5 Apr 2013 09:52:42 +0200 (CEST) Received: from mail.daemonic.se (mail.daemonic.se [10.1.0.4]) by mx.daemonic.se (Postfix) with ESMTPS id 3ZhtY61yGJz8ggv; Fri, 5 Apr 2013 09:52:42 +0200 (CEST) Received: from tifa.daemonic.se (tifa.daemonic.se [IPv6:2001:470:dca9:1::6]) by mail.daemonic.se (Postfix) with ESMTPSA id 3ZhtY618zVz9Ctj; Fri, 5 Apr 2013 09:52:42 +0200 (CEST) Received: from tifa.daemonic.se (localhost [IPv6:::1]) by tifa.daemonic.se (Postfix) with ESMTP id B4F2E2281B; Fri, 5 Apr 2013 09:52:41 +0200 (CEST) Message-ID: <515E82C9.4070200@daemonic.se> Date: Fri, 05 Apr 2013 09:52:41 +0200 From: Niclas Zeising User-Agent: Mutt/1.5.21 MIME-Version: 1.0 To: Steven Hartland Subject: Re: svn commit: r249115 - in head: sbin/camcontrol sys/sys References: <201304042319.r34NJqIP040377@svn.freebsd.org> In-Reply-To: <201304042319.r34NJqIP040377@svn.freebsd.org> Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP 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, 05 Apr 2013 07:52:47 -0000 On 04/05/13 01:19, Steven Hartland wrote: > Author: smh > Date: Thu Apr 4 23:19:51 2013 > New Revision: 249115 > URL: http://svnweb.freebsd.org/changeset/base/249115 > > Log: > Adds security options to camcontrol this includes the ability to secure erase > disks such as SSD's > > Adds the ability to run ATA commands via the SCSI ATA Pass-Through(16) comand > > Reviewed by: mav > Approved by: pjd (mentor) > MFC after: 2 weeks > > Modified: > head/sbin/camcontrol/camcontrol.8 You should bump the date in the manual as well, look for .Dd. Regards! -- Niclas From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 08:13:16 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 901E0D9C; Fri, 5 Apr 2013 08:13:16 +0000 (UTC) (envelope-from prvs=180799da86=killing@multiplay.co.uk) Received: from mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) by mx1.freebsd.org (Postfix) with ESMTP id E1EF97D5; Fri, 5 Apr 2013 08:13:15 +0000 (UTC) Received: from r2d2 ([46.65.172.4]) by mail1.multiplay.co.uk (mail1.multiplay.co.uk [85.236.96.23]) (MDaemon PRO v10.0.4) with ESMTP id md50003104702.msg; Fri, 05 Apr 2013 09:13:07 +0100 X-Spam-Processed: mail1.multiplay.co.uk, Fri, 05 Apr 2013 09:13:07 +0100 (not processed: message from valid local sender) X-MDDKIM-Result: neutral (mail1.multiplay.co.uk) X-MDRemoteIP: 46.65.172.4 X-Return-Path: prvs=180799da86=killing@multiplay.co.uk X-Envelope-From: killing@multiplay.co.uk Message-ID: <9029286ACA964FBCBBD82F20D7E0DBA0@multiplay.co.uk> From: "Steven Hartland" To: "Niclas Zeising" References: <201304042319.r34NJqIP040377@svn.freebsd.org> <515E82C9.4070200@daemonic.se> Subject: Re: svn commit: r249115 - in head: sbin/camcontrol sys/sys Date: Fri, 5 Apr 2013 09:13:06 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="windows-1251"; reply-type=original Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 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, 05 Apr 2013 08:13:16 -0000 ----- Original Message ----- From: "Niclas Zeising" > On 04/05/13 01:19, Steven Hartland wrote: >> Author: smh >> Date: Thu Apr 4 23:19:51 2013 >> New Revision: 249115 >> URL: http://svnweb.freebsd.org/changeset/base/249115 >> >> Log: >> Adds security options to camcontrol this includes the ability to secure erase >> disks such as SSD's >> >> Adds the ability to run ATA commands via the SCSI ATA Pass-Through(16) comand >> >> Reviewed by: mav >> Approved by: pjd (mentor) >> MFC after: 2 weeks >> >> Modified: >> head/sbin/camcontrol/camcontrol.8 > > You should bump the date in the manual as well, look for .Dd. > Regards! Got another patch which adds HPA support will include in that :) Regards Steve ================================================ This e.mail is private and confidential between Multiplay (UK) Ltd. and the person or entity to whom it is addressed. In the event of misdirection, the recipient is prohibited from using, copying, printing or otherwise disseminating it or any information contained in it. In the event of misdirection, illegible or incomplete transmission please telephone +44 845 868 1337 or return the E.mail to postmaster@multiplay.co.uk. From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 08:22:30 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 138B6FAE; Fri, 5 Apr 2013 08:22:30 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 012F6826; Fri, 5 Apr 2013 08:22:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r358MTaX001864; Fri, 5 Apr 2013 08:22:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r358MBon001743; Fri, 5 Apr 2013 08:22:11 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304050822.r358MBon001743@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 08:22:11 +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: r249132 - in stable/9/sys: arm/arm arm/xscale/pxa cam cam/ata cam/scsi cddl/dev/cyclic cddl/dev/fbt dev/aac dev/acpi_support dev/acpica dev/acpica/Osd dev/ahci dev/amr dev/ath dev/ciss ... 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, 05 Apr 2013 08:22:30 -0000 Author: mav Date: Fri Apr 5 08:22:11 2013 New Revision: 249132 URL: http://svnweb.freebsd.org/changeset/base/249132 Log: MFC r227293 (by ed): Mark MALLOC_DEFINEs static that have no corresponding MALLOC_DECLAREs. This means that their use is restricted to a single C file. Modified: stable/9/sys/arm/arm/vm_machdep.c stable/9/sys/arm/xscale/pxa/pxa_smi.c stable/9/sys/arm/xscale/pxa/pxa_space.c stable/9/sys/cam/ata/ata_da.c stable/9/sys/cam/ata/ata_pmp.c stable/9/sys/cam/cam_periph.c stable/9/sys/cam/cam_queue.c stable/9/sys/cam/cam_sim.c stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_ch.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/cam/scsi/scsi_low.c stable/9/sys/cam/scsi/scsi_sa.c stable/9/sys/cam/scsi/scsi_targ_bh.c stable/9/sys/cddl/dev/cyclic/cyclic.c stable/9/sys/cddl/dev/fbt/fbt.c stable/9/sys/dev/aac/aac.c stable/9/sys/dev/aac/aac_cam.c stable/9/sys/dev/acpi_support/acpi_wmi.c stable/9/sys/dev/acpica/Osd/OsdInterrupt.c stable/9/sys/dev/acpica/Osd/OsdMemory.c stable/9/sys/dev/acpica/Osd/OsdSchedule.c stable/9/sys/dev/acpica/Osd/OsdSynch.c stable/9/sys/dev/acpica/acpi.c stable/9/sys/dev/acpica/acpi_cmbat.c stable/9/sys/dev/acpica/acpi_pci_link.c stable/9/sys/dev/acpica/acpi_perf.c stable/9/sys/dev/acpica/acpi_powerres.c stable/9/sys/dev/acpica/acpi_video.c stable/9/sys/dev/ahci/ahci.c stable/9/sys/dev/amr/amr.c stable/9/sys/dev/amr/amr_cam.c stable/9/sys/dev/ath/ah_osdep.c stable/9/sys/dev/ath/if_ath.c stable/9/sys/dev/ciss/ciss.c stable/9/sys/dev/firewire/fwmem.c stable/9/sys/dev/firewire/if_fwe.c stable/9/sys/dev/firewire/if_fwip.c stable/9/sys/dev/firewire/sbp.c stable/9/sys/dev/firewire/sbp_targ.c stable/9/sys/dev/iicbus/ad7417.c stable/9/sys/dev/iicbus/max6690.c stable/9/sys/dev/iir/iir.c stable/9/sys/dev/ipmi/ipmi.c stable/9/sys/dev/iscsi/initiator/isc_subr.c stable/9/sys/dev/iscsi/initiator/iscsi.c stable/9/sys/dev/malo/if_malo.c stable/9/sys/dev/mvs/mvs.c stable/9/sys/dev/mwl/if_mwl.c stable/9/sys/dev/nmdm/nmdm.c stable/9/sys/dev/puc/puc.c stable/9/sys/dev/quicc/quicc_core.c stable/9/sys/dev/scc/scc_core.c stable/9/sys/dev/siis/siis.c stable/9/sys/dev/sound/pci/envy24.c stable/9/sys/dev/sound/pci/envy24ht.c stable/9/sys/dev/sound/pci/spicds.c stable/9/sys/dev/sound/pcm/ac97.c stable/9/sys/dev/sound/pcm/feeder.c stable/9/sys/dev/sound/pcm/mixer.c stable/9/sys/dev/tdfx/tdfx_pci.c stable/9/sys/dev/twa/tw_osl_freebsd.c stable/9/sys/dev/twe/twe_freebsd.c stable/9/sys/dev/uart/uart_core.c stable/9/sys/dev/xen/balloon/balloon.c stable/9/sys/dev/xen/blkback/blkback.c stable/9/sys/dev/xen/blkfront/blkfront.c stable/9/sys/fs/ntfs/ntfs_subr.c stable/9/sys/fs/smbfs/smbfs_node.c stable/9/sys/fs/udf/udf_vnops.c stable/9/sys/geom/uzip/g_uzip.c stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c stable/9/sys/ia64/ia64/mca.c stable/9/sys/ia64/ia64/sapic.c stable/9/sys/ia64/ia64/sscdisk.c stable/9/sys/ia64/ia64/unwind.c stable/9/sys/kern/kern_dtrace.c stable/9/sys/kern/kern_fail.c stable/9/sys/kern/kern_jail.c stable/9/sys/kern/kern_lockf.c stable/9/sys/kern/kern_rctl.c stable/9/sys/kern/kern_timeout.c stable/9/sys/kern/subr_pcpu.c stable/9/sys/kern/subr_witness.c stable/9/sys/libkern/iconv.c stable/9/sys/net/if.c stable/9/sys/net/if_arcsubr.c stable/9/sys/net/if_atmsubr.c stable/9/sys/net/if_ethersubr.c stable/9/sys/net/if_fwsubr.c stable/9/sys/net/if_iso88025subr.c stable/9/sys/net/if_spppsubr.c stable/9/sys/net/vnet.c stable/9/sys/net80211/ieee80211_acl.c stable/9/sys/net80211/ieee80211_dfs.c stable/9/sys/net80211/ieee80211_freebsd.c stable/9/sys/net80211/ieee80211_power.c stable/9/sys/netgraph/atm/ngatmbase.c stable/9/sys/netgraph/atm/uni/ng_uni.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_hci_raw.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_l2cap_raw.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_rfcomm.c stable/9/sys/netgraph/bluetooth/socket/ng_btsocket_sco.c stable/9/sys/netgraph/ng_async.c stable/9/sys/netgraph/ng_base.c stable/9/sys/netgraph/ng_bpf.c stable/9/sys/netgraph/ng_bridge.c stable/9/sys/netgraph/ng_deflate.c stable/9/sys/netgraph/ng_gif_demux.c stable/9/sys/netgraph/ng_hub.c stable/9/sys/netgraph/ng_iface.c stable/9/sys/netgraph/ng_ksocket.c stable/9/sys/netgraph/ng_l2tp.c stable/9/sys/netgraph/ng_mppc.c stable/9/sys/netgraph/ng_parse.c stable/9/sys/netgraph/ng_ppp.c stable/9/sys/netgraph/ng_pppoe.c stable/9/sys/netgraph/ng_pred1.c stable/9/sys/netgraph/ng_sample.c stable/9/sys/netgraph/ng_socket.c stable/9/sys/netgraph/ng_sppp.c stable/9/sys/netgraph/ng_tag.c stable/9/sys/netinet/igmp.c stable/9/sys/netinet/libalias/alias_sctp.c stable/9/sys/netinet6/mld6.c stable/9/sys/netinet6/send.c stable/9/sys/netipx/spx_reass.c stable/9/sys/netsmb/smb_conn.c stable/9/sys/netsmb/smb_rq.c stable/9/sys/netsmb/smb_subr.c stable/9/sys/nfs/nfs_lock.c stable/9/sys/ofed/drivers/infiniband/ulp/sdp/sdp_main.c stable/9/sys/ofed/include/linux/linux_idr.c stable/9/sys/ofed/include/linux/linux_radix.c stable/9/sys/powerpc/ofw/ofw_real.c stable/9/sys/powerpc/ofw/rtas.c stable/9/sys/powerpc/powermac/dbdma.c stable/9/sys/powerpc/powermac/fcu.c stable/9/sys/powerpc/powermac/powermac_thermal.c stable/9/sys/powerpc/powermac/smusat.c stable/9/sys/powerpc/powerpc/intr_machdep.c stable/9/sys/security/mac_bsdextended/mac_bsdextended.c stable/9/sys/security/mac_lomac/mac_lomac.c stable/9/sys/security/mac_portacl/mac_portacl.c stable/9/sys/sparc64/sparc64/iommu.c stable/9/sys/x86/acpica/acpi_apm.c stable/9/sys/x86/acpica/madt.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/puc/ (props changed) stable/9/sys/fs/ (props changed) stable/9/sys/fs/ntfs/ (props changed) stable/9/sys/net/ (props changed) Modified: stable/9/sys/arm/arm/vm_machdep.c ============================================================================== --- stable/9/sys/arm/arm/vm_machdep.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/arm/arm/vm_machdep.c Fri Apr 5 08:22:11 2013 (r249132) @@ -526,7 +526,7 @@ extern uma_zone_t l2zone; struct mtx smallalloc_mtx; -MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); +static MALLOC_DEFINE(M_VMSMALLALLOC, "vm_small_alloc", "VM Small alloc data"); vm_offset_t alloc_firstaddr; Modified: stable/9/sys/arm/xscale/pxa/pxa_smi.c ============================================================================== --- stable/9/sys/arm/xscale/pxa/pxa_smi.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/arm/xscale/pxa/pxa_smi.c Fri Apr 5 08:22:11 2013 (r249132) @@ -42,7 +42,8 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_PXASMI, "PXA SMI", "Data for static memory interface devices."); +static MALLOC_DEFINE(M_PXASMI, "PXA SMI", + "Data for static memory interface devices."); struct pxa_smi_softc { struct resource *ps_res[1]; Modified: stable/9/sys/arm/xscale/pxa/pxa_space.c ============================================================================== --- stable/9/sys/arm/xscale/pxa/pxa_space.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/arm/xscale/pxa/pxa_space.c Fri Apr 5 08:22:11 2013 (r249132) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_PXATAG, "PXA bus_space tags", "Bus_space tags for PXA"); +static MALLOC_DEFINE(M_PXATAG, "PXA bus_space tags", "Bus_space tags for PXA"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); Modified: stable/9/sys/cam/ata/ata_da.c ============================================================================== --- stable/9/sys/cam/ata/ata_da.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/ata/ata_da.c Fri Apr 5 08:22:11 2013 (r249132) @@ -518,7 +518,7 @@ static struct periph_driver adadriver = PERIPHDRIVER_DECLARE(ada, adadriver); -MALLOC_DEFINE(M_ATADA, "ata_da", "ata_da buffers"); +static MALLOC_DEFINE(M_ATADA, "ata_da", "ata_da buffers"); static int adaopen(struct disk *dp) Modified: stable/9/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/9/sys/cam/ata/ata_pmp.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/ata/ata_pmp.c Fri Apr 5 08:22:11 2013 (r249132) @@ -155,7 +155,7 @@ static struct periph_driver pmpdriver = PERIPHDRIVER_DECLARE(pmp, pmpdriver); -MALLOC_DEFINE(M_ATPMP, "ata_pmp", "ata_pmp buffers"); +static MALLOC_DEFINE(M_ATPMP, "ata_pmp", "ata_pmp buffers"); static void pmpinit(void) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/cam_periph.c Fri Apr 5 08:22:11 2013 (r249132) @@ -91,7 +91,7 @@ static int nperiph_drivers; static int initialized = 0; struct periph_driver **periph_drivers; -MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers"); +static MALLOC_DEFINE(M_CAMPERIPH, "CAM periph", "CAM peripheral buffers"); static int periph_selto_delay = 1000; TUNABLE_INT("kern.cam.periph_selto_delay", &periph_selto_delay); Modified: stable/9/sys/cam/cam_queue.c ============================================================================== --- stable/9/sys/cam/cam_queue.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/cam_queue.c Fri Apr 5 08:22:11 2013 (r249132) @@ -40,9 +40,9 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_CAMQ, "CAM queue", "CAM queue buffers"); -MALLOC_DEFINE(M_CAMDEVQ, "CAM dev queue", "CAM dev queue buffers"); -MALLOC_DEFINE(M_CAMCCBQ, "CAM ccb queue", "CAM ccb queue buffers"); +static MALLOC_DEFINE(M_CAMQ, "CAM queue", "CAM queue buffers"); +static MALLOC_DEFINE(M_CAMDEVQ, "CAM dev queue", "CAM dev queue buffers"); +static MALLOC_DEFINE(M_CAMCCBQ, "CAM ccb queue", "CAM ccb queue buffers"); static __inline int queue_cmp(cam_pinfo **queue_array, int i, int j); Modified: stable/9/sys/cam/cam_sim.c ============================================================================== --- stable/9/sys/cam/cam_sim.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/cam_sim.c Fri Apr 5 08:22:11 2013 (r249132) @@ -43,7 +43,7 @@ __FBSDID("$FreeBSD$"); #define CAM_PATH_ANY (u_int32_t)-1 -MALLOC_DEFINE(M_CAMSIM, "CAM SIM", "CAM SIM buffers"); +static MALLOC_DEFINE(M_CAMSIM, "CAM SIM", "CAM SIM buffers"); struct cam_devq * cam_simq_alloc(u_int32_t max_sim_transactions) Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 08:22:11 2013 (r249132) @@ -335,7 +335,7 @@ static struct mtx changerq_mtx; static STAILQ_HEAD(changerlist, cdchanger) changerq; static int num_changers; -MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers"); +static MALLOC_DEFINE(M_SCSICD, "scsi_cd", "scsi_cd buffers"); static void cdinit(void) Modified: stable/9/sys/cam/scsi/scsi_ch.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_ch.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/scsi/scsi_ch.c Fri Apr 5 08:22:11 2013 (r249132) @@ -218,7 +218,7 @@ static struct cdevsw ch_cdevsw = { .d_name = "ch", }; -MALLOC_DEFINE(M_SCSICH, "scsi_ch", "scsi_ch buffers"); +static MALLOC_DEFINE(M_SCSICH, "scsi_ch", "scsi_ch buffers"); static void chinit(void) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 08:22:11 2013 (r249132) @@ -928,7 +928,7 @@ static struct periph_driver dadriver = PERIPHDRIVER_DECLARE(da, dadriver); -MALLOC_DEFINE(M_SCSIDA, "scsi_da", "scsi_da buffers"); +static MALLOC_DEFINE(M_SCSIDA, "scsi_da", "scsi_da buffers"); static int daopen(struct disk *dp) Modified: stable/9/sys/cam/scsi/scsi_low.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_low.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/scsi/scsi_low.c Fri Apr 5 08:22:11 2013 (r249132) @@ -145,7 +145,7 @@ __FBSDID("$FreeBSD$"); #define SCSI_LOW_DISK_LFLAGS 0x0000ffff #define SCSI_LOW_DISK_TFLAGS 0xffff0000 -MALLOC_DEFINE(M_SCSILOW, "SCSI low", "SCSI low buffers"); +static MALLOC_DEFINE(M_SCSILOW, "SCSI low", "SCSI low buffers"); /************************************************************** * Declarations Modified: stable/9/sys/cam/scsi/scsi_sa.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_sa.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/scsi/scsi_sa.c Fri Apr 5 08:22:11 2013 (r249132) @@ -102,7 +102,7 @@ __FBSDID("$FreeBSD$"); * Driver states */ -MALLOC_DEFINE(M_SCSISA, "SCSI sa", "SCSI sequential access buffers"); +static MALLOC_DEFINE(M_SCSISA, "SCSI sa", "SCSI sequential access buffers"); typedef enum { SA_STATE_NORMAL, SA_STATE_ABNORMAL Modified: stable/9/sys/cam/scsi/scsi_targ_bh.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_targ_bh.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cam/scsi/scsi_targ_bh.c Fri Apr 5 08:22:11 2013 (r249132) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_SCSIBH, "SCSI bh", "SCSI blackhole buffers"); +static MALLOC_DEFINE(M_SCSIBH, "SCSI bh", "SCSI blackhole buffers"); typedef enum { TARGBH_STATE_NORMAL, Modified: stable/9/sys/cddl/dev/cyclic/cyclic.c ============================================================================== --- stable/9/sys/cddl/dev/cyclic/cyclic.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cddl/dev/cyclic/cyclic.c Fri Apr 5 08:22:11 2013 (r249132) @@ -339,7 +339,7 @@ static kmem_cache_t *cyclic_id_cache; static cyc_id_t *cyclic_id_head; static cyc_backend_t cyclic_backend; -MALLOC_DEFINE(M_CYCLIC, "cyclic", "Cyclic timer subsystem"); +static MALLOC_DEFINE(M_CYCLIC, "cyclic", "Cyclic timer subsystem"); static __inline hrtime_t cyc_gethrtime(void) Modified: stable/9/sys/cddl/dev/fbt/fbt.c ============================================================================== --- stable/9/sys/cddl/dev/fbt/fbt.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/cddl/dev/fbt/fbt.c Fri Apr 5 08:22:11 2013 (r249132) @@ -61,7 +61,7 @@ #include #include -MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); +static MALLOC_DEFINE(M_FBT, "fbt", "Function Boundary Tracing"); #define FBT_PUSHL_EBP 0x55 #define FBT_MOVL_ESP_EBP0_V0 0x8b Modified: stable/9/sys/dev/aac/aac.c ============================================================================== --- stable/9/sys/dev/aac/aac.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/aac/aac.c Fri Apr 5 08:22:11 2013 (r249132) @@ -219,7 +219,7 @@ static struct cdevsw aac_cdevsw = { .d_name = "aac", }; -MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver"); +static MALLOC_DEFINE(M_AACBUF, "aacbuf", "Buffers for the AAC driver"); /* sysctl node */ static SYSCTL_NODE(_hw, OID_AUTO, aac, CTLFLAG_RD, 0, "AAC driver parameters"); Modified: stable/9/sys/dev/aac/aac_cam.c ============================================================================== --- stable/9/sys/dev/aac/aac_cam.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/aac/aac_cam.c Fri Apr 5 08:22:11 2013 (r249132) @@ -104,7 +104,7 @@ static driver_t aac_pass_driver = { DRIVER_MODULE(aacp, aac, aac_pass_driver, aac_pass_devclass, 0, 0); MODULE_DEPEND(aacp, cam, 1, 1, 1); -MALLOC_DEFINE(M_AACCAM, "aaccam", "AAC CAM info"); +static MALLOC_DEFINE(M_AACCAM, "aaccam", "AAC CAM info"); static void aac_cam_rescan(struct aac_softc *sc, uint32_t channel, uint32_t target_id) Modified: stable/9/sys/dev/acpi_support/acpi_wmi.c ============================================================================== --- stable/9/sys/dev/acpi_support/acpi_wmi.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpi_support/acpi_wmi.c Fri Apr 5 08:22:11 2013 (r249132) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); #include #include "acpi_wmi_if.h" -MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); +static MALLOC_DEFINE(M_ACPIWMI, "acpiwmi", "ACPI-WMI mapping"); #define _COMPONENT ACPI_OEM ACPI_MODULE_NAME("ACPI_WMI"); Modified: stable/9/sys/dev/acpica/Osd/OsdInterrupt.c ============================================================================== --- stable/9/sys/dev/acpica/Osd/OsdInterrupt.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/Osd/OsdInterrupt.c Fri Apr 5 08:22:11 2013 (r249132) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("INTERRUPT") -MALLOC_DEFINE(M_ACPIINTR, "acpiintr", "ACPI interrupt"); +static MALLOC_DEFINE(M_ACPIINTR, "acpiintr", "ACPI interrupt"); struct acpi_intr { SLIST_ENTRY(acpi_intr) ai_link; Modified: stable/9/sys/dev/acpica/Osd/OsdMemory.c ============================================================================== --- stable/9/sys/dev/acpica/Osd/OsdMemory.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/Osd/OsdMemory.c Fri Apr 5 08:22:11 2013 (r249132) @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_ACPICA, "acpica", "ACPI CA memory pool"); +static MALLOC_DEFINE(M_ACPICA, "acpica", "ACPI CA memory pool"); void * AcpiOsAllocate(ACPI_SIZE Size) Modified: stable/9/sys/dev/acpica/Osd/OsdSchedule.c ============================================================================== --- stable/9/sys/dev/acpica/Osd/OsdSchedule.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/Osd/OsdSchedule.c Fri Apr 5 08:22:11 2013 (r249132) @@ -65,7 +65,7 @@ TUNABLE_INT("debug.acpi.max_tasks", &acp static int acpi_max_threads = ACPI_MAX_THREADS; TUNABLE_INT("debug.acpi.max_threads", &acpi_max_threads); -MALLOC_DEFINE(M_ACPITASK, "acpitask", "ACPI deferred task"); +static MALLOC_DEFINE(M_ACPITASK, "acpitask", "ACPI deferred task"); struct acpi_task_ctx { struct task at_task; Modified: stable/9/sys/dev/acpica/Osd/OsdSynch.c ============================================================================== --- stable/9/sys/dev/acpica/Osd/OsdSynch.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/Osd/OsdSynch.c Fri Apr 5 08:22:11 2013 (r249132) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); #define _COMPONENT ACPI_OS_SERVICES ACPI_MODULE_NAME("SYNCH") -MALLOC_DEFINE(M_ACPISEM, "acpisem", "ACPI semaphore"); +static MALLOC_DEFINE(M_ACPISEM, "acpisem", "ACPI semaphore"); /* * Convert milliseconds to ticks. Modified: stable/9/sys/dev/acpica/acpi.c ============================================================================== --- stable/9/sys/dev/acpica/acpi.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/acpi.c Fri Apr 5 08:22:11 2013 (r249132) @@ -68,7 +68,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices"); +static MALLOC_DEFINE(M_ACPIDEV, "acpidev", "ACPI devices"); /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_BUS Modified: stable/9/sys/dev/acpica/acpi_cmbat.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_cmbat.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/acpi_cmbat.c Fri Apr 5 08:22:11 2013 (r249132) @@ -46,7 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_ACPICMBAT, "acpicmbat", "ACPI control method battery data"); +static MALLOC_DEFINE(M_ACPICMBAT, "acpicmbat", + "ACPI control method battery data"); /* Number of times to retry initialization before giving up. */ #define ACPI_CMBAT_RETRY_MAX 6 Modified: stable/9/sys/dev/acpica/acpi_pci_link.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_pci_link.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/acpi_pci_link.c Fri Apr 5 08:22:11 2013 (r249132) @@ -120,7 +120,7 @@ struct link_res_request { int link_index; }; -MALLOC_DEFINE(M_PCI_LINK, "pci_link", "ACPI PCI Link structures"); +static MALLOC_DEFINE(M_PCI_LINK, "pci_link", "ACPI PCI Link structures"); static int pci_link_interrupt_weights[NUM_ACPI_INTERRUPTS]; static int pci_link_bios_isa_irqs; Modified: stable/9/sys/dev/acpica/acpi_perf.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_perf.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/acpi_perf.c Fri Apr 5 08:22:11 2013 (r249132) @@ -135,7 +135,7 @@ static devclass_t acpi_perf_devclass; DRIVER_MODULE(acpi_perf, cpu, acpi_perf_driver, acpi_perf_devclass, 0, 0); MODULE_DEPEND(acpi_perf, acpi, 1, 1, 1); -MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); +static MALLOC_DEFINE(M_ACPIPERF, "acpi_perf", "ACPI Performance states"); static void acpi_perf_identify(driver_t *driver, device_t parent) Modified: stable/9/sys/dev/acpica/acpi_powerres.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_powerres.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/acpi_powerres.c Fri Apr 5 08:22:11 2013 (r249132) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); * on, turned off, etc. */ -MALLOC_DEFINE(M_ACPIPWR, "acpipwr", "ACPI power resources"); +static MALLOC_DEFINE(M_ACPIPWR, "acpipwr", "ACPI power resources"); /* Hooks for the ACPI CA debugging infrastructure */ #define _COMPONENT ACPI_POWERRES Modified: stable/9/sys/dev/acpica/acpi_video.c ============================================================================== --- stable/9/sys/dev/acpica/acpi_video.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/acpica/acpi_video.c Fri Apr 5 08:22:11 2013 (r249132) @@ -185,7 +185,7 @@ static struct acpi_video_output_queue cr */ ACPI_SERIAL_DECL(video, "ACPI video"); ACPI_SERIAL_DECL(video_output, "ACPI video output"); -MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension"); +static MALLOC_DEFINE(M_ACPIVIDEO, "acpivideo", "ACPI video extension"); static int acpi_video_modevent(struct module *mod __unused, int evt, void *cookie __unused) Modified: stable/9/sys/dev/ahci/ahci.c ============================================================================== --- stable/9/sys/dev/ahci/ahci.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/ahci/ahci.c Fri Apr 5 08:22:11 2013 (r249132) @@ -101,7 +101,7 @@ static void ahci_process_request_sense(d static void ahciaction(struct cam_sim *sim, union ccb *ccb); static void ahcipoll(struct cam_sim *sim); -MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); +static MALLOC_DEFINE(M_AHCI, "AHCI driver", "AHCI driver data buffers"); static struct { uint32_t id; Modified: stable/9/sys/dev/amr/amr.c ============================================================================== --- stable/9/sys/dev/amr/amr.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/amr/amr.c Fri Apr 5 08:22:11 2013 (r249132) @@ -175,7 +175,7 @@ static void amr_init_sysctl(struct amr_s static int amr_linux_ioctl_int(struct cdev *dev, u_long cmd, caddr_t addr, int32_t flag, struct thread *td); -MALLOC_DEFINE(M_AMR, "amr", "AMR memory"); +static MALLOC_DEFINE(M_AMR, "amr", "AMR memory"); /******************************************************************************** ******************************************************************************** Modified: stable/9/sys/dev/amr/amr_cam.c ============================================================================== --- stable/9/sys/dev/amr/amr_cam.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/amr/amr_cam.c Fri Apr 5 08:22:11 2013 (r249132) @@ -109,7 +109,7 @@ static driver_t amr_pass_driver = { DRIVER_MODULE(amrp, amr, amr_pass_driver, amr_pass_devclass, 0, 0); MODULE_DEPEND(amrp, cam, 1, 1, 1); -MALLOC_DEFINE(M_AMRCAM, "amrcam", "AMR CAM memory"); +static MALLOC_DEFINE(M_AMRCAM, "amrcam", "AMR CAM memory"); /*********************************************************************** * Enqueue/dequeue functions Modified: stable/9/sys/dev/ath/ah_osdep.c ============================================================================== --- stable/9/sys/dev/ath/ah_osdep.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/ath/ah_osdep.c Fri Apr 5 08:22:11 2013 (r249132) @@ -86,7 +86,7 @@ SYSCTL_INT(_hw_ath_hal, OID_AUTO, debug, TUNABLE_INT("hw.ath.hal.debug", &ath_hal_debug); #endif /* AH_DEBUG */ -MALLOC_DEFINE(M_ATH_HAL, "ath_hal", "ath hal data"); +static MALLOC_DEFINE(M_ATH_HAL, "ath_hal", "ath hal data"); void* ath_hal_malloc(size_t size) Modified: stable/9/sys/dev/ath/if_ath.c ============================================================================== --- stable/9/sys/dev/ath/if_ath.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/ath/if_ath.c Fri Apr 5 08:22:11 2013 (r249132) @@ -258,7 +258,7 @@ static int ath_bstuck_threshold = 4; /* SYSCTL_INT(_hw_ath, OID_AUTO, bstuck, CTLFLAG_RW, &ath_bstuck_threshold, 0, "max missed beacon xmits before chip reset"); -MALLOC_DEFINE(M_ATHDEV, "athdev", "ath driver dma buffers"); +static MALLOC_DEFINE(M_ATHDEV, "athdev", "ath driver dma buffers"); #define HAL_MODE_HT20 (HAL_MODE_11NG_HT20 | HAL_MODE_11NA_HT20) #define HAL_MODE_HT40 \ Modified: stable/9/sys/dev/ciss/ciss.c ============================================================================== --- stable/9/sys/dev/ciss/ciss.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/ciss/ciss.c Fri Apr 5 08:22:11 2013 (r249132) @@ -105,7 +105,8 @@ #include #include -MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", "ciss internal data buffers"); +static MALLOC_DEFINE(CISS_MALLOC_CLASS, "ciss_data", + "ciss internal data buffers"); /* pci interface */ static int ciss_lookup(device_t dev); Modified: stable/9/sys/dev/firewire/fwmem.c ============================================================================== --- stable/9/sys/dev/firewire/fwmem.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/firewire/fwmem.c Fri Apr 5 08:22:11 2013 (r249132) @@ -84,7 +84,7 @@ SYSCTL_INT(_hw_firewire_fwmem, OID_AUTO, SYSCTL_INT(_debug, OID_AUTO, fwmem_debug, CTLFLAG_RW, &fwmem_debug, 0, "Fwmem driver debug flag"); -MALLOC_DEFINE(M_FWMEM, "fwmem", "fwmem/FireWire"); +static MALLOC_DEFINE(M_FWMEM, "fwmem", "fwmem/FireWire"); #define MAXLEN (512 << fwmem_speed) Modified: stable/9/sys/dev/firewire/if_fwe.c ============================================================================== --- stable/9/sys/dev/firewire/if_fwe.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/firewire/if_fwe.c Fri Apr 5 08:22:11 2013 (r249132) @@ -86,7 +86,7 @@ static int stream_ch = 1; static int tx_speed = 2; static int rx_queue_len = FWMAXQUEUE; -MALLOC_DEFINE(M_FWE, "if_fwe", "Ethernet over FireWire interface"); +static MALLOC_DEFINE(M_FWE, "if_fwe", "Ethernet over FireWire interface"); SYSCTL_INT(_debug, OID_AUTO, if_fwe_debug, CTLFLAG_RW, &fwedebug, 0, ""); SYSCTL_DECL(_hw_firewire); static SYSCTL_NODE(_hw_firewire, OID_AUTO, fwe, CTLFLAG_RD, 0, Modified: stable/9/sys/dev/firewire/if_fwip.c ============================================================================== --- stable/9/sys/dev/firewire/if_fwip.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/firewire/if_fwip.c Fri Apr 5 08:22:11 2013 (r249132) @@ -99,7 +99,7 @@ static int broadcast_channel = 0xc0 | 0x static int tx_speed = 2; static int rx_queue_len = FWMAXQUEUE; -MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over FireWire interface"); +static MALLOC_DEFINE(M_FWIP, "if_fwip", "IP over FireWire interface"); SYSCTL_INT(_debug, OID_AUTO, if_fwip_debug, CTLFLAG_RW, &fwipdebug, 0, ""); SYSCTL_DECL(_hw_firewire); static SYSCTL_NODE(_hw_firewire, OID_AUTO, fwip, CTLFLAG_RD, 0, Modified: stable/9/sys/dev/firewire/sbp.c ============================================================================== --- stable/9/sys/dev/firewire/sbp.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/firewire/sbp.c Fri Apr 5 08:22:11 2013 (r249132) @@ -277,7 +277,7 @@ static void sbp_mgm_timeout (void *arg); static void sbp_timeout (void *arg); static void sbp_mgm_orb (struct sbp_dev *, int, struct sbp_ocb *); -MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/FireWire"); +static MALLOC_DEFINE(M_SBP, "sbp", "SBP-II/FireWire"); /* cam related functions */ static void sbp_action(struct cam_sim *sim, union ccb *ccb); Modified: stable/9/sys/dev/firewire/sbp_targ.c ============================================================================== --- stable/9/sys/dev/firewire/sbp_targ.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/firewire/sbp_targ.c Fri Apr 5 08:22:11 2013 (r249132) @@ -95,7 +95,7 @@ #define F_HOLD (1 << 3) #define F_FREEZED (1 << 4) -MALLOC_DEFINE(M_SBP_TARG, "sbp_targ", "SBP-II/FireWire target mode"); +static MALLOC_DEFINE(M_SBP_TARG, "sbp_targ", "SBP-II/FireWire target mode"); static int debug = 0; Modified: stable/9/sys/dev/iicbus/ad7417.c ============================================================================== --- stable/9/sys/dev/iicbus/ad7417.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/iicbus/ad7417.c Fri Apr 5 08:22:11 2013 (r249132) @@ -121,7 +121,7 @@ static driver_t ad7417_driver = { static devclass_t ad7417_devclass; DRIVER_MODULE(ad7417, iicbus, ad7417_driver, ad7417_devclass, 0, 0); -MALLOC_DEFINE(M_AD7417, "ad7417", "Supply-Monitor AD7417"); +static MALLOC_DEFINE(M_AD7417, "ad7417", "Supply-Monitor AD7417"); static int Modified: stable/9/sys/dev/iicbus/max6690.c ============================================================================== --- stable/9/sys/dev/iicbus/max6690.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/iicbus/max6690.c Fri Apr 5 08:22:11 2013 (r249132) @@ -101,7 +101,7 @@ static driver_t max6690_driver = { static devclass_t max6690_devclass; DRIVER_MODULE(max6690, iicbus, max6690_driver, max6690_devclass, 0, 0); -MALLOC_DEFINE(M_MAX6690, "max6690", "Temp-Monitor MAX6690"); +static MALLOC_DEFINE(M_MAX6690, "max6690", "Temp-Monitor MAX6690"); static int max6690_read(device_t dev, uint32_t addr, uint8_t reg, uint8_t *data) Modified: stable/9/sys/dev/iir/iir.c ============================================================================== --- stable/9/sys/dev/iir/iir.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/iir/iir.c Fri Apr 5 08:22:11 2013 (r249132) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_GDTBUF, "iirbuf", "iir driver buffer"); +static MALLOC_DEFINE(M_GDTBUF, "iirbuf", "iir driver buffer"); struct gdt_softc *gdt_wait_gdt; int gdt_wait_index; Modified: stable/9/sys/dev/ipmi/ipmi.c ============================================================================== --- stable/9/sys/dev/ipmi/ipmi.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/ipmi/ipmi.c Fri Apr 5 08:22:11 2013 (r249132) @@ -76,7 +76,7 @@ static struct cdevsw ipmi_cdevsw = { .d_name = "ipmi", }; -MALLOC_DEFINE(M_IPMI, "ipmi", "ipmi"); +static MALLOC_DEFINE(M_IPMI, "ipmi", "ipmi"); static int ipmi_open(struct cdev *cdev, int flags, int fmt, struct thread *td) Modified: stable/9/sys/dev/iscsi/initiator/isc_subr.c ============================================================================== --- stable/9/sys/dev/iscsi/initiator/isc_subr.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/iscsi/initiator/isc_subr.c Fri Apr 5 08:22:11 2013 (r249132) @@ -58,7 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_ISC, "iSC", "iSCSI driver options"); +static MALLOC_DEFINE(M_ISC, "iSC", "iSCSI driver options"); static char * i_strdupin(char *s, size_t maxlen) Modified: stable/9/sys/dev/iscsi/initiator/iscsi.c ============================================================================== --- stable/9/sys/dev/iscsi/initiator/iscsi.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/iscsi/initiator/iscsi.c Fri Apr 5 08:22:11 2013 (r249132) @@ -66,7 +66,7 @@ static struct isc_softc *isc; MALLOC_DEFINE(M_ISCSI, "iSCSI", "iSCSI driver"); MALLOC_DEFINE(M_ISCSIBUF, "iSCbuf", "iSCSI buffers"); -MALLOC_DEFINE(M_TMP, "iSCtmp", "iSCSI tmp"); +static MALLOC_DEFINE(M_TMP, "iSCtmp", "iSCSI tmp"); #ifdef ISCSI_INITIATOR_DEBUG int iscsi_debug = ISCSI_INITIATOR_DEBUG; Modified: stable/9/sys/dev/malo/if_malo.c ============================================================================== --- stable/9/sys/dev/malo/if_malo.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/malo/if_malo.c Fri Apr 5 08:22:11 2013 (r249132) @@ -123,7 +123,7 @@ enum { } while (0) #endif -MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers"); +static MALLOC_DEFINE(M_MALODEV, "malodev", "malo driver dma buffers"); static struct ieee80211vap *malo_vap_create(struct ieee80211com *, const char [IFNAMSIZ], int, enum ieee80211_opmode, int, Modified: stable/9/sys/dev/mvs/mvs.c ============================================================================== --- stable/9/sys/dev/mvs/mvs.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/mvs/mvs.c Fri Apr 5 08:22:11 2013 (r249132) @@ -94,7 +94,7 @@ static void mvs_process_request_sense(de static void mvsaction(struct cam_sim *sim, union ccb *ccb); static void mvspoll(struct cam_sim *sim); -MALLOC_DEFINE(M_MVS, "MVS driver", "MVS driver data buffers"); +static MALLOC_DEFINE(M_MVS, "MVS driver", "MVS driver data buffers"); #define recovery_type spriv_field0 #define RECOVERY_NONE 0 Modified: stable/9/sys/dev/mwl/if_mwl.c ============================================================================== --- stable/9/sys/dev/mwl/if_mwl.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/mwl/if_mwl.c Fri Apr 5 08:22:11 2013 (r249132) @@ -262,7 +262,7 @@ static void mwl_printtxbuf(const struct } while (0) #endif -MALLOC_DEFINE(M_MWLDEV, "mwldev", "mwl driver dma buffers"); +static MALLOC_DEFINE(M_MWLDEV, "mwldev", "mwl driver dma buffers"); /* * Each packet has fixed front matter: a 2-byte length Modified: stable/9/sys/dev/nmdm/nmdm.c ============================================================================== --- stable/9/sys/dev/nmdm/nmdm.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/nmdm/nmdm.c Fri Apr 5 08:22:11 2013 (r249132) @@ -52,7 +52,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_NMDM, "nullmodem", "nullmodem data structures"); +static MALLOC_DEFINE(M_NMDM, "nullmodem", "nullmodem data structures"); static tsw_inwakeup_t nmdm_outwakeup; static tsw_outwakeup_t nmdm_inwakeup; Modified: stable/9/sys/dev/puc/puc.c ============================================================================== --- stable/9/sys/dev/puc/puc.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/puc/puc.c Fri Apr 5 08:22:11 2013 (r249132) @@ -68,7 +68,7 @@ struct puc_port { devclass_t puc_devclass; const char puc_driver_name[] = "puc"; -MALLOC_DEFINE(M_PUC, "PUC", "PUC driver"); +static MALLOC_DEFINE(M_PUC, "PUC", "PUC driver"); struct puc_bar * puc_get_bar(struct puc_softc *sc, int rid) Modified: stable/9/sys/dev/quicc/quicc_core.c ============================================================================== --- stable/9/sys/dev/quicc/quicc_core.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/quicc/quicc_core.c Fri Apr 5 08:22:11 2013 (r249132) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); devclass_t quicc_devclass; char quicc_driver_name[] = "quicc"; -MALLOC_DEFINE(M_QUICC, "QUICC", "QUICC driver"); +static MALLOC_DEFINE(M_QUICC, "QUICC", "QUICC driver"); struct quicc_device { struct rman *qd_rman; Modified: stable/9/sys/dev/scc/scc_core.c ============================================================================== --- stable/9/sys/dev/scc/scc_core.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/scc/scc_core.c Fri Apr 5 08:22:11 2013 (r249132) @@ -48,7 +48,7 @@ __FBSDID("$FreeBSD$"); devclass_t scc_devclass; char scc_driver_name[] = "scc"; -MALLOC_DEFINE(M_SCC, "SCC", "SCC driver"); +static MALLOC_DEFINE(M_SCC, "SCC", "SCC driver"); static int scc_bfe_intr(void *arg) Modified: stable/9/sys/dev/siis/siis.c ============================================================================== --- stable/9/sys/dev/siis/siis.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/siis/siis.c Fri Apr 5 08:22:11 2013 (r249132) @@ -91,7 +91,7 @@ static void siis_process_request_sense(d static void siisaction(struct cam_sim *sim, union ccb *ccb); static void siispoll(struct cam_sim *sim); -MALLOC_DEFINE(M_SIIS, "SIIS driver", "SIIS driver data buffers"); +static MALLOC_DEFINE(M_SIIS, "SIIS driver", "SIIS driver data buffers"); static struct { uint32_t id; Modified: stable/9/sys/dev/sound/pci/envy24.c ============================================================================== --- stable/9/sys/dev/sound/pci/envy24.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/sound/pci/envy24.c Fri Apr 5 08:22:11 2013 (r249132) @@ -41,7 +41,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_ENVY24, "envy24", "envy24 audio"); +static MALLOC_DEFINE(M_ENVY24, "envy24", "envy24 audio"); /* -------------------------------------------------------------------- */ Modified: stable/9/sys/dev/sound/pci/envy24ht.c ============================================================================== --- stable/9/sys/dev/sound/pci/envy24ht.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/sound/pci/envy24ht.c Fri Apr 5 08:22:11 2013 (r249132) @@ -53,7 +53,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_ENVY24HT, "envy24ht", "envy24ht audio"); +static MALLOC_DEFINE(M_ENVY24HT, "envy24ht", "envy24ht audio"); /* -------------------------------------------------------------------- */ Modified: stable/9/sys/dev/sound/pci/spicds.c ============================================================================== --- stable/9/sys/dev/sound/pci/spicds.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/sound/pci/spicds.c Fri Apr 5 08:22:11 2013 (r249132) @@ -35,7 +35,7 @@ #include -MALLOC_DEFINE(M_SPICDS, "spicds", "SPI codec"); +static MALLOC_DEFINE(M_SPICDS, "spicds", "SPI codec"); #define SPICDS_NAMELEN 16 struct spicds_info { Modified: stable/9/sys/dev/sound/pcm/ac97.c ============================================================================== --- stable/9/sys/dev/sound/pcm/ac97.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/sound/pcm/ac97.c Fri Apr 5 08:22:11 2013 (r249132) @@ -38,7 +38,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); +static MALLOC_DEFINE(M_AC97, "ac97", "ac97 codec"); struct ac97mixtable_entry { int reg; /* register index */ Modified: stable/9/sys/dev/sound/pcm/feeder.c ============================================================================== --- stable/9/sys/dev/sound/pcm/feeder.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/sound/pcm/feeder.c Fri Apr 5 08:22:11 2013 (r249132) @@ -35,7 +35,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); +static MALLOC_DEFINE(M_FEEDER, "feeder", "pcm feeder"); #define MAXFEEDERS 256 #undef FEEDER_DEBUG Modified: stable/9/sys/dev/sound/pcm/mixer.c ============================================================================== --- stable/9/sys/dev/sound/pcm/mixer.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/sound/pcm/mixer.c Fri Apr 5 08:22:11 2013 (r249132) @@ -37,7 +37,7 @@ SND_DECLARE_FILE("$FreeBSD$"); -MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); +static MALLOC_DEFINE(M_MIXER, "mixer", "mixer"); static int mixer_bypass = 1; TUNABLE_INT("hw.snd.vpc_mixer_bypass", &mixer_bypass); Modified: stable/9/sys/dev/tdfx/tdfx_pci.c ============================================================================== --- stable/9/sys/dev/tdfx/tdfx_pci.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/tdfx/tdfx_pci.c Fri Apr 5 08:22:11 2013 (r249132) @@ -89,7 +89,7 @@ static device_method_t tdfx_methods[] = { 0, 0 } }; -MALLOC_DEFINE(M_TDFX,"tdfx_driver","3DFX Graphics[/2D]/3D Accelerator(s)"); +static MALLOC_DEFINE(M_TDFX,"tdfx_driver","3DFX Graphics[/2D]/3D Accelerators"); /* Char. Dev. file operations structure */ static struct cdevsw tdfx_cdev = { Modified: stable/9/sys/dev/twa/tw_osl_freebsd.c ============================================================================== --- stable/9/sys/dev/twa/tw_osl_freebsd.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/twa/tw_osl_freebsd.c Fri Apr 5 08:22:11 2013 (r249132) @@ -55,7 +55,7 @@ TW_INT32 TW_DEBUG_LEVEL_FOR_OSL = TW_OSL TW_INT32 TW_OSL_DEBUG_LEVEL_FOR_CL = TW_OSL_DEBUG; #endif /* TW_OSL_DEBUG */ -MALLOC_DEFINE(TW_OSLI_MALLOC_CLASS, "twa_commands", "twa commands"); +static MALLOC_DEFINE(TW_OSLI_MALLOC_CLASS, "twa_commands", "twa commands"); static d_open_t twa_open; Modified: stable/9/sys/dev/twe/twe_freebsd.c ============================================================================== --- stable/9/sys/dev/twe/twe_freebsd.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/twe/twe_freebsd.c Fri Apr 5 08:22:11 2013 (r249132) @@ -879,7 +879,7 @@ twed_detach(device_t dev) /******************************************************************************** * Allocate a command buffer */ -MALLOC_DEFINE(TWE_MALLOC_CLASS, "twe_commands", "twe commands"); +static MALLOC_DEFINE(TWE_MALLOC_CLASS, "twe_commands", "twe commands"); struct twe_request * twe_allocate_request(struct twe_softc *sc, int tag) Modified: stable/9/sys/dev/uart/uart_core.c ============================================================================== --- stable/9/sys/dev/uart/uart_core.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/uart/uart_core.c Fri Apr 5 08:22:11 2013 (r249132) @@ -56,7 +56,7 @@ char uart_driver_name[] = "uart"; SLIST_HEAD(uart_devinfo_list, uart_devinfo) uart_sysdevs = SLIST_HEAD_INITIALIZER(uart_sysdevs); -MALLOC_DEFINE(M_UART, "UART", "UART driver"); +static MALLOC_DEFINE(M_UART, "UART", "UART driver"); void uart_add_sysdev(struct uart_devinfo *di) Modified: stable/9/sys/dev/xen/balloon/balloon.c ============================================================================== --- stable/9/sys/dev/xen/balloon/balloon.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/xen/balloon/balloon.c Fri Apr 5 08:22:11 2013 (r249132) @@ -49,7 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); +static MALLOC_DEFINE(M_BALLOON, "Balloon", "Xen Balloon Driver"); struct mtx balloon_mutex; Modified: stable/9/sys/dev/xen/blkback/blkback.c ============================================================================== --- stable/9/sys/dev/xen/blkback/blkback.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/xen/blkback/blkback.c Fri Apr 5 08:22:11 2013 (r249132) @@ -124,7 +124,7 @@ __FBSDID("$FreeBSD$"); /** * Custom malloc type for all driver allocations. */ -MALLOC_DEFINE(M_XENBLOCKBACK, "xbbd", "Xen Block Back Driver Data"); +static MALLOC_DEFINE(M_XENBLOCKBACK, "xbbd", "Xen Block Back Driver Data"); #ifdef XBB_DEBUG #define DPRINTF(fmt, args...) \ Modified: stable/9/sys/dev/xen/blkfront/blkfront.c ============================================================================== --- stable/9/sys/dev/xen/blkfront/blkfront.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/dev/xen/blkfront/blkfront.c Fri Apr 5 08:22:11 2013 (r249132) @@ -82,7 +82,7 @@ static int blkif_completion(struct xb_co static void blkif_free(struct xb_softc *); static void blkif_queue_cb(void *, bus_dma_segment_t *, int, int); -MALLOC_DEFINE(M_XENBLOCKFRONT, "xbd", "Xen Block Front driver data"); +static MALLOC_DEFINE(M_XENBLOCKFRONT, "xbd", "Xen Block Front driver data"); #define GRANT_INVALID_REF 0 Modified: stable/9/sys/fs/ntfs/ntfs_subr.c ============================================================================== --- stable/9/sys/fs/ntfs/ntfs_subr.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/fs/ntfs/ntfs_subr.c Fri Apr 5 08:22:11 2013 (r249132) @@ -51,10 +51,12 @@ #include #include -MALLOC_DEFINE(M_NTFSNTVATTR, "ntfs_vattr", "NTFS file attribute information"); -MALLOC_DEFINE(M_NTFSRDATA, "ntfsd_resdata", "NTFS resident data"); -MALLOC_DEFINE(M_NTFSRUN, "ntfs_vrun", "NTFS vrun storage"); -MALLOC_DEFINE(M_NTFSDECOMP, "ntfs_decomp", "NTFS decompression temporary"); +static MALLOC_DEFINE(M_NTFSNTVATTR, "ntfs_vattr", + "NTFS file attribute information"); +static MALLOC_DEFINE(M_NTFSRDATA, "ntfsd_resdata", "NTFS resident data"); +static MALLOC_DEFINE(M_NTFSRUN, "ntfs_vrun", "NTFS vrun storage"); +static MALLOC_DEFINE(M_NTFSDECOMP, "ntfs_decomp", + "NTFS decompression temporary"); static int ntfs_ntlookupattr(struct ntfsmount *, const char *, int, int *, char **); static int ntfs_findvattr(struct ntfsmount *, struct ntnode *, struct ntvattr **, struct ntvattr **, u_int32_t, const char *, size_t, cn_t); Modified: stable/9/sys/fs/smbfs/smbfs_node.c ============================================================================== --- stable/9/sys/fs/smbfs/smbfs_node.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/fs/smbfs/smbfs_node.c Fri Apr 5 08:22:11 2013 (r249132) @@ -58,7 +58,7 @@ extern struct vop_vector smbfs_vnodeops; /* XXX -> .h file */ -MALLOC_DEFINE(M_SMBNODE, "smbufs_node", "SMBFS vnode private part"); +static MALLOC_DEFINE(M_SMBNODE, "smbufs_node", "SMBFS vnode private part"); static MALLOC_DEFINE(M_SMBNODENAME, "smbufs_nname", "SMBFS node name"); int smbfs_hashprint(struct mount *mp); Modified: stable/9/sys/fs/udf/udf_vnops.c ============================================================================== --- stable/9/sys/fs/udf/udf_vnops.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/fs/udf/udf_vnops.c Fri Apr 5 08:22:11 2013 (r249132) @@ -107,8 +107,8 @@ struct vop_vector udf_fifoops = { .vop_vptofh = udf_vptofh, }; -MALLOC_DEFINE(M_UDFFID, "udf_fid", "UDF FileId structure"); -MALLOC_DEFINE(M_UDFDS, "udf_ds", "UDF Dirstream structure"); +static MALLOC_DEFINE(M_UDFFID, "udf_fid", "UDF FileId structure"); +static MALLOC_DEFINE(M_UDFDS, "udf_ds", "UDF Dirstream structure"); #define UDF_INVALID_BMAP -1 Modified: stable/9/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/9/sys/geom/uzip/g_uzip.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/geom/uzip/g_uzip.c Fri Apr 5 08:22:11 2013 (r249132) @@ -50,7 +50,7 @@ FEATURE(geom_uzip, "GEOM uzip read-only #define DPRINTF(a) #endif -MALLOC_DEFINE(M_GEOM_UZIP, "geom_uzip", "GEOM UZIP data structures"); +static MALLOC_DEFINE(M_GEOM_UZIP, "geom_uzip", "GEOM UZIP data structures"); #define UZIP_CLASS_NAME "UZIP" Modified: stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c ============================================================================== --- stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c Fri Apr 5 08:22:11 2013 (r249132) @@ -71,7 +71,7 @@ #include -MALLOC_DEFINE(M_XFSNODE, "XFS node", "XFS vnode private part"); +static MALLOC_DEFINE(M_XFSNODE, "XFS node", "XFS vnode private part"); static vfs_mount_t _xfs_mount; static vfs_unmount_t _xfs_unmount; Modified: stable/9/sys/ia64/ia64/mca.c ============================================================================== --- stable/9/sys/ia64/ia64/mca.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/ia64/ia64/mca.c Fri Apr 5 08:22:11 2013 (r249132) @@ -43,7 +43,7 @@ #include #include -MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); +static MALLOC_DEFINE(M_MCA, "MCA", "Machine Check Architecture"); struct mca_info { STAILQ_ENTRY(mca_info) mi_link; Modified: stable/9/sys/ia64/ia64/sapic.c ============================================================================== --- stable/9/sys/ia64/ia64/sapic.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/ia64/ia64/sapic.c Fri Apr 5 08:22:11 2013 (r249132) @@ -99,7 +99,7 @@ struct sapic_rte { uint64_t rte_destination_id :8; }; -MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); +static MALLOC_DEFINE(M_SAPIC, "sapic", "I/O SAPIC devices"); struct sapic *ia64_sapics[16]; /* XXX make this resizable */ int ia64_sapic_count; Modified: stable/9/sys/ia64/ia64/sscdisk.c ============================================================================== --- stable/9/sys/ia64/ia64/sscdisk.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/ia64/ia64/sscdisk.c Fri Apr 5 08:22:11 2013 (r249132) @@ -72,7 +72,7 @@ ssc(u_int64_t in0, u_int64_t in1, u_int6 #define SSC_NSECT 409600 #endif -MALLOC_DEFINE(M_SSC, "ssc_disk", "Simulator Disk"); +static MALLOC_DEFINE(M_SSC, "ssc_disk", "Simulator Disk"); static d_strategy_t sscstrategy; Modified: stable/9/sys/ia64/ia64/unwind.c ============================================================================== --- stable/9/sys/ia64/ia64/unwind.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/ia64/ia64/unwind.c Fri Apr 5 08:22:11 2013 (r249132) @@ -41,7 +41,7 @@ __FBSDID("$FreeBSD$"); #include -MALLOC_DEFINE(M_UNWIND, "Unwind", "Unwind information"); +static MALLOC_DEFINE(M_UNWIND, "Unwind", "Unwind information"); struct unw_entry { uint64_t ue_start; /* procedure start */ Modified: stable/9/sys/kern/kern_dtrace.c ============================================================================== --- stable/9/sys/kern/kern_dtrace.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/kern_dtrace.c Fri Apr 5 08:22:11 2013 (r249132) @@ -45,7 +45,7 @@ __FBSDID("$FreeBSD$"); FEATURE(kdtrace_hooks, "Kernel DTrace hooks which are required to load DTrace kernel modules"); -MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); +static MALLOC_DEFINE(M_KDTRACE, "kdtrace", "DTrace hooks"); /* Return the DTrace process data size compiled in the kernel hooks. */ size_t Modified: stable/9/sys/kern/kern_fail.c ============================================================================== --- stable/9/sys/kern/kern_fail.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/kern_fail.c Fri Apr 5 08:22:11 2013 (r249132) @@ -69,7 +69,7 @@ __FBSDID("$FreeBSD$"); ILOG_DEFINE_FOR_FILE(L_ISI_FAIL_POINT, L_ILOG, fail_point); #endif -MALLOC_DEFINE(M_FAIL_POINT, "Fail Points", "fail points system"); +static MALLOC_DEFINE(M_FAIL_POINT, "Fail Points", "fail points system"); #define fp_free(ptr) free(ptr, M_FAIL_POINT) #define fp_malloc(size, flags) malloc((size), M_FAIL_POINT, (flags)) Modified: stable/9/sys/kern/kern_jail.c ============================================================================== --- stable/9/sys/kern/kern_jail.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/kern_jail.c Fri Apr 5 08:22:11 2013 (r249132) @@ -78,7 +78,7 @@ __FBSDID("$FreeBSD$"); #define DEFAULT_HOSTUUID "00000000-0000-0000-0000-000000000000" MALLOC_DEFINE(M_PRISON, "prison", "Prison structures"); -MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); +static MALLOC_DEFINE(M_PRISON_RACCT, "prison_racct", "Prison racct structures"); /* Keep struct prison prison0 and some code in kern_jail_set() readable. */ #ifdef INET Modified: stable/9/sys/kern/kern_lockf.c ============================================================================== --- stable/9/sys/kern/kern_lockf.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/kern_lockf.c Fri Apr 5 08:22:11 2013 (r249132) @@ -90,7 +90,7 @@ static int lockf_debug = 0; /* control d SYSCTL_INT(_debug, OID_AUTO, lockf_debug, CTLFLAG_RW, &lockf_debug, 0, ""); #endif -MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); +static MALLOC_DEFINE(M_LOCKF, "lockf", "Byte-range locking structures"); struct owner_edge; struct owner_vertex; Modified: stable/9/sys/kern/kern_rctl.c ============================================================================== --- stable/9/sys/kern/kern_rctl.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/kern_rctl.c Fri Apr 5 08:22:11 2013 (r249132) @@ -170,7 +170,7 @@ RW_SYSINIT(rctl_lock, &rctl_lock, "RCTL static int rctl_rule_fully_specified(const struct rctl_rule *rule); static void rctl_rule_to_sbuf(struct sbuf *sb, const struct rctl_rule *rule); -MALLOC_DEFINE(M_RCTL, "rctl", "Resource Limits"); +static MALLOC_DEFINE(M_RCTL, "rctl", "Resource Limits"); static const char * rctl_subject_type_name(int subject) Modified: stable/9/sys/kern/kern_timeout.c ============================================================================== --- stable/9/sys/kern/kern_timeout.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/kern_timeout.c Fri Apr 5 08:22:11 2013 (r249132) @@ -156,7 +156,7 @@ struct callout_cpu cc_cpu; static int timeout_cpu; void (*callout_new_inserted)(int cpu, int ticks) = NULL; -MALLOC_DEFINE(M_CALLOUT, "callout", "Callout datastructures"); +static MALLOC_DEFINE(M_CALLOUT, "callout", "Callout datastructures"); /** * Locked by cc_lock: Modified: stable/9/sys/kern/subr_pcpu.c ============================================================================== --- stable/9/sys/kern/subr_pcpu.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/subr_pcpu.c Fri Apr 5 08:22:11 2013 (r249132) @@ -61,7 +61,7 @@ __FBSDID("$FreeBSD$"); #include #include -MALLOC_DEFINE(M_PCPU, "Per-cpu", "Per-cpu resource accouting."); +static MALLOC_DEFINE(M_PCPU, "Per-cpu", "Per-cpu resource accouting."); struct dpcpu_free { uintptr_t df_start; Modified: stable/9/sys/kern/subr_witness.c ============================================================================== --- stable/9/sys/kern/subr_witness.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/kern/subr_witness.c Fri Apr 5 08:22:11 2013 (r249132) @@ -184,7 +184,7 @@ __FBSDID("$FreeBSD$"); #define WITNESS_INDEX_ASSERT(i) \ MPASS((i) > 0 && (i) <= w_max_used_index && (i) < WITNESS_COUNT) -MALLOC_DEFINE(M_WITNESS, "Witness", "Witness"); +static MALLOC_DEFINE(M_WITNESS, "Witness", "Witness"); /* * Lock instances. A lock instance is the data associated with a lock while Modified: stable/9/sys/libkern/iconv.c ============================================================================== --- stable/9/sys/libkern/iconv.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/libkern/iconv.c Fri Apr 5 08:22:11 2013 (r249132) @@ -43,7 +43,7 @@ SYSCTL_DECL(_kern_iconv); SYSCTL_NODE(_kern, OID_AUTO, iconv, CTLFLAG_RW, NULL, "kernel iconv interface"); MALLOC_DEFINE(M_ICONV, "iconv", "ICONV structures"); -MALLOC_DEFINE(M_ICONVDATA, "iconv_data", "ICONV data"); +static MALLOC_DEFINE(M_ICONVDATA, "iconv_data", "ICONV data"); MODULE_VERSION(libiconv, 2); Modified: stable/9/sys/net/if.c ============================================================================== --- stable/9/sys/net/if.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/net/if.c Fri Apr 5 08:22:11 2013 (r249132) @@ -118,7 +118,7 @@ SYSCTL_UINT(_net, OID_AUTO, ifdescr_maxl &ifdescr_maxlen, 0, "administrative maximum length for interface description"); -MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions"); +static MALLOC_DEFINE(M_IFDESCR, "ifdescr", "ifnet descriptions"); /* global sx for non-critical path ifdescr */ static struct sx ifdescr_sx; @@ -215,7 +215,7 @@ struct sx ifnet_sxlock; static if_com_alloc_t *if_com_alloc[256]; static if_com_free_t *if_com_free[256]; -MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals"); +static MALLOC_DEFINE(M_IFNET, "ifnet", "interface internals"); MALLOC_DEFINE(M_IFADDR, "ifaddr", "interface address"); MALLOC_DEFINE(M_IFMADDR, "ether_multi", "link-level multicast address"); Modified: stable/9/sys/net/if_arcsubr.c ============================================================================== --- stable/9/sys/net/if_arcsubr.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/net/if_arcsubr.c Fri Apr 5 08:22:11 2013 (r249132) @@ -837,7 +837,7 @@ arc_resolvemulti(struct ifnet *ifp, stru } } -MALLOC_DEFINE(M_ARCCOM, "arccom", "ARCNET interface internals"); +static MALLOC_DEFINE(M_ARCCOM, "arccom", "ARCNET interface internals"); static void* arc_alloc(u_char type, struct ifnet *ifp) Modified: stable/9/sys/net/if_atmsubr.c ============================================================================== --- stable/9/sys/net/if_atmsubr.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/net/if_atmsubr.c Fri Apr 5 08:22:11 2013 (r249132) @@ -98,7 +98,7 @@ void (*atm_harp_event_p)(struct ifnet *, SYSCTL_NODE(_hw, OID_AUTO, atm, CTLFLAG_RW, 0, "ATM hardware"); -MALLOC_DEFINE(M_IFATM, "ifatm", "atm interface internals"); +static MALLOC_DEFINE(M_IFATM, "ifatm", "atm interface internals"); #ifndef ETHERTYPE_IPV6 #define ETHERTYPE_IPV6 0x86dd Modified: stable/9/sys/net/if_ethersubr.c ============================================================================== --- stable/9/sys/net/if_ethersubr.c Fri Apr 5 07:41:47 2013 (r249131) +++ stable/9/sys/net/if_ethersubr.c Fri Apr 5 08:22:11 2013 (r249132) @@ -134,7 +134,7 @@ static void ether_reassign(struct ifnet #endif /* XXX: should be in an arp support file, not here */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 08:46:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A2903577; Fri, 5 Apr 2013 08:46:21 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 860C68F8; Fri, 5 Apr 2013 08:46:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r358kLR1008430; Fri, 5 Apr 2013 08:46:21 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r358kLPd008429; Fri, 5 Apr 2013 08:46:21 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304050846.r358kLPd008429@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 08: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: r249133 - stable/9/sys/cam/scsi 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, 05 Apr 2013 08:46:21 -0000 Author: mav Date: Fri Apr 5 08:46:20 2013 New Revision: 249133 URL: http://svnweb.freebsd.org/changeset/base/249133 Log: MFC r234177, r234374 (by trasz): Refactor da(4) to remove one of two code paths used to query capacity data. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 08:22:11 2013 (r249132) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 08:46:20 2013 (r249133) @@ -82,7 +82,8 @@ typedef enum { DA_FLAG_RETRY_UA = 0x080, DA_FLAG_OPEN = 0x100, DA_FLAG_SCTX_INIT = 0x200, - DA_FLAG_CAN_RC16 = 0x400 + DA_FLAG_CAN_RC16 = 0x400, + DA_FLAG_PROBED = 0x800 } da_flags; typedef enum { @@ -867,7 +868,7 @@ static void dadone(struct cam_periph *p static int daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags); static void daprevent(struct cam_periph *periph, int action); -static int dagetcapacity(struct cam_periph *periph); +static void dareprobe(struct cam_periph *periph); static void dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector, struct scsi_read_capacity_data_long *rcaplong, @@ -966,36 +967,31 @@ daopen(struct disk *dp) softc->flags &= ~DA_FLAG_PACK_INVALID; } - error = dagetcapacity(periph); + dareprobe(periph); - if (error == 0) { - - softc->disk->d_sectorsize = softc->params.secsize; - softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors; - softc->disk->d_stripesize = softc->params.stripesize; - softc->disk->d_stripeoffset = softc->params.stripeoffset; - /* XXX: these are not actually "firmware" values, so they may be wrong */ - softc->disk->d_fwsectors = softc->params.secs_per_track; - softc->disk->d_fwheads = softc->params.heads; - softc->disk->d_devstat->block_size = softc->params.secsize; - softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE; - if (softc->delete_method > DA_DELETE_DISABLE) - softc->disk->d_flags |= DISKFLAG_CANDELETE; - else - softc->disk->d_flags &= ~DISKFLAG_CANDELETE; - - if ((softc->flags & DA_FLAG_PACK_REMOVABLE) != 0 && - (softc->quirks & DA_Q_NO_PREVENT) == 0) - daprevent(periph, PR_PREVENT); - } else - softc->flags &= ~DA_FLAG_OPEN; + /* Wait for the disk size update. */ + error = msleep(&softc->disk->d_mediasize, periph->sim->mtx, PRIBIO, + "dareprobe", 0); + if (error != 0) + xpt_print(periph->path, "unable to retrieve capacity data"); + + if (periph->flags & CAM_PERIPH_INVALID || + softc->disk->d_sectorsize == 0 || + softc->disk->d_mediasize == 0) + error = ENXIO; + + if (error == 0 && (softc->flags & DA_FLAG_PACK_REMOVABLE) != 0 && + (softc->quirks & DA_Q_NO_PREVENT) == 0) + daprevent(periph, PR_PREVENT); cam_periph_unhold(periph); cam_periph_unlock(periph); if (error != 0) { + softc->flags &= ~DA_FLAG_OPEN; cam_periph_release(periph); } + return (error); } @@ -2400,7 +2396,7 @@ dadone(struct cam_periph *periph, union } } free(csio->data_ptr, M_SCSIDA); - if (announce_buf[0] != '\0') { + if (announce_buf[0] != '\0' && ((softc->flags & DA_FLAG_PROBED) == 0)) { /* * Create our sysctl variables, now that we know * we have successfully attached. @@ -2414,9 +2410,7 @@ dadone(struct cam_periph *periph, union xpt_print(periph->path, "fatal error, " "could not acquire reference count\n"); } - } - softc->state = DA_STATE_NORMAL; /* * Since our peripheral may be invalidated by an error * above or an external event, we must release our CCB @@ -2426,7 +2420,13 @@ dadone(struct cam_periph *periph, union * operation. */ xpt_release_ccb(done_ccb); - cam_periph_unhold(periph); + softc->state = DA_STATE_NORMAL; + wakeup(&softc->disk->d_mediasize); + if ((softc->flags & DA_FLAG_PROBED) == 0) { + softc->flags |= DA_FLAG_PROBED; + cam_periph_unhold(periph); + } else + cam_periph_release_locked(periph); return; } case DA_CCB_WAITING: @@ -2444,6 +2444,30 @@ dadone(struct cam_periph *periph, union xpt_release_ccb(done_ccb); } +static void +dareprobe(struct cam_periph *periph) +{ + struct da_softc *softc; + cam_status status; + + softc = (struct da_softc *)periph->softc; + + /* Probe in progress; don't interfere. */ + if ((softc->flags & DA_FLAG_PROBED) == 0) + return; + + status = cam_periph_acquire(periph); + KASSERT(status == CAM_REQ_CMP, + ("dareprobe: cam_periph_acquire failed")); + + if (softc->flags & DA_FLAG_CAN_RC16) + softc->state = DA_STATE_PROBE2; + else + softc->state = DA_STATE_PROBE; + + xpt_schedule(periph, CAM_PRIORITY_DEV); +} + static int daerror(union ccb *ccb, u_int32_t cam_flags, u_int32_t sense_flags) { @@ -2473,6 +2497,16 @@ daerror(union ccb *ccb, u_int32_t cam_fl &error_code, &sense_key, &asc, &ascq); if (sense_key == SSD_KEY_ILLEGAL_REQUEST) error = cmd6workaround(ccb); + /* + * If the target replied with CAPACITY DATA HAS CHANGED UA, + * query the capacity and notify upper layers. + */ + else if (sense_key == SSD_KEY_UNIT_ATTENTION && + asc == 0x2A && ascq == 0x09) { + xpt_print(periph->path, "capacity data has changed\n"); + dareprobe(periph); + sense_flags |= SF_NO_PRINT; + } } if (error == ERESTART) return (ERESTART); @@ -2526,162 +2560,6 @@ daprevent(struct cam_periph *periph, int xpt_release_ccb(ccb); } -static int -dagetcapacity(struct cam_periph *periph) -{ - struct da_softc *softc; - union ccb *ccb; - struct scsi_read_capacity_data *rcap; - struct scsi_read_capacity_data_long *rcaplong; - uint32_t block_len; - uint64_t maxsector; - int error, rc16failed; - u_int32_t sense_flags; - u_int lbppbe; /* Logical blocks per physical block exponent. */ - u_int lalba; /* Lowest aligned LBA. */ - - softc = (struct da_softc *)periph->softc; - block_len = 0; - maxsector = 0; - lbppbe = 0; - lalba = 0; - error = 0; - rc16failed = 0; - rcaplong = NULL; - sense_flags = SF_RETRY_UA; - if (softc->flags & DA_FLAG_PACK_REMOVABLE) - sense_flags |= SF_NO_PRINT; - - /* Do a read capacity */ - rcap = (struct scsi_read_capacity_data *)malloc(sizeof(*rcaplong), - M_SCSIDA, - M_NOWAIT | M_ZERO); - if (rcap == NULL) - return (ENOMEM); - rcaplong = (struct scsi_read_capacity_data_long *)rcap; - - ccb = cam_periph_getccb(periph, CAM_PRIORITY_NORMAL); - - /* Try READ CAPACITY(16) first if we think it should work. */ - if (softc->flags & DA_FLAG_CAN_RC16) { - scsi_read_capacity_16(&ccb->csio, - /*retries*/ 4, - /*cbfcnp*/ dadone, - /*tag_action*/ MSG_SIMPLE_Q_TAG, - /*lba*/ 0, - /*reladr*/ 0, - /*pmi*/ 0, - /*rcap_buf*/ rcaplong, - /*sense_len*/ SSD_FULL_SIZE, - /*timeout*/ 60000); - ccb->ccb_h.ccb_bp = NULL; - - error = cam_periph_runccb(ccb, daerror, - /*cam_flags*/CAM_RETRY_SELTO, - sense_flags, softc->disk->d_devstat); - if (error == 0) - goto rc16ok; - - /* If we got ILLEGAL REQUEST, do not prefer RC16 any more. */ - if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INVALID) { - softc->flags &= ~DA_FLAG_CAN_RC16; - } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) == - CAM_SCSI_STATUS_ERROR) - && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) - && (ccb->ccb_h.status & CAM_AUTOSNS_VALID) - && ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) - && ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { - int sense_key, error_code, asc, ascq; - - scsi_extract_sense_len(&ccb->csio.sense_data, - ccb->csio.sense_len - - ccb->csio.sense_resid, - &error_code, &sense_key, - &asc, &ascq, /*show_errors*/1); - /* - * If we don't have enough sense to get the sense - * key, or if it's illegal request, turn off - * READ CAPACITY (16). - */ - if ((sense_key == -1) - || (sense_key == SSD_KEY_ILLEGAL_REQUEST)) - softc->flags &= ~DA_FLAG_CAN_RC16; - } - rc16failed = 1; - } - - /* Do READ CAPACITY(10). */ - scsi_read_capacity(&ccb->csio, - /*retries*/4, - /*cbfncp*/dadone, - MSG_SIMPLE_Q_TAG, - rcap, - SSD_FULL_SIZE, - /*timeout*/60000); - ccb->ccb_h.ccb_bp = NULL; - - error = cam_periph_runccb(ccb, daerror, - /*cam_flags*/CAM_RETRY_SELTO, - sense_flags, - softc->disk->d_devstat); - if (error == 0) { - block_len = scsi_4btoul(rcap->length); - maxsector = scsi_4btoul(rcap->addr); - - if (maxsector != 0xffffffff || rc16failed) - goto done; - } else - goto done; - - /* If READ CAPACITY(10) returned overflow, use READ CAPACITY(16) */ - scsi_read_capacity_16(&ccb->csio, - /*retries*/ 4, - /*cbfcnp*/ dadone, - /*tag_action*/ MSG_SIMPLE_Q_TAG, - /*lba*/ 0, - /*reladr*/ 0, - /*pmi*/ 0, - rcaplong, - /*sense_len*/ SSD_FULL_SIZE, - /*timeout*/ 60000); - ccb->ccb_h.ccb_bp = NULL; - - error = cam_periph_runccb(ccb, daerror, - /*cam_flags*/CAM_RETRY_SELTO, - sense_flags, - softc->disk->d_devstat); - if (error == 0) { -rc16ok: - block_len = scsi_4btoul(rcaplong->length); - maxsector = scsi_8btou64(rcaplong->addr); - lbppbe = rcaplong->prot_lbppbe & SRC16_LBPPBE; - lalba = scsi_2btoul(rcaplong->lalba_lbp); - } - -done: - - if (error == 0) { - if (block_len >= MAXPHYS || block_len == 0) { - xpt_print(periph->path, - "unsupportable block size %ju\n", - (uintmax_t) block_len); - error = EINVAL; - } else { - dasetgeom(periph, block_len, maxsector, - rcaplong, sizeof(*rcaplong)); - if ((lalba & SRC16_LBPME) - && softc->delete_method == DA_DELETE_NONE) - softc->delete_method = DA_DELETE_UNMAP; - } - } - - xpt_release_ccb(ccb); - - free(rcap, M_SCSIDA); - - return (error); -} - static void dasetgeom(struct cam_periph *periph, uint32_t block_len, uint64_t maxsector, struct scsi_read_capacity_data_long *rcaplong, size_t rcap_len) @@ -2781,6 +2659,20 @@ dasetgeom(struct cam_periph *periph, uin min(sizeof(softc->rcaplong), rcap_len)); } } + + softc->disk->d_sectorsize = softc->params.secsize; + softc->disk->d_mediasize = softc->params.secsize * (off_t)softc->params.sectors; + softc->disk->d_stripesize = softc->params.stripesize; + softc->disk->d_stripeoffset = softc->params.stripeoffset; + /* XXX: these are not actually "firmware" values, so they may be wrong */ + softc->disk->d_fwsectors = softc->params.secs_per_track; + softc->disk->d_fwheads = softc->params.heads; + softc->disk->d_devstat->block_size = softc->params.secsize; + softc->disk->d_devstat->flags &= ~DEVSTAT_BS_UNAVAILABLE; + if (softc->delete_method > DA_DELETE_DISABLE) + softc->disk->d_flags |= DISKFLAG_CANDELETE; + else + softc->disk->d_flags &= ~DISKFLAG_CANDELETE; } static void From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 08:51:06 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B7E7F7DB; Fri, 5 Apr 2013 08:51:06 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A92D3927; Fri, 5 Apr 2013 08:51:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r358p6b8010686; Fri, 5 Apr 2013 08:51:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r358p5dg010681; Fri, 5 Apr 2013 08:51:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304050851.r358p5dg010681@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 08:51: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: r249134 - in stable/9/sys/cam: . scsi 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, 05 Apr 2013 08:51:06 -0000 Author: mav Date: Fri Apr 5 08:51:05 2013 New Revision: 249134 URL: http://svnweb.freebsd.org/changeset/base/249134 Log: MFC r237478: Add scsi_extract_sense_ccb() -- wrapper around scsi_extract_sense_len(). It allows to remove number of duplicate checks from several places. Modified: stable/9/sys/cam/cam_periph.c stable/9/sys/cam/scsi/scsi_all.c stable/9/sys/cam/scsi/scsi_all.h stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Fri Apr 5 08:46:20 2013 (r249133) +++ stable/9/sys/cam/cam_periph.c Fri Apr 5 08:51:05 2013 (r249134) @@ -1155,22 +1155,15 @@ camperiphdone(struct cam_periph *periph, union ccb *saved_ccb; cam_status status; struct scsi_start_stop_unit *scsi_cmd; + int error_code, sense_key, asc, ascq; scsi_cmd = (struct scsi_start_stop_unit *) &done_ccb->csio.cdb_io.cdb_bytes; status = done_ccb->ccb_h.status; if ((status & CAM_STATUS_MASK) != CAM_REQ_CMP) { - if ((status & CAM_STATUS_MASK) == CAM_SCSI_STATUS_ERROR && - (status & CAM_AUTOSNS_VALID)) { - struct scsi_sense_data *sense; - int error_code, sense_key, asc, ascq, sense_len; - - sense = &done_ccb->csio.sense_data; - sense_len = done_ccb->csio.sense_len - - done_ccb->csio.sense_resid; - scsi_extract_sense_len(sense, sense_len, &error_code, - &sense_key, &asc, &ascq, /*show_errors*/ 1); + if (scsi_extract_sense_ccb(done_ccb, + &error_code, &sense_key, &asc, &ascq)) { /* * If the error is "invalid field in CDB", * and the load/eject flag is set, turn the @@ -1432,12 +1425,8 @@ camperiphscsisenseerror(union ccb *ccb, cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); - if ((ccb->ccb_h.status & CAM_AUTOSNS_VALID) != 0) - err_action = scsi_error_action(&ccb->csio, - &cgd.inq_data, - sense_flags); - else - err_action = SS_RETRY|SSQ_DECREMENT_COUNT|EIO; + err_action = scsi_error_action(&ccb->csio, &cgd.inq_data, + sense_flags); error = err_action & SS_ERRMASK; /* Modified: stable/9/sys/cam/scsi/scsi_all.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.c Fri Apr 5 08:46:20 2013 (r249133) +++ stable/9/sys/cam/scsi/scsi_all.c Fri Apr 5 08:51:05 2013 (r249134) @@ -3005,11 +3005,10 @@ scsi_error_action(struct ccb_scsiio *csi int error_code, sense_key, asc, ascq; scsi_sense_action action; - scsi_extract_sense_len(&csio->sense_data, csio->sense_len - - csio->sense_resid, &error_code, - &sense_key, &asc, &ascq, /*show_errors*/ 1); - - if ((error_code == SSD_DEFERRED_ERROR) + if (!scsi_extract_sense_ccb((union ccb *)csio, + &error_code, &sense_key, &asc, &ascq)) { + action = SS_RETRY | SSQ_DECREMENT_COUNT | SSQ_PRINT_SENSE | EIO; + } else if ((error_code == SSD_DEFERRED_ERROR) || (error_code == SSD_DESC_DEFERRED_ERROR)) { /* * XXX dufault@FreeBSD.org @@ -4793,6 +4792,36 @@ scsi_extract_sense(struct scsi_sense_dat } /* + * Extract basic sense information from SCSI I/O CCB structure. + */ +int +scsi_extract_sense_ccb(union ccb *ccb, + int *error_code, int *sense_key, int *asc, int *ascq) +{ + struct scsi_sense_data *sense_data; + + /* Make sure there are some sense data we can access. */ + if (ccb->ccb_h.func_code != XPT_SCSI_IO || + (ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_SCSI_STATUS_ERROR || + (ccb->csio.scsi_status != SCSI_STATUS_CHECK_COND) || + (ccb->ccb_h.status & CAM_AUTOSNS_VALID) == 0 || + (ccb->ccb_h.flags & CAM_SENSE_PHYS)) + return (0); + + if (ccb->ccb_h.flags & CAM_SENSE_PTR) + bcopy(&ccb->csio.sense_data, &sense_data, + sizeof(struct scsi_sense_data *)); + else + sense_data = &ccb->csio.sense_data; + scsi_extract_sense_len(sense_data, + ccb->csio.sense_len - ccb->csio.sense_resid, + error_code, sense_key, asc, ascq, 1); + if (*error_code == -1) + return (0); + return (1); +} + +/* * Extract basic sense information. If show_errors is set, sense values * will be set to -1 if they are not present. */ Modified: stable/9/sys/cam/scsi/scsi_all.h ============================================================================== --- stable/9/sys/cam/scsi/scsi_all.h Fri Apr 5 08:46:20 2013 (r249133) +++ stable/9/sys/cam/scsi/scsi_all.h Fri Apr 5 08:51:05 2013 (r249134) @@ -2389,6 +2389,8 @@ int scsi_devid_match(uint8_t *rhs, size void scsi_extract_sense(struct scsi_sense_data *sense, int *error_code, int *sense_key, int *asc, int *ascq); +int scsi_extract_sense_ccb(union ccb *ccb, int *error_code, int *sense_key, + int *asc, int *ascq); void scsi_extract_sense_len(struct scsi_sense_data *sense, u_int sense_len, int *error_code, int *sense_key, int *asc, int *ascq, int show_errors); Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 08:46:20 2013 (r249133) +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 08:51:05 2013 (r249134) @@ -1691,7 +1691,6 @@ cddone(struct cam_periph *periph, union */ return; } else { - struct scsi_sense_data *sense; int asc, ascq; int sense_key, error_code; int have_sense; @@ -1714,20 +1713,12 @@ cddone(struct cam_periph *periph, union cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); - if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0) - || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0) - || ((status & CAM_AUTOSNS_VALID) == 0)) - have_sense = FALSE; - else + if (scsi_extract_sense_ccb(done_ccb, + &error_code, &sense_key, &asc, &ascq)) have_sense = TRUE; + else + have_sense = FALSE; - if (have_sense) { - sense = &csio->sense_data; - scsi_extract_sense_len(sense, - csio->sense_len - csio->sense_resid, - &error_code, &sense_key, &asc, - &ascq, /*show_errors*/ 1); - } /* * Attach to anything that claims to be a * CDROM or WORM device, as long as it @@ -3154,7 +3145,7 @@ cderror(union ccb *ccb, u_int32_t cam_fl { struct cd_softc *softc; struct cam_periph *periph; - int error; + int error, error_code, sense_key, asc, ascq; periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct cd_softc *)periph->softc; @@ -3168,19 +3159,10 @@ cderror(union ccb *ccb, u_int32_t cam_fl */ if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INVALID) { error = cd6byteworkaround(ccb); - } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) == - CAM_SCSI_STATUS_ERROR) - && (ccb->ccb_h.status & CAM_AUTOSNS_VALID) - && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) - && ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) - && ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { - int sense_key, error_code, asc, ascq; - - scsi_extract_sense_len(&ccb->csio.sense_data, - ccb->csio.sense_len - ccb->csio.sense_resid, &error_code, - &sense_key, &asc, &ascq, /*show_errors*/ 1); + } else if (scsi_extract_sense_ccb(ccb, + &error_code, &sense_key, &asc, &ascq)) { if (sense_key == SSD_KEY_ILLEGAL_REQUEST) - error = cd6byteworkaround(ccb); + error = cd6byteworkaround(ccb); } if (error == ERESTART) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 08:46:20 2013 (r249133) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 08:51:05 2013 (r249134) @@ -2299,7 +2299,6 @@ dadone(struct cam_periph *periph, union */ return; } else if (error != 0) { - struct scsi_sense_data *sense; int asc, ascq; int sense_key, error_code; int have_sense; @@ -2322,20 +2321,12 @@ dadone(struct cam_periph *periph, union cgd.ccb_h.func_code = XPT_GDEV_TYPE; xpt_action((union ccb *)&cgd); - if (((csio->ccb_h.flags & CAM_SENSE_PHYS) != 0) - || ((csio->ccb_h.flags & CAM_SENSE_PTR) != 0) - || ((status & CAM_AUTOSNS_VALID) == 0)) - have_sense = FALSE; - else + if (scsi_extract_sense_ccb(done_ccb, + &error_code, &sense_key, &asc, &ascq)) have_sense = TRUE; + else + have_sense = FALSE; - if (have_sense) { - sense = &csio->sense_data; - scsi_extract_sense_len(sense, - csio->sense_len - csio->sense_resid, - &error_code, &sense_key, &asc, - &ascq, /*show_errors*/ 1); - } /* * If we tried READ CAPACITY(16) and failed, * fallback to READ CAPACITY(10). @@ -2473,7 +2464,7 @@ daerror(union ccb *ccb, u_int32_t cam_fl { struct da_softc *softc; struct cam_periph *periph; - int error; + int error, error_code, sense_key, asc, ascq; periph = xpt_path_periph(ccb->ccb_h.path); softc = (struct da_softc *)periph->softc; @@ -2485,16 +2476,8 @@ daerror(union ccb *ccb, u_int32_t cam_fl error = 0; if ((ccb->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INVALID) { error = cmd6workaround(ccb); - } else if (((ccb->ccb_h.status & CAM_STATUS_MASK) == - CAM_SCSI_STATUS_ERROR) - && (ccb->ccb_h.status & CAM_AUTOSNS_VALID) - && (ccb->csio.scsi_status == SCSI_STATUS_CHECK_COND) - && ((ccb->ccb_h.flags & CAM_SENSE_PHYS) == 0) - && ((ccb->ccb_h.flags & CAM_SENSE_PTR) == 0)) { - int sense_key, error_code, asc, ascq; - - scsi_extract_sense(&ccb->csio.sense_data, - &error_code, &sense_key, &asc, &ascq); + } else if (scsi_extract_sense_ccb(ccb, + &error_code, &sense_key, &asc, &ascq)) { if (sense_key == SSD_KEY_ILLEGAL_REQUEST) error = cmd6workaround(ccb); /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:02:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 39803B34; Fri, 5 Apr 2013 09:02:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 129BF9AA; Fri, 5 Apr 2013 09:02:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35924eZ013953; Fri, 5 Apr 2013 09:02:04 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3592457013952; Fri, 5 Apr 2013 09:02:04 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304050902.r3592457013952@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 09:02:04 +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: r249135 - stable/9/sys/cam/scsi 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, 05 Apr 2013 09:02:05 -0000 Author: mav Date: Fri Apr 5 09:02:04 2013 New Revision: 249135 URL: http://svnweb.freebsd.org/changeset/base/249135 Log: MFC r237689 (by imp): Add a sysctl to set the cdrom timeout. Data recovery operations from a CD or DVD drive with a damaged disc often benefit from a shorter timeout. Also, when retries are set to 0, an application is expecting errors and recovering them so do not print the error into the log. The number of expected errors can literally be in the hundreds of thousands which significantly slows data recovery. Modified: stable/9/sys/cam/scsi/scsi_cd.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 08:51:05 2013 (r249134) +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 09:02:04 2013 (r249135) @@ -293,6 +293,9 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #ifndef CD_DEFAULT_RETRY #define CD_DEFAULT_RETRY 4 #endif +#ifndef CD_DEFAULT_TIMEOUT +#define CD_DEFAULT_TIMEOUT 30000 +#endif #ifndef CHANGER_MIN_BUSY_SECONDS #define CHANGER_MIN_BUSY_SECONDS 5 #endif @@ -301,6 +304,7 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #endif static int cd_retry_count = CD_DEFAULT_RETRY; +static int cd_timeout = CD_DEFAULT_TIMEOUT; static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; static int changer_max_busy_seconds = CHANGER_MAX_BUSY_SECONDS; @@ -310,6 +314,9 @@ static SYSCTL_NODE(_kern_cam_cd, OID_AUT SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, &cd_retry_count, 0, "Normal I/O retry count"); TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); +SYSCTL_INT(_kern_cam_cd, OID_AUTO, timeout, CTLFLAG_RW, + &cd_timeout, 0, "Timeout, in us, for read operations"); +TUNABLE_INT("kern.cam.cd.timeout", &cd_timeout); SYSCTL_INT(_kern_cam_cd_changer, OID_AUTO, min_busy_seconds, CTLFLAG_RW, &changer_min_busy_seconds, 0, "Minimum changer scheduling quantum"); TUNABLE_INT("kern.cam.cd.changer.min_busy_seconds", &changer_min_busy_seconds); @@ -1505,8 +1512,9 @@ cdstart(struct cam_periph *periph, union bp->bio_bcount / softc->params.blksize, /* data_ptr */ bp->bio_data, /* dxfer_len */ bp->bio_bcount, - /* sense_len */ SSD_FULL_SIZE, - /* timeout */ 30000); + /* sense_len */ cd_retry_count ? + SSD_FULL_SIZE : SF_NO_PRINT, + /* timeout */ cd_timeout); /* Use READ CD command for audio tracks. */ if (softc->params.blksize == 2352) { start_ccb->csio.cdb_io.cdb_bytes[0] = READ_CD; From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:06:26 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EAD0FCDA; Fri, 5 Apr 2013 09:06:26 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DA4CD9D0; Fri, 5 Apr 2013 09:06:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3596QQt014621; Fri, 5 Apr 2013 09:06:26 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3596Qfd014618; Fri, 5 Apr 2013 09:06:26 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304050906.r3596Qfd014618@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 5 Apr 2013 09:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249136 - in vendor/unbound/dist: . contrib daemon doc iterator libunbound pythonmod pythonmod/doc/examples services services/cache smallapp testcode testdata util util/data util/storag... 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: Fri, 05 Apr 2013 09:06:27 -0000 Author: des Date: Fri Apr 5 09:06:26 2013 New Revision: 249136 URL: http://svnweb.freebsd.org/changeset/base/249136 Log: Import unbound 1.4.20 Added: vendor/unbound/dist/contrib/patch_rsamd5_enable.diff vendor/unbound/dist/contrib/unbound_unixsock.diff vendor/unbound/dist/testdata/iter_ds_locate_ns_detach.rpl vendor/unbound/dist/testdata/nss_compile.tpkg (contents, props changed) vendor/unbound/dist/testdata/val_cnametocnamewctoposwc.rpl vendor/unbound/dist/testdata/val_cnametonodata_nonsec.rpl vendor/unbound/dist/testdata/val_ds_cnamesub.rpl vendor/unbound/dist/testdata/val_nsec3_cnametocnamewctoposwc.rpl vendor/unbound/dist/testdata/val_nsec3_entnodata_optout.rpl vendor/unbound/dist/testdata/val_nsec3_entnodata_optout_badopt.rpl vendor/unbound/dist/testdata/val_nsec3_entnodata_optout_match.rpl vendor/unbound/dist/validator/val_secalgo.c (contents, props changed) vendor/unbound/dist/validator/val_secalgo.h (contents, props changed) Modified: vendor/unbound/dist/Makefile.in vendor/unbound/dist/aclocal.m4 vendor/unbound/dist/acx_python.m4 vendor/unbound/dist/config.guess vendor/unbound/dist/config.h.in vendor/unbound/dist/config.sub vendor/unbound/dist/configure vendor/unbound/dist/configure.ac vendor/unbound/dist/contrib/README vendor/unbound/dist/contrib/unbound.spec vendor/unbound/dist/contrib/unbound_munin_ vendor/unbound/dist/daemon/cachedump.c vendor/unbound/dist/daemon/daemon.c vendor/unbound/dist/daemon/remote.c vendor/unbound/dist/daemon/remote.h vendor/unbound/dist/daemon/unbound.c vendor/unbound/dist/daemon/worker.c vendor/unbound/dist/doc/Changelog vendor/unbound/dist/doc/FEATURES vendor/unbound/dist/doc/README vendor/unbound/dist/doc/example.conf.in vendor/unbound/dist/doc/libunbound.3.in vendor/unbound/dist/doc/unbound-anchor.8.in vendor/unbound/dist/doc/unbound-checkconf.8.in vendor/unbound/dist/doc/unbound-control.8.in vendor/unbound/dist/doc/unbound-host.1 vendor/unbound/dist/doc/unbound.8.in vendor/unbound/dist/doc/unbound.conf.5.in vendor/unbound/dist/doc/unbound.doxygen vendor/unbound/dist/install-sh vendor/unbound/dist/iterator/iter_fwd.c vendor/unbound/dist/iterator/iter_hints.c vendor/unbound/dist/iterator/iter_utils.c vendor/unbound/dist/iterator/iter_utils.h vendor/unbound/dist/iterator/iterator.c vendor/unbound/dist/libunbound/libworker.c vendor/unbound/dist/libunbound/unbound.h vendor/unbound/dist/ltmain.sh vendor/unbound/dist/pythonmod/doc/examples/example0-1.py vendor/unbound/dist/pythonmod/pythonmod.c vendor/unbound/dist/services/cache/infra.c vendor/unbound/dist/services/listen_dnsport.c vendor/unbound/dist/services/localzone.c vendor/unbound/dist/services/mesh.c vendor/unbound/dist/services/outside_network.c vendor/unbound/dist/services/outside_network.h vendor/unbound/dist/smallapp/unbound-anchor.c vendor/unbound/dist/smallapp/unbound-control.c vendor/unbound/dist/smallapp/unbound-host.c vendor/unbound/dist/testcode/fake_event.c vendor/unbound/dist/testcode/ldns-testpkts.c vendor/unbound/dist/testcode/ldns-testpkts.h vendor/unbound/dist/testcode/replay.c vendor/unbound/dist/testcode/testbound.c vendor/unbound/dist/testcode/unitmain.c vendor/unbound/dist/testcode/unitverify.c vendor/unbound/dist/testdata/09-unbound-control.tpkg vendor/unbound/dist/testdata/10-unbound-anchor.tpkg vendor/unbound/dist/testdata/common.sh vendor/unbound/dist/testdata/fwd_zero.tpkg vendor/unbound/dist/util/alloc.h vendor/unbound/dist/util/config_file.c vendor/unbound/dist/util/configlexer.c vendor/unbound/dist/util/configlexer.lex vendor/unbound/dist/util/configparser.c vendor/unbound/dist/util/configparser.h vendor/unbound/dist/util/data/msgparse.c vendor/unbound/dist/util/iana_ports.inc vendor/unbound/dist/util/log.c vendor/unbound/dist/util/net_help.c vendor/unbound/dist/util/net_help.h vendor/unbound/dist/util/netevent.c vendor/unbound/dist/util/random.c vendor/unbound/dist/util/rtt.c vendor/unbound/dist/util/storage/lookup3.c vendor/unbound/dist/util/tube.c vendor/unbound/dist/validator/autotrust.c vendor/unbound/dist/validator/val_anchor.c vendor/unbound/dist/validator/val_neg.c vendor/unbound/dist/validator/val_nsec3.c vendor/unbound/dist/validator/val_sigcrypt.c vendor/unbound/dist/validator/val_utils.c vendor/unbound/dist/validator/validator.c vendor/unbound/dist/validator/validator.h vendor/unbound/dist/winrc/setup.nsi vendor/unbound/dist/winrc/win_svc.c Modified: vendor/unbound/dist/Makefile.in ============================================================================== --- vendor/unbound/dist/Makefile.in Fri Apr 5 09:02:04 2013 (r249135) +++ vendor/unbound/dist/Makefile.in Fri Apr 5 09:06:26 2013 (r249136) @@ -30,6 +30,7 @@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@ PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@ PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@ +ALLTARGET=@ALLTARGET@ # _unbound.la if pyunbound enabled. PYUNBOUND_TARGET=@PYUNBOUND_TARGET@ @@ -99,7 +100,8 @@ util/storage/lruhash.c util/storage/slab util/winsock_event.c validator/autotrust.c validator/val_anchor.c \ validator/validator.c validator/val_kcache.c validator/val_kentry.c \ validator/val_neg.c validator/val_nsec3.c validator/val_nsec.c \ -validator/val_sigcrypt.c validator/val_utils.c $(CHECKLOCK_SRC) +validator/val_secalgo.c validator/val_sigcrypt.c \ +validator/val_utils.c $(CHECKLOCK_SRC) COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ @@ -109,7 +111,7 @@ fptr_wlist.lo locks.lo log.lo mini_event random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ -val_sigcrypt.lo val_utils.lo $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) +val_secalgo.lo val_sigcrypt.lo val_utils.lo $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) COMMON_OBJ=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo # set to $COMMON_OBJ or to "" if --enableallsymbols @@ -227,9 +229,11 @@ COMPILE=$(LIBTOOL) --tag=CC --mode=compi LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(staticexe) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) LINK_LIB=$(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(staticexe) -version-info @LIBUNBOUND_CURRENT@:@LIBUNBOUND_REVISION@:@LIBUNBOUND_AGE@ -no-undefined -.PHONY: clean realclean doc lint all install uninstall tests test strip lib longtest longcheck check +.PHONY: clean realclean doc lint all install uninstall tests test strip lib longtest longcheck check alltargets -all: $(COMMON_OBJ) unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET) +all: $(COMMON_OBJ) $(ALLTARGET) + +alltargets: unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET) # compat with BSD make, register suffix, and an implicit rule to actualise it. .SUFFIXES: .lo @@ -358,7 +362,7 @@ pythonmod.lo pythonmod.o: $(srcdir)/pyth $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h -pythonmod/interface.h: $(srcdir)/pythonmod/interface.i $(srcdir)/config.h +pythonmod/interface.h: $(srcdir)/pythonmod/interface.i config.h @-if test ! -d pythonmod; then $(INSTALL) -d pythonmod; fi $(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i @@ -389,12 +393,14 @@ clean: rm -f *.o *.d *.lo *~ tags rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la rm -f $(ALL_SRC:.c=.lint) + rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py rm -rf autom4te.cache .libs build doc/html doc/xml realclean: clean rm -f config.status config.log config.h.in config.h rm -f configure config.sub config.guess ltmain.sh aclocal.m4 libtool rm -f util/configlexer.c util/configparser.c util/configparser.h + rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 rm -f $(TEST_BIN) rm -f Makefile @@ -439,7 +445,7 @@ pythonmod-install: pyunbound-install: $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) - $(INSTALL) -c -m 644 libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(INSTALL) -c -m 644 $(srcdir)/libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py $(LIBTOOL) --mode=install cp _unbound.la $(DESTDIR)$(PYTHON_SITE_PKG) $(LIBTOOL) --mode=finish $(DESTDIR)$(PYTHON_SITE_PKG) @@ -464,6 +470,16 @@ install: all $(PYTHONMOD_INSTALL) $(PYUN $(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5 $(INSTALL) -c -m 644 $(srcdir)/doc/unbound-host.1 $(DESTDIR)$(mandir)/man1 $(INSTALL) -c -m 644 doc/libunbound.3 $(DESTDIR)$(mandir)/man3 + for mpage in ub_ctx ub_result ub_ctx_create ub_ctx_delete \ + ub_ctx_set_option ub_ctx_get_option ub_ctx_config ub_ctx_set_fwd \ + ub_ctx_resolvconf ub_ctx_hosts ub_ctx_add_ta ub_ctx_add_ta_file \ + ub_ctx_trustedkeys ub_ctx_debugout ub_ctx_debuglevel ub_ctx_async \ + ub_poll ub_wait ub_fd ub_process ub_resolve ub_resolve_async ub_cancel \ + ub_resolve_free ub_strerror ub_ctx_print_local_zones ub_ctx_zone_add \ + ub_ctx_zone_remove ub_ctx_data_add ub_ctx_data_remove; \ + do \ + echo ".so man3/libunbound.3" > $(DESTDIR)$(mandir)/man3/$$mpage.3 ; \ + done $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h @@ -481,6 +497,16 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUN rm -f -- $(DESTDIR)$(sbindir)/unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control-setup rm -f -- $(DESTDIR)$(mandir)/man8/unbound.8 $(DESTDIR)$(mandir)/man8/unbound-checkconf.8 $(DESTDIR)$(mandir)/man5/unbound.conf.5 $(DESTDIR)$(mandir)/man8/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-anchor.8 rm -f -- $(DESTDIR)$(mandir)/man1/unbound-host.1 $(DESTDIR)$(mandir)/man3/libunbound.3 + for mpage in ub_ctx ub_result ub_ctx_create ub_ctx_delete \ + ub_ctx_set_option ub_ctx_get_option ub_ctx_config ub_ctx_set_fwd \ + ub_ctx_resolvconf ub_ctx_hosts ub_ctx_add_ta ub_ctx_add_ta_file \ + ub_ctx_trustedkeys ub_ctx_debugout ub_ctx_debuglevel ub_ctx_async \ + ub_poll ub_wait ub_fd ub_process ub_resolve ub_resolve_async ub_cancel \ + ub_resolve_free ub_strerror ub_ctx_print_local_zones ub_ctx_zone_add \ + ub_ctx_zone_remove ub_ctx_data_add ub_ctx_data_remove; \ + do \ + rm -f -- $(DESTDIR)$(mandir)/man3/$$mpage.3 ; \ + done rm -f -- $(DESTDIR)$(includedir)/unbound.h $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libunbound.la @echo @@ -562,9 +588,8 @@ msgencode.lo msgencode.o: $(srcdir)/util $(srcdir)/util/regional.h $(srcdir)/util/net_help.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h \ $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/regional.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h \ $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ @@ -669,7 +694,7 @@ modstack.lo modstack.o: $(srcdir)/servic $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) + $(srcdir)/validator/val_utils.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h \ @@ -710,8 +735,8 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ - $(srcdir)/util/rbtree.h $(srcdir)/daemon/worker.h $(srcdir)/util/alloc.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/util/alloc.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/daemon/remote.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ @@ -719,19 +744,12 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER) + $(srcdir)/util/config_file.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/locks.h -mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h \ @@ -744,7 +762,7 @@ netevent.lo netevent.o: $(srcdir)/util/n $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h \ $(srcdir)/util/net_help.h \ $(srcdir)/util/log.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ @@ -762,8 +780,7 @@ rbtree.lo rbtree.o: $(srcdir)/util/rbtre $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/regional.h -rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/util/log.h \ - +rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h dnstree.lo dnstree.o: $(srcdir)/util/storage/dnstree.c config.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h \ @@ -848,12 +865,16 @@ val_nsec.lo val_nsec.o: $(srcdir)/valida $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h +val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h \ + $(srcdir)/validator/val_secalgo.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ $(srcdir)/validator/val_sigcrypt.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -863,7 +884,7 @@ val_utils.lo val_utils.o: $(srcdir)/vali $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h \ @@ -904,11 +925,11 @@ unitverify.lo unitverify.o: $(srcdir)/te $(srcdir)/testcode/unitmain.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h \ - $(srcdir)/validator/val_nsec.h \ - $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/validator/val_utils.h \ - $(srcdir)/testcode/ldns-testpkts.h \ + $(srcdir)/validator/val_secalgo.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/testcode/ldns-testpkts.h \ $(srcdir)/util/data/dname.h \ $(srcdir)/util/regional.h $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h \ @@ -924,13 +945,12 @@ cachedump.lo cachedump.o: $(srcdir)/daem $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ - $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/util/storage/dnstree.h + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/daemon/worker.h \ @@ -940,7 +960,7 @@ daemon.lo daemon.o: $(srcdir)/daemon/dae $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h + $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h \ @@ -971,8 +991,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/u $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/net_help.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/util/net_help.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h \ $(srcdir)/util/log.h \ $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h \ @@ -995,8 +1014,7 @@ testbound.lo testbound.o: $(srcdir)/test $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/util/data/msgreply.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/net_help.h ldns-testpkts.lo ldns-testpkts.o: $(srcdir)/testcode/ldns-testpkts.c config.h \ $(srcdir)/testcode/ldns-testpkts.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h \ @@ -1027,7 +1045,7 @@ daemon.lo daemon.o: $(srcdir)/daemon/dae $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h + $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h \ $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1085,7 +1103,7 @@ unbound-checkconf.lo unbound-checkconf.o $(srcdir)/util/regional.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/services/localzone.h $(PYTHONMOD_HEADER) + $(srcdir)/services/localzone.h worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/util/log.h \ $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h \ @@ -1160,8 +1178,7 @@ pythonmod_utils.lo pythonmod_utils.o: $( $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/netevent.h \ $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h \ Modified: vendor/unbound/dist/aclocal.m4 ============================================================================== --- vendor/unbound/dist/aclocal.m4 Fri Apr 5 09:02:04 2013 (r249135) +++ vendor/unbound/dist/aclocal.m4 Fri Apr 5 09:06:26 2013 (r249136) @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.12.2 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,8 +14,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -24,8 +24,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -159,6 +159,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -644,7 +646,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -808,6 +810,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -829,6 +832,29 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -859,6 +885,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -961,7 +991,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -969,6 +1005,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -980,6 +1017,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -997,7 +1035,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1042,8 +1082,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1054,6 +1094,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1337,14 +1379,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1421,13 +1476,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1607,6 +1662,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1646,7 +1706,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2192,7 +2252,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2201,7 +2261,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2266,7 +2326,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2405,7 +2465,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2413,10 +2473,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2424,7 +2480,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2442,7 +2498,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2462,17 +2518,18 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2533,7 +2590,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2549,7 +2606,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2586,9 +2643,9 @@ linux*oldld* | linux*aout* | linux*coff* dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2655,7 +2712,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2724,7 +2781,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2749,7 +2806,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2773,7 +2830,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2804,7 +2861,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2814,7 +2871,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3236,7 +3293,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3656,6 +3713,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4240,7 +4298,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4332,18 +4392,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4503,7 +4578,9 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4528,7 +4605,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4779,8 +4855,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5075,6 +5150,7 @@ _LT_EOF # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5121,10 +5197,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5137,7 +5209,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5176,7 +5248,6 @@ _LT_EOF fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5618,9 +5689,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1] _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5774,7 +5842,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6144,7 +6211,7 @@ if test "$_lt_caught_CXX_error" != yes; esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6905,12 +6972,18 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7107,7 +7180,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7240,7 +7312,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7423,6 +7494,73 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7492,6 +7630,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -8156,9 +8301,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:06:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 433DEE2C; Fri, 5 Apr 2013 09:06:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3562A9D4; Fri, 5 Apr 2013 09:06:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3596e2V014686; Fri, 5 Apr 2013 09:06:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3596eeU014685; Fri, 5 Apr 2013 09:06:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304050906.r3596eeU014685@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 09:06:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249137 - head/sys/dev/ath/ath_hal 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, 05 Apr 2013 09:06:40 -0000 Author: adrian Date: Fri Apr 5 09:06:39 2013 New Revision: 249137 URL: http://svnweb.freebsd.org/changeset/base/249137 Log: Add a new TX power field - it's inteded to be used where low TX power is configured for higher rates (lower than max) but higher TX power is configured for the lower rates, above the configured cap, to improve long distance behaviour. Modified: head/sys/dev/ath/ath_hal/ah_internal.h Modified: head/sys/dev/ath/ath_hal/ah_internal.h ============================================================================== --- head/sys/dev/ath/ath_hal/ah_internal.h Fri Apr 5 09:06:26 2013 (r249136) +++ head/sys/dev/ath/ath_hal/ah_internal.h Fri Apr 5 09:06:39 2013 (r249137) @@ -392,6 +392,7 @@ struct ath_hal_private { int16_t ah_powerLimit; /* tx power cap */ uint16_t ah_maxPowerLevel; /* calculated max tx power */ u_int ah_tpScale; /* tx power scale factor */ + u_int16_t ah_extraTxPow; /* low rates extra-txpower */ uint32_t ah_11nCompat; /* 11n compat controls */ /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:07:00 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D42FFA3; Fri, 5 Apr 2013 09:07:00 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 03DF59DA; Fri, 5 Apr 2013 09:07:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3596xOO014768; Fri, 5 Apr 2013 09:06:59 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3596xAm014767; Fri, 5 Apr 2013 09:06:59 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304050906.r3596xAm014767@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 5 Apr 2013 09:06:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249138 - vendor/unbound/1.4.20 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: Fri, 05 Apr 2013 09:07:00 -0000 Author: des Date: Fri Apr 5 09:06:59 2013 New Revision: 249138 URL: http://svnweb.freebsd.org/changeset/base/249138 Log: Tag unbound 1.4.20 Added: vendor/unbound/1.4.20/ - copied from r249137, vendor/unbound/dist/ From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:09:11 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DE5A01DF for ; Fri, 5 Apr 2013 09:09:11 +0000 (UTC) (envelope-from njm@njm.me.uk) Received: from smtp004.apm-internet.net (smtp004.apm-internet.net [85.119.248.54]) by mx1.freebsd.org (Postfix) with ESMTP id 45AFBA0F for ; Fri, 5 Apr 2013 09:09:11 +0000 (UTC) Received: (qmail 14327 invoked from network); 5 Apr 2013 09:02:30 -0000 Received: from unknown (HELO meld.njm.me.uk) (86.178.166.213) by smtp004.apm-internet.net with SMTP; 5 Apr 2013 09:02:30 -0000 Received: from titania.njm.me.uk (titania.njm.me.uk [192.168.144.130]) by meld.njm.me.uk (8.14.6/8.14.6) with ESMTP id r3592TjZ045640; Fri, 5 Apr 2013 10:02:29 +0100 (BST) (envelope-from njm@njm.me.uk) Received: from titania.njm.me.uk (localhost [127.0.0.1]) by titania.njm.me.uk (8.14.6/8.14.6) with ESMTP id r3592Tb6084450; Fri, 5 Apr 2013 10:02:29 +0100 (BST) (envelope-from njm@njm.me.uk) Received: (from njm@localhost) by titania.njm.me.uk (8.14.6/8.14.6/Submit) id r3592TC7084449; Fri, 5 Apr 2013 10:02:29 +0100 (BST) (envelope-from njm@njm.me.uk) Date: Fri, 5 Apr 2013 10:02:29 +0100 From: "N.J. Mann" To: Alexander Motin Subject: Re: svn commit: r249095 - in head/etc: defaults periodic/daily Message-ID: <20130405090229.GA79400@titania.njm.me.uk> Mail-Followup-To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201304041503.r34F3C5l094458@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201304041503.r34F3C5l094458@svn.freebsd.org> X-Operating-System: FreeBSD 8.3-STABLE User-Agent: mutt-NJM (2010-10-31) 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, 05 Apr 2013 09:09:11 -0000 In message <201304041503.r34F3C5l094458@svn.freebsd.org>, Alexander Motin (mav@FreeBSD.org) wrote: > Author: mav > Date: Thu Apr 4 15:03:12 2013 > New Revision: 249095 > URL: http://svnweb.freebsd.org/changeset/base/249095 > > Log: > Remove periodic script for ataraid(4) and add instead script for graid(8). > > Added: > head/etc/periodic/daily/401.status-graid (contents, props changed) As graid is in 9.x will you be MFCing this addition? Cheers, Nick. -- From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:14:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7A04138B; Fri, 5 Apr 2013 09:14:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6C870A34; Fri, 5 Apr 2013 09:14:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r359EVPR017443; Fri, 5 Apr 2013 09:14:31 GMT (envelope-from avg@svn.freebsd.org) Received: (from avg@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r359EVgO017442; Fri, 5 Apr 2013 09:14:31 GMT (envelope-from avg@svn.freebsd.org) Message-Id: <201304050914.r359EVgO017442@svn.freebsd.org> From: Andriy Gapon Date: Fri, 5 Apr 2013 09:14:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249139 - head/sys/boot/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: Fri, 05 Apr 2013 09:14:31 -0000 Author: avg Date: Fri Apr 5 09:14:30 2013 New Revision: 249139 URL: http://svnweb.freebsd.org/changeset/base/249139 Log: strncmp for boot code: fix an off by one error Before this change strncmp would access and _compare_ n+1 characters in the case where the first n characters match. MFC after: 5 days Modified: head/sys/boot/common/util.c Modified: head/sys/boot/common/util.c ============================================================================== --- head/sys/boot/common/util.c Fri Apr 5 09:06:59 2013 (r249138) +++ head/sys/boot/common/util.c Fri Apr 5 09:14:30 2013 (r249139) @@ -68,9 +68,9 @@ int strncmp(const char *s1, const char *s2, size_t len) { - for (; *s1 == *s2 && *s1 != '\0' && len > 0; len--, s1++, s2++) + for (; len > 0 && *s1 == *s2 && *s1 != '\0'; len--, s1++, s2++) ; - return ((unsigned char)*s1 - (unsigned char)*s2); + return (len == 0 ? 0 : (unsigned char)*s1 - (unsigned char)*s2); } void From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:17:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4F8F9521; Fri, 5 Apr 2013 09:17:27 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ea0-x231.google.com (mail-ea0-x231.google.com [IPv6:2a00:1450:4013:c01::231]) by mx1.freebsd.org (Postfix) with ESMTP id 8B6BCA4C; Fri, 5 Apr 2013 09:17:26 +0000 (UTC) Received: by mail-ea0-f177.google.com with SMTP id q14so1261567eaj.8 for ; Fri, 05 Apr 2013 02:17:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Ss9joAw+FFyhFzjA/d+GqkqrWLpVHRrWkI1juQ1F2PA=; b=dCvmQvyAAPy7ISl7fx4ArsqlToYzCtEY1D5EFt5ULpSxn3IkA+sFsCZXFylrK1Hb/G 7XrC+eAw2yZ71l/Rw/jU4z4Lv4aaOx2J7gP89gOLV1MnvhIGzH+2HYXU/m//gQsYAdHB V0fNuIXCTEqp1U/RndJTeBZNHSe7Krn0e1rva/CnPpGUElXv7/+SDA5BvaDPpAJ3upkf tnPEhg01M2Ds0A419AOmT8qhp1AQPK5TUod/3p7bW39xjlfWiYU+BCftm6u+7DHbokmF 1ddaPxfa87oVcWP2zBfdJZPOj1A67yIIE1yZ9U6vCrhV4RKyUiFrXHP6TCZJ6Jqgjlqm FHGQ== X-Received: by 10.15.35.193 with SMTP id g41mr17891634eev.45.1365153445620; Fri, 05 Apr 2013 02:17:25 -0700 (PDT) Received: from mavbook.mavhome.dp.ua (mavhome.mavhome.dp.ua. [213.227.240.37]) by mx.google.com with ESMTPS id a1sm14351410eep.2.2013.04.05.02.17.23 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 05 Apr 2013 02:17:24 -0700 (PDT) Sender: Alexander Motin Message-ID: <515E96A0.7010700@FreeBSD.org> Date: Fri, 05 Apr 2013 12:17:20 +0300 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/20130326 Thunderbird/17.0.4 MIME-Version: 1.0 To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r249095 - in head/etc: defaults periodic/daily References: <201304041503.r34F3C5l094458@svn.freebsd.org> <20130405090229.GA79400@titania.njm.me.uk> In-Reply-To: <20130405090229.GA79400@titania.njm.me.uk> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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, 05 Apr 2013 09:17:27 -0000 On 05.04.2013 12:02, N.J. Mann wrote: > In message <201304041503.r34F3C5l094458@svn.freebsd.org>, > Alexander Motin (mav@FreeBSD.org) wrote: >> Author: mav >> Date: Thu Apr 4 15:03:12 2013 >> New Revision: 249095 >> URL: http://svnweb.freebsd.org/changeset/base/249095 >> >> Log: >> Remove periodic script for ataraid(4) and add instead script for graid(8). >> >> Added: >> head/etc/periodic/daily/401.status-graid (contents, props changed) > > As graid is in 9.x will you be MFCing this addition? Sure. I just didn't know/remember about these scripts till this time. -- Alexander Motin From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:43:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2A74BB2C; Fri, 5 Apr 2013 09:43:21 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1A10EB17; Fri, 5 Apr 2013 09:43:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r359hKK2026161; Fri, 5 Apr 2013 09:43:20 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r359hKCL026158; Fri, 5 Apr 2013 09:43:20 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304050943.r359hKCL026158@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 5 Apr 2013 09:43:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249140 - in head/contrib/unbound: . compat daemon doc iterator libunbound services smallapp util validator 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, 05 Apr 2013 09:43:21 -0000 Author: des Date: Fri Apr 5 09:43:20 2013 New Revision: 249140 URL: http://svnweb.freebsd.org/changeset/base/249140 Log: Minimal subset of the unbound sources. Added: head/contrib/unbound/LICENSE - copied unchanged from r238106, vendor/unbound/dist/LICENSE head/contrib/unbound/Makefile.in - copied unchanged from r238106, vendor/unbound/dist/Makefile.in head/contrib/unbound/README - copied unchanged from r238106, vendor/unbound/dist/README head/contrib/unbound/ac_pkg_swig.m4 - copied unchanged from r238106, vendor/unbound/dist/ac_pkg_swig.m4 head/contrib/unbound/aclocal.m4 - copied unchanged from r238106, vendor/unbound/dist/aclocal.m4 head/contrib/unbound/acx_nlnetlabs.m4 - copied unchanged from r238106, vendor/unbound/dist/acx_nlnetlabs.m4 head/contrib/unbound/acx_pthread.m4 - copied unchanged from r238106, vendor/unbound/dist/acx_pthread.m4 head/contrib/unbound/acx_python.m4 - copied unchanged from r238106, vendor/unbound/dist/acx_python.m4 head/contrib/unbound/compat/ - copied from r238106, vendor/unbound/dist/compat/ head/contrib/unbound/config.guess - copied unchanged from r238106, vendor/unbound/dist/config.guess head/contrib/unbound/config.h.in - copied unchanged from r238106, vendor/unbound/dist/config.h.in head/contrib/unbound/config.sub - copied unchanged from r238106, vendor/unbound/dist/config.sub head/contrib/unbound/configure - copied unchanged from r238106, vendor/unbound/dist/configure head/contrib/unbound/configure.ac - copied unchanged from r238106, vendor/unbound/dist/configure.ac head/contrib/unbound/daemon/ - copied from r238106, vendor/unbound/dist/daemon/ head/contrib/unbound/doc/ - copied from r238106, vendor/unbound/dist/doc/ head/contrib/unbound/install-sh - copied unchanged from r238106, vendor/unbound/dist/install-sh head/contrib/unbound/iterator/ - copied from r238106, vendor/unbound/dist/iterator/ head/contrib/unbound/libunbound/ - copied from r238106, vendor/unbound/dist/libunbound/ head/contrib/unbound/ltmain.sh - copied unchanged from r238106, vendor/unbound/dist/ltmain.sh head/contrib/unbound/services/ - copied from r238106, vendor/unbound/dist/services/ head/contrib/unbound/smallapp/ - copied from r238106, vendor/unbound/dist/smallapp/ head/contrib/unbound/util/ - copied from r238106, vendor/unbound/dist/util/ head/contrib/unbound/validator/ - copied from r238106, vendor/unbound/dist/validator/ Directory Properties: head/contrib/unbound/ (props changed) Copied: head/contrib/unbound/LICENSE (from r238106, vendor/unbound/dist/LICENSE) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/LICENSE Fri Apr 5 09:43:20 2013 (r249140, copy of r238106, vendor/unbound/dist/LICENSE) @@ -0,0 +1,30 @@ +Copyright (c) 2007, NLnet Labs. All rights reserved. + +This software is open source. + +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 the NLNET LABS 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 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. Copied: head/contrib/unbound/Makefile.in (from r238106, vendor/unbound/dist/Makefile.in) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/unbound/Makefile.in Fri Apr 5 09:43:20 2013 (r249140, copy of r238106, vendor/unbound/dist/Makefile.in) @@ -0,0 +1,1193 @@ +# Copyright 2007 NLnet Labs +# See the file LICENSE for the license + +SHELL=@SHELL@ +VERSION=@PACKAGE_VERSION@ +srcdir=@srcdir@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +bindir=@bindir@ +sbindir=@sbindir@ +mandir=@mandir@ +libdir=@libdir@ +# datarootdir is here to please some checkers, use datadir. +datarootdir=@datarootdir@ +datadir=@datadir@ +includedir=@includedir@ +doxygen=@doxygen@ +libtool=@libtool@ +ldnsdir=@ldnsdir@ +staticexe=@staticexe@ +EXEEXT=@EXEEXT@ +configfile=@ub_conf_file@ +UNBOUND_RUN_DIR=@UNBOUND_RUN_DIR@ +CHECKLOCK_SRC=testcode/checklocks.c +CHECKLOCK_OBJ=@CHECKLOCK_OBJ@ +WITH_PYTHONMODULE=@WITH_PYTHONMODULE@ +WITH_PYUNBOUND=@WITH_PYUNBOUND@ +PYTHON_SITE_PKG=@PYTHON_SITE_PKG@ +PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@ +PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ +PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@ +PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@ + +# _unbound.la if pyunbound enabled. +PYUNBOUND_TARGET=@PYUNBOUND_TARGET@ + +# override $U variable which is used by autotools for deansification (for +# K&R C compilers), but causes problems if $U is defined in the env). +U= + +SWIG=@SWIG@ +YACC=@YACC@ +LEX=@LEX@ +STRIP=@STRIP@ +CC=@CC@ +CPPFLAGS=-I. @CPPFLAGS@ +CFLAGS=@CFLAGS@ +LDFLAGS=@LDFLAGS@ +LIBS=@LIBS@ +LIBOBJS=@LIBOBJS@ +# filter out ctime_r from compat obj. +LIBOBJ_WITHOUT_CTIME=@LIBOBJ_WITHOUT_CTIME@ +RUNTIME_PATH=@RUNTIME_PATH@ +DEPFLAG=@DEPFLAG@ +DATE=@CONFIG_DATE@ +LIBTOOL=$(libtool) +BUILD=build/ +UBSYMS=@UBSYMS@ +EXTRALINK=@EXTRALINK@ + +WINDRES=@WINDRES@ +LINT=splint +LINTFLAGS=+quiet -weak -warnposix -unrecog -Din_addr_t=uint32_t -Du_int=unsigned -Du_char=uint8_t -preproc -Drlimit=rlimit64 -D__gnuc_va_list=va_list +#-Dglob64=glob -Dglobfree64=globfree +# compat with openssl linux edition. +LINTFLAGS+="-DBN_ULONG=unsigned long" -Dkrb5_int32=int "-Dkrb5_ui_4=unsigned int" -DPQ_64BIT=uint64_t -DRC4_INT=unsigned -fixedformalarray -D"ENGINE=unsigned" -D"RSA=unsigned" -D"DSA=unsigned" -D"EVP_PKEY=unsigned" -D"EVP_MD=unsigned" -D"SSL=unsigned" -D"SSL_CTX=unsigned" -D"X509=unsigned" -D"RC4_KEY=unsigned" -D"EVP_MD_CTX=unsigned" -D"ECDSA_SIG=DSA_SIG" +# compat with NetBSD +LINTFLAGS+=@NETBSD_LINTFLAGS@ +# compat with OpenBSD +LINTFLAGS+="-Dsigset_t=long" +# FreeBSD8 +LINTFLAGS+="-D__uint16_t=uint16_t" + +INSTALL=$(srcdir)/install-sh + +#pythonmod.c is not here, it is mentioned by itself in its own rules, +#makedepend fails on missing interface.h otherwise. +PYTHONMOD_SRC=pythonmod/pythonmod_utils.c +# pythonmod.lo pythonmod_utils.lo if python mod enabled. +PYTHONMOD_OBJ=@PYTHONMOD_OBJ@ +PYTHONMOD_HEADER=@PYTHONMOD_HEADER@ +# libunbound/python/libunbound_wrap.c is dealt with by its own rules. +PYUNBOUND_SRC= +# libunbound_wrap.lo if python libunbound wrapper enabled. +PYUNBOUND_OBJ=@PYUNBOUND_OBJ@ +COMMON_SRC=services/cache/dns.c services/cache/infra.c services/cache/rrset.c \ +util/data/dname.c util/data/msgencode.c util/data/msgparse.c \ +util/data/msgreply.c util/data/packed_rrset.c iterator/iterator.c \ +iterator/iter_delegpt.c iterator/iter_donotq.c iterator/iter_fwd.c \ +iterator/iter_hints.c iterator/iter_priv.c iterator/iter_resptype.c \ +iterator/iter_scrub.c iterator/iter_utils.c services/listen_dnsport.c \ +services/localzone.c services/mesh.c services/modstack.c \ +services/outbound_list.c services/outside_network.c util/alloc.c \ +util/config_file.c util/configlexer.c util/configparser.c \ +util/fptr_wlist.c util/locks.c util/log.c util/mini_event.c util/module.c \ +util/netevent.c util/net_help.c util/random.c util/rbtree.c util/regional.c \ +util/rtt.c util/storage/dnstree.c util/storage/lookup3.c \ +util/storage/lruhash.c util/storage/slabhash.c util/timehist.c util/tube.c \ +util/winsock_event.c validator/autotrust.c validator/val_anchor.c \ +validator/validator.c validator/val_kcache.c validator/val_kentry.c \ +validator/val_neg.c validator/val_nsec3.c validator/val_nsec.c \ +validator/val_sigcrypt.c validator/val_utils.c $(CHECKLOCK_SRC) +COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ +msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ +iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ +iter_scrub.lo iter_utils.lo localzone.lo mesh.lo modstack.lo \ +outbound_list.lo alloc.lo config_file.lo configlexer.lo configparser.lo \ +fptr_wlist.lo locks.lo log.lo mini_event.lo module.lo net_help.lo \ +random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ +slabhash.lo timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo \ +validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ +val_sigcrypt.lo val_utils.lo $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) +COMMON_OBJ=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ +outside_network.lo +# set to $COMMON_OBJ or to "" if --enableallsymbols +COMMON_OBJ_ALL_SYMBOLS=@COMMON_OBJ_ALL_SYMBOLS@ +COMPAT_SRC=compat/ctime_r.c compat/fake-rfc2553.c compat/gmtime_r.c \ +compat/inet_aton.c compat/inet_ntop.c compat/inet_pton.c compat/malloc.c \ +compat/memcmp.c compat/memmove.c compat/snprintf.c compat/strlcpy.c \ +compat/strptime.c +COMPAT_OBJ=$(LIBOBJS:.o=.lo) +COMPAT_OBJ_WITHOUT_CTIME=$(LIBOBJ_WITHOUT_CTIME:.o=.lo) +UNITTEST_SRC=testcode/unitanchor.c testcode/unitdname.c \ +testcode/unitlruhash.c testcode/unitmain.c testcode/unitmsgparse.c \ +testcode/unitneg.c testcode/unitregional.c testcode/unitslabhash.c \ +testcode/unitverify.c testcode/readhex.c testcode/ldns-testpkts.c +UNITTEST_OBJ=unitanchor.lo unitdname.lo unitlruhash.lo unitmain.lo \ +unitmsgparse.lo unitneg.lo unitregional.lo unitslabhash.lo unitverify.lo \ +readhex.lo ldns-testpkts.lo +UNITTEST_OBJ_LINK=$(UNITTEST_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +DAEMON_SRC=daemon/acl_list.c daemon/cachedump.c daemon/daemon.c \ +daemon/remote.c daemon/stats.c daemon/unbound.c daemon/worker.c @WIN_DAEMON_SRC@ +DAEMON_OBJ=acl_list.lo cachedump.lo daemon.lo remote.lo stats.lo unbound.lo \ +worker.lo @WIN_DAEMON_OBJ@ +DAEMON_OBJ_LINK=$(DAEMON_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) \ +$(COMPAT_OBJ) @WIN_DAEMON_OBJ_LINK@ +CHECKCONF_SRC=smallapp/unbound-checkconf.c smallapp/worker_cb.c +CHECKCONF_OBJ=unbound-checkconf.lo worker_cb.lo +CHECKCONF_OBJ_LINK=$(CHECKCONF_OBJ) $(COMMON_OBJ_ALL_SYMBOLS) \ +$(COMPAT_OBJ) @WIN_CHECKCONF_OBJ_LINK@ +CONTROL_SRC=smallapp/unbound-control.c +CONTROL_OBJ=unbound-control.lo +CONTROL_OBJ_LINK=$(CONTROL_OBJ) worker_cb.lo $(COMMON_OBJ_ALL_SYMBOLS) \ +$(COMPAT_OBJ) @WIN_CONTROL_OBJ_LINK@ +HOST_SRC=smallapp/unbound-host.c +HOST_OBJ=unbound-host.lo +HOST_OBJ_LINK=$(HOST_OBJ) $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_HOST_OBJ_LINK@ +UBANCHOR_SRC=smallapp/unbound-anchor.c +UBANCHOR_OBJ=unbound-anchor.lo +UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \ +$(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@ +TESTBOUND_SRC=testcode/testbound.c testcode/ldns-testpkts.c \ +daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \ +testcode/replay.c testcode/fake_event.c +TESTBOUND_OBJ=testbound.lo replay.lo fake_event.lo +TESTBOUND_OBJ_LINK=$(TESTBOUND_OBJ) ldns-testpkts.lo worker.lo acl_list.lo \ +daemon.lo stats.lo $(COMMON_OBJ_WITHOUT_NETCALL) $(COMPAT_OBJ) +LOCKVERIFY_SRC=testcode/lock_verify.c +LOCKVERIFY_OBJ=lock_verify.lo +LOCKVERIFY_OBJ_LINK=$(LOCKVERIFY_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +PETAL_SRC=testcode/petal.c +PETAL_OBJ=petal.lo +PETAL_OBJ_LINK=$(PETAL_OBJ) $(COMPAT_OBJ_WITHOUT_CTIME) +PKTVIEW_SRC=testcode/pktview.c testcode/readhex.c +PKTVIEW_OBJ=pktview.lo +PKTVIEW_OBJ_LINK=$(PKTVIEW_OBJ) worker_cb.lo readhex.lo $(COMMON_OBJ) \ +$(COMPAT_OBJ) +SIGNIT_SRC=testcode/signit.c +SIGNIT_OBJ=signit.lo +SIGNIT_OBJ_LINK=$(SIGNIT_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +MEMSTATS_SRC=testcode/memstats.c +MEMSTATS_OBJ=memstats.lo +MEMSTATS_OBJ_LINK=$(MEMSTATS_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +ASYNCLOOK_SRC=testcode/asynclook.c +ASYNCLOOK_OBJ=asynclook.lo +ASYNCLOOK_OBJ_LINK=$(ASYNCLOOK_OBJ) log.lo locks.lo $(COMPAT_OBJ) +STREAMTCP_SRC=testcode/streamtcp.c +STREAMTCP_OBJ=streamtcp.lo +STREAMTCP_OBJ_LINK=$(STREAMTCP_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +PERF_SRC=testcode/perf.c +PERF_OBJ=perf.lo +PERF_OBJ_LINK=$(PERF_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +DELAYER_SRC=testcode/delayer.c +DELAYER_OBJ=delayer.lo +DELAYER_OBJ_LINK=$(DELAYER_OBJ) worker_cb.lo $(COMMON_OBJ) $(COMPAT_OBJ) +HARVEST_SRC=testcode/harvest.c +HARVEST_OBJ=harvest.lo +HARVEST_OBJ_LINK=$(HARVEST_OBJ) $(COMPAT_OBJ_WITHOUT_CTIME) +LIBUNBOUND_SRC=libunbound/context.c libunbound/libunbound.c \ +libunbound/libworker.c +LIBUNBOUND_OBJ=context.lo libunbound.lo libworker.lo +LIBUNBOUND_OBJ_LINK=$(LIBUNBOUND_OBJ) $(COMMON_OBJ) $(COMPAT_OBJ) + +# win apps or "" if not on windows +WINAPPS=@WINAPPS@ +WIN_DAEMON_THE_SRC=winrc/win_svc.c winrc/w_inst.c +SVCINST_SRC=winrc/unbound-service-install.c +SVCINST_OBJ=unbound-service-install.lo +SVCINST_OBJ_LINK=$(SVCINST_OBJ) w_inst.lo rsrc_svcinst.o $(COMPAT_OBJ_WITHOUT_CTIME) +SVCUNINST_SRC=winrc/unbound-service-remove.c +SVCUNINST_OBJ=unbound-service-remove.lo +SVCUNINST_OBJ_LINK=$(SVCUNINST_OBJ) w_inst.lo rsrc_svcuninst.o \ +$(COMPAT_OBJ_WITHOUT_CTIME) +ANCHORUPD_SRC=winrc/anchor-update.c +ANCHORUPD_OBJ=anchor-update.lo +ANCHORUPD_OBJ_LINK=$(ANCHORUPD_OBJ) rsrc_anchorupd.o $(COMPAT_OBJ_WITHOUT_CTIME) +RSRC_OBJ=rsrc_svcinst.o rsrc_svcuninst.o rsrc_anchorupd.o rsrc_unbound.o \ + rsrc_unbound_host.o rsrc_unbound_anchor.o rsrc_unbound_control.o \ + rsrc_unbound_checkconf.o + +ALL_SRC=$(COMMON_SRC) $(UNITTEST_SRC) $(DAEMON_SRC) \ + $(TESTBOUND_SRC) $(LOCKVERIFY_SRC) $(PKTVIEW_SRC) $(SIGNIT_SRC) \ + $(MEMSTATS_SRC) $(CHECKCONF_SRC) $(LIBUNBOUND_SRC) $(HOST_SRC) \ + $(ASYNCLOOK_SRC) $(STREAMTCP_SRC) $(PERF_SRC) $(DELAYER_SRC) \ + $(HARVEST_SRC) $(CONTROL_SRC) $(UBANCHOR_SRC) $(PETAL_SRC) \ + $(PYTHONMOD_SRC) $(PYUNBOUND_SRC) $(WIN_DAEMON_THE_SRC)\ + $(SVCINST_SRC) $(SVCUNINST_SRC) $(ANCHORUPD_SRC) +ALL_OBJ=$(COMMON_OBJ) $(UNITTEST_OBJ) $(DAEMON_OBJ) \ + $(TESTBOUND_OBJ) $(LOCKVERIFY_OBJ) $(PKTVIEW_OBJ) $(SIGNIT_OBJ) \ + $(MEMSTATS_OBJ) $(CHECKCONF_OBJ) $(LIBUNBOUND_OBJ) $(HOST_OBJ) \ + $(ASYNCLOOK_OBJ) $(STREAMTCP_OBJ) $(PERF_OBJ) $(DELAYER_OBJ) \ + $(HARVEST_OBJ) $(CONTROL_OBJ) $(UBANCHOR_OBJ) $(PETAL_OBJ) \ + $(COMPAT_OBJ) $(PYUNBOUND_OBJ) \ + $(SVCINST_OBJ) $(SVCUNINST_OBJ) $(ANCHORUPD_OBJ) + +COMPILE=$(LIBTOOL) --tag=CC --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) +LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(staticexe) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) +LINK_LIB=$(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(staticexe) -version-info @LIBUNBOUND_CURRENT@:@LIBUNBOUND_REVISION@:@LIBUNBOUND_AGE@ -no-undefined + +.PHONY: clean realclean doc lint all install uninstall tests test strip lib longtest longcheck check + +all: $(COMMON_OBJ) unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET) + +# compat with BSD make, register suffix, and an implicit rule to actualise it. +.SUFFIXES: .lo +.c.lo: + $(COMPILE) -o $@ -c $< + +$(ALL_OBJ): + @@SOURCEDETERMINE@ + $(COMPILE) -o $@ -c @SOURCEFILE@ + +$(RSRC_OBJ): + @@SOURCEDETERMINE@ + $(WINDRES) $(CPPFLAGS) @SOURCEFILE@ $@ + +rsrc_svcinst.o: $(srcdir)/winrc/rsrc_svcinst.rc config.h +rsrc_svcuninst.o: $(srcdir)/winrc/rsrc_svcuninst.rc config.h +rsrc_anchorupd.o: $(srcdir)/winrc/rsrc_anchorupd.rc config.h +rsrc_unbound.o: $(srcdir)/winrc/rsrc_unbound.rc config.h +rsrc_unbound_host.o: $(srcdir)/winrc/rsrc_unbound_host.rc config.h +rsrc_unbound_anchor.o: $(srcdir)/winrc/rsrc_unbound_anchor.rc config.h +rsrc_unbound_control.o: $(srcdir)/winrc/rsrc_unbound_control.rc config.h +rsrc_unbound_checkconf.o: $(srcdir)/winrc/rsrc_unbound_checkconf.rc config.h + +TEST_BIN=asynclook$(EXEEXT) delayer$(EXEEXT) harvest$(EXEEXT) \ + lock-verify$(EXEEXT) memstats$(EXEEXT) perf$(EXEEXT) \ + petal$(EXEEXT) pktview$(EXEEXT) signit$(EXEEXT) streamtcp$(EXEEXT) \ + testbound$(EXEEXT) unittest$(EXEEXT) +tests: all $(TEST_BIN) + +check: test +longcheck: longtest + +test: unittest$(EXEEXT) testbound$(EXEEXT) + ./unittest$(EXEEXT) + ./testbound$(EXEEXT) -s + for x in testdata/*.rpl; do echo -n "$$x "; if ./testbound$(EXEEXT) -p $$x >/dev/null 2>&1; then echo OK; else echo failed; exit 1; fi done + @echo test OK + +longtest: tests + if test -x "`which bash`"; then bash testcode/do-tests.sh; else sh testcode/do-tests.sh; fi + +lib: libunbound.la + +libunbound.la: $(LIBUNBOUND_OBJ_LINK) + $(LINK_LIB) $(UBSYMS) -o $@ $(LIBUNBOUND_OBJ_LINK) -rpath $(libdir) -lssl $(LIBS) + +unbound$(EXEEXT): $(DAEMON_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(DAEMON_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) + +unbound-checkconf$(EXEEXT): $(CHECKCONF_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(CHECKCONF_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) + +unbound-control$(EXEEXT): $(CONTROL_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(CONTROL_OBJ_LINK) $(EXTRALINK) -lssl $(LIBS) + +unbound-host$(EXEEXT): $(HOST_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(HOST_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) + +unbound-anchor$(EXEEXT): $(UBANCHOR_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(UBANCHOR_OBJ_LINK) -L. -L.libs -lunbound -lexpat -lssl $(LIBS) + +unbound-service-install$(EXEEXT): $(SVCINST_OBJ_LINK) + $(LINK) -o $@ $(SVCINST_OBJ_LINK) $(LIBS) + +unbound-service-remove$(EXEEXT): $(SVCUNINST_OBJ_LINK) + $(LINK) -o $@ $(SVCUNINST_OBJ_LINK) $(LIBS) + +anchor-update$(EXEEXT): $(ANCHORUPD_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(ANCHORUPD_OBJ_LINK) -L. -L.libs -lunbound $(LIBS) + +unittest$(EXEEXT): $(UNITTEST_OBJ_LINK) + $(LINK) -o $@ $(UNITTEST_OBJ_LINK) -lssl $(LIBS) + +testbound$(EXEEXT): $(TESTBOUND_OBJ_LINK) + $(LINK) -o $@ $(TESTBOUND_OBJ_LINK) -lssl $(LIBS) + +lock-verify$(EXEEXT): $(LOCKVERIFY_OBJ_LINK) + $(LINK) -o $@ $(LOCKVERIFY_OBJ_LINK) -lssl $(LIBS) + +petal$(EXEEXT): $(PETAL_OBJ_LINK) + $(LINK) -o $@ $(PETAL_OBJ_LINK) -lssl $(LIBS) + +pktview$(EXEEXT): $(PKTVIEW_OBJ_LINK) + $(LINK) -o $@ $(PKTVIEW_OBJ_LINK) -lssl $(LIBS) + +signit$(EXEEXT): $(SIGNIT_OBJ_LINK) + $(LINK) -o $@ $(SIGNIT_OBJ_LINK) -lssl $(LIBS) + +memstats$(EXEEXT): $(MEMSTATS_OBJ_LINK) + $(LINK) -o $@ $(MEMSTATS_OBJ_LINK) -lssl $(LIBS) + +asynclook$(EXEEXT): $(ASYNCLOOK_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(ASYNCLOOK_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound + +streamtcp$(EXEEXT): $(STREAMTCP_OBJ_LINK) + $(LINK) -o $@ $(STREAMTCP_OBJ_LINK) -lssl $(LIBS) + +perf$(EXEEXT): $(PERF_OBJ_LINK) + $(LINK) -o $@ $(PERF_OBJ_LINK) -lssl $(LIBS) + +delayer$(EXEEXT): $(DELAYER_OBJ_LINK) + $(LINK) -o $@ $(DELAYER_OBJ_LINK) -lssl $(LIBS) + +harvest$(EXEEXT): $(HARVEST_OBJ_LINK) libunbound.la + $(LINK) -o $@ $(HARVEST_OBJ_LINK) $(LIBS) -L. -L.libs -lunbound + +unbound-control-setup: $(srcdir)/smallapp/unbound-control-setup.sh + sed -e 's:^DESTDIR=.*$$:DESTDIR=$(UNBOUND_RUN_DIR):' < $(srcdir)/smallapp/unbound-control-setup.sh > $@ + -chmod +x $@ + +#testcode/ldns-testpkts.c: $(ldnsdir)/examples/ldns-testpkts.c \ +# $(ldnsdir)/examples/ldns-testpkts.h +# cp $(ldnsdir)/examples/ldns-testpkts.c testcode/ldns-testpkts.c +# cp $(ldnsdir)/examples/ldns-testpkts.h testcode/ldns-testpkts.h + +# Python Module +pythonmod.lo pythonmod.o: $(srcdir)/pythonmod/pythonmod.c config.h \ + pythonmod/interface.h \ + $(srcdir)/pythonmod/pythonmod.h $(srcdir)/util/module.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/config_file.h \ + $(srcdir)/pythonmod/pythonmod_utils.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h + +pythonmod/interface.h: $(srcdir)/pythonmod/interface.i $(srcdir)/config.h + @-if test ! -d pythonmod; then $(INSTALL) -d pythonmod; fi + $(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i + +libunbound_wrap.lo libunbound_wrap.o: libunbound/python/libunbound_wrap.c \ + $(srcdir)/libunbound/unbound.h +libunbound/python/libunbound_wrap.c: $(srcdir)/libunbound/python/libunbound.i $(srcdir)/libunbound/unbound.h + @-if test ! -d libunbound/python; then $(INSTALL) -d libunbound/python; fi + $(SWIG) -python -o $@ $(CPPFLAGS) $(srcdir)/libunbound/python/libunbound.i + +# Pyunbound python unbound wrapper +_unbound.la: libunbound_wrap.lo libunbound.la + $(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -module -version-info @LIBUNBOUND_CURRENT@:@LIBUNBOUND_REVISION@:@LIBUNBOUND_AGE@ -no-undefined -o $@ libunbound_wrap.lo -rpath $(PYTHON_SITE_PKG) L. -L.libs -lunbound $(LIBS) + +util/config_file.c: util/configparser.h +util/configlexer.c: $(srcdir)/util/configlexer.lex util/configparser.h + @-if test ! -d util; then $(INSTALL) -d util; fi + if test "$(LEX)" != ":"; then \ + echo "#include \"config.h\"" > $@ ;\ + echo "#include \"util/configyyrename.h\"" >> $@ ;\ + $(LEX) -t $(srcdir)/util/configlexer.lex >> $@ ;\ + fi + +util/configparser.c util/configparser.h: $(srcdir)/util/configparser.y + @-if test ! -d util; then $(INSTALL) -d util; fi + $(YACC) -d -o util/configparser.c $(srcdir)/util/configparser.y + +clean: + rm -f *.o *.d *.lo *~ tags + rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la + rm -f $(ALL_SRC:.c=.lint) + rm -rf autom4te.cache .libs build doc/html doc/xml + +realclean: clean + rm -f config.status config.log config.h.in config.h + rm -f configure config.sub config.guess ltmain.sh aclocal.m4 libtool + rm -f util/configlexer.c util/configparser.c util/configparser.h + rm -f $(TEST_BIN) + rm -f Makefile + +.SUFFIXES: .lint +.c.lint: + $(LINT) $(LINTFLAGS) -I. -I$(srcdir) -I$(ldnsdir)/include $< + touch $@ + +util/configparser.lint util/configlexer.lint pythonmod/pythonmod.lint libunbound/python/libunbound_wrap.lint: + # skip lint for generated code + touch $@ + +winrc/win_svc.lint winrc/w_inst.lint winrc/unbound-service-install.lint winrc/unbound-service-remove.lint: + # skip lint for windows types + touch $@ + +lint: $(ALL_SRC:.c=.lint) + +tags: $(srcdir)/*.[ch] $(srcdir)/*/*.[ch] + ctags -f $(srcdir)/tags $(srcdir)/*.[ch] $(srcdir)/*/*.[ch] + +doc: + if test -n "$(doxygen)"; then \ + $(doxygen) $(srcdir)/doc/unbound.doxygen; fi + if test "$(WITH_PYUNBOUND)" = "yes" -o "$(WITH_PYTHONMODULE)" = "yes"; \ + then if test -x "`which sphinx-build 2>&1`"; then \ + sphinx-build -b html pythonmod/doc doc/html/pythonmod; \ + sphinx-build -b html libunbound/python/doc doc/html/pyunbound;\ + fi ;\ + fi + +strip: + $(STRIP) unbound$(EXEEXT) + $(STRIP) unbound-checkconf$(EXEEXT) + $(STRIP) unbound-control$(EXEEXT) + $(STRIP) unbound-host$(EXEEXT) + $(STRIP) unbound-anchor$(EXEEXT) + +pythonmod-install: + $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) + $(INSTALL) -c -m 644 pythonmod/unboundmodule.py $(DESTDIR)$(PYTHON_SITE_PKG)/unboundmodule.py + +pyunbound-install: + $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) + $(INSTALL) -c -m 644 libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(LIBTOOL) --mode=install cp _unbound.la $(DESTDIR)$(PYTHON_SITE_PKG) + $(LIBTOOL) --mode=finish $(DESTDIR)$(PYTHON_SITE_PKG) + +install: all $(PYTHONMOD_INSTALL) $(PYUNBOUND_INSTALL) + $(INSTALL) -m 755 -d $(DESTDIR)$(sbindir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man8 + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man5 + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man3 + $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 + $(INSTALL) -m 755 -d $(DESTDIR)$(libdir) + $(INSTALL) -m 755 -d $(DESTDIR)$(includedir) + $(LIBTOOL) --mode=install cp unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) + $(LIBTOOL) --mode=install cp unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) + $(INSTALL) -c -m 644 doc/unbound.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound-checkconf.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound-control.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound-anchor.8 $(DESTDIR)$(mandir)/man8 + $(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5 + $(INSTALL) -c -m 644 $(srcdir)/doc/unbound-host.1 $(DESTDIR)$(mandir)/man1 + $(INSTALL) -c -m 644 doc/libunbound.3 $(DESTDIR)$(mandir)/man3 + $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup + if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi + $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h + $(LIBTOOL) --mode=install cp libunbound.la $(DESTDIR)$(libdir) + $(LIBTOOL) --mode=finish $(DESTDIR)$(libdir) + +pythonmod-uninstall: + rm -f -- $(DESTDIR)$(PYTHON_SITE_PKG)/unboundmodule.py + +pyunbound-uninstall: + rm -f -- $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(PYTHON_SITE_PKG)/_unbound.la + +uninstall: $(PYTHONMOD_UNINSTALL) $(PYUNBOUND_UNINSTALL) + rm -f -- $(DESTDIR)$(sbindir)/unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control-setup + rm -f -- $(DESTDIR)$(mandir)/man8/unbound.8 $(DESTDIR)$(mandir)/man8/unbound-checkconf.8 $(DESTDIR)$(mandir)/man5/unbound.conf.5 $(DESTDIR)$(mandir)/man8/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-anchor.8 + rm -f -- $(DESTDIR)$(mandir)/man1/unbound-host.1 $(DESTDIR)$(mandir)/man3/libunbound.3 + rm -f -- $(DESTDIR)$(includedir)/unbound.h + $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libunbound.la + @echo + @echo "You still need to remove "`dirname $(DESTDIR)$(configfile)`" , $(DESTDIR)$(configfile) by hand" + +iana_update: + curl -o port-numbers.tmp http://www.iana.org/assignments/service-names-port-numbers/service-names-port-numbers.xml --compressed + if file port-numbers.tmp | grep 'gzip' >/dev/null; then zcat port-numbers.tmp; else cat port-numbers.tmp; fi | awk '// {p=0;} /udp/ {p=1;} /[^u]/ {p=0;} /Decomissioned|Decommissioned|Removed|De-registered|unassigned|Unassigned|Reserved/ {u=1;} // { if(u==1) {u=0;} else { if(p==1) { match($$0,/[0-9]+/); print substr($$0, RSTART, RLENGTH) ","}}}' | sort -nu > util/iana_ports.inc + rm -f port-numbers.tmp + +# dependency generation +DEPEND_TMP=depend1073.tmp +DEPEND_TMP2=depend1074.tmp +DEPEND_TARGET=Makefile +DEPEND_TARGET2=Makefile.in +# actions: generate deplines from gcc, +# then, filter out home/xx, /usr/xx and /opt/xx lines (some cc already do this) +# then, remove empty " \" lines +# then, add srcdir before .c and .h in deps. +# then, remove srcdir from the (generated) parser and lexer. +# and mention the .lo +depend: + (cd $(srcdir) ; $(CC) $(DEPFLAG) $(CPPFLAGS) $(CFLAGS) $(ALL_SRC) $(COMPAT_SRC)) | \ + sed -e 's!'$$HOME'[^ ]* !!g' -e 's!'$$HOME'[^ ]*$$!!g' \ + -e 's!/usr[^ ]* !!g' -e 's!/usr[^ ]*$$!!g' \ + -e 's!/opt[^ ]* !!g' -e 's!/opt[^ ]*$$!!g' | \ + sed -e '/^ \\$$/d' | \ + sed -e 's? *\([^ ]*\.[ch]\)? $$(srcdir)/\1?g' | \ + sed -e 's? *\([^ ]*\.inc\)? $$(srcdir)/\1?g' | \ + sed -e 's?$$(srcdir)/config.h?config.h?g' \ + -e 's?$$(srcdir)/util/configlexer.c?util/configlexer.c?g' \ + -e 's?$$(srcdir)/util/configparser.c?util/configparser.c?g' \ + -e 's?$$(srcdir)/util/configparser.h?util/configparser.h?g' \ + -e 's?$$(srcdir)/pythonmod/pythonmod.h?$$(PYTHONMOD_HEADER)?g' \ + -e 's!\(.*\)\.o[ :]*!\1.lo \1.o: !g' \ + > $(DEPEND_TMP) + cp $(DEPEND_TARGET) $(DEPEND_TMP2) + head -`egrep -n "# Dependencies" $(DEPEND_TARGET) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET) + cat $(DEPEND_TMP) >> $(DEPEND_TARGET) + @if diff $(DEPEND_TARGET) $(DEPEND_TMP2); then echo " $(DEPEND_TARGET) unchanged"; else echo " Updated $(DEPEND_TARGET))"; fi + @if test -f $(DEPEND_TARGET2); then \ + cp $(DEPEND_TARGET2) $(DEPEND_TMP2); \ + head -`egrep -n "# Dependencies" $(DEPEND_TARGET2) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET2); \ + cat $(DEPEND_TMP) >> $(DEPEND_TARGET2); \ + if diff $(DEPEND_TARGET2) $(DEPEND_TMP2); then echo " $(DEPEND_TARGET2) unchanged"; else echo " Updated $(DEPEND_TARGET2))"; fi; \ + fi + rm -f $(DEPEND_TMP) $(DEPEND_TMP2) + +# Dependencies +dns.lo dns.o: $(srcdir)/services/cache/dns.c config.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/validator/val_nsec.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/config_file.h +infra.lo infra.o: $(srcdir)/services/cache/infra.c config.h \ + $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + +rrset.lo rrset.o: $(srcdir)/services/cache/rrset.c config.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/regional.h $(srcdir)/util/alloc.h +dname.lo dname.o: $(srcdir)/util/data/dname.c config.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lookup3.h +msgencode.lo msgencode.o: $(srcdir)/util/data/msgencode.c config.h \ + $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h +msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h \ + $(srcdir)/util/regional.h +msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h \ + $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/netevent.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/regional.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/data/msgencode.h +packed_rrset.lo packed_rrset.o: $(srcdir)/util/data/packed_rrset.c config.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h +iterator.lo iterator.o: $(srcdir)/iterator/iterator.c config.h \ + $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/iterator/iter_scrub.h $(srcdir)/iterator/iter_priv.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/config_file.h +iter_delegpt.lo iter_delegpt.o: $(srcdir)/iterator/iter_delegpt.c config.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/util/log.h \ + $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/regional.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h +iter_donotq.lo iter_donotq.o: $(srcdir)/iterator/iter_donotq.c config.h $(srcdir)/iterator/iter_donotq.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h +iter_fwd.lo iter_fwd.o: $(srcdir)/iterator/iter_fwd.c config.h \ + $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h +iter_hints.lo iter_hints.o: $(srcdir)/iterator/iter_hints.c config.h \ + $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h +iter_priv.lo iter_priv.o: $(srcdir)/iterator/iter_priv.c config.h \ + $(srcdir)/iterator/iter_priv.h \ + $(srcdir)/util/rbtree.h \ + $(srcdir)/util/regional.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/storage/dnstree.h +iter_resptype.lo iter_resptype.o: $(srcdir)/iterator/iter_resptype.c config.h \ + $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_delegpt.h $(srcdir)/util/log.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h +iter_scrub.lo iter_scrub.o: $(srcdir)/iterator/iter_scrub.c config.h $(srcdir)/iterator/iter_scrub.h \ + $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/iterator/iter_priv.h $(srcdir)/util/rbtree.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h +iter_utils.lo iter_utils.o: $(srcdir)/iterator/iter_utils.c config.h $(srcdir)/iterator/iter_utils.h \ + $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iterator.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_donotq.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/iterator/iter_priv.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h $(srcdir)/validator/val_anchor.h \ + $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h $(srcdir)/validator/val_utils.h +listen_dnsport.lo listen_dnsport.o: $(srcdir)/services/listen_dnsport.c config.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/util/netevent.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/log.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h +localzone.lo localzone.o: $(srcdir)/services/localzone.c config.h \ + $(srcdir)/services/localzone.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/net_help.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h +mesh.lo mesh.o: $(srcdir)/services/mesh.c config.h \ + $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/cache/dns.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/regional.h $(srcdir)/util/data/msgencode.h $(srcdir)/util/timehist.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/tube.h $(srcdir)/util/alloc.h $(srcdir)/util/config_file.h +modstack.lo modstack.o: $(srcdir)/services/modstack.c config.h $(srcdir)/services/modstack.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) +outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ + $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/netevent.h \ + +outside_network.lo outside_network.o: $(srcdir)/services/outside_network.c config.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h \ + $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/infra.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/rtt.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgencode.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/module.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/services/modstack.h \ + +alloc.lo alloc.o: $(srcdir)/util/alloc.c config.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/regional.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +config_file.lo config_file.o: $(srcdir)/util/config_file.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/configyyrename.h $(srcdir)/util/config_file.h util/configparser.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/regional.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/iana_ports.inc +configlexer.lo configlexer.o: util/configlexer.c config.h $(srcdir)/util/configyyrename.h \ + $(srcdir)/util/config_file.h util/configparser.h +configparser.lo configparser.o: util/configparser.c config.h $(srcdir)/util/configyyrename.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/util/log.h \ + +fptr_wlist.lo fptr_wlist.o: $(srcdir)/util/fptr_wlist.c config.h $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h \ + $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ + $(srcdir)/util/rbtree.h $(srcdir)/daemon/worker.h $(srcdir)/util/alloc.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/daemon/remote.h \ + $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \ + $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER) +locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + +log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/locks.h +mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ + $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + +netevent.lo netevent.o: $(srcdir)/util/netevent.c config.h \ + $(srcdir)/util/netevent.h \ + $(srcdir)/util/log.h $(srcdir)/util/net_help.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/modstack.h \ + $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h +net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/log.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/util/regional.h \ + +random.lo random.o: $(srcdir)/util/random.c config.h $(srcdir)/util/random.h $(srcdir)/util/log.h \ + +rbtree.lo rbtree.o: $(srcdir)/util/rbtree.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/regional.h +rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/util/log.h \ + +dnstree.lo dnstree.o: $(srcdir)/util/storage/dnstree.c config.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/net_help.h +lookup3.lo lookup3.o: $(srcdir)/util/storage/lookup3.c config.h $(srcdir)/util/storage/lookup3.h +lruhash.lo lruhash.o: $(srcdir)/util/storage/lruhash.c config.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/fptr_wlist.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/util/tube.h \ + $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +slabhash.lo slabhash.o: $(srcdir)/util/storage/slabhash.c config.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + +timehist.lo timehist.o: $(srcdir)/util/timehist.c config.h $(srcdir)/util/timehist.h $(srcdir)/util/log.h \ + +tube.lo tube.o: $(srcdir)/util/tube.c config.h $(srcdir)/util/tube.h $(srcdir)/util/log.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/fptr_wlist.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/services/mesh.h \ + $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +winsock_event.lo winsock_event.o: $(srcdir)/util/winsock_event.c config.h +autotrust.lo autotrust.o: $(srcdir)/validator/autotrust.c config.h \ + $(srcdir)/validator/autotrust.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_anchor.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/regional.h $(srcdir)/util/random.h $(srcdir)/services/mesh.h \ + $(srcdir)/util/netevent.h $(srcdir)/services/modstack.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kcache.h +val_anchor.lo val_anchor.o: $(srcdir)/validator/val_anchor.c config.h \ + $(srcdir)/validator/val_anchor.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/validator/autotrust.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h +validator.lo validator.o: $(srcdir)/validator/validator.c config.h \ + $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_kcache.h $(srcdir)/util/storage/slabhash.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_neg.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/autotrust.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h \ + $(srcdir)/services/modstack.h +val_kcache.lo val_kcache.o: $(srcdir)/validator/val_kcache.c config.h $(srcdir)/validator/val_kcache.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/data/dname.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h \ + +val_kentry.lo val_kentry.o: $(srcdir)/validator/val_kentry.c config.h \ + $(srcdir)/validator/val_kentry.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h +val_neg.lo val_neg.o: $(srcdir)/validator/val_neg.c config.h \ + $(srcdir)/validator/val_neg.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/validator/val_nsec3.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h +val_nsec3.lo val_nsec3.o: $(srcdir)/validator/val_nsec3.c config.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h \ + $(srcdir)/validator/val_kentry.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ + $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h $(srcdir)/validator/val_nsec.h +val_nsec.lo val_nsec.o: $(srcdir)/validator/val_nsec.c config.h \ + $(srcdir)/validator/val_nsec.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h +val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ + $(srcdir)/validator/val_sigcrypt.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + +val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/validator/validator.h \ + $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h +checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/testcode/checklocks.h +unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h +unitdname.lo unitdname.o: $(srcdir)/testcode/unitdname.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h +unitlruhash.lo unitlruhash.o: $(srcdir)/testcode/unitlruhash.c config.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/storage/slabhash.h +unitmain.lo unitmain.o: $(srcdir)/testcode/unitmain.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/alloc.h $(srcdir)/util/locks.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/rtt.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/random.h +unitmsgparse.lo unitmsgparse.o: $(srcdir)/testcode/unitmsgparse.c config.h \ + $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgencode.h $(srcdir)/util/data/dname.h $(srcdir)/util/alloc.h $(srcdir)/util/regional.h \ + $(srcdir)/util/net_help.h $(srcdir)/testcode/readhex.h +unitneg.lo unitneg.o: $(srcdir)/testcode/unitneg.c config.h $(srcdir)/util/log.h \ + $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ + $(srcdir)/util/data/dname.h \ + $(srcdir)/testcode/unitmain.h $(srcdir)/validator/val_neg.h $(srcdir)/util/rbtree.h +unitregional.lo unitregional.o: $(srcdir)/testcode/unitregional.c config.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/regional.h +unitslabhash.lo unitslabhash.o: $(srcdir)/testcode/unitslabhash.c config.h $(srcdir)/testcode/unitmain.h \ + $(srcdir)/util/log.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h +unitverify.lo unitverify.o: $(srcdir)/testcode/unitverify.c config.h $(srcdir)/util/log.h \ + $(srcdir)/testcode/unitmain.h \ + $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/locks.h \ + $(srcdir)/validator/val_nsec.h \ + $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h \ + $(srcdir)/testcode/ldns-testpkts.h \ + $(srcdir)/util/data/dname.h \ + $(srcdir)/util/regional.h $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h +readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h \ + $(srcdir)/util/log.h +ldns-testpkts.lo ldns-testpkts.o: $(srcdir)/testcode/ldns-testpkts.c config.h \ + $(srcdir)/testcode/ldns-testpkts.h +acl_list.lo acl_list.o: $(srcdir)/daemon/acl_list.c config.h $(srcdir)/daemon/acl_list.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/regional.h $(srcdir)/util/log.h \ + $(srcdir)/util/config_file.h \ + $(srcdir)/util/net_help.h +cachedump.lo cachedump.o: $(srcdir)/daemon/cachedump.c config.h \ + $(srcdir)/daemon/cachedump.h \ + $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ + $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ + $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \ + $(srcdir)/util/storage/dnstree.h +daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ + $(srcdir)/daemon/daemon.h \ + $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/daemon/worker.h \ + $(srcdir)/util/netevent.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/remote.h $(srcdir)/daemon/acl_list.h \ + $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ + $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ + $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h +remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ + $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/data/packed_rrset.h \ + $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h $(srcdir)/util/module.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/daemon/cachedump.h \ + $(srcdir)/util/config_file.h $(srcdir)/util/net_help.h $(srcdir)/services/listen_dnsport.h \ + $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/localzone.h \ + $(srcdir)/util/fptr_wlist.h $(srcdir)/util/tube.h $(srcdir)/util/data/dname.h $(srcdir)/validator/validator.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/validator/val_kcache.h $(srcdir)/validator/val_kentry.h \ + $(srcdir)/validator/val_anchor.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ + $(srcdir)/iterator/iter_fwd.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h \ + $(srcdir)/iterator/iter_delegpt.h $(srcdir)/services/outside_network.h +stats.lo stats.o: $(srcdir)/daemon/stats.c config.h \ + $(srcdir)/daemon/stats.h \ + $(srcdir)/util/timehist.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/module.h \ + $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ + $(srcdir)/services/outside_network.h $(srcdir)/util/config_file.h $(srcdir)/util/tube.h \ *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 09:51:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5949DE02; Fri, 5 Apr 2013 09:51:32 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4970ABD8; Fri, 5 Apr 2013 09:51:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r359pWRe028927; Fri, 5 Apr 2013 09:51:32 GMT (envelope-from des@svn.freebsd.org) Received: (from des@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r359pVlx028924; Fri, 5 Apr 2013 09:51:31 GMT (envelope-from des@svn.freebsd.org) Message-Id: <201304050951.r359pVlx028924@svn.freebsd.org> From: Dag-Erling Smørgrav Date: Fri, 5 Apr 2013 09:51:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249141 - in head/contrib/unbound: . daemon doc iterator libunbound services services/cache smallapp util util/data util/storage validator 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, 05 Apr 2013 09:51:32 -0000 Author: des Date: Fri Apr 5 09:51:31 2013 New Revision: 249141 URL: http://svnweb.freebsd.org/changeset/base/249141 Log: Upgrade to 1.4.20. Added: head/contrib/unbound/validator/val_secalgo.c - copied unchanged from r249136, vendor/unbound/dist/validator/val_secalgo.c head/contrib/unbound/validator/val_secalgo.h - copied unchanged from r249136, vendor/unbound/dist/validator/val_secalgo.h Modified: head/contrib/unbound/Makefile.in head/contrib/unbound/aclocal.m4 head/contrib/unbound/acx_python.m4 head/contrib/unbound/config.guess head/contrib/unbound/config.h.in head/contrib/unbound/config.sub head/contrib/unbound/configure head/contrib/unbound/configure.ac head/contrib/unbound/daemon/cachedump.c head/contrib/unbound/daemon/daemon.c head/contrib/unbound/daemon/remote.c head/contrib/unbound/daemon/remote.h head/contrib/unbound/daemon/unbound.c head/contrib/unbound/daemon/worker.c head/contrib/unbound/doc/Changelog head/contrib/unbound/doc/FEATURES head/contrib/unbound/doc/README head/contrib/unbound/doc/example.conf.in head/contrib/unbound/doc/libunbound.3.in head/contrib/unbound/doc/unbound-anchor.8.in head/contrib/unbound/doc/unbound-checkconf.8.in head/contrib/unbound/doc/unbound-control.8.in head/contrib/unbound/doc/unbound-host.1 head/contrib/unbound/doc/unbound.8.in head/contrib/unbound/doc/unbound.conf.5.in head/contrib/unbound/doc/unbound.doxygen head/contrib/unbound/install-sh head/contrib/unbound/iterator/iter_fwd.c head/contrib/unbound/iterator/iter_hints.c head/contrib/unbound/iterator/iter_utils.c head/contrib/unbound/iterator/iter_utils.h head/contrib/unbound/iterator/iterator.c head/contrib/unbound/libunbound/libworker.c head/contrib/unbound/libunbound/unbound.h head/contrib/unbound/ltmain.sh head/contrib/unbound/services/cache/infra.c head/contrib/unbound/services/listen_dnsport.c head/contrib/unbound/services/localzone.c head/contrib/unbound/services/mesh.c head/contrib/unbound/services/outside_network.c head/contrib/unbound/services/outside_network.h head/contrib/unbound/smallapp/unbound-anchor.c head/contrib/unbound/smallapp/unbound-control.c head/contrib/unbound/smallapp/unbound-host.c head/contrib/unbound/util/alloc.h head/contrib/unbound/util/config_file.c head/contrib/unbound/util/configlexer.c head/contrib/unbound/util/configlexer.lex head/contrib/unbound/util/configparser.c head/contrib/unbound/util/configparser.h head/contrib/unbound/util/data/msgparse.c head/contrib/unbound/util/iana_ports.inc head/contrib/unbound/util/log.c head/contrib/unbound/util/net_help.c head/contrib/unbound/util/net_help.h head/contrib/unbound/util/netevent.c head/contrib/unbound/util/random.c head/contrib/unbound/util/rtt.c head/contrib/unbound/util/storage/lookup3.c head/contrib/unbound/util/tube.c head/contrib/unbound/validator/autotrust.c head/contrib/unbound/validator/val_anchor.c head/contrib/unbound/validator/val_neg.c head/contrib/unbound/validator/val_nsec3.c head/contrib/unbound/validator/val_sigcrypt.c head/contrib/unbound/validator/val_utils.c head/contrib/unbound/validator/validator.c head/contrib/unbound/validator/validator.h Directory Properties: head/contrib/unbound/ (props changed) Modified: head/contrib/unbound/Makefile.in ============================================================================== --- head/contrib/unbound/Makefile.in Fri Apr 5 09:43:20 2013 (r249140) +++ head/contrib/unbound/Makefile.in Fri Apr 5 09:51:31 2013 (r249141) @@ -30,6 +30,7 @@ PYTHONMOD_INSTALL=@PYTHONMOD_INSTALL@ PYTHONMOD_UNINSTALL=@PYTHONMOD_UNINSTALL@ PYUNBOUND_INSTALL=@PYUNBOUND_INSTALL@ PYUNBOUND_UNINSTALL=@PYUNBOUND_UNINSTALL@ +ALLTARGET=@ALLTARGET@ # _unbound.la if pyunbound enabled. PYUNBOUND_TARGET=@PYUNBOUND_TARGET@ @@ -99,7 +100,8 @@ util/storage/lruhash.c util/storage/slab util/winsock_event.c validator/autotrust.c validator/val_anchor.c \ validator/validator.c validator/val_kcache.c validator/val_kentry.c \ validator/val_neg.c validator/val_nsec3.c validator/val_nsec.c \ -validator/val_sigcrypt.c validator/val_utils.c $(CHECKLOCK_SRC) +validator/val_secalgo.c validator/val_sigcrypt.c \ +validator/val_utils.c $(CHECKLOCK_SRC) COMMON_OBJ_WITHOUT_NETCALL=dns.lo infra.lo rrset.lo dname.lo msgencode.lo \ msgparse.lo msgreply.lo packed_rrset.lo iterator.lo iter_delegpt.lo \ iter_donotq.lo iter_fwd.lo iter_hints.lo iter_priv.lo iter_resptype.lo \ @@ -109,7 +111,7 @@ fptr_wlist.lo locks.lo log.lo mini_event random.lo rbtree.lo regional.lo rtt.lo dnstree.lo lookup3.lo lruhash.lo \ slabhash.lo timehist.lo tube.lo winsock_event.lo autotrust.lo val_anchor.lo \ validator.lo val_kcache.lo val_kentry.lo val_neg.lo val_nsec3.lo val_nsec.lo \ -val_sigcrypt.lo val_utils.lo $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) +val_secalgo.lo val_sigcrypt.lo val_utils.lo $(PYTHONMOD_OBJ) $(CHECKLOCK_OBJ) COMMON_OBJ=$(COMMON_OBJ_WITHOUT_NETCALL) netevent.lo listen_dnsport.lo \ outside_network.lo # set to $COMMON_OBJ or to "" if --enableallsymbols @@ -227,9 +229,11 @@ COMPILE=$(LIBTOOL) --tag=CC --mode=compi LINK=$(LIBTOOL) --tag=CC --mode=link $(CC) $(staticexe) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) LINK_LIB=$(LIBTOOL) --tag=CC --mode=link $(CC) $(RUNTIME_PATH) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) $(staticexe) -version-info @LIBUNBOUND_CURRENT@:@LIBUNBOUND_REVISION@:@LIBUNBOUND_AGE@ -no-undefined -.PHONY: clean realclean doc lint all install uninstall tests test strip lib longtest longcheck check +.PHONY: clean realclean doc lint all install uninstall tests test strip lib longtest longcheck check alltargets -all: $(COMMON_OBJ) unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET) +all: $(COMMON_OBJ) $(ALLTARGET) + +alltargets: unbound$(EXEEXT) unbound-checkconf$(EXEEXT) lib unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup $(WINAPPS) $(PYUNBOUND_TARGET) # compat with BSD make, register suffix, and an implicit rule to actualise it. .SUFFIXES: .lo @@ -358,7 +362,7 @@ pythonmod.lo pythonmod.o: $(srcdir)/pyth $(srcdir)/services/cache/dns.h $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h -pythonmod/interface.h: $(srcdir)/pythonmod/interface.i $(srcdir)/config.h +pythonmod/interface.h: $(srcdir)/pythonmod/interface.i config.h @-if test ! -d pythonmod; then $(INSTALL) -d pythonmod; fi $(SWIG) $(CPPFLAGS) -o $@ -python $(srcdir)/pythonmod/interface.i @@ -389,12 +393,14 @@ clean: rm -f *.o *.d *.lo *~ tags rm -f unbound$(EXEEXT) unbound-checkconf$(EXEEXT) unbound-host$(EXEEXT) unbound-control$(EXEEXT) unbound-anchor$(EXEEXT) unbound-control-setup libunbound.la rm -f $(ALL_SRC:.c=.lint) + rm -f _unbound.la libunbound/python/libunbound_wrap.c libunbound/python/unbound.py pythonmod/interface.h pythonmod/unboundmodule.py rm -rf autom4te.cache .libs build doc/html doc/xml realclean: clean rm -f config.status config.log config.h.in config.h rm -f configure config.sub config.guess ltmain.sh aclocal.m4 libtool rm -f util/configlexer.c util/configparser.c util/configparser.h + rm -f doc/example.conf doc/libunbound.3 doc/unbound-anchor.8 doc/unbound-checkconf.8 doc/unbound-control.8 doc/unbound.8 doc/unbound.conf.5 rm -f $(TEST_BIN) rm -f Makefile @@ -439,7 +445,7 @@ pythonmod-install: pyunbound-install: $(INSTALL) -m 755 -d $(DESTDIR)$(PYTHON_SITE_PKG) - $(INSTALL) -c -m 644 libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py + $(INSTALL) -c -m 644 $(srcdir)/libunbound/python/unbound.py $(DESTDIR)$(PYTHON_SITE_PKG)/unbound.py $(LIBTOOL) --mode=install cp _unbound.la $(DESTDIR)$(PYTHON_SITE_PKG) $(LIBTOOL) --mode=finish $(DESTDIR)$(PYTHON_SITE_PKG) @@ -464,6 +470,16 @@ install: all $(PYTHONMOD_INSTALL) $(PYUN $(INSTALL) -c -m 644 doc/unbound.conf.5 $(DESTDIR)$(mandir)/man5 $(INSTALL) -c -m 644 $(srcdir)/doc/unbound-host.1 $(DESTDIR)$(mandir)/man1 $(INSTALL) -c -m 644 doc/libunbound.3 $(DESTDIR)$(mandir)/man3 + for mpage in ub_ctx ub_result ub_ctx_create ub_ctx_delete \ + ub_ctx_set_option ub_ctx_get_option ub_ctx_config ub_ctx_set_fwd \ + ub_ctx_resolvconf ub_ctx_hosts ub_ctx_add_ta ub_ctx_add_ta_file \ + ub_ctx_trustedkeys ub_ctx_debugout ub_ctx_debuglevel ub_ctx_async \ + ub_poll ub_wait ub_fd ub_process ub_resolve ub_resolve_async ub_cancel \ + ub_resolve_free ub_strerror ub_ctx_print_local_zones ub_ctx_zone_add \ + ub_ctx_zone_remove ub_ctx_data_add ub_ctx_data_remove; \ + do \ + echo ".so man3/libunbound.3" > $(DESTDIR)$(mandir)/man3/$$mpage.3 ; \ + done $(INSTALL) -c -m 755 unbound-control-setup $(DESTDIR)$(sbindir)/unbound-control-setup if test ! -e $(DESTDIR)$(configfile); then $(INSTALL) -d `dirname $(DESTDIR)$(configfile)`; $(INSTALL) -c -m 644 doc/example.conf $(DESTDIR)$(configfile); fi $(LIBTOOL) --mode=install cp $(srcdir)/libunbound/unbound.h $(DESTDIR)$(includedir)/unbound.h @@ -481,6 +497,16 @@ uninstall: $(PYTHONMOD_UNINSTALL) $(PYUN rm -f -- $(DESTDIR)$(sbindir)/unbound$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-checkconf$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-host$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-anchor$(EXEEXT) $(DESTDIR)$(sbindir)/unbound-control-setup rm -f -- $(DESTDIR)$(mandir)/man8/unbound.8 $(DESTDIR)$(mandir)/man8/unbound-checkconf.8 $(DESTDIR)$(mandir)/man5/unbound.conf.5 $(DESTDIR)$(mandir)/man8/unbound-control.8 $(DESTDIR)$(mandir)/man8/unbound-anchor.8 rm -f -- $(DESTDIR)$(mandir)/man1/unbound-host.1 $(DESTDIR)$(mandir)/man3/libunbound.3 + for mpage in ub_ctx ub_result ub_ctx_create ub_ctx_delete \ + ub_ctx_set_option ub_ctx_get_option ub_ctx_config ub_ctx_set_fwd \ + ub_ctx_resolvconf ub_ctx_hosts ub_ctx_add_ta ub_ctx_add_ta_file \ + ub_ctx_trustedkeys ub_ctx_debugout ub_ctx_debuglevel ub_ctx_async \ + ub_poll ub_wait ub_fd ub_process ub_resolve ub_resolve_async ub_cancel \ + ub_resolve_free ub_strerror ub_ctx_print_local_zones ub_ctx_zone_add \ + ub_ctx_zone_remove ub_ctx_data_add ub_ctx_data_remove; \ + do \ + rm -f -- $(DESTDIR)$(mandir)/man3/$$mpage.3 ; \ + done rm -f -- $(DESTDIR)$(includedir)/unbound.h $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/libunbound.la @echo @@ -562,9 +588,8 @@ msgencode.lo msgencode.o: $(srcdir)/util $(srcdir)/util/regional.h $(srcdir)/util/net_help.h msgparse.lo msgparse.o: $(srcdir)/util/data/msgparse.c config.h \ $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h \ - $(srcdir)/util/regional.h + $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/dname.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lookup3.h $(srcdir)/util/regional.h msgreply.lo msgreply.o: $(srcdir)/util/data/msgreply.c config.h \ $(srcdir)/util/data/msgreply.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/data/packed_rrset.h \ @@ -669,7 +694,7 @@ modstack.lo modstack.o: $(srcdir)/servic $(srcdir)/util/fptr_wlist.h \ $(srcdir)/util/netevent.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/validator/validator.h \ - $(srcdir)/validator/val_utils.h $(PYTHONMOD_HEADER) + $(srcdir)/validator/val_utils.h outbound_list.lo outbound_list.o: $(srcdir)/services/outbound_list.c config.h \ $(srcdir)/services/outbound_list.h $(srcdir)/services/outside_network.h $(srcdir)/util/rbtree.h \ $(srcdir)/util/netevent.h \ @@ -710,8 +735,8 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/tube.h \ $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h $(srcdir)/util/mini_event.h \ - $(srcdir)/util/rbtree.h $(srcdir)/daemon/worker.h $(srcdir)/util/alloc.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/daemon/remote.h \ + $(srcdir)/daemon/worker.h $(srcdir)/util/alloc.h $(srcdir)/daemon/stats.h $(srcdir)/util/timehist.h \ + $(srcdir)/daemon/remote.h \ $(srcdir)/services/outside_network.h $(srcdir)/services/localzone.h $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_fwd.h \ @@ -719,19 +744,12 @@ fptr_wlist.lo fptr_wlist.o: $(srcdir)/ut $(srcdir)/validator/val_nsec3.h $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_kentry.h \ $(srcdir)/validator/val_neg.h $(srcdir)/validator/autotrust.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/libunbound/libworker.h $(srcdir)/libunbound/context.h $(srcdir)/libunbound/unbound.h \ - $(srcdir)/util/config_file.h $(PYTHONMOD_HEADER) + $(srcdir)/util/config_file.h locks.lo locks.o: $(srcdir)/util/locks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ log.lo log.o: $(srcdir)/util/log.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/locks.h -mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h \ - $(srcdir)/util/fptr_wlist.h $(srcdir)/util/netevent.h \ - $(srcdir)/util/storage/lruhash.h \ - $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/packed_rrset.h \ - $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/tube.h \ - $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h +mini_event.lo mini_event.o: $(srcdir)/util/mini_event.c config.h module.lo module.o: $(srcdir)/util/module.c config.h $(srcdir)/util/module.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/data/msgreply.h \ @@ -744,7 +762,7 @@ netevent.lo netevent.o: $(srcdir)/util/n $(srcdir)/util/locks.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/util/data/msgparse.h $(srcdir)/util/tube.h $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h \ $(srcdir)/services/modstack.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + net_help.lo net_help.o: $(srcdir)/util/net_help.c config.h \ $(srcdir)/util/net_help.h \ $(srcdir)/util/log.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ @@ -762,8 +780,7 @@ rbtree.lo rbtree.o: $(srcdir)/util/rbtre $(srcdir)/services/mesh.h $(srcdir)/util/rbtree.h $(srcdir)/services/modstack.h regional.lo regional.o: $(srcdir)/util/regional.c config.h $(srcdir)/util/log.h \ $(srcdir)/util/regional.h -rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h $(srcdir)/util/log.h \ - +rtt.lo rtt.o: $(srcdir)/util/rtt.c config.h $(srcdir)/util/rtt.h dnstree.lo dnstree.o: $(srcdir)/util/storage/dnstree.c config.h $(srcdir)/util/storage/dnstree.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/data/dname.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h \ $(srcdir)/util/log.h \ @@ -848,12 +865,16 @@ val_nsec.lo val_nsec.o: $(srcdir)/valida $(srcdir)/validator/val_utils.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/dname.h \ $(srcdir)/util/net_help.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h +val_secalgo.lo val_secalgo.o: $(srcdir)/validator/val_secalgo.c config.h \ + $(srcdir)/validator/val_secalgo.h \ + $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ + val_sigcrypt.lo val_sigcrypt.o: $(srcdir)/validator/val_sigcrypt.c config.h \ $(srcdir)/validator/val_sigcrypt.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ - $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ - $(srcdir)/util/data/msgparse.h $(srcdir)/validator/val_utils.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ + $(srcdir)/validator/val_secalgo.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ + $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h $(srcdir)/validator/val_utils.h \ + $(srcdir)/util/data/dname.h $(srcdir)/util/rbtree.h $(srcdir)/util/net_help.h $(srcdir)/util/regional.h \ val_utils.lo val_utils.o: $(srcdir)/validator/val_utils.c config.h $(srcdir)/validator/val_utils.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -863,7 +884,7 @@ val_utils.lo val_utils.o: $(srcdir)/vali $(srcdir)/validator/val_sigcrypt.h $(srcdir)/validator/val_anchor.h $(srcdir)/util/rbtree.h \ $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_neg.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/util/data/dname.h \ - $(srcdir)/util/net_help.h $(srcdir)/util/regional.h $(srcdir)/util/config_file.h + $(srcdir)/util/net_help.h $(srcdir)/util/regional.h checklocks.lo checklocks.o: $(srcdir)/testcode/checklocks.c config.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/testcode/checklocks.h unitanchor.lo unitanchor.o: $(srcdir)/testcode/unitanchor.c config.h \ @@ -904,11 +925,11 @@ unitverify.lo unitverify.o: $(srcdir)/te $(srcdir)/testcode/unitmain.h \ $(srcdir)/validator/val_sigcrypt.h $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/locks.h \ - $(srcdir)/validator/val_nsec.h \ - $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h $(srcdir)/validator/validator.h $(srcdir)/util/module.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/validator/val_utils.h \ - $(srcdir)/testcode/ldns-testpkts.h \ + $(srcdir)/validator/val_secalgo.h \ + $(srcdir)/validator/val_nsec.h $(srcdir)/validator/val_nsec3.h $(srcdir)/util/rbtree.h \ + $(srcdir)/validator/validator.h $(srcdir)/util/module.h $(srcdir)/util/data/msgreply.h \ + $(srcdir)/util/data/msgparse.h \ + $(srcdir)/validator/val_utils.h $(srcdir)/testcode/ldns-testpkts.h \ $(srcdir)/util/data/dname.h \ $(srcdir)/util/regional.h $(srcdir)/util/alloc.h $(srcdir)/util/net_help.h $(srcdir)/util/config_file.h readhex.lo readhex.o: $(srcdir)/testcode/readhex.c config.h $(srcdir)/testcode/readhex.h \ @@ -924,13 +945,12 @@ cachedump.lo cachedump.o: $(srcdir)/daem $(srcdir)/daemon/remote.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/storage/lruhash.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/util/data/msgparse.h $(srcdir)/daemon/stats.h \ - $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/daemon/daemon.h $(srcdir)/services/modstack.h \ - $(srcdir)/services/cache/rrset.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h \ - $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/data/dname.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ - $(srcdir)/iterator/iter_delegpt.h $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h \ - $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \ - $(srcdir)/util/storage/dnstree.h + $(srcdir)/util/timehist.h $(srcdir)/util/module.h $(srcdir)/services/cache/rrset.h \ + $(srcdir)/util/storage/slabhash.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/infra.h \ + $(srcdir)/util/rtt.h $(srcdir)/util/regional.h $(srcdir)/util/net_help.h $(srcdir)/util/data/dname.h \ + $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h $(srcdir)/iterator/iter_delegpt.h \ + $(srcdir)/iterator/iter_utils.h $(srcdir)/iterator/iter_resptype.h $(srcdir)/iterator/iter_fwd.h \ + $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h $(srcdir)/util/storage/dnstree.h daemon.lo daemon.o: $(srcdir)/daemon/daemon.c config.h \ $(srcdir)/daemon/daemon.h \ $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/daemon/worker.h \ @@ -940,7 +960,7 @@ daemon.lo daemon.o: $(srcdir)/daemon/dae $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h + $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h remote.lo remote.o: $(srcdir)/daemon/remote.c config.h \ $(srcdir)/daemon/remote.h \ $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h $(srcdir)/util/alloc.h \ @@ -971,8 +991,7 @@ unbound.lo unbound.o: $(srcdir)/daemon/u $(srcdir)/util/data/packed_rrset.h \ $(srcdir)/services/cache/infra.h \ $(srcdir)/util/rtt.h $(srcdir)/util/data/msgreply.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h \ - $(srcdir)/util/net_help.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/util/net_help.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h \ $(srcdir)/util/log.h \ $(srcdir)/util/net_help.h $(srcdir)/util/random.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h \ @@ -995,8 +1014,7 @@ testbound.lo testbound.o: $(srcdir)/test $(srcdir)/util/locks.h $(srcdir)/util/alloc.h $(srcdir)/services/modstack.h $(srcdir)/util/storage/slabhash.h \ $(srcdir)/util/storage/lruhash.h $(srcdir)/services/listen_dnsport.h $(srcdir)/services/cache/rrset.h \ $(srcdir)/util/data/packed_rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/util/data/msgreply.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/net_help.h \ - $(srcdir)/util/mini_event.h $(srcdir)/util/rbtree.h + $(srcdir)/util/data/msgreply.h $(srcdir)/util/module.h $(srcdir)/util/data/msgparse.h $(srcdir)/util/net_help.h ldns-testpkts.lo ldns-testpkts.o: $(srcdir)/testcode/ldns-testpkts.c config.h \ $(srcdir)/testcode/ldns-testpkts.h worker.lo worker.o: $(srcdir)/daemon/worker.c config.h \ @@ -1027,7 +1045,7 @@ daemon.lo daemon.o: $(srcdir)/daemon/dae $(srcdir)/util/storage/dnstree.h $(srcdir)/util/rbtree.h $(srcdir)/util/config_file.h \ $(srcdir)/util/storage/lookup3.h $(srcdir)/util/storage/slabhash.h $(srcdir)/services/listen_dnsport.h \ $(srcdir)/services/cache/rrset.h $(srcdir)/services/cache/infra.h $(srcdir)/util/rtt.h \ - $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h + $(srcdir)/services/localzone.h $(srcdir)/util/random.h $(srcdir)/util/tube.h $(srcdir)/util/net_help.h stats.lo stats.o: $(srcdir)/daemon/stats.c config.h \ $(srcdir)/daemon/stats.h \ $(srcdir)/util/timehist.h $(srcdir)/daemon/worker.h $(srcdir)/util/netevent.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ @@ -1085,7 +1103,7 @@ unbound-checkconf.lo unbound-checkconf.o $(srcdir)/util/regional.h $(srcdir)/iterator/iterator.h $(srcdir)/services/outbound_list.h \ $(srcdir)/iterator/iter_fwd.h $(srcdir)/util/rbtree.h $(srcdir)/iterator/iter_hints.h \ $(srcdir)/util/storage/dnstree.h $(srcdir)/validator/validator.h $(srcdir)/validator/val_utils.h \ - $(srcdir)/services/localzone.h $(PYTHONMOD_HEADER) + $(srcdir)/services/localzone.h worker_cb.lo worker_cb.o: $(srcdir)/smallapp/worker_cb.c config.h $(srcdir)/util/log.h \ $(srcdir)/services/mesh.h \ $(srcdir)/util/rbtree.h $(srcdir)/util/netevent.h $(srcdir)/util/data/msgparse.h \ @@ -1160,8 +1178,7 @@ pythonmod_utils.lo pythonmod_utils.o: $( $(srcdir)/util/data/msgparse.h \ $(srcdir)/util/netevent.h \ $(srcdir)/util/net_help.h $(srcdir)/services/cache/dns.h $(srcdir)/services/cache/rrset.h \ - $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h \ - + $(srcdir)/util/storage/slabhash.h $(srcdir)/util/regional.h win_svc.lo win_svc.o: $(srcdir)/winrc/win_svc.c config.h $(srcdir)/winrc/win_svc.h $(srcdir)/winrc/w_inst.h \ $(srcdir)/daemon/daemon.h $(srcdir)/util/locks.h $(srcdir)/util/log.h \ $(srcdir)/util/alloc.h \ Modified: head/contrib/unbound/aclocal.m4 ============================================================================== --- head/contrib/unbound/aclocal.m4 Fri Apr 5 09:43:20 2013 (r249140) +++ head/contrib/unbound/aclocal.m4 Fri Apr 5 09:51:31 2013 (r249141) @@ -1,7 +1,7 @@ -# generated automatically by aclocal 1.11.1 -*- Autoconf -*- +# generated automatically by aclocal 1.12.2 -*- Autoconf -*- + +# Copyright (C) 1996-2012 Free Software Foundation, Inc. -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. @@ -14,8 +14,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -24,8 +24,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, -# Inc. +# 2006, 2007, 2008, 2009, 2010, 2011 Free Software +# Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -159,6 +159,8 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl +_LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl +dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -644,7 +646,7 @@ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2010 Free Software Foundation, Inc. +Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -808,6 +810,7 @@ AC_DEFUN([LT_LANG], m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], + [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], @@ -829,6 +832,29 @@ m4_defun([_LT_LANG], ])# _LT_LANG +m4_ifndef([AC_PROG_GO], [ +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_GO. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +m4_defun([AC_PROG_GO], +[AC_LANG_PUSH(Go)dnl +AC_ARG_VAR([GOC], [Go compiler command])dnl +AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl +_AC_ARG_VAR_LDFLAGS()dnl +AC_CHECK_TOOL(GOC, gccgo) +if test -z "$GOC"; then + if test -n "$ac_tool_prefix"; then + AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) + fi +fi +if test -z "$GOC"; then + AC_CHECK_PROG(GOC, gccgo, gccgo, false) +fi +])#m4_defun +])#m4_ifndef + + # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], @@ -859,6 +885,10 @@ AC_PROVIDE_IFELSE([AC_PROG_GCJ], m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) +AC_PROVIDE_IFELSE([AC_PROG_GO], + [LT_LANG(GO)], + [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) + AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) @@ -961,7 +991,13 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + # If there is a non-empty error log, and "single_module" + # appears in it, assume the flag caused a linker warning + if test -s conftest.err && $GREP single_module conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + # Otherwise, if the output was created with a 0 exit code from + # the compiler, it worked. + elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -969,6 +1005,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK rm -rf libconftest.dylib* rm -f conftest.* fi]) + AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no @@ -980,6 +1017,7 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECK [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF @@ -997,7 +1035,9 @@ _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? - if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + if test -s conftest.err && $GREP force_load conftest.err; then + cat conftest.err >&AS_MESSAGE_LOG_FD + elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD @@ -1042,8 +1082,8 @@ _LT_EOF ]) -# _LT_DARWIN_LINKER_FEATURES -# -------------------------- +# _LT_DARWIN_LINKER_FEATURES([TAG]) +# --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ @@ -1054,6 +1094,8 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES], _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], + [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi @@ -1337,14 +1379,27 @@ s390*-*linux*|s390*-*tpf*|sparc*-*linux* CFLAGS="$SAVE_CFLAGS" fi ;; -sparc*-*solaris*) +*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; + yes*) + case $host in + i?86-*-solaris*) + LD="${LD-ld} -m elf_x86_64" + ;; + sparc*-*-solaris*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + # GNU ld 2.21 introduced _sol2 emulations. Use them if available. + if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then + LD="${LD-ld}_sol2" + fi + ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" @@ -1421,13 +1476,13 @@ old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" + old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" + old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in @@ -1607,6 +1662,11 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d lt_cv_sys_max_cmd_len=196608 ;; + os2*) + # The test takes a long time on OS/2. + lt_cv_sys_max_cmd_len=8192 + ;; + osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not @@ -1646,7 +1706,7 @@ AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [d # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do @@ -2192,7 +2252,7 @@ need_version=unknown case $host_os in aix3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH @@ -2201,7 +2261,7 @@ aix3*) ;; aix[[4-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes @@ -2266,7 +2326,7 @@ beos*) ;; bsdi[[45]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' @@ -2405,7 +2465,7 @@ m4_if([$1], [],[ ;; dgux*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' @@ -2413,10 +2473,6 @@ dgux*) shlibpath_var=LD_LIBRARY_PATH ;; -freebsd1*) - dynamic_linker=no - ;; - freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. @@ -2424,7 +2480,7 @@ freebsd* | dragonfly*) objformat=`/usr/bin/objformat` else case $host_os in - freebsd[[123]]*) objformat=aout ;; + freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi @@ -2442,7 +2498,7 @@ freebsd* | dragonfly*) esac shlibpath_var=LD_LIBRARY_PATH case $host_os in - freebsd2*) + freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) @@ -2462,17 +2518,18 @@ freebsd* | dragonfly*) ;; gnu*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" @@ -2533,7 +2590,7 @@ hpux9* | hpux10* | hpux11*) ;; interix[[3-9]]*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' @@ -2549,7 +2606,7 @@ irix5* | irix6* | nonstopux*) nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; @@ -2586,9 +2643,9 @@ linux*oldld* | linux*aout* | linux*coff* dynamic_linker=no ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2655,7 +2712,7 @@ netbsd*) ;; newsos6) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes @@ -2724,7 +2781,7 @@ rdos*) ;; solaris*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2749,7 +2806,7 @@ sunos4*) ;; sysv4 | sysv4.3*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -2773,7 +2830,7 @@ sysv4 | sysv4.3*) sysv4*MP*) if test -d /usr/nec ;then - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH @@ -2804,7 +2861,7 @@ sysv5* | sco3.2v5* | sco5v6* | unixware* tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' @@ -2814,7 +2871,7 @@ tpf*) ;; uts4*) - version_type=linux + version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH @@ -3236,7 +3293,7 @@ irix5* | irix6* | nonstopux*) lt_cv_deplibs_check_method=pass_all ;; -# This must be Linux ELF. +# This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; @@ -3656,6 +3713,7 @@ for ac_symprfx in "" "_"; do # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ +" /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ @@ -4240,7 +4298,9 @@ m4_if([$1], [CXX], [ case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' - _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then + _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" + fi ;; esac else @@ -4332,18 +4392,33 @@ m4_if([$1], [CXX], [ ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ F* | *Sun*Fortran*) + *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; + *Sun\ F* | *Sun*Fortran*) + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; + *Intel*\ [[CF]]*Compiler*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + *Portland\ Group*) + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; esac ;; esac @@ -4503,7 +4578,9 @@ m4_if([$1], [CXX], [ ;; cygwin* | mingw* | cegcc*) case $cc_basename in - cl*) ;; + cl*) + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] @@ -4528,7 +4605,6 @@ m4_if([$1], [CXX], [ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -4779,8 +4855,7 @@ _LT_EOF xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ @@ -5075,6 +5150,7 @@ _LT_EOF # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' @@ -5121,10 +5197,6 @@ _LT_EOF _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; - freebsd1*) - _LT_TAGVAR(ld_shlibs, $1)=no - ;; - # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little @@ -5137,7 +5209,7 @@ _LT_EOF ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. - freebsd2*) + freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes @@ -5176,7 +5248,6 @@ _LT_EOF fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes @@ -5618,9 +5689,6 @@ _LT_TAGDECL([], [no_undefined_flag], [1] _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) -_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1], - [[If ld is used when linking, flag to hardcode $libdir into a binary - during linking. This must work even if $libdir does not exist]]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], @@ -5774,7 +5842,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported @@ -6144,7 +6211,7 @@ if test "$_lt_caught_CXX_error" != yes; esac ;; - freebsd[[12]]*) + freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no @@ -6905,12 +6972,18 @@ public class foo { } }; _LT_EOF +], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF +package foo +func foo() { +} +_LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +*\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary @@ -7107,7 +7180,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7240,7 +7312,6 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= -_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no @@ -7423,6 +7494,73 @@ CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG +# _LT_LANG_GO_CONFIG([TAG]) +# -------------------------- +# Ensure that the configuration variables for the GNU Go compiler +# are suitably defined. These variables are subsequently used by _LT_CONFIG +# to write the compiler configuration to `libtool'. +m4_defun([_LT_LANG_GO_CONFIG], +[AC_REQUIRE([LT_PROG_GO])dnl +AC_LANG_SAVE + +# Source file extension for Go test sources. +ac_ext=go + +# Object file extension for compiled Go test sources. +objext=o +_LT_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="package main; func main() { }" + +# Code to be used in simple link tests +lt_simple_link_test_code='package main; func main() { }' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_TAG_COMPILER + +# save warnings/boilerplate of simple test code +_LT_COMPILER_BOILERPLATE +_LT_LINKER_BOILERPLATE + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS +lt_save_GCC=$GCC +GCC=yes +CC=${GOC-"gccgo"} +CFLAGS=$GOFLAGS +compiler=$CC +_LT_TAGVAR(compiler, $1)=$CC +_LT_TAGVAR(LD, $1)="$LD" +_LT_CC_BASENAME([$compiler]) + +# Go did not exist at the time GCC didn't implicitly link libc in. +_LT_TAGVAR(archive_cmds_need_lc, $1)=no + +_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds + +if test -n "$compiler"; then + _LT_COMPILER_NO_RTTI($1) + _LT_COMPILER_PIC($1) + _LT_COMPILER_C_O($1) + _LT_COMPILER_FILE_LOCKS($1) + _LT_LINKER_SHLIBS($1) + _LT_LINKER_HARDCODE_LIBPATH($1) + + _LT_CONFIG($1) +fi + +AC_LANG_RESTORE + +GCC=$lt_save_GCC +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS +])# _LT_LANG_GO_CONFIG + + # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler @@ -7492,6 +7630,13 @@ dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) +# LT_PROG_GO +# ---------- +AC_DEFUN([LT_PROG_GO], +[AC_CHECK_TOOL(GOC, gccgo,) +]) + + # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], @@ -8156,9 +8301,24 @@ dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], - [AS_HELP_STRING([--with-pic], + [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], - [pic_mode="$withval"], + [lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:10:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 44B5318E; Fri, 5 Apr 2013 10:10:40 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 36EA7CDB; Fri, 5 Apr 2013 10:10:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35AAeHr035022; Fri, 5 Apr 2013 10:10:40 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35AAeak035021; Fri, 5 Apr 2013 10:10:40 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051010.r35AAeak035021@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:10:40 +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: r249142 - stable/9/sys/geom 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, 05 Apr 2013 10:10:40 -0000 Author: mav Date: Fri Apr 5 10:10:39 2013 New Revision: 249142 URL: http://svnweb.freebsd.org/changeset/base/249142 Log: MFC r226735 (by pjd): Simplify disk_alloc(). Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Fri Apr 5 09:51:31 2013 (r249141) +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 10:10:39 2013 (r249142) @@ -574,12 +574,10 @@ g_disk_ident_adjust(char *ident, size_t } struct disk * -disk_alloc() +disk_alloc(void) { - struct disk *dp; - dp = g_malloc(sizeof *dp, M_WAITOK | M_ZERO); - return (dp); + return (g_malloc(sizeof(struct disk), M_WAITOK | M_ZERO)); } void From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:13:44 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id DF51F3C5; Fri, 5 Apr 2013 10:13:44 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B92D2D0A; Fri, 5 Apr 2013 10:13:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35ADike035543; Fri, 5 Apr 2013 10:13:44 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35ADiIO035542; Fri, 5 Apr 2013 10:13:44 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051013.r35ADiIO035542@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:13:44 +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: r249143 - stable/9/sys/geom 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, 05 Apr 2013 10:13:45 -0000 Author: mav Date: Fri Apr 5 10:13:44 2013 New Revision: 249143 URL: http://svnweb.freebsd.org/changeset/base/249143 Log: MFC r226736: Improve style a bit. Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Fri Apr 5 10:10:39 2013 (r249142) +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 10:13:44 2013 (r249143) @@ -112,6 +112,7 @@ DECLARE_GEOM_CLASS(g_disk_class, g_disk) static void __inline g_disk_lock_giant(struct disk *dp) { + if (dp->d_flags & DISKFLAG_NEEDSGIANT) mtx_lock(&Giant); } @@ -119,6 +120,7 @@ g_disk_lock_giant(struct disk *dp) static void __inline g_disk_unlock_giant(struct disk *dp) { + if (dp->d_flags & DISKFLAG_NEEDSGIANT) mtx_unlock(&Giant); } @@ -254,9 +256,9 @@ g_disk_done(struct bio *bp) if (bp2->bio_error == 0) bp2->bio_error = bp->bio_error; bp2->bio_completed += bp->bio_completed; - if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) && - (sc = bp2->bio_to->geom->softc) && - (dp = sc->dp)) { + if ((bp->bio_cmd & (BIO_READ|BIO_WRITE|BIO_DELETE)) != 0 && + (sc = bp2->bio_to->geom->softc) != NULL && + (dp = sc->dp) != NULL) { devstat_end_transaction_bio(dp->d_devstat, bp); } g_destroy_bio(bp); @@ -285,7 +287,7 @@ g_disk_ioctl(struct g_provider *pp, u_lo g_disk_lock_giant(dp); error = dp->d_ioctl(dp, cmd, data, fflag, td); g_disk_unlock_giant(dp); - return(error); + return (error); } static void @@ -583,6 +585,7 @@ disk_alloc(void) void disk_create(struct disk *dp, int version) { + if (version != DISK_VERSION_02 && version != DISK_VERSION_01) { printf("WARNING: Attempt to add disk %s%d %s", dp->d_name, dp->d_unit, @@ -674,4 +677,3 @@ sysctl_disks(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_kern, OID_AUTO, disks, CTLTYPE_STRING | CTLFLAG_RD | CTLFLAG_MPSAFE, NULL, 0, sysctl_disks, "A", "names of available disks"); - From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:22:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 943DF63F; Fri, 5 Apr 2013 10:22:23 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 86C44D6E; Fri, 5 Apr 2013 10:22:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35AMNdN038355; Fri, 5 Apr 2013 10:22:23 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35AMNlP038354; Fri, 5 Apr 2013 10:22:23 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051022.r35AMNlP038354@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:22:23 +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: r249144 - stable/9/sys/geom 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, 05 Apr 2013 10:22:23 -0000 Author: mav Date: Fri Apr 5 10:22:22 2013 New Revision: 249144 URL: http://svnweb.freebsd.org/changeset/base/249144 Log: MFC r226737 (by pjd): Allow upper layers to discover than BIO_DELETE and/or BIO_FLUSH is not supported by returning EOPNOTSUPP instead of 0 or ENODEV. Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Fri Apr 5 10:13:44 2013 (r249143) +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 10:22:22 2013 (r249144) @@ -308,7 +308,7 @@ g_disk_start(struct bio *bp) switch(bp->bio_cmd) { case BIO_DELETE: if (!(dp->d_flags & DISKFLAG_CANDELETE)) { - error = 0; + error = EOPNOTSUPP; break; } /* fall-through */ @@ -397,8 +397,8 @@ g_disk_start(struct bio *bp) g_trace(G_T_BIO, "g_disk_flushcache(%s)", bp->bio_to->name); if (!(dp->d_flags & DISKFLAG_CANFLUSHCACHE)) { - g_io_deliver(bp, ENODEV); - return; + error = EOPNOTSUPP; + break; } bp2 = g_clone_bio(bp); if (bp2 == NULL) { From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:27:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2E7458DE; Fri, 5 Apr 2013 10:27:07 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1F63FDA2; Fri, 5 Apr 2013 10:27:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35AR6EI039055; Fri, 5 Apr 2013 10:27:06 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35AR6wb039051; Fri, 5 Apr 2013 10:27:06 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051027.r35AR6wb039051@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:27:06 +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: r249145 - in stable/9/sys/geom: concat stripe 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, 05 Apr 2013 10:27:07 -0000 Author: mav Date: Fri Apr 5 10:27:05 2013 New Revision: 249145 URL: http://svnweb.freebsd.org/changeset/base/249145 Log: MFC r226998, r227004: Refactor disk disconnection and geom destruction handling sequences. Do not close/destroy opened consumer directly in case of disconnect. Instead keep it existing until it will be closed in regular way in response to upstream provider destruction. Delay geom destruction in the same way. Previous implementation could destroy consumers still having active requests and worked only because of global workaround made on GEOM level. Modified: stable/9/sys/geom/concat/g_concat.c stable/9/sys/geom/concat/g_concat.h stable/9/sys/geom/stripe/g_stripe.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/concat/g_concat.c ============================================================================== --- stable/9/sys/geom/concat/g_concat.c Fri Apr 5 10:22:22 2013 (r249144) +++ stable/9/sys/geom/concat/g_concat.c Fri Apr 5 10:27:05 2013 (r249145) @@ -118,25 +118,33 @@ g_concat_remove_disk(struct g_concat_dis struct g_consumer *cp; struct g_concat_softc *sc; + g_topology_assert(); KASSERT(disk->d_consumer != NULL, ("Non-valid disk in %s.", __func__)); sc = disk->d_softc; cp = disk->d_consumer; - G_CONCAT_DEBUG(0, "Disk %s removed from %s.", cp->provider->name, - sc->sc_name); + if (!disk->d_removed) { + G_CONCAT_DEBUG(0, "Disk %s removed from %s.", + cp->provider->name, sc->sc_name); + disk->d_removed = 1; + } - disk->d_consumer = NULL; if (sc->sc_provider != NULL) { sc->sc_provider->flags |= G_PF_WITHER; + G_CONCAT_DEBUG(0, "Device %s deactivated.", + sc->sc_provider->name); g_orphan_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; - G_CONCAT_DEBUG(0, "Device %s removed.", sc->sc_name); } if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) - g_access(cp, -cp->acr, -cp->acw, -cp->ace); + return; + disk->d_consumer = NULL; g_detach(cp); g_destroy_consumer(cp); + /* If there are no valid disks anymore, remove device. */ + if (LIST_EMPTY(&sc->sc_geom->consumer)) + g_concat_destroy(sc, 1); } static void @@ -156,37 +164,18 @@ g_concat_orphan(struct g_consumer *cp) if (disk == NULL) /* Possible? */ return; g_concat_remove_disk(disk); - - /* If there are no valid disks anymore, remove device. */ - if (g_concat_nvalid(sc) == 0) - g_concat_destroy(sc, 1); } static int g_concat_access(struct g_provider *pp, int dr, int dw, int de) { - struct g_consumer *cp1, *cp2; - struct g_concat_softc *sc; + struct g_consumer *cp1, *cp2, *tmp; + struct g_concat_disk *disk; struct g_geom *gp; int error; + g_topology_assert(); gp = pp->geom; - sc = gp->softc; - - if (sc == NULL) { - /* - * It looks like geom is being withered. - * In that case we allow only negative requests. - */ - KASSERT(dr <= 0 && dw <= 0 && de <= 0, - ("Positive access request (device=%s).", pp->name)); - if ((pp->acr + dr) == 0 && (pp->acw + dw) == 0 && - (pp->ace + de) == 0) { - G_CONCAT_DEBUG(0, "Device %s definitely destroyed.", - gp->name); - } - return (0); - } /* On first open, grab an extra "exclusive" bit */ if (pp->acr == 0 && pp->acw == 0 && pp->ace == 0) @@ -195,22 +184,24 @@ g_concat_access(struct g_provider *pp, i if ((pp->acr + dr) == 0 && (pp->acw + dw) == 0 && (pp->ace + de) == 0) de--; - error = ENXIO; - LIST_FOREACH(cp1, &gp->consumer, consumer) { + LIST_FOREACH_SAFE(cp1, &gp->consumer, consumer, tmp) { error = g_access(cp1, dr, dw, de); - if (error == 0) - continue; - /* - * If we fail here, backout all previous changes. - */ - LIST_FOREACH(cp2, &gp->consumer, consumer) { - if (cp1 == cp2) - return (error); - g_access(cp2, -dr, -dw, -de); + if (error != 0) + goto fail; + disk = cp1->private; + if (cp1->acr == 0 && cp1->acw == 0 && cp1->ace == 0 && + disk->d_removed) { + g_concat_remove_disk(disk); /* May destroy geom. */ } - /* NOTREACHED */ } + return (0); +fail: + LIST_FOREACH(cp2, &gp->consumer, consumer) { + if (cp1 == cp2) + break; + g_access(cp2, -dr, -dw, -de); + } return (error); } @@ -392,6 +383,7 @@ g_concat_check_and_run(struct g_concat_s u_int no, sectorsize = 0; off_t start; + g_topology_assert(); if (g_concat_nvalid(sc) != sc->sc_ndisks) return; @@ -420,7 +412,7 @@ g_concat_check_and_run(struct g_concat_s sc->sc_provider = pp; g_error_provider(pp, 0); - G_CONCAT_DEBUG(0, "Device %s activated.", sc->sc_name); + G_CONCAT_DEBUG(0, "Device %s activated.", sc->sc_provider->name); } static int @@ -462,6 +454,7 @@ g_concat_add_disk(struct g_concat_softc struct g_geom *gp; int error; + g_topology_assert(); /* Metadata corrupted? */ if (no >= sc->sc_ndisks) return (EINVAL); @@ -510,6 +503,7 @@ g_concat_add_disk(struct g_concat_softc disk->d_softc = sc; disk->d_start = 0; /* not yet */ disk->d_end = 0; /* not yet */ + disk->d_removed = 0; G_CONCAT_DEBUG(0, "Disk %s attached to %s.", pp->name, sc->sc_name); @@ -577,8 +571,8 @@ static int g_concat_destroy(struct g_concat_softc *sc, boolean_t force) { struct g_provider *pp; + struct g_consumer *cp, *cp1; struct g_geom *gp; - u_int no; g_topology_assert(); @@ -598,24 +592,23 @@ g_concat_destroy(struct g_concat_softc * } } - for (no = 0; no < sc->sc_ndisks; no++) { - if (sc->sc_disks[no].d_consumer != NULL) - g_concat_remove_disk(&sc->sc_disks[no]); + gp = sc->sc_geom; + LIST_FOREACH_SAFE(cp, &gp->consumer, consumer, cp1) { + g_concat_remove_disk(cp->private); + if (cp1 == NULL) + return (0); /* Recursion happened. */ } + if (!LIST_EMPTY(&gp->consumer)) + return (EINPROGRESS); - gp = sc->sc_geom; gp->softc = NULL; KASSERT(sc->sc_provider == NULL, ("Provider still exists? (device=%s)", gp->name)); free(sc->sc_disks, M_CONCAT); free(sc, M_CONCAT); - pp = LIST_FIRST(&gp->provider); - if (pp == NULL || (pp->acr == 0 && pp->acw == 0 && pp->ace == 0)) - G_CONCAT_DEBUG(0, "Device %s destroyed.", gp->name); - + G_CONCAT_DEBUG(0, "Device %s destroyed.", gp->name); g_wither_geom(gp, ENXIO); - return (0); } Modified: stable/9/sys/geom/concat/g_concat.h ============================================================================== --- stable/9/sys/geom/concat/g_concat.h Fri Apr 5 10:22:22 2013 (r249144) +++ stable/9/sys/geom/concat/g_concat.h Fri Apr 5 10:27:05 2013 (r249145) @@ -72,6 +72,7 @@ struct g_concat_disk { struct g_concat_softc *d_softc; off_t d_start; off_t d_end; + int d_removed; }; struct g_concat_softc { Modified: stable/9/sys/geom/stripe/g_stripe.c ============================================================================== --- stable/9/sys/geom/stripe/g_stripe.c Fri Apr 5 10:22:22 2013 (r249144) +++ stable/9/sys/geom/stripe/g_stripe.c Fri Apr 5 10:27:05 2013 (r249145) @@ -161,28 +161,35 @@ static void g_stripe_remove_disk(struct g_consumer *cp) { struct g_stripe_softc *sc; - u_int no; + g_topology_assert(); KASSERT(cp != NULL, ("Non-valid disk in %s.", __func__)); - sc = (struct g_stripe_softc *)cp->private; + sc = (struct g_stripe_softc *)cp->geom->softc; KASSERT(sc != NULL, ("NULL sc in %s.", __func__)); - no = cp->index; - G_STRIPE_DEBUG(0, "Disk %s removed from %s.", cp->provider->name, - sc->sc_name); + if (cp->private == NULL) { + G_STRIPE_DEBUG(0, "Disk %s removed from %s.", + cp->provider->name, sc->sc_name); + cp->private = (void *)(uintptr_t)-1; + } - sc->sc_disks[no] = NULL; if (sc->sc_provider != NULL) { sc->sc_provider->flags |= G_PF_WITHER; + G_STRIPE_DEBUG(0, "Device %s deactivated.", + sc->sc_provider->name); g_orphan_provider(sc->sc_provider, ENXIO); sc->sc_provider = NULL; - G_STRIPE_DEBUG(0, "Device %s removed.", sc->sc_name); } if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) - g_access(cp, -cp->acr, -cp->acw, -cp->ace); + return; + sc->sc_disks[cp->index] = NULL; + cp->index = 0; g_detach(cp); g_destroy_consumer(cp); + /* If there are no valid disks anymore, remove device. */ + if (LIST_EMPTY(&sc->sc_geom->consumer)) + g_stripe_destroy(sc, 1); } static void @@ -198,36 +205,20 @@ g_stripe_orphan(struct g_consumer *cp) return; g_stripe_remove_disk(cp); - /* If there are no valid disks anymore, remove device. */ - if (g_stripe_nvalid(sc) == 0) - g_stripe_destroy(sc, 1); } static int g_stripe_access(struct g_provider *pp, int dr, int dw, int de) { - struct g_consumer *cp1, *cp2; + struct g_consumer *cp1, *cp2, *tmp; struct g_stripe_softc *sc; struct g_geom *gp; int error; + g_topology_assert(); gp = pp->geom; sc = gp->softc; - - if (sc == NULL) { - /* - * It looks like geom is being withered. - * In that case we allow only negative requests. - */ - KASSERT(dr <= 0 && dw <= 0 && de <= 0, - ("Positive access request (device=%s).", pp->name)); - if ((pp->acr + dr) == 0 && (pp->acw + dw) == 0 && - (pp->ace + de) == 0) { - G_STRIPE_DEBUG(0, "Device %s definitely destroyed.", - gp->name); - } - return (0); - } + KASSERT(sc != NULL, ("NULL sc in %s.", __func__)); /* On first open, grab an extra "exclusive" bit */ if (pp->acr == 0 && pp->acw == 0 && pp->ace == 0) @@ -236,22 +227,23 @@ g_stripe_access(struct g_provider *pp, i if ((pp->acr + dr) == 0 && (pp->acw + dw) == 0 && (pp->ace + de) == 0) de--; - error = ENXIO; - LIST_FOREACH(cp1, &gp->consumer, consumer) { + LIST_FOREACH_SAFE(cp1, &gp->consumer, consumer, tmp) { error = g_access(cp1, dr, dw, de); - if (error == 0) - continue; - /* - * If we fail here, backout all previous changes. - */ - LIST_FOREACH(cp2, &gp->consumer, consumer) { - if (cp1 == cp2) - return (error); - g_access(cp2, -dr, -dw, -de); + if (error != 0) + goto fail; + if (cp1->acr == 0 && cp1->acw == 0 && cp1->ace == 0 && + cp1->private != NULL) { + g_stripe_remove_disk(cp1); /* May destroy geom. */ } - /* NOTREACHED */ } + return (0); +fail: + LIST_FOREACH(cp2, &gp->consumer, consumer) { + if (cp1 == cp2) + break; + g_access(cp2, -dr, -dw, -de); + } return (error); } @@ -653,6 +645,7 @@ g_stripe_check_and_run(struct g_stripe_s off_t mediasize, ms; u_int no, sectorsize = 0; + g_topology_assert(); if (g_stripe_nvalid(sc) != sc->sc_ndisks) return; @@ -682,7 +675,7 @@ g_stripe_check_and_run(struct g_stripe_s sc->sc_provider->stripeoffset = 0; g_error_provider(sc->sc_provider, 0); - G_STRIPE_DEBUG(0, "Device %s activated.", sc->sc_name); + G_STRIPE_DEBUG(0, "Device %s activated.", sc->sc_provider->name); } static int @@ -723,6 +716,7 @@ g_stripe_add_disk(struct g_stripe_softc struct g_geom *gp; int error; + g_topology_assert(); /* Metadata corrupted? */ if (no >= sc->sc_ndisks) return (EINVAL); @@ -735,6 +729,8 @@ g_stripe_add_disk(struct g_stripe_softc fcp = LIST_FIRST(&gp->consumer); cp = g_new_consumer(gp); + cp->private = NULL; + cp->index = no; error = g_attach(cp, pp); if (error != 0) { g_destroy_consumer(cp); @@ -765,12 +761,8 @@ g_stripe_add_disk(struct g_stripe_softc } } - cp->private = sc; - cp->index = no; sc->sc_disks[no] = cp; - G_STRIPE_DEBUG(0, "Disk %s attached to %s.", pp->name, sc->sc_name); - g_stripe_check_and_run(sc); return (0); @@ -790,6 +782,7 @@ g_stripe_create(struct g_class *mp, cons struct g_geom *gp; u_int no; + g_topology_assert(); G_STRIPE_DEBUG(1, "Creating device %s (id=%u).", md->md_name, md->md_id); @@ -851,8 +844,8 @@ static int g_stripe_destroy(struct g_stripe_softc *sc, boolean_t force) { struct g_provider *pp; + struct g_consumer *cp, *cp1; struct g_geom *gp; - u_int no; g_topology_assert(); @@ -872,24 +865,22 @@ g_stripe_destroy(struct g_stripe_softc * } } - for (no = 0; no < sc->sc_ndisks; no++) { - if (sc->sc_disks[no] != NULL) - g_stripe_remove_disk(sc->sc_disks[no]); + gp = sc->sc_geom; + LIST_FOREACH_SAFE(cp, &gp->consumer, consumer, cp1) { + g_stripe_remove_disk(cp); + if (cp1 == NULL) + return (0); /* Recursion happened. */ } + if (!LIST_EMPTY(&gp->consumer)) + return (EINPROGRESS); - gp = sc->sc_geom; gp->softc = NULL; KASSERT(sc->sc_provider == NULL, ("Provider still exists? (device=%s)", gp->name)); free(sc->sc_disks, M_STRIPE); free(sc, M_STRIPE); - - pp = LIST_FIRST(&gp->provider); - if (pp == NULL || (pp->acr == 0 && pp->acw == 0 && pp->ace == 0)) - G_STRIPE_DEBUG(0, "Device %s destroyed.", gp->name); - + G_STRIPE_DEBUG(0, "Device %s destroyed.", gp->name); g_wither_geom(gp, ENXIO); - return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:29:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 845C9A67; Fri, 5 Apr 2013 10:29:15 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 688F7DB6; Fri, 5 Apr 2013 10:29:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35ATFEJ039377; Fri, 5 Apr 2013 10:29:15 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35ATFTl039376; Fri, 5 Apr 2013 10:29:15 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051029.r35ATFTl039376@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:29: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: r249146 - stable/9/sys/geom 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, 05 Apr 2013 10:29:15 -0000 Author: mav Date: Fri Apr 5 10:29:14 2013 New Revision: 249146 URL: http://svnweb.freebsd.org/changeset/base/249146 Log: MFC r227015: Add mutex and two flags to make orphan() call properly asynchronous: - delay consumer closing and detaching on orphan() until all I/Os complete; - prevent new I/Os submission after orphan() called. Previous implementation could destroy consumers still having active requests and worked only because of global workaround made on GEOM level. Modified: stable/9/sys/geom/geom_vfs.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_vfs.c ============================================================================== --- stable/9/sys/geom/geom_vfs.c Fri Apr 5 10:27:05 2013 (r249145) +++ stable/9/sys/geom/geom_vfs.c Fri Apr 5 10:29:14 2013 (r249146) @@ -31,7 +31,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include +#include #include #include /* XXX Temporary for VFS_LOCK_GIANT */ @@ -45,6 +47,13 @@ __FBSDID("$FreeBSD$"); */ #include +struct g_vfs_softc { + struct mtx sc_mtx; + struct bufobj *sc_bo; + int sc_active; + int sc_orphaned; +}; + static struct buf_ops __g_vfs_bufops = { .bop_name = "GEOM_VFS", .bop_write = bufwrite, @@ -66,24 +75,32 @@ static struct g_class g_vfs_class = { DECLARE_GEOM_CLASS(g_vfs_class, g_vfs); static void +g_vfs_destroy(void *arg, int flags __unused) +{ + struct g_consumer *cp; + + g_topology_assert(); + cp = arg; + if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) + g_access(cp, -cp->acr, -cp->acw, -cp->ace); + g_detach(cp); + if (cp->geom->softc == NULL) + g_wither_geom(cp->geom, ENXIO); +} + +static void g_vfs_done(struct bio *bip) { + struct g_consumer *cp; + struct g_vfs_softc *sc; struct buf *bp; - int vfslocked; + int vfslocked, destroy; struct mount *mp; struct vnode *vp; struct cdev *cdevp; - /* - * Provider ('bio_to') could have withered away sometime - * between incrementing the 'nend' in g_io_deliver() and now, - * making 'bio_to' a dangling pointer. We cannot do that - * in g_wither_geom(), as it would require going over - * the 'g_bio_run_up' list, resetting the pointer. - */ - if (bip->bio_from->provider == NULL) - bip->bio_to = NULL; - + cp = bip->bio_from; + sc = cp->geom->softc; /* * Collect statistics on synchronous and asynchronous read * and write counts for disks that have associated filesystems. @@ -134,6 +151,13 @@ g_vfs_done(struct bio *bip) bp->b_ioflags |= BIO_ERROR; bp->b_resid = bp->b_bcount - bip->bio_completed; g_destroy_bio(bip); + + mtx_lock(&sc->sc_mtx); + destroy = ((--sc->sc_active) == 0 && sc->sc_orphaned); + mtx_unlock(&sc->sc_mtx); + if (destroy) + g_post_event(g_vfs_destroy, cp, M_WAITOK, NULL); + vfslocked = VFS_LOCK_GIANT(((struct mount *)NULL)); bufdone(bp); VFS_UNLOCK_GIANT(vfslocked); @@ -142,17 +166,20 @@ g_vfs_done(struct bio *bip) void g_vfs_strategy(struct bufobj *bo, struct buf *bp) { + struct g_vfs_softc *sc; struct g_consumer *cp; struct bio *bip; int vfslocked; cp = bo->bo_private; - /* G_VALID_CONSUMER(cp); We likely lack topology lock */ + sc = cp->geom->softc; /* * If the provider has orphaned us, just return EXIO. */ - if (cp->provider == NULL) { + mtx_lock(&sc->sc_mtx); + if (sc->sc_orphaned) { + mtx_unlock(&sc->sc_mtx); bp->b_error = ENXIO; bp->b_ioflags |= BIO_ERROR; vfslocked = VFS_LOCK_GIANT(((struct mount *)NULL)); @@ -160,6 +187,8 @@ g_vfs_strategy(struct bufobj *bo, struct VFS_UNLOCK_GIANT(vfslocked); return; } + sc->sc_active++; + mtx_unlock(&sc->sc_mtx); bip = g_alloc_bio(); bip->bio_cmd = bp->b_iocmd; @@ -179,14 +208,20 @@ static void g_vfs_orphan(struct g_consumer *cp) { struct g_geom *gp; + struct g_vfs_softc *sc; + int destroy; g_topology_assert(); gp = cp->geom; + sc = gp->softc; g_trace(G_T_TOPOLOGY, "g_vfs_orphan(%p(%s))", cp, gp->name); - if (cp->acr > 0 || cp->acw > 0 || cp->ace > 0) - g_access(cp, -cp->acr, -cp->acw, -cp->ace); - g_detach(cp); + mtx_lock(&sc->sc_mtx); + sc->sc_orphaned = 1; + destroy = (sc->sc_active == 0); + mtx_unlock(&sc->sc_mtx); + if (destroy) + g_vfs_destroy(cp, 0); /* * Do not destroy the geom. Filesystem will do that during unmount. @@ -199,6 +234,7 @@ g_vfs_open(struct vnode *vp, struct g_co struct g_geom *gp; struct g_provider *pp; struct g_consumer *cp; + struct g_vfs_softc *sc; struct bufobj *bo; int vfslocked; int error; @@ -214,6 +250,10 @@ g_vfs_open(struct vnode *vp, struct g_co if (pp == NULL) return (ENOENT); gp = g_new_geomf(&g_vfs_class, "%s.%s", fsname, pp->name); + sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); + mtx_init(&sc->sc_mtx, "g_vfs", NULL, MTX_DEF); + sc->sc_bo = bo; + gp->softc = sc; cp = g_new_consumer(gp); g_attach(cp, pp); error = g_access(cp, 1, wr, wr); @@ -229,7 +269,6 @@ g_vfs_open(struct vnode *vp, struct g_co bo->bo_ops = g_vfs_bufops; bo->bo_private = cp; bo->bo_bsize = pp->sectorsize; - gp->softc = bo; return (error); } @@ -238,13 +277,17 @@ void g_vfs_close(struct g_consumer *cp) { struct g_geom *gp; - struct bufobj *bo; + struct g_vfs_softc *sc; g_topology_assert(); gp = cp->geom; - bo = gp->softc; - bufobj_invalbuf(bo, V_SAVE, 0, 0); - bo->bo_private = cp->private; - g_wither_geom_close(gp, ENXIO); + sc = gp->softc; + bufobj_invalbuf(sc->sc_bo, V_SAVE, 0, 0); + sc->sc_bo->bo_private = cp->private; + gp->softc = NULL; + mtx_destroy(&sc->sc_mtx); + if (!sc->sc_orphaned || cp->provider == NULL) + g_wither_geom_close(gp, ENXIO); + g_free(sc); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:30:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EDE95BEF; Fri, 5 Apr 2013 10:30:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E0B71DCA; Fri, 5 Apr 2013 10:30:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35AUbjV041217; Fri, 5 Apr 2013 10:30:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35AUb7H041216; Fri, 5 Apr 2013 10:30:37 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051030.r35AUb7H041216@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:30:37 +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: r249147 - stable/9/sys/geom 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, 05 Apr 2013 10:30:38 -0000 Author: mav Date: Fri Apr 5 10:30:37 2013 New Revision: 249147 URL: http://svnweb.freebsd.org/changeset/base/249147 Log: MFC r228204: Close race between geom destruction on g_vfs_close() when softc destroyed and g_vfs_orphan() call that tries to access softc, intruced at r227015. Modified: stable/9/sys/geom/geom_vfs.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_vfs.c ============================================================================== --- stable/9/sys/geom/geom_vfs.c Fri Apr 5 10:29:14 2013 (r249146) +++ stable/9/sys/geom/geom_vfs.c Fri Apr 5 10:30:37 2013 (r249147) @@ -214,8 +214,10 @@ g_vfs_orphan(struct g_consumer *cp) g_topology_assert(); gp = cp->geom; - sc = gp->softc; g_trace(G_T_TOPOLOGY, "g_vfs_orphan(%p(%s))", cp, gp->name); + sc = gp->softc; + if (sc == NULL) + return; mtx_lock(&sc->sc_mtx); sc->sc_orphaned = 1; destroy = (sc->sc_active == 0); From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:35:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 74122D98; Fri, 5 Apr 2013 10:35:37 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 63A0CDE5; Fri, 5 Apr 2013 10:35:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35AZb5P041987; Fri, 5 Apr 2013 10:35:37 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35AZaTW041976; Fri, 5 Apr 2013 10:35:36 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051035.r35AZaTW041976@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:35:36 +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: r249148 - in stable/9/sys/geom: . bde uncompress uzip 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, 05 Apr 2013 10:35:37 -0000 Author: mav Date: Fri Apr 5 10:35:36 2013 New Revision: 249148 URL: http://svnweb.freebsd.org/changeset/base/249148 Log: MFC r238198 (by trasz): Fix orphan() methods of several GEOM classes to not assume that there is an error set on the provider. With GEOM resizing, class can become orphaned when it doesn't implement resize() method and the provider size decreases. Modified: stable/9/sys/geom/bde/g_bde.c stable/9/sys/geom/geom_aes.c stable/9/sys/geom/geom_slice.c stable/9/sys/geom/uncompress/g_uncompress.c stable/9/sys/geom/uzip/g_uzip.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/bde/g_bde.c ============================================================================== --- stable/9/sys/geom/bde/g_bde.c Fri Apr 5 10:30:37 2013 (r249147) +++ stable/9/sys/geom/bde/g_bde.c Fri Apr 5 10:35:36 2013 (r249148) @@ -77,19 +77,15 @@ g_bde_orphan(struct g_consumer *cp) struct g_geom *gp; struct g_provider *pp; struct g_bde_softc *sc; - int error; g_trace(G_T_TOPOLOGY, "g_bde_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_bde_orphan with error == 0")); gp = cp->geom; sc = gp->softc; gp->flags |= G_GEOM_WITHER; - error = cp->provider->error; LIST_FOREACH(pp, &gp->provider, provider) - g_orphan_provider(pp, error); + g_orphan_provider(pp, ENXIO); bzero(sc, sizeof(struct g_bde_softc)); /* destroy evidence */ return; } Modified: stable/9/sys/geom/geom_aes.c ============================================================================== --- stable/9/sys/geom/geom_aes.c Fri Apr 5 10:30:37 2013 (r249147) +++ stable/9/sys/geom/geom_aes.c Fri Apr 5 10:35:36 2013 (r249148) @@ -241,12 +241,10 @@ g_aes_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_aes_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_aes_orphan with error == 0")); gp = cp->geom; sc = gp->softc; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); bzero(sc, sizeof(struct g_aes_softc)); /* destroy evidence */ g_free(sc); return; Modified: stable/9/sys/geom/geom_slice.c ============================================================================== --- stable/9/sys/geom/geom_slice.c Fri Apr 5 10:30:37 2013 (r249147) +++ stable/9/sys/geom/geom_slice.c Fri Apr 5 10:35:36 2013 (r249148) @@ -522,10 +522,8 @@ g_slice_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_slice_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_slice_orphan with error == 0")); /* XXX: Not good enough we leak the softc and its suballocations */ g_slice_free(cp->geom->softc); - g_wither_geom(cp->geom, cp->provider->error); + g_wither_geom(cp->geom, ENXIO); } Modified: stable/9/sys/geom/uncompress/g_uncompress.c ============================================================================== --- stable/9/sys/geom/uncompress/g_uncompress.c Fri Apr 5 10:30:37 2013 (r249147) +++ stable/9/sys/geom/uncompress/g_uncompress.c Fri Apr 5 10:35:36 2013 (r249148) @@ -406,13 +406,11 @@ g_uncompress_orphan(struct g_consumer *c g_trace(G_T_TOPOLOGY, "%s(%p/%s)", __func__, cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_uncompress_orphan with error == 0")); gp = cp->geom; g_uncompress_softc_free(gp->softc, gp); gp->softc = NULL; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); } static int Modified: stable/9/sys/geom/uzip/g_uzip.c ============================================================================== --- stable/9/sys/geom/uzip/g_uzip.c Fri Apr 5 10:30:37 2013 (r249147) +++ stable/9/sys/geom/uzip/g_uzip.c Fri Apr 5 10:35:36 2013 (r249148) @@ -313,13 +313,11 @@ g_uzip_orphan(struct g_consumer *cp) g_trace(G_T_TOPOLOGY, "g_uzip_orphan(%p/%s)", cp, cp->provider->name); g_topology_assert(); - KASSERT(cp->provider->error != 0, - ("g_uzip_orphan with error == 0")); gp = cp->geom; g_uzip_softc_free(gp->softc, gp); gp->softc = NULL; - g_wither_geom(gp, cp->provider->error); + g_wither_geom(gp, ENXIO); } static int From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:50:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id B3B63227; Fri, 5 Apr 2013 10:50:32 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A60B8EA7; Fri, 5 Apr 2013 10:50:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35AoWoJ047197; Fri, 5 Apr 2013 10:50:32 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35AoWGN047196; Fri, 5 Apr 2013 10:50:32 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051050.r35AoWGN047196@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:50:32 +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: r249149 - stable/9/sys/geom 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, 05 Apr 2013 10:50:32 -0000 Author: mav Date: Fri Apr 5 10:50:32 2013 New Revision: 249149 URL: http://svnweb.freebsd.org/changeset/base/249149 Log: MFC r240822, r241022 (by pjd): Use the topology lock to protect list of providers while withering them. It is possible that provider is destroyed while we are iterating over the list. Remove the topology lock from disk_gone(), it might be called with regular mutexes held and the topology lock is an sx lock. The topology lock was there to protect traversing through the list of providers of disk's geom, but it seems that disk's geom has always exactly one provider. Change the code to call g_wither_provider() for this one provider, which is safe to do without holding the topology lock and assert that there is indeed only one provider. Modified: stable/9/sys/geom/geom_disk.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Fri Apr 5 10:35:36 2013 (r249148) +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 10:50:32 2013 (r249149) @@ -627,9 +627,14 @@ disk_gone(struct disk *dp) struct g_provider *pp; gp = dp->d_geom; - if (gp != NULL) - LIST_FOREACH(pp, &gp->provider, provider) + if (gp != NULL) { + pp = LIST_FIRST(&gp->provider); + if (pp != NULL) { + KASSERT(LIST_NEXT(pp, provider) == NULL, + ("geom %p has more than one provider", gp)); g_wither_provider(pp, ENXIO); + } + } } void From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 10:57:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 821FB3C9; Fri, 5 Apr 2013 10:57:03 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 74926EC6; Fri, 5 Apr 2013 10:57:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35Av3j2048285; Fri, 5 Apr 2013 10:57:03 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35Av3oS048284; Fri, 5 Apr 2013 10:57:03 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051057.r35Av3oS048284@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 10:57:03 +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: r249150 - stable/9/sys/geom 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, 05 Apr 2013 10:57:03 -0000 Author: mav Date: Fri Apr 5 10:57:02 2013 New Revision: 249150 URL: http://svnweb.freebsd.org/changeset/base/249150 Log: MFC r244716 (by pjd): Reset provider-specific fields when resending I/O request in low memory conditions. This fixes assertion which checks those fields when kernel is compiled with DIAGNOSTIC. Modified: stable/9/sys/geom/geom_io.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/geom/geom_io.c ============================================================================== --- stable/9/sys/geom/geom_io.c Fri Apr 5 10:50:32 2013 (r249149) +++ stable/9/sys/geom/geom_io.c Fri Apr 5 10:57:02 2013 (r249150) @@ -565,6 +565,9 @@ g_io_deliver(struct bio *bp, int error) printf("ENOMEM %p on %p(%s)\n", bp, pp, pp->name); bp->bio_children = 0; bp->bio_inbed = 0; + bp->bio_driver1 = NULL; + bp->bio_driver2 = NULL; + bp->bio_pflags = 0; g_io_request(bp, cp); pace++; return; From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:41:59 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id CA153C56; Fri, 5 Apr 2013 11:41:59 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id BB681EB; Fri, 5 Apr 2013 11:41:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BfxA0062445; Fri, 5 Apr 2013 11:41:59 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35Bfui1062429; Fri, 5 Apr 2013 11:41:56 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051141.r35Bfui1062429@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:41: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: r249152 - in stable/9/sys: cam cam/ata cam/scsi geom geom/part 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, 05 Apr 2013 11:41:59 -0000 Author: mav Date: Fri Apr 5 11:41:56 2013 New Revision: 249152 URL: http://svnweb.freebsd.org/changeset/base/249152 Log: MFC r238886, r238892: Implement media change notification for DA and CD removable media devices. It includes three parts: 1) Modifications to CAM to detect media media changes and report them to disk(9) layer. For modern SATA (and potentially UAS) devices it utilizes Asynchronous Notification mechanism to receive events from hardware. Active polling with TEST UNIT READY commands with 3 seconds period is used for incapable hardware. After that both CD and DA drivers work the same way, detecting two conditions: "NOT READY: Medium not present" after medium was detected previously, and "UNIT ATTENTION: Not ready to ready change, medium may have changed". First one reported to disk(9) as media removal, second as media insert/change. To reliably receive second event new AC_UNIT_ATTENTION async added to make UAs broadcasted to all periphs by generic error handling code in cam_periph_error(). 2) Modifications to GEOM core to handle media remove and change events. Media removal handled by spoiling all consumers attached to the provider. Media change event also schedules provider retaste after spoiling to probe new media. New flag G_CF_ORPHAN was added to consumers to reflect that consumer is in process of destruction. It allows retaste to create new geom instance of the same class, while previous one is still dying. 3) Modifications to some GEOM classes: DEV -- to report media change events to devd; PART class already handles spoiling alike to orphan. Modified: stable/9/sys/cam/ata/ata_all.h stable/9/sys/cam/ata/ata_xpt.c stable/9/sys/cam/cam_ccb.h stable/9/sys/cam/cam_periph.c stable/9/sys/cam/cam_xpt.c stable/9/sys/cam/scsi/scsi_cd.c stable/9/sys/cam/scsi/scsi_da.c stable/9/sys/geom/geom.h stable/9/sys/geom/geom_dev.c stable/9/sys/geom/geom_disk.c stable/9/sys/geom/geom_disk.h stable/9/sys/geom/geom_event.c stable/9/sys/geom/geom_io.c stable/9/sys/geom/geom_slice.c stable/9/sys/geom/geom_subr.c stable/9/sys/geom/part/g_part.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_all.h ============================================================================== --- stable/9/sys/cam/ata/ata_all.h Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/ata/ata_all.h Fri Apr 5 11:41:56 2013 (r249152) @@ -35,6 +35,7 @@ struct ccb_ataio; struct cam_periph; union ccb; +#define SID_AEN 0x04 /* Abuse inq_flags bit to track enabled AEN. */ #define SID_DMA 0x10 /* Abuse inq_flags bit to track enabled DMA. */ struct ata_cmd { Modified: stable/9/sys/cam/ata/ata_xpt.c ============================================================================== --- stable/9/sys/cam/ata/ata_xpt.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/ata/ata_xpt.c Fri Apr 5 11:41:56 2013 (r249152) @@ -463,6 +463,12 @@ negotiate: 0, 0x02); break; case PROBE_SETAN: + /* Remember what transport thinks about AEN. */ + if (softc->caps & CTS_SATA_CAPS_H_AN) + path->device->inq_flags |= SID_AEN; + else + path->device->inq_flags &= ~SID_AEN; + xpt_async(AC_GETDEV_CHANGED, path, NULL); cam_fill_ataio(ataio, 1, probedone, @@ -1157,6 +1163,12 @@ notsata: cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); softc->caps = caps; + /* Remember what transport thinks about AEN. */ + if (softc->caps & CTS_SATA_CAPS_H_AN) + path->device->inq_flags |= SID_AEN; + else + path->device->inq_flags &= ~SID_AEN; + xpt_async(AC_GETDEV_CHANGED, path, NULL); if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; xpt_acquire_device(path->device); Modified: stable/9/sys/cam/cam_ccb.h ============================================================================== --- stable/9/sys/cam/cam_ccb.h Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/cam_ccb.h Fri Apr 5 11:41:56 2013 (r249152) @@ -755,6 +755,7 @@ struct ccb_relsim { * Definitions for the asynchronous callback CCB fields. */ typedef enum { + AC_UNIT_ATTENTION = 0x4000,/* Device reported UNIT ATTENTION */ AC_ADVINFO_CHANGED = 0x2000,/* Advance info might have changes */ AC_CONTRACT = 0x1000,/* A contractual callback */ AC_GETDEV_CHANGED = 0x800,/* Getdev info might have changed */ Modified: stable/9/sys/cam/cam_periph.c ============================================================================== --- stable/9/sys/cam/cam_periph.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/cam_periph.c Fri Apr 5 11:41:56 2013 (r249152) @@ -1604,6 +1604,7 @@ cam_periph_error(union ccb *ccb, cam_fla const char *action_string; cam_status status; int frozen, error, openings, print, lost_device; + int error_code, sense_key, asc, ascq; u_int32_t relsim_flags, timeout; print = 1; @@ -1770,6 +1771,12 @@ cam_periph_error(union ccb *ccb, cam_fla xpt_async(AC_LOST_DEVICE, newpath, NULL); xpt_free_path(newpath); } + + /* Broadcast UNIT ATTENTIONs to all periphs. */ + } else if (scsi_extract_sense_ccb(ccb, + &error_code, &sense_key, &asc, &ascq) && + sense_key == SSD_KEY_UNIT_ATTENTION) { + xpt_async(AC_UNIT_ATTENTION, orig_ccb->ccb_h.path, orig_ccb); } /* Attempt a retry */ Modified: stable/9/sys/cam/cam_xpt.c ============================================================================== --- stable/9/sys/cam/cam_xpt.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/cam_xpt.c Fri Apr 5 11:41:56 2013 (r249152) @@ -4053,6 +4053,7 @@ xpt_async_string(u_int32_t async_code) case AC_GETDEV_CHANGED: return ("AC_GETDEV_CHANGED"); case AC_CONTRACT: return ("AC_CONTRACT"); case AC_ADVINFO_CHANGED: return ("AC_ADVINFO_CHANGED"); + case AC_UNIT_ATTENTION: return ("AC_UNIT_ATTENTION"); } return ("AC_UNKNOWN"); } Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:41:56 2013 (r249152) @@ -97,6 +97,7 @@ typedef enum { CD_FLAG_NEW_DISC = 0x0002, CD_FLAG_DISC_LOCKED = 0x0004, CD_FLAG_DISC_REMOVABLE = 0x0008, + CD_FLAG_SAW_MEDIA = 0x0010, CD_FLAG_CHANGER = 0x0040, CD_FLAG_ACTIVE = 0x0080, CD_FLAG_SCHED_ON_COMP = 0x0100, @@ -110,6 +111,7 @@ typedef enum { CD_CCB_PROBE = 0x01, CD_CCB_BUFFER_IO = 0x02, CD_CCB_WAITING = 0x03, + CD_CCB_TUR = 0x04, CD_CCB_TYPE_MASK = 0x0F, CD_CCB_RETRY_UA = 0x10 } cd_ccb_state; @@ -154,12 +156,14 @@ struct cd_softc { struct cam_periph *periph; int minimum_command_size; int outstanding_cmds; + int tur; struct task sysctl_task; struct sysctl_ctx_list sysctl_ctx; struct sysctl_oid *sysctl_tree; STAILQ_HEAD(, cd_mode_params) mode_queue; struct cd_tocdata toc; struct disk *disk; + struct callout mediapoll_c; }; struct cd_page_sizes { @@ -281,6 +285,7 @@ static int cdsendkey(struct cam_periph struct dvd_authinfo *authinfo); static int cdreaddvdstructure(struct cam_periph *periph, struct dvd_struct *dvdstruct); +static timeout_t cdmediapoll; static struct periph_driver cddriver = { @@ -290,6 +295,9 @@ static struct periph_driver cddriver = PERIPHDRIVER_DECLARE(cd, cddriver); +#ifndef CD_DEFAULT_POLL_PERIOD +#define CD_DEFAULT_POLL_PERIOD 3 +#endif #ifndef CD_DEFAULT_RETRY #define CD_DEFAULT_RETRY 4 #endif @@ -303,6 +311,7 @@ PERIPHDRIVER_DECLARE(cd, cddriver); #define CHANGER_MAX_BUSY_SECONDS 15 #endif +static int cd_poll_period = CD_DEFAULT_POLL_PERIOD; static int cd_retry_count = CD_DEFAULT_RETRY; static int cd_timeout = CD_DEFAULT_TIMEOUT; static int changer_min_busy_seconds = CHANGER_MIN_BUSY_SECONDS; @@ -311,6 +320,9 @@ static int changer_max_busy_seconds = CH static SYSCTL_NODE(_kern_cam, OID_AUTO, cd, CTLFLAG_RD, 0, "CAM CDROM driver"); static SYSCTL_NODE(_kern_cam_cd, OID_AUTO, changer, CTLFLAG_RD, 0, "CD Changer"); +SYSCTL_INT(_kern_cam_cd, OID_AUTO, poll_period, CTLFLAG_RW, + &cd_poll_period, 0, "Media polling period in seconds"); +TUNABLE_INT("kern.cam.cd.poll_period", &cd_poll_period); SYSCTL_INT(_kern_cam_cd, OID_AUTO, retry_count, CTLFLAG_RW, &cd_retry_count, 0, "Normal I/O retry count"); TUNABLE_INT("kern.cam.cd.retry_count", &cd_retry_count); @@ -494,6 +506,7 @@ cdcleanup(struct cam_periph *periph) xpt_print(periph->path, "can't remove sysctl context\n"); } + callout_drain(&softc->mediapoll_c); disk_destroy(softc->disk); free(softc, M_DEVBUF); cam_periph_lock(periph); @@ -504,6 +517,7 @@ cdasync(void *callback_arg, u_int32_t co struct cam_path *path, void *arg) { struct cam_periph *periph; + struct cd_softc *softc; periph = (struct cam_periph *)callback_arg; switch (code) { @@ -541,10 +555,39 @@ cdasync(void *callback_arg, u_int32_t co break; } + case AC_UNIT_ATTENTION: + { + union ccb *ccb; + int error_code, sense_key, asc, ascq; + + softc = (struct cd_softc *)periph->softc; + ccb = (union ccb *)arg; + + /* + * Handle all media change UNIT ATTENTIONs except + * our own, as they will be handled by cderror(). + */ + if (xpt_path_periph(ccb->ccb_h.path) != periph && + scsi_extract_sense_ccb(ccb, + &error_code, &sense_key, &asc, &ascq)) { + if (asc == 0x28 && ascq == 0x00) + disk_media_changed(softc->disk, M_NOWAIT); + } + cam_periph_async(periph, code, path, arg); + break; + } + case AC_SCSI_AEN: + softc = (struct cd_softc *)periph->softc; + if (softc->state == CD_STATE_NORMAL && !softc->tur) { + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { + softc->tur = 1; + xpt_schedule(periph, CAM_PRIORITY_DEV); + } + } + /* FALLTHROUGH */ case AC_SENT_BDR: case AC_BUS_RESET: { - struct cd_softc *softc; struct ccb_hdr *ccbh; softc = (struct cd_softc *)periph->softc; @@ -784,8 +827,8 @@ cdregister(struct cam_periph *periph, vo * Add an async callback so that we get * notified if this device goes away. */ - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE, - cdasync, periph, periph->path); + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | + AC_SCSI_AEN | AC_UNIT_ATTENTION, cdasync, periph, periph->path); /* * If the target lun is greater than 0, we most likely have a CD @@ -1001,6 +1044,17 @@ cdregister(struct cam_periph *periph, vo } } + /* + * Schedule a periodic media polling events. + */ + callout_init_mtx(&softc->mediapoll_c, periph->sim->mtx, 0); + if ((softc->flags & CD_FLAG_DISC_REMOVABLE) && + (softc->flags & CD_FLAG_CHANGER) == 0 && + (cgd->inq_flags & SID_AEN) == 0 && + cd_poll_period != 0) + callout_reset(&softc->mediapoll_c, cd_poll_period * hz, + cdmediapoll, periph); + cdregisterexit: if ((softc->flags & CD_FLAG_CHANGER) == 0) @@ -1496,8 +1550,25 @@ cdstart(struct cam_periph *periph, union periph->immediate_priority = CAM_PRIORITY_NONE; wakeup(&periph->ccb_list); } else if (bp == NULL) { - xpt_release_ccb(start_ccb); + if (softc->tur) { + softc->tur = 0; + csio = &start_ccb->csio; + scsi_test_unit_ready(csio, + /*retries*/ cd_retry_count, + cddone, + MSG_SIMPLE_Q_TAG, + SSD_FULL_SIZE, + cd_timeout); + start_ccb->ccb_h.ccb_bp = NULL; + start_ccb->ccb_h.ccb_state = CD_CCB_TUR; + xpt_action(start_ccb); + } else + xpt_release_ccb(start_ccb); } else { + if (softc->tur) { + softc->tur = 0; + cam_periph_release_locked(periph); + } bioq_remove(&softc->bio_queue, bp); scsi_read_write(&start_ccb->csio, @@ -1541,7 +1612,7 @@ cdstart(struct cam_periph *periph, union xpt_action(start_ccb); } - if (bp != NULL) { + if (bp != NULL || softc->tur) { /* Have more work to do, so ensure we stay scheduled */ xpt_schedule(periph, CAM_PRIORITY_NORMAL); } @@ -1835,6 +1906,25 @@ cddone(struct cam_periph *periph, union wakeup(&done_ccb->ccb_h.cbfcnp); return; } + case CD_CCB_TUR: + { + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + + if (cderror(done_ccb, CAM_RETRY_SELTO, + SF_RETRY_UA | SF_NO_RECOVERY | SF_NO_PRINT) == + ERESTART) + return; + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(done_ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + } + xpt_release_ccb(done_ccb); + cam_periph_release_locked(periph); + return; + } default: break; } @@ -2826,7 +2916,7 @@ cdcheckmedia(struct cam_periph *periph) cdprevent(periph, PR_ALLOW); return (error); } else { - softc->flags |= CD_FLAG_VALID_MEDIA; + softc->flags |= CD_FLAG_SAW_MEDIA | CD_FLAG_VALID_MEDIA; softc->disk->d_sectorsize = softc->params.blksize; softc->disk->d_mediasize = (off_t)softc->params.blksize * softc->params.disksize; @@ -3171,6 +3261,14 @@ cderror(union ccb *ccb, u_int32_t cam_fl &error_code, &sense_key, &asc, &ascq)) { if (sense_key == SSD_KEY_ILLEGAL_REQUEST) error = cd6byteworkaround(ccb); + else if (sense_key == SSD_KEY_UNIT_ATTENTION && + asc == 0x28 && ascq == 0x00) + disk_media_changed(softc->disk, M_NOWAIT); + else if (sense_key == SSD_KEY_NOT_READY && + asc == 0x3a && (softc->flags & CD_FLAG_SAW_MEDIA)) { + softc->flags &= ~CD_FLAG_SAW_MEDIA; + disk_media_gone(softc->disk, M_NOWAIT); + } } if (error == ERESTART) @@ -3186,6 +3284,26 @@ cderror(union ccb *ccb, u_int32_t cam_fl &softc->saved_ccb)); } +static void +cdmediapoll(void *arg) +{ + struct cam_periph *periph = arg; + struct cd_softc *softc = periph->softc; + + if (softc->flags & CD_FLAG_CHANGER) + return; + + if (softc->state == CD_STATE_NORMAL && !softc->tur) { + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { + softc->tur = 1; + xpt_schedule(periph, CAM_PRIORITY_DEV); + } + } + /* Queue us up again */ + if (cd_poll_period != 0) + callout_schedule(&softc->mediapoll_c, cd_poll_period * hz); +} + /* * Read table of contents */ Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:41:56 2013 (r249152) @@ -77,6 +77,7 @@ typedef enum { DA_FLAG_NEW_PACK = 0x002, DA_FLAG_PACK_LOCKED = 0x004, DA_FLAG_PACK_REMOVABLE = 0x008, + DA_FLAG_SAW_MEDIA = 0x010, DA_FLAG_NEED_OTAG = 0x020, DA_FLAG_WENT_IDLE = 0x040, DA_FLAG_RETRY_UA = 0x080, @@ -101,6 +102,7 @@ typedef enum { DA_CCB_WAITING = 0x04, DA_CCB_DUMP = 0x05, DA_CCB_DELETE = 0x06, + DA_CCB_TUR = 0x07, DA_CCB_TYPE_MASK = 0x0F, DA_CCB_RETRY_UA = 0x10 } da_ccb_state; @@ -150,6 +152,7 @@ struct da_softc { int unmap_max_ranges; int unmap_max_lba; int delete_running; + int tur; da_delete_methods delete_method; struct disk_params params; struct disk *disk; @@ -161,6 +164,7 @@ struct da_softc { uint64_t wwpn; uint8_t unmap_buf[UNMAP_MAX_RANGES * 16 + 8]; struct scsi_read_capacity_data_long rcaplong; + struct callout mediapoll_c; }; struct da_quirk_entry { @@ -875,6 +879,11 @@ static void dasetgeom(struct cam_periph size_t rcap_size); static timeout_t dasendorderedtag; static void dashutdown(void *arg, int howto); +static timeout_t damediapoll; + +#ifndef DA_DEFAULT_POLL_PERIOD +#define DA_DEFAULT_POLL_PERIOD 3 +#endif #ifndef DA_DEFAULT_TIMEOUT #define DA_DEFAULT_TIMEOUT 60 /* Timeout in seconds */ @@ -889,12 +898,16 @@ static void dashutdown(void *arg, int h #endif +static int da_poll_period = DA_DEFAULT_POLL_PERIOD; static int da_retry_count = DA_DEFAULT_RETRY; static int da_default_timeout = DA_DEFAULT_TIMEOUT; static int da_send_ordered = DA_DEFAULT_SEND_ORDERED; static SYSCTL_NODE(_kern_cam, OID_AUTO, da, CTLFLAG_RD, 0, "CAM Direct Access Disk driver"); +SYSCTL_INT(_kern_cam_da, OID_AUTO, poll_period, CTLFLAG_RW, + &da_poll_period, 0, "Media polling period in seconds"); +TUNABLE_INT("kern.cam.da.poll_period", &da_poll_period); SYSCTL_INT(_kern_cam_da, OID_AUTO, retry_count, CTLFLAG_RW, &da_retry_count, 0, "Normal I/O retry count"); TUNABLE_INT("kern.cam.da.retry_count", &da_retry_count); @@ -984,6 +997,9 @@ daopen(struct disk *dp) (softc->quirks & DA_Q_NO_PREVENT) == 0) daprevent(periph, PR_PREVENT); + if (error == 0) + softc->flags |= DA_FLAG_SAW_MEDIA; + cam_periph_unhold(periph); cam_periph_unlock(periph); @@ -1068,7 +1084,8 @@ daschedule(struct cam_periph *periph) /* Check if we have more work to do. */ if (bioq_first(&softc->bio_queue) || - (!softc->delete_running && bioq_first(&softc->delete_queue))) { + (!softc->delete_running && bioq_first(&softc->delete_queue)) || + softc->tur) { prio = CAM_PRIORITY_NORMAL; } @@ -1315,6 +1332,7 @@ dacleanup(struct cam_periph *periph) xpt_print(periph->path, "can't remove sysctl context\n"); } + callout_drain(&softc->mediapoll_c); disk_destroy(softc->disk); callout_drain(&softc->sendordered_c); free(softc, M_DEVBUF); @@ -1326,6 +1344,7 @@ daasync(void *callback_arg, u_int32_t co struct cam_path *path, void *arg) { struct cam_periph *periph; + struct da_softc *softc; periph = (struct cam_periph *)callback_arg; switch (code) { @@ -1377,10 +1396,43 @@ daasync(void *callback_arg, u_int32_t co } break; } + case AC_UNIT_ATTENTION: + { + union ccb *ccb; + int error_code, sense_key, asc, ascq; + + softc = (struct da_softc *)periph->softc; + ccb = (union ccb *)arg; + + /* + * Handle all UNIT ATTENTIONs except our own, + * as they will be handled by daerror(). + */ + if (xpt_path_periph(ccb->ccb_h.path) != periph && + scsi_extract_sense_ccb(ccb, + &error_code, &sense_key, &asc, &ascq)) { + if (asc == 0x2A && ascq == 0x09) { + xpt_print(ccb->ccb_h.path, + "capacity data has changed\n"); + dareprobe(periph); + } else if (asc == 0x28 && ascq == 0x00) + disk_media_changed(softc->disk, M_NOWAIT); + } + cam_periph_async(periph, code, path, arg); + break; + } + case AC_SCSI_AEN: + softc = (struct da_softc *)periph->softc; + if (softc->state == DA_STATE_NORMAL && !softc->tur) { + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { + softc->tur = 1; + xpt_schedule(periph, CAM_PRIORITY_DEV); + } + } + /* FALLTHROUGH */ case AC_SENT_BDR: case AC_BUS_RESET: { - struct da_softc *softc; struct ccb_hdr *ccbh; softc = (struct da_softc *)periph->softc; @@ -1711,9 +1763,9 @@ daregister(struct cam_periph *periph, vo * fine without them and the only alternative * would be to not attach the device on failure. */ - xpt_register_async(AC_SENT_BDR | AC_BUS_RESET - | AC_LOST_DEVICE | AC_ADVINFO_CHANGED, - daasync, periph, periph->path); + xpt_register_async(AC_SENT_BDR | AC_BUS_RESET | AC_LOST_DEVICE | + AC_ADVINFO_CHANGED | AC_SCSI_AEN | AC_UNIT_ATTENTION, + daasync, periph, periph->path); /* * Emit an attribute changed notification just in case @@ -1723,6 +1775,16 @@ daregister(struct cam_periph *periph, vo */ disk_attr_changed(softc->disk, "GEOM::physpath", M_NOWAIT); + /* + * Schedule a periodic media polling events. + */ + callout_init_mtx(&softc->mediapoll_c, periph->sim->mtx, 0); + if ((softc->flags & DA_FLAG_PACK_REMOVABLE) && + (cgd->inq_flags & SID_AEN) == 0 && + da_poll_period != 0) + callout_reset(&softc->mediapoll_c, da_poll_period * hz, + damediapoll, periph); + xpt_schedule(periph, CAM_PRIORITY_DEV); return(CAM_REQ_CMP); @@ -1860,9 +1922,25 @@ dastart(struct cam_periph *periph, union /* Run regular command. */ bp = bioq_takefirst(&softc->bio_queue); if (bp == NULL) { - xpt_release_ccb(start_ccb); + if (softc->tur) { + softc->tur = 0; + scsi_test_unit_ready(&start_ccb->csio, + /*retries*/ da_retry_count, + dadone, + MSG_SIMPLE_Q_TAG, + SSD_FULL_SIZE, + da_default_timeout * 1000); + start_ccb->ccb_h.ccb_bp = NULL; + start_ccb->ccb_h.ccb_state = DA_CCB_TUR; + xpt_action(start_ccb); + } else + xpt_release_ccb(start_ccb); break; } + if (softc->tur) { + softc->tur = 0; + cam_periph_release_locked(periph); + } if ((bp->bio_flags & BIO_ORDERED) != 0 || (softc->flags & DA_FLAG_NEED_OTAG) != 0) { @@ -2429,6 +2507,25 @@ dadone(struct cam_periph *periph, union case DA_CCB_DUMP: /* No-op. We're polling */ return; + case DA_CCB_TUR: + { + if ((done_ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + + if (daerror(done_ccb, CAM_RETRY_SELTO, + SF_RETRY_UA | SF_NO_RECOVERY | SF_NO_PRINT) == + ERESTART) + return; + if ((done_ccb->ccb_h.status & CAM_DEV_QFRZN) != 0) + cam_release_devq(done_ccb->ccb_h.path, + /*relsim_flags*/0, + /*reduction*/0, + /*timeout*/0, + /*getcount_only*/0); + } + xpt_release_ccb(done_ccb); + cam_periph_release_locked(periph); + return; + } default: break; } @@ -2489,6 +2586,13 @@ daerror(union ccb *ccb, u_int32_t cam_fl xpt_print(periph->path, "capacity data has changed\n"); dareprobe(periph); sense_flags |= SF_NO_PRINT; + } else if (sense_key == SSD_KEY_UNIT_ATTENTION && + asc == 0x28 && ascq == 0x00) + disk_media_changed(softc->disk, M_NOWAIT); + else if (sense_key == SSD_KEY_NOT_READY && + asc == 0x3a && (softc->flags & DA_FLAG_SAW_MEDIA)) { + softc->flags &= ~DA_FLAG_SAW_MEDIA; + disk_media_gone(softc->disk, M_NOWAIT); } } if (error == ERESTART) @@ -2505,6 +2609,23 @@ daerror(union ccb *ccb, u_int32_t cam_fl } static void +damediapoll(void *arg) +{ + struct cam_periph *periph = arg; + struct da_softc *softc = periph->softc; + + if (softc->state == DA_STATE_NORMAL && !softc->tur) { + if (cam_periph_acquire(periph) == CAM_REQ_CMP) { + softc->tur = 1; + daschedule(periph); + } + } + /* Queue us up again */ + if (da_poll_period != 0) + callout_schedule(&softc->mediapoll_c, da_poll_period * hz); +} + +static void daprevent(struct cam_periph *periph, int action) { struct da_softc *softc; Modified: stable/9/sys/geom/geom.h ============================================================================== --- stable/9/sys/geom/geom.h Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom.h Fri Apr 5 11:41:56 2013 (r249152) @@ -169,7 +169,9 @@ struct g_consumer { struct g_provider *provider; LIST_ENTRY(g_consumer) consumers; /* XXX: better name */ int acr, acw, ace; - int spoiled; + int flags; +#define G_CF_SPOILED 0x1 +#define G_CF_ORPHAN 0x4 struct devstat *stat; u_int nstart, nend; @@ -242,6 +244,8 @@ int g_post_event(g_event_t *func, void * int g_waitfor_event(g_event_t *func, void *arg, int flag, ...); void g_cancel_event(void *ref); int g_attr_changed(struct g_provider *pp, const char *attr, int flag); +int g_media_changed(struct g_provider *pp, int flag); +int g_media_gone(struct g_provider *pp, int flag); void g_orphan_provider(struct g_provider *pp, int error); void g_waitidlelock(void); Modified: stable/9/sys/geom/geom_dev.c ============================================================================== --- stable/9/sys/geom/geom_dev.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_dev.c Fri Apr 5 11:41:56 2013 (r249152) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -105,6 +106,21 @@ g_dev_print(void) static void g_dev_attrchanged(struct g_consumer *cp, const char *attr) { + struct cdev *dev; + char buf[SPECNAMELEN + 6]; + + if (strcmp(attr, "GEOM::media") == 0) { + dev = cp->geom->softc; + snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); + devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, M_WAITOK); + dev = cp->cp_alias_dev; + if (dev != NULL) { + snprintf(buf, sizeof(buf), "cdev=%s", dev->si_name); + devctl_notify_f("DEVFS", "CDEV", "MEDIACHANGE", buf, + M_WAITOK); + } + return; + } if (strcmp(attr, "GEOM::physpath") != 0) return; @@ -119,7 +135,6 @@ g_dev_attrchanged(struct g_consumer *cp, g_io_getattr("GEOM::physpath", cp, &physpath_len, physpath); g_access(cp, -1, 0, 0); if (error == 0 && strlen(physpath) != 0) { - struct cdev *dev; struct cdev *old_alias_dev; struct cdev **alias_devp; @@ -161,9 +176,6 @@ g_dev_taste(struct g_class *mp, struct g g_trace(G_T_TOPOLOGY, "dev_taste(%s,%s)", mp->name, pp->name); g_topology_assert(); - LIST_FOREACH(cp, &pp->consumers, consumers) - if (cp->geom->class == mp) - return (NULL); gp = g_new_geomf(mp, "%s", pp->name); cp = g_new_consumer(gp); error = g_attach(cp, pp); Modified: stable/9/sys/geom/geom_disk.c ============================================================================== --- stable/9/sys/geom/geom_disk.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_disk.c Fri Apr 5 11:41:56 2013 (r249152) @@ -649,6 +649,32 @@ disk_attr_changed(struct disk *dp, const (void)g_attr_changed(pp, attr, flag); } +void +disk_media_changed(struct disk *dp, int flag) +{ + struct g_geom *gp; + struct g_provider *pp; + + gp = dp->d_geom; + if (gp != NULL) { + LIST_FOREACH(pp, &gp->provider, provider) + g_media_changed(pp, flag); + } +} + +void +disk_media_gone(struct disk *dp, int flag) +{ + struct g_geom *gp; + struct g_provider *pp; + + gp = dp->d_geom; + if (gp != NULL) { + LIST_FOREACH(pp, &gp->provider, provider) + g_media_gone(pp, flag); + } +} + static void g_kern_disks(void *p, int flag __unused) { Modified: stable/9/sys/geom/geom_disk.h ============================================================================== --- stable/9/sys/geom/geom_disk.h Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_disk.h Fri Apr 5 11:41:56 2013 (r249152) @@ -112,6 +112,8 @@ void disk_create(struct disk *disk, int void disk_destroy(struct disk *disk); void disk_gone(struct disk *disk); void disk_attr_changed(struct disk *dp, const char *attr, int flag); +void disk_media_changed(struct disk *dp, int flag); +void disk_media_gone(struct disk *dp, int flag); #define DISK_VERSION_00 0x58561059 #define DISK_VERSION_01 0x5856105a Modified: stable/9/sys/geom/geom_event.c ============================================================================== --- stable/9/sys/geom/geom_event.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_event.c Fri Apr 5 11:41:56 2013 (r249152) @@ -202,14 +202,12 @@ g_orphan_register(struct g_provider *pp) * Tell all consumers the bad news. * Don't be surprised if they self-destruct. */ - cp = LIST_FIRST(&pp->consumers); - while (cp != NULL) { - cp2 = LIST_NEXT(cp, consumers); + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, cp2) { KASSERT(cp->geom->orphan != NULL, ("geom %s has no orphan, class %s", cp->geom->name, cp->geom->class->name)); + cp->flags |= G_CF_ORPHAN; cp->geom->orphan(cp); - cp = cp2; } if (LIST_EMPTY(&pp->consumers) && wf) g_destroy_provider(pp); Modified: stable/9/sys/geom/geom_io.c ============================================================================== --- stable/9/sys/geom/geom_io.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_io.c Fri Apr 5 11:41:56 2013 (r249152) @@ -311,6 +311,8 @@ g_io_check(struct bio *bp) /* if provider is marked for error, don't disturb. */ if (pp->error) return (pp->error); + if (cp->flags & G_CF_ORPHAN) + return (ENXIO); switch(bp->bio_cmd) { case BIO_READ: Modified: stable/9/sys/geom/geom_slice.c ============================================================================== --- stable/9/sys/geom/geom_slice.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_slice.c Fri Apr 5 11:41:56 2013 (r249152) @@ -465,6 +465,7 @@ g_slice_spoiled(struct g_consumer *cp) g_topology_assert(); gp = cp->geom; g_trace(G_T_TOPOLOGY, "g_slice_spoiled(%p/%s)", cp, gp->name); + cp->flags |= G_CF_ORPHAN; gsp = gp->softc; gp->softc = NULL; g_slice_free(gsp); Modified: stable/9/sys/geom/geom_subr.c ============================================================================== --- stable/9/sys/geom/geom_subr.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/geom_subr.c Fri Apr 5 11:41:56 2013 (r249152) @@ -260,10 +260,11 @@ g_modevent(module_t mod, int type, void static void g_retaste_event(void *arg, int flag) { - struct g_class *cp, *mp; - struct g_geom *gp, *gp2; + struct g_class *mp, *mp2; + struct g_geom *gp; struct g_hh00 *hh; struct g_provider *pp; + struct g_consumer *cp; g_topology_assert(); if (flag == EV_CANCEL) /* XXX: can't happen ? */ @@ -280,17 +281,20 @@ g_retaste_event(void *arg, int flag) } g_trace(G_T_TOPOLOGY, "g_retaste(%s)", mp->name); - LIST_FOREACH(cp, &g_classes, class) { - LIST_FOREACH(gp, &cp->geom, geom) { + LIST_FOREACH(mp2, &g_classes, class) { + LIST_FOREACH(gp, &mp2->geom, geom) { LIST_FOREACH(pp, &gp->provider, provider) { if (pp->acr || pp->acw || pp->ace) continue; - LIST_FOREACH(gp2, &mp->geom, geom) { - if (!strcmp(pp->name, gp2->name)) + LIST_FOREACH(cp, &pp->consumers, consumers) { + if (cp->geom->class == mp && + (cp->flags & G_CF_ORPHAN) == 0) break; } - if (gp2 != NULL) - g_wither_geom(gp2, ENXIO); + if (cp != NULL) { + cp->flags |= G_CF_ORPHAN; + g_wither_geom(cp->geom, ENXIO); + } mp->taste(mp, pp, 0); g_topology_assert(); } @@ -531,7 +535,7 @@ g_new_provider_event(void *arg, int flag { struct g_class *mp; struct g_provider *pp; - struct g_consumer *cp; + struct g_consumer *cp, *next_cp; g_topology_assert(); if (flag == EV_CANCEL) @@ -542,11 +546,17 @@ g_new_provider_event(void *arg, int flag G_VALID_PROVIDER(pp); KASSERT(!(pp->flags & G_PF_WITHER), ("g_new_provider_event but withered")); + LIST_FOREACH_SAFE(cp, &pp->consumers, consumers, next_cp) { + if ((cp->flags & G_CF_ORPHAN) == 0 && + cp->geom->attrchanged != NULL) + cp->geom->attrchanged(cp, "GEOM::media"); + } LIST_FOREACH(mp, &g_classes, class) { if (mp->taste == NULL) continue; LIST_FOREACH(cp, &pp->consumers, consumers) - if (cp->geom->class == mp) + if (cp->geom->class == mp && + (cp->flags & G_CF_ORPHAN) == 0) break; if (cp != NULL) continue; @@ -803,7 +813,7 @@ g_access(struct g_consumer *cp, int dcr, * are probably just ahead of the event telling us that. Fail * now rather than having to unravel this later. */ - if (cp->geom->spoiled != NULL && cp->spoiled && + if (cp->geom->spoiled != NULL && (cp->flags & G_CF_SPOILED) && (dcr > 0 || dcw > 0 || dce > 0)) return (ENXIO); @@ -953,6 +963,7 @@ g_std_spoiled(struct g_consumer *cp) g_topology_assert(); G_VALID_CONSUMER(cp); g_trace(G_T_TOPOLOGY, "g_std_spoiled(%p)", cp); + cp->flags |= G_CF_ORPHAN; g_detach(cp); gp = cp->geom; LIST_FOREACH(pp, &gp->provider, provider) @@ -988,9 +999,9 @@ g_spoil_event(void *arg, int flag) G_VALID_PROVIDER(pp); for (cp = LIST_FIRST(&pp->consumers); cp != NULL; cp = cp2) { cp2 = LIST_NEXT(cp, consumers); - if (!cp->spoiled) + if ((cp->flags & G_CF_SPOILED) == 0) continue; - cp->spoiled = 0; + cp->flags &= ~G_CF_SPOILED; if (cp->geom->spoiled == NULL) continue; cp->geom->spoiled(cp); @@ -1015,11 +1026,54 @@ g_spoil(struct g_provider *pp, struct g_ KASSERT(cp2->acw == 0, ("spoiling cp->acw = %d", cp2->acw)); */ KASSERT(cp2->ace == 0, ("spoiling cp->ace = %d", cp2->ace)); - cp2->spoiled++; + cp2->flags |= G_CF_SPOILED; } g_post_event(g_spoil_event, pp, M_WAITOK, pp, NULL); } +static void +g_media_changed_event(void *arg, int flag) +{ + struct g_provider *pp; + int retaste; + + g_topology_assert(); + if (flag == EV_CANCEL) + return; + pp = arg; + G_VALID_PROVIDER(pp); + + /* + * If provider was not open for writing, queue retaste after spoiling. + * If it was, retaste will happen automatically on close. + */ + retaste = (pp->acw == 0 && pp->error == 0 && + !(pp->geom->flags & G_GEOM_WITHER)); + g_spoil_event(arg, flag); + if (retaste) + g_post_event(g_new_provider_event, pp, M_WAITOK, pp, NULL); +} + +int +g_media_changed(struct g_provider *pp, int flag) +{ + struct g_consumer *cp; + + LIST_FOREACH(cp, &pp->consumers, consumers) + cp->flags |= G_CF_SPOILED; + return (g_post_event(g_media_changed_event, pp, flag, pp, NULL)); +} + +int +g_media_gone(struct g_provider *pp, int flag) +{ + struct g_consumer *cp; + + LIST_FOREACH(cp, &pp->consumers, consumers) + cp->flags |= G_CF_SPOILED; + return (g_post_event(g_spoil_event, pp, flag, pp, NULL)); +} + int g_getattr__(const char *attr, struct g_consumer *cp, void *var, int len) { @@ -1175,15 +1229,15 @@ db_show_geom_consumer(int indent, struct cp->provider); } gprintln(" access: r%dw%de%d", cp->acr, cp->acw, cp->ace); - gprintln(" spoiled: %d", cp->spoiled); + gprintln(" flags: 0x%04x", cp->flags); gprintln(" nstart: %u", cp->nstart); gprintln(" nend: %u", cp->nend); } else { gprintf("consumer: %p (%s), access=r%dw%de%d", cp, cp->provider != NULL ? cp->provider->name : "none", cp->acr, cp->acw, cp->ace); - if (cp->spoiled) - db_printf(", spoiled=%d", cp->spoiled); + if (cp->flags) + db_printf(", flags=0x%04x", cp->flags); db_printf("\n"); } } Modified: stable/9/sys/geom/part/g_part.c ============================================================================== --- stable/9/sys/geom/part/g_part.c Fri Apr 5 11:30:31 2013 (r249151) +++ stable/9/sys/geom/part/g_part.c Fri Apr 5 11:41:56 2013 (r249152) @@ -2055,6 +2055,7 @@ g_part_spoiled(struct g_consumer *cp) G_PART_TRACE((G_T_TOPOLOGY, "%s(%s)", __func__, cp->provider->name)); g_topology_assert(); + cp->flags |= G_CF_ORPHAN; g_part_wither(cp->geom, ENXIO); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:42:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 1C628DCF; Fri, 5 Apr 2013 11:42:29 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0E1E7F3; Fri, 5 Apr 2013 11:42:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BgSMs062567; Fri, 5 Apr 2013 11:42:28 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BgSwd062566; Fri, 5 Apr 2013 11:42:28 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304051142.r35BgSwd062566@svn.freebsd.org> From: Joel Dahl Date: Fri, 5 Apr 2013 11:42:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249153 - head/sbin/camcontrol 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, 05 Apr 2013 11:42:29 -0000 Author: joel (doc committer) Date: Fri Apr 5 11:42:28 2013 New Revision: 249153 URL: http://svnweb.freebsd.org/changeset/base/249153 Log: mdoc: remove superfluous paragraph macro. Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Fri Apr 5 11:41:56 2013 (r249152) +++ head/sbin/camcontrol/camcontrol.8 Fri Apr 5 11:42:28 2013 (r249153) @@ -1372,19 +1372,16 @@ camcontrol smpcmd ses0 -v -r 4 "40 0 00 Send the SMP REPORT GENERAL command to ses0, and display the number of PHYs it contains. Display SMP errors if the command fails. -.Pp .Bd -literal -offset indent camcontrol security ada0 .Ed .Pp Report security support and settings for ada0 -.Pp .Bd -literal -offset indent camcontrol security ada0 -u user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass -.Pp .Bd -literal -offset indent camcontrol security ada0 -u user -e MyPass .Ed From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:45:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9E2F0F6D; Fri, 5 Apr 2013 11:45:52 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8EDE7110; Fri, 5 Apr 2013 11:45:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BjqZK063133; Fri, 5 Apr 2013 11:45:52 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BjqBE063132; Fri, 5 Apr 2013 11:45:52 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051145.r35BjqBE063132@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:45: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: r249154 - stable/9/sys/cam/scsi 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, 05 Apr 2013 11:45:52 -0000 Author: mav Date: Fri Apr 5 11:45:52 2013 New Revision: 249154 URL: http://svnweb.freebsd.org/changeset/base/249154 Log: MFC r245251 (by smh): Removes essentially unused variables from scsi_da probe setups PR: kern/169835 Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:42:28 2013 (r249153) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:45:52 2013 (r249154) @@ -2014,7 +2014,6 @@ out: } case DA_STATE_PROBE: { - struct ccb_scsiio *csio; struct scsi_read_capacity_data *rcap; rcap = (struct scsi_read_capacity_data *) @@ -2024,8 +2023,7 @@ out: /* da_free_periph??? */ break; } - csio = &start_ccb->csio; - scsi_read_capacity(csio, + scsi_read_capacity(&start_ccb->csio, /*retries*/4, dadone, MSG_SIMPLE_Q_TAG, @@ -2039,7 +2037,6 @@ out: } case DA_STATE_PROBE2: { - struct ccb_scsiio *csio; struct scsi_read_capacity_data_long *rcaplong; rcaplong = (struct scsi_read_capacity_data_long *) @@ -2049,8 +2046,7 @@ out: /* da_free_periph??? */ break; } - csio = &start_ccb->csio; - scsi_read_capacity_16(csio, + scsi_read_capacity_16(&start_ccb->csio, /*retries*/ 4, /*cbfcnp*/ dadone, /*tag_action*/ MSG_SIMPLE_Q_TAG, From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:48:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id A3B88183; Fri, 5 Apr 2013 11:48:35 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 95E91121; Fri, 5 Apr 2013 11:48:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BmZZ1063543; Fri, 5 Apr 2013 11:48:35 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BmZGa063542; Fri, 5 Apr 2013 11:48:35 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051148.r35BmZGa063542@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:48: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: r249155 - stable/9/sys/cam/scsi 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, 05 Apr 2013 11:48:35 -0000 Author: mav Date: Fri Apr 5 11:48:35 2013 New Revision: 249155 URL: http://svnweb.freebsd.org/changeset/base/249155 Log: MFC r245252 (by smh): Updates delete_method sysctl changes to always maintain disk d_flags DISKFLAG_CANDELETE. While this change makes this layer consistent other layers such as UFS and ZFS BIO_DELETE support may not notice any change made manually via these device sysctls until the device is reopened via a mount. Also corrected var order in dadeletemethodsysctl PR: kern/169801 Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:45:52 2013 (r249154) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:48:35 2013 (r249155) @@ -863,6 +863,8 @@ static void daasync(void *callback_arg, static void dasysctlinit(void *context, int pending); static int dacmdsizesysctl(SYSCTL_HANDLER_ARGS); static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS); +static int dadeletemethodset(struct da_softc *softc, + da_delete_methods delete_method); static periph_ctor_t daregister; static periph_dtor_t dacleanup; static periph_start_t dastart; @@ -1489,7 +1491,7 @@ dasysctlinit(void *context, int pending) */ SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "delete_method", CTLTYPE_STRING | CTLFLAG_RW, - &softc->delete_method, 0, dadeletemethodsysctl, "A", + softc, 0, dadeletemethodsysctl, "A", "BIO_DELETE execution method"); SYSCTL_ADD_PROC(&softc->sysctl_ctx, SYSCTL_CHILDREN(softc->sysctl_tree), OID_AUTO, "minimum_cmd_size", CTLTYPE_INT | CTLFLAG_RW, @@ -1566,14 +1568,33 @@ dacmdsizesysctl(SYSCTL_HANDLER_ARGS) } static int +dadeletemethodset(struct da_softc *softc, da_delete_methods delete_method) +{ + + if (delete_method < 0 || delete_method > DA_DELETE_MAX) + return (EINVAL); + + softc->delete_method = delete_method; + + if (softc->delete_method > DA_DELETE_DISABLE) + softc->disk->d_flags |= DISKFLAG_CANDELETE; + else + softc->disk->d_flags &= ~DISKFLAG_CANDELETE; + + return (0); +} + +static int dadeletemethodsysctl(SYSCTL_HANDLER_ARGS) { char buf[16]; - int error; const char *p; - int i, value; + struct da_softc *softc; + int i, error, value; - value = *(int *)arg1; + softc = (struct da_softc *)arg1; + + value = softc->delete_method; if (value < 0 || value > DA_DELETE_MAX) p = "UNKNOWN"; else @@ -1585,8 +1606,7 @@ dadeletemethodsysctl(SYSCTL_HANDLER_ARGS for (i = 0; i <= DA_DELETE_MAX; i++) { if (strcmp(buf, da_delete_method_names[i]) != 0) continue; - *(int *)arg1 = i; - return (0); + return dadeletemethodset(softc, i); } return (EINVAL); } @@ -2081,24 +2101,24 @@ cmd6workaround(union ccb *ccb) if (softc->delete_method == DA_DELETE_UNMAP) { xpt_print(ccb->ccb_h.path, "UNMAP is not supported, " "switching to WRITE SAME(16) with UNMAP.\n"); - softc->delete_method = DA_DELETE_WS16; + dadeletemethodset(softc, DA_DELETE_WS16); } else if (softc->delete_method == DA_DELETE_WS16) { xpt_print(ccb->ccb_h.path, "WRITE SAME(16) with UNMAP is not supported, " "disabling BIO_DELETE.\n"); - softc->delete_method = DA_DELETE_DISABLE; + dadeletemethodset(softc, DA_DELETE_DISABLE); } else if (softc->delete_method == DA_DELETE_WS10) { xpt_print(ccb->ccb_h.path, "WRITE SAME(10) with UNMAP is not supported, " "disabling BIO_DELETE.\n"); - softc->delete_method = DA_DELETE_DISABLE; + dadeletemethodset(softc, DA_DELETE_DISABLE); } else if (softc->delete_method == DA_DELETE_ZERO) { xpt_print(ccb->ccb_h.path, "WRITE SAME(10) is not supported, " "disabling BIO_DELETE.\n"); - softc->delete_method = DA_DELETE_DISABLE; + dadeletemethodset(softc, DA_DELETE_DISABLE); } else - softc->delete_method = DA_DELETE_DISABLE; + dadeletemethodset(softc, DA_DELETE_DISABLE); while ((bp = bioq_takefirst(&softc->delete_run_queue)) != NULL) bioq_disksort(&softc->delete_queue, bp); @@ -2344,7 +2364,7 @@ dadone(struct cam_periph *periph, union rcaplong, sizeof(*rcaplong)); if ((lalba & SRC16_LBPME_A) && softc->delete_method == DA_DELETE_NONE) - softc->delete_method = DA_DELETE_UNMAP; + dadeletemethodset(softc, DA_DELETE_UNMAP); dp = &softc->params; snprintf(announce_buf, sizeof(announce_buf), "%juMB (%ju %u byte sectors: %dH %dS/T " From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:50:05 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id CE502301; Fri, 5 Apr 2013 11:50:05 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C109512F; Fri, 5 Apr 2013 11:50:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35Bo59E063824; Fri, 5 Apr 2013 11:50:05 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35Bo5sT063823; Fri, 5 Apr 2013 11:50:05 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051150.r35Bo5sT063823@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:50: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: r249156 - stable/9/sys/cam/scsi 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, 05 Apr 2013 11:50:05 -0000 Author: mav Date: Fri Apr 5 11:50:05 2013 New Revision: 249156 URL: http://svnweb.freebsd.org/changeset/base/249156 Log: MFC r245253 (by smh): Changed scsi_da device requests to use the sysctl tunable value for retry_count and da_default_timeout where their current hardcoded values matched the current default value for said tunables. PR: kern/169976 Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:48:35 2013 (r249155) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:50:05 2013 (r249156) @@ -2044,7 +2044,7 @@ out: break; } scsi_read_capacity(&start_ccb->csio, - /*retries*/4, + /*retries*/da_retry_count, dadone, MSG_SIMPLE_Q_TAG, rcap, @@ -2067,7 +2067,7 @@ out: break; } scsi_read_capacity_16(&start_ccb->csio, - /*retries*/ 4, + /*retries*/ da_retry_count, /*cbfcnp*/ dadone, /*tag_action*/ MSG_SIMPLE_Q_TAG, /*lba*/ 0, @@ -2075,7 +2075,7 @@ out: /*pmi*/ 0, rcaplong, /*sense_len*/ SSD_FULL_SIZE, - /*timeout*/ 60000); + /*timeout*/ da_default_timeout * 1000); start_ccb->ccb_h.ccb_bp = NULL; start_ccb->ccb_h.ccb_state = DA_CCB_PROBE2; xpt_action(start_ccb); From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:52:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F3D3249B; Fri, 5 Apr 2013 11:52:33 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E6244145; Fri, 5 Apr 2013 11:52:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BqXjH065750; Fri, 5 Apr 2013 11:52:33 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BqXSR065749; Fri, 5 Apr 2013 11:52:33 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051152.r35BqXSR065749@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:52:33 +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: r249157 - stable/9/sys/cam/scsi 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, 05 Apr 2013 11:52:34 -0000 Author: mav Date: Fri Apr 5 11:52:33 2013 New Revision: 249157 URL: http://svnweb.freebsd.org/changeset/base/249157 Log: MFC r245306: Do not schedule periph for payload/TUR requests if reprobe is in progress to avoid sending extra READ CAPACITY requests by dastart(). Schedule periph again on reprobe completion, or otherwise it may stuck indefinitely long. This should fix USB explore thread hanging on device unplug, waiting for periph destruction. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:50:05 2013 (r249156) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:52:33 2013 (r249157) @@ -1081,6 +1081,9 @@ daschedule(struct cam_periph *periph) struct da_softc *softc = (struct da_softc *)periph->softc; uint32_t prio; + if (softc->state != DA_STATE_NORMAL) + return; + /* Check if cam_periph_getccb() was called. */ prio = periph->immediate_priority; @@ -1425,10 +1428,10 @@ daasync(void *callback_arg, u_int32_t co } case AC_SCSI_AEN: softc = (struct da_softc *)periph->softc; - if (softc->state == DA_STATE_NORMAL && !softc->tur) { + if (!softc->tur) { if (cam_periph_acquire(periph) == CAM_REQ_CMP) { softc->tur = 1; - xpt_schedule(periph, CAM_PRIORITY_DEV); + daschedule(periph); } } /* FALLTHROUGH */ @@ -2167,6 +2170,7 @@ dadone(struct cam_periph *periph, union struct da_softc *softc; struct ccb_scsiio *csio; u_int32_t priority; + da_ccb_state state; softc = (struct da_softc *)periph->softc; priority = done_ccb->ccb_h.pinfo.priority; @@ -2174,7 +2178,8 @@ dadone(struct cam_periph *periph, union CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("dadone\n")); csio = &done_ccb->csio; - switch (csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK) { + state = csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK; + switch (state) { case DA_CCB_BUFFER_IO: case DA_CCB_DELETE: { @@ -2272,8 +2277,7 @@ dadone(struct cam_periph *periph, union softc->outstanding_cmds); } - if ((csio->ccb_h.ccb_state & DA_CCB_TYPE_MASK) == - DA_CCB_DELETE) { + if (state == DA_CCB_DELETE) { while ((bp1 = bioq_takefirst(&softc->delete_run_queue)) != NULL) { bp1->bio_resid = bp->bio_resid; @@ -2299,7 +2303,7 @@ dadone(struct cam_periph *periph, union rdcap = NULL; rcaplong = NULL; - if (softc->state == DA_STATE_PROBE) + if (state == DA_CCB_PROBE) rdcap =(struct scsi_read_capacity_data *)csio->data_ptr; else rcaplong = (struct scsi_read_capacity_data_long *) @@ -2312,7 +2316,7 @@ dadone(struct cam_periph *periph, union u_int lbppbe; /* LB per physical block exponent. */ u_int lalba; /* Lowest aligned LBA. */ - if (softc->state == DA_STATE_PROBE) { + if (state == DA_CCB_PROBE) { block_size = scsi_4btoul(rdcap->length); maxsector = scsi_4btoul(rdcap->addr); lbppbe = 0; @@ -2425,7 +2429,7 @@ dadone(struct cam_periph *periph, union * If we tried READ CAPACITY(16) and failed, * fallback to READ CAPACITY(10). */ - if ((softc->state == DA_STATE_PROBE2) && + if ((state == DA_CCB_PROBE2) && (softc->flags & DA_FLAG_CAN_RC16) && (((csio->ccb_h.status & CAM_STATUS_MASK) == CAM_REQ_INVALID) || @@ -2505,7 +2509,8 @@ dadone(struct cam_periph *periph, union * operation. */ xpt_release_ccb(done_ccb); - softc->state = DA_STATE_NORMAL; + softc->state = DA_STATE_NORMAL; + daschedule(periph); wakeup(&softc->disk->d_mediasize); if ((softc->flags & DA_FLAG_PROBED) == 0) { softc->flags |= DA_FLAG_PROBED; @@ -2630,7 +2635,7 @@ damediapoll(void *arg) struct cam_periph *periph = arg; struct da_softc *softc = periph->softc; - if (softc->state == DA_STATE_NORMAL && !softc->tur) { + if (!softc->tur && softc->outstanding_cmds == 0) { if (cam_periph_acquire(periph) == CAM_REQ_CMP) { softc->tur = 1; daschedule(periph); From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:53:54 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 61CF1608; Fri, 5 Apr 2013 11:53:54 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 52CEF151; Fri, 5 Apr 2013 11:53:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BrsKW065977; Fri, 5 Apr 2013 11:53:54 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BrsqC065976; Fri, 5 Apr 2013 11:53:54 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051153.r35BrsqC065976@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:53: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: r249158 - stable/9/sys/cam/scsi 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, 05 Apr 2013 11:53:54 -0000 Author: mav Date: Fri Apr 5 11:53:53 2013 New Revision: 249158 URL: http://svnweb.freebsd.org/changeset/base/249158 Log: MFC r245310: - Add missig xpt_schedule() call for cases when requested immediate CCB priority is lower then payload/TUR one. - Reduce TUR priority and avoid sending them if there are any other outstanding commands, alike to DA driver. Modified: stable/9/sys/cam/scsi/scsi_cd.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_cd.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:52:33 2013 (r249157) +++ stable/9/sys/cam/scsi/scsi_cd.c Fri Apr 5 11:53:53 2013 (r249158) @@ -581,7 +581,7 @@ cdasync(void *callback_arg, u_int32_t co if (softc->state == CD_STATE_NORMAL && !softc->tur) { if (cam_periph_acquire(periph) == CAM_REQ_CMP) { softc->tur = 1; - xpt_schedule(periph, CAM_PRIORITY_DEV); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); } } /* FALLTHROUGH */ @@ -1612,9 +1612,11 @@ cdstart(struct cam_periph *periph, union xpt_action(start_ccb); } - if (bp != NULL || softc->tur) { + if (bp != NULL || softc->tur || + periph->immediate_priority != CAM_PRIORITY_NONE) { /* Have more work to do, so ensure we stay scheduled */ - xpt_schedule(periph, CAM_PRIORITY_NORMAL); + xpt_schedule(periph, min(CAM_PRIORITY_NORMAL, + periph->immediate_priority)); } break; } @@ -3293,10 +3295,11 @@ cdmediapoll(void *arg) if (softc->flags & CD_FLAG_CHANGER) return; - if (softc->state == CD_STATE_NORMAL && !softc->tur) { + if (softc->state == CD_STATE_NORMAL && !softc->tur && + softc->outstanding_cmds == 0) { if (cam_periph_acquire(periph) == CAM_REQ_CMP) { softc->tur = 1; - xpt_schedule(periph, CAM_PRIORITY_DEV); + xpt_schedule(periph, CAM_PRIORITY_NORMAL); } } /* Queue us up again */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:55:53 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 309AA790; Fri, 5 Apr 2013 11:55:53 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 22EC5169; Fri, 5 Apr 2013 11:55:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BtrVd066342; Fri, 5 Apr 2013 11:55:53 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BtrFW066341; Fri, 5 Apr 2013 11:55:53 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051155.r35BtrFW066341@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:55: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: r249159 - stable/9/sys/cam/scsi 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, 05 Apr 2013 11:55:53 -0000 Author: mav Date: Fri Apr 5 11:55:52 2013 New Revision: 249159 URL: http://svnweb.freebsd.org/changeset/base/249159 Log: MFC r247154: Add DA_Q_NO_PREVENT quirk for Kingston DataTraveler G3 1.00 USB flash. PREVENT ALLOW MEDIUM REMOVAL commands return errors on these devices without returning sense data. In some cases unrelated following commands start to return errors too, that makes device to be dropped by CAM. Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:53:53 2013 (r249158) +++ stable/9/sys/cam/scsi/scsi_da.c Fri Apr 5 11:55:52 2013 (r249159) @@ -607,6 +607,10 @@ static struct da_quirk_entry da_quirk_ta {T_DIRECT, SIP_MEDIA_REMOVABLE, "Sony", "Sony DSC", "*"}, /*quirks*/ DA_Q_NO_SYNC_CACHE | DA_Q_NO_PREVENT }, + { + {T_DIRECT, SIP_MEDIA_REMOVABLE, "Kingston", "DataTraveler G3", + "1.00"}, /*quirks*/ DA_Q_NO_PREVENT + }, /* ATA/SATA devices over SAS/USB/... */ { /* Hitachi Advanced Format (4k) drives */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 11:57:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 09FBB911; Fri, 5 Apr 2013 11:57:42 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F094A177; Fri, 5 Apr 2013 11:57:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35BvfJk066620; Fri, 5 Apr 2013 11:57:41 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35BvfqB066619; Fri, 5 Apr 2013 11:57:41 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051157.r35BvfqB066619@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 11:57:41 +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: r249160 - stable/9/sys/cam/ata 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, 05 Apr 2013 11:57:42 -0000 Author: mav Date: Fri Apr 5 11:57:41 2013 New Revision: 249160 URL: http://svnweb.freebsd.org/changeset/base/249160 Log: MFC r247161: Hide SEMB port of the SiI3826 Port Multiplier by default to avoid extra errors while it tries to talk via I2C to usually missing external SEP. There is tunable to enable it back when needed. Modified: stable/9/sys/cam/ata/ata_pmp.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ata/ata_pmp.c ============================================================================== --- stable/9/sys/cam/ata/ata_pmp.c Fri Apr 5 11:55:52 2013 (r249159) +++ stable/9/sys/cam/ata/ata_pmp.c Fri Apr 5 11:57:41 2013 (r249160) @@ -595,7 +595,9 @@ pmpdone(struct cam_periph *periph, union * causes timeouts if external SEP is not connected * to PMP over I2C. */ - if (softc->pm_pid == 0x37261095 && softc->pm_ports == 6) + if ((softc->pm_pid == 0x37261095 || + softc->pm_pid == 0x38261095) && + softc->pm_ports == 6) softc->pm_ports = 5; /* From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 13:11:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 51E2D806; Fri, 5 Apr 2013 13:11:29 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 44F22681; Fri, 5 Apr 2013 13:11:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35DBTsd089192; Fri, 5 Apr 2013 13:11:29 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35DBT8Z089191; Fri, 5 Apr 2013 13:11:29 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304051311.r35DBT8Z089191@svn.freebsd.org> From: Alexander Motin Date: Fri, 5 Apr 2013 13:11:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249161 - head/sys/geom 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, 05 Apr 2013 13:11:29 -0000 Author: mav Date: Fri Apr 5 13:11:28 2013 New Revision: 249161 URL: http://svnweb.freebsd.org/changeset/base/249161 Log: Following r241022, replace iteration over the provider list on media events by taking first one and asserting that there is no others. MFC after: 1 week Modified: head/sys/geom/geom_disk.c Modified: head/sys/geom/geom_disk.c ============================================================================== --- head/sys/geom/geom_disk.c Fri Apr 5 11:57:41 2013 (r249160) +++ head/sys/geom/geom_disk.c Fri Apr 5 13:11:28 2013 (r249161) @@ -658,8 +658,12 @@ disk_media_changed(struct disk *dp, int gp = dp->d_geom; if (gp != NULL) { - LIST_FOREACH(pp, &gp->provider, provider) + pp = LIST_FIRST(&gp->provider); + if (pp != NULL) { + KASSERT(LIST_NEXT(pp, provider) == NULL, + ("geom %p has more than one provider", gp)); g_media_changed(pp, flag); + } } } @@ -671,8 +675,12 @@ disk_media_gone(struct disk *dp, int fla gp = dp->d_geom; if (gp != NULL) { - LIST_FOREACH(pp, &gp->provider, provider) + pp = LIST_FIRST(&gp->provider); + if (pp != NULL) { + KASSERT(LIST_NEXT(pp, provider) == NULL, + ("geom %p has more than one provider", gp)); g_media_gone(pp, flag); + } } } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 13:26:58 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 586FACB8 for ; Fri, 5 Apr 2013 13:26:58 +0000 (UTC) (envelope-from jdc@koitsu.org) Received: from qmta13.emeryville.ca.mail.comcast.net (qmta13.emeryville.ca.mail.comcast.net [IPv6:2001:558:fe2d:44:76:96:27:243]) by mx1.freebsd.org (Postfix) with ESMTP id 3B38070A for ; Fri, 5 Apr 2013 13:26:58 +0000 (UTC) Received: from omta13.emeryville.ca.mail.comcast.net ([76.96.30.52]) by qmta13.emeryville.ca.mail.comcast.net with comcast id LD8x1l00A17UAYkADDSxGC; Fri, 05 Apr 2013 13:26:57 +0000 Received: from koitsu.strangled.net ([67.180.84.87]) by omta13.emeryville.ca.mail.comcast.net with comcast id LDSw1l00F1t3BNj8ZDSw9b; Fri, 05 Apr 2013 13:26:57 +0000 Received: by icarus.home.lan (Postfix, from userid 1000) id 44B8A73A1C; Fri, 5 Apr 2013 06:26:56 -0700 (PDT) Date: Fri, 5 Apr 2013 06:26:56 -0700 From: Jeremy Chadwick To: Brooks Davis Subject: Re: svn commit: r248352 - in stable/9: etc share/mk Message-ID: <20130405132656.GA38611@icarus.home.lan> References: <201303152132.r2FLWfwx076672@svn.freebsd.org> <201303200918.08803.jhb@freebsd.org> <20130402175903.GA85393@lor.one-eyed-alien.net> <201304021550.43701.jhb@freebsd.org> <20130402213534.GA86221@lor.one-eyed-alien.net> <20130405055834.GA97433@icarus.home.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20130405055834.GA97433@icarus.home.lan> User-Agent: Mutt/1.5.21 (2010-09-15) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1365168417; bh=+jKCYFUpEEh/cafdvzpBCQFjGuwJU5KRLKtYPdSDX5s=; h=Received:Received:Received:Date:From:To:Subject:Message-ID: MIME-Version:Content-Type; b=gksBHBZp/OdLrWo8zfdwbRQ2kh+TEWfZBYJhh7hUieSctRVC9+GlOE8fOEqq6LGiO uWmVnSInTT07VMji6ivht4WD7NNjWzrXRtCO4p6+IuSxzog4YZM2XxAWkpHdMMNY5M t52R0J8pYVc0kDP19cl9s+SZ6Gd7Zpw+DgzWV/JZv4uAyqOzdKOJMNvbb483UdPq2d X/aAnS4cR1J7GTCfRpJu0bRsZoyEd7UF0xXikjQ0rkhusLElzKNxr0QBNBL8v9M34h zryEyiZscEKgmPTrqnjcMiTPE8Hkp2o1ZFquVZP1LbJseC4ZIRp7Wx6Z4uCsgMAJYY uWYE3hJn6CV6A== Cc: src-committers@freebsd.org, John Baldwin , svn-src-stable@freebsd.org, svn-src-all@freebsd.org, Dmitry Morozovsky , svn-src-stable-9@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, 05 Apr 2013 13:26:58 -0000 On Thu, Apr 04, 2013 at 10:58:34PM -0700, Jeremy Chadwick wrote: > On Tue, Apr 02, 2013 at 04:35:34PM -0500, Brooks Davis wrote: > > On Tue, Apr 02, 2013 at 03:50:43PM -0400, John Baldwin wrote: > > > On Tuesday, April 02, 2013 1:59:03 pm Brooks Davis wrote: > > > > On Wed, Mar 20, 2013 at 09:18:08AM -0400, John Baldwin wrote: > > > > > On Tuesday, March 19, 2013 4:06:31 pm Brooks Davis wrote: > > > > > > On Tue, Mar 19, 2013 at 09:49:47PM +0400, Dmitry Morozovsky wrote: > > > > > > > On Tue, 19 Mar 2013, Brooks Davis wrote: > > > > > > > > > > > > > > > > > Replace all known uses of ln in the build process with appropriate > > > > > > > > > > install -l invocations via new INSTALL_LINK and INSTALL_SYMLINK > > > > > > > > > > variables. > > > > > > > > > > > > > > > > > > It seems this merge breaks ``make distribution'' and hence mergemaster if your > > > > > > > > > base system is not updated yet (for example, while updating jail): > > > > > > > > > > > > > > > > Sorry for the delay in responding. I missed this yesterday. > > > > > > > > > > > > > > > > It works for me on a older 9.0-STABLE system where the base install > > > > > > > > doesn't support -l. Did you build world or run "make toolchain" in that > > > > > > > > source tree to build the bootstrap copy of install? > > > > > > > > > > > > > > Yes, this is after full ``make buildworld buildkernel'' process. > > > > > > > > > > > > I've found the problem thanks to misc/177055. It is that mergemaster > > > > > > (and etcupdate) set MAKEOBJDIRPREFIX to something in their > > > > > > temporary directory and thus deprive themselves of bootstrap tools. > > > > > > Unfortunately, I don't see a trivial fix so I've backed this out for > > > > > > now and will work on this in HEAD. > > > > > > > > > > Hummmm. In the case of etcupdate you can use 'etcupdate -B'. That is actually safe > > > > > to do in the common case where you've just updated /usr/src and built the corresponding > > > > > world in /usr/obj. It should possibly even by the default for etcupdate if a DESTDIR > > > > > is not specified. > > > > > > > > Finally getting back to this... > > > > > > > > etcupdate -B would correct the immediate problem for etcupdate. I do > > > > think that making it the default if the tree exists makes sense. It > > > > won't be more broken than a cross installworld is. > > > > > > Hmmm, checking for the obj tree is a bit hackish. I'd rather it were more > > > deterministic. I think I'd like to make it just default to -B and require > > > a new -b flag to build a new tree, but perhaps have it check for a tree > > > and error out if it doesn't exist and you don't give it -b? > > > > Just switching the default seems fine in practice. I guess it would > > probably be useful to keep an option to enable the old behavior. > > > > > > I did a quick test when I first found this issue and it would be easy to > > > > reuse the existing MAKEOBJDIRPREFIX in mergemaster as well. > > > > > > > > I think we'll want to update UPDATING to recommend that the > > > > mergemaster -p stage (and the equivalent for etcupdate) be run using the > > > > version in the source tree, not the installed one. I do wonder if it > > > > would make sense for them to attempt to find and invoke that version so > > > > simplify bootstrapping. > > > > > > Currently etcupdate doesn't implement something like -p. I need to add that as > > > I would prefer to use its conflict resolution for adding users. (That would > > > also let it serve as a full replacement for mergemaster for those who prefer it.) > > > > OK, I'll look at switching the default behavior in mergemaster and > > adding an option to revert to the old behavior. > > > > I'll also change UPDATING to suggest using the mergemaster.sh from the > > source tree for mergemaster -p. > > Please be sure to update the relevant comments in src/Makefile too > (see roughly lines 59 onward). Also, in usr.sbin/mergemaster/mergemaster.sh, it looks like someone left some debugging code around line 637 (the echo statement): http://svnweb.freebsd.org/base/stable/9/usr.sbin/mergemaster/mergemaster.sh?r1=244461&r2=248531 -- | Jeremy Chadwick jdc@koitsu.org | | UNIX Systems Administrator http://jdc.koitsu.org/ | | Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 14:30:52 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5AB735CD; Fri, 5 Apr 2013 14:30:52 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4D67E9F3; Fri, 5 Apr 2013 14:30:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35EUpAc012359; Fri, 5 Apr 2013 14:30:51 GMT (envelope-from kib@svn.freebsd.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35EUpAh012358; Fri, 5 Apr 2013 14:30:51 GMT (envelope-from kib@svn.freebsd.org) Message-Id: <201304051430.r35EUpAh012358@svn.freebsd.org> From: Konstantin Belousov Date: Fri, 5 Apr 2013 14:30:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249163 - 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: Fri, 05 Apr 2013 14:30:52 -0000 Author: kib Date: Fri Apr 5 14:30:51 2013 New Revision: 249163 URL: http://svnweb.freebsd.org/changeset/base/249163 Log: If filter of the interrupt event is not null, print it, in addition to the handler address. Add a mark to distinguish between filter and handler. Note that the arguments for both filter and handler are same. Sponsored by: The FreeBSD Foundation Reviewed by: jhb MFC after: 1 week Modified: head/sys/kern/kern_intr.c Modified: head/sys/kern/kern_intr.c ============================================================================== --- head/sys/kern/kern_intr.c Fri Apr 5 13:19:30 2013 (r249162) +++ head/sys/kern/kern_intr.c Fri Apr 5 14:30:51 2013 (r249163) @@ -1739,7 +1739,16 @@ db_dump_intrhand(struct intr_handler *ih break; } db_printf(" "); - db_printsym((uintptr_t)ih->ih_handler, DB_STGY_PROC); + if (ih->ih_filter != NULL) { + db_printf("[F]"); + db_printsym((uintptr_t)ih->ih_filter, DB_STGY_PROC); + } + if (ih->ih_handler != NULL) { + if (ih->ih_filter != NULL) + db_printf(","); + db_printf("[H]"); + db_printsym((uintptr_t)ih->ih_handler, DB_STGY_PROC); + } db_printf("(%p)", ih->ih_argument); if (ih->ih_need || (ih->ih_flags & (IH_EXCLUSIVE | IH_ENTROPY | IH_DEAD | From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 15:02:21 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 86B8EF84; Fri, 5 Apr 2013 15:02:21 +0000 (UTC) (envelope-from rpaulo@felyko.com) Received: from felyko.com (felyko.com [174.136.100.2]) by mx1.freebsd.org (Postfix) with ESMTP id 591ACCE3; Fri, 5 Apr 2013 15:02:21 +0000 (UTC) Received: from [IPv6:2601:9:4d00:ce:908b:92f3:ba85:bb5f] (unknown [IPv6:2601:9:4d00:ce:908b:92f3:ba85:bb5f]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by felyko.com (Postfix) with ESMTPSA id 83A1F3981E; Fri, 5 Apr 2013 08:02:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=felyko.com; s=mail; t=1365174140; bh=zWiyAJiPaUoMftZd8BI2beOQxWx3GFdmQlbrHiyvacY=; h=Subject:From:In-Reply-To:Date:Cc:References:To; b=X33tqNV5qLutY001PZtqMhHhIRWc3EpksfWKEq/AH04JrtM4BlzHniY9RY0J/RBld wzk+xKyVuK4iH+RekDb9zGZTzmSSYkx0xrpbjamo/vD4qkJPepsazX4J4HhYuGQG/U ttaaQ3PP2P8IHfAcODPhGTPhi/loXabhYhfeiW88= Content-Type: text/plain; charset=iso-8859-1 Mime-Version: 1.0 (Mac OS X Mail 6.3 \(1503\)) Subject: Re: svn commit: r249129 - head/sys/powerpc/aim From: Rui Paulo In-Reply-To: <515E7F22.4010804@FreeBSD.org> Date: Fri, 5 Apr 2013 08:02:20 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <77C32F25-FCE7-45FD-BF32-4BF078BEC975@felyko.com> References: <201304050453.r354riNK040459@svn.freebsd.org> <25854D59-11DB-40BD-8C7E-EC8CE68D9A4A@felyko.com> <515E7F22.4010804@FreeBSD.org> To: Alexander Motin X-Mailer: Apple Mail (2.1503) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Eitan Adler , Justin Hibbits 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, 05 Apr 2013 15:02:21 -0000 On 2013/04/05, at 0:37, Alexander Motin wrote: > On 05.04.2013 08:52, Rui Paulo wrote: >> On 2013/04/04, at 22:13, Justin Hibbits = wrote: >>> I rebuilt all ports just the other day, don't know what ports = revision it corresponds to, but I did a portsnap on Monday. And I don't = have ORGANIZATION set in make.conf. >>=20 >> How did you commit it? It's impossible for it not to appear on your = editor session. Are you sure you didn't miss it? >=20 > I've seen the same problem when committing from my laptop with SVN = built couple of weeks ago from ports. That line was present in editor, = but I expected it to be removed since I haven't touched it. But it was = not removed. OK, the server is supposed to remove it. We need to change the scripts = running on the server. Regards, -- Rui Paulo From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 15:43:23 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 2488D8DF; Fri, 5 Apr 2013 15:43:23 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail107.syd.optusnet.com.au (mail107.syd.optusnet.com.au [211.29.132.53]) by mx1.freebsd.org (Postfix) with ESMTP id DEB9CF10; Fri, 5 Apr 2013 15:43:22 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail107.syd.optusnet.com.au (Postfix) with ESMTPS id 81666D41011; Sat, 6 Apr 2013 02:21:51 +1100 (EST) Date: Sat, 6 Apr 2013 02:21:47 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: Alexander Motin Subject: Re: svn commit: r249105 - in head/sys/cam: ata scsi In-Reply-To: <515DE949.6050309@FreeBSD.org> Message-ID: <20130406020010.P1319@besplex.bde.org> References: <201304041904.r34J4F2I065527@svn.freebsd.org> <515DE949.6050309@FreeBSD.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=S7iBW/QP c=1 sm=1 a=EUEtXETBbRoA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=a83PX5LfBjoA:10 a=LWI0q0meCa_2A8PdsIIA:9 a=CjuIK1q_8ugA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: svn-src-head@FreeBSD.org, Adrian Chadd , src-committers@FreeBSD.org, svn-src-all@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, 05 Apr 2013 15:43:23 -0000 On Thu, 4 Apr 2013, Alexander Motin wrote: > On 04.04.2013 23:53, Adrian Chadd wrote: >> Hi, >> >> Isn't this a prime candidate to replace with KASSERT()? > > It could be, but NULL dereference attempt will crash system no less reliably > then KASSERT. Much more reliably: - if INAVRIANTS is not configured, then the NULL dereference still crashes properly - if INAVRIANTS is configured, then the NULL dereference gives a nice (restartable) fault, while KASSERT() calls panic() and there is no way to get back to the original context so as to to restart or debug it more easily. KASSERT() could be improved by replacing it by a a null dereference or other restartable fault, at least before calling panic() or taking any other unrestartable actions. The panic() call would still prevent restarting very easily -- you would have to back out to before the KASSERT() and fix up all the asserted conditions (usually more than a single null pointer). This method works well in userland too. Instead of assert() or abort(), use an null dereference, or more portably, a signal, or less portably, an asm with a breakpoint instruction or with the null pointer dereference (so that the compiler can't see that it gives undefined behaviour and optimize it away). I use this more to debug than to restart. Even if optimization or the debugger doesn't lose the local variables when assert() or abort() is called, it is easier to debug if you don't have to go up several frames to see the variables. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 15:56:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 8DC97C0A; Fri, 5 Apr 2013 15:56:34 +0000 (UTC) (envelope-from rpaulo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 80716FA9; Fri, 5 Apr 2013 15:56:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35FuYVh036844; Fri, 5 Apr 2013 15:56:34 GMT (envelope-from rpaulo@svn.freebsd.org) Received: (from rpaulo@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35FuYvA036843; Fri, 5 Apr 2013 15:56:34 GMT (envelope-from rpaulo@svn.freebsd.org) Message-Id: <201304051556.r35FuYvA036843@svn.freebsd.org> From: Rui Paulo Date: Fri, 5 Apr 2013 15:56:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-svnadmin@freebsd.org Subject: svn commit: r249164 - svnadmin/hooks/scripts 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: Fri, 05 Apr 2013 15:56:34 -0000 Author: rpaulo Date: Fri Apr 5 15:56:33 2013 New Revision: 249164 URL: http://svnweb.freebsd.org/changeset/base/249164 Log: Add the Sponsored by: line. Modified: svnadmin/hooks/scripts/log-police.py Modified: svnadmin/hooks/scripts/log-police.py ============================================================================== --- svnadmin/hooks/scripts/log-police.py Fri Apr 5 14:30:51 2013 (r249163) +++ svnadmin/hooks/scripts/log-police.py Fri Apr 5 15:56:33 2013 (r249164) @@ -51,6 +51,7 @@ def fix_log_message(log_message): if line == "Obtained from:": continue if line == "MFC after:": continue if line == "Security:": continue + if line == "Sponsored by:": continue s = s + line + "\n" s = s.rstrip() + "\n" return s From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 18:09:43 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E9D02D3; Fri, 5 Apr 2013 18:09:43 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DC7BC6F9; Fri, 5 Apr 2013 18:09:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35I9h4F075258; Fri, 5 Apr 2013 18:09:43 GMT (envelope-from gnn@svn.freebsd.org) Received: (from gnn@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35I9hoc075256; Fri, 5 Apr 2013 18:09:43 GMT (envelope-from gnn@svn.freebsd.org) Message-Id: <201304051809.r35I9hoc075256@svn.freebsd.org> From: "George V. Neville-Neil" Date: Fri, 5 Apr 2013 18:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249166 - head/lib/libc/sys 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, 05 Apr 2013 18:09:44 -0000 Author: gnn Date: Fri Apr 5 18:09:43 2013 New Revision: 249166 URL: http://svnweb.freebsd.org/changeset/base/249166 Log: Correct the returned message lengths for timeval and bintime control messages (SO_BINTIME, SO_TIMEVAL). Obtained from: phk Modified: head/lib/libc/sys/getsockopt.2 Modified: head/lib/libc/sys/getsockopt.2 ============================================================================== --- head/lib/libc/sys/getsockopt.2 Fri Apr 5 16:04:31 2013 (r249165) +++ head/lib/libc/sys/getsockopt.2 Fri Apr 5 18:09:43 2013 (r249166) @@ -28,7 +28,7 @@ .\" @(#)getsockopt.2 8.4 (Berkeley) 5/2/95 .\" $FreeBSD$ .\" -.Dd February 26, 2012 +.Dd April 5, 2013 .Dt GETSOCKOPT 2 .Os .Sh NAME @@ -437,7 +437,7 @@ The .Vt cmsghdr fields have the following values for TIMESTAMP: .Bd -literal - cmsg_len = sizeof(struct timeval); + cmsg_len = CMSG_LEN(sizeof(struct timeval)); cmsg_level = SOL_SOCKET; cmsg_type = SCM_TIMESTAMP; .Ed @@ -445,7 +445,7 @@ fields have the following values for TIM and for .Dv SO_BINTIME : .Bd -literal - cmsg_len = sizeof(struct bintime); + cmsg_len = CMSG_LEN(sizeof(struct bintime)); cmsg_level = SOL_SOCKET; cmsg_type = SCM_BINTIME; .Ed From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 19:00:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id EDAF07B9; Fri, 5 Apr 2013 19:00:03 +0000 (UTC) (envelope-from mdf356@gmail.com) Received: from mail-qe0-f41.google.com (mail-qe0-f41.google.com [209.85.128.41]) by mx1.freebsd.org (Postfix) with ESMTP id 6CAB0885; Fri, 5 Apr 2013 19:00:03 +0000 (UTC) Received: by mail-qe0-f41.google.com with SMTP id b10so970921qen.28 for ; Fri, 05 Apr 2013 11:59:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=OS07OTg8UHiw9kDEMwhD1RCHtG7pf8tIUbGd3Bg+Bnc=; b=d3Rxl8z/9WvjpHJV3LyHdGTsmQutCuEwpy4M0KPTCTwupQfJJG+F7PG/aZVV9I0aWn eLCnKdc2QKs78RCaYPRfQcJ6e2DCEQ/+nUEvVo+uqCuCVENpNvhDAeZSr/uVVuXpZdbA NQAbzCvRYuIJ+mY3JD96mie7jTsikPU1WWAh+bmnbeZLnXA+GW5RcLqmLJoQoKC6O8Vw 94ADj6EZZgwrLjyFw/XFwK1Ia+bnItz+jG0gfzAr5bl0Q3GqMqkgiISfpnidU6lg+xVk YoSL0n+va+rB8ceJCiL8NS/b+t5dfR8KO9qYS5UkrFNvfTuN2FG3LF0oS1khmEVkEM02 1/aQ== MIME-Version: 1.0 X-Received: by 10.229.128.156 with SMTP id k28mr3617166qcs.36.1365188397372; Fri, 05 Apr 2013 11:59:57 -0700 (PDT) Sender: mdf356@gmail.com Received: by 10.229.253.201 with HTTP; Fri, 5 Apr 2013 11:59:57 -0700 (PDT) In-Reply-To: <20130406020010.P1319@besplex.bde.org> References: <201304041904.r34J4F2I065527@svn.freebsd.org> <515DE949.6050309@FreeBSD.org> <20130406020010.P1319@besplex.bde.org> Date: Fri, 5 Apr 2013 11:59:57 -0700 X-Google-Sender-Auth: TFa58TnE_FK8VUUpKXU2mwccmow Message-ID: Subject: Re: svn commit: r249105 - in head/sys/cam: ata scsi From: mdf@FreeBSD.org To: Bruce Evans Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , Alexander Motin , "src-committers@freebsd.org" , Adrian Chadd 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, 05 Apr 2013 19:00:04 -0000 On Fri, Apr 5, 2013 at 8:21 AM, Bruce Evans wrote: > This method works well in userland too. Instead of assert() or abort(), > use an null dereference, or more portably, a signal Digressing quite a bit, doesn't abort() send a signal already, i.e. SIGABRT? And doesn't __assert() call abort()? Cheers, matthew From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 19:33:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id DFE65F57; Fri, 5 Apr 2013 19:33:32 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C20A9A07; Fri, 5 Apr 2013 19:33:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35JXWIX000922; Fri, 5 Apr 2013 19:33:32 GMT (envelope-from ken@svn.freebsd.org) Received: (from ken@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35JXWaC000919; Fri, 5 Apr 2013 19:33:32 GMT (envelope-from ken@svn.freebsd.org) Message-Id: <201304051933.r35JXWaC000919@svn.freebsd.org> From: "Kenneth D. Merry" Date: Fri, 5 Apr 2013 19:33:32 +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: r249167 - stable/9/sys/cam/ctl 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, 05 Apr 2013 19:33:33 -0000 Author: ken Date: Fri Apr 5 19:33:31 2013 New Revision: 249167 URL: http://svnweb.freebsd.org/changeset/base/249167 Log: MFC r244052 and r245288: r244052 | ken | 2012-12-09 12:53:21 -0700 (Sun, 09 Dec 2012) | 20 lines Fix a couple of CTL locking issues and clean up some duplicated code. ctl_frontend_cam_sim.c: Coalesce cfcs_online() and cfcs_offline() into a single function since these were identical except for one line. Make sure we hold the SIM lock around path creation, and calling xpt_rescan(). scsi_ctl.c: In ctlfe_onoffline(), make sure we hold the SIM lock around path creation and free calls, as well as xpt_action(). In ctlfe_lun_enable(), hold the SIM lock around path and peripheral operations that require it. Sponsored by: Spectra Logic Corporation MFC after: 1 week ------------------------------------------------------------------------ r245228 | ken | 2013-01-09 10:02:08 -0700 (Wed, 09 Jan 2013) | 43 lines Make CTL work a little better with loading and unloading drivers. Previously CTL would leave individual LUNs enabled in the target driver, whether or not the port as a whole was enabled. It would also leave the wildcard LUN enabled indefinitely. This change means that CTL will enable and disable any active LUNs, as well as the wildcard LUN, when enabling and disabling a port. Also, fix a bug that could crop up due to an uninitialized CCB type. ctl.c: Before calling ctl_frontend_online(), run through the LUN list and enable all active LUNs. After calling ctl_frontend_offline(), run through the LUN list and disble all active LUNs. scsi_ctl.c: Before bringing a port online, allocate the wildcard peripheral for that bus. And after taking a port offline, invalidate the wildcard peripheral for that bus. Make sure that we hold the SIM lock around all calls to xpt_action() and other transport layer interfaces that require it. Use CAM_SIM_{LOCK|UNLOCK} consistently to acquire and release the SIM lock. Update a number of outdated comments. Some of these should have been fixed long ago. Actually do LUN disbables now. The newer drivers in the tree work correctly for this as far as I know. Initialize the CCB type to CTLFE_CCB_DEFAULT to avoid a panic due to uninitialized memory. Submitted by: Chuck Tuffli (partially) MFC after: 1 week Modified: stable/9/sys/cam/ctl/ctl.c stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c stable/9/sys/cam/ctl/scsi_ctl.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/ctl/ctl.c ============================================================================== --- stable/9/sys/cam/ctl/ctl.c Fri Apr 5 18:09:43 2013 (r249166) +++ stable/9/sys/cam/ctl/ctl.c Fri Apr 5 19:33:31 2013 (r249167) @@ -2263,11 +2263,31 @@ ctl_ioctl(struct cdev *dev, u_long cmd, */ mtx_unlock(&softc->ctl_lock); - if (cmd == CTL_ENABLE_PORT) + if (cmd == CTL_ENABLE_PORT) { + struct ctl_lun *lun; + + STAILQ_FOREACH(lun, &softc->lun_list, + links) { + fe->lun_enable(fe->targ_lun_arg, + lun->target, + lun->lun); + } + ctl_frontend_online(fe); - else if (cmd == CTL_DISABLE_PORT) + } else if (cmd == CTL_DISABLE_PORT) { + struct ctl_lun *lun; + ctl_frontend_offline(fe); + STAILQ_FOREACH(lun, &softc->lun_list, + links) { + fe->lun_disable( + fe->targ_lun_arg, + lun->target, + lun->lun); + } + } + mtx_lock(&softc->ctl_lock); if (cmd == CTL_SET_PORT_WWNS) Modified: stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c ============================================================================== --- stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Apr 5 18:09:43 2013 (r249166) +++ stable/9/sys/cam/ctl/ctl_frontend_cam_sim.c Fri Apr 5 19:33:31 2013 (r249167) @@ -275,7 +275,7 @@ cfcs_shutdown(void) } static void -cfcs_online(void *arg) +cfcs_onoffline(void *arg, int online) { struct cfcs_softc *softc; union ccb *ccb; @@ -283,13 +283,12 @@ cfcs_online(void *arg) softc = (struct cfcs_softc *)arg; mtx_lock(&softc->lock); - softc->online = 1; - mtx_unlock(&softc->lock); + softc->online = online; ccb = xpt_alloc_ccb_nowait(); if (ccb == NULL) { printf("%s: unable to allocate CCB for rescan\n", __func__); - return; + goto bailout; } if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, @@ -297,37 +296,24 @@ cfcs_online(void *arg) CAM_LUN_WILDCARD) != CAM_REQ_CMP) { printf("%s: can't allocate path for rescan\n", __func__); xpt_free_ccb(ccb); - return; + goto bailout; } xpt_rescan(ccb); + +bailout: + mtx_unlock(&softc->lock); } static void -cfcs_offline(void *arg) +cfcs_online(void *arg) { - struct cfcs_softc *softc; - union ccb *ccb; - - softc = (struct cfcs_softc *)arg; - - mtx_lock(&softc->lock); - softc->online = 0; - mtx_unlock(&softc->lock); - - ccb = xpt_alloc_ccb_nowait(); - if (ccb == NULL) { - printf("%s: unable to allocate CCB for rescan\n", __func__); - return; - } + cfcs_onoffline(arg, /*online*/ 1); +} - if (xpt_create_path(&ccb->ccb_h.path, xpt_periph, - cam_sim_path(softc->sim), CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD) != CAM_REQ_CMP) { - printf("%s: can't allocate path for rescan\n", __func__); - xpt_free_ccb(ccb); - return; - } - xpt_rescan(ccb); +static void +cfcs_offline(void *arg) +{ + cfcs_onoffline(arg, /*online*/ 0); } static int Modified: stable/9/sys/cam/ctl/scsi_ctl.c ============================================================================== --- stable/9/sys/cam/ctl/scsi_ctl.c Fri Apr 5 18:09:43 2013 (r249166) +++ stable/9/sys/cam/ctl/scsi_ctl.c Fri Apr 5 19:33:31 2013 (r249167) @@ -73,6 +73,7 @@ __FBSDID("$FreeBSD$"); #include typedef enum { + CTLFE_CCB_DEFAULT = 0x00, CTLFE_CCB_WAITING = 0x01 } ctlfe_ccb_types; @@ -304,10 +305,7 @@ ctlfeasync(void *callback_arg, uint32_t case AC_PATH_REGISTERED: { struct ctl_frontend *fe; struct ctlfe_softc *bus_softc; - struct ctlfe_lun_softc *lun_softc; - struct cam_path *path; struct ccb_pathinq *cpi; - cam_status status; int retval; cpi = (struct ccb_pathinq *)arg; @@ -330,7 +328,6 @@ ctlfeasync(void *callback_arg, uint32_t M_NOWAIT | M_ZERO); if (ccb == NULL) { printf("%s: unable to malloc CCB!\n", __func__); - xpt_free_path(path); return; } xpt_setup_ccb(&ccb->ccb_h, cpi->ccb_h.path, @@ -448,44 +445,31 @@ ctlfeasync(void *callback_arg, uint32_t mtx_unlock(&ctlfe_list_mtx); } - status = xpt_create_path(&path, /*periph*/ NULL, - bus_softc->path_id,CAM_TARGET_WILDCARD, - CAM_LUN_WILDCARD); - if (status != CAM_REQ_CMP) { - printf("%s: unable to create path for wildcard " - "periph\n", __func__); - break; - } - lun_softc = malloc(sizeof(*lun_softc), M_CTLFE, - M_NOWAIT | M_ZERO); - if (lun_softc == NULL) { - xpt_print(path, "%s: unable to allocate softc for " - "wildcard periph\n", __func__); - xpt_free_path(path); - break; - } - - lun_softc->parent_softc = bus_softc; - lun_softc->flags |= CTLFE_LUN_WILDCARD; - - status = cam_periph_alloc(ctlferegister, - ctlfeoninvalidate, - ctlfecleanup, - ctlfestart, - "ctl", - CAM_PERIPH_BIO, - path, - ctlfeasync, - 0, - lun_softc); + break; + } + case AC_PATH_DEREGISTERED: { + struct ctlfe_softc *softc = NULL; - xpt_free_path(path); + mtx_lock(&ctlfe_list_mtx); + STAILQ_FOREACH(softc, &ctlfe_softc_list, links) { + if (softc->path_id == xpt_path_path_id(path)) { + STAILQ_REMOVE(&ctlfe_softc_list, softc, + ctlfe_softc, links); + break; + } + } + mtx_unlock(&ctlfe_list_mtx); + if (softc != NULL) { + /* + * XXX KDM are we certain at this point that there + * are no outstanding commands for this frontend? + */ + ctl_frontend_deregister(&softc->fe); + free(softc, M_CTLFE); + } break; } - case AC_PATH_DEREGISTERED: - /* ctl_frontend_deregister() */ - break; case AC_CONTRACT: { struct ac_contract *ac; @@ -699,11 +683,14 @@ ctlfecleanup(struct cam_periph *periph) softc = (struct ctlfe_lun_softc *)periph->softc; bus_softc = softc->parent_softc; - STAILQ_REMOVE(&bus_softc->lun_softc_list, softc, ctlfe_lun_softc,links); + STAILQ_REMOVE(&bus_softc->lun_softc_list, softc, ctlfe_lun_softc, links); /* * XXX KDM is there anything else that needs to be done here? */ + + callout_stop(&softc->dma_callout); + free(softc, M_CTLFE); } @@ -717,6 +704,8 @@ ctlfestart(struct cam_periph *periph, un softc->ccbs_alloced++; + start_ccb->ccb_h.ccb_type = CTLFE_CCB_DEFAULT; + ccb_h = TAILQ_FIRST(&softc->work_queue); if (periph->immediate_priority <= periph->pinfo.priority) { panic("shouldn't get to the CCB waiting case!"); @@ -857,8 +846,6 @@ ctlfestart(struct cam_periph *periph, un /* * Datamove call, we need to setup the S/G list. - * If we pass in a S/G list, the isp(4) driver at - * least expects physical/bus addresses. */ cmd_info = (struct ctlfe_lun_cmd_info *) @@ -933,12 +920,13 @@ ctlfestart(struct cam_periph *periph, un int *ti; /* - * XXX KDM this is a temporary hack. The - * isp(4) driver can't deal with S/G lists - * with virtual pointers, so we need to - * go through and send down one virtual - * pointer at a time. + * If we have more S/G list pointers than + * will fit in the available storage in the + * cmd_info structure inside the ctl_io header, + * then we need to send down the pointers + * one element at a time. */ + sglist = (struct ctl_sg_entry *) io->scsiio.kern_data_ptr; ti = &cmd_info->cur_transfer_index; @@ -1405,13 +1393,15 @@ ctlfedone(struct cam_periph *periph, uni break; default: /* - * XXX KDM the isp(4) driver doesn't really - * seem to send errors back for data - * transfers that I can tell. There is one - * case where it'll send CAM_REQ_CMP_ERR, - * but probably not that many more cases. - * So set a generic data phase error here, - * like the SXP driver sets. + * XXX KDM we probably need to figure out a + * standard set of errors that the SIM + * drivers should return in the event of a + * data transfer failure. A data phase + * error will at least point the user to a + * data transfer error of some sort. + * Hopefully the SIM printed out some + * additional information to give the user + * a clue what happened. */ io->io_hdr.port_status = 0xbad1; ctl_set_data_phase_error(&io->scsiio); @@ -1687,17 +1677,24 @@ ctlfe_onoffline(void *arg, int online) set_wwnn = 0; + sim = bus_softc->sim; + + mtx_assert(sim->mtx, MA_OWNED); + status = xpt_create_path(&path, /*periph*/ NULL, bus_softc->path_id, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { printf("%s: unable to create path!\n", __func__); return; } - ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_WAITOK | M_ZERO); + ccb = (union ccb *)malloc(sizeof(*ccb), M_TEMP, M_NOWAIT | M_ZERO); + if (ccb == NULL) { + printf("%s: unable to malloc CCB!\n", __func__); + xpt_free_path(path); + return; + } xpt_setup_ccb(&ccb->ccb_h, path, CAM_PRIORITY_NONE); - sim = xpt_path_sim(path); - /* * Copan WWN format: * @@ -1715,11 +1712,9 @@ ctlfe_onoffline(void *arg, int online) ccb->ccb_h.func_code = XPT_GET_SIM_KNOB; - CAM_SIM_LOCK(sim); xpt_action(ccb); - CAM_SIM_UNLOCK(sim); if ((ccb->knob.xport_specific.valid & KNOB_VALID_ADDRESS) != 0){ #ifdef RANDOM_WWNN @@ -1817,9 +1812,6 @@ ctlfe_onoffline(void *arg, int online) else ccb->knob.xport_specific.fc.role = KNOB_ROLE_NONE; - - CAM_SIM_LOCK(sim); - xpt_action(ccb); if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) { @@ -1836,8 +1828,6 @@ ctlfe_onoffline(void *arg, int online) xpt_free_path(path); - CAM_SIM_UNLOCK(sim); - free(ccb, M_TEMP); return; @@ -1846,13 +1836,111 @@ ctlfe_onoffline(void *arg, int online) static void ctlfe_online(void *arg) { + struct ctlfe_softc *bus_softc; + struct cam_path *path; + cam_status status; + struct ctlfe_lun_softc *lun_softc; + struct cam_sim *sim; + + bus_softc = (struct ctlfe_softc *)arg; + sim = bus_softc->sim; + + CAM_SIM_LOCK(sim); + + /* + * Create the wildcard LUN before bringing the port online. + */ + status = xpt_create_path(&path, /*periph*/ NULL, + bus_softc->path_id, CAM_TARGET_WILDCARD, + CAM_LUN_WILDCARD); + if (status != CAM_REQ_CMP) { + printf("%s: unable to create path for wildcard periph\n", + __func__); + CAM_SIM_UNLOCK(sim); + return; + } + + lun_softc = malloc(sizeof(*lun_softc), M_CTLFE, + M_NOWAIT | M_ZERO); + if (lun_softc == NULL) { + xpt_print(path, "%s: unable to allocate softc for " + "wildcard periph\n", __func__); + xpt_free_path(path); + CAM_SIM_UNLOCK(sim); + return; + } + + lun_softc->parent_softc = bus_softc; + lun_softc->flags |= CTLFE_LUN_WILDCARD; + + STAILQ_INSERT_TAIL(&bus_softc->lun_softc_list, lun_softc, links); + + + status = cam_periph_alloc(ctlferegister, + ctlfeoninvalidate, + ctlfecleanup, + ctlfestart, + "ctl", + CAM_PERIPH_BIO, + path, + ctlfeasync, + 0, + lun_softc); + + if ((status & CAM_STATUS_MASK) != CAM_REQ_CMP) { + const struct cam_status_entry *entry; + + entry = cam_fetch_status_entry(status); + + printf("%s: CAM error %s (%#x) returned from " + "cam_periph_alloc()\n", __func__, (entry != NULL) ? + entry->status_text : "Unknown", status); + } + + xpt_free_path(path); + ctlfe_onoffline(arg, /*online*/ 1); + + CAM_SIM_UNLOCK(sim); } static void ctlfe_offline(void *arg) { + struct ctlfe_softc *bus_softc; + struct cam_path *path; + cam_status status; + struct cam_periph *periph; + struct cam_sim *sim; + + bus_softc = (struct ctlfe_softc *)arg; + sim = bus_softc->sim; + + CAM_SIM_LOCK(sim); + ctlfe_onoffline(arg, /*online*/ 0); + + /* + * Disable the wildcard LUN for this port now that we have taken + * the port offline. + */ + status = xpt_create_path(&path, /*periph*/ NULL, + bus_softc->path_id, CAM_TARGET_WILDCARD, + CAM_LUN_WILDCARD); + if (status != CAM_REQ_CMP) { + CAM_SIM_UNLOCK(sim); + printf("%s: unable to create path for wildcard periph\n", + __func__); + return; + } + + + if ((periph = cam_periph_find(path, "ctl")) != NULL) + cam_periph_invalidate(periph); + + xpt_free_path(path); + + CAM_SIM_UNLOCK(sim); } static int @@ -1883,11 +1971,11 @@ ctlfe_lun_enable(void *arg, struct ctl_i bus_softc = (struct ctlfe_softc *)arg; + sim = bus_softc->sim; status = xpt_create_path_unlocked(&path, /*periph*/ NULL, bus_softc->path_id, - targ_id.id, - lun_id); + targ_id.id, lun_id); /* XXX KDM need some way to return status to CTL here? */ if (status != CAM_REQ_CMP) { printf("%s: could not create path, status %#x\n", __func__, @@ -1896,14 +1984,13 @@ ctlfe_lun_enable(void *arg, struct ctl_i } softc = malloc(sizeof(*softc), M_CTLFE, M_WAITOK | M_ZERO); - sim = xpt_path_sim(path); - mtx_lock(sim->mtx); + CAM_SIM_LOCK(sim); periph = cam_periph_find(path, "ctl"); if (periph != NULL) { /* We've already got a periph, no need to alloc a new one. */ xpt_free_path(path); free(softc, M_CTLFE); - mtx_unlock(sim->mtx); + CAM_SIM_UNLOCK(sim); return (0); } @@ -1923,29 +2010,26 @@ ctlfe_lun_enable(void *arg, struct ctl_i xpt_free_path(path); - mtx_unlock(sim->mtx); + CAM_SIM_UNLOCK(sim); return (0); } /* - * XXX KDM we disable LUN removal here. The problem is that the isp(4) - * driver doesn't currently handle LUN removal properly. We need to keep - * enough state here at the peripheral level even after LUNs have been - * removed inside CTL. - * - * Once the isp(4) driver is fixed, this can be re-enabled. + * This will get called when the user removes a LUN to disable that LUN + * on every bus that is attached to CTL. */ static int ctlfe_lun_disable(void *arg, struct ctl_id targ_id, int lun_id) { -#ifdef NOTYET struct ctlfe_softc *softc; struct ctlfe_lun_softc *lun_softc; + struct cam_sim *sim; softc = (struct ctlfe_softc *)arg; + sim = softc->sim; - mtx_lock(softc->sim->mtx); + CAM_SIM_LOCK(sim); STAILQ_FOREACH(lun_softc, &softc->lun_softc_list, links) { struct cam_path *path; @@ -1957,7 +2041,7 @@ ctlfe_lun_disable(void *arg, struct ctl_ } } if (lun_softc == NULL) { - mtx_unlock(softc->sim->mtx); + CAM_SIM_UNLOCK(sim); printf("%s: can't find target %d lun %d\n", __func__, targ_id.id, lun_id); return (1); @@ -1965,8 +2049,7 @@ ctlfe_lun_disable(void *arg, struct ctl_ cam_periph_invalidate(lun_softc->periph); - mtx_unlock(softc->sim->mtx); -#endif + CAM_SIM_UNLOCK(sim); return (0); } @@ -2131,7 +2214,7 @@ ctlfe_datamove_done(union ctl_io *io) sim = xpt_path_sim(ccb->ccb_h.path); - mtx_lock(sim->mtx); + CAM_SIM_LOCK(sim); periph = xpt_path_periph(ccb->ccb_h.path); @@ -2178,7 +2261,7 @@ ctlfe_datamove_done(union ctl_io *io) xpt_schedule(periph, /*priority*/ 1); } - mtx_unlock(sim->mtx); + CAM_SIM_UNLOCK(sim); } static void From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 20:24:51 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D458764B; Fri, 5 Apr 2013 20:24:51 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id AD19FB6A; Fri, 5 Apr 2013 20:24:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35KOp4t015868; Fri, 5 Apr 2013 20:24:51 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35KOphF015867; Fri, 5 Apr 2013 20:24:51 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304052024.r35KOphF015867@svn.freebsd.org> From: Gleb Smirnoff Date: Fri, 5 Apr 2013 20:24:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249168 - 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: Fri, 05 Apr 2013 20:24:51 -0000 Author: glebius Date: Fri Apr 5 20:24:51 2013 New Revision: 249168 URL: http://svnweb.freebsd.org/changeset/base/249168 Log: Fix memory leak in coredump(). Reviewed by: kib Modified: head/sys/kern/kern_sig.c Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Fri Apr 5 19:33:31 2013 (r249167) +++ head/sys/kern/kern_sig.c Fri Apr 5 20:24:51 2013 (r249168) @@ -3273,6 +3273,7 @@ restart: goto out; if ((error = vn_start_write(NULL, &mp, V_XSLEEP | PCATCH)) != 0) goto out; + free(name, M_TEMP); goto restart; } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 20:41:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 42E25D19; Fri, 5 Apr 2013 20:41:47 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1C6C7CEF; Fri, 5 Apr 2013 20:41:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35KfkwK021277; Fri, 5 Apr 2013 20:41:46 GMT (envelope-from gjb@svn.freebsd.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35Kfk1A021276; Fri, 5 Apr 2013 20:41:46 GMT (envelope-from gjb@svn.freebsd.org) Message-Id: <201304052041.r35Kfk1A021276@svn.freebsd.org> From: Glen Barber Date: Fri, 5 Apr 2013 20:41:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-releng@freebsd.org Subject: svn commit: r249169 - releng/8.4/release/doc/en_US.ISO8859-1/relnotes 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: Fri, 05 Apr 2013 20:41:47 -0000 Author: gjb (doc,ports committer) Date: Fri Apr 5 20:41:46 2013 New Revision: 249169 URL: http://svnweb.freebsd.org/changeset/base/249169 Log: Document that, although ZFS pool feature flags are available, 8.4-RC1 and later ZFS pool version defaults to version 28 to prevent problems with upgrading to FreeBSD 9.1-RELEASE. Feature flags can be enabled by explicitly running: zpool upgrade Approved by: re (delphij) Modified: releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Apr 5 20:24:51 2013 (r249168) +++ releng/8.4/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Apr 5 20:41:46 2013 (r249169) @@ -190,7 +190,37 @@ File Systems - + ZFS is upgraded to support zpool feature flags. ZFS + pool creation defaults to version 28 allowing upgrades to + &os; 9.1-RELEASE, which does not support + zpool feature flags. + + Users who wish to enable these features can upgrade + storage pools created on &os; 8.4-RC1 and later by + running zpool upgrade. + + The new features available are: + + + + async_destroy: allows a ZFS + dataset to be destroyed asynchronously, reclaiming space + by a background process. + + + + empty_bpobj: improves performance + and reduces disk space needed by snapshots. + + + + lz4_compress: a new high + performance compression algorithm thatfeatures better + performance and compression ratio than lzjb. + + + + For more information, see &man.zpool-features.7;. From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 20:57:42 2013 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E4D69F5B; Fri, 5 Apr 2013 20:57:42 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail05.syd.optusnet.com.au (mail05.syd.optusnet.com.au [211.29.132.186]) by mx1.freebsd.org (Postfix) with ESMTP id 683D0D6D; Fri, 5 Apr 2013 20:57:41 +0000 (UTC) Received: from c211-30-173-106.carlnfd1.nsw.optusnet.com.au (c211-30-173-106.carlnfd1.nsw.optusnet.com.au [211.30.173.106]) by mail05.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id r35JkV5c004504 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 6 Apr 2013 07:57:33 +1100 Date: Sat, 6 Apr 2013 06:46:31 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: mdf@FreeBSD.org Subject: Re: svn commit: r249105 - in head/sys/cam: ata scsi In-Reply-To: Message-ID: <20130406061551.B2674@besplex.bde.org> References: <201304041904.r34J4F2I065527@svn.freebsd.org> <515DE949.6050309@FreeBSD.org> <20130406020010.P1319@besplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.0 cv=Ov0XUFDt c=1 sm=1 a=EUEtXETBbRoA:10 a=kj9zAlcOel0A:10 a=PO7r1zJSAAAA:8 a=JzwRw_2MAAAA:8 a=a83PX5LfBjoA:10 a=6I5d2MoRAAAA:8 a=BrfKCNeTs6zEZYXkoz8A:9 a=CjuIK1q_8ugA:10 a=SV7veod9ZcQA:10 a=TEtd8y5WR3g2ypngnwZWYw==:117 Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Bruce Evans , "svn-src-head@freebsd.org" , Alexander Motin 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, 05 Apr 2013 20:57:43 -0000 On Fri, 5 Apr 2013 mdf@FreeBSD.org wrote: > On Fri, Apr 5, 2013 at 8:21 AM, Bruce Evans wrote: > >> This method works well in userland too. Instead of assert() or abort(), >> use an null dereference, or more portably, a signal > > Digressing quite a bit, doesn't abort() send a signal already, i.e. > SIGABRT? And doesn't __assert() call abort()? Yes, but with assert() the signal occurs deeply nested in a function that doesn't return. Bruce From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 21:13:40 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2D244308; Fri, 5 Apr 2013 21:13:40 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 1F124DDB; Fri, 5 Apr 2013 21:13:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35LDeEt030486; Fri, 5 Apr 2013 21:13:40 GMT (envelope-from sbruno@svn.freebsd.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35LDd1B030485; Fri, 5 Apr 2013 21:13:39 GMT (envelope-from sbruno@svn.freebsd.org) Message-Id: <201304052113.r35LDd1B030485@svn.freebsd.org> From: Sean Bruno Date: Fri, 5 Apr 2013 21:13:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249170 - head/sys/dev/ciss 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, 05 Apr 2013 21:13:40 -0000 Author: sbruno Date: Fri Apr 5 21:13:39 2013 New Revision: 249170 URL: http://svnweb.freebsd.org/changeset/base/249170 Log: Notify CAM on state* change to a logical volume not status. This resolves the issues reported regarding camcontrol devlist not showing the rebuild states of volumes unless an explicit camcontrol rescan was executed. PR: kern/171650 Reviewed by: scottl@freebsd.org Obtained from: Yahoo! Inc. MFC after: 2 weeks Modified: head/sys/dev/ciss/ciss.c Modified: head/sys/dev/ciss/ciss.c ============================================================================== --- head/sys/dev/ciss/ciss.c Fri Apr 5 20:41:46 2013 (r249169) +++ head/sys/dev/ciss/ciss.c Fri Apr 5 21:13:39 2013 (r249170) @@ -3959,7 +3959,8 @@ static void ciss_notify_logical(struct ciss_softc *sc, struct ciss_notify *cn) { struct ciss_ldrive *ld; - int ostatus, bus, target; + int bus, target; + int rescan_ld; debug_called(2); @@ -3982,7 +3983,6 @@ ciss_notify_logical(struct ciss_softc *s /* * Update our idea of the drive's status. */ - ostatus = ciss_decode_ldrive_status(cn->data.logical_status.previous_state); ld->cl_status = ciss_decode_ldrive_status(cn->data.logical_status.new_state); if (ld->cl_lstatus != NULL) ld->cl_lstatus->status = cn->data.logical_status.new_state; @@ -3990,7 +3990,9 @@ ciss_notify_logical(struct ciss_softc *s /* * Have CAM rescan the drive if its status has changed. */ - if (ostatus != ld->cl_status) { + rescan_ld = (cn->data.logical_status.previous_state != + cn->data.logical_status.new_state) ? 1 : 0; + if (rescan_ld) { ld->cl_update = 1; ciss_notify_rescan_logical(sc); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 21:17:37 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A584759C; Fri, 5 Apr 2013 21:17:37 +0000 (UTC) (envelope-from antoine@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 97C80E07; Fri, 5 Apr 2013 21:17:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35LHbX5031139; Fri, 5 Apr 2013 21:17:37 GMT (envelope-from antoine@svn.freebsd.org) Received: (from antoine@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35LHbi1031138; Fri, 5 Apr 2013 21:17:37 GMT (envelope-from antoine@svn.freebsd.org) Message-Id: <201304052117.r35LHbi1031138@svn.freebsd.org> From: Antoine Brodin Date: Fri, 5 Apr 2013 21:17:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249171 - head/share/misc 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, 05 Apr 2013 21:17:37 -0000 Author: antoine Date: Fri Apr 5 21:17:37 2013 New Revision: 249171 URL: http://svnweb.freebsd.org/changeset/base/249171 Log: Add myself as a ports committer Approved by: eadler (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Fri Apr 5 21:13:39 2013 (r249170) +++ head/share/misc/committers-ports.dot Fri Apr 5 21:17:37 2013 (r249171) @@ -51,6 +51,7 @@ alepulver [label="Alejandro Pulver\nalep alexbl [label="Alexander Botero-Lowry\nalexbl@FreeBSD.org\n2006/09/11"] amdmi3 [label="Dmitry Marakasov\namdmi3@FreeBSD.org\n2008/06/19"] anray [label="Andrey Slusar\nanray@FreeBSD.org\n2005/12/11"] +antoine [label="Antoine Brodin\nantoine@FreeBSD.org\n2013/04/03"] araujo [label="Marcelo Araujo\naraujo@FreeBSD.org\n2007/04/26"] arved [label="Tilman Linneweh\narved@FreeBSD.org\n2002/10/15"] ashish [label="Ashish SHUKLA\nashish@FreeBSD.org\n2010/06/10"] @@ -283,6 +284,7 @@ delphij -> rafan demon -> mat eadler -> ak +eadler -> antoine eadler -> dbn eadler -> bdrewery eadler -> gjb @@ -398,6 +400,7 @@ mat -> thierry mezz -> tmclaugh miwi -> amdmi3 +miwi -> antoine miwi -> avilla miwi -> beat miwi -> bf From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 21:18:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 97FF070E; Fri, 5 Apr 2013 21:18:01 +0000 (UTC) (envelope-from rene@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8A536E0E; Fri, 5 Apr 2013 21:18:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35LI1Zn031234; Fri, 5 Apr 2013 21:18:01 GMT (envelope-from rene@svn.freebsd.org) Received: (from rene@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35LI1mw031232; Fri, 5 Apr 2013 21:18:01 GMT (envelope-from rene@svn.freebsd.org) Message-Id: <201304052118.r35LI1mw031232@svn.freebsd.org> From: Rene Ladan Date: Fri, 5 Apr 2013 21:18:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249172 - 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: Fri, 05 Apr 2013 21:18:01 -0000 Author: rene (doc,ports committer) Date: Fri Apr 5 21:18:01 2013 New Revision: 249172 URL: http://svnweb.freebsd.org/changeset/base/249172 Log: Fix a typo in the burncd line. Approved by: cognet Modified: head/ObsoleteFiles.inc Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Fri Apr 5 21:17:37 2013 (r249171) +++ head/ObsoleteFiles.inc Fri Apr 5 21:18:01 2013 (r249172) @@ -43,7 +43,7 @@ OLD_FILES+=sbin/atacontrol OLD_FILES+=usr/share/man/man8/atacontrol.8.gz OLD_FILES+=usr/share/man/man4/atapicam.4.gz OLD_FILES+=usr/share/man/man4/ataraid.4.gz -OLD_FILES+=usr.sbin/burncd +OLD_FILES+=usr/sbin/burncd OLD_FILES+=usr/share/man/man8/burncd.8.gz # 20130316: vinum.4 removed OLD_FILES+=usr/share/man/man4/vinum.4.gz From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 22:14:08 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D32D3118; Fri, 5 Apr 2013 22:14:08 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C504328; Fri, 5 Apr 2013 22:14:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35ME8IM048369; Fri, 5 Apr 2013 22:14:08 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35ME88v048368; Fri, 5 Apr 2013 22:14:08 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201304052214.r35ME88v048368@svn.freebsd.org> From: Peter Grehan Date: Fri, 5 Apr 2013 22:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249173 - head/usr.sbin/bhyve 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, 05 Apr 2013 22:14:08 -0000 Author: grehan Date: Fri Apr 5 22:14:07 2013 New Revision: 249173 URL: http://svnweb.freebsd.org/changeset/base/249173 Log: config checksum is over the entire fixed portion, not just the config header. FreeBSD doesn't check this but other o/s's do. Obtained from: NetApp Modified: head/usr.sbin/bhyve/mptbl.c Modified: head/usr.sbin/bhyve/mptbl.c ============================================================================== --- head/usr.sbin/bhyve/mptbl.c Fri Apr 5 21:18:01 2013 (r249172) +++ head/usr.sbin/bhyve/mptbl.c Fri Apr 5 22:14:07 2013 (r249173) @@ -395,7 +395,7 @@ mptable_build(struct vmctx *ctx, int ncp } mpch->base_table_length = curraddr - (char *)mpch; - mpch->checksum = mpt_compute_checksum(mpch, sizeof(*mpch)); + mpch->checksum = mpt_compute_checksum(mpch, mpch->base_table_length); return (0); } From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 22:16:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 1B7E129C; Fri, 5 Apr 2013 22:16:32 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0CA417B; Fri, 5 Apr 2013 22:16:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35MGVuL048739; Fri, 5 Apr 2013 22:16:31 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35MGVLE048738; Fri, 5 Apr 2013 22:16:31 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201304052216.r35MGVLE048738@svn.freebsd.org> From: Peter Grehan Date: Fri, 5 Apr 2013 22:16:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249174 - head/sys/amd64/vmm/io 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, 05 Apr 2013 22:16:32 -0000 Author: grehan Date: Fri Apr 5 22:16:31 2013 New Revision: 249174 URL: http://svnweb.freebsd.org/changeset/base/249174 Log: Don't panic when a valid divisor of 1 has been requested. Obtained from: NetApp Modified: head/sys/amd64/vmm/io/vlapic.c Modified: head/sys/amd64/vmm/io/vlapic.c ============================================================================== --- head/sys/amd64/vmm/io/vlapic.c Fri Apr 5 22:14:07 2013 (r249173) +++ head/sys/amd64/vmm/io/vlapic.c Fri Apr 5 22:16:31 2013 (r249174) @@ -128,6 +128,8 @@ static int vlapic_timer_divisor(uint32_t dcr) { switch (dcr & 0xB) { + case APIC_TDCR_1: + return (1); case APIC_TDCR_2: return (2); case APIC_TDCR_4: From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 22:19:02 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D6CD2433; Fri, 5 Apr 2013 22:19:02 +0000 (UTC) (envelope-from grehan@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id C8CAE99; Fri, 5 Apr 2013 22:19:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35MJ2Xq049105; Fri, 5 Apr 2013 22:19:02 GMT (envelope-from grehan@svn.freebsd.org) Received: (from grehan@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35MJ2cH049104; Fri, 5 Apr 2013 22:19:02 GMT (envelope-from grehan@svn.freebsd.org) Message-Id: <201304052219.r35MJ2cH049104@svn.freebsd.org> From: Peter Grehan Date: Fri, 5 Apr 2013 22:19:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249175 - head/usr.sbin/bhyve 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, 05 Apr 2013 22:19:02 -0000 Author: grehan Date: Fri Apr 5 22:19:02 2013 New Revision: 249175 URL: http://svnweb.freebsd.org/changeset/base/249175 Log: Remove dangling ISA uart stubs. Obtained from: NetApp Deleted: head/usr.sbin/bhyve/uart.c Modified: head/usr.sbin/bhyve/Makefile Modified: head/usr.sbin/bhyve/Makefile ============================================================================== --- head/usr.sbin/bhyve/Makefile Fri Apr 5 22:16:31 2013 (r249174) +++ head/usr.sbin/bhyve/Makefile Fri Apr 5 22:19:02 2013 (r249175) @@ -9,7 +9,7 @@ DEBUG_FLAGS= -g -O0 SRCS= acpi.c atpic.c bhyverun.c consport.c dbgport.c elcr.c inout.c SRCS+= ioapic.c mem.c mevent.c mptbl.c SRCS+= pci_emul.c pci_hostbridge.c pci_passthru.c pci_virtio_block.c -SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pmtmr.c post.c rtc.c uart.c +SRCS+= pci_virtio_net.c pci_uart.c pit_8254.c pmtmr.c post.c rtc.c SRCS+= xmsr.c spinup_ap.c .PATH: ${.CURDIR}/../../sys/amd64/vmm From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 23:35:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F1E79AB3; Fri, 5 Apr 2013 23:35:24 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DFDD426B; Fri, 5 Apr 2013 23:35:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35NZOtJ022050; Fri, 5 Apr 2013 23:35:24 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35NZOAh022049; Fri, 5 Apr 2013 23:35:24 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201304052335.r35NZOAh022049@svn.freebsd.org> From: Andrew Turner Date: Fri, 5 Apr 2013 23:35:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249176 - head/sys/arm/arm 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, 05 Apr 2013 23:35:25 -0000 Author: andrew Date: Fri Apr 5 23:35:23 2013 New Revision: 249176 URL: http://svnweb.freebsd.org/changeset/base/249176 Log: Add the hw.floatingpoint sysctl to ARM to tell us if we have vfp support in the kernel and the hardware includes a vfp unit. Modified: head/sys/arm/arm/machdep.c head/sys/arm/arm/vfp.c Modified: head/sys/arm/arm/machdep.c ============================================================================== --- head/sys/arm/arm/machdep.c Fri Apr 5 22:19:02 2013 (r249175) +++ head/sys/arm/arm/machdep.c Fri Apr 5 23:35:23 2013 (r249176) @@ -183,6 +183,10 @@ SYSCTL_UINT(_hw_board, OID_AUTO, revisio SYSCTL_STRING(_hw_board, OID_AUTO, serial, CTLFLAG_RD, board_serial, 0, "Board serial"); +int vfp_exists; +SYSCTL_INT(_hw, HW_FLOATINGPT, floatingpoint, CTLFLAG_RD, + &vfp_exists, 0, "Floating point support enabled"); + void board_set_serial(uint64_t serial) { Modified: head/sys/arm/arm/vfp.c ============================================================================== --- head/sys/arm/arm/vfp.c Fri Apr 5 22:19:02 2013 (r249175) +++ head/sys/arm/arm/vfp.c Fri Apr 5 23:35:23 2013 (r249176) @@ -47,7 +47,7 @@ void vfp_restore(struct vfp_state *); void vfp_store(struct vfp_state *); void set_coprocessorACR(u_int); -boolean_t vfp_exists; +extern int vfp_exists; static struct undefined_handler vfp10_uh, vfp11_uh; /* The VFMXR command using coprocessor commands */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 23:41:35 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 04D00CCB; Fri, 5 Apr 2013 23:41:35 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id EAE2F295; Fri, 5 Apr 2013 23:41:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35NfYJl054582; Fri, 5 Apr 2013 23:41:34 GMT (envelope-from jkim@svn.freebsd.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35NfYWR054581; Fri, 5 Apr 2013 23:41:34 GMT (envelope-from jkim@svn.freebsd.org) Message-Id: <201304052341.r35NfYWR054581@svn.freebsd.org> From: Jung-uk Kim Date: Fri, 5 Apr 2013 23:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249177 - head/lib/libpam/modules/pam_unix 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, 05 Apr 2013 23:41:35 -0000 Author: jkim Date: Fri Apr 5 23:41:34 2013 New Revision: 249177 URL: http://svnweb.freebsd.org/changeset/base/249177 Log: Fix declaration vs. definition inconsistency. No functional change. Modified: head/lib/libpam/modules/pam_unix/pam_unix.c Modified: head/lib/libpam/modules/pam_unix/pam_unix.c ============================================================================== --- head/lib/libpam/modules/pam_unix/pam_unix.c Fri Apr 5 23:35:23 2013 (r249176) +++ head/lib/libpam/modules/pam_unix/pam_unix.c Fri Apr 5 23:41:34 2013 (r249177) @@ -460,14 +460,14 @@ to64(char *s, long v, int n) } /* Salt suitable for traditional DES and MD5 */ -void -makesalt(char salt[SALTSIZE]) +static void +makesalt(char salt[SALTSIZE + 1]) { int i; /* These are not really random numbers, they are just * numbers that change to thwart construction of a - * dictionary. This is exposed to the public. + * dictionary. */ for (i = 0; i < SALTSIZE; i += 4) to64(&salt[i], arc4random(), 4); From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 23:41:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2BEFEDCC; Fri, 5 Apr 2013 23:41:40 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E5512296; Fri, 5 Apr 2013 23:41:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35NfeKD054709; Fri, 5 Apr 2013 23:41:40 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35Nfegl054704; Fri, 5 Apr 2013 23:41:40 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304052341.r35Nfegl054704@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 23:41:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249178 - head/sys/netgraph/bluetooth/drivers/ubt 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, 05 Apr 2013 23:41:41 -0000 Author: adrian Date: Fri Apr 5 23:41:38 2013 New Revision: 249178 URL: http://svnweb.freebsd.org/changeset/base/249178 Log: Add blacklist entries for Atheros bluetooth device IDs that are known to need firmware before they will re-attach as correctly functioning bluetooth devices. Reviewed by: maksim Obtained from: Linux ath3k device driver Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Modified: head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c ============================================================================== --- head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Fri Apr 5 23:41:34 2013 (r249177) +++ head/sys/netgraph/bluetooth/drivers/ubt/ng_ubt.c Fri Apr 5 23:41:38 2013 (r249178) @@ -386,6 +386,39 @@ static const STRUCT_USB_HOST_ID ubt_igno { /* AVM USB Bluetooth-Adapter BlueFritz! v1.0 */ { USB_VPI(USB_VENDOR_AVM, 0x2200, 0) }, + + /* Atheros 3011 with sflash firmware */ + { USB_VPI(0x0cf3, 0x3002, 0) }, + { USB_VPI(0x0cf3, 0xe019, 0) }, + { USB_VPI(0x13d3, 0x3304, 0) }, + { USB_VPI(0x0930, 0x0215, 0) }, + { USB_VPI(0x0489, 0xe03d, 0) }, + { USB_VPI(0x0489, 0xe027, 0) }, + + /* Atheros AR9285 Malbec with sflash firmware */ + { USB_VPI(0x03f0, 0x311d, 0) }, + + /* Atheros 3012 with sflash firmware */ + { USB_VPI(0x0cf3, 0x3004, 0) }, + { USB_VPI(0x0cf3, 0x311d, 0) }, + { USB_VPI(0x13d3, 0x3375, 0) }, + { USB_VPI(0x04ca, 0x3005, 0) }, + { USB_VPI(0x04ca, 0x3006, 0) }, + { USB_VPI(0x04ca, 0x3008, 0) }, + { USB_VPI(0x13d3, 0x3362, 0) }, + { USB_VPI(0x0cf3, 0xe004, 0) }, + { USB_VPI(0x0930, 0x0219, 0) }, + { USB_VPI(0x0489, 0xe057, 0) }, + { USB_VPI(0x13d3, 0x3393, 0) }, + { USB_VPI(0x0489, 0xe04e, 0) }, + { USB_VPI(0x0489, 0xe056, 0) }, + + /* Atheros AR5BBU12 with sflash firmware */ + { USB_VPI(0x0489, 0xe02c, 0) }, + + /* Atheros AR5BBU12 with sflash firmware */ + { USB_VPI(0x0489, 0xe03c, 0) }, + { USB_VPI(0x0489, 0xe036, 0) }, }; /* List of supported bluetooth devices */ From owner-svn-src-all@FreeBSD.ORG Fri Apr 5 23:42:22 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B3395FAA; Fri, 5 Apr 2013 23:42:22 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 8CFDE2A5; Fri, 5 Apr 2013 23:42:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r35NgMth055150; Fri, 5 Apr 2013 23:42:22 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r35NgMq9055149; Fri, 5 Apr 2013 23:42:22 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201304052342.r35NgMq9055149@svn.freebsd.org> From: Adrian Chadd Date: Fri, 5 Apr 2013 23:42:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249179 - head/usr.sbin/bluetooth/ath3kfw 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, 05 Apr 2013 23:42:22 -0000 Author: adrian Date: Fri Apr 5 23:42:22 2013 New Revision: 249179 URL: http://svnweb.freebsd.org/changeset/base/249179 Log: Extend ath3kfw to include overridable device / vendor IDs. This is required for ar3k series bluetooth devices who need firmware but have a different vendor ID than normal. Reviewed by: maksim Modified: head/usr.sbin/bluetooth/ath3kfw/ath3kfw.c Modified: head/usr.sbin/bluetooth/ath3kfw/ath3kfw.c ============================================================================== --- head/usr.sbin/bluetooth/ath3kfw/ath3kfw.c Fri Apr 5 23:41:38 2013 (r249178) +++ head/usr.sbin/bluetooth/ath3kfw/ath3kfw.c Fri Apr 5 23:42:22 2013 (r249179) @@ -59,6 +59,9 @@ static int download_firmware (struct lib char const *firmware); static void usage (void); +static int vendor_id = ATH3KFW_VENDOR_ID; +static int product_id = ATH3KFW_PRODUCT_ID; + /* * Firmware downloader for Atheros AR3011 based USB Bluetooth devices */ @@ -78,7 +81,7 @@ main(int argc, char **argv) addr = 0; firmware = ATH3KFW_FW; - while ((n = getopt(argc, argv, "d:f:h")) != -1) { + while ((n = getopt(argc, argv, "d:f:hp:v:")) != -1) { switch (n) { case 'd': /* ugen device name */ if (parse_ugen_name(optarg, &bus, &addr) < 0) @@ -88,7 +91,12 @@ main(int argc, char **argv) case 'f': /* firmware file */ firmware = optarg; break; - + case 'p': /* product id */ + product_id = strtol(optarg, NULL, 0); + break; + case 'v': /* vendor id */ + vendor_id = strtol(optarg, NULL, 0); + break; case 'h': default: usage(); @@ -166,8 +174,8 @@ find_device(struct libusb20_backend *be, if (desc == NULL) continue; - if (desc->idVendor != ATH3KFW_VENDOR_ID || - desc->idProduct != ATH3KFW_PRODUCT_ID) + if (desc->idVendor != vendor_id || + desc->idProduct != product_id) continue; break; @@ -280,6 +288,8 @@ usage(void) "Where:\n" \ "\t-d ugenX.Y ugen device name\n" \ "\t-f firmware image firmware image file name for download\n" \ +"\t-v vendor_id vendor id\n" \ +"\t-p vendor_id product id\n" \ "\t-h display this message\n", ATH3KFW, ATH3KFW); exit(255); From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 00:47:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6B9E2930; Sat, 6 Apr 2013 00:47:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 5E07660A; Sat, 6 Apr 2013 00:47:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r360lXfn003211; Sat, 6 Apr 2013 00:47:34 GMT (envelope-from andrew@svn.freebsd.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r360lXar003210; Sat, 6 Apr 2013 00:47:33 GMT (envelope-from andrew@svn.freebsd.org) Message-Id: <201304060047.r360lXar003210@svn.freebsd.org> From: Andrew Turner Date: Sat, 6 Apr 2013 00:47:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249180 - head/sys/arm/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: Sat, 06 Apr 2013 00:47:34 -0000 Author: andrew Date: Sat Apr 6 00:47:33 2013 New Revision: 249180 URL: http://svnweb.freebsd.org/changeset/base/249180 Log: Hide non-assembler bits behind #ifndef __ASSEMBLER__ Modified: head/sys/arm/include/setjmp.h Modified: head/sys/arm/include/setjmp.h ============================================================================== --- head/sys/arm/include/setjmp.h Fri Apr 5 23:42:22 2013 (r249179) +++ head/sys/arm/include/setjmp.h Sat Apr 6 00:47:33 2013 (r249180) @@ -87,10 +87,13 @@ /* Only valid with the _JB_MAGIC_SETJMP magic */ #define _JB_SIGMASK 25 + +#ifndef __ASSEMBLER__ #if __BSD_VISIBLE || __POSIX_VISIBLE || __XSI_VISIBLE typedef struct _sigjmp_buf { int _sjb[_JBLEN + 1]; } sigjmp_buf[1]; #endif typedef struct _jmp_buf { int _jb[_JBLEN + 1]; } jmp_buf[1]; +#endif #endif /* !_MACHINE_SETJMP_H_ */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 03:31:29 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 59561489; Sat, 6 Apr 2013 03:31:29 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4C68C8F8; Sat, 6 Apr 2013 03:31:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r363VT8Q087084; Sat, 6 Apr 2013 03:31:29 GMT (envelope-from gonzo@svn.freebsd.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r363VTbB087083; Sat, 6 Apr 2013 03:31:29 GMT (envelope-from gonzo@svn.freebsd.org) Message-Id: <201304060331.r363VTbB087083@svn.freebsd.org> From: Oleksandr Tymoshenko Date: Sat, 6 Apr 2013 03:31:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249181 - head/sys/arm/ti 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, 06 Apr 2013 03:31:29 -0000 Author: gonzo Date: Sat Apr 6 03:31:28 2013 New Revision: 249181 URL: http://svnweb.freebsd.org/changeset/base/249181 Log: Properly clean "spurious interrupt" state Suggested by: Ian Lepore Modified: head/sys/arm/ti/aintc.c Modified: head/sys/arm/ti/aintc.c ============================================================================== --- head/sys/arm/ti/aintc.c Sat Apr 6 00:47:33 2013 (r249180) +++ head/sys/arm/ti/aintc.c Sat Apr 6 03:31:28 2013 (r249181) @@ -157,6 +157,7 @@ arm_get_next_irq(int last_irq) if ((active_irq & 0xffffff80)) { device_printf(ti_aintc_sc->sc_dev, "Spurious interrupt detected (0x%08x)\n", active_irq); + aintc_write_4(INTC_SIR_IRQ, 0); return -1; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 06:02:56 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 2FA0DD9F; Sat, 6 Apr 2013 06:02:56 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 0857C15E; Sat, 6 Apr 2013 06:02:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3662tDf031186; Sat, 6 Apr 2013 06:02:55 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3662tQk031185; Sat, 6 Apr 2013 06:02:55 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201304060602.r3662tQk031185@svn.freebsd.org> From: Alan Cox Date: Sat, 6 Apr 2013 06:02:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249182 - 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, 06 Apr 2013 06:02:56 -0000 Author: alc Date: Sat Apr 6 06:02:55 2013 New Revision: 249182 URL: http://svnweb.freebsd.org/changeset/base/249182 Log: Simplify vm_radix_insert(). Reviewed by: attilio Tested by: pho Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sat Apr 6 03:31:28 2013 (r249181) +++ head/sys/vm/vm_radix.c Sat Apr 6 06:02:55 2013 (r249182) @@ -406,7 +406,7 @@ void vm_radix_insert(struct vm_radix *rtree, vm_page_t page) { vm_pindex_t index, newind; - struct vm_radix_node *rnode, *tmp, *tmp2; + struct vm_radix_node *parent, *rnode, *tmp; vm_page_t m; int slot; uint16_t clev; @@ -444,44 +444,23 @@ vm_radix_insert(struct vm_radix *rtree, vm_radix_addpage(rnode, index, rnode->rn_clev, page); return; } + parent = rnode; rnode = rnode->rn_child[slot]; } while (!vm_radix_keybarr(rnode, index)); /* - * Scan the trie from the top and find the parent to insert - * the new object. - */ - newind = rnode->rn_owner; - clev = vm_radix_keydiff(newind, index); - slot = VM_RADIX_COUNT; - for (rnode = vm_radix_getroot(rtree); ; rnode = tmp) { - KASSERT(rnode != NULL, ("%s: edge cannot be NULL in the scan", - __func__)); - KASSERT(clev >= rnode->rn_clev, - ("%s: unexpected trie depth: clev: %d, rnode->rn_clev: %d", - __func__, clev, rnode->rn_clev)); - slot = vm_radix_slot(index, rnode->rn_clev); - tmp = rnode->rn_child[slot]; - KASSERT(tmp != NULL && !vm_radix_isleaf(tmp), - ("%s: unexpected lookup interruption", __func__)); - if (tmp->rn_clev > clev) - break; - } - KASSERT(rnode != NULL && tmp != NULL && slot < VM_RADIX_COUNT, - ("%s: invalid scan parameters rnode: %p, tmp: %p, slot: %d", - __func__, (void *)rnode, (void *)tmp, slot)); - - /* * A new node is needed because the right insertion level is reached. * Setup the new intermediate node and add the 2 children: the * new object and the older edge. */ - tmp2 = vm_radix_node_get(vm_radix_trimkey(index, clev - 1), 2, + newind = rnode->rn_owner; + clev = vm_radix_keydiff(newind, index); + tmp = vm_radix_node_get(vm_radix_trimkey(index, clev - 1), 2, clev); - rnode->rn_child[slot] = tmp2; - vm_radix_addpage(tmp2, index, clev, page); + parent->rn_child[slot] = tmp; + vm_radix_addpage(tmp, index, clev, page); slot = vm_radix_slot(newind, clev); - tmp2->rn_child[slot] = tmp; + tmp->rn_child[slot] = rnode; } /* From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 07:43:50 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A5AF16D6; Sat, 6 Apr 2013 07:43:50 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9663C352; Sat, 6 Apr 2013 07:43:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r367hoMq006110; Sat, 6 Apr 2013 07:43:50 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r367hoQE006109; Sat, 6 Apr 2013 07:43:50 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304060743.r367hoQE006109@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 07:43:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249185 - vendor/illumos/dist/cmd/zdb 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: Sat, 06 Apr 2013 07:43:50 -0000 Author: mm Date: Sat Apr 6 07:43:50 2013 New Revision: 249185 URL: http://svnweb.freebsd.org/changeset/base/249185 Log: Update vendor/illumos/dist to illumos-gate 13991:53e4f9da98a1 Illumos ZFS issues: 3641 want a histogram of compressed block sizes Modified: vendor/illumos/dist/cmd/zdb/zdb.c Modified: vendor/illumos/dist/cmd/zdb/zdb.c ============================================================================== --- vendor/illumos/dist/cmd/zdb/zdb.c Sat Apr 6 07:14:50 2013 (r249184) +++ vendor/illumos/dist/cmd/zdb/zdb.c Sat Apr 6 07:43:50 2013 (r249185) @@ -21,10 +21,11 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include +#include #include #include #include @@ -241,18 +242,18 @@ zdb_nicenum(uint64_t num, char *buf) nicenum(num, buf); } -const char dump_zap_stars[] = "****************************************"; -const int dump_zap_width = sizeof (dump_zap_stars) - 1; +const char histo_stars[] = "****************************************"; +const int histo_width = sizeof (histo_stars) - 1; static void -dump_zap_histogram(uint64_t histo[ZAP_HISTOGRAM_SIZE]) +dump_histogram(const uint64_t *histo, int size) { int i; - int minidx = ZAP_HISTOGRAM_SIZE - 1; + int minidx = size - 1; int maxidx = 0; uint64_t max = 0; - for (i = 0; i < ZAP_HISTOGRAM_SIZE; i++) { + for (i = 0; i < size; i++) { if (histo[i] > max) max = histo[i]; if (histo[i] > 0 && i > maxidx) @@ -261,12 +262,14 @@ dump_zap_histogram(uint64_t histo[ZAP_HI minidx = i; } - if (max < dump_zap_width) - max = dump_zap_width; + if (max < histo_width) + max = histo_width; - for (i = minidx; i <= maxidx; i++) - (void) printf("\t\t\t%u: %6llu %s\n", i, (u_longlong_t)histo[i], - &dump_zap_stars[(max - histo[i]) * dump_zap_width / max]); + for (i = minidx; i <= maxidx; i++) { + (void) printf("\t\t\t%3u: %6llu %s\n", + i, (u_longlong_t)histo[i], + &histo_stars[(max - histo[i]) * histo_width / max]); + } } static void @@ -317,19 +320,19 @@ dump_zap_stats(objset_t *os, uint64_t ob (u_longlong_t)zs.zs_salt); (void) printf("\t\tLeafs with 2^n pointers:\n"); - dump_zap_histogram(zs.zs_leafs_with_2n_pointers); + dump_histogram(zs.zs_leafs_with_2n_pointers, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tBlocks with n*5 entries:\n"); - dump_zap_histogram(zs.zs_blocks_with_n5_entries); + dump_histogram(zs.zs_blocks_with_n5_entries, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tBlocks n/10 full:\n"); - dump_zap_histogram(zs.zs_blocks_n_tenths_full); + dump_histogram(zs.zs_blocks_n_tenths_full, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tEntries with n chunks:\n"); - dump_zap_histogram(zs.zs_entries_using_n_chunks); + dump_histogram(zs.zs_entries_using_n_chunks, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tBuckets with n entries:\n"); - dump_zap_histogram(zs.zs_buckets_with_n_entries); + dump_histogram(zs.zs_buckets_with_n_entries, ZAP_HISTOGRAM_SIZE); } /*ARGSUSED*/ @@ -949,7 +952,7 @@ sprintf_blkptr_compact(char *blkbuf, con const dva_t *dva = bp->blk_dva; int ndvas = dump_opt['d'] > 5 ? BP_GET_NDVAS(bp) : 1; - if (dump_opt['b'] >= 5) { + if (dump_opt['b'] >= 6) { sprintf_blkptr(blkbuf, bp); return; } @@ -1988,11 +1991,13 @@ dump_one_dir(const char *dsname, void *a /* * Block statistics. */ +#define PSIZE_HISTO_SIZE (SPA_MAXBLOCKSIZE / SPA_MINBLOCKSIZE + 1) typedef struct zdb_blkstats { - uint64_t zb_asize; - uint64_t zb_lsize; - uint64_t zb_psize; - uint64_t zb_count; + uint64_t zb_asize; + uint64_t zb_lsize; + uint64_t zb_psize; + uint64_t zb_count; + uint64_t zb_psize_histogram[PSIZE_HISTO_SIZE]; } zdb_blkstats_t; /* @@ -2016,6 +2021,9 @@ typedef struct zdb_cb { zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1]; uint64_t zcb_dedup_asize; uint64_t zcb_dedup_blocks; + uint64_t zcb_start; + uint64_t zcb_lastprint; + uint64_t zcb_totalasize; uint64_t zcb_errors[256]; int zcb_readfails; int zcb_haderrors; @@ -2042,6 +2050,7 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * zb->zb_lsize += BP_GET_LSIZE(bp); zb->zb_psize += BP_GET_PSIZE(bp); zb->zb_count++; + zb->zb_psize_histogram[BP_GET_PSIZE(bp) >> SPA_MINBLOCKSHIFT]++; } if (dump_opt['L']) @@ -2151,7 +2160,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog zcb->zcb_readfails = 0; - if (dump_opt['b'] >= 4) { + if (dump_opt['b'] >= 5) { sprintf_blkptr(blkbuf, bp); (void) printf("objset %llu object %llu " "level %lld offset 0x%llx %s\n", @@ -2162,6 +2171,28 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog blkbuf); } + if (dump_opt['b'] < 5 && isatty(STDERR_FILENO) && + gethrtime() > zcb->zcb_lastprint + NANOSEC) { + uint64_t now = gethrtime(); + char buf[10]; + uint64_t bytes = zcb->zcb_type[ZB_TOTAL][ZDB_OT_TOTAL].zb_asize; + int kb_per_sec = + 1 + bytes / (1 + ((now - zcb->zcb_start) / 1000 / 1000)); + int sec_remaining = + (zcb->zcb_totalasize - bytes) / 1024 / kb_per_sec; + + zfs_nicenum(bytes, buf, sizeof (buf)); + (void) fprintf(stderr, + "\r%5s completed (%4dMB/s) " + "estimated time remaining: %uhr %02umin %02usec ", + buf, kb_per_sec / 1024, + sec_remaining / 60 / 60, + sec_remaining / 60 % 60, + sec_remaining % 60); + + zcb->zcb_lastprint = now; + } + return (0); } @@ -2293,7 +2324,7 @@ count_block_cb(void *arg, const blkptr_t { zdb_cb_t *zcb = arg; - if (dump_opt['b'] >= 4) { + if (dump_opt['b'] >= 5) { char blkbuf[BP_SPRINTF_LEN]; sprintf_blkptr(blkbuf, bp); (void) printf("[%s] %s\n", @@ -2312,7 +2343,7 @@ dump_block_stats(spa_t *spa) int flags = TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA | TRAVERSE_HARD; int leaks = 0; - (void) printf("\nTraversing all blocks %s%s%s%s%s...\n", + (void) printf("\nTraversing all blocks %s%s%s%s%s...\n\n", (dump_opt['c'] || !dump_opt['L']) ? "to verify " : "", (dump_opt['c'] == 1) ? "metadata " : "", dump_opt['c'] ? "checksums " : "", @@ -2348,6 +2379,8 @@ dump_block_stats(spa_t *spa) if (dump_opt['c'] > 1) flags |= TRAVERSE_PREFETCH_DATA; + zcb.zcb_totalasize = metaslab_class_get_alloc(spa_normal_class(spa)); + zcb.zcb_start = zcb.zcb_lastprint = gethrtime(); zcb.zcb_haderrors |= traverse_pool(spa, 0, flags, zdb_blkptr_cb, &zcb); /* @@ -2487,6 +2520,14 @@ dump_block_stats(spa_t *spa) else (void) printf(" L%d %s\n", level, typename); + + if (dump_opt['b'] >= 4) { + (void) printf("psize " + "(in 512-byte sectors): " + "number of blocks\n"); + dump_histogram(zb->zb_psize_histogram, + PSIZE_HISTO_SIZE); + } } } } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 08:02:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E35558E4; Sat, 6 Apr 2013 08:02:11 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D5F2B398; Sat, 6 Apr 2013 08:02:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3682Bfh005104; Sat, 6 Apr 2013 08:02:11 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3682Bol005102; Sat, 6 Apr 2013 08:02:11 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304060802.r3682Bol005102@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 08:02:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249186 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys 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, 06 Apr 2013 08:02:12 -0000 Author: mm Date: Sat Apr 6 08:02:10 2013 New Revision: 249186 URL: http://svnweb.freebsd.org/changeset/base/249186 Log: Update vendor-sys/illumos/dist to illumos-gate 13992:313c3db67359 Illumos ZFS issues: 3639 zpool.cache should skip over readonly pools 3640 want automatic devid updates Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c Sat Apr 6 07:43:50 2013 (r249185) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/spa_config.c Sat Apr 6 08:02:10 2013 (r249186) @@ -222,7 +222,15 @@ spa_config_sync(spa_t *target, boolean_t */ nvl = NULL; while ((spa = spa_next(spa)) != NULL) { - if (spa == target && removing) + /* + * Skip over our own pool if we're about to remove + * ourselves from the spa namespace or any pool that + * is readonly. Since we cannot guarantee that a + * readonly pool would successfully import upon reboot, + * we don't allow them to be written to the cache file. + */ + if ((spa == target && removing) || + !spa_writeable(spa)) continue; mutex_enter(&spa->spa_props_lock); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c Sat Apr 6 07:43:50 2013 (r249185) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_disk.c Sat Apr 6 08:02:10 2013 (r249186) @@ -139,6 +139,8 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi int error; dev_t dev; int otyp; + boolean_t validate_devid = B_FALSE; + ddi_devid_t devid; /* * We must have a pathname, and it must be absolute. @@ -187,7 +189,6 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi error = EINVAL; /* presume failure */ if (vd->vdev_path != NULL) { - ddi_devid_t devid; if (vd->vdev_wholedisk == -1ULL) { size_t len = strlen(vd->vdev_path) + 3; @@ -236,9 +237,10 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi * If we were unable to open by path, or the devid check fails, open by * devid instead. */ - if (error != 0 && vd->vdev_devid != NULL) + if (error != 0 && vd->vdev_devid != NULL) { error = ldi_open_by_devid(dvd->vd_devid, dvd->vd_minor, spa_mode(spa), kcred, &dvd->vd_lh, zfs_li); + } /* * If all else fails, then try opening by physical path (if available) @@ -247,6 +249,9 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi * level vdev validation will prevent us from opening the wrong device. */ if (error) { + if (vd->vdev_devid != NULL) + validate_devid = B_TRUE; + if (vd->vdev_physpath != NULL && (dev = ddi_pathname_to_dev_t(vd->vdev_physpath)) != NODEV) error = ldi_open_by_dev(&dev, OTYP_BLK, spa_mode(spa), @@ -268,6 +273,25 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi } /* + * Now that the device has been successfully opened, update the devid + * if necessary. + */ + if (validate_devid && spa_writeable(spa) && + ldi_get_devid(dvd->vd_lh, &devid) == 0) { + if (ddi_devid_compare(devid, dvd->vd_devid) != 0) { + char *vd_devid; + + vd_devid = ddi_devid_str_encode(devid, dvd->vd_minor); + zfs_dbgmsg("vdev %s: update devid from %s, " + "to %s", vd->vdev_path, vd->vdev_devid, vd_devid); + spa_strfree(vd->vdev_devid); + vd->vdev_devid = spa_strdup(vd_devid); + ddi_devid_str_free(vd_devid); + } + ddi_devid_free(devid); + } + + /* * Once a device is opened, verify that the physical device path (if * available) is up to date. */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 08:06:27 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 05F0AA5A; Sat, 6 Apr 2013 08:06:27 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DCC0D3D2; Sat, 6 Apr 2013 08:06:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r3686Qng005693; Sat, 6 Apr 2013 08:06:26 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r3686QAP005690; Sat, 6 Apr 2013 08:06:26 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304060806.r3686QAP005690@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 08:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r249187 - in vendor/illumos/dist: cmd/dtrace/test/tst/common/print lib/libdtrace/common 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: Sat, 06 Apr 2013 08:06:27 -0000 Author: mm Date: Sat Apr 6 08:06:25 2013 New Revision: 249187 URL: http://svnweb.freebsd.org/changeset/base/249187 Log: Update vendor/illumos/dist to illumos-gate 14004:dd91fed709a7 Illumos DTrace issues: 3675 DTrace print() should try to resolve function pointers 3676 dt_print_enum hardcodes a value of zero Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.enum.d vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.enum.d.out Modified: vendor/illumos/dist/lib/libdtrace/common/dt_print.c Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.enum.d ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.enum.d Sat Apr 6 08:06:25 2013 (r249187) @@ -0,0 +1,33 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ + +#pragma D option quiet + +enum simpson { + homer, + marge, + bart, + lisa, + maggie, + snowball_ii, + santas_little_helper +}; + +BEGIN +{ + print(bart); + print((enum simpson)4); + print(snowball_ii); + exit(0); +} Added: vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.enum.d.out ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/illumos/dist/cmd/dtrace/test/tst/common/print/tst.enum.d.out Sat Apr 6 08:06:25 2013 (r249187) @@ -0,0 +1,4 @@ +enum simpson bart +enum simpson maggie +enum simpson snowball_ii + Modified: vendor/illumos/dist/lib/libdtrace/common/dt_print.c ============================================================================== --- vendor/illumos/dist/lib/libdtrace/common/dt_print.c Sat Apr 6 08:02:10 2013 (r249186) +++ vendor/illumos/dist/lib/libdtrace/common/dt_print.c Sat Apr 6 08:06:25 2013 (r249187) @@ -25,6 +25,9 @@ /* * Copyright (c) 2011 by Delphix. All rights reserved. */ +/* + * Copyright (c) 2013, Joyent, Inc. All rights reserved. + */ /* * DTrace print() action @@ -93,6 +96,7 @@ * Print structure passed down recursively through printing algorithm. */ typedef struct dt_printarg { + dtrace_hdl_t *pa_dtp; /* libdtrace handle */ caddr_t pa_addr; /* base address of trace data */ ctf_file_t *pa_ctfp; /* CTF container */ int pa_depth; /* member depth */ @@ -303,8 +307,8 @@ dt_print_float(ctf_id_t base, ulong_t of } /* - * A pointer is printed as a fixed-size integer. This is used both for - * pointers and functions. + * A pointer is generally printed as a fixed-size integer. If we have a + * function pointer, we try to look up its name. */ static void dt_print_ptr(ctf_id_t base, ulong_t off, dt_printarg_t *pap) @@ -313,8 +317,23 @@ dt_print_ptr(ctf_id_t base, ulong_t off, ctf_file_t *ctfp = pap->pa_ctfp; caddr_t addr = pap->pa_addr + off / NBBY; size_t size = ctf_type_size(ctfp, base); - - dt_print_hex(fp, addr, size); + ctf_id_t bid = ctf_type_reference(ctfp, base); + uint64_t pc; + dtrace_syminfo_t dts; + GElf_Sym sym; + + if (bid == CTF_ERR || ctf_type_kind(ctfp, bid) != CTF_K_FUNCTION) { + dt_print_hex(fp, addr, size); + } else { + /* LINTED - alignment */ + pc = *((uint64_t *)addr); + if (dtrace_lookup_by_addr(pap->pa_dtp, pc, &sym, &dts) != 0) { + dt_print_hex(fp, addr, size); + } else { + (void) fprintf(fp, "%s`%s", dts.dts_object, + dts.dts_name); + } + } } /* @@ -459,8 +478,31 @@ dt_print_enum(ctf_id_t base, ulong_t off FILE *fp = pap->pa_file; ctf_file_t *ctfp = pap->pa_ctfp; const char *ename; + ssize_t size; + caddr_t addr = pap->pa_addr + off / NBBY; int value = 0; + /* + * The C standard says that an enum will be at most the sizeof (int). + * But if all the values are less than that, the compiler can use a + * smaller size. Thanks standards. + */ + size = ctf_type_size(ctfp, base); + switch (size) { + case sizeof (uint8_t): + value = *(uint8_t *)addr; + break; + case sizeof (uint16_t): + value = *(uint16_t *)addr; + break; + case sizeof (int32_t): + value = *(int32_t *)addr; + break; + default: + (void) fprintf(fp, "", (uint_t)size); + return; + } + if ((ename = ctf_enum_name(ctfp, base, value)) != NULL) (void) fprintf(fp, "%s", ename); else @@ -635,6 +677,7 @@ dtrace_print(dtrace_hdl_t *dtp, FILE *fp } /* setup the print structure and kick off the main print routine */ + pa.pa_dtp = dtp; pa.pa_addr = addr; pa.pa_ctfp = dt_module_getctf(dtp, dmp); pa.pa_nest = 0; From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 08:06:31 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9E74EA5C for ; Sat, 6 Apr 2013 08:06:31 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-ve0-f180.google.com (mail-ve0-f180.google.com [209.85.128.180]) by mx1.freebsd.org (Postfix) with ESMTP id 5F5733D4 for ; Sat, 6 Apr 2013 08:06:31 +0000 (UTC) Received: by mail-ve0-f180.google.com with SMTP id c13so4125837vea.25 for ; Sat, 06 Apr 2013 01:06:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wemm.org; s=google; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=pSXkDuq3nXytQ1NWYMcdiMcuvE9r0YuPUw5fUOYbwIQ=; b=Z9vzIqQMujxeKtYhjowbZGDetiEYG5SWQUAzsZtCyMbbYSQRW8eRFddRC66lzdUik8 +UVVdqcEReGLHL1LrZDt+A5MC9oRFbAt8d6AvlOPKa7Qwb8yoHeS3sY2idXXBgOofCXE O3/oe0ShUdIDerwL3JsVmI0eJnJbV1iQMk4ZU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=pSXkDuq3nXytQ1NWYMcdiMcuvE9r0YuPUw5fUOYbwIQ=; b=E4Yer3oCaA53Cj6evXEaGalzaGAgtRRuU2PI85UAn7u26PzRiRMWSy+cirKb0COWuV 6JhtDTdZ4UXeumV8s4wjXlFAmIY/cd4urDqdE64KMErZp1oX6lFO3IMlaAMBRNtnd7l2 gYfuEqrE6b3QewtwtzOb5os3ge70OlJ7tXI3TlO1GaR3LoK8E51Rtuy4wB7v37LHpATy 9jwEao9NxptYMKGsiOGRaWucJu4Z6s0mDrVTdOm5MoWtGlm1Syl/sAfun4+Kd+iTxnq1 WEYfL5v1vDCpcOwBHo3W4l7BXKz6k4DdTyfAi/2/AO3Fpxm69uGbCmi5a8/b2yxjEF5s rbKg== MIME-Version: 1.0 X-Received: by 10.52.164.166 with SMTP id yr6mr9006393vdb.37.1365235584732; Sat, 06 Apr 2013 01:06:24 -0700 (PDT) Received: by 10.220.211.72 with HTTP; Sat, 6 Apr 2013 01:06:24 -0700 (PDT) In-Reply-To: <20130320235001.GA60980@stack.nl> References: <201303192058.r2JKwIwg039788@svn.freebsd.org> <20130320091856.GI76816@FreeBSD.org> <20130320235001.GA60980@stack.nl> Date: Sat, 6 Apr 2013 01:06:24 -0700 Message-ID: Subject: Re: svn commit: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys From: Peter Wemm To: Jilles Tjoelker Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnOCAp2yPMqWsVI+520f315jAJgWOpagfEJcwLqMd6gkaAw2oG3VcyA+8E/3MxqQDGIt9u6 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , 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, 06 Apr 2013 08:06:31 -0000 On Wed, Mar 20, 2013 at 4:50 PM, Jilles Tjoelker wrote: > On Wed, Mar 20, 2013 at 01:18:56PM +0400, Gleb Smirnoff wrote: >> On Tue, Mar 19, 2013 at 08:58:18PM +0000, Jilles Tjoelker wrote: >> J> Author: jilles >> J> Date: Tue Mar 19 20:58:17 2013 >> J> New Revision: 248534 >> J> URL: http://svnweb.freebsd.org/changeset/base/248534 > >> J> Log: >> J> Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. >[..] >> IMO, it won't hurt if changes like this (bringing in new functionality) >> would bump __FreeBSD_version. > > This change can be detected via the new #defines, and I plan to add > similar changes in the near future (see the hackers@ mail about this > patch; some of them cannot be detected via the preprocessor or even at > compile time). Therefore, I think a __FreeBSD_version bump is not yet > appropriate. FYI.. The heimdal krb5 in /usr/src auto-detects these and uses them, as do a couple of random ports. These binaries will no longer run on kernel.old, or 9.x. This is probably worth making a warning about because it's been a while since installworld/reboot/installkernel discipline has been required and folks have probably got lazy. Heck, you have been able to do an installworld from 9.x -> 10.x for a while without requiring a reboot. (I know, because I've developed this bad habit) -- Peter Wemm - peter@wemm.org; peter@FreeBSD.org; peter@yahoo-inc.com; KI6FJV bitcoin:188ZjyYLFJiEheQZw4UtU27e2FMLmuRBUE From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 08:21:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id F1A03DD3; Sat, 6 Apr 2013 08:21:37 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id E4192601; Sat, 6 Apr 2013 08:21:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r368LbYL010914; Sat, 6 Apr 2013 08:21:37 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r368LbJ4010913; Sat, 6 Apr 2013 08:21:37 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304060821.r368LbJ4010913@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 08:21:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249188 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 06 Apr 2013 08:21:38 -0000 Author: mm Date: Sat Apr 6 08:21:37 2013 New Revision: 249188 URL: http://svnweb.freebsd.org/changeset/base/249188 Log: MFV r242816: Import vendor change to reduce diff, no effect on FreeBSD. Illumos ZFS issues: 3517 importing pool with autoreplace=on and "hole" vdevs crashes syseventd Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Apr 6 08:06:25 2013 (r249187) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Sat Apr 6 08:21:37 2013 (r249188) @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright 2013 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2013 Martin Matuska . All rights reserved. */ @@ -1525,7 +1526,8 @@ spa_check_removed(vdev_t *vd) for (int c = 0; c < vd->vdev_children; c++) spa_check_removed(vd->vdev_child[c]); - if (vd->vdev_ops->vdev_op_leaf && vdev_is_dead(vd)) { + if (vd->vdev_ops->vdev_op_leaf && vdev_is_dead(vd) && + !vd->vdev_ishole) { zfs_post_autoreplace(vd->vdev_spa, vd); spa_event_notify(vd->vdev_spa, vd, ESC_ZFS_VDEV_CHECK); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 08:23:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id E111BF4C; Sat, 6 Apr 2013 08:23:38 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id D3A62611; Sat, 6 Apr 2013 08:23:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r368NcZa011257; Sat, 6 Apr 2013 08:23:38 GMT (envelope-from glebius@svn.freebsd.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r368Ncrc011255; Sat, 6 Apr 2013 08:23:38 GMT (envelope-from glebius@svn.freebsd.org) Message-Id: <201304060823.r368Ncrc011255@svn.freebsd.org> From: Gleb Smirnoff Date: Sat, 6 Apr 2013 08:23:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249189 - head/sys/sys 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, 06 Apr 2013 08:23:39 -0000 Author: glebius Date: Sat Apr 6 08:23:38 2013 New Revision: 249189 URL: http://svnweb.freebsd.org/changeset/base/249189 Log: Move CRITICAL_ASSERT() macro to systm.h, where the critical(9) functions are declared. Modified: head/sys/sys/proc.h head/sys/sys/systm.h Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sat Apr 6 08:21:37 2013 (r249188) +++ head/sys/sys/proc.h Sat Apr 6 08:23:38 2013 (r249189) @@ -341,9 +341,6 @@ do { \ #define THREAD_LOCKPTR_ASSERT(td, lock) #endif -#define CRITICAL_ASSERT(td) \ - KASSERT((td)->td_critnest >= 1, ("Not in critical section")); - /* * Flags kept in td_flags: * To change these you MUST have the scheduler lock. Modified: head/sys/sys/systm.h ============================================================================== --- head/sys/sys/systm.h Sat Apr 6 08:21:37 2013 (r249188) +++ head/sys/sys/systm.h Sat Apr 6 08:23:38 2013 (r249189) @@ -112,6 +112,12 @@ void kassert_panic(const char *fmt, ...) ((uintptr_t)&(var) & (sizeof(void *) - 1)) == 0, msg) /* + * Assert that a thread is in critical(9) section. + */ +#define CRITICAL_ASSERT(td) \ + KASSERT((td)->td_critnest >= 1, ("Not in critical section")); + +/* * If we have already panic'd and this is the thread that called * panic(), then don't block on any mutexes but silently succeed. * Otherwise, the kernel will deadlock since the scheduler isn't From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 10:32:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 67432ED0; Sat, 6 Apr 2013 10:32:07 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 59DF68C6; Sat, 6 Apr 2013 10:32:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36AW7ju049071; Sat, 6 Apr 2013 10:32:07 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36AW71f049069; Sat, 6 Apr 2013 10:32:07 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304061032.r36AW71f049069@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 6 Apr 2013 10:32:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249193 - head/sys/geom 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, 06 Apr 2013 10:32:07 -0000 Author: trasz Date: Sat Apr 6 10:32:06 2013 New Revision: 249193 URL: http://svnweb.freebsd.org/changeset/base/249193 Log: Make it possible to submit FLUSH bios through geom_dev strategy. This is required for CTL to work with device-backed LUNs. Reviewed by: mav Modified: head/sys/geom/geom_dev.c Modified: head/sys/geom/geom_dev.c ============================================================================== --- head/sys/geom/geom_dev.c Sat Apr 6 09:57:27 2013 (r249192) +++ head/sys/geom/geom_dev.c Sat Apr 6 10:32:06 2013 (r249193) @@ -501,7 +501,8 @@ g_dev_strategy(struct bio *bp) KASSERT(bp->bio_cmd == BIO_READ || bp->bio_cmd == BIO_WRITE || - bp->bio_cmd == BIO_DELETE, + bp->bio_cmd == BIO_DELETE || + bp->bio_cmd == BIO_FLUSH, ("Wrong bio_cmd bio=%p cmd=%d", bp, bp->bio_cmd)); dev = bp->bio_dev; cp = dev->si_drv2; From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 10:34:03 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 4639CE1; Sat, 6 Apr 2013 10:34:03 +0000 (UTC) (envelope-from trasz@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 38CF58D8; Sat, 6 Apr 2013 10:34:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36AY3Mg049404; Sat, 6 Apr 2013 10:34:03 GMT (envelope-from trasz@svn.freebsd.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36AY3cX049402; Sat, 6 Apr 2013 10:34:03 GMT (envelope-from trasz@svn.freebsd.org) Message-Id: <201304061034.r36AY3cX049402@svn.freebsd.org> From: Edward Tomasz Napierala Date: Sat, 6 Apr 2013 10:34:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249194 - 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, 06 Apr 2013 10:34:03 -0000 Author: trasz Date: Sat Apr 6 10:34:02 2013 New Revision: 249194 URL: http://svnweb.freebsd.org/changeset/base/249194 Log: Make SYNCHRONIZE CACHE work with LUNs backed by device files (as opposed to regular files, which already worked fine). With this change, it's no longer neccessary to use "ctladm realsync off" workaround. Modified: head/sys/cam/ctl/ctl_backend_block.c Modified: head/sys/cam/ctl/ctl_backend_block.c ============================================================================== --- head/sys/cam/ctl/ctl_backend_block.c Sat Apr 6 10:32:06 2013 (r249193) +++ head/sys/cam/ctl/ctl_backend_block.c Sat Apr 6 10:34:02 2013 (r249194) @@ -950,6 +950,7 @@ ctl_be_block_cw_dispatch(struct ctl_be_b switch (io->scsiio.cdb[0]) { case SYNCHRONIZE_CACHE: case SYNCHRONIZE_CACHE_16: + beio->bio_cmd = BIO_FLUSH; beio->ds_trans_type = DEVSTAT_NO_DATA; beio->ds_tag_type = DEVSTAT_TAG_ORDERED; beio->io_len = 0; From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 10:39:41 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 5D0022A5; Sat, 6 Apr 2013 10:39:41 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4C9DC8F9; Sat, 6 Apr 2013 10:39:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36AdfY3050151; Sat, 6 Apr 2013 10:39:41 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36Adddw050135; Sat, 6 Apr 2013 10:39:39 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304061039.r36Adddw050135@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 10:39:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249195 - in head: cddl/contrib/opensolaris/lib/libzpool/common cddl/contrib/opensolaris/lib/libzpool/common/sys sys/cddl/compat/opensolaris/sys sys/cddl/contrib/opensolaris/uts/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: Sat, 06 Apr 2013 10:39:41 -0000 Author: mm Date: Sat Apr 6 10:39:38 2013 New Revision: 249195 URL: http://svnweb.freebsd.org/changeset/base/249195 Log: MFV r248217: Merge change from vendor to reduce diff only. ZFS dtrace probes are not supported on FreeBSD yet. Illumos ZFS issues: 3598 want to dtrace when errors are generated in zfs MFC after: 3 weeks Added: head/cddl/contrib/opensolaris/lib/libzpool/common/zfs.d - copied unchanged from r248217, vendor/illumos/dist/lib/libzpool/common/zfs.d Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h head/sys/cddl/compat/opensolaris/sys/sdt.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_errlog.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_cache.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_mirror.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_missing.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_root.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfeature.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_acl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ctldir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_dir.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_onexit.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_replay.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_compress.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Sat Apr 6 10:34:02 2013 (r249194) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Sat Apr 6 10:39:38 2013 (r249195) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. */ @@ -86,6 +87,9 @@ extern "C" { #include #include #include +#ifdef illumos +#include "zfs.h" +#endif #define ZFS_EXPORTS_PATH "/etc/zfs/exports" @@ -133,28 +137,64 @@ extern int aok; #ifdef DTRACE_PROBE #undef DTRACE_PROBE -#define DTRACE_PROBE(a) ((void)0) #endif /* DTRACE_PROBE */ +#ifdef illumos +#define DTRACE_PROBE(a) \ + ZFS_PROBE0(#a) +#endif #ifdef DTRACE_PROBE1 #undef DTRACE_PROBE1 -#define DTRACE_PROBE1(a, b, c) ((void)0) #endif /* DTRACE_PROBE1 */ +#ifdef illumos +#define DTRACE_PROBE1(a, b, c) \ + ZFS_PROBE1(#a, (unsigned long)c) +#endif #ifdef DTRACE_PROBE2 #undef DTRACE_PROBE2 -#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) #endif /* DTRACE_PROBE2 */ +#ifdef illumos +#define DTRACE_PROBE2(a, b, c, d, e) \ + ZFS_PROBE2(#a, (unsigned long)c, (unsigned long)e) +#endif #ifdef DTRACE_PROBE3 #undef DTRACE_PROBE3 -#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) #endif /* DTRACE_PROBE3 */ +#ifdef illumos +#define DTRACE_PROBE3(a, b, c, d, e, f, g) \ + ZFS_PROBE3(#a, (unsigned long)c, (unsigned long)e, (unsigned long)g) +#endif #ifdef DTRACE_PROBE4 #undef DTRACE_PROBE4 -#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) #endif /* DTRACE_PROBE4 */ +#ifdef illumos +#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) \ + ZFS_PROBE4(#a, (unsigned long)c, (unsigned long)e, (unsigned long)g, \ + (unsigned long)i) +#endif + +#ifdef illumos +/* + * We use the comma operator so that this macro can be used without much + * additional code. For example, "return (EINVAL);" becomes + * "return (SET_ERROR(EINVAL));". Note that the argument will be evaluated + * twice, so it should not have side effects (e.g. something like: + * "return (SET_ERROR(log_error(EINVAL, info)));" would log the error twice). + */ +#define SET_ERROR(err) (ZFS_SET_ERROR(err), err) +#else /* !illumos */ + +#define DTRACE_PROBE(a) ((void)0) +#define DTRACE_PROBE1(a, b, c) ((void)0) +#define DTRACE_PROBE2(a, b, c, d, e) ((void)0) +#define DTRACE_PROBE3(a, b, c, d, e, f, g) ((void)0) +#define DTRACE_PROBE4(a, b, c, d, e, f, g, h, i) ((void)0) + +#define SET_ERROR(err) (err) +#endif /* !illumos */ /* * Threads Copied: head/cddl/contrib/opensolaris/lib/libzpool/common/zfs.d (from r248217, vendor/illumos/dist/lib/libzpool/common/zfs.d) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/zfs.d Sat Apr 6 10:39:38 2013 (r249195, copy of r248217, vendor/illumos/dist/lib/libzpool/common/zfs.d) @@ -0,0 +1,36 @@ +/* + * CDDL HEADER START + * + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + * + * CDDL HEADER END + */ + +/* + * Copyright (c) 2013 by Delphix. All rights reserved. + */ + +provider zfs { + probe probe0(char *probename); + probe probe1(char *probename, unsigned long arg1); + probe probe2(char *probename, unsigned long arg1, unsigned long arg2); + probe probe3(char *probename, unsigned long arg1, unsigned long arg2, + unsigned long arg3); + probe probe4(char *probename, unsigned long arg1, unsigned long arg2, + unsigned long arg3, unsigned long arg4); + + probe set__error(int err); +}; + +#pragma D attributes Evolving/Evolving/ISA provider zfs provider +#pragma D attributes Private/Private/Unknown provider zfs module +#pragma D attributes Private/Private/Unknown provider zfs function +#pragma D attributes Evolving/Evolving/ISA provider zfs name +#pragma D attributes Evolving/Evolving/ISA provider zfs args Modified: head/sys/cddl/compat/opensolaris/sys/sdt.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/sdt.h Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/compat/opensolaris/sys/sdt.h Sat Apr 6 10:39:38 2013 (r249195) @@ -41,6 +41,8 @@ #define DTRACE_PROBE1(name, type1, arg1) #define DTRACE_PROBE2(name, type1, arg1, type2, arg2) #define DTRACE_PROBE3(name, type1, arg1, type2, arg2, type3, arg3) -#define DTRACE_PROBE4(name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) +#define DTRACE_PROBE4(name, type1, arg1, type2, arg2, type3, arg3, type4, arg4) + +#define SET_ERROR(err) (err) #endif /* _OPENSOLARIS_SYS_SDT_H_ */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Sat Apr 6 10:39:38 2013 (r249195) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2011 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ /* @@ -3738,14 +3738,14 @@ arc_memory_throttle(uint64_t reserve, ui */ if (curproc == pageproc) { if (page_load > available_memory / 4) - return (ERESTART); + return (SET_ERROR(ERESTART)); /* Note: reserve is inflated, so we deflate */ page_load += reserve / 8; return (0); } else if (page_load > 0 && arc_reclaim_needed()) { /* memory is low, delay before restarting */ ARCSTAT_INCR(arcstat_memory_throttle_count, 1); - return (EAGAIN); + return (SET_ERROR(EAGAIN)); } page_load = 0; @@ -3760,7 +3760,7 @@ arc_memory_throttle(uint64_t reserve, ui if (inflight_data > available_memory / 4) { ARCSTAT_INCR(arcstat_memory_throttle_count, 1); - return (ERESTART); + return (SET_ERROR(ERESTART)); } #endif return (0); @@ -3785,13 +3785,13 @@ arc_tempreserve_space(uint64_t reserve, */ if (spa_get_random(10000) == 0) { dprintf("forcing random failure\n"); - return (ERESTART); + return (SET_ERROR(ERESTART)); } #endif if (reserve > arc_c/4 && !arc_no_grow) arc_c = MIN(arc_c_max, reserve * 4); if (reserve > arc_c) - return (ENOMEM); + return (SET_ERROR(ENOMEM)); /* * Don't count loaned bufs as in flight dirty data to prevent long @@ -3824,7 +3824,7 @@ arc_tempreserve_space(uint64_t reserve, arc_anon->arcs_lsize[ARC_BUFC_METADATA]>>10, arc_anon->arcs_lsize[ARC_BUFC_DATA]>>10, reserve>>10, arc_c>>10); - return (ERESTART); + return (SET_ERROR(ERESTART)); } atomic_add_64(&arc_tempreserve, reserve); return (0); @@ -4518,7 +4518,7 @@ l2arc_read_done(zio_t *zio) if (zio->io_error != 0) { ARCSTAT_BUMP(arcstat_l2_io_error); } else { - zio->io_error = EIO; + zio->io_error = SET_ERROR(EIO); } if (!equal) ARCSTAT_BUMP(arcstat_l2_cksum_bad); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Sat Apr 6 10:39:38 2013 (r249195) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -598,7 +598,7 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio ASSERT(!refcount_is_zero(&db->db_holds)); if (db->db_state == DB_NOFILL) - return (EIO); + return (SET_ERROR(EIO)); DB_DNODE_ENTER(db); dn = DB_DNODE(db); @@ -655,7 +655,7 @@ dbuf_read(dmu_buf_impl_t *db, zio_t *zio cv_wait(&db->db_changed, &db->db_mtx); } if (db->db_state == DB_UNCACHED) - err = EIO; + err = SET_ERROR(EIO); } mutex_exit(&db->db_mtx); } @@ -1593,7 +1593,7 @@ dbuf_findbp(dnode_t *dn, int level, uint if (level >= nlevels || (blkid > (dn->dn_phys->dn_maxblkid >> (level * epbs)))) { /* the buffer has no parent yet */ - return (ENOENT); + return (SET_ERROR(ENOENT)); } else if (level < nlevels-1) { /* this block is referenced from an indirect block */ int err = dbuf_hold_impl(dn, level+1, @@ -1844,7 +1844,7 @@ top: err = dbuf_findbp(dn, level, blkid, fail_sparse, &parent, &bp); if (fail_sparse) { if (err == 0 && bp && BP_IS_HOLE(bp)) - err = ENOENT; + err = SET_ERROR(ENOENT); if (err) { if (parent) dbuf_rele(parent, NULL); @@ -1941,7 +1941,7 @@ dbuf_spill_set_blksz(dmu_buf_t *db_fake, dnode_t *dn; if (db->db_blkid != DMU_SPILL_BLKID) - return (ENOTSUP); + return (SET_ERROR(ENOTSUP)); if (blksz == 0) blksz = SPA_MINBLOCKSIZE; if (blksz > SPA_MAXBLOCKSIZE) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/ddt.c Sat Apr 6 10:39:38 2013 (r249195) @@ -21,7 +21,7 @@ /* * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -174,7 +174,7 @@ ddt_object_lookup(ddt_t *ddt, enum ddt_t ddt_entry_t *dde) { if (!ddt_object_exists(ddt, type, class)) - return (ENOENT); + return (SET_ERROR(ENOENT)); return (ddt_ops[type]->ddt_op_lookup(ddt->ddt_os, ddt->ddt_object[type][class], dde)); @@ -235,7 +235,7 @@ ddt_object_info(ddt_t *ddt, enum ddt_typ dmu_object_info_t *doi) { if (!ddt_object_exists(ddt, type, class)) - return (ENOENT); + return (SET_ERROR(ENOENT)); return (dmu_object_info(ddt->ddt_os, ddt->ddt_object[type][class], doi)); @@ -1157,5 +1157,5 @@ ddt_walk(spa_t *spa, ddt_bookmark_t *ddb ddb->ddb_type = 0; } while (++ddb->ddb_class < DDT_CLASSES); - return (ENOENT); + return (SET_ERROR(ENOENT)); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu.c Sat Apr 6 10:39:38 2013 (r249195) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -146,7 +146,7 @@ dmu_buf_hold(objset_t *os, uint64_t obje db = dbuf_hold(dn, blkid, tag); rw_exit(&dn->dn_struct_rwlock); if (db == NULL) { - err = EIO; + err = SET_ERROR(EIO); } else { err = dbuf_read(db, NULL, db_flags); if (err) { @@ -177,9 +177,9 @@ dmu_set_bonus(dmu_buf_t *db_fake, int ne dn = DB_DNODE(db); if (dn->dn_bonus != db) { - error = EINVAL; + error = SET_ERROR(EINVAL); } else if (newsize < 0 || newsize > db_fake->db_size) { - error = EINVAL; + error = SET_ERROR(EINVAL); } else { dnode_setbonuslen(dn, newsize, tx); error = 0; @@ -200,9 +200,9 @@ dmu_set_bonustype(dmu_buf_t *db_fake, dm dn = DB_DNODE(db); if (!DMU_OT_IS_VALID(type)) { - error = EINVAL; + error = SET_ERROR(EINVAL); } else if (dn->dn_bonus != db) { - error = EINVAL; + error = SET_ERROR(EINVAL); } else { dnode_setbonus_type(dn, type, tx); error = 0; @@ -329,12 +329,12 @@ dmu_spill_hold_existing(dmu_buf_t *bonus dn = DB_DNODE(db); if (spa_version(dn->dn_objset->os_spa) < SPA_VERSION_SA) { - err = EINVAL; + err = SET_ERROR(EINVAL); } else { rw_enter(&dn->dn_struct_rwlock, RW_READER); if (!dn->dn_have_spill) { - err = ENOENT; + err = SET_ERROR(ENOENT); } else { err = dmu_spill_hold_by_dnode(dn, DB_RF_HAVESTRUCT | DB_RF_CANFAIL, tag, dbp); @@ -400,7 +400,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, (longlong_t)dn->dn_object, dn->dn_datablksz, (longlong_t)offset, (longlong_t)length); rw_exit(&dn->dn_struct_rwlock); - return (EIO); + return (SET_ERROR(EIO)); } nblks = 1; } @@ -417,7 +417,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, rw_exit(&dn->dn_struct_rwlock); dmu_buf_rele_array(dbp, nblks, tag); zio_nowait(zio); - return (EIO); + return (SET_ERROR(EIO)); } /* initiate async i/o */ if (read) @@ -449,7 +449,7 @@ dmu_buf_hold_array_by_dnode(dnode_t *dn, db->db_state == DB_FILL) cv_wait(&db->db_changed, &db->db_mtx); if (db->db_state == DB_UNCACHED) - err = EIO; + err = SET_ERROR(EIO); mutex_exit(&db->db_mtx); if (err) { dmu_buf_rele_array(dbp, nblks, tag); @@ -1363,7 +1363,8 @@ dmu_sync_late_arrival(zio_t *pio, objset dmu_tx_hold_space(tx, zgd->zgd_db->db_size); if (dmu_tx_assign(tx, TXG_WAIT) != 0) { dmu_tx_abort(tx); - return (EIO); /* Make zl_get_data do txg_waited_synced() */ + /* Make zl_get_data do txg_waited_synced() */ + return (SET_ERROR(EIO)); } dsa = kmem_alloc(sizeof (dmu_sync_arg_t), KM_SLEEP); @@ -1448,7 +1449,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s * This txg has already synced. There's nothing to do. */ mutex_exit(&db->db_mtx); - return (EEXIST); + return (SET_ERROR(EEXIST)); } if (txg <= spa_syncing_txg(os->os_spa)) { @@ -1470,7 +1471,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s * There's no need to log writes to freed blocks, so we're done. */ mutex_exit(&db->db_mtx); - return (ENOENT); + return (SET_ERROR(ENOENT)); } ASSERT(dr->dr_next == NULL || dr->dr_next->dr_txg < txg); @@ -1499,7 +1500,7 @@ dmu_sync(zio_t *pio, uint64_t txg, dmu_s * have been dirtied since, or we would have cleared the state. */ mutex_exit(&db->db_mtx); - return (EALREADY); + return (SET_ERROR(EALREADY)); } ASSERT(dr->dt.dl.dr_override_state == DR_NOT_OVERRIDDEN); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Sat Apr 6 10:39:38 2013 (r249195) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -136,7 +136,7 @@ diff_cb(spa_t *spa, zilog_t *zilog, cons int err = 0; if (issig(JUSTLOOKING) && issig(FORREAL)) - return (EINTR); + return (SET_ERROR(EINTR)); if (zb->zb_object != DMU_META_DNODE_OBJECT) return (0); @@ -159,7 +159,7 @@ diff_cb(spa_t *spa, zilog_t *zilog, cons if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &aflags, zb) != 0) - return (EIO); + return (SET_ERROR(EIO)); blk = abuf->b_data; for (i = 0; i < blksz >> DNODE_SHIFT; i++) { @@ -195,7 +195,7 @@ dmu_diff(const char *tosnap_name, const if (strchr(tosnap_name, '@') == NULL || strchr(fromsnap_name, '@') == NULL) - return (EINVAL); + return (SET_ERROR(EINVAL)); error = dsl_pool_hold(tosnap_name, FTAG, &dp); if (error != 0) @@ -218,7 +218,7 @@ dmu_diff(const char *tosnap_name, const dsl_dataset_rele(fromsnap, FTAG); dsl_dataset_rele(tosnap, FTAG); dsl_pool_rele(dp, FTAG); - return (EXDEV); + return (SET_ERROR(EXDEV)); } fromtxg = fromsnap->ds_phys->ds_creation_txg; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c Sat Apr 6 10:39:38 2013 (r249195) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include @@ -90,7 +91,7 @@ dmu_object_claim(objset_t *os, uint64_t int err; if (object == DMU_META_DNODE_OBJECT && !dmu_tx_private_ok(tx)) - return (EBADF); + return (SET_ERROR(EBADF)); err = dnode_hold_impl(os, object, DNODE_MUST_BE_FREE, FTAG, &dn); if (err) @@ -112,7 +113,7 @@ dmu_object_reclaim(objset_t *os, uint64_ int err; if (object == DMU_META_DNODE_OBJECT) - return (EBADF); + return (SET_ERROR(EBADF)); err = dnode_hold_impl(os, object, DNODE_MUST_BE_ALLOCATED, FTAG, &dn); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Sat Apr 6 10:39:38 2013 (r249195) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -285,7 +285,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat kmem_free(os, sizeof (objset_t)); /* convert checksum errors into IO errors */ if (err == ECKSUM) - err = EIO; + err = SET_ERROR(EIO); return (err); } @@ -498,10 +498,10 @@ dmu_objset_own(const char *name, dmu_obj dsl_dataset_disown(ds, tag); } else if (type != DMU_OST_ANY && type != (*osp)->os_phys->os_type) { dsl_dataset_disown(ds, tag); - return (EINVAL); + return (SET_ERROR(EINVAL)); } else if (!readonly && dsl_dataset_is_snapshot(ds)) { dsl_dataset_disown(ds, tag); - return (EROFS); + return (SET_ERROR(EROFS)); } return (err); } @@ -714,14 +714,14 @@ dmu_objset_create_check(void *arg, dmu_t int error; if (strchr(doca->doca_name, '@') != NULL) - return (EINVAL); + return (SET_ERROR(EINVAL)); error = dsl_dir_hold(dp, doca->doca_name, FTAG, &pdd, &tail); if (error != 0) return (error); if (tail == NULL) { dsl_dir_rele(pdd, FTAG); - return (EEXIST); + return (SET_ERROR(EEXIST)); } dsl_dir_rele(pdd, FTAG); @@ -795,19 +795,19 @@ dmu_objset_clone_check(void *arg, dmu_tx dsl_pool_t *dp = dmu_tx_pool(tx); if (strchr(doca->doca_clone, '@') != NULL) - return (EINVAL); + return (SET_ERROR(EINVAL)); error = dsl_dir_hold(dp, doca->doca_clone, FTAG, &pdd, &tail); if (error != 0) return (error); if (tail == NULL) { dsl_dir_rele(pdd, FTAG); - return (EEXIST); + return (SET_ERROR(EEXIST)); } /* You can't clone across pools. */ if (pdd->dd_pool != dp) { dsl_dir_rele(pdd, FTAG); - return (EXDEV); + return (SET_ERROR(EXDEV)); } dsl_dir_rele(pdd, FTAG); @@ -818,13 +818,13 @@ dmu_objset_clone_check(void *arg, dmu_tx /* You can't clone across pools. */ if (origin->ds_dir->dd_pool != dp) { dsl_dataset_rele(origin, FTAG); - return (EXDEV); + return (SET_ERROR(EXDEV)); } /* You can only clone snapshots, not the head datasets. */ if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); - return (EINVAL); + return (SET_ERROR(EINVAL)); } dsl_dataset_rele(origin, FTAG); @@ -1302,9 +1302,9 @@ dmu_objset_userspace_upgrade(objset_t *o if (dmu_objset_userspace_present(os)) return (0); if (!dmu_objset_userused_enabled(os)) - return (ENOTSUP); + return (SET_ERROR(ENOTSUP)); if (dmu_objset_is_snapshot(os)) - return (EINVAL); + return (SET_ERROR(EINVAL)); /* * We simply need to mark every object dirty, so that it will be @@ -1320,7 +1320,7 @@ dmu_objset_userspace_upgrade(objset_t *o int objerr; if (issig(JUSTLOOKING) && issig(FORREAL)) - return (EINTR); + return (SET_ERROR(EINTR)); objerr = dmu_bonus_hold(os, obj, FTAG, &db); if (objerr != 0) @@ -1396,7 +1396,7 @@ dmu_snapshot_realname(objset_t *os, char uint64_t ignored; if (ds->ds_phys->ds_snapnames_zapobj == 0) - return (ENOENT); + return (SET_ERROR(ENOENT)); return (zap_lookup_norm(ds->ds_dir->dd_pool->dp_meta_objset, ds->ds_phys->ds_snapnames_zapobj, name, 8, 1, &ignored, MT_FIRST, @@ -1414,7 +1414,7 @@ dmu_snapshot_list_next(objset_t *os, int ASSERT(dsl_pool_config_held(dmu_objset_pool(os))); if (ds->ds_phys->ds_snapnames_zapobj == 0) - return (ENOENT); + return (SET_ERROR(ENOENT)); zap_cursor_init_serialized(&cursor, ds->ds_dir->dd_pool->dp_meta_objset, @@ -1422,12 +1422,12 @@ dmu_snapshot_list_next(objset_t *os, int if (zap_cursor_retrieve(&cursor, &attr) != 0) { zap_cursor_fini(&cursor); - return (ENOENT); + return (SET_ERROR(ENOENT)); } if (strlen(attr.za_name) + 1 > namelen) { zap_cursor_fini(&cursor); - return (ENAMETOOLONG); + return (SET_ERROR(ENAMETOOLONG)); } (void) strcpy(name, attr.za_name); @@ -1453,7 +1453,7 @@ dmu_dir_list_next(objset_t *os, int name /* there is no next dir on a snapshot! */ if (os->os_dsl_dataset->ds_object != dd->dd_phys->dd_head_dataset_obj) - return (ENOENT); + return (SET_ERROR(ENOENT)); zap_cursor_init_serialized(&cursor, dd->dd_pool->dp_meta_objset, @@ -1461,12 +1461,12 @@ dmu_dir_list_next(objset_t *os, int name if (zap_cursor_retrieve(&cursor, &attr) != 0) { zap_cursor_fini(&cursor); - return (ENOENT); + return (SET_ERROR(ENOENT)); } if (strlen(attr.za_name) + 1 > namelen) { zap_cursor_fini(&cursor); - return (ENAMETOOLONG); + return (SET_ERROR(ENAMETOOLONG)); } (void) strcpy(name, attr.za_name); @@ -1733,9 +1733,9 @@ dmu_fsname(const char *snapname, char *b { char *atp = strchr(snapname, '@'); if (atp == NULL) - return (EINVAL); + return (SET_ERROR(EINVAL)); if (atp - snapname >= MAXNAMELEN) - return (ENAMETOOLONG); + return (SET_ERROR(ENAMETOOLONG)); (void) strlcpy(buf, snapname, atp - snapname + 1); return (0); } Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 6 10:34:02 2013 (r249194) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 6 10:39:38 2013 (r249195) @@ -21,7 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright 2011 Nexenta Systems, Inc. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012, Joyent, Inc. All rights reserved. * Copyright (c) 2012, Martin Matuska . All rights reserved. */ @@ -110,7 +110,7 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o dsp->dsa_pending_op != PENDING_FREE) { if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } @@ -134,7 +134,7 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o /* not a continuation. Push out pending record */ if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } } @@ -148,7 +148,7 @@ dump_free(dmu_sendarg_t *dsp, uint64_t o if (length == -1ULL) { if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); } else { dsp->dsa_pending_op = PENDING_FREE; } @@ -172,7 +172,7 @@ dump_data(dmu_sendarg_t *dsp, dmu_object if (dsp->dsa_pending_op != PENDING_NONE) { if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } /* write a DATA record */ @@ -192,9 +192,9 @@ dump_data(dmu_sendarg_t *dsp, dmu_object drrw->drr_key.ddk_cksum = bp->blk_cksum; if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); if (dump_bytes(dsp, data, blksz) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); return (0); } @@ -206,7 +206,7 @@ dump_spill(dmu_sendarg_t *dsp, uint64_t if (dsp->dsa_pending_op != PENDING_NONE) { if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } @@ -218,9 +218,9 @@ dump_spill(dmu_sendarg_t *dsp, uint64_t drrs->drr_toguid = dsp->dsa_toguid; if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t))) - return (EINTR); + return (SET_ERROR(EINTR)); if (dump_bytes(dsp, data, blksz)) - return (EINTR); + return (SET_ERROR(EINTR)); return (0); } @@ -240,7 +240,7 @@ dump_freeobjects(dmu_sendarg_t *dsp, uin dsp->dsa_pending_op != PENDING_FREEOBJECTS) { if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } if (dsp->dsa_pending_op == PENDING_FREEOBJECTS) { @@ -255,7 +255,7 @@ dump_freeobjects(dmu_sendarg_t *dsp, uin /* can't be aggregated. Push out pending record */ if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } } @@ -283,7 +283,7 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t if (dsp->dsa_pending_op != PENDING_NONE) { if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); dsp->dsa_pending_op = PENDING_NONE; } @@ -300,17 +300,17 @@ dump_dnode(dmu_sendarg_t *dsp, uint64_t drro->drr_toguid = dsp->dsa_toguid; if (dump_bytes(dsp, dsp->dsa_drr, sizeof (dmu_replay_record_t)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); if (dump_bytes(dsp, DN_BONUS(dnp), P2ROUNDUP(dnp->dn_bonuslen, 8)) != 0) - return (EINTR); + return (SET_ERROR(EINTR)); /* free anything past the end of the file */ if (dump_free(dsp, object, (dnp->dn_maxblkid + 1) * (dnp->dn_datablkszsec << SPA_MINBLOCKSHIFT), -1ULL)) - return (EINTR); + return (SET_ERROR(EINTR)); if (dsp->dsa_err != 0) - return (EINTR); + return (SET_ERROR(EINTR)); return (0); } @@ -328,7 +328,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co int err = 0; if (issig(JUSTLOOKING) && issig(FORREAL)) - return (EINTR); + return (SET_ERROR(EINTR)); if (zb->zb_object != DMU_META_DNODE_OBJECT && DMU_OBJECT_IS_SPECIAL(zb->zb_object)) { @@ -352,7 +352,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &aflags, zb) != 0) - return (EIO); + return (SET_ERROR(EIO)); blk = abuf->b_data; for (i = 0; i < blksz >> DNODE_SHIFT; i++) { @@ -371,7 +371,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co if (arc_read(NULL, spa, bp, arc_getbuf_func, &abuf, ZIO_PRIORITY_ASYNC_READ, ZIO_FLAG_CANFAIL, &aflags, zb) != 0) - return (EIO); + return (SET_ERROR(EIO)); err = dump_spill(dsp, zb->zb_object, blksz, abuf->b_data); (void) arc_buf_remove_ref(abuf, &abuf); @@ -393,7 +393,7 @@ backup_cb(spa_t *spa, zilog_t *zilog, co ptr++) *ptr = 0x2f5baddb10c; } else { - return (EIO); + return (SET_ERROR(EIO)); } } @@ -427,7 +427,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_rele(fromds, tag); dsl_dataset_rele(ds, tag); dsl_pool_rele(dp, tag); - return (EXDEV); + return (SET_ERROR(EXDEV)); } err = dmu_objset_from_ds(ds, &os); @@ -454,7 +454,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_rele(fromds, tag); dsl_dataset_rele(ds, tag); dsl_pool_rele(dp, tag); - return (EINVAL); + return (SET_ERROR(EINVAL)); } if (version >= ZPL_VERSION_SA) { DMU_SET_FEATUREFLAGS( @@ -513,7 +513,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, if (dsp->dsa_pending_op != PENDING_NONE) if (dump_bytes(dsp, drr, sizeof (dmu_replay_record_t)) != 0) - err = EINTR; + err = SET_ERROR(EINTR); if (err != 0) { if (err == EINTR && dsp->dsa_err != 0) @@ -594,9 +594,9 @@ dmu_send(const char *tosnap, const char int err; if (strchr(tosnap, '@') == NULL) - return (EINVAL); + return (SET_ERROR(EINVAL)); if (fromsnap != NULL && strchr(fromsnap, '@') == NULL) - return (EINVAL); + return (SET_ERROR(EINVAL)); err = dsl_pool_hold(tosnap, FTAG, &dp); if (err != 0) @@ -630,14 +630,14 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl /* tosnap must be a snapshot */ if (!dsl_dataset_is_snapshot(ds)) - return (EINVAL); + return (SET_ERROR(EINVAL)); /* * fromsnap must be an earlier snapshot from the same fs as tosnap, * or the origin's fs. */ if (fromds != NULL && !dsl_dataset_is_before(ds, fromds)) - return (EXDEV); + return (SET_ERROR(EXDEV)); /* Get uncompressed size estimate of changed data. */ if (fromds == NULL) { @@ -696,7 +696,7 @@ recv_begin_check_existing_impl(dmu_recv_ /* must not have any changes since most recent snapshot */ if (!drba->drba_cookie->drc_force && dsl_dataset_modified_since_lastsnap(ds)) - return (ETXTBSY); + return (SET_ERROR(ETXTBSY)); /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, @@ -715,7 +715,7 @@ recv_begin_check_existing_impl(dmu_recv_ if (fromguid != 0) { /* if incremental, most recent snapshot must match fromguid */ if (ds->ds_prev == NULL) - return (ENODEV); + return (SET_ERROR(ENODEV)); /* * most recent snapshot must match fromguid, or there are no @@ -729,10 +729,10 @@ recv_begin_check_existing_impl(dmu_recv_ error = dsl_dataset_hold_obj(dp, obj, FTAG, &snap); if (error != 0) - return (ENODEV); + return (SET_ERROR(ENODEV)); if (snap->ds_phys->ds_creation_txg < birth) { dsl_dataset_rele(snap, FTAG); - return (ENODEV); + return (SET_ERROR(ENODEV)); } if (snap->ds_phys->ds_guid == fromguid) { dsl_dataset_rele(snap, FTAG); @@ -742,12 +742,12 @@ recv_begin_check_existing_impl(dmu_recv_ dsl_dataset_rele(snap, FTAG); } if (obj == 0) - return (ENODEV); + return (SET_ERROR(ENODEV)); } } else { /* if full, most recent snapshot must be $ORIGIN */ if (ds->ds_phys->ds_prev_snap_txg >= TXG_INITIAL) - return (ENODEV); + return (SET_ERROR(ENODEV)); } return (0); @@ -773,13 +773,13 @@ dmu_recv_begin_check(void *arg, dmu_tx_t DMU_COMPOUNDSTREAM || drrb->drr_type >= DMU_OST_NUMTYPES || ((flags & DRR_FLAG_CLONE) && drba->drba_origin == NULL)) - return (EINVAL); + return (SET_ERROR(EINVAL)); /* Verify pool version supports SA if SA_SPILL feature set */ if ((DMU_GET_FEATUREFLAGS(drrb->drr_versioninfo) & DMU_BACKUP_FEATURE_SA_SPILL) && spa_version(dp->dp_spa) < SPA_VERSION_SA) { - return (ENOTSUP); + return (SET_ERROR(ENOTSUP)); } error = dsl_dataset_hold(dp, tofs, FTAG, &ds); @@ -789,7 +789,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t /* Can't recv a clone into an existing fs */ if (flags & DRR_FLAG_CLONE) { dsl_dataset_rele(ds, FTAG); - return (EINVAL); + return (SET_ERROR(EINVAL)); } error = recv_begin_check_existing_impl(drba, ds, fromguid); @@ -803,7 +803,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t * target fs, so fail the recv. */ if (fromguid != 0 && !(flags & DRR_FLAG_CLONE)) - return (ENOENT); + return (SET_ERROR(ENOENT)); /* Open the parent of tofs */ ASSERT3U(strlen(tofs), <, MAXNAMELEN); @@ -823,12 +823,12 @@ dmu_recv_begin_check(void *arg, dmu_tx_t if (!dsl_dataset_is_snapshot(origin)) { dsl_dataset_rele(origin, FTAG); dsl_dataset_rele(ds, FTAG); - return (EINVAL); + return (SET_ERROR(EINVAL)); } if (origin->ds_phys->ds_guid != fromguid) { dsl_dataset_rele(origin, FTAG); dsl_dataset_rele(ds, FTAG); - return (ENODEV); + return (SET_ERROR(ENODEV)); } dsl_dataset_rele(origin, FTAG); } @@ -919,7 +919,7 @@ dmu_recv_begin(char *tofs, char *tosnap, if (drrb->drr_magic == BSWAP_64(DMU_BACKUP_MAGIC)) drc->drc_byteswap = B_TRUE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 11:54:42 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 73CDAADA; Sat, 6 Apr 2013 11:54:42 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 64D59A79; Sat, 6 Apr 2013 11:54:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36BsgsR072678; Sat, 6 Apr 2013 11:54:42 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36Bsg7A072677; Sat, 6 Apr 2013 11:54:42 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304061154.r36Bsg7A072677@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 11:54:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249196 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 06 Apr 2013 11:54:42 -0000 Author: mm Date: Sat Apr 6 11:54:41 2013 New Revision: 249196 URL: http://svnweb.freebsd.org/changeset/base/249196 Log: Provide a fix for kernel panic if receiving recursive deduplicated streams. Problem reported to vendor. Illumos ZFS issues: 3692 Panic on zfs receive of a recursive deduplicated stream MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 6 10:39:38 2013 (r249195) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Sat Apr 6 11:54:41 2013 (r249196) @@ -990,6 +990,7 @@ free_guid_map_onexit(void *arg) while ((gmep = avl_destroy_nodes(ca, &cookie)) != NULL) { dsl_dataset_long_rele(gmep->gme_ds, gmep); + dsl_dataset_rele(gmep->gme_ds, gmep); kmem_free(gmep, sizeof (guid_map_entry_t)); } avl_destroy(ca); @@ -1691,15 +1692,15 @@ add_ds_to_guidmap(const char *name, avl_ err = dsl_pool_hold(name, FTAG, &dp); if (err != 0) return (err); - err = dsl_dataset_hold_obj(dp, snapobj, FTAG, &snapds); + gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP); + err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds); if (err == 0) { - gmep = kmem_alloc(sizeof (guid_map_entry_t), KM_SLEEP); gmep->guid = snapds->ds_phys->ds_guid; gmep->gme_ds = snapds; avl_add(guid_map, gmep); dsl_dataset_long_hold(snapds, gmep); - dsl_dataset_rele(snapds, FTAG); - } + } else + kmem_free(gmep, sizeof (guid_map_entry_t)); dsl_pool_rele(dp, FTAG); return (err); From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 12:58:32 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 319EC37E; Sat, 6 Apr 2013 12:58:32 +0000 (UTC) (envelope-from stefan@fafoe.narf.at) Received: from fep17.mx.upcmail.net (fep17.mx.upcmail.net [62.179.121.37]) by mx1.freebsd.org (Postfix) with ESMTP id 42425CC3; Sat, 6 Apr 2013 12:58:30 +0000 (UTC) Received: from edge04.upcmail.net ([192.168.13.239]) by viefep17-int.chello.at (InterMail vM.8.01.05.05 201-2260-151-110-20120111) with ESMTP id <20130406125823.XXCN11712.viefep17-int.chello.at@edge04.upcmail.net>; Sat, 6 Apr 2013 14:58:23 +0200 Received: from mole.fafoe.narf.at ([80.109.55.137]) by edge04.upcmail.net with edge id LcyP1l00M2xdvHc04cyPLj; Sat, 06 Apr 2013 14:58:23 +0200 X-SourceIP: 80.109.55.137 Received: by mole.fafoe.narf.at (Postfix, from userid 1001) id 0AB436D458; Sat, 6 Apr 2013 14:58:23 +0200 (CEST) Date: Sat, 6 Apr 2013 14:58:22 +0200 From: Stefan Farfeleder To: Alexander Motin Subject: Re: svn commit: r249083 - in head: rescue/rescue sbin sbin/atacontrol share/man/man4 sys/amd64/conf sys/arm/conf sys/cam/ata sys/conf sys/dev/ata sys/dev/ata/chipsets sys/i386/conf sys/ia64/conf sys/mi... Message-ID: <20130406125822.GA1436@mole.fafoe.narf.at> References: <201304040712.r347COpN056243@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201304040712.r347COpN056243@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: Sat, 06 Apr 2013 12:58:32 -0000 On Thu, Apr 04, 2013 at 07:12:24AM +0000, Alexander Motin wrote: > Author: mav > Date: Thu Apr 4 07:12:24 2013 > New Revision: 249083 > URL: http://svnweb.freebsd.org/changeset/base/249083 > > Log: > Remove all legacy ATA code parts, not used since options ATA_CAM enabled in > most kernels before FreeBSD 9.0. Remove such modules and respective kernel > options: atadisk, ataraid, atapicd, atapifd, atapist, atapicam. Remove the > atacontrol utility and some man pages. Remove useless now options ATA_CAM. I think at least the removal of the ATA_CAM option should be worth a note in UPDATING. Stefan From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 13:39:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 05984ADA; Sat, 6 Apr 2013 13:39:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id DCB59DF1; Sat, 6 Apr 2013 13:39:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36Dd35v002733; Sat, 6 Apr 2013 13:39:03 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36Dd23A002728; Sat, 6 Apr 2013 13:39:02 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201304061339.r36Dd23A002728@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Apr 2013 13:39:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249199 - in head/sys: cam cam/ata 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: Sat, 06 Apr 2013 13:39:04 -0000 Author: marius Date: Sat Apr 6 13:39:02 2013 New Revision: 249199 URL: http://svnweb.freebsd.org/changeset/base/249199 Log: Unbreak ATA_NO_48BIT_DMA with ATA_CAM by treating 48-bit DMA as an optional property with PATA transport. Reviewed by: mav MFC after: 3 days Modified: head/sys/cam/ata/ata_all.h head/sys/cam/ata/ata_da.c head/sys/cam/ata/ata_xpt.c head/sys/cam/cam_ccb.h head/sys/dev/ata/ata-all.c Modified: head/sys/cam/ata/ata_all.h ============================================================================== --- head/sys/cam/ata/ata_all.h Sat Apr 6 13:25:18 2013 (r249198) +++ head/sys/cam/ata/ata_all.h Sat Apr 6 13:39:02 2013 (r249199) @@ -35,8 +35,9 @@ struct ccb_ataio; struct cam_periph; union ccb; -#define SID_AEN 0x04 /* Abuse inq_flags bit to track enabled AEN. */ -#define SID_DMA 0x10 /* Abuse inq_flags bit to track enabled DMA. */ +#define SID_DMA48 0x01 /* Abuse inq_flags bit to track enabled DMA48. */ +#define SID_AEN 0x04 /* Abuse inq_flags bit to track enabled AEN. */ +#define SID_DMA 0x10 /* Abuse inq_flags bit to track enabled DMA. */ struct ata_cmd { u_int8_t flags; /* ATA command flags */ Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sat Apr 6 13:25:18 2013 (r249198) +++ head/sys/cam/ata/ata_da.c Sat Apr 6 13:39:02 2013 (r249199) @@ -75,18 +75,19 @@ typedef enum { } ada_state; typedef enum { - ADA_FLAG_PACK_INVALID = 0x001, - ADA_FLAG_CAN_48BIT = 0x002, - ADA_FLAG_CAN_FLUSHCACHE = 0x004, - ADA_FLAG_CAN_NCQ = 0x008, - ADA_FLAG_CAN_DMA = 0x010, - ADA_FLAG_NEED_OTAG = 0x020, - ADA_FLAG_WENT_IDLE = 0x040, - ADA_FLAG_CAN_TRIM = 0x080, - ADA_FLAG_OPEN = 0x100, - ADA_FLAG_SCTX_INIT = 0x200, - ADA_FLAG_CAN_CFA = 0x400, - ADA_FLAG_CAN_POWERMGT = 0x800 + ADA_FLAG_PACK_INVALID = 0x0001, + ADA_FLAG_CAN_48BIT = 0x0002, + ADA_FLAG_CAN_FLUSHCACHE = 0x0004, + ADA_FLAG_CAN_NCQ = 0x0008, + ADA_FLAG_CAN_DMA = 0x0010, + ADA_FLAG_NEED_OTAG = 0x0020, + ADA_FLAG_WENT_IDLE = 0x0040, + ADA_FLAG_CAN_TRIM = 0x0080, + ADA_FLAG_OPEN = 0x0100, + ADA_FLAG_SCTX_INIT = 0x0200, + ADA_FLAG_CAN_CFA = 0x0400, + ADA_FLAG_CAN_POWERMGT = 0x0800, + ADA_FLAG_CAN_DMA48 = 0x1000 } ada_flags; typedef enum { @@ -899,6 +900,15 @@ adaasync(void *callback_arg, u_int32_t c softc->flags |= ADA_FLAG_CAN_DMA; else softc->flags &= ~ADA_FLAG_CAN_DMA; + if (cgd.ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) { + softc->flags |= ADA_FLAG_CAN_48BIT; + if (cgd.inq_flags & SID_DMA48) + softc->flags |= ADA_FLAG_CAN_DMA48; + else + softc->flags &= ~ADA_FLAG_CAN_DMA48; + } else + softc->flags &= ~(ADA_FLAG_CAN_48BIT | + ADA_FLAG_CAN_DMA48); if ((cgd.ident_data.satacapabilities & ATA_SUPPORT_NCQ) && (cgd.inq_flags & SID_DMA) && (cgd.inq_flags & SID_CmdQue)) softc->flags |= ADA_FLAG_CAN_NCQ; @@ -1067,8 +1077,11 @@ adaregister(struct cam_periph *periph, v if ((cgd->ident_data.capabilities1 & ATA_SUPPORT_DMA) && (cgd->inq_flags & SID_DMA)) softc->flags |= ADA_FLAG_CAN_DMA; - if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) + if (cgd->ident_data.support.command2 & ATA_SUPPORT_ADDRESS48) { softc->flags |= ADA_FLAG_CAN_48BIT; + if (cgd->inq_flags & SID_DMA48) + softc->flags |= ADA_FLAG_CAN_DMA48; + } if (cgd->ident_data.support.command2 & ATA_SUPPORT_FLUSHCACHE) softc->flags |= ADA_FLAG_CAN_FLUSHCACHE; if (cgd->ident_data.support.command1 & ATA_SUPPORT_POWERMGT) @@ -1455,7 +1468,7 @@ adastart(struct cam_periph *periph, unio } else if ((softc->flags & ADA_FLAG_CAN_48BIT) && (lba + count >= ATA_MAX_28BIT_LBA || count > 256)) { - if (softc->flags & ADA_FLAG_CAN_DMA) { + if (softc->flags & ADA_FLAG_CAN_DMA48) { if (bp->bio_cmd == BIO_READ) { ata_48bit_cmd(ataio, ATA_READ_DMA48, 0, lba, count); Modified: head/sys/cam/ata/ata_xpt.c ============================================================================== --- head/sys/cam/ata/ata_xpt.c Sat Apr 6 13:25:18 2013 (r249198) +++ head/sys/cam/ata/ata_xpt.c Sat Apr 6 13:39:02 2013 (r249199) @@ -965,19 +965,22 @@ noerror: xpt_schedule(periph, priority); return; case PROBE_SETMODE: - if (path->device->transport != XPORT_SATA) - goto notsata; /* Set supported bits. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; xpt_action((union ccb *)&cts); - if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + if (path->device->transport == XPORT_SATA && + cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps = cts.xport_specific.sata.caps & CTS_SATA_CAPS_H; + else if (path->device->transport == XPORT_ATA && + cts.xport_specific.ata.valid & CTS_ATA_VALID_CAPS) + caps = cts.xport_specific.ata.caps & CTS_ATA_CAPS_H; else caps = 0; - if (ident_buf->satacapabilities != 0xffff) { + if (path->device->transport == XPORT_SATA && + ident_buf->satacapabilities != 0xffff) { if (ident_buf->satacapabilities & ATA_SUPPORT_IFPWRMNGTRCV) caps |= CTS_SATA_CAPS_D_PMREQ; if (ident_buf->satacapabilities & ATA_SUPPORT_HAPST) @@ -989,19 +992,42 @@ noerror: cts.ccb_h.func_code = XPT_GET_TRAN_SETTINGS; cts.type = CTS_TYPE_USER_SETTINGS; xpt_action((union ccb *)&cts); - if (cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) + if (path->device->transport == XPORT_SATA && + cts.xport_specific.sata.valid & CTS_SATA_VALID_CAPS) caps &= cts.xport_specific.sata.caps; + else if (path->device->transport == XPORT_ATA && + cts.xport_specific.ata.valid & CTS_ATA_VALID_CAPS) + caps &= cts.xport_specific.ata.caps; else caps = 0; + /* + * Remember what transport thinks about 48-bit DMA. If + * capability information is not provided or transport is + * SATA, we take support for granted. + */ + if (!(path->device->inq_flags & SID_DMA) || + (path->device->transport == XPORT_ATA && + (cts.xport_specific.ata.valid & CTS_ATA_VALID_CAPS) && + !(caps & CTS_ATA_CAPS_H_DMA48))) + path->device->inq_flags &= ~SID_DMA48; + else + path->device->inq_flags |= SID_DMA48; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); cts.ccb_h.func_code = XPT_SET_TRAN_SETTINGS; cts.type = CTS_TYPE_CURRENT_SETTINGS; - cts.xport_specific.sata.caps = caps; - cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + if (path->device->transport == XPORT_SATA) { + cts.xport_specific.sata.caps = caps; + cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; + } else { + cts.xport_specific.ata.caps = caps; + cts.xport_specific.ata.valid = CTS_ATA_VALID_CAPS; + } xpt_action((union ccb *)&cts); softc->caps = caps; + if (path->device->transport != XPORT_SATA) + goto notsata; if ((ident_buf->satasupport & ATA_SUPPORT_IFPWRMNGT) && (!(softc->caps & CTS_SATA_CAPS_H_PMREQ)) != (!(ident_buf->sataenabled & ATA_SUPPORT_IFPWRMNGT))) { @@ -1154,6 +1180,11 @@ notsata: caps &= cts.xport_specific.sata.caps; else caps = 0; + /* Remember what transport thinks about AEN. */ + if (caps & CTS_SATA_CAPS_H_AN) + path->device->inq_flags |= SID_AEN; + else + path->device->inq_flags &= ~SID_AEN; /* Store result to SIM. */ bzero(&cts, sizeof(cts)); xpt_setup_ccb(&cts.ccb_h, path, CAM_PRIORITY_NONE); @@ -1163,11 +1194,6 @@ notsata: cts.xport_specific.sata.valid = CTS_SATA_VALID_CAPS; xpt_action((union ccb *)&cts); softc->caps = caps; - /* Remember what transport thinks about AEN. */ - if (softc->caps & CTS_SATA_CAPS_H_AN) - path->device->inq_flags |= SID_AEN; - else - path->device->inq_flags &= ~SID_AEN; xpt_async(AC_GETDEV_CHANGED, path, NULL); if (periph->path->device->flags & CAM_DEV_UNCONFIGURED) { path->device->flags &= ~CAM_DEV_UNCONFIGURED; @@ -2077,4 +2103,3 @@ ata_announce_periph(struct cam_periph *p } printf("\n"); } - Modified: head/sys/cam/cam_ccb.h ============================================================================== --- head/sys/cam/cam_ccb.h Sat Apr 6 13:25:18 2013 (r249198) +++ head/sys/cam/cam_ccb.h Sat Apr 6 13:39:02 2013 (r249199) @@ -896,9 +896,14 @@ struct ccb_trans_settings_pata { #define CTS_ATA_VALID_MODE 0x01 #define CTS_ATA_VALID_BYTECOUNT 0x02 #define CTS_ATA_VALID_ATAPI 0x20 +#define CTS_ATA_VALID_CAPS 0x40 int mode; /* Mode */ u_int bytecount; /* Length of PIO transaction */ u_int atapi; /* Length of ATAPI CDB */ + u_int caps; /* Device and host SATA caps. */ +#define CTS_ATA_CAPS_H 0x0000ffff +#define CTS_ATA_CAPS_H_DMA48 0x00000001 /* 48-bit DMA */ +#define CTS_ATA_CAPS_D 0xffff0000 }; struct ccb_trans_settings_sata { Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sat Apr 6 13:25:18 2013 (r249198) +++ head/sys/dev/ata/ata-all.c Sat Apr 6 13:39:02 2013 (r249199) @@ -136,10 +136,15 @@ ata_attach(device_t dev) ch->user[i].bytecount = MAXPHYS; ch->user[i].caps = 0; ch->curr[i] = ch->user[i]; - if (ch->pm_level > 0) - ch->user[i].caps |= CTS_SATA_CAPS_H_PMREQ; - if (ch->pm_level > 1) - ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ; + if (ch->flags & ATA_SATA) { + if (ch->pm_level > 0) + ch->user[i].caps |= CTS_SATA_CAPS_H_PMREQ; + if (ch->pm_level > 1) + ch->user[i].caps |= CTS_SATA_CAPS_D_PMREQ; + } else { + if (!(ch->flags & ATA_NO_48BIT_DMA)) + ch->user[i].caps |= CTS_ATA_CAPS_H_DMA48; + } } callout_init(&ch->poll_callout, 1); @@ -835,6 +840,8 @@ ataaction(struct cam_sim *sim, union ccb d->bytecount = cts->xport_specific.ata.bytecount; if (cts->xport_specific.ata.valid & CTS_ATA_VALID_ATAPI) d->atapi = cts->xport_specific.ata.atapi; + if (cts->xport_specific.ata.valid & CTS_ATA_VALID_CAPS) + d->caps = cts->xport_specific.ata.caps; } ccb->ccb_h.status = CAM_REQ_CMP; break; @@ -875,14 +882,12 @@ ataaction(struct cam_sim *sim, union ccb } cts->xport_specific.sata.caps &= ch->user[ccb->ccb_h.target_id].caps; - cts->xport_specific.sata.valid |= - CTS_SATA_VALID_CAPS; } else { cts->xport_specific.sata.revision = d->revision; cts->xport_specific.sata.valid |= CTS_SATA_VALID_REVISION; cts->xport_specific.sata.caps = d->caps; - cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; } + cts->xport_specific.sata.valid |= CTS_SATA_VALID_CAPS; cts->xport_specific.sata.atapi = d->atapi; cts->xport_specific.sata.valid |= CTS_SATA_VALID_ATAPI; } else { @@ -893,6 +898,17 @@ ataaction(struct cam_sim *sim, union ccb cts->xport_specific.ata.valid |= CTS_ATA_VALID_MODE; cts->xport_specific.ata.bytecount = d->bytecount; cts->xport_specific.ata.valid |= CTS_ATA_VALID_BYTECOUNT; + if (cts->type == CTS_TYPE_CURRENT_SETTINGS) { + cts->xport_specific.ata.caps = + d->caps & CTS_ATA_CAPS_D; + if (!(ch->flags & ATA_NO_48BIT_DMA)) + cts->xport_specific.ata.caps |= + CTS_ATA_CAPS_H_DMA48; + cts->xport_specific.ata.caps &= + ch->user[ccb->ccb_h.target_id].caps; + } else + cts->xport_specific.ata.caps = d->caps; + cts->xport_specific.ata.valid |= CTS_ATA_VALID_CAPS; cts->xport_specific.ata.atapi = d->atapi; cts->xport_specific.ata.valid |= CTS_ATA_VALID_ATAPI; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 13:42:38 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 31B76CBF; Sat, 6 Apr 2013 13:42:38 +0000 (UTC) (envelope-from jh@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 241FBE0F; Sat, 6 Apr 2013 13:42:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36Dgcwj004810; Sat, 6 Apr 2013 13:42:38 GMT (envelope-from jh@svn.freebsd.org) Received: (from jh@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36DgcWY004809; Sat, 6 Apr 2013 13:42:38 GMT (envelope-from jh@svn.freebsd.org) Message-Id: <201304061342.r36DgcWY004809@svn.freebsd.org> From: Jaakko Heinonen Date: Sat, 6 Apr 2013 13:42:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249200 - head/usr.bin/calendar 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, 06 Apr 2013 13:42:38 -0000 Author: jh Date: Sat Apr 6 13:42:37 2013 New Revision: 249200 URL: http://svnweb.freebsd.org/changeset/base/249200 Log: Correct the path. PR: 176256 Submitted by: jhs Modified: head/usr.bin/calendar/calendar.1 Modified: head/usr.bin/calendar/calendar.1 ============================================================================== --- head/usr.bin/calendar/calendar.1 Sat Apr 6 13:39:02 2013 (r249199) +++ head/usr.bin/calendar/calendar.1 Sat Apr 6 13:42:37 2013 (r249200) @@ -28,7 +28,7 @@ .\" @(#)calendar.1 8.1 (Berkeley) 6/29/93 .\" $FreeBSD$ .\" -.Dd June 13, 2002 +.Dd April 6, 2013 .Dt CALENDAR 1 .Os .Sh NAME @@ -230,7 +230,7 @@ do not send mail if this file exists. .El .Pp The following default calendar files are provided in -.Pa /usr/share/calendars: +.Pa /usr/share/calendar: .Pp .Bl -tag -width calendar.southafrica -compact .It Pa calendar.all From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 13:47:45 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 3A117E69; Sat, 6 Apr 2013 13:47:45 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 2D20CE33; Sat, 6 Apr 2013 13:47:45 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36DljPa005554; Sat, 6 Apr 2013 13:47:45 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36DljsI005553; Sat, 6 Apr 2013 13:47:45 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304061347.r36DljsI005553@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Apr 2013 13:47:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249201 - 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, 06 Apr 2013 13:47:45 -0000 Author: mav Date: Sat Apr 6 13:47:44 2013 New Revision: 249201 URL: http://svnweb.freebsd.org/changeset/base/249201 Log: Document legacy ATA stack removal. Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Apr 6 13:42:37 2013 (r249200) +++ head/UPDATING Sat Apr 6 13:47:44 2013 (r249201) @@ -26,6 +26,13 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20130404: + Legacy ATA stack, disabled and replaced by new CAM-based one since + FreeBSD 9.0, completely removed from the sources. Kernel modules + atadisk and atapi*, user-level tools atacontrol and burncd are + removed. Kernel option `options ATA_CAM` is now permanently enabled + and removed. + 20130308: CTL_DISABLE has also been added to the sparc64 GENERIC (for further information, see the respective 20130304 entry). From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 13:54:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7565B79; Sat, 6 Apr 2013 13:54:01 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 68720E53; Sat, 6 Apr 2013 13:54:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36Ds1oo008001; Sat, 6 Apr 2013 13:54:01 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36Ds1pP008000; Sat, 6 Apr 2013 13:54:01 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201304061354.r36Ds1pP008000@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Apr 2013 13:54:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249202 - 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: Sat, 06 Apr 2013 13:54:01 -0000 Author: marius Date: Sat Apr 6 13:54:00 2013 New Revision: 249202 URL: http://svnweb.freebsd.org/changeset/base/249202 Log: Remove some more remnants of !ATA_CAM. Modified: head/sys/dev/ata/ata-all.h Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Sat Apr 6 13:47:44 2013 (r249201) +++ head/sys/dev/ata/ata-all.h Sat Apr 6 13:54:00 2013 (r249202) @@ -610,29 +610,18 @@ int ata_reinit(device_t dev); int ata_suspend(device_t dev); int ata_resume(device_t dev); void ata_interrupt(void *data); -int ata_device_ioctl(device_t dev, u_long cmd, caddr_t data); int ata_getparam(struct ata_device *atadev, int init); void ata_default_registers(device_t dev); void ata_udelay(int interval); -const char *ata_unit2str(struct ata_device *atadev); const char *ata_mode2str(int mode); void ata_setmode(device_t dev); void ata_print_cable(device_t dev, u_int8_t *who); int ata_str2mode(const char *str); -const char *ata_satarev2str(int rev); int ata_atapi(device_t dev, int target); void ata_cam_end_transaction(device_t dev, struct ata_request *request); /* ata-queue.c: */ -int ata_controlcmd(device_t dev, u_int8_t command, u_int16_t feature, u_int64_t lba, u_int16_t count); -int ata_atapicmd(device_t dev, u_int8_t *ccb, caddr_t data, int count, int flags, int timeout); -void ata_queue_request(struct ata_request *request); -void ata_start(device_t dev); -void ata_finish(struct ata_request *request); void ata_timeout(struct ata_request *); -void ata_catch_inflight(device_t dev); -void ata_fail_requests(device_t dev); -void ata_drop_requests(device_t dev); const char *ata_cmd2str(struct ata_request *request); /* ata-lowlevel.c: */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 15:02:07 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id AD18985C; Sat, 6 Apr 2013 15:02:07 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 9D99C115; Sat, 6 Apr 2013 15:02:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36F27hI028161; Sat, 6 Apr 2013 15:02:07 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36F26qS028153; Sat, 6 Apr 2013 15:02:06 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201304061502.r36F26qS028153@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Apr 2013 15:02:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249203 - in head/sys: conf dev/ata modules/ata/atacore 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, 06 Apr 2013 15:02:07 -0000 Author: marius Date: Sat Apr 6 15:02:06 2013 New Revision: 249203 URL: http://svnweb.freebsd.org/changeset/base/249203 Log: - Make ata_str2mode() static, it's not used outside of ata-all.c. - Move ata_timeout() to ata-all.c so we don't need to expose both this function and ata_cam_end_transaction() but only the former. - Move ata_cmd2str() from ata-queue.c to ata-all.c so we can get rid of the former. - Add some missing prototypes. MFC after: 3 days Deleted: head/sys/dev/ata/ata-queue.c Modified: head/sys/conf/files head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-lowlevel.c head/sys/modules/ata/atacore/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Apr 6 13:54:00 2013 (r249202) +++ head/sys/conf/files Sat Apr 6 15:02:06 2013 (r249203) @@ -675,7 +675,6 @@ dev/ata/ata_if.m optional ata | atacore dev/ata/ata-all.c optional ata | atacore dev/ata/ata-dma.c optional ata | atacore dev/ata/ata-lowlevel.c optional ata | atacore -dev/ata/ata-queue.c optional ata | atacore dev/ata/ata-sata.c optional ata | atacore dev/ata/ata-card.c optional ata pccard | atapccard dev/ata/ata-cbus.c optional ata pc98 | atapc98 Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sat Apr 6 13:54:00 2013 (r249202) +++ head/sys/dev/ata/ata-all.c Sat Apr 6 15:02:06 2013 (r249203) @@ -60,9 +60,17 @@ __FBSDID("$FreeBSD$"); /* prototypes */ static void ataaction(struct cam_sim *sim, union ccb *ccb); static void atapoll(struct cam_sim *sim); -static void ata_conn_event(void *, int); +static void ata_cam_begin_transaction(device_t dev, union ccb *ccb); +static void ata_cam_end_transaction(device_t dev, struct ata_request *request); +static void ata_cam_request_sense(device_t dev, struct ata_request *request); +static int ata_check_ids(device_t dev, union ccb *ccb); +static void ata_conn_event(void *context, int dummy); +static void ata_init(void); static void ata_interrupt_locked(void *data); +static int ata_module_event_handler(module_t mod, int what, void *arg); static void ata_periodic_poll(void *data); +static int ata_str2mode(const char *str); +static void ata_uninit(void); /* global vars */ MALLOC_DEFINE(M_ATA, "ata_generic", "ATA driver generic layer"); @@ -435,6 +443,120 @@ ata_udelay(int interval) } const char * +ata_cmd2str(struct ata_request *request) +{ + static char buffer[20]; + + if (request->flags & ATA_R_ATAPI) { + switch (request->u.atapi.sense.key ? + request->u.atapi.saved_cmd : request->u.atapi.ccb[0]) { + case 0x00: return ("TEST_UNIT_READY"); + case 0x01: return ("REZERO"); + case 0x03: return ("REQUEST_SENSE"); + case 0x04: return ("FORMAT"); + case 0x08: return ("READ"); + case 0x0a: return ("WRITE"); + case 0x10: return ("WEOF"); + case 0x11: return ("SPACE"); + case 0x12: return ("INQUIRY"); + case 0x15: return ("MODE_SELECT"); + case 0x19: return ("ERASE"); + case 0x1a: return ("MODE_SENSE"); + case 0x1b: return ("START_STOP"); + case 0x1e: return ("PREVENT_ALLOW"); + case 0x23: return ("ATAPI_READ_FORMAT_CAPACITIES"); + case 0x25: return ("READ_CAPACITY"); + case 0x28: return ("READ_BIG"); + case 0x2a: return ("WRITE_BIG"); + case 0x2b: return ("LOCATE"); + case 0x34: return ("READ_POSITION"); + case 0x35: return ("SYNCHRONIZE_CACHE"); + case 0x3b: return ("WRITE_BUFFER"); + case 0x3c: return ("READ_BUFFER"); + case 0x42: return ("READ_SUBCHANNEL"); + case 0x43: return ("READ_TOC"); + case 0x45: return ("PLAY_10"); + case 0x47: return ("PLAY_MSF"); + case 0x48: return ("PLAY_TRACK"); + case 0x4b: return ("PAUSE"); + case 0x51: return ("READ_DISK_INFO"); + case 0x52: return ("READ_TRACK_INFO"); + case 0x53: return ("RESERVE_TRACK"); + case 0x54: return ("SEND_OPC_INFO"); + case 0x55: return ("MODE_SELECT_BIG"); + case 0x58: return ("REPAIR_TRACK"); + case 0x59: return ("READ_MASTER_CUE"); + case 0x5a: return ("MODE_SENSE_BIG"); + case 0x5b: return ("CLOSE_TRACK/SESSION"); + case 0x5c: return ("READ_BUFFER_CAPACITY"); + case 0x5d: return ("SEND_CUE_SHEET"); + case 0x96: return ("SERVICE_ACTION_IN"); + case 0xa1: return ("BLANK_CMD"); + case 0xa3: return ("SEND_KEY"); + case 0xa4: return ("REPORT_KEY"); + case 0xa5: return ("PLAY_12"); + case 0xa6: return ("LOAD_UNLOAD"); + case 0xad: return ("READ_DVD_STRUCTURE"); + case 0xb4: return ("PLAY_CD"); + case 0xbb: return ("SET_SPEED"); + case 0xbd: return ("MECH_STATUS"); + case 0xbe: return ("READ_CD"); + case 0xff: return ("POLL_DSC"); + } + } else { + switch (request->u.ata.command) { + case 0x00: return ("NOP"); + case 0x08: return ("DEVICE_RESET"); + case 0x20: return ("READ"); + case 0x24: return ("READ48"); + case 0x25: return ("READ_DMA48"); + case 0x26: return ("READ_DMA_QUEUED48"); + case 0x27: return ("READ_NATIVE_MAX_ADDRESS48"); + case 0x29: return ("READ_MUL48"); + case 0x30: return ("WRITE"); + case 0x34: return ("WRITE48"); + case 0x35: return ("WRITE_DMA48"); + case 0x36: return ("WRITE_DMA_QUEUED48"); + case 0x37: return ("SET_MAX_ADDRESS48"); + case 0x39: return ("WRITE_MUL48"); + case 0x70: return ("SEEK"); + case 0xa0: return ("PACKET_CMD"); + case 0xa1: return ("ATAPI_IDENTIFY"); + case 0xa2: return ("SERVICE"); + case 0xb0: return ("SMART"); + case 0xc0: return ("CFA ERASE"); + case 0xc4: return ("READ_MUL"); + case 0xc5: return ("WRITE_MUL"); + case 0xc6: return ("SET_MULTI"); + case 0xc7: return ("READ_DMA_QUEUED"); + case 0xc8: return ("READ_DMA"); + case 0xca: return ("WRITE_DMA"); + case 0xcc: return ("WRITE_DMA_QUEUED"); + case 0xe6: return ("SLEEP"); + case 0xe7: return ("FLUSHCACHE"); + case 0xea: return ("FLUSHCACHE48"); + case 0xec: return ("ATA_IDENTIFY"); + case 0xef: + switch (request->u.ata.feature) { + case 0x03: return ("SETFEATURES SET TRANSFER MODE"); + case 0x02: return ("SETFEATURES ENABLE WCACHE"); + case 0x82: return ("SETFEATURES DISABLE WCACHE"); + case 0xaa: return ("SETFEATURES ENABLE RCACHE"); + case 0x55: return ("SETFEATURES DISABLE RCACHE"); + } + sprintf(buffer, "SETFEATURES 0x%02x", + request->u.ata.feature); + return (buffer); + case 0xf5: return ("SECURITY_FREE_LOCK"); + case 0xf8: return ("READ_NATIVE_MAX_ADDRESS"); + case 0xf9: return ("SET_MAX_ADDRESS"); + } + } + sprintf(buffer, "unknown CMD (0x%02x)", request->u.ata.command); + return (buffer); +} + +const char * ata_mode2str(int mode) { switch (mode) { @@ -464,7 +586,7 @@ ata_mode2str(int mode) } } -int +static int ata_str2mode(const char *str) { @@ -501,6 +623,32 @@ ata_atapi(device_t dev, int target) return (ch->devices & (ATA_ATAPI_MASTER << target)); } +void +ata_timeout(struct ata_request *request) +{ + struct ata_channel *ch; + + ch = device_get_softc(request->parent); + //request->flags |= ATA_R_DEBUG; + ATA_DEBUG_RQ(request, "timeout"); + + /* + * If we have an ATA_ACTIVE request running, we flag the request + * ATA_R_TIMEOUT so ata_cam_end_transaction() will handle it correctly. + * Also, NULL out the running request so we wont loose the race with + * an eventual interrupt arriving late. + */ + if (ch->state == ATA_ACTIVE) { + request->flags |= ATA_R_TIMEOUT; + if (ch->dma.unload) + ch->dma.unload(request); + ch->running = NULL; + ch->state = ATA_IDLE; + ata_cam_end_transaction(ch->dev, request); + } + mtx_unlock(&ch->state_mtx); +} + static void ata_cam_begin_transaction(device_t dev, union ccb *ccb) { @@ -658,7 +806,7 @@ ata_cam_process_sense(device_t dev, stru ata_reinit(dev); } -void +static void ata_cam_end_transaction(device_t dev, struct ata_request *request) { struct ata_channel *ch = device_get_softc(dev); Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Sat Apr 6 13:54:00 2013 (r249202) +++ head/sys/dev/ata/ata-all.h Sat Apr 6 15:02:06 2013 (r249203) @@ -613,16 +613,12 @@ void ata_interrupt(void *data); int ata_getparam(struct ata_device *atadev, int init); void ata_default_registers(device_t dev); void ata_udelay(int interval); +const char *ata_cmd2str(struct ata_request *request); const char *ata_mode2str(int mode); void ata_setmode(device_t dev); void ata_print_cable(device_t dev, u_int8_t *who); -int ata_str2mode(const char *str); int ata_atapi(device_t dev, int target); -void ata_cam_end_transaction(device_t dev, struct ata_request *request); - -/* ata-queue.c: */ void ata_timeout(struct ata_request *); -const char *ata_cmd2str(struct ata_request *request); /* ata-lowlevel.c: */ void ata_generic_hw(device_t dev); Modified: head/sys/dev/ata/ata-lowlevel.c ============================================================================== --- head/sys/dev/ata/ata-lowlevel.c Sat Apr 6 13:54:00 2013 (r249202) +++ head/sys/dev/ata/ata-lowlevel.c Sat Apr 6 15:02:06 2013 (r249203) @@ -604,7 +604,7 @@ ata_generic_reset(device_t dev) } /* must be called with ATA channel locked and state_mtx held */ -int +static int ata_generic_status(device_t dev) { struct ata_channel *ch = device_get_softc(dev); Modified: head/sys/modules/ata/atacore/Makefile ============================================================================== --- head/sys/modules/ata/atacore/Makefile Sat Apr 6 13:54:00 2013 (r249202) +++ head/sys/modules/ata/atacore/Makefile Sat Apr 6 15:02:06 2013 (r249203) @@ -3,7 +3,7 @@ .PATH: ${.CURDIR}/../../../dev/ata KMOD= ata -SRCS= ata-all.c ata-lowlevel.c ata-queue.c ata_if.c +SRCS= ata-all.c ata_if.c ata-lowlevel.c SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h .include From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 15:34:34 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 18C29D0F; Sat, 6 Apr 2013 15:34:34 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (unknown [IPv6:2001:610:1108:5012::107]) by mx1.freebsd.org (Postfix) with ESMTP id D03F2205; Sat, 6 Apr 2013 15:34:33 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 53507120207; Sat, 6 Apr 2013 17:34:17 +0200 (CEST) Received: by snail.stack.nl (Postfix, from userid 1677) id 3DC552848C; Sat, 6 Apr 2013 17:34:17 +0200 (CEST) Date: Sat, 6 Apr 2013 17:34:17 +0200 From: Jilles Tjoelker To: Peter Wemm Subject: Re: svn commit: r248534 - in head: lib/libc/sys share/man/man4 sys/kern sys/sys Message-ID: <20130406153417.GA29467@stack.nl> References: <201303192058.r2JKwIwg039788@svn.freebsd.org> <20130320091856.GI76816@FreeBSD.org> <20130320235001.GA60980@stack.nl> 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, svn-src-all@freebsd.org, Gleb Smirnoff , 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, 06 Apr 2013 15:34:34 -0000 On Sat, Apr 06, 2013 at 01:06:24AM -0700, Peter Wemm wrote: > On Wed, Mar 20, 2013 at 4:50 PM, Jilles Tjoelker wrote: > > On Wed, Mar 20, 2013 at 01:18:56PM +0400, Gleb Smirnoff wrote: > >> On Tue, Mar 19, 2013 at 08:58:18PM +0000, Jilles Tjoelker wrote: > >> J> Author: jilles > >> J> Date: Tue Mar 19 20:58:17 2013 > >> J> New Revision: 248534 > >> J> URL: http://svnweb.freebsd.org/changeset/base/248534 > >> J> Log: > >> J> Implement SOCK_CLOEXEC, SOCK_NONBLOCK and MSG_CMSG_CLOEXEC. > >[..] > >> IMO, it won't hurt if changes like this (bringing in new functionality) > >> would bump __FreeBSD_version. > > This change can be detected via the new #defines, and I plan to add > > similar changes in the near future (see the hackers@ mail about this > > patch; some of them cannot be detected via the preprocessor or even at > > compile time). Therefore, I think a __FreeBSD_version bump is not yet > > appropriate. > FYI.. The heimdal krb5 in /usr/src auto-detects these and uses them, > as do a couple of random ports. These binaries will no longer run on > kernel.old, or 9.x. > This is probably worth making a warning about because it's been a > while since installworld/reboot/installkernel discipline has been > required and folks have probably got lazy. Heck, you have been able > to do an installworld from 9.x -> 10.x for a while without requiring a > reboot. (I know, because I've developed this bad habit) Note that MSG_CMSG_CLOEXEC is harmlessly ignored by older kernels. I'm planning to add pipe2() and accept4() system calls and mkostemp() and mkostemps() libc functions, which may cause similar issues. How about this change to UPDATING? I'm inserting it into the middle to keep the file sorted by date. Index: UPDATING =================================================================== --- UPDATING (revision 249203) +++ UPDATING (working copy) @@ -33,6 +33,12 @@ removed. Kernel option `options ATA_CAM` is now permanently enabled and removed. +20130319: + SOCK_CLOEXEC and SOCK_NONBLOCK flags have been added to socket(2) + and socketpair(2). Software, in particular Kerberos, may + automatically detect and use these during building. The resulting + binaries will not work on older kernels. + 20130308: CTL_DISABLE has also been added to the sparc64 GENERIC (for further information, see the respective 20130304 entry). -- Jilles Tjoelker From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 17:00:12 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id B01BDA76; Sat, 6 Apr 2013 17:00:12 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id A2ED1728; Sat, 6 Apr 2013 17:00:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36H0Cr6061804; Sat, 6 Apr 2013 17:00:12 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36H0Cjx061802; Sat, 6 Apr 2013 17:00:12 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201304061700.r36H0Cjx061802@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 6 Apr 2013 17:00:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249204 - in head/sys/dev/usb: . serial 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, 06 Apr 2013 17:00:12 -0000 Author: hselasky Date: Sat Apr 6 17:00:11 2013 New Revision: 249204 URL: http://svnweb.freebsd.org/changeset/base/249204 Log: Add new USB ID. PR: usb/177666 Submitted by: Nicolai Petri Modified: head/sys/dev/usb/serial/uftdi.c head/sys/dev/usb/usbdevs Modified: head/sys/dev/usb/serial/uftdi.c ============================================================================== --- head/sys/dev/usb/serial/uftdi.c Sat Apr 6 15:02:06 2013 (r249203) +++ head/sys/dev/usb/serial/uftdi.c Sat Apr 6 17:00:11 2013 (r249204) @@ -384,6 +384,7 @@ static const STRUCT_USB_HOST_ID uftdi_de UFTDI_DEV(FTDI, LK204, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, LM3S_DEVEL_BOARD, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), UFTDI_DEV(FTDI, LM3S_EVAL_BOARD, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), + UFTDI_DEV(FTDI, LM3S_ICDI_B_BOARD, UFTDI_TYPE_AUTO | UFTDI_FLAG_JTAG), UFTDI_DEV(FTDI, MASTERDEVEL2, UFTDI_TYPE_AUTO), UFTDI_DEV(FTDI, MAXSTREAM, UFTDI_TYPE_8U232AM), UFTDI_DEV(FTDI, MHAM_DB9, UFTDI_TYPE_AUTO), Modified: head/sys/dev/usb/usbdevs ============================================================================== --- head/sys/dev/usb/usbdevs Sat Apr 6 15:02:06 2013 (r249203) +++ head/sys/dev/usb/usbdevs Sat Apr 6 17:00:11 2013 (r249204) @@ -1878,6 +1878,7 @@ product FTDI IRTRANS 0xfc60 FTDI compat product FTDI LENZ_LIUSB 0xd780 FTDI compatible adapter product FTDI LM3S_DEVEL_BOARD 0xbcd8 FTDI compatible adapter product FTDI LM3S_EVAL_BOARD 0xbcd9 FTDI compatible adapter +product FTDI LM3S_ICDI_B_BOARD 0xbcda FTDI compatible adapter product FTDI MASTERDEVEL2 0xf449 FTDI compatible adapter product FTDI MHAM_DB9 0xeeed FTDI compatible adapter product FTDI MHAM_IC 0xeeec FTDI compatible adapter From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 17:14:57 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 5C32AD4C; Sat, 6 Apr 2013 17:14:57 +0000 (UTC) (envelope-from mav@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 4FB2F790; Sat, 6 Apr 2013 17:14:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36HEv6B066974; Sat, 6 Apr 2013 17:14:57 GMT (envelope-from mav@svn.freebsd.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36HEvUl066973; Sat, 6 Apr 2013 17:14:57 GMT (envelope-from mav@svn.freebsd.org) Message-Id: <201304061714.r36HEvUl066973@svn.freebsd.org> From: Alexander Motin Date: Sat, 6 Apr 2013 17:14:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249205 - head/sys/cam/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: Sat, 06 Apr 2013 17:14:57 -0000 Author: mav Date: Sat Apr 6 17:14:56 2013 New Revision: 249205 URL: http://svnweb.freebsd.org/changeset/base/249205 Log: Replicate r245306 from SCSI to ATA. The problem didn't appear so far, covered by multilevel freeze mechanism, but it is better to be safe. Modified: head/sys/cam/ata/ata_da.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sat Apr 6 17:00:11 2013 (r249204) +++ head/sys/cam/ata/ata_da.c Sat Apr 6 17:14:56 2013 (r249205) @@ -614,6 +614,9 @@ adaschedule(struct cam_periph *periph) struct ada_softc *softc = (struct ada_softc *)periph->softc; uint32_t prio; + if (softc->state != ADA_STATE_NORMAL) + return; + /* Check if cam_periph_getccb() was called. */ prio = periph->immediate_priority; From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 17:15:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 48F05135; Sat, 6 Apr 2013 17:15:48 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3B3957D2; Sat, 6 Apr 2013 17:15:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36HFmn2067153; Sat, 6 Apr 2013 17:15:48 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36HFlmR067149; Sat, 6 Apr 2013 17:15:47 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304061715.r36HFlmR067149@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 17:15:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249206 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys 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, 06 Apr 2013 17:15:48 -0000 Author: mm Date: Sat Apr 6 17:15:47 2013 New Revision: 249206 URL: http://svnweb.freebsd.org/changeset/base/249206 Log: MFV r248660: Merge vendor change - modify time processing in deadman thread. Illumos ZFS issues: 3618 ::zio dcmd does not show timestamp data MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sat Apr 6 17:14:56 2013 (r249205) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h Sat Apr 6 17:15:47 2013 (r249206) @@ -104,8 +104,7 @@ struct vdev_queue { avl_tree_t vq_read_tree; avl_tree_t vq_write_tree; avl_tree_t vq_pending_tree; - uint64_t vq_io_complete_ts; - uint64_t vq_io_delta_ts; + hrtime_t vq_io_complete_ts; kmutex_t vq_lock; }; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sat Apr 6 17:14:56 2013 (r249205) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h Sat Apr 6 17:15:47 2013 (r249206) @@ -443,7 +443,7 @@ struct zio { uint64_t io_offset; uint64_t io_deadline; - uint64_t io_timestamp; + hrtime_t io_timestamp; avl_node_t io_offset_node; avl_node_t io_deadline_node; avl_tree_t *io_vdev_tree; Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sat Apr 6 17:14:56 2013 (r249205) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Sat Apr 6 17:15:47 2013 (r249206) @@ -3200,10 +3200,10 @@ vdev_deadman(vdev_t *vd) * the spa_deadman_synctime we panic the system. */ fio = avl_first(&vq->vq_pending_tree); - delta = ddi_get_lbolt64() - fio->io_timestamp; - if (delta > NSEC_TO_TICK(spa_deadman_synctime(spa))) { - zfs_dbgmsg("SLOW IO: zio timestamp %llu, " - "delta %llu, last io %llu", + delta = gethrtime() - fio->io_timestamp; + if (delta > spa_deadman_synctime(spa)) { + zfs_dbgmsg("SLOW IO: zio timestamp %lluns, " + "delta %lluns, last io %lluns", fio->io_timestamp, delta, vq->vq_io_complete_ts); fm_panic("I/O to pool '%s' appears to be " Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Apr 6 17:14:56 2013 (r249205) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c Sat Apr 6 17:15:47 2013 (r249206) @@ -44,8 +44,11 @@ int zfs_vdev_max_pending = 10; int zfs_vdev_min_pending = 4; -/* deadline = pri + ddi_get_lbolt64() >> time_shift) */ -int zfs_vdev_time_shift = 6; +/* + * The deadlines are grouped into buckets based on zfs_vdev_time_shift: + * deadline = pri + gethrtime() >> time_shift) + */ +int zfs_vdev_time_shift = 29; /* each bucket is 0.537 seconds */ /* exponential I/O issue ramp-up rate */ int zfs_vdev_ramp_rate = 2; @@ -391,7 +394,7 @@ vdev_queue_io(zio_t *zio) mutex_enter(&vq->vq_lock); - zio->io_timestamp = ddi_get_lbolt64(); + zio->io_timestamp = gethrtime(); zio->io_deadline = (zio->io_timestamp >> zfs_vdev_time_shift) + zio->io_priority; @@ -424,8 +427,7 @@ vdev_queue_io_done(zio_t *zio) avl_remove(&vq->vq_pending_tree, zio); - vq->vq_io_complete_ts = ddi_get_lbolt64(); - vq->vq_io_delta_ts = vq->vq_io_complete_ts - zio->io_timestamp; + vq->vq_io_complete_ts = gethrtime(); for (int i = 0; i < zfs_vdev_ramp_rate; i++) { zio_t *nio = vdev_queue_io_to_issue(vq, zfs_vdev_max_pending); From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 17:18:48 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D89702E5; Sat, 6 Apr 2013 17:18:48 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CAE0D7F3; Sat, 6 Apr 2013 17:18:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36HImSg067632; Sat, 6 Apr 2013 17:18:48 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36HImRa067631; Sat, 6 Apr 2013 17:18:48 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304061718.r36HImRa067631@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 17:18:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249207 - head/cddl/contrib/opensolaris/cmd/zdb 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, 06 Apr 2013 17:18:48 -0000 Author: mm Date: Sat Apr 6 17:18:48 2013 New Revision: 249207 URL: http://svnweb.freebsd.org/changeset/base/249207 Log: MFV r249185: Allow zdb to output a histogram of compressed block sizes. Illumos ZFS issues: 3641 want a histogram of compressed block sizes MFC after: 3 weeks Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) Modified: head/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Apr 6 17:15:47 2013 (r249206) +++ head/cddl/contrib/opensolaris/cmd/zdb/zdb.c Sat Apr 6 17:18:48 2013 (r249207) @@ -21,10 +21,11 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2012 by Delphix. All rights reserved. + * Copyright (c) 2013 by Delphix. All rights reserved. */ #include +#include #include #include #include @@ -237,18 +238,18 @@ zdb_nicenum(uint64_t num, char *buf) nicenum(num, buf); } -const char dump_zap_stars[] = "****************************************"; -const int dump_zap_width = sizeof (dump_zap_stars) - 1; +const char histo_stars[] = "****************************************"; +const int histo_width = sizeof (histo_stars) - 1; static void -dump_zap_histogram(uint64_t histo[ZAP_HISTOGRAM_SIZE]) +dump_histogram(const uint64_t *histo, int size) { int i; - int minidx = ZAP_HISTOGRAM_SIZE - 1; + int minidx = size - 1; int maxidx = 0; uint64_t max = 0; - for (i = 0; i < ZAP_HISTOGRAM_SIZE; i++) { + for (i = 0; i < size; i++) { if (histo[i] > max) max = histo[i]; if (histo[i] > 0 && i > maxidx) @@ -257,12 +258,14 @@ dump_zap_histogram(uint64_t histo[ZAP_HI minidx = i; } - if (max < dump_zap_width) - max = dump_zap_width; + if (max < histo_width) + max = histo_width; - for (i = minidx; i <= maxidx; i++) - (void) printf("\t\t\t%u: %6llu %s\n", i, (u_longlong_t)histo[i], - &dump_zap_stars[(max - histo[i]) * dump_zap_width / max]); + for (i = minidx; i <= maxidx; i++) { + (void) printf("\t\t\t%3u: %6llu %s\n", + i, (u_longlong_t)histo[i], + &histo_stars[(max - histo[i]) * histo_width / max]); + } } static void @@ -313,19 +316,19 @@ dump_zap_stats(objset_t *os, uint64_t ob (u_longlong_t)zs.zs_salt); (void) printf("\t\tLeafs with 2^n pointers:\n"); - dump_zap_histogram(zs.zs_leafs_with_2n_pointers); + dump_histogram(zs.zs_leafs_with_2n_pointers, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tBlocks with n*5 entries:\n"); - dump_zap_histogram(zs.zs_blocks_with_n5_entries); + dump_histogram(zs.zs_blocks_with_n5_entries, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tBlocks n/10 full:\n"); - dump_zap_histogram(zs.zs_blocks_n_tenths_full); + dump_histogram(zs.zs_blocks_n_tenths_full, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tEntries with n chunks:\n"); - dump_zap_histogram(zs.zs_entries_using_n_chunks); + dump_histogram(zs.zs_entries_using_n_chunks, ZAP_HISTOGRAM_SIZE); (void) printf("\t\tBuckets with n entries:\n"); - dump_zap_histogram(zs.zs_buckets_with_n_entries); + dump_histogram(zs.zs_buckets_with_n_entries, ZAP_HISTOGRAM_SIZE); } /*ARGSUSED*/ @@ -947,7 +950,7 @@ sprintf_blkptr_compact(char *blkbuf, con const dva_t *dva = bp->blk_dva; int ndvas = dump_opt['d'] > 5 ? BP_GET_NDVAS(bp) : 1; - if (dump_opt['b'] >= 5) { + if (dump_opt['b'] >= 6) { sprintf_blkptr(blkbuf, bp); return; } @@ -1986,11 +1989,13 @@ dump_one_dir(const char *dsname, void *a /* * Block statistics. */ +#define PSIZE_HISTO_SIZE (SPA_MAXBLOCKSIZE / SPA_MINBLOCKSIZE + 1) typedef struct zdb_blkstats { - uint64_t zb_asize; - uint64_t zb_lsize; - uint64_t zb_psize; - uint64_t zb_count; + uint64_t zb_asize; + uint64_t zb_lsize; + uint64_t zb_psize; + uint64_t zb_count; + uint64_t zb_psize_histogram[PSIZE_HISTO_SIZE]; } zdb_blkstats_t; /* @@ -2014,6 +2019,9 @@ typedef struct zdb_cb { zdb_blkstats_t zcb_type[ZB_TOTAL + 1][ZDB_OT_TOTAL + 1]; uint64_t zcb_dedup_asize; uint64_t zcb_dedup_blocks; + uint64_t zcb_start; + uint64_t zcb_lastprint; + uint64_t zcb_totalasize; uint64_t zcb_errors[256]; int zcb_readfails; int zcb_haderrors; @@ -2040,6 +2048,7 @@ zdb_count_block(zdb_cb_t *zcb, zilog_t * zb->zb_lsize += BP_GET_LSIZE(bp); zb->zb_psize += BP_GET_PSIZE(bp); zb->zb_count++; + zb->zb_psize_histogram[BP_GET_PSIZE(bp) >> SPA_MINBLOCKSHIFT]++; } if (dump_opt['L']) @@ -2126,7 +2135,7 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog zcb->zcb_readfails = 0; - if (dump_opt['b'] >= 4) { + if (dump_opt['b'] >= 5) { sprintf_blkptr(blkbuf, bp); (void) printf("objset %llu object %llu " "level %lld offset 0x%llx %s\n", @@ -2137,6 +2146,28 @@ zdb_blkptr_cb(spa_t *spa, zilog_t *zilog blkbuf); } + if (dump_opt['b'] < 5 && isatty(STDERR_FILENO) && + gethrtime() > zcb->zcb_lastprint + NANOSEC) { + uint64_t now = gethrtime(); + char buf[10]; + uint64_t bytes = zcb->zcb_type[ZB_TOTAL][ZDB_OT_TOTAL].zb_asize; + int kb_per_sec = + 1 + bytes / (1 + ((now - zcb->zcb_start) / 1000 / 1000)); + int sec_remaining = + (zcb->zcb_totalasize - bytes) / 1024 / kb_per_sec; + + zfs_nicenum(bytes, buf, sizeof (buf)); + (void) fprintf(stderr, + "\r%5s completed (%4dMB/s) " + "estimated time remaining: %uhr %02umin %02usec ", + buf, kb_per_sec / 1024, + sec_remaining / 60 / 60, + sec_remaining / 60 % 60, + sec_remaining % 60); + + zcb->zcb_lastprint = now; + } + return (0); } @@ -2268,7 +2299,7 @@ count_block_cb(void *arg, const blkptr_t { zdb_cb_t *zcb = arg; - if (dump_opt['b'] >= 4) { + if (dump_opt['b'] >= 5) { char blkbuf[BP_SPRINTF_LEN]; sprintf_blkptr(blkbuf, bp); (void) printf("[%s] %s\n", @@ -2287,7 +2318,7 @@ dump_block_stats(spa_t *spa) int flags = TRAVERSE_PRE | TRAVERSE_PREFETCH_METADATA | TRAVERSE_HARD; int leaks = 0; - (void) printf("\nTraversing all blocks %s%s%s%s%s...\n", + (void) printf("\nTraversing all blocks %s%s%s%s%s...\n\n", (dump_opt['c'] || !dump_opt['L']) ? "to verify " : "", (dump_opt['c'] == 1) ? "metadata " : "", dump_opt['c'] ? "checksums " : "", @@ -2323,6 +2354,8 @@ dump_block_stats(spa_t *spa) if (dump_opt['c'] > 1) flags |= TRAVERSE_PREFETCH_DATA; + zcb.zcb_totalasize = metaslab_class_get_alloc(spa_normal_class(spa)); + zcb.zcb_start = zcb.zcb_lastprint = gethrtime(); zcb.zcb_haderrors |= traverse_pool(spa, 0, flags, zdb_blkptr_cb, &zcb); if (zcb.zcb_haderrors) { @@ -2450,6 +2483,14 @@ dump_block_stats(spa_t *spa) else (void) printf(" L%d %s\n", level, typename); + + if (dump_opt['b'] >= 4) { + (void) printf("psize " + "(in 512-byte sectors): " + "number of blocks\n"); + dump_histogram(zb->zb_psize_histogram, + PSIZE_HISTO_SIZE); + } } } } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 17:24:01 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 87A5E84B; Sat, 6 Apr 2013 17:24:01 +0000 (UTC) (envelope-from mm@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 79F55820; Sat, 6 Apr 2013 17:24:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36HO1qD070133; Sat, 6 Apr 2013 17:24:01 GMT (envelope-from mm@svn.freebsd.org) Received: (from mm@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36HO18T070122; Sat, 6 Apr 2013 17:24:01 GMT (envelope-from mm@svn.freebsd.org) Message-Id: <201304061724.r36HO18T070122@svn.freebsd.org> From: Martin Matuska Date: Sat, 6 Apr 2013 17:24:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249209 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs 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, 06 Apr 2013 17:24:01 -0000 Author: mm Date: Sat Apr 6 17:24:00 2013 New Revision: 249209 URL: http://svnweb.freebsd.org/changeset/base/249209 Log: MFV r249186: Do not list read-only pools in zpool.cache Reduce diff against vendor in unused vdev_disk.c Illumos ZFS issues: 3639 zpool.cache should skip over readonly pools 3640 want automatic devid updates MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Sat Apr 6 17:20:22 2013 (r249208) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Sat Apr 6 17:24:00 2013 (r249209) @@ -220,7 +220,15 @@ spa_config_sync(spa_t *target, boolean_t */ nvl = NULL; while ((spa = spa_next(spa)) != NULL) { - if (spa == target && removing) + /* + * Skip over our own pool if we're about to remove + * ourselves from the spa namespace or any pool that + * is readonly. Since we cannot guarantee that a + * readonly pool would successfully import upon reboot, + * we don't allow them to be written to the cache file. + */ + if ((spa == target && removing) || + !spa_writeable(spa)) continue; mutex_enter(&spa->spa_props_lock); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Sat Apr 6 17:20:22 2013 (r249208) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c Sat Apr 6 17:24:00 2013 (r249209) @@ -144,6 +144,8 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi int error; dev_t dev; int otyp; + boolean_t validate_devid = B_FALSE; + ddi_devid_t devid; /* * We must have a pathname, and it must be absolute. @@ -192,7 +194,6 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi error = EINVAL; /* presume failure */ if (vd->vdev_path != NULL) { - ddi_devid_t devid; if (vd->vdev_wholedisk == -1ULL) { size_t len = strlen(vd->vdev_path) + 3; @@ -241,9 +242,10 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi * If we were unable to open by path, or the devid check fails, open by * devid instead. */ - if (error != 0 && vd->vdev_devid != NULL) + if (error != 0 && vd->vdev_devid != NULL) { error = ldi_open_by_devid(dvd->vd_devid, dvd->vd_minor, spa_mode(spa), kcred, &dvd->vd_lh, zfs_li); + } /* * If all else fails, then try opening by physical path (if available) @@ -252,6 +254,9 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi * level vdev validation will prevent us from opening the wrong device. */ if (error) { + if (vd->vdev_devid != NULL) + validate_devid = B_TRUE; + if (vd->vdev_physpath != NULL && (dev = ddi_pathname_to_dev_t(vd->vdev_physpath)) != NODEV) error = ldi_open_by_dev(&dev, OTYP_BLK, spa_mode(spa), @@ -273,6 +278,25 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi } /* + * Now that the device has been successfully opened, update the devid + * if necessary. + */ + if (validate_devid && spa_writeable(spa) && + ldi_get_devid(dvd->vd_lh, &devid) == 0) { + if (ddi_devid_compare(devid, dvd->vd_devid) != 0) { + char *vd_devid; + + vd_devid = ddi_devid_str_encode(devid, dvd->vd_minor); + zfs_dbgmsg("vdev %s: update devid from %s, " + "to %s", vd->vdev_path, vd->vdev_devid, vd_devid); + spa_strfree(vd->vdev_devid); + vd->vdev_devid = spa_strdup(vd_devid); + ddi_devid_str_free(vd_devid); + } + ddi_devid_free(devid); + } + + /* * Once a device is opened, verify that the physical device path (if * available) is up to date. */ From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 17:25:18 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 721BA9C6; Sat, 6 Apr 2013 17:25:18 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 54B8B82C; Sat, 6 Apr 2013 17:25:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36HPIDI070344; Sat, 6 Apr 2013 17:25:18 GMT (envelope-from hselasky@svn.freebsd.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36HPIYV070343; Sat, 6 Apr 2013 17:25:18 GMT (envelope-from hselasky@svn.freebsd.org) Message-Id: <201304061725.r36HPIYV070343@svn.freebsd.org> From: Hans Petter Selasky Date: Sat, 6 Apr 2013 17:25:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249210 - head/etc/devd 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, 06 Apr 2013 17:25:18 -0000 Author: hselasky Date: Sat Apr 6 17:25:17 2013 New Revision: 249210 URL: http://svnweb.freebsd.org/changeset/base/249210 Log: Regenerate usb.conf MFC after: 1 week Modified: head/etc/devd/usb.conf Modified: head/etc/devd/usb.conf ============================================================================== --- head/etc/devd/usb.conf Sat Apr 6 17:24:00 2013 (r249209) +++ head/etc/devd/usb.conf Sat Apr 6 17:25:17 2013 (r249210) @@ -120,7 +120,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x03f0"; - match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116|0x3216)"; + match "product" "(0x2016|0x2116|0x2216|0x3016|0x3116)"; + action "kldload -n uipaq"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "0x311d"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x03f0"; + match "product" "0x3216"; action "kldload -n uipaq"; }; @@ -168,7 +184,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0403"; - match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee9|0xeeea|0xeee b|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; + match "product" "(0x6001|0x6004|0x6006|0x6006|0x6010|0x6011|0x6014|0x8372|0x9378|0x9379|0x937a|0x937c|0x9868|0x9e90|0x9f80|0xa6d0|0xabb8|0xb810|0xb811|0xb812|0xbaf8|0xbbe2|0xbca0|0xbca1|0xbca2|0xbca4|0xbcd8|0xbcd9|0xbcda|0xbdc8|0xbfd8|0xbfd9|0xbfda|0xbfdb|0xbfdc|0xc7d0|0xc850|0xc991|0xcaa0|0xcc48|0xcc49|0xcc4a|0xd010|0xd011|0xd012|0xd013|0xd014|0xd015|0xd016|0xd017|0xd070|0xd071|0xd388|0xd389|0xd38a|0xd38b|0xd38c|0xd38d|0xd38e|0xd38f|0xd578|0xd678|0xd738|0xd780|0xdaf8|0xdaf9|0xdafa|0xdafb|0xdafc|0xdafd|0xdafe|0xdaff|0xdc00|0xdc01|0xdd20|0xdf28|0xdf30|0xdf31|0xdf32|0xdf33|0xdf35|0xe000|0xe001|0xe002|0xe004|0xe006|0xe008|0xe009|0xe00a|0xe050|0xe0e8|0xe0e9|0xe0ea|0xe0eb|0xe0ec|0xe0ed|0xe0ee|0xe0ef|0xe0f0|0xe0f1|0xe0f2|0xe0f3|0xe0f4|0xe0f5|0xe0f6|0xe0f7|0xe40b|0xe520|0xe548|0xe6c8|0xe700|0xe729|0xe808|0xe809|0xe80a|0xe80b|0xe80c|0xe80d|0xe80e|0xe80f|0xe888|0xe889|0xe88a|0xe88b|0xe88c|0xe88d|0xe88e|0xe88f|0xea90|0xebe0|0xec88|0xec89|0xed22|0xed71|0xed72|0xed73|0xed74|0xee18|0xeee8|0xeee 9|0xeeea|0xeeeb|0xeeec|0xeeed|0xeeee|0xeeef|0xef50|0xef51|0xf068|0xf069|0xf06a|0xf06b|0xf06c|0xf06d|0xf06e|0xf06f|0xf070|0xf0c0|0xf0c8|0xf208|0xf2d0|0xf3c0|0xf3c1|0xf3c2|0xf448|0xf449|0xf44a|0xf44b|0xf44c|0xf460|0xf608|0xf60b|0xf680|0xf850|0xf857|0xf9d0|0xf9d1|0xf9d2|0xf9d3|0xf9d4|0xf9d5|0xfa00|0xfa01|0xfa02|0xfa03|0xfa04|0xfa05|0xfa06|0xfa10|0xfa33|0xfa88|0xfad0|0xfaf0|0xfb58|0xfb59|0xfb5a|0xfb5b|0xfb5c|0xfb5d|0xfb5e|0xfb5f|0xfb80|0xfb99|0xfbfa|0xfc08|0xfc09|0xfc0a|0xfc0b|0xfc0c|0xfc0d|0xfc0e|0xfc0f|0xfc60|0xfc70|0xfc71|0xfc72|0xfc73|0xfc82|0xfd60|0xfe38|0xff00|0xff18|0xff1c|0xff1d|0xff20|0xff38|0xff39|0xff3a|0xff3b|0xff3c|0xff3d|0xff3e|0xff3f|0xffa8)"; action "kldload -n uftdi"; }; @@ -280,7 +296,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0411"; - match "product" "(0x0116|0x0119)"; + match "product" "(0x00f4|0x0116|0x0119)"; action "kldload -n if_rum"; }; @@ -423,6 +439,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0489"; + match "product" "(0xe027|0xe02c|0xe036|0xe03c|0xe03d|0xe04e|0xe056|0xe057)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0499"; match "product" "(0x1000|0x1001|0x1002|0x1003|0x1004|0x1005|0x1006|0x1007|0x1008|0x1009|0x100a|0x100c|0x100d|0x100e|0x100f|0x1010|0x1011|0x1012|0x1013|0x1014|0x1015|0x1016|0x1017|0x1018|0x1019|0x101a|0x101b|0x101c|0x101d|0x101e|0x101f|0x1020|0x1021|0x1022|0x1023|0x1024|0x1025|0x1026|0x1027|0x1028|0x1029|0x102a|0x102b|0x102e|0x1030|0x1031|0x1032|0x1033|0x1034|0x1035|0x1036|0x1037|0x1038|0x1039|0x103a|0x103b|0x103c|0x103d|0x103e|0x103f|0x1040|0x1041|0x1042|0x1043|0x1044|0x1045|0x104e|0x104f|0x1050|0x1051|0x1052|0x1053|0x1054|0x1055|0x1056|0x1057|0x1058|0x1059|0x105a|0x105b|0x105c|0x105d|0x1503|0x2000|0x2001|0x2002|0x2003|0x5000|0x5001|0x5002|0x5003|0x5004|0x5005|0x5006|0x5007|0x5008|0x5009|0x500a|0x500b|0x500c|0x500d|0x500e|0x500f|0x7000|0x7010)"; action "kldload -n snd_uaudio"; @@ -559,6 +583,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x04ca"; + match "product" "(0x3005|0x3006|0x3008)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x04da"; match "product" "0x2500"; action "kldload -n uipaq"; @@ -800,7 +832,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0525"; - match "product" "0x1080"; + match "product" "(0x1080|0xa4a0)"; action "kldload -n udbp"; }; @@ -1103,6 +1135,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x065a"; + match "product" "(0xc000|0xc001)"; + action "kldload -n uftdi"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x066b"; match "product" "(0x200c|0x2202)"; action "kldload -n if_aue"; @@ -1344,7 +1384,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0789"; - match "product" "(0x0162|0x0163|0x0164|0x0166|0x0168)"; + match "product" "(0x0162|0x0163|0x0164|0x0166|0x0168|0x0169)"; action "kldload -n if_run"; }; @@ -1800,6 +1840,14 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x0930"; + match "product" "(0x0215|0x0219)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x0930"; match "product" "(0x0700|0x0705|0x0706|0x0707|0x0708|0x0709|0x070a|0x070b)"; action "kldload -n uipaq"; }; @@ -2375,6 +2423,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0cf3"; + match "product" "(0x3002|0x3004|0x311d|0xe004|0xe019)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x0d3a"; match "product" "0x0300"; action "kldload -n uftdi"; @@ -3224,15 +3280,39 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x13d3"; - match "product" "(0x3247|0x3262|0x3273|0x3284|0x3305)"; + match "product" "(0x3247|0x3262|0x3273|0x3284)"; + action "kldload -n if_run"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x13d3"; + match "product" "0x3304"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x13d3"; + match "product" "0x3305"; action "kldload -n if_run"; }; nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x13d3"; + match "product" "(0x3362|0x3375|0x3393)"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x1410"; - match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5100|0x6000|0x6002|0x7042)"; + match "product" "(0x1100|0x1110|0x1120|0x1130|0x1400|0x1410|0x1420|0x1430|0x1450|0x2100|0x2110|0x2120|0x2130|0x2400|0x2410|0x2420|0x4100|0x4400|0x5010|0x5041|0x5100|0x6000|0x6002|0x7042)"; action "kldload -n u3g"; }; @@ -4040,7 +4120,7 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "0x1a00"; + match "product" "(0x1a00|0x1a02)"; action "kldload -n if_axe"; }; @@ -4096,7 +4176,23 @@ nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; match "vendor" "0x2001"; - match "product" "(0x4001|0x4002|0x4003|0x400b|0x4102|0xabc1)"; + match "product" "(0x4001|0x4002|0x4003|0x400b|0x4102)"; + action "kldload -n if_aue"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; + match "product" "(0x7e12|0xa805)"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; + match "vendor" "0x2001"; + match "product" "0xabc1"; action "kldload -n if_aue"; }; @@ -4215,6 +4311,14 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x22b8"; + match "product" "0x710f"; + action "kldload -n u3g"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "vendor" "0x22de"; match "product" "0x6801"; action "kldload -n u3g"; @@ -4495,6 +4599,16 @@ nomatch 32 { nomatch 32 { match "bus" "uhub[0-9]+"; match "mode" "host"; + match "vendor" "0x0a5c"; + match "intclass" "0xff"; + match "intsubclass" "0x01"; + match "intprotocol" "0x01"; + action "kldload -n ng_ubt"; +}; + +nomatch 32 { + match "bus" "uhub[0-9]+"; + match "mode" "host"; match "intclass" "0x02"; match "intsubclass" "0x02"; match "intprotocol" "0x01"; @@ -4635,5 +4749,5 @@ nomatch 32 { action "kldload -n umass"; }; -# 2386 USB entries processed +# 2422 USB entries processed From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 18:04:36 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6495730B; Sat, 6 Apr 2013 18:04:36 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 57BA696D; Sat, 6 Apr 2013 18:04:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36I4avp081851; Sat, 6 Apr 2013 18:04:36 GMT (envelope-from alc@svn.freebsd.org) Received: (from alc@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36I4ajf081850; Sat, 6 Apr 2013 18:04:36 GMT (envelope-from alc@svn.freebsd.org) Message-Id: <201304061804.r36I4ajf081850@svn.freebsd.org> From: Alan Cox Date: Sat, 6 Apr 2013 18:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249211 - 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, 06 Apr 2013 18:04:36 -0000 Author: alc Date: Sat Apr 6 18:04:35 2013 New Revision: 249211 URL: http://svnweb.freebsd.org/changeset/base/249211 Log: Simplify vm_radix_keybarr(). Sponsored by: EMC / Isilon Storage Division Modified: head/sys/vm/vm_radix.c Modified: head/sys/vm/vm_radix.c ============================================================================== --- head/sys/vm/vm_radix.c Sat Apr 6 17:25:17 2013 (r249210) +++ head/sys/vm/vm_radix.c Sat Apr 6 18:04:35 2013 (r249211) @@ -251,9 +251,7 @@ vm_radix_keybarr(struct vm_radix_node *r if (rnode->rn_clev > 0) { idx = vm_radix_trimkey(idx, rnode->rn_clev - 1); - idx -= rnode->rn_owner; - if (idx != 0) - return (TRUE); + return (idx != rnode->rn_owner); } return (FALSE); } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 19:13:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 7EC33D7C; Sat, 6 Apr 2013 19:13:04 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 6CE69CB9; Sat, 6 Apr 2013 19:13:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36JD4a0002427; Sat, 6 Apr 2013 19:13:04 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36JCoCl002314; Sat, 6 Apr 2013 19:12:50 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201304061912.r36JCoCl002314@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Apr 2013 19:12:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249213 - in head/sys: cam/ata conf dev/ata dev/ata/chipsets modules/ata/atacard modules/ata/atacbus modules/ata/atacore modules/ata/atadevel modules/ata/ataisa modules/ata/atapci modul... 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, 06 Apr 2013 19:13:04 -0000 Author: marius Date: Sat Apr 6 19:12:49 2013 New Revision: 249213 URL: http://svnweb.freebsd.org/changeset/base/249213 Log: - With the demise of !ATA_CAM, ATA_STATIC_ID is the only ata(4) related option left but actually consumed by ada(4), so move it to opt_ada.h and get rid of opt_ata.h. - Fix stand-alone build of atacore(4) by adding opt_cam.h. - Use __FBSDID. - Use DEVMETHOD_END. - Use NULL instead of 0 for pointers. Modified: head/sys/cam/ata/ata_da.c head/sys/conf/options head/sys/dev/ata/ata-all.c head/sys/dev/ata/ata-all.h head/sys/dev/ata/ata-cbus.c head/sys/dev/ata/ata-isa.c head/sys/dev/ata/ata-lowlevel.c head/sys/dev/ata/ata-pci.c head/sys/dev/ata/ata-sata.c head/sys/dev/ata/chipsets/ata-acard.c head/sys/dev/ata/chipsets/ata-acerlabs.c head/sys/dev/ata/chipsets/ata-adaptec.c head/sys/dev/ata/chipsets/ata-ahci.c head/sys/dev/ata/chipsets/ata-amd.c head/sys/dev/ata/chipsets/ata-ati.c head/sys/dev/ata/chipsets/ata-cenatek.c head/sys/dev/ata/chipsets/ata-cypress.c head/sys/dev/ata/chipsets/ata-cyrix.c head/sys/dev/ata/chipsets/ata-fsl.c head/sys/dev/ata/chipsets/ata-highpoint.c head/sys/dev/ata/chipsets/ata-intel.c head/sys/dev/ata/chipsets/ata-ite.c head/sys/dev/ata/chipsets/ata-jmicron.c head/sys/dev/ata/chipsets/ata-marvell.c head/sys/dev/ata/chipsets/ata-micron.c head/sys/dev/ata/chipsets/ata-national.c head/sys/dev/ata/chipsets/ata-netcell.c head/sys/dev/ata/chipsets/ata-nvidia.c head/sys/dev/ata/chipsets/ata-promise.c head/sys/dev/ata/chipsets/ata-serverworks.c head/sys/dev/ata/chipsets/ata-siliconimage.c head/sys/dev/ata/chipsets/ata-sis.c head/sys/dev/ata/chipsets/ata-via.c head/sys/modules/ata/atacard/Makefile head/sys/modules/ata/atacbus/Makefile head/sys/modules/ata/atacore/Makefile head/sys/modules/ata/atadevel/Makefile head/sys/modules/ata/ataisa/Makefile head/sys/modules/ata/atapci/Makefile head/sys/modules/ata/atapci/chipsets/ataacard/Makefile head/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile head/sys/modules/ata/atapci/chipsets/ataadaptec/Makefile head/sys/modules/ata/atapci/chipsets/ataahci/Makefile head/sys/modules/ata/atapci/chipsets/ataamd/Makefile head/sys/modules/ata/atapci/chipsets/ataati/Makefile head/sys/modules/ata/atapci/chipsets/atacenatek/Makefile head/sys/modules/ata/atapci/chipsets/atacypress/Makefile head/sys/modules/ata/atapci/chipsets/atacyrix/Makefile head/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile head/sys/modules/ata/atapci/chipsets/ataintel/Makefile head/sys/modules/ata/atapci/chipsets/ataite/Makefile head/sys/modules/ata/atapci/chipsets/atajmicron/Makefile head/sys/modules/ata/atapci/chipsets/atamarvell/Makefile head/sys/modules/ata/atapci/chipsets/atamicron/Makefile head/sys/modules/ata/atapci/chipsets/atanational/Makefile head/sys/modules/ata/atapci/chipsets/atanetcell/Makefile head/sys/modules/ata/atapci/chipsets/atanvidia/Makefile head/sys/modules/ata/atapci/chipsets/atapromise/Makefile head/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile head/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile head/sys/modules/ata/atapci/chipsets/atasis/Makefile head/sys/modules/ata/atapci/chipsets/atavia/Makefile head/sys/modules/cam/Makefile head/sys/modules/usb/umass/Makefile head/sys/modules/usb/urio/Makefile head/sys/modules/usb/usfs/Makefile head/sys/powerpc/powermac/ata_dbdma.c head/sys/powerpc/powermac/ata_kauai.c head/sys/powerpc/powermac/ata_macio.c head/sys/powerpc/psim/ata_iobus.c Modified: head/sys/cam/ata/ata_da.c ============================================================================== --- head/sys/cam/ata/ata_da.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/cam/ata/ata_da.c Sat Apr 6 19:12:49 2013 (r249213) @@ -28,7 +28,6 @@ __FBSDID("$FreeBSD$"); #include "opt_ada.h" -#include "opt_ata.h" #include Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/conf/options Sat Apr 6 19:12:49 2013 (r249213) @@ -312,7 +312,8 @@ SCSI_NO_SENSE_STRINGS opt_scsi.h SCSI_NO_OP_STRINGS opt_scsi.h # Options used only in cam/ata/ata_da.c -ADA_TEST_FAILURE opt_ada.h +ADA_TEST_FAILURE opt_ada.h +ATA_STATIC_ID opt_ada.h # Options used only in cam/scsi/scsi_cd.c CHANGER_MIN_BUSY_SECONDS opt_cd.h @@ -362,11 +363,6 @@ ISP_INTERNAL_TARGET opt_isp.h # Options used only in dev/iscsi ISCSI_INITIATOR_DEBUG opt_iscsi_initiator.h -# Options used in the 'ata' ATA/ATAPI driver -ATA_STATIC_ID opt_ata.h -ATA_NOPCI opt_ata.h -ATA_REQUEST_TIMEOUT opt_ata.h - # Net stuff. ACCEPT_FILTER_DATA ACCEPT_FILTER_DNS Modified: head/sys/dev/ata/ata-all.c ============================================================================== --- head/sys/dev/ata/ata-all.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-all.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/ata-all.h ============================================================================== --- head/sys/dev/ata/ata-all.h Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-all.h Sat Apr 6 19:12:49 2013 (r249213) @@ -26,8 +26,6 @@ * $FreeBSD$ */ -#include "opt_ata.h" - #if 0 #define ATA_LEGACY_SUPPORT /* Enable obsolete features that break * some modern devices */ Modified: head/sys/dev/ata/ata-cbus.c ============================================================================== --- head/sys/dev/ata/ata-cbus.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-cbus.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include @@ -253,7 +252,7 @@ static driver_t ata_cbus_driver = { static devclass_t ata_cbus_devclass; -DRIVER_MODULE(atacbus, isa, ata_cbus_driver, ata_cbus_devclass, 0, 0); +DRIVER_MODULE(atacbus, isa, ata_cbus_driver, ata_cbus_devclass, NULL, NULL); static int ata_cbuschannel_probe(device_t dev) Modified: head/sys/dev/ata/ata-isa.c ============================================================================== --- head/sys/dev/ata/ata-isa.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-isa.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include @@ -195,7 +194,7 @@ static device_method_t ata_isa_methods[] DEVMETHOD(device_suspend, ata_isa_suspend), DEVMETHOD(device_resume, ata_isa_resume), - { 0, 0 } + DEVMETHOD_END }; static driver_t ata_isa_driver = { @@ -204,5 +203,5 @@ static driver_t ata_isa_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, isa, ata_isa_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, isa, ata_isa_driver, ata_devclass, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); Modified: head/sys/dev/ata/ata-lowlevel.c ============================================================================== --- head/sys/dev/ata/ata-lowlevel.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-lowlevel.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/ata-pci.c ============================================================================== --- head/sys/dev/ata/ata-pci.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-pci.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/ata-sata.c ============================================================================== --- head/sys/dev/ata/ata-sata.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/ata-sata.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-acard.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acard.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-acard.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-acerlabs.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-acerlabs.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-acerlabs.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-adaptec.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-adaptec.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-adaptec.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-ahci.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ahci.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-ahci.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-amd.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-amd.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-amd.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-ati.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ati.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-ati.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-cenatek.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cenatek.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-cenatek.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-cypress.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cypress.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-cypress.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-cyrix.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-cyrix.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-cyrix.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-fsl.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-fsl.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-fsl.c Sat Apr 6 19:12:49 2013 (r249213) @@ -30,7 +30,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-highpoint.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-highpoint.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-highpoint.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-intel.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-intel.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-intel.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-ite.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-ite.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-ite.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-jmicron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-jmicron.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-jmicron.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-marvell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-marvell.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-marvell.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-micron.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-micron.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-micron.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-national.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-national.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-national.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-netcell.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-netcell.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-netcell.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-nvidia.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-nvidia.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-nvidia.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-promise.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-promise.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-promise.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-serverworks.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-serverworks.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-serverworks.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-siliconimage.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-siliconimage.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-siliconimage.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-sis.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-sis.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-sis.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/dev/ata/chipsets/ata-via.c ============================================================================== --- head/sys/dev/ata/chipsets/ata-via.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/dev/ata/chipsets/ata-via.c Sat Apr 6 19:12:49 2013 (r249213) @@ -27,7 +27,6 @@ #include __FBSDID("$FreeBSD$"); -#include "opt_ata.h" #include #include #include Modified: head/sys/modules/ata/atacard/Makefile ============================================================================== --- head/sys/modules/ata/atacard/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atacard/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,6 +4,6 @@ KMOD= atacard SRCS= ata-card.c -SRCS+= opt_ata.h pccarddevs.h ata_if.h device_if.h bus_if.h isa_if.h card_if.h +SRCS+= ata_if.h bus_if.h card_if.h device_if.h pccarddevs.h .include Modified: head/sys/modules/ata/atacbus/Makefile ============================================================================== --- head/sys/modules/ata/atacbus/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atacbus/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,6 +4,6 @@ KMOD= atacbus SRCS= ata-cbus.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h isa_if.h +SRCS+= ata_if.h bus_if.h device_if.h bus_if.h .include Modified: head/sys/modules/ata/atacore/Makefile ============================================================================== --- head/sys/modules/ata/atacore/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atacore/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,6 +4,6 @@ KMOD= ata SRCS= ata-all.c ata_if.c ata-lowlevel.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h opt_cam.h pci_if.h .include Modified: head/sys/modules/ata/atadevel/Makefile ============================================================================== --- head/sys/modules/ata/atadevel/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atadevel/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,7 @@ KMOD= atadevel SRCS= ata-devel.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h device_if.h bus_if.h pci_if.h CFLAGS+=-g .include Modified: head/sys/modules/ata/ataisa/Makefile ============================================================================== --- head/sys/modules/ata/ataisa/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/ataisa/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,6 +4,6 @@ KMOD= ataisa SRCS= ata-isa.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h isa_if.h +SRCS+= ata_if.h bus_if.h device_if.h isa_if.h .include Modified: head/sys/modules/ata/atapci/Makefile ============================================================================== --- head/sys/modules/ata/atapci/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -6,7 +6,6 @@ SUBDIR += chipsets KMOD= atapci SRCS= ata-pci.c ata-dma.c ata-sata.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataacard/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataacard/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataacard/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataacard SRCS= ata-acard.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataacerlabs/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataacerlabs SRCS= ata-acerlabs.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataadaptec/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataadaptec/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataadaptec/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataadaptec SRCS= ata-adaptec.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataahci/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataahci/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataahci/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataahci SRCS= ata-ahci.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataamd/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataamd/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataamd/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataamd SRCS= ata-amd.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataati/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataati/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataati/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataati SRCS= ata-ati.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atacenatek/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atacenatek/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atacenatek/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atacenatek SRCS= ata-cenatek.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atacypress/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atacypress/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atacypress/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atacypress SRCS= ata-cypress.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atacyrix/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atacyrix/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atacyrix/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atacyrix SRCS= ata-cyrix.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atahighpoint/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atahighpoint SRCS= ata-highpoint.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataintel/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataintel/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataintel/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataintel SRCS= ata-intel.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataite/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataite/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataite/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataite SRCS= ata-ite.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atajmicron/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atajmicron/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atajmicron/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atajmicron SRCS= ata-jmicron.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atamarvell/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atamarvell/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atamarvell/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atamarvell SRCS= ata-marvell.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atamicron/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atamicron/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atamicron/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atamicron SRCS= ata-micron.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atanational/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atanational/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atanational/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atanational SRCS= ata-national.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atanetcell/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atanetcell/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atanetcell/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atanetcell SRCS= ata-netcell.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atanvidia/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atanvidia/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atanvidia/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atanvidia SRCS= ata-nvidia.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atapromise/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atapromise/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atapromise/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atapromise SRCS= ata-promise.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/ataserverworks/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= ataserverworks SRCS= ata-serverworks.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atasiliconimage/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atasiliconimage SRCS= ata-siliconimage.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atasis/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atasis/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atasis/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atasis SRCS= ata-sis.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/ata/atapci/chipsets/atavia/Makefile ============================================================================== --- head/sys/modules/ata/atapci/chipsets/atavia/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/ata/atapci/chipsets/atavia/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -4,7 +4,6 @@ KMOD= atavia SRCS= ata-via.c -SRCS+= opt_ata.h ata_if.h device_if.h bus_if.h pci_if.h +SRCS+= ata_if.h bus_if.h device_if.h pci_if.h .include - Modified: head/sys/modules/cam/Makefile ============================================================================== --- head/sys/modules/cam/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/cam/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -9,7 +9,6 @@ KMOD= cam # See sys/conf/options for the flags that go into the different opt_*.h files. SRCS= opt_cam.h SRCS+= opt_ada.h -SRCS+= opt_ata.h SRCS+= opt_scsi.h SRCS+= opt_cd.h SRCS+= opt_pt.h Modified: head/sys/modules/usb/umass/Makefile ============================================================================== --- head/sys/modules/usb/umass/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/usb/umass/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -30,8 +30,7 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/storage KMOD= umass -SRCS= ata_if.h bus_if.h device_if.h usb_if.h vnode_if.h \ - opt_usb.h opt_bus.h opt_cam.h opt_ata.h ata_if.h usbdevs.h \ - umass.c +SRCS= bus_if.h device_if.h opt_bus.h opt_cam.h opt_usb.h umass.c usb_if.h \ + usbdevs.h vnode_if.h .include Modified: head/sys/modules/usb/urio/Makefile ============================================================================== --- head/sys/modules/usb/urio/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/usb/urio/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -30,8 +30,6 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/storage KMOD= urio -SRCS= ata_if.h bus_if.h device_if.h usb_if.h vnode_if.h \ - opt_usb.h opt_bus.h opt_cam.h opt_ata.h ata_if.h usbdevs.h \ - urio.c +SRCS= bus_if.h device_if.h opt_bus.h opt_usb.h usb_if.h usbdevs.h urio.c .include Modified: head/sys/modules/usb/usfs/Makefile ============================================================================== --- head/sys/modules/usb/usfs/Makefile Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/modules/usb/usfs/Makefile Sat Apr 6 19:12:49 2013 (r249213) @@ -30,8 +30,7 @@ S= ${.CURDIR}/../../.. .PATH: $S/dev/usb/storage KMOD= usfs -SRCS= ata_if.h bus_if.h device_if.h usb_if.h vnode_if.h \ - opt_usb.h opt_bus.h opt_cam.h opt_ata.h ata_if.h usbdevs.h \ +SRCS= bus_if.h device_if.h opt_bus.h opt_usb.h usb_if.h usbdevs.h \ ustorage_fs.c .include Modified: head/sys/powerpc/powermac/ata_dbdma.c ============================================================================== --- head/sys/powerpc/powermac/ata_dbdma.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/powerpc/powermac/ata_dbdma.c Sat Apr 6 19:12:49 2013 (r249213) @@ -23,16 +23,16 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("* $FreeBSD$"); + /* * Common routines for the DMA engine on both the Apple Kauai and MacIO * ATA controllers. */ -#include "opt_ata.h" #include #include #include Modified: head/sys/powerpc/powermac/ata_kauai.c ============================================================================== --- head/sys/powerpc/powermac/ata_kauai.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/powerpc/powermac/ata_kauai.c Sat Apr 6 19:12:49 2013 (r249213) @@ -31,7 +31,6 @@ __FBSDID("$FreeBSD$"); /* * Mac 'Kauai' PCI ATA controller */ -#include "opt_ata.h" #include #include #include @@ -99,7 +98,7 @@ static device_method_t ata_kauai_methods /* ATA interface */ DEVMETHOD(ata_setmode, ata_kauai_setmode), - { 0, 0 } + DEVMETHOD_END }; struct ata_kauai_softc { @@ -120,15 +119,15 @@ static driver_t ata_kauai_driver = { sizeof(struct ata_kauai_softc), }; -DRIVER_MODULE(ata, pci, ata_kauai_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, pci, ata_kauai_driver, ata_devclass, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); /* * PCI ID search table */ -static struct kauai_pci_dev { - u_int32_t kpd_devid; - char *kpd_desc; +static const struct kauai_pci_dev { + u_int32_t kpd_devid; + const char *kpd_desc; } kauai_pci_devlist[] = { { 0x0033106b, "Uninorth2 Kauai ATA Controller" }, { 0x003b106b, "Intrepid Kauai ATA Controller" }, @@ -152,6 +151,7 @@ static const u_int pio_timing_kauai[] = 0x05000249, /* PIO3 */ 0x04000148 /* PIO4 */ }; + static const u_int pio_timing_shasta[] = { 0x0a000c97, /* PIO0 */ 0x07000712, /* PIO1 */ @@ -165,6 +165,7 @@ static const u_int dma_timing_kauai[] = 0x00209000, /* WDMA1 */ 0x00148000 /* WDMA2 */ }; + static const u_int dma_timing_shasta[] = { 0x00820800, /* WDMA0 */ 0x0028b000, /* WDMA1 */ @@ -179,6 +180,7 @@ static const u_int udma_timing_kauai[] = 0x00002a31, /* UDMA4 */ 0x00002921 /* UDMA5 */ }; + static const u_int udma_timing_shasta[] = { 0x00035901, /* UDMA0 */ 0x000348b1, /* UDMA1 */ @@ -368,4 +370,3 @@ ata_kauai_begin_transaction(struct ata_r return ata_begin_transaction(request); } - Modified: head/sys/powerpc/powermac/ata_macio.c ============================================================================== --- head/sys/powerpc/powermac/ata_macio.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/powerpc/powermac/ata_macio.c Sat Apr 6 19:12:49 2013 (r249213) @@ -23,14 +23,14 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + /* * Mac-io ATA controller */ -#include "opt_ata.h" #include #include #include @@ -85,7 +85,7 @@ struct ide_timings { int active; /* minimum command active time [ns] */ }; -struct ide_timings pio_timings[5] = { +static const struct ide_timings pio_timings[5] = { { 600, 180 }, /* PIO 0 */ { 390, 150 }, /* PIO 1 */ { 240, 105 }, /* PIO 2 */ @@ -122,7 +122,7 @@ static device_method_t ata_macio_methods /* ATA interface */ DEVMETHOD(ata_setmode, ata_macio_setmode), - { 0, 0 } + DEVMETHOD_END }; struct ata_macio_softc { @@ -143,7 +143,7 @@ static driver_t ata_macio_driver = { sizeof(struct ata_macio_softc), }; -DRIVER_MODULE(ata, macio, ata_macio_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, macio, ata_macio_driver, ata_devclass, NULL, NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); static int @@ -332,4 +332,3 @@ ata_macio_begin_transaction(struct ata_r return ata_begin_transaction(request); } - Modified: head/sys/powerpc/psim/ata_iobus.c ============================================================================== --- head/sys/powerpc/psim/ata_iobus.c Sat Apr 6 19:11:12 2013 (r249212) +++ head/sys/powerpc/psim/ata_iobus.c Sat Apr 6 19:12:49 2013 (r249213) @@ -23,14 +23,14 @@ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. - * - * $FreeBSD$ */ +#include +__FBSDID("$FreeBSD$"); + /* * PSIM local bus ATA controller */ -#include "opt_ata.h" #include #include #include @@ -80,7 +80,7 @@ static device_method_t ata_iobus_methods DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), - { 0, 0 } + DEVMETHOD_END }; static driver_t ata_iobus_driver = { @@ -91,7 +91,8 @@ static driver_t ata_iobus_driver = { static devclass_t ata_iobus_devclass; -DRIVER_MODULE(ataiobus, iobus, ata_iobus_driver, ata_iobus_devclass, 0, 0); +DRIVER_MODULE(ataiobus, iobus, ata_iobus_driver, ata_iobus_devclass, NULL, + NULL); MODULE_DEPEND(ata, ata, 1, 1, 1); static int @@ -221,7 +222,7 @@ static device_method_t ata_iobus_sub_met /* ATA interface */ DEVMETHOD(ata_setmode, ata_iobus_sub_setmode), - { 0, 0 } + DEVMETHOD_END }; static driver_t ata_iobus_sub_driver = { @@ -230,7 +231,7 @@ static driver_t ata_iobus_sub_driver = { sizeof(struct ata_channel), }; -DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, ata_devclass, 0, 0); +DRIVER_MODULE(ata, ataiobus, ata_iobus_sub_driver, ata_devclass, NULL, NULL); static int ata_iobus_sub_probe(device_t dev) From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 19:33:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 283B9175; Sat, 6 Apr 2013 19:33:25 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id F37CFD66; Sat, 6 Apr 2013 19:33:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36JXOHk008295; Sat, 6 Apr 2013 19:33:24 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36JXOtH008294; Sat, 6 Apr 2013 19:33:24 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201304061933.r36JXOtH008294@svn.freebsd.org> From: Marius Strobl Date: Sat, 6 Apr 2013 19:33:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249214 - head/sys/modules/ata/atadevel 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, 06 Apr 2013 19:33:25 -0000 Author: marius Date: Sat Apr 6 19:33:24 2013 New Revision: 249214 URL: http://svnweb.freebsd.org/changeset/base/249214 Log: Remove atadevel(4), it no longer builds with ATA_CAM and it's unlikely that support for new lines of ATA controllers will be added to ata(4). Deleted: head/sys/modules/ata/atadevel/ From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 19:40:04 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id C209C33D; Sat, 6 Apr 2013 19:40:04 +0000 (UTC) (envelope-from joel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id B501CD92; Sat, 6 Apr 2013 19:40:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36Je4YP009204; Sat, 6 Apr 2013 19:40:04 GMT (envelope-from joel@svn.freebsd.org) Received: (from joel@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36Je412009203; Sat, 6 Apr 2013 19:40:04 GMT (envelope-from joel@svn.freebsd.org) Message-Id: <201304061940.r36Je412009203@svn.freebsd.org> From: Joel Dahl Date: Sat, 6 Apr 2013 19:40:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249215 - head/sbin/camcontrol 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, 06 Apr 2013 19:40:04 -0000 Author: joel (doc committer) Date: Sat Apr 6 19:40:04 2013 New Revision: 249215 URL: http://svnweb.freebsd.org/changeset/base/249215 Log: mdoc: new sentence should be on a new line. Also remove EOL whitespace while here. Modified: head/sbin/camcontrol/camcontrol.8 Modified: head/sbin/camcontrol/camcontrol.8 ============================================================================== --- head/sbin/camcontrol/camcontrol.8 Sat Apr 6 19:33:24 2013 (r249214) +++ head/sbin/camcontrol/camcontrol.8 Sat Apr 6 19:40:04 2013 (r249215) @@ -1118,14 +1118,15 @@ usually takes just a few seconds. Freeze the security configuration of the specified device. .Pp After command completion any other commands that update the device lock mode -shall be command aborted. Frozen mode is disabled by power-off or hardware reset. +shall be command aborted. +Frozen mode is disabled by power-off or hardware reset. .It Fl h Ar pwd .Pp Enhanced erase the device using the given password for the selected user. .Pp .Em WARNING! WARNING! WARNING! .Pp -Issuing an enhanced secure erase will +Issuing an enhanced secure erase will .Em ERASE ALL user data on the device and may take several hours to complete. .Pp @@ -1378,7 +1379,7 @@ camcontrol security ada0 .Pp Report security support and settings for ada0 .Bd -literal -offset indent -camcontrol security ada0 -u user -s MyPass +camcontrol security ada0 -u user -s MyPass .Ed .Pp Enable security on device ada0 with the password MyPass From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 22:21:25 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 191A9FB9; Sat, 6 Apr 2013 22:21:25 +0000 (UTC) (envelope-from jeff@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id ED820365; Sat, 6 Apr 2013 22:21:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36MLOL7057636; Sat, 6 Apr 2013 22:21:24 GMT (envelope-from jeff@svn.freebsd.org) Received: (from jeff@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36MLNwx057631; Sat, 6 Apr 2013 22:21:23 GMT (envelope-from jeff@svn.freebsd.org) Message-Id: <201304062221.r36MLNwx057631@svn.freebsd.org> From: Jeff Roberson Date: Sat, 6 Apr 2013 22:21:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249218 - in head/sys: fs/ext2fs kern ufs/ffs 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, 06 Apr 2013 22:21:25 -0000 Author: jeff Date: Sat Apr 6 22:21:23 2013 New Revision: 249218 URL: http://svnweb.freebsd.org/changeset/base/249218 Log: Prepare to replace the buf splay with a trie: - Don't insert BKGRDMARKER bufs into the splay or dirty/clean buf lists. No consumers need to find them there and it complicates the tree. These flags are all FFS specific and could be moved out of the buf cache. - Use pbgetvp() and pbrelvp() to associate the background and journal bufs with the vp. Not only is this much cheaper it makes more sense for these transient bufs. - Fix the assertions in pbget* and pbrel*. It's not safe to check list pointers which were never initialized. Use the BX flags instead. We also check B_PAGING in reassignbuf() so this should cover all cases. Discussed with: kib, mckusick, attilio Sponsored by: EMC / Isilon Storage Division Modified: head/sys/fs/ext2fs/ext2_alloc.c head/sys/kern/vfs_subr.c head/sys/ufs/ffs/ffs_softdep.c head/sys/ufs/ffs/ffs_vfsops.c head/sys/vm/vm_pager.c Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Sat Apr 6 21:56:54 2013 (r249217) +++ head/sys/fs/ext2fs/ext2_alloc.c Sat Apr 6 22:21:23 2013 (r249218) @@ -794,8 +794,6 @@ ext2_clusteralloc(struct inode *ip, int goto fail_lock; bbp = (char *)bp->b_data; - bp->b_xflags |= BX_BKGRDWRITE; - EXT2_LOCK(ump); /* * Check to see if a cluster of the needed size (or bigger) is Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Apr 6 21:56:54 2013 (r249217) +++ head/sys/kern/vfs_subr.c Sat Apr 6 22:21:23 2013 (r249218) @@ -1312,8 +1312,7 @@ flushbuflist(struct bufv *bufv, int flag xflags = 0; if (nbp != NULL) { lblkno = nbp->b_lblkno; - xflags = nbp->b_xflags & - (BX_BKGRDMARKER | BX_VNDIRTY | BX_VNCLEAN); + xflags = nbp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN); } retval = EAGAIN; error = BUF_TIMELOCK(bp, @@ -1357,8 +1356,7 @@ flushbuflist(struct bufv *bufv, int flag if (nbp != NULL && (nbp->b_bufobj != bo || nbp->b_lblkno != lblkno || - (nbp->b_xflags & - (BX_BKGRDMARKER | BX_VNDIRTY | BX_VNCLEAN)) != xflags)) + (nbp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) != xflags)) break; /* nbp invalid */ } return (retval); @@ -1501,9 +1499,7 @@ buf_splay(daddr_t lblkno, b_xflags_t xfl return (NULL); lefttreemax = righttreemin = &dummy; for (;;) { - if (lblkno < root->b_lblkno || - (lblkno == root->b_lblkno && - (xflags & BX_BKGRDMARKER) < (root->b_xflags & BX_BKGRDMARKER))) { + if (lblkno < root->b_lblkno) { if ((y = root->b_left) == NULL) break; if (lblkno < y->b_lblkno) { @@ -1517,9 +1513,7 @@ buf_splay(daddr_t lblkno, b_xflags_t xfl /* Link into the new root's right tree. */ righttreemin->b_left = root; righttreemin = root; - } else if (lblkno > root->b_lblkno || - (lblkno == root->b_lblkno && - (xflags & BX_BKGRDMARKER) > (root->b_xflags & BX_BKGRDMARKER))) { + } else if (lblkno > root->b_lblkno) { if ((y = root->b_right) == NULL) break; if (lblkno > y->b_lblkno) { @@ -1603,9 +1597,7 @@ buf_vlist_add(struct buf *bp, struct buf bp->b_left = NULL; bp->b_right = NULL; TAILQ_INSERT_TAIL(&bv->bv_hd, bp, b_bobufs); - } else if (bp->b_lblkno < root->b_lblkno || - (bp->b_lblkno == root->b_lblkno && - (bp->b_xflags & BX_BKGRDMARKER) < (root->b_xflags & BX_BKGRDMARKER))) { + } else if (bp->b_lblkno < root->b_lblkno) { bp->b_left = root->b_left; bp->b_right = root; root->b_left = NULL; @@ -1638,20 +1630,18 @@ gbincore(struct bufobj *bo, daddr_t lblk struct buf *bp; ASSERT_BO_LOCKED(bo); - if ((bp = bo->bo_clean.bv_root) != NULL && - bp->b_lblkno == lblkno && !(bp->b_xflags & BX_BKGRDMARKER)) + if ((bp = bo->bo_clean.bv_root) != NULL && bp->b_lblkno == lblkno) return (bp); - if ((bp = bo->bo_dirty.bv_root) != NULL && - bp->b_lblkno == lblkno && !(bp->b_xflags & BX_BKGRDMARKER)) + if ((bp = bo->bo_dirty.bv_root) != NULL && bp->b_lblkno == lblkno) return (bp); if ((bp = bo->bo_clean.bv_root) != NULL) { bo->bo_clean.bv_root = bp = buf_splay(lblkno, 0, bp); - if (bp->b_lblkno == lblkno && !(bp->b_xflags & BX_BKGRDMARKER)) + if (bp->b_lblkno == lblkno) return (bp); } if ((bp = bo->bo_dirty.bv_root) != NULL) { bo->bo_dirty.bv_root = bp = buf_splay(lblkno, 0, bp); - if (bp->b_lblkno == lblkno && !(bp->b_xflags & BX_BKGRDMARKER)) + if (bp->b_lblkno == lblkno) return (bp); } return (NULL); Modified: head/sys/ufs/ffs/ffs_softdep.c ============================================================================== --- head/sys/ufs/ffs/ffs_softdep.c Sat Apr 6 21:56:54 2013 (r249217) +++ head/sys/ufs/ffs/ffs_softdep.c Sat Apr 6 22:21:23 2013 (r249218) @@ -3285,7 +3285,6 @@ softdep_process_journal(mp, needwk, flag bp->b_lblkno = bp->b_blkno; bp->b_offset = bp->b_blkno * DEV_BSIZE; bp->b_bcount = size; - bp->b_bufobj = &ump->um_devvp->v_bufobj; bp->b_flags &= ~B_INVAL; bp->b_flags |= B_VALIDSUSPWRT | B_NOCOPY; /* @@ -3365,9 +3364,7 @@ softdep_process_journal(mp, needwk, flag jblocks->jb_needseg = 0; WORKLIST_INSERT(&bp->b_dep, &jseg->js_list); FREE_LOCK(&lk); - BO_LOCK(bp->b_bufobj); - bgetvp(ump->um_devvp, bp); - BO_UNLOCK(bp->b_bufobj); + pbgetvp(ump->um_devvp, bp); /* * We only do the blocking wait once we find the journal * entry we're looking for. @@ -3522,6 +3519,7 @@ handle_written_jseg(jseg, bp) * discarded. */ bp->b_flags |= B_INVAL | B_NOCACHE; + pbrelvp(bp); complete_jsegs(jseg); } @@ -11450,6 +11448,7 @@ handle_written_bmsafemap(bmsafemap, bp) struct cg *cgp; struct fs *fs; ino_t ino; + int foreground; int chgs; if ((bmsafemap->sm_state & IOSTARTED) == 0) @@ -11457,6 +11456,7 @@ handle_written_bmsafemap(bmsafemap, bp) ump = VFSTOUFS(bmsafemap->sm_list.wk_mp); chgs = 0; bmsafemap->sm_state &= ~IOSTARTED; + foreground = (bp->b_xflags & BX_BKGRDMARKER) == 0; /* * Release journal work that was waiting on the write. */ @@ -11477,7 +11477,8 @@ handle_written_bmsafemap(bmsafemap, bp) if (isset(inosused, ino)) panic("handle_written_bmsafemap: " "re-allocated inode"); - if ((bp->b_xflags & BX_BKGRDMARKER) == 0) { + /* Do the roll-forward only if it's a real copy. */ + if (foreground) { if ((jaddref->ja_mode & IFMT) == IFDIR) cgp->cg_cs.cs_ndir++; cgp->cg_cs.cs_nifree--; @@ -11500,7 +11501,8 @@ handle_written_bmsafemap(bmsafemap, bp) jntmp) { if ((jnewblk->jn_state & UNDONE) == 0) continue; - if ((bp->b_xflags & BX_BKGRDMARKER) == 0 && + /* Do the roll-forward only if it's a real copy. */ + if (foreground && jnewblk_rollforward(jnewblk, fs, cgp, blksfree)) chgs = 1; jnewblk->jn_state &= ~(UNDONE | NEWBLOCK); @@ -11540,7 +11542,8 @@ handle_written_bmsafemap(bmsafemap, bp) return (0); } LIST_INSERT_HEAD(&ump->softdep_dirtycg, bmsafemap, sm_next); - bdirty(bp); + if (foreground) + bdirty(bp); return (1); } Modified: head/sys/ufs/ffs/ffs_vfsops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vfsops.c Sat Apr 6 21:56:54 2013 (r249217) +++ head/sys/ufs/ffs/ffs_vfsops.c Sat Apr 6 22:21:23 2013 (r249218) @@ -2000,12 +2000,11 @@ ffs_backgroundwritedone(struct buf *bp) BO_LOCK(bufobj); if ((origbp = gbincore(bp->b_bufobj, bp->b_lblkno)) == NULL) panic("backgroundwritedone: lost buffer"); - /* Grab an extra reference to be dropped by the bufdone() below. */ - bufobj_wrefl(bufobj); BO_UNLOCK(bufobj); /* * Process dependencies then return any unfinished ones. */ + pbrelvp(bp); if (!LIST_EMPTY(&bp->b_dep)) buf_complete(bp); #ifdef SOFTUPDATES @@ -2051,8 +2050,8 @@ ffs_backgroundwritedone(struct buf *bp) static int ffs_bufwrite(struct buf *bp) { - int oldflags, s; struct buf *newbp; + int oldflags; CTR3(KTR_BUF, "bufwrite(%p) vp %p flags %X", bp, bp->b_vp, bp->b_flags); if (bp->b_flags & B_INVAL) { @@ -2064,7 +2063,6 @@ ffs_bufwrite(struct buf *bp) if (!BUF_ISLOCKED(bp)) panic("bufwrite: buffer is not busy???"); - s = splbio(); /* * If a background write is already in progress, delay * writing this block if it is asynchronous. Otherwise @@ -2074,7 +2072,6 @@ ffs_bufwrite(struct buf *bp) if (bp->b_vflags & BV_BKGRDINPROG) { if (bp->b_flags & B_ASYNC) { BO_UNLOCK(bp->b_bufobj); - splx(s); bdwrite(bp); return (0); } @@ -2105,25 +2102,19 @@ ffs_bufwrite(struct buf *bp) if (newbp == NULL) goto normal_write; - /* - * set it to be identical to the old block. We have to - * set b_lblkno and BKGRDMARKER before calling bgetvp() - * to avoid confusing the splay tree and gbincore(). - */ KASSERT((bp->b_flags & B_UNMAPPED) == 0, ("Unmapped cg")); memcpy(newbp->b_data, bp->b_data, bp->b_bufsize); - newbp->b_lblkno = bp->b_lblkno; - newbp->b_xflags |= BX_BKGRDMARKER; BO_LOCK(bp->b_bufobj); bp->b_vflags |= BV_BKGRDINPROG; - bgetvp(bp->b_vp, newbp); BO_UNLOCK(bp->b_bufobj); - newbp->b_bufobj = &bp->b_vp->v_bufobj; + newbp->b_xflags |= BX_BKGRDMARKER; + newbp->b_lblkno = bp->b_lblkno; newbp->b_blkno = bp->b_blkno; newbp->b_offset = bp->b_offset; newbp->b_iodone = ffs_backgroundwritedone; newbp->b_flags |= B_ASYNC; newbp->b_flags &= ~B_INVAL; + pbgetvp(bp->b_vp, newbp); #ifdef SOFTUPDATES /* @@ -2139,12 +2130,9 @@ ffs_bufwrite(struct buf *bp) #endif /* - * Initiate write on the copy, release the original to - * the B_LOCKED queue so that it cannot go away until - * the background write completes. If not locked it could go - * away and then be reconstituted while it was being written. - * If the reconstituted buffer were written, we could end up - * with two background copies being written at the same time. + * Initiate write on the copy, release the original. The + * BKGRDINPROG flag prevents it from going away until + * the background write completes. */ bqrelse(bp); bp = newbp; Modified: head/sys/vm/vm_pager.c ============================================================================== --- head/sys/vm/vm_pager.c Sat Apr 6 21:56:54 2013 (r249217) +++ head/sys/vm/vm_pager.c Sat Apr 6 22:21:23 2013 (r249218) @@ -469,17 +469,9 @@ pbrelvp(struct buf *bp) KASSERT(bp->b_vp != NULL, ("pbrelvp: NULL")); KASSERT(bp->b_bufobj != NULL, ("pbrelvp: NULL bufobj")); + KASSERT((bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) == 0, + ("pbrelvp: pager buf on vnode list.")); - /* XXX REMOVE ME */ - BO_LOCK(bp->b_bufobj); - if (TAILQ_NEXT(bp, b_bobufs) != NULL) { - panic( - "relpbuf(): b_vp was probably reassignbuf()d %p %x", - bp, - (int)bp->b_flags - ); - } - BO_UNLOCK(bp->b_bufobj); bp->b_vp = NULL; bp->b_bufobj = NULL; bp->b_flags &= ~B_PAGING; @@ -494,17 +486,9 @@ pbrelbo(struct buf *bp) KASSERT(bp->b_vp == NULL, ("pbrelbo: vnode")); KASSERT(bp->b_bufobj != NULL, ("pbrelbo: NULL bufobj")); + KASSERT((bp->b_xflags & (BX_VNDIRTY | BX_VNCLEAN)) == 0, + ("pbrelbo: pager buf on vnode list.")); - /* XXX REMOVE ME */ - BO_LOCK(bp->b_bufobj); - if (TAILQ_NEXT(bp, b_bobufs) != NULL) { - panic( - "relpbuf(): b_vp was probably reassignbuf()d %p %x", - bp, - (int)bp->b_flags - ); - } - BO_UNLOCK(bp->b_bufobj); bp->b_bufobj = NULL; bp->b_flags &= ~B_PAGING; } From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 22:28:20 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 828DA27C; Sat, 6 Apr 2013 22:28:20 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 75A233C5; Sat, 6 Apr 2013 22:28:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36MSKNQ058572; Sat, 6 Apr 2013 22:28:20 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36MSKGs058571; Sat, 6 Apr 2013 22:28:20 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304062228.r36MSKGs058571@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 6 Apr 2013 22:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249219 - 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, 06 Apr 2013 22:28:20 -0000 Author: jilles Date: Sat Apr 6 22:28:19 2013 New Revision: 249219 URL: http://svnweb.freebsd.org/changeset/base/249219 Log: Add warning about SOCK_CLOEXEC and SOCK_NONBLOCK (r248534). Reviewed by: rpaulo Modified: head/UPDATING Modified: head/UPDATING ============================================================================== --- head/UPDATING Sat Apr 6 22:21:23 2013 (r249218) +++ head/UPDATING Sat Apr 6 22:28:19 2013 (r249219) @@ -33,6 +33,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 10 removed. Kernel option `options ATA_CAM` is now permanently enabled and removed. +20130319: + SOCK_CLOEXEC and SOCK_NONBLOCK flags have been added to socket(2) + and socketpair(2). Software, in particular Kerberos, may + automatically detect and use these during building. The resulting + binaries will not work on older kernels. + 20130308: CTL_DISABLE has also been added to the sparc64 GENERIC (for further information, see the respective 20130304 entry). From owner-svn-src-all@FreeBSD.ORG Sat Apr 6 22:30:47 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 7EE72409; Sat, 6 Apr 2013 22:30:47 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 705883D9; Sat, 6 Apr 2013 22:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r36MUlhW059106; Sat, 6 Apr 2013 22:30:47 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r36MUlGo059105; Sat, 6 Apr 2013 22:30:47 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201304062230.r36MUlGo059105@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 6 Apr 2013 22:30:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r249220 - head/tools/regression/bin/sh/builtins 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, 06 Apr 2013 22:30:47 -0000 Author: jilles Date: Sat Apr 6 22:30:46 2013 New Revision: 249220 URL: http://svnweb.freebsd.org/changeset/base/249220 Log: sh: Add a variation on builtins/eval4.0 where the cmdsubst returns 0. Added: head/tools/regression/bin/sh/builtins/eval6.0 - copied, changed from r248873, head/tools/regression/bin/sh/builtins/eval4.0 Copied and modified: head/tools/regression/bin/sh/builtins/eval6.0 (from r248873, head/tools/regression/bin/sh/builtins/eval4.0) ============================================================================== --- head/tools/regression/bin/sh/builtins/eval4.0 Fri Mar 29 08:49:27 2013 (r248873, copy source) +++ head/tools/regression/bin/sh/builtins/eval6.0 Sat Apr 6 22:30:46 2013 (r249220) @@ -2,4 +2,4 @@ # eval should preserve $? from command substitutions when starting # the parsed command. -[ $(eval 'echo $?' $(false)) = 1 ] +[ $(false; eval 'echo $?' $(:)) = 0 ]