From owner-svn-src-head@FreeBSD.ORG Sun Mar 31 02:03:35 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 03:56:49 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 04:03:09 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 08:31:06 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 08:54:05 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 12:51:57 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 17:42:55 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 18:27:46 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 20:51:00 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 22:42:26 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 22:43:16 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sun Mar 31 23:24:05 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 00:00:10 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 00:41:39 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 00:44:23 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 06:07:24 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 08:45:02 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 08:49:02 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 09:56:48 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 09:57:47 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 09:59:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 11:28:53 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 11:31:21 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 13:17:29 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 13:18:35 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 13:48:31 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:14:57 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:23:36 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:30:12 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:30:16 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:30:20 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:30:21 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 16:35:27 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 17:15:05 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 17:17:49 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 17:18:25 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 18:04:58 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 19:01:52 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 19:13:48 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:11:20 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:12:22 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:34:12 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:38:11 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:44:21 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:45:16 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:50:08 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 20:57:14 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Mon Apr 1 21:16:33 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 00:09:11 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 6E2D523F for ; Tue, 2 Apr 2013 00:09:11 +0000 (UTC) (envelope-from giffunip@yahoo.com) Received: from nm18-vm0.bullet.mail.bf1.yahoo.com (nm18-vm0.bullet.mail.bf1.yahoo.com [98.139.213.138]) by mx1.freebsd.org (Postfix) with SMTP id 21F54931 for ; Tue, 2 Apr 2013 00:09:10 +0000 (UTC) Received: from [98.139.215.141] by nm18.bullet.mail.bf1.yahoo.com with NNFMP; 02 Apr 2013 00:06:40 -0000 Received: from [98.139.215.229] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 02 Apr 2013 00:06:40 -0000 Received: from [127.0.0.1] by omp1069.mail.bf1.yahoo.com with NNFMP; 02 Apr 2013 00:06:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 614410.4772.bm@omp1069.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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Pedro Giffuni List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2013 00:09:11 -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-head@FreeBSD.ORG Tue Apr 2 00:11:36 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 00:57:55 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 05:30:43 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 05:30:54 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 05:57:37 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 06:21:37 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 06:24:23 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 06:25:11 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 08:15:40 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 09:38:05 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 09:42:44 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 09:45:00 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 09:45:35 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 11:42:40 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 11:44:57 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 12:22:44 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 12:40:02 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 13:44:53 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 13:52:10 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 16:34:20 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 16:49:50 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 16:50:50 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 17:29:18 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 19:39:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 21:31:15 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 21:34:39 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Tue Apr 2 23:41:22 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 01:27:16 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 01:51:55 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 06:37:25 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 06:45:22 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 07:04:59 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 07:31:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 621EE3A2 for ; Wed, 3 Apr 2013 07:31:47 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) by mx1.freebsd.org (Postfix) with ESMTP id DC6E89C3 for ; Wed, 3 Apr 2013 07:31:46 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id er20so1153896lab.18 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=m1dbAjtRmHowIfoevEdbMgjW1GrOgUptvm6A3MJc6S7Y9dq/efjMOHTcC5lZYNBWjq DJe8KyZYFZRyi9KzZpqZtW8oSpCK+UBoasmlglMQWK4cByWnf/HlJZwotRDVSv7KWX4u RjtRx6xurWQCWfH/CsyERFEqHAD33Hs8WrUPgVbiXBw7NWV682C31B91r4AV+J7vbzhp 7XkNKUEJ6VhagaH8ikeX9DjqiOXShhrWMqTEffeSVjJj0eMB78Wny8p+rppCGTKYXvUy qJ4+l77+AJKl0ynBvu9XTcUXJGoYwUEe06JXXa85JiU63CvayyAWbDKWkYrjzqZ9jqrU 2Khg== 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: ALoCoQnE9mlcInoUBvRdCFxK1HdTB7D5X+HrSGqK/2/4JnxFeQFzUrsdVkbTRY/6IcM+D1/fzX5t Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Xin LI X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 08:27:36 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 09:52:31 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 10:31:14 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 11:06:27 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 11:30:18 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 14:10:39 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 14:14:02 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 16:20:22 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 18:30:09 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 19:19:46 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 19:26:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 20:26:53 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 20:31:11 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 20:52:17 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 21:34:36 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 21:55:20 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 22:24:37 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 22:37:42 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Wed Apr 3 23:39:55 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 04:49:36 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 78E088CD for ; Thu, 4 Apr 2013 04:49:36 +0000 (UTC) (envelope-from kingjamesparantal@yahoo.com) Received: from nm15-vm0.bullet.mail.bf1.yahoo.com (nm15-vm0.bullet.mail.bf1.yahoo.com [98.139.212.254]) by mx1.freebsd.org (Postfix) with SMTP id 09D5461E for ; Thu, 4 Apr 2013 04:49:35 +0000 (UTC) Received: from [98.139.212.153] by nm15.bullet.mail.bf1.yahoo.com with NNFMP; 04 Apr 2013 04:49:29 -0000 Received: from [98.139.211.206] by tm10.bullet.mail.bf1.yahoo.com with NNFMP; 04 Apr 2013 04:49:29 -0000 Received: from [127.0.0.1] by smtp215.mail.bf1.yahoo.com with NNFMP; 04 Apr 2013 04:49:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1365050969; bh=J+mP1hI07Zv3Ow+3DzVA2yHToZ8vA3WaBHN14hwzIJc=; h=X-Yahoo-Newman-Id:X-Yahoo-Newman-Property:X-YMail-OSG:X-Yahoo-SMTP:X-Rocket-Received:Return-Path:MIME-Version:From:Reply-To:To:Subject:Content-Type:Content-Transfer-Encoding:X-Mailer:Date:Message-ID; b=YFp9POvpTIeFNiKz6ckKDkN3fFH/kXz70/BbKlfMLlkOjP6nloUFhfAbKyD+iV8QmfjXgszqFnrr0Wu39AjP7BzFYe7L1Vv+VnM/FJv5WVHT7RYjvFALjLkzuKv4W7DuvTFLKK4llrsQ3gVZTlnZg8uXg7hDO46DGqEFQRsXKeo= X-Yahoo-Newman-Id: 622580.32178.bm@smtp215.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: 9T.Nw.EVM1loVoY7INJ_lusA1cOtOg38BF7uSpYGDV92S_c qXgMJYBhp1iifickh5.FgfMi8ew4KAmfWfI92Ib_inUlGU5p807tLlvr3Hsg hNUhGpSXJZk5k7TuoNgyToFZPkf.Y5m2KRfpqlP2JQL6YDnPXnTXN0sJTOBt KO690GldH4fOTuZhS5KnuR0NX_1PKGualfQd19.QsqpH57ww.XvGFUd1LE9O c.fxH_kX.aQQ6b.TPI9YNiXN9R7Wgn41DN.ZAAlayWp0xz0d0nE8d4TBWcwy MubObTN5p_64RRCVXs_2nq_oTSe3MD6CPJgDYKRzi_6K8At9ZeHmWA0Db4e8 MtLBwMNYEwRBG1SSS_J3Oeu0B6ybq1SwgA8l.296q5VPnYLJaK._73lOhsCg yOxn5p.ypUOw8_kLSDALWVyyCDkaetpHJG.kj6xptsBgK03scfarHNKAX.2r l8Jh9p._YQJqNl9nl_laF.LggExW6Dal3GKiPiK1q2wZGrVRHSXge1ILw7sT uh5CLtbNqpavwIjheVLNfLNvnk52C2H9Cam2S4btpft4- X-Yahoo-SMTP: tKsmrD2swBAmhZYzQko8V2_hGXw7r4posrbKjBKt X-Rocket-Received: from 121.54.54.144 (kingjamesparantal@121.54.54.144 with login) by smtp215.mail.bf1.yahoo.com with SMTP; 03 Apr 2013 21:49:29 -0700 PDT From: "kingjamesparantal" To: svn-src-head@freebsd.org Subject: GOLF TODAY X-Mailer: Smart_Send_2_0_138 Date: Thu, 4 Apr 2013 12:49:17 +0800 Message-ID: <488883574805361648115504@christy-PC> MIME-Version: 1.0 Content-Type: text/plain; charset="windows-1252" X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: kingjamesparantal@yahoo.com List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Apr 2013 04:49:36 -0000 Fear, worry and frustration are feelings of not knowing and/or, not being prepared. How do you eliminate fear? Get prepared! Don't go into another season "hoping" for good weather; go into this season knowing your facility is set financially so you can focus on customer relations opposed to worrying about how you will make payroll. MMC®'s site has free videos on how to increase rounds, capture the difficult to reach market, engage the casual and core golfer, increase revenue in your profit centers e.g. pro-shop, food and beverage, cart rentals, lessons and so much more absolutely free. Click on the link below to learn about MMC®'s CASH promotion and how we have raised $250,000 and more, in just 60 days for numerous Golf properties. [1]http://www.golfcourseprofits.com/Cash_Promotion.html It is like the 90's all over again. Thanks MMC. Lenny Shaw, IN "The MMC program absolutely does work. It is a fantastic promotion and has put our course on the map in the Des Moines, Iowa, area." Larry L. Hughes, IO MMC worked with us to design a program that addressed the way our existing members used the club, and then we launched our offer into the marketplace to connect with the casual golfer. As predicted, our play was substantially increased and we generated huge gains in cart revenue, as well as much needed increases in all of our other profit centers. Lee Edson, MI MMC displayed a great understanding of the challenges that we were facing at our facility, and formulated a marketing plan to help us get to where we wanted to be. I was intrigued by the program...and started to research reference. Everyone said the same thing, IT WORKS! Todd Londot, OH Wishing you good health and prosperity, Chuck Thompson Founder/President MMC® 904-307-6736 Cell 904-448-5727 Office 877-620-8135 Toll Free If you wish not to receive these free tips on growing the game, your golf property and your golf career, simply click on the unsubscribe button below to be taken off our list. [2][Unsubscribe] Notice: It is not our intention to "spam" any person or company. We have received your email through a legitimate avenue. We have been in business for more than 20 plus years and have collected opt-in emails from all of our internal resources i.e. employees, sales consultants, co-op marketing partners, etc. We have never done e-marketing over the past twenty plus years because we never offered anything of value on our site (with the exception of product information), until now. We are simply making an attempt to connect and re-connect with our clients, prospects and associates of past and present and make them aware of our new educational site and domain. We do realize some of you may have forgotten us or don't remember (or know) how we received your email (as we can't remember every email either) and for that we apologize in advance. Please be patient with us. If you do not wish to receive further communication from us please reply with the word "REMOVE" or "UNSUBSCRIBE" in the subject field and we will make every effort to eliminate you from all of our data bases immediately. Also, please make sure you reply from the original e-mail address this message was addressed to, or, include that address in the removal request. Please excuse any inconvenience. References 1. http://www.golfcourseprofits.com/Cash_Promotion.html 2. mailto:?subject=Unsubscribe From owner-svn-src-head@FreeBSD.ORG Thu Apr 4 05:24:01 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 07:12:29 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 07:19:02 2013 Return-Path: Delivered-To: svn-src-head@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 818F7327 for ; Thu, 4 Apr 2013 07:19:02 +0000 (UTC) (envelope-from mailer-daemon@vniz.net) Received: from mail-la0-x236.google.com (mail-la0-x236.google.com [IPv6:2a00:1450:4010:c03::236]) by mx1.freebsd.org (Postfix) with ESMTP id 001D4A58 for ; Thu, 4 Apr 2013 07:19:01 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id gw10so2211028lab.27 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=YtKGoQudtA0aKNsu3CPXIzPEyT4MyAKybAtONAOrOW2p602KF2eL1yotjOi2ReqGsC xm6+0tIFBa4z1wRmHrol2TUngRW4mN1oX9+xVvx1rHQr1Xmfy7uw6dUPyYW6zERH/Zyh wA54DC60Of5oJv6WrlVYIHN9jln4QRRUuInCtAZb2lj+UJ/OMMpajfJVFlXI0EA515Or uhsyqv0K7WcyNIAggVdCjzbiN7tHI/+6vyi+YYPP3aHwlJ+T9RDZvNUVohqwCF3aPSDv nf6ONEN+raCTq0uC0bW9ldkSWnEz+TrPxhX3HQqcr/onkktHgtWIuXhOUIl/rJEyLG9f 0FJQ== 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: ALoCoQkXaD7FnItbSQrKc8dT809DbfexHDm3AMgLuJ0gmn/Z+lzIRBxAUyafDY4PBYRL/9QVTz1Y 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 07:36:23 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 07:57:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 08:21:57 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 08:30:04 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 08:45:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 08:57:30 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 09:15:20 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 09:21:26 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 10:19:06 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 10:26:09 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 10:46:34 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 12:03:31 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 14:57:44 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 15:03:13 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 15:16:54 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 15:20:53 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 15:33:51 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 15:40:19 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 17:08:49 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 18:00:19 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 18:59:30 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 19:04:16 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 19:07:39 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 20:31:42 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 20:53:26 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 20:57:59 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 21:27:06 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 22:04:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 22:07:39 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 22:11:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 23:11:57 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Thu Apr 4 23:19:52 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 00:21:18 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 00:22:18 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 00:22:54 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 00:26:06 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 00:26:29 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 01:36:01 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 01:38:14 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 02:01:06 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 02:02:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 02:15:10 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 04:53:44 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 05:01:24 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 05:06:31 2013 Return-Path: Delivered-To: svn-src-head@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 D375B43D 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 AD474D3 for ; Fri, 5 Apr 2013 05:06:31 +0000 (UTC) Received: by mail-pb0-f47.google.com with SMTP id rq13so1822576pbb.34 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=cbr68Z4rLOU6GdP+I9+LVroqH+Xc+tUgRmr/8nxHwTw8w78rcsPmLvAjjsX4SzHJtB JOcWbNYsih/igmi7MMXZaf26or8iZ3/gVic/wUiBOWFY4ECDGWyxqnT2IPJPfG5gucdS aSxU4j2FSKOxHV08dG+cHw+GlX1eJfJsWoAUSIsnhafvk92NqOp2H0c/OkpDcjfjoRvI N/p0Ali79jfXD3ijzmkMEBwQKebuJnOwZyldf1fcHvxkBrb1vdEgGwLBhzN8vo7YdS60 EiMGS3JS/oR0ydaW0EAKxx5KbXPImn1RQS1adgT/SfGSJS+4xAOA5Go2QnwIZXoe4O8D HzCQ== 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: ALoCoQlUhxHr7QsoKnlkIuYb2F2iO0GLCjnvfz8FNW5qT/j7W/ZSy9JISo7nZQYrzo8TgfEgNxlR Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 05:13:14 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 05:52:34 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 07:37:19 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 07:41:48 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 07:52:47 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 08:13:16 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 09:06:40 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 09:09:12 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 098081E0 for ; Fri, 5 Apr 2013 09:09:12 +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 64AEAA10 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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Apr 2013 09:09:12 -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-head@FreeBSD.ORG Fri Apr 5 09:14:31 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 09:17:27 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 09:43:21 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 09:51:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 11:42:29 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 13:11:29 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 14:30:52 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 15:02:21 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 15:43:23 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 18:09:43 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 19:00:03 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 20:24:51 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 20:57:42 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 21:13:40 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 21:17:37 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 21:18:01 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 22:14:08 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 22:16:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 22:19:02 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 23:35:25 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 23:41:35 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 23:41:41 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Fri Apr 5 23:42:22 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 00:47:34 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 03:31:29 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 06:02:56 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 08:06:25 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 93C53A57 for ; Sat, 6 Apr 2013 08:06:25 +0000 (UTC) (envelope-from peter@wemm.org) Received: from mail-vb0-x236.google.com (mail-vb0-x236.google.com [IPv6:2607:f8b0:400c:c02::236]) by mx1.freebsd.org (Postfix) with ESMTP id 539BF3CE for ; Sat, 6 Apr 2013 08:06:25 +0000 (UTC) Received: by mail-vb0-f54.google.com with SMTP id w16so2693798vbf.13 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=Ijcp0y6MW6PUfoGyOft3iLAvkhpMvV8nur2xHLZUy2xa8WsKz7IvG3R3XJSPpzROKS EQ3PdnWrHjgd224u/jpKNgR7qda/dyyiDcQj01AqT/j4/nYNBgCJ0ucabjvYgoQnByBm 0jJX+/Is43rTXV9CFCVf4T0TPBWJjhIAKs2hMe4UFFuv+I652JZ12GDezFR0eD7JyZjv 7uELyabMjxWxGuUqSk3X44T5ahaJDO+haiHahhsV3bJeB6/5DmNxAupAUY9rN1WhQ9AK uOc3C3gRSSAYwxZYZt7Ps3u1TY5JCh9wY30Tl70eQ7sFFqk4aaJIcg115nrsAOoCoBSt v7ig== 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: ALoCoQnztlHQLVd8yi0YVrMzG2GFZQkejE7k/YGb2HGmXpz7wJubvoIALPMl+pAJrDwLwSm+WnWY Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Apr 2013 08:06:25 -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-head@FreeBSD.ORG Sat Apr 6 08:21:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 08:23:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 10:32:07 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 10:34:03 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 10:39:41 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 11:54:42 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 12:58:32 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 13:39:04 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 13:42:38 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 13:47:45 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 13:54:01 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 15:02:07 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 15:34:34 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 17:00:12 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 17:14:57 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 17:15:48 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 17:18:48 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 17:24:01 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 17:25:18 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 18:04:36 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 19:13:04 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 19:33:25 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 19:40:04 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 22:21:25 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 22:28:20 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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-head@FreeBSD.ORG Sat Apr 6 22:30:47 2013 Return-Path: Delivered-To: svn-src-head@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-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current 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 ]