From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 01:28:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 166C7298; Sun, 18 Jan 2015 01:28:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 028733B9; Sun, 18 Jan 2015 01:28:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I1S8QA089960; Sun, 18 Jan 2015 01:28:08 GMT (envelope-from bz@FreeBSD.org) Received: (from bz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I1S8EG089959; Sun, 18 Jan 2015 01:28:08 GMT (envelope-from bz@FreeBSD.org) Message-Id: <201501180128.t0I1S8EG089959@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bz set sender to bz@FreeBSD.org using -f From: "Bjoern A. Zeeb" Date: Sun, 18 Jan 2015 01:28:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277308 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 01:28:09 -0000 Author: bz Date: Sun Jan 18 01:28:08 2015 New Revision: 277308 URL: https://svnweb.freebsd.org/changeset/base/277308 Log: There are still kernel configs and mk files depending on the OFED option. This will need a proper cleanup and in the meantime after r277302 unbreak LINT builds. Modified: head/sys/conf/options Modified: head/sys/conf/options ============================================================================== --- head/sys/conf/options Sat Jan 17 19:57:03 2015 (r277307) +++ head/sys/conf/options Sun Jan 18 01:28:08 2015 (r277308) @@ -908,6 +908,7 @@ FDT opt_platform.h FDT_DTB_STATIC opt_platform.h # OFED Infiniband stack +OFED opt_ofed.h OFED_DEBUG_INIT opt_ofed.h SDP opt_ofed.h SDP_DEBUG opt_ofed.h From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 01:33:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3E81536; Sun, 18 Jan 2015 01:33:55 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A87A6657; Sun, 18 Jan 2015 01:33:55 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 92B3E25D3A92; Sun, 18 Jan 2015 01:33:52 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 754ADC770AE; Sun, 18 Jan 2015 01:33:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id vPWNXj6fAlZq; Sun, 18 Jan 2015 01:33:49 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a] (unknown [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 0A556C7709A; Sun, 18 Jan 2015 01:33:45 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... From: "Bjoern A. Zeeb" In-Reply-To: <201501171636.t0HGadsf039591@svn.freebsd.org> Date: Sun, 18 Jan 2015 01:33:12 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> References: <201501171636.t0HGadsf039591@svn.freebsd.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 01:33:56 -0000 > On 17 Jan 2015, at 16:36 , Hans Petter Selasky = wrote: >=20 > Author: hselasky > Date: Sat Jan 17 16:36:39 2015 > New Revision: 277302 > URL: https://svnweb.freebsd.org/changeset/base/277302 >=20 > Log: > Start importing the basic OFED linux compatibility layer changes made > by dumbbell@ to be able to compile this layer as a dependency module. > Clean up some Makefiles and remove the no longer used OFED define. Build files, NOTES files, .. still referenced the =E2=80=9COFED=E2=80=9D = option. I put it back in for now to unbreak LINT builds. Please = cleanup properly. Can always put it into reviews and find someone to = make sure you caught all places. > Currently only i386 and amd64 targets are supported. >=20 > MFC after: 1 month > Sponsored by: Mellanox Technologies >=20 > Added: > .. > Modified: > .. > head/sys/conf/options > .. > Modified: head/sys/conf/options > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- head/sys/conf/options Sat Jan 17 15:19:18 2015 = (r277301) > +++ head/sys/conf/options Sat Jan 17 16:36:39 2015 = (r277302) > @@ -85,6 +85,7 @@ COMPAT_FREEBSD6 opt_compat.h > COMPAT_FREEBSD7 opt_compat.h > COMPAT_FREEBSD9 opt_compat.h > COMPAT_FREEBSD10 opt_compat.h > +COMPAT_LINUXAPI opt_compat.h On another note: this sounds really strange to me. > COMPILING_LINT opt_global.h > COMPRESS_USER_CORES opt_core.h > CY_PCI_FASTINTR > @@ -907,7 +908,6 @@ FDT opt_platform.h > FDT_DTB_STATIC opt_platform.h >=20 > # OFED Infiniband stack > -OFED opt_ofed.h > OFED_DEBUG_INIT opt_ofed.h > SDP opt_ofed.h > SDP_DEBUG opt_ofed.h >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 01:34:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B93FA675; Sun, 18 Jan 2015 01:34:27 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A55E65E; Sun, 18 Jan 2015 01:34:27 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 5C9BC25D3891; Sun, 18 Jan 2015 01:34:25 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D33EEC7709A; Sun, 18 Jan 2015 01:34:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id 8S2-ZZ2H_xaA; Sun, 18 Jan 2015 01:34:22 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a] (unknown [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 12494C770F0; Sun, 18 Jan 2015 01:34:21 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277285 - head/sys/x86/isa From: "Bjoern A. Zeeb" In-Reply-To: <717DFAD4-3B25-4ED8-A154-E7F91B61C959@bsdimp.com> Date: Sun, 18 Jan 2015 01:34:19 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501170218.t0H2I0AW038857@svn.freebsd.org> <9BA78F3A-C96C-4B51-A6CA-67B15665F511@FreeBSD.org> <717DFAD4-3B25-4ED8-A154-E7F91B61C959@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 01:34:27 -0000 > On 17 Jan 2015, at 23:19 , Warner Losh wrote: >=20 >=20 >> On Jan 17, 2015, at 6:31 AM, Bjoern A. Zeeb wrote: >>=20 >>=20 >>> On 17 Jan 2015, at 02:18 , Warner Losh wrote: >>>=20 >>> Author: imp >>> Date: Sat Jan 17 02:17:59 2015 >>> New Revision: 277285 >>> URL: https://svnweb.freebsd.org/changeset/base/277285 >>>=20 >>> Log: >>> Need to include opt_mca.h to test for DEV_MCA. >>>=20 >>> Modified: >>> head/sys/x86/isa/atpic.c >>=20 >>=20 >> i386 LINT kernels: >>=20 >> /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:376:6: error: use of = undeclared identifier 'MCA_system' >> /scratch/tmp/bz/head.svn/sys/x86/isa/atpic.c:440:6: error: use of = undeclared identifier =E2=80=98MCA_system' >=20 >=20 > I don=E2=80=99t get that far. After =E2=80=98make LINT=E2=80=99 in = i386, I get OFED unknown option=E2=80=A6 Yeah blame r277302 on that ;-) I put it back for now and let hps know but you could also go back to = 277301 and try to fix yours ;-) >=20 > Warner >=20 >>>=20 >>> Modified: head/sys/x86/isa/atpic.c >>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> --- head/sys/x86/isa/atpic.c Sat Jan 17 02:17:57 2015 = (r277284) >>> +++ head/sys/x86/isa/atpic.c Sat Jan 17 02:17:59 2015 = (r277285) >>> @@ -33,6 +33,7 @@ __FBSDID("$FreeBSD$"); >>>=20 >>> #include "opt_auto_eoi.h" >>> #include "opt_isa.h" >>> +#include "opt_mca.h" >>>=20 >>> #include >>> #include >>>=20 >>=20 >> =E2=80=94 >> Bjoern A. Zeeb Charles Haddon = Spurgeon: >> "Friendship is one of the sweetest joys of life. Many might have = failed >> beneath the bitterness of their trial had they not found a friend." >>=20 >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 01:50:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3094ABB0; Sun, 18 Jan 2015 01:50:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1CD7C7B7; Sun, 18 Jan 2015 01:50:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I1oANT099819; Sun, 18 Jan 2015 01:50:10 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I1oAZw099818; Sun, 18 Jan 2015 01:50:10 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501180150.t0I1oAZw099818@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sun, 18 Jan 2015 01:50:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277309 - head/share/examples/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 01:50:11 -0000 Author: neel Date: Sun Jan 18 01:50:10 2015 New Revision: 277309 URL: https://svnweb.freebsd.org/changeset/base/277309 Log: Make the error message explicit instead of just printing the usage if the virtual machine name is not specified. Requested by: grehan MFC after: 1 week Modified: head/share/examples/bhyve/vmrun.sh Modified: head/share/examples/bhyve/vmrun.sh ============================================================================== --- head/share/examples/bhyve/vmrun.sh Sun Jan 18 01:28:08 2015 (r277308) +++ head/share/examples/bhyve/vmrun.sh Sun Jan 18 01:50:10 2015 (r277309) @@ -39,7 +39,13 @@ DEFAULT_CONSOLE=stdio DEFAULT_VIRTIO_DISK="./diskdev" DEFAULT_ISOFILE="./release.iso" +errmsg() { + echo "*** $1" +} + usage() { + local msg=$1 + echo "Usage: vmrun.sh [-ahi] [-c ] [-C ] [-d ]" echo " [-e ] [-g ] [-H ]" echo " [-I ] [-m ]" @@ -58,18 +64,18 @@ usage() { echo " -m: memory size (default is ${DEFAULT_MEMSIZE})" echo " -t: tap device for virtio-net (default is $DEFAULT_TAPDEV)" echo "" - echo " This script needs to be executed with superuser privileges" - echo "" + [ -n "$msg" ] && errmsg "$msg" exit 1 } if [ `id -u` -ne 0 ]; then - usage + errmsg "This script must be executed with superuser privileges" + exit 1 fi kldstat -n vmm > /dev/null 2>&1 if [ $? -ne 0 ]; then - echo "vmm.ko is not loaded!" + errmsg "vmm.ko is not loaded" exit 1 fi @@ -140,7 +146,7 @@ fi shift $((${OPTIND} - 1)) if [ $# -ne 1 ]; then - usage + usage "virtual machine name not specified" fi vmname="$1" From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 03:08:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5950366E; Sun, 18 Jan 2015 03:08:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 444DBE98; Sun, 18 Jan 2015 03:08:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I38Y21037583; Sun, 18 Jan 2015 03:08:34 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I38VJt037565; Sun, 18 Jan 2015 03:08:31 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501180308.t0I38VJt037565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sun, 18 Jan 2015 03:08:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277310 - in head: lib/libvmmapi sys/amd64/include sys/amd64/vmm sys/amd64/vmm/intel usr.sbin/bhyve usr.sbin/bhyvectl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 03:08:34 -0000 Author: neel Date: Sun Jan 18 03:08:30 2015 New Revision: 277310 URL: https://svnweb.freebsd.org/changeset/base/277310 Log: Simplify instruction restart logic in bhyve. Keep track of the next instruction to be executed by the vcpu as 'nextrip'. As a result the VM_RUN ioctl no longer takes the %rip where a vcpu should start execution. Also, instruction restart happens implicitly via 'vm_inject_exception()' or explicitly via 'vm_restart_instruction()'. The APIs behave identically in both kernel and userspace contexts. The main beneficiary is the instruction emulation code that executes in both contexts. bhyve(8) VM exit handlers now treat 'vmexit->rip' and 'vmexit->inst_length' as readonly: - Restarting an instruction is now done by calling 'vm_restart_instruction()' as opposed to setting 'vmexit->inst_length' to 0 (e.g. emulate_inout()) - Resuming vcpu at an arbitrary %rip is now done by setting VM_REG_GUEST_RIP as opposed to changing 'vmexit->rip' (e.g. vmexit_task_switch()) Differential Revision: https://reviews.freebsd.org/D1526 Reviewed by: grehan MFC after: 2 weeks Modified: head/lib/libvmmapi/vmmapi.c head/lib/libvmmapi/vmmapi.h head/sys/amd64/include/vmm_dev.h head/sys/amd64/vmm/intel/vmx.c head/sys/amd64/vmm/vmm.c head/sys/amd64/vmm/vmm_dev.c head/usr.sbin/bhyve/bhyverun.c head/usr.sbin/bhyve/bhyverun.h head/usr.sbin/bhyve/inout.c head/usr.sbin/bhyve/task_switch.c head/usr.sbin/bhyvectl/bhyvectl.c Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/lib/libvmmapi/vmmapi.c Sun Jan 18 03:08:30 2015 (r277310) @@ -368,14 +368,13 @@ vm_get_register(struct vmctx *ctx, int v } int -vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, struct vm_exit *vmexit) +vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit) { int error; struct vm_run vmrun; bzero(&vmrun, sizeof(vmrun)); vmrun.cpuid = vcpu; - vmrun.rip = rip; error = ioctl(ctx->fd, VM_RUN, &vmrun); bcopy(&vmrun.vm_exit, vmexit, sizeof(struct vm_exit)); @@ -399,36 +398,22 @@ vm_reinit(struct vmctx *ctx) return (ioctl(ctx->fd, VM_REINIT, 0)); } -static int -vm_inject_exception_real(struct vmctx *ctx, int vcpu, int vector, - int error_code, int error_code_valid) +int +vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, int errcode_valid, + uint32_t errcode, int restart_instruction) { struct vm_exception exc; - bzero(&exc, sizeof(exc)); exc.cpuid = vcpu; exc.vector = vector; - exc.error_code = error_code; - exc.error_code_valid = error_code_valid; + exc.error_code = errcode; + exc.error_code_valid = errcode_valid; + exc.restart_instruction = restart_instruction; return (ioctl(ctx->fd, VM_INJECT_EXCEPTION, &exc)); } int -vm_inject_exception(struct vmctx *ctx, int vcpu, int vector) -{ - - return (vm_inject_exception_real(ctx, vcpu, vector, 0, 0)); -} - -int -vm_inject_exception2(struct vmctx *ctx, int vcpu, int vector, int errcode) -{ - - return (vm_inject_exception_real(ctx, vcpu, vector, errcode, 1)); -} - -int vm_apicid2vcpu(struct vmctx *ctx, int apicid) { /* @@ -1198,3 +1183,11 @@ vm_rtc_gettime(struct vmctx *ctx, time_t *secs = rtctime.secs; return (error); } + +int +vm_restart_instruction(void *arg, int vcpu) +{ + struct vmctx *ctx = arg; + + return (ioctl(ctx->fd, VM_RESTART_INSTRUCTION, &vcpu)); +} Modified: head/lib/libvmmapi/vmmapi.h ============================================================================== --- head/lib/libvmmapi/vmmapi.h Sun Jan 18 01:50:10 2015 (r277309) +++ head/lib/libvmmapi/vmmapi.h Sun Jan 18 03:08:30 2015 (r277310) @@ -32,6 +32,12 @@ #include #include +/* + * API version for out-of-tree consumers like grub-bhyve for making compile + * time decisions. + */ +#define VMMAPI_VERSION 0101 /* 2 digit major followed by 2 digit minor */ + struct iovec; struct vmctx; enum x2apic_state; @@ -70,13 +76,12 @@ int vm_get_seg_desc(struct vmctx *ctx, i struct seg_desc *seg_desc); int vm_set_register(struct vmctx *ctx, int vcpu, int reg, uint64_t val); int vm_get_register(struct vmctx *ctx, int vcpu, int reg, uint64_t *retval); -int vm_run(struct vmctx *ctx, int vcpu, uint64_t rip, - struct vm_exit *ret_vmexit); +int vm_run(struct vmctx *ctx, int vcpu, struct vm_exit *ret_vmexit); int vm_suspend(struct vmctx *ctx, enum vm_suspend_how how); int vm_reinit(struct vmctx *ctx); int vm_apicid2vcpu(struct vmctx *ctx, int apicid); -int vm_inject_exception(struct vmctx *ctx, int vcpu, int vec); -int vm_inject_exception2(struct vmctx *ctx, int vcpu, int vec, int errcode); +int vm_inject_exception(struct vmctx *ctx, int vcpu, int vector, + int errcode_valid, uint32_t errcode, int restart_instruction); int vm_lapic_irq(struct vmctx *ctx, int vcpu, int vector); int vm_lapic_local_irq(struct vmctx *ctx, int vcpu, int vector); int vm_lapic_msi(struct vmctx *ctx, uint64_t addr, uint64_t msg); Modified: head/sys/amd64/include/vmm_dev.h ============================================================================== --- head/sys/amd64/include/vmm_dev.h Sun Jan 18 01:50:10 2015 (r277309) +++ head/sys/amd64/include/vmm_dev.h Sun Jan 18 03:08:30 2015 (r277310) @@ -54,7 +54,6 @@ struct vm_seg_desc { /* data or code s struct vm_run { int cpuid; - uint64_t rip; /* start running here */ struct vm_exit vm_exit; }; @@ -238,6 +237,7 @@ enum { IOCNUM_LAPIC_MSI = 36, IOCNUM_LAPIC_LOCAL_IRQ = 37, IOCNUM_IOAPIC_PINCOUNT = 38, + IOCNUM_RESTART_INSTRUCTION = 39, /* PCI pass-thru */ IOCNUM_BIND_PPTDEV = 40, @@ -360,4 +360,6 @@ enum { _IOW('v', IOCNUM_RTC_SETTIME, struct vm_rtc_time) #define VM_RTC_GETTIME \ _IOR('v', IOCNUM_RTC_GETTIME, struct vm_rtc_time) +#define VM_RESTART_INSTRUCTION \ + _IOW('v', IOCNUM_RESTART_INSTRUCTION, int) #endif Modified: head/sys/amd64/vmm/intel/vmx.c ============================================================================== --- head/sys/amd64/vmm/intel/vmx.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/sys/amd64/vmm/intel/vmx.c Sun Jan 18 03:08:30 2015 (r277310) @@ -2412,6 +2412,7 @@ vmx_exit_process(struct vmx *vmx, int vc if (vm_mem_allocated(vmx->vm, gpa) || apic_access_fault(vmx, vcpu, gpa)) { vmexit->exitcode = VM_EXITCODE_PAGING; + vmexit->inst_length = 0; vmexit->u.paging.gpa = gpa; vmexit->u.paging.fault_type = ept_fault_type(qual); vmm_stat_incr(vmx->vm, vcpu, VMEXIT_NESTED_FAULT, 1); Modified: head/sys/amd64/vmm/vmm.c ============================================================================== --- head/sys/amd64/vmm/vmm.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/sys/amd64/vmm/vmm.c Sun Jan 18 03:08:30 2015 (r277310) @@ -109,6 +109,7 @@ struct vcpu { uint64_t guest_xcr0; /* (i) guest %xcr0 register */ void *stats; /* (a,i) statistics */ struct vm_exit exitinfo; /* (x) exit reason and collateral */ + uint64_t nextrip; /* (x) next instruction to execute */ }; #define vcpu_lock_initialized(v) mtx_initialized(&((v)->mtx)) @@ -850,16 +851,26 @@ vm_get_register(struct vm *vm, int vcpu, } int -vm_set_register(struct vm *vm, int vcpu, int reg, uint64_t val) +vm_set_register(struct vm *vm, int vcpuid, int reg, uint64_t val) { + struct vcpu *vcpu; + int error; - if (vcpu < 0 || vcpu >= VM_MAXCPU) + if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); if (reg >= VM_REG_LAST) return (EINVAL); - return (VMSETREG(vm->cookie, vcpu, reg, val)); + error = VMSETREG(vm->cookie, vcpuid, reg, val); + if (error || reg != VM_REG_GUEST_RIP) + return (error); + + /* Set 'nextrip' to match the value of %rip */ + VCPU_CTR1(vm, vcpuid, "Setting nextrip to %#lx", val); + vcpu = &vm->vcpu[vcpuid]; + vcpu->nextrip = val; + return (0); } static boolean_t @@ -1199,6 +1210,9 @@ vm_handle_paging(struct vm *vm, int vcpu vcpu = &vm->vcpu[vcpuid]; vme = &vcpu->exitinfo; + KASSERT(vme->inst_length == 0, ("%s: invalid inst_length %d", + __func__, vme->inst_length)); + ftype = vme->u.paging.fault_type; KASSERT(ftype == VM_PROT_READ || ftype == VM_PROT_WRITE || ftype == VM_PROT_EXECUTE, @@ -1224,9 +1238,6 @@ vm_handle_paging(struct vm *vm, int vcpu if (rv != KERN_SUCCESS) return (EFAULT); done: - /* restart execution at the faulting instruction */ - vm_restart_instruction(vm, vcpuid); - return (0); } @@ -1281,10 +1292,13 @@ vm_handle_inst_emul(struct vm *vm, int v return (EFAULT); /* - * If the instruction length is not specified the update it now. + * If the instruction length was not specified then update it now + * along with 'nextrip'. */ - if (vme->inst_length == 0) + if (vme->inst_length == 0) { vme->inst_length = vie->num_processed; + vcpu->nextrip += vie->num_processed; + } /* return to userland unless this is an in-kernel emulated device */ if (gpa >= DEFAULT_APIC_BASE && gpa < DEFAULT_APIC_BASE + PAGE_SIZE) { @@ -1433,7 +1447,7 @@ vm_run(struct vm *vm, struct vm_run *vmr int error, vcpuid; struct vcpu *vcpu; struct pcb *pcb; - uint64_t tscval, rip; + uint64_t tscval; struct vm_exit *vme; bool retu, intr_disabled; pmap_t pmap; @@ -1455,7 +1469,6 @@ vm_run(struct vm *vm, struct vm_run *vmr pmap = vmspace_pmap(vm->vmspace); vcpu = &vm->vcpu[vcpuid]; vme = &vcpu->exitinfo; - rip = vmrun->rip; restart: critical_enter(); @@ -1470,7 +1483,7 @@ restart: restore_guest_fpustate(vcpu); vcpu_require_state(vm, vcpuid, VCPU_RUNNING); - error = VMRUN(vm->cookie, vcpuid, rip, pmap, rptr, sptr); + error = VMRUN(vm->cookie, vcpuid, vcpu->nextrip, pmap, rptr, sptr); vcpu_require_state(vm, vcpuid, VCPU_FROZEN); save_guest_fpustate(vcpu); @@ -1481,6 +1494,7 @@ restart: if (error == 0) { retu = false; + vcpu->nextrip = vme->rip + vme->inst_length; switch (vme->exitcode) { case VM_EXITCODE_SUSPENDED: error = vm_handle_suspend(vm, vcpuid, &retu); @@ -1517,10 +1531,8 @@ restart: } } - if (error == 0 && retu == false) { - rip = vme->rip + vme->inst_length; + if (error == 0 && retu == false) goto restart; - } /* copy the exit information */ bcopy(vme, &vmrun->vm_exit, sizeof(struct vm_exit)); @@ -1530,14 +1542,43 @@ restart: int vm_restart_instruction(void *arg, int vcpuid) { + struct vm *vm; struct vcpu *vcpu; - struct vm *vm = arg; + enum vcpu_state state; + uint64_t rip; + int error; + vm = arg; if (vcpuid < 0 || vcpuid >= VM_MAXCPU) return (EINVAL); vcpu = &vm->vcpu[vcpuid]; - vcpu->exitinfo.inst_length = 0; + state = vcpu_get_state(vm, vcpuid, NULL); + if (state == VCPU_RUNNING) { + /* + * When a vcpu is "running" the next instruction is determined + * by adding 'rip' and 'inst_length' in the vcpu's 'exitinfo'. + * Thus setting 'inst_length' to zero will cause the current + * instruction to be restarted. + */ + vcpu->exitinfo.inst_length = 0; + VCPU_CTR1(vm, vcpuid, "restarting instruction at %#lx by " + "setting inst_length to zero", vcpu->exitinfo.rip); + } else if (state == VCPU_FROZEN) { + /* + * When a vcpu is "frozen" it is outside the critical section + * around VMRUN() and 'nextrip' points to the next instruction. + * Thus instruction restart is achieved by setting 'nextrip' + * to the vcpu's %rip. + */ + error = vm_get_register(vm, vcpuid, VM_REG_GUEST_RIP, &rip); + KASSERT(!error, ("%s: error %d getting rip", __func__, error)); + VCPU_CTR2(vm, vcpuid, "restarting instruction by updating " + "nextrip from %#lx to %#lx", vcpu->nextrip, rip); + vcpu->nextrip = rip; + } else { + panic("%s: invalid state %d", __func__, state); + } return (0); } Modified: head/sys/amd64/vmm/vmm_dev.c ============================================================================== --- head/sys/amd64/vmm/vmm_dev.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/sys/amd64/vmm/vmm_dev.c Sun Jan 18 03:08:30 2015 (r277310) @@ -205,6 +205,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long c case VM_ACTIVATE_CPU: case VM_SET_INTINFO: case VM_GET_INTINFO: + case VM_RESTART_INSTRUCTION: /* * XXX fragile, handle with care * Assumes that the first field of the ioctl data is the vcpu. @@ -506,6 +507,9 @@ vmmdev_ioctl(struct cdev *cdev, u_long c rtctime = (struct vm_rtc_time *)data; rtctime->secs = vrtc_get_time(sc->vm); break; + case VM_RESTART_INSTRUCTION: + error = vm_restart_instruction(sc->vm, vcpu); + break; default: error = ENOTTY; break; Modified: head/usr.sbin/bhyve/bhyverun.c ============================================================================== --- head/usr.sbin/bhyve/bhyverun.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/usr.sbin/bhyve/bhyverun.c Sun Jan 18 03:08:30 2015 (r277310) @@ -185,20 +185,14 @@ vm_inject_fault(void *arg, int vcpu, int int errcode) { struct vmctx *ctx; - int error; + int error, restart_instruction; ctx = arg; - if (errcode_valid) - error = vm_inject_exception2(ctx, vcpu, vector, errcode); - else - error = vm_inject_exception(ctx, vcpu, vector); - assert(error == 0); + restart_instruction = 1; - /* - * Set the instruction length to 0 to ensure that the instruction is - * restarted when the fault handler returns. - */ - vmexit[vcpu].inst_length = 0; + error = vm_inject_exception(ctx, vcpu, vector, errcode_valid, errcode, + restart_instruction); + assert(error == 0); } void * @@ -329,12 +323,6 @@ vmexit_inout(struct vmctx *ctx, struct v } error = emulate_inout(ctx, vcpu, vme, strictio); - if (!error && in && !string) { - error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RAX, - vme->u.inout.eax); - assert(error == 0); - } - if (error) { fprintf(stderr, "Unhandled %s%c 0x%04x\n", in ? "in" : "out", bytes == 1 ? 'b' : (bytes == 2 ? 'w' : 'l'), port); @@ -358,7 +346,7 @@ vmexit_rdmsr(struct vmctx *ctx, struct v vme->u.msr.code, *pvcpu); if (strictmsr) { vm_inject_gp(ctx, *pvcpu); - return (VMEXIT_RESTART); + return (VMEXIT_CONTINUE); } } @@ -384,7 +372,7 @@ vmexit_wrmsr(struct vmctx *ctx, struct v vme->u.msr.code, vme->u.msr.wval, *pvcpu); if (strictmsr) { vm_inject_gp(ctx, *pvcpu); - return (VMEXIT_RESTART); + return (VMEXIT_CONTINUE); } } return (VMEXIT_CONTINUE); @@ -462,9 +450,11 @@ static int vmexit_bogus(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { + assert(vmexit->inst_length == 0); + stats.vmexit_bogus++; - return (VMEXIT_RESTART); + return (VMEXIT_CONTINUE); } static int @@ -494,9 +484,11 @@ static int vmexit_mtrap(struct vmctx *ctx, struct vm_exit *vmexit, int *pvcpu) { + assert(vmexit->inst_length == 0); + stats.vmexit_mtrap++; - return (VMEXIT_RESTART); + return (VMEXIT_CONTINUE); } static int @@ -581,7 +573,7 @@ static vmexit_handler_t handler[VM_EXITC }; static void -vm_loop(struct vmctx *ctx, int vcpu, uint64_t rip) +vm_loop(struct vmctx *ctx, int vcpu, uint64_t startrip) { int error, rc, prevcpu; enum vm_exitcode exitcode; @@ -596,8 +588,11 @@ vm_loop(struct vmctx *ctx, int vcpu, uin error = vm_active_cpus(ctx, &active_cpus); assert(CPU_ISSET(vcpu, &active_cpus)); + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RIP, startrip); + assert(error == 0); + while (1) { - error = vm_run(ctx, vcpu, rip, &vmexit[vcpu]); + error = vm_run(ctx, vcpu, &vmexit[vcpu]); if (error != 0) break; @@ -614,10 +609,6 @@ vm_loop(struct vmctx *ctx, int vcpu, uin switch (rc) { case VMEXIT_CONTINUE: - rip = vmexit[vcpu].rip + vmexit[vcpu].inst_length; - break; - case VMEXIT_RESTART: - rip = vmexit[vcpu].rip; break; case VMEXIT_ABORT: abort(); Modified: head/usr.sbin/bhyve/bhyverun.h ============================================================================== --- head/usr.sbin/bhyve/bhyverun.h Sun Jan 18 01:50:10 2015 (r277309) +++ head/usr.sbin/bhyve/bhyverun.h Sun Jan 18 03:08:30 2015 (r277310) @@ -35,9 +35,8 @@ #define __CTASSERT(x, y) typedef char __assert ## y[(x) ? 1 : -1] #endif -#define VMEXIT_CONTINUE 1 /* continue from next instruction */ -#define VMEXIT_RESTART 2 /* restart current instruction */ -#define VMEXIT_ABORT 3 /* abort the vm run loop */ +#define VMEXIT_CONTINUE (0) +#define VMEXIT_ABORT (-1) struct vmctx; extern int guest_ncpus; Modified: head/usr.sbin/bhyve/inout.c ============================================================================== --- head/usr.sbin/bhyve/inout.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/usr.sbin/bhyve/inout.c Sun Jan 18 03:08:30 2015 (r277310) @@ -104,7 +104,7 @@ int emulate_inout(struct vmctx *ctx, int vcpu, struct vm_exit *vmexit, int strict) { int addrsize, bytes, flags, in, port, prot, rep; - uint32_t val; + uint32_t eax, val; inout_func_t handler; void *arg; int error, retval; @@ -214,16 +214,20 @@ emulate_inout(struct vmctx *ctx, int vcp } /* Restart the instruction if more iterations remain */ - if (retval == 0 && count != 0) - vmexit->inst_length = 0; - } else { - if (!in) { - val = vmexit->u.inout.eax & vie_size2mask(bytes); + if (retval == 0 && count != 0) { + error = vm_restart_instruction(ctx, vcpu); + assert(error == 0); } + } else { + eax = vmexit->u.inout.eax; + val = eax & vie_size2mask(bytes); retval = handler(ctx, vcpu, in, port, bytes, &val, arg); if (retval == 0 && in) { - vmexit->u.inout.eax &= ~vie_size2mask(bytes); - vmexit->u.inout.eax |= val & vie_size2mask(bytes); + eax &= ~vie_size2mask(bytes); + eax |= val & vie_size2mask(bytes); + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RAX, + eax); + assert(error == 0); } } return (retval); Modified: head/usr.sbin/bhyve/task_switch.c ============================================================================== --- head/usr.sbin/bhyve/task_switch.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/usr.sbin/bhyve/task_switch.c Sun Jan 18 03:08:30 2015 (r277310) @@ -725,21 +725,11 @@ vmexit_task_switch(struct vmctx *ctx, st assert(paging->cpu_mode == CPU_MODE_PROTECTED); /* - * Calculate the %eip to store in the old TSS before modifying the - * 'inst_length'. + * Calculate the instruction pointer to store in the old TSS. */ eip = vmexit->rip + vmexit->inst_length; /* - * Set the 'inst_length' to '0'. - * - * If an exception is triggered during emulation of the task switch - * then the exception handler should return to the instruction that - * caused the task switch as opposed to the subsequent instruction. - */ - vmexit->inst_length = 0; - - /* * Section 4.6, "Access Rights" in Intel SDM Vol 3. * The following page table accesses are implicitly supervisor mode: * - accesses to GDT or LDT to load segment descriptors @@ -883,8 +873,8 @@ vmexit_task_switch(struct vmctx *ctx, st * after this point will be handled in the context of the new task and * the saved instruction pointer will belong to the new task. */ - vmexit->rip = newtss.tss_eip; - assert(vmexit->inst_length == 0); + error = vm_set_register(ctx, vcpu, VM_REG_GUEST_RIP, newtss.tss_eip); + assert(error == 0); /* Load processor state from new TSS */ error = tss32_restore(ctx, vcpu, task_switch, ot_sel, &newtss, nt_iov); Modified: head/usr.sbin/bhyvectl/bhyvectl.c ============================================================================== --- head/usr.sbin/bhyvectl/bhyvectl.c Sun Jan 18 01:50:10 2015 (r277309) +++ head/usr.sbin/bhyvectl/bhyvectl.c Sun Jan 18 03:08:30 2015 (r277310) @@ -2118,10 +2118,7 @@ main(int argc, char *argv[]) } if (!error && run) { - error = vm_get_register(ctx, vcpu, VM_REG_GUEST_RIP, &rip); - assert(error == 0); - - error = vm_run(ctx, vcpu, rip, &vmexit); + error = vm_run(ctx, vcpu, &vmexit); if (error == 0) dump_vm_run_exitcode(&vmexit, vcpu); else From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 03:37:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 91266A93; Sun, 18 Jan 2015 03:37:24 +0000 (UTC) Received: from mx1.sbone.de (bird.sbone.de [46.4.1.90]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 187C7142; Sun, 18 Jan 2015 03:37:23 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 8FE0425D3A00; Sun, 18 Jan 2015 03:37:20 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id BA5ADC770AE; Sun, 18 Jan 2015 03:37:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id oQ_rXAa1CVHf; Sun, 18 Jan 2015 03:37:17 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a] (unknown [IPv6:fde9:577b:c1a9:4410:f501:6ee5:ce6a:361a]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 4DAF1C7706F; Sun, 18 Jan 2015 03:37:06 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... From: "Bjoern A. Zeeb" In-Reply-To: <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> Date: Sun, 18 Jan 2015 03:37:00 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501171636.t0HGadsf039591@svn.freebsd.org> <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 03:37:24 -0000 > On 18 Jan 2015, at 01:33 , Bjoern A. Zeeb wrote: >=20 >=20 >> On 17 Jan 2015, at 16:36 , Hans Petter Selasky = wrote: >>=20 >> Author: hselasky >> Date: Sat Jan 17 16:36:39 2015 >> New Revision: 277302 >> URL: https://svnweb.freebsd.org/changeset/base/277302 >>=20 >> Log: >> Start importing the basic OFED linux compatibility layer changes made >> by dumbbell@ to be able to compile this layer as a dependency module. >> Clean up some Makefiles and remove the no longer used OFED define. >=20 > Build files, NOTES files, .. still referenced the =E2=80=9COFED=E2=80=9D= option. I put it back in for now to unbreak LINT builds. Please = cleanup properly. Can always put it into reviews and find someone to = make sure you caught all places. >=20 Ok, never mind: = /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_compat.c:49:= 10: fatal error: 'linux/kobject.h' file not found #include ^ 1 error generated. = /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_pci.c:47:10:= fatal error: 'linux/kobject.h' file not found #include ^ 1 error generated. = /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_idr.c:40:10:= fatal error: 'linux/bitops.h' file not found #include ^ 1 error generated. = /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_radix.c:36:1= 0: fatal error: 'linux/slab.h' file not found #include ^ 1 error generated. mkdep: compile failed --- .depend --- *** [.depend] Error code 1 >> Currently only i386 and amd64 targets are supported. >>=20 >> MFC after: 1 month >> Sponsored by: Mellanox Technologies >>=20 >> Added: >> .. >> Modified: >> .. >> head/sys/conf/options >> .. >=20 >> Modified: head/sys/conf/options >> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >> --- head/sys/conf/options Sat Jan 17 15:19:18 2015 = (r277301) >> +++ head/sys/conf/options Sat Jan 17 16:36:39 2015 = (r277302) >> @@ -85,6 +85,7 @@ COMPAT_FREEBSD6 opt_compat.h >> COMPAT_FREEBSD7 opt_compat.h >> COMPAT_FREEBSD9 opt_compat.h >> COMPAT_FREEBSD10 opt_compat.h >> +COMPAT_LINUXAPI opt_compat.h >=20 > On another note: this sounds really strange to me. >=20 >=20 >> COMPILING_LINT opt_global.h >> COMPRESS_USER_CORES opt_core.h >> CY_PCI_FASTINTR >> @@ -907,7 +908,6 @@ FDT opt_platform.h >> FDT_DTB_STATIC opt_platform.h >>=20 >> # OFED Infiniband stack >> -OFED opt_ofed.h >> OFED_DEBUG_INIT opt_ofed.h >> SDP opt_ofed.h >> SDP_DEBUG opt_ofed.h >>=20 >=20 > =E2=80=94=20 > Bjoern A. Zeeb Charles Haddon = Spurgeon: > "Friendship is one of the sweetest joys of life. Many might have = failed > beneath the bitterness of their trial had they not found a friend." >=20 >=20 =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 03:43:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 78B2CBF1; Sun, 18 Jan 2015 03:43:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 662641EF; Sun, 18 Jan 2015 03:43:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I3hmG1055420; Sun, 18 Jan 2015 03:43:48 GMT (envelope-from imp@FreeBSD.org) Received: (from imp@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I3hm8n055419; Sun, 18 Jan 2015 03:43:48 GMT (envelope-from imp@FreeBSD.org) Message-Id: <201501180343.t0I3hm8n055419@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: imp set sender to imp@FreeBSD.org using -f From: Warner Losh Date: Sun, 18 Jan 2015 03:43:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277311 - head/sys/x86/isa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 03:43:48 -0000 Author: imp Date: Sun Jan 18 03:43:47 2015 New Revision: 277311 URL: https://svnweb.freebsd.org/changeset/base/277311 Log: Include mca_machdep.h. Modified: head/sys/x86/isa/atpic.c Modified: head/sys/x86/isa/atpic.c ============================================================================== --- head/sys/x86/isa/atpic.c Sun Jan 18 03:08:30 2015 (r277310) +++ head/sys/x86/isa/atpic.c Sun Jan 18 03:43:47 2015 (r277311) @@ -58,6 +58,9 @@ __FBSDID("$FreeBSD$"); #include #endif #include +#ifdef DEV_MCA +#include +#endif #ifdef __amd64__ #define SDT_ATPIC SDT_SYSIGT From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 06:43:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2545AFF2; Sun, 18 Jan 2015 06:43:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 060D31FB; Sun, 18 Jan 2015 06:43:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I6h9wj038298; Sun, 18 Jan 2015 06:43:09 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I6h9me038297; Sun, 18 Jan 2015 06:43:09 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501180643.t0I6h9me038297@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 18 Jan 2015 06:43:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277313 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 06:43:10 -0000 Author: gonzo Date: Sun Jan 18 06:43:09 2015 New Revision: 277313 URL: https://svnweb.freebsd.org/changeset/base/277313 Log: Fix programming timing parameters to LCDC. Actual value used for HBP, HFP, HSW, VSW is register's programmed value + 1. Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 18 05:31:26 2015 (r277312) +++ head/sys/arm/ti/am335x/am335x_lcd.c Sun Jan 18 06:43:09 2015 (r277313) @@ -433,6 +433,9 @@ am335x_lcd_attach(device_t dev) uint32_t burst_log; int err; size_t dma_size; + uint32_t hbp, hfp, hsw; + uint32_t vbp, vfp, vsw; + uint32_t width, height; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -527,31 +530,42 @@ am335x_lcd_attach(device_t dev) /* Set timing */ timing0 = timing1 = timing2 = 0; + hbp = panel.panel_hbp - 1; + hfp = panel.panel_hfp - 1; + hsw = panel.panel_hsw - 1; + + vbp = panel.panel_vbp; + vfp = panel.panel_vfp; + vsw = panel.panel_vsw - 1; + + height = panel.panel_height - 1; + width = panel.panel_width - 1; + /* Horizontal back porch */ - timing0 |= (panel.panel_hbp & 0xff) << RASTER_TIMING_0_HBP_SHIFT; - timing2 |= ((panel.panel_hbp >> 8) & 3) << RASTER_TIMING_2_HBPHI_SHIFT; + timing0 |= (hbp & 0xff) << RASTER_TIMING_0_HBP_SHIFT; + timing2 |= ((hbp >> 8) & 3) << RASTER_TIMING_2_HBPHI_SHIFT; /* Horizontal front porch */ - timing0 |= (panel.panel_hfp & 0xff) << RASTER_TIMING_0_HFP_SHIFT; - timing2 |= ((panel.panel_hfp >> 8) & 3) << RASTER_TIMING_2_HFPHI_SHIFT; + timing0 |= (hfp & 0xff) << RASTER_TIMING_0_HFP_SHIFT; + timing2 |= ((hfp >> 8) & 3) << RASTER_TIMING_2_HFPHI_SHIFT; /* Horizontal sync width */ - timing0 |= (panel.panel_hsw & 0x3f) << RASTER_TIMING_0_HSW_SHIFT; - timing2 |= ((panel.panel_hsw >> 6) & 0xf) << RASTER_TIMING_2_HSWHI_SHIFT; + timing0 |= (hsw & 0x3f) << RASTER_TIMING_0_HSW_SHIFT; + timing2 |= ((hsw >> 6) & 0xf) << RASTER_TIMING_2_HSWHI_SHIFT; /* Vertical back porch, front porch, sync width */ - timing1 |= (panel.panel_vbp & 0xff) << RASTER_TIMING_1_VBP_SHIFT; - timing1 |= (panel.panel_vfp & 0xff) << RASTER_TIMING_1_VFP_SHIFT; - timing1 |= (panel.panel_vsw & 0x3f) << RASTER_TIMING_1_VSW_SHIFT; + timing1 |= (vbp & 0xff) << RASTER_TIMING_1_VBP_SHIFT; + timing1 |= (vfp & 0xff) << RASTER_TIMING_1_VFP_SHIFT; + timing1 |= (vsw & 0x3f) << RASTER_TIMING_1_VSW_SHIFT; /* Pixels per line */ - timing0 |= (((panel.panel_width - 1) >> 10) & 1) + timing0 |= ((width >> 10) & 1) << RASTER_TIMING_0_PPLMSB_SHIFT; - timing0 |= (((panel.panel_width - 1) >> 4) & 0x3f) + timing0 |= ((width >> 4) & 0x3f) << RASTER_TIMING_0_PPLLSB_SHIFT; /* Lines per panel */ - timing1 |= ((panel.panel_height - 1) & 0x3ff) + timing1 |= (height & 0x3ff) << RASTER_TIMING_1_LPP_SHIFT; - timing2 |= (((panel.panel_height - 1) >> 10 ) & 1) + timing2 |= ((height >> 10 ) & 1) << RASTER_TIMING_2_LPP_B10_SHIFT; /* clock signal settings */ From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 07:08:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D74BB34A; Sun, 18 Jan 2015 07:08:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C302A3C8; Sun, 18 Jan 2015 07:08:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I787iL048064; Sun, 18 Jan 2015 07:08:07 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I787OL048063; Sun, 18 Jan 2015 07:08:07 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201501180708.t0I787OL048063@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 18 Jan 2015 07:08:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277314 - head/sys/dev/iicbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 07:08:08 -0000 Author: jhibbits Date: Sun Jan 18 07:08:06 2015 New Revision: 277314 URL: https://svnweb.freebsd.org/changeset/base/277314 Log: Use proper signed types. The ADT746x uses signed 8-bit numbers for the temperature. MFC after: 2 weeks Modified: head/sys/dev/iicbus/adt746x.c Modified: head/sys/dev/iicbus/adt746x.c ============================================================================== --- head/sys/dev/iicbus/adt746x.c Sun Jan 18 06:43:09 2015 (r277313) +++ head/sys/dev/iicbus/adt746x.c Sun Jan 18 07:08:06 2015 (r277314) @@ -539,9 +539,10 @@ static int adt746x_sensor_read(struct adt746x_sensor *sens) { struct adt746x_softc *sc; - uint16_t tmp = 0; + int tmp = 0; uint16_t val; - uint8_t temp, data[1], data1[1]; + uint8_t data[1], data1[1]; + int8_t temp; sc = device_get_softc(sens->dev); if (sens->type != ADT746X_SENSOR_SPEED) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 09:47:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 584B8423; Sun, 18 Jan 2015 09:47:46 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14A0D2A2; Sun, 18 Jan 2015 09:47:46 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D711B1FE023; Sun, 18 Jan 2015 10:47:43 +0100 (CET) Message-ID: <54BB8170.7000106@selasky.org> Date: Sun, 18 Jan 2015 10:48:32 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... References: <201501171636.t0HGadsf039591@svn.freebsd.org> <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> In-Reply-To: <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 09:47:46 -0000 On 01/18/15 02:33, Bjoern A. Zeeb wrote: > >> On 17 Jan 2015, at 16:36 , Hans Petter Selasky wrote: >> >> Author: hselasky >> Date: Sat Jan 17 16:36:39 2015 >> New Revision: 277302 >> URL: https://svnweb.freebsd.org/changeset/base/277302 >> >> Log: >> Start importing the basic OFED linux compatibility layer changes made >> by dumbbell@ to be able to compile this layer as a dependency module. >> Clean up some Makefiles and remove the no longer used OFED define. > > Build files, NOTES files, .. still referenced the “OFED” option. I put it back in for now to unbreak LINT builds. Please cleanup properly. Can always put it into reviews and find someone to make sure you caught all places. > OK, then I need to do a universe build simply. --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 09:49:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E533565; Sun, 18 Jan 2015 09:49:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0DABF2B5; Sun, 18 Jan 2015 09:49:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0I9nXgs023055; Sun, 18 Jan 2015 09:49:33 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0I9nXHl023048; Sun, 18 Jan 2015 09:49:33 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501180949.t0I9nXHl023048@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Jan 2015 09:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277315 - stable/10/sys/x86/iommu X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 09:49:34 -0000 Author: kib Date: Sun Jan 18 09:49:32 2015 New Revision: 277315 URL: https://svnweb.freebsd.org/changeset/base/277315 Log: MFC r277023: Avoid excessive flushing and do missed neccessary flushing in the IOMMU page table update code. Modified: stable/10/sys/x86/iommu/intel_ctx.c stable/10/sys/x86/iommu/intel_dmar.h stable/10/sys/x86/iommu/intel_idpgtbl.c stable/10/sys/x86/iommu/intel_utils.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/iommu/intel_ctx.c ============================================================================== --- stable/10/sys/x86/iommu/intel_ctx.c Sun Jan 18 07:08:06 2015 (r277314) +++ stable/10/sys/x86/iommu/intel_ctx.c Sun Jan 18 09:49:32 2015 (r277315) @@ -96,7 +96,8 @@ dmar_ensure_ctx_page(struct dmar_unit *d re += bus; dmar_pte_store(&re->r1, DMAR_ROOT_R1_P | (DMAR_ROOT_R1_CTP_MASK & VM_PAGE_TO_PHYS(ctxm))); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_flush_root_to_ram(dmar, re); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; } @@ -153,6 +154,7 @@ ctx_id_entry_init(struct dmar_ctx *ctx, (DMAR_CTX1_ASR_MASK & VM_PAGE_TO_PHYS(ctx_root)) | DMAR_CTX1_P); } + dmar_flush_ctx_to_ram(unit, ctxp); } static int @@ -358,7 +360,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev ctx->domain = alloc_unrl(dmar->domids); if (ctx->domain == -1) { DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf, true); + dmar_unmap_pgtbl(sf); dmar_ctx_dtr(ctx, true, true); TD_PINNED_ASSERT; return (NULL); @@ -383,7 +385,7 @@ dmar_get_ctx(struct dmar_unit *dmar, dev } else { dmar_ctx_dtr(ctx1, true, true); } - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); } ctx->refs++; if ((ctx->flags & DMAR_CTX_RMRR) != 0) @@ -474,7 +476,7 @@ dmar_free_ctx_locked(struct dmar_unit *d if (ctx->refs > 1) { ctx->refs--; DMAR_UNLOCK(dmar); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; return; } @@ -490,6 +492,7 @@ dmar_free_ctx_locked(struct dmar_unit *d */ dmar_pte_clear(&ctxp->ctx1); ctxp->ctx2 = 0; + dmar_flush_ctx_to_ram(dmar, ctxp); dmar_inv_ctx_glob(dmar); if ((dmar->hw_ecap & DMAR_ECAP_DI) != 0) { if (dmar->qi_enabled) @@ -507,7 +510,7 @@ dmar_free_ctx_locked(struct dmar_unit *d taskqueue_drain(dmar->delayed_taskqueue, &ctx->unload_task); KASSERT(TAILQ_EMPTY(&ctx->unload_entries), ("unfinished unloads %p", ctx)); - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(dmar)); + dmar_unmap_pgtbl(sf); free_unr(dmar->domids, ctx->domain); dmar_ctx_dtr(ctx, true, true); TD_PINNED_ASSERT; Modified: stable/10/sys/x86/iommu/intel_dmar.h ============================================================================== --- stable/10/sys/x86/iommu/intel_dmar.h Sun Jan 18 07:08:06 2015 (r277314) +++ stable/10/sys/x86/iommu/intel_dmar.h Sun Jan 18 09:49:32 2015 (r277315) @@ -230,11 +230,14 @@ struct vm_page *dmar_pgalloc(vm_object_t void dmar_pgfree(vm_object_t obj, vm_pindex_t idx, int flags); void *dmar_map_pgtbl(vm_object_t obj, vm_pindex_t idx, int flags, struct sf_buf **sf); -void dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent); +void dmar_unmap_pgtbl(struct sf_buf *sf); int dmar_load_root_entry_ptr(struct dmar_unit *unit); int dmar_inv_ctx_glob(struct dmar_unit *unit); int dmar_inv_iotlb_glob(struct dmar_unit *unit); int dmar_flush_write_bufs(struct dmar_unit *unit); +void dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst); +void dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst); +void dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst); int dmar_enable_translation(struct dmar_unit *unit); int dmar_disable_translation(struct dmar_unit *unit); bool dmar_barrier_enter(struct dmar_unit *dmar, u_int barrier_id); Modified: stable/10/sys/x86/iommu/intel_idpgtbl.c ============================================================================== --- stable/10/sys/x86/iommu/intel_idpgtbl.c Sun Jan 18 07:08:06 2015 (r277314) +++ stable/10/sys/x86/iommu/intel_idpgtbl.c Sun Jan 18 09:49:32 2015 (r277315) @@ -146,7 +146,7 @@ ctx_idmap_nextlvl(struct idpgtbl *tbl, i } } /* ctx_get_idmap_pgtbl flushes CPU cache if needed. */ - dmar_unmap_pgtbl(sf, true); + dmar_unmap_pgtbl(sf); VM_OBJECT_WLOCK(tbl->pgtbl_obj); } @@ -361,7 +361,7 @@ ctx_pgtbl_map_pte(struct dmar_ctx *ctx, pte = (dmar_pte_t *)sf_buf_kva(*sf); } else { if (*sf != NULL) - dmar_unmap_pgtbl(*sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(*sf); *idxp = idx; retry: pte = dmar_map_pgtbl(ctx->pgtbl_obj, idx, flags, sf); @@ -397,9 +397,10 @@ retry: } dmar_pte_store(&ptep->pte, DMAR_PTE_R | DMAR_PTE_W | VM_PAGE_TO_PHYS(m)); + dmar_flush_pte_to_ram(ctx->dmar, ptep); sf_buf_page(sfp)->wire_count += 1; m->wire_count--; - dmar_unmap_pgtbl(sfp, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sfp); /* Only executed once. */ goto retry; } @@ -467,20 +468,19 @@ ctx_map_buf_locked(struct dmar_ctx *ctx, if (pte == NULL) { KASSERT((flags & DMAR_PGF_WAITOK) == 0, ("failed waitable pte alloc %p", ctx)); - if (sf != NULL) { - dmar_unmap_pgtbl(sf, - DMAR_IS_COHERENT(ctx->dmar)); - } + if (sf != NULL) + dmar_unmap_pgtbl(sf); ctx_unmap_buf_locked(ctx, base1, base - base1, flags); TD_PINNED_ASSERT; return (ENOMEM); } dmar_pte_store(&pte->pte, VM_PAGE_TO_PHYS(ma[pi]) | pflags | (superpage ? DMAR_PTE_SP : 0)); + dmar_flush_pte_to_ram(ctx->dmar, pte); sf_buf_page(sf)->wire_count += 1; } if (sf != NULL) - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sf); TD_PINNED_ASSERT; return (0); } @@ -567,9 +567,10 @@ ctx_unmap_clear_pte(struct dmar_ctx *ctx vm_page_t m; dmar_pte_clear(&pte->pte); + dmar_flush_pte_to_ram(ctx->dmar, pte); m = sf_buf_page(*sf); if (free_sf) { - dmar_unmap_pgtbl(*sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(*sf); *sf = NULL; } m->wire_count--; @@ -651,7 +652,7 @@ ctx_unmap_buf_locked(struct dmar_ctx *ct (uintmax_t)base, (uintmax_t)size, (uintmax_t)pg_sz)); } if (sf != NULL) - dmar_unmap_pgtbl(sf, DMAR_IS_COHERENT(ctx->dmar)); + dmar_unmap_pgtbl(sf); /* * See 11.1 Write Buffer Flushing for an explanation why RWBF * can be ignored there. Modified: stable/10/sys/x86/iommu/intel_utils.c ============================================================================== --- stable/10/sys/x86/iommu/intel_utils.c Sun Jan 18 07:08:06 2015 (r277314) +++ stable/10/sys/x86/iommu/intel_utils.c Sun Jan 18 09:49:32 2015 (r277315) @@ -351,20 +351,46 @@ dmar_map_pgtbl(vm_object_t obj, vm_pinde } void -dmar_unmap_pgtbl(struct sf_buf *sf, bool coherent) +dmar_unmap_pgtbl(struct sf_buf *sf) { - vm_page_t m; - m = sf_buf_page(sf); sf_buf_free(sf); sched_unpin(); +} + +static void +dmar_flush_transl_to_ram(struct dmar_unit *unit, void *dst, size_t sz) +{ + if (DMAR_IS_COHERENT(unit)) + return; /* * If DMAR does not snoop paging structures accesses, flush * CPU cache to memory. */ - if (!coherent) - pmap_invalidate_cache_pages(&m, 1); + pmap_invalidate_cache_range((uintptr_t)dst, (uintptr_t)dst + sz, + TRUE); +} + +void +dmar_flush_pte_to_ram(struct dmar_unit *unit, dmar_pte_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); +} + +void +dmar_flush_ctx_to_ram(struct dmar_unit *unit, dmar_ctx_entry_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); +} + +void +dmar_flush_root_to_ram(struct dmar_unit *unit, dmar_root_entry_t *dst) +{ + + dmar_flush_transl_to_ram(unit, dst, sizeof(*dst)); } /* From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 09:50:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC3D4690; Sun, 18 Jan 2015 09:50:04 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 786D22BF; Sun, 18 Jan 2015 09:50:04 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9137A1FE023; Sun, 18 Jan 2015 10:50:02 +0100 (CET) Message-ID: <54BB81FC.3030501@selasky.org> Date: Sun, 18 Jan 2015 10:50:52 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... References: <201501171636.t0HGadsf039591@svn.freebsd.org> <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 09:50:04 -0000 On 01/18/15 04:37, Bjoern A. Zeeb wrote: > >> On 18 Jan 2015, at 01:33 , Bjoern A. Zeeb wrote: >> >> >>> On 17 Jan 2015, at 16:36 , Hans Petter Selasky wrote: >>> >>> Author: hselasky >>> Date: Sat Jan 17 16:36:39 2015 >>> New Revision: 277302 >>> URL: https://svnweb.freebsd.org/changeset/base/277302 >>> >>> Log: >>> Start importing the basic OFED linux compatibility layer changes made >>> by dumbbell@ to be able to compile this layer as a dependency module. >>> Clean up some Makefiles and remove the no longer used OFED define. >> >> Build files, NOTES files, .. still referenced the “OFED” option. I put it back in for now to unbreak LINT builds. Please cleanup properly. Can always put it into reviews and find someone to make sure you caught all places. >> > > Ok, never mind: > > /home/baz21/SVN/head-reviews.svn/sys/ofed/include/linux/linux_compat.c:49:10: fatal error: 'linux/kobject.h' file not found > #include > ^ > 1 error generated. I'll fix it. --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 10:53:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CDC495C; Sun, 18 Jan 2015 10:53:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87A5FADA; Sun, 18 Jan 2015 10:53:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IArnrW059397; Sun, 18 Jan 2015 10:53:49 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IArnjd059396; Sun, 18 Jan 2015 10:53:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501181053.t0IArnjd059396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jan 2015 10:53:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277316 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 10:53:49 -0000 Author: hselasky Date: Sun Jan 18 10:53:48 2015 New Revision: 277316 URL: https://svnweb.freebsd.org/changeset/base/277316 Log: Extend fixes made in r277308 to fix build of LINT kernels for i386 and amd64. Until further we need some custom C-flags when building the Linux compat API. MFC after: 1 month Sponsored by: Mellanox Technologies Reported by: bz@ Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 18 09:49:32 2015 (r277315) +++ head/sys/conf/files Sun Jan 18 10:53:48 2015 (r277316) @@ -3572,11 +3572,16 @@ nlm/nlm_prot_xdr.c optional nfslockd | nlm/sm_inter_xdr.c optional nfslockd | nfsd # Linux Kernel Compatibility API -ofed/include/linux/linux_kmod.c optional ofed | compat_linuxapi -ofed/include/linux/linux_compat.c optional ofed | compat_linuxapi -ofed/include/linux/linux_pci.c optional ofed | compat_linuxapi -ofed/include/linux/linux_idr.c optional ofed | compat_linuxapi -ofed/include/linux/linux_radix.c optional ofed | compat_linuxapi +ofed/include/linux/linux_kmod.c optional ofed | compat_linuxapi \ + no-depend compile-with "${OFED_C}" +ofed/include/linux/linux_compat.c optional ofed | compat_linuxapi \ + no-depend compile-with "${OFED_C}" +ofed/include/linux/linux_pci.c optional ofed | compat_linuxapi \ + no-depend compile-with "${OFED_C}" +ofed/include/linux/linux_idr.c optional ofed | compat_linuxapi \ + no-depend compile-with "${OFED_C}" +ofed/include/linux/linux_radix.c optional ofed | compat_linuxapi \ + no-depend compile-with "${OFED_C}" # OpenFabrics Enterprise Distribution (Infiniband) ofed/drivers/infiniband/core/addr.c optional ofed \ no-depend \ From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 10:54:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 107B9A99; Sun, 18 Jan 2015 10:54:18 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C116ADF; Sun, 18 Jan 2015 10:54:17 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0IAsASh080577 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Jan 2015 12:54:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0IAsASh080577 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0IAsAYd080576; Sun, 18 Jan 2015 12:54:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Jan 2015 12:54:10 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150118105410.GN42409@kib.kiev.ua> References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> <20150116080332.GE42409@kib.kiev.ua> <54B8D31B.9030805@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54B8D31B.9030805@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 10:54:18 -0000 On Fri, Jan 16, 2015 at 10:00:11AM +0100, Hans Petter Selasky wrote: > Hi Konstantin, > > On 01/16/15 09:03, Konstantin Belousov wrote: > > My opinion is that you should have tried to handle the issue at the driver > > level, instead of making this devfs issue. I.e., if you already have > > cdev node with the correct name, driver should have replaced the private > > data to point to new device. > > I think this way cannot be implemented in a clean way, because of > locking order reversal. And if you try to avoid the LOR you end up with > the race. Chess mate sort of ;-) Let me explain: > > Thread 1: > usb_sx_lock(); > cdev = Look in freelist for existing device(); > else > cdev = make_dev(); > usb_sx_unlock(); > > Thread 2: > usb_sx_lock(); > put cdev on freelist > usb_sx_unlock(); > > Thread 3: > usb_sx_lock(); > cdev = remove first entry in freelist > usb_sx_unlock(); > > /* > * XXX because USB needs to call destroy_dev() unlocked we > * are racing with Thread 1 again > */ > destroy_dev(cdev); I do not understand the 'freelist' part. You have some usb (or whatever other kind) device, which is represented by some data structure. This data structure references cdev. In reverse, cdev points to this data structure by si_drv1 or similar driver-owned member of struct cdev. The structures naming usb devices have some mapping to/from usb bus addresses. When device is destroyed or created due to external plug event, there is some mechanism that ensures mapping consistence. It could be lock, it could be single-threaded process which discover the bus, or something else, I do not know. While the structure notes that device with some address goes out and comes in, it can look up the corresponding cdev and just change the si_drv1 pointer to point to the new device. I find it very strange that you need sleepless operation which can _both_ destroy and create cdev. At least one operation of creation or destruction must sleep, at least in the current devfs design. It could be made sleepless, by making VFS visible part even less connected to the cdev part, but this is not how it (can) currently work. > > > > > This would also close a window where /dev node is non-existent or operate > > erronously. > > I'm not saying I plan so, but I think "cdevs" at some point need to > understand mutexes and locks. That means like with other API's in the > kernel we can associate a lock with the "cdev", and this lock is then > used to ensure an atomic shutdown of the system in a non-blocking > fashion. In my past experience multithreaded APIs should be high level > implemented like this: > > NON-BLOCKING methods: > lock(); ** > xxx_start(); > xxx_stop(); > unlock(); > > BLOCKING methods: > setup(); // init > unsetup(); // drain > > Any callbacks should always be called locked ** > > In devfs there was no non-blocking stop before I added the delist_dev() > function. > > > > > You do not understand my point. > > > > I object against imposing one additional global reference on all cdevs > > just to cope with the delist hack. See the patch at the end of the message. > > It's fine by me. > > > > WRT destroy_dev_sched_cb() calling delist_dev(), even after calling > > delist_dev(), the node still exists in the /dev. It is only removed > > after populate loop is run sometime later. dev_sched() KPI is inheritly > > racy, drivers must handle the races for other reasons. > > The populate loop is all running under the dev_lock() from what I can > see and make_dev() is also keeping the same lock when inserting and > removing new cdevs. The populate loop should always give a consistent No, populate loop is not run under dev_mtx. It would not be able to allocate memory, even in M_NOWAIT fashion. The dev_mtx is after the vm and vnode locks. Only iteration over the cdevp_list is protected by dev_mtx, which is dropped right after something which require an action, is found on the list. Populate() needs some way to avoid reading inconsistent data from the cdev layer, but there is not guarantee that we are always up to date. > view of the character devices available, and I don't see how "cdev" > structures without the CDP_ACTIVE flag can appear with recently created > ones, even if the name is the same. It cannot simply because it is not synchronized with the device creation/destruction. > > > > >> > >>> Entry can be random, since after the populate loop is ran, your code in > >>> other thread could start and create duplicate entry. There is a window > >>> in the lookup where both directory vnode lock and mount point sx locks > >>> are dropped. So running the populate does not guarantee anything. > >> > >> If there is such a race, it is already there! My patch changes nothing > >> in that area: > >> > >> Thread1: > >> Calls destroy_dev() and clears CDP_ACTIVE, after dev_unlock() it goes > >> waiting for some refs for xxx milliseconds. > >> Thread2: > >> Tries to create create a new character device having the same name like > >> the one in thread1. Device name duplication check is missed because > >> CDP_ACTIVE is cleared. Still thread1 is waiting. > >> Thread3: > >> Tries to open character device created by thread2 while thread1 is still > >> waiting for some ref held by a userspace app to go away. > >> > >> This can happen already before my patches! What do you think? > > Possibly. > > > > > >> At what level do you mean duplicate names, I don't get this fully? At > >> the directory level (DE nodes)? Or inside the list of character devices > >> (LIST_XXX)? > > It does not matter, dup at either one directory level, or dup of full > > names in the global list are equivalent (bad) things. > > Like I write above I don't see where the problem is. At the cdev level, > we are protecting the cdev's LIST with dev_lock() and only one entry > will exist having CDP_ACTIVE bit set per unique cdev name and path. Else > we will hit a panic in make_dev() and friends. > > In the directory entry level the populate loop will also ensure a > consistent view, and hence the cdev's LIST is consistent, the view > presented to userspace will also be consistent. Lookup (or any other VFS-level code) is not protected by dev_mtx, it is only dm lock which ensures that populate loop is not run in parallel, modifying direntries. > > That system functions can still call into the dangling read/write/ioctl > functions is another story, and that is why I tell, that in order to > simplify this teardown, we possibly should associate a client selectable > lock with each CDEV, for teardown purposes. Like done for several years > in the callout and USB APIs and possibly many other places. There is d_purge method which provides the tear-down semantic for drivers which needs it. Only tty uses the method AFAIK. Devfs ensures that no client code is active when cdev is removed for real. > > > > >> > >>> Let me summarize: > >>> - the extra reference on arbitrary cdev should be eliminated. The > >>> delist_dev_locked() may add the ref and set some CDP_ flag to > >>> indicate to destroy_dev() that it should do dev_rel(). > >> > >> It is possible to do this. I thought about this before doing my patch, > >> but decided to try to avoid adding yet another cdev flag. > >> > >>> - the existence of the duplicated entries should be either eliminated > >>> (I am not sure it is possible with your code), or we must ensure > >>> that only one name with CDP_ACTIVE flag set and given name exists. > >>> Then, all lookup code must be audited to take CDP_ACTIVE into account > >>> when accessing names. I see at least devfs_find() and devfs_mknod() > >>> which must be changed. I did not performed full audit. > >> > >> I will check this path out aswell. > >> > > > > It seems it is simpler for me to try to clean up after the commit. > > The patch was only lightly tested. I post the patch for discussion, > > not for you to committing it. I will expedite the change into HEAD > > after the consensus on it is made and adequate testing is performed. > > I don't see any problems about your patch, except it adds a bit more > code to the kernel. From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 10:54:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12E36BCF; Sun, 18 Jan 2015 10:54:29 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C58E4AE1; Sun, 18 Jan 2015 10:54:28 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EFEF21FE023; Sun, 18 Jan 2015 11:54:26 +0100 (CET) Message-ID: <54BB9114.9010200@selasky.org> Date: Sun, 18 Jan 2015 11:55:16 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... References: <201501171636.t0HGadsf039591@svn.freebsd.org> <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> <54BB81FC.3030501@selasky.org> In-Reply-To: <54BB81FC.3030501@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 10:54:29 -0000 See r277316. Thank you! --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 11:07:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 25332E60; Sun, 18 Jan 2015 11:07:40 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF076BDE; Sun, 18 Jan 2015 11:07:39 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3E96B1FE023; Sun, 18 Jan 2015 12:07:36 +0100 (CET) Message-ID: <54BB942A.5070200@selasky.org> Date: Sun, 18 Jan 2015 12:08:26 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <201501142207.t0EM7Dfn041543@svn.freebsd.org> <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> <20150116080332.GE42409@kib.kiev.ua> <54B8D31B.9030805@selasky.org> <20150118105410.GN42409@kib.kiev.ua> In-Reply-To: <20150118105410.GN42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 11:07:40 -0000 Hi Konstantin, On 01/18/15 11:54, Konstantin Belousov wrote: > On Fri, Jan 16, 2015 at 10:00:11AM +0100, Hans Petter Selasky wrote: >> Hi Konstantin, >> >> On 01/16/15 09:03, Konstantin Belousov wrote: >>> My opinion is that you should have tried to handle the issue at the driver >>> level, instead of making this devfs issue. I.e., if you already have >>> cdev node with the correct name, driver should have replaced the private >>> data to point to new device. >> >> I think this way cannot be implemented in a clean way, because of >> locking order reversal. And if you try to avoid the LOR you end up with >> the race. Chess mate sort of ;-) Let me explain: >> >> Thread 1: >> usb_sx_lock(); >> cdev = Look in freelist for existing device(); >> else >> cdev = make_dev(); >> usb_sx_unlock(); >> >> Thread 2: >> usb_sx_lock(); >> put cdev on freelist >> usb_sx_unlock(); >> >> Thread 3: >> usb_sx_lock(); >> cdev = remove first entry in freelist >> usb_sx_unlock(); >> >> /* >> * XXX because USB needs to call destroy_dev() unlocked we >> * are racing with Thread 1 again >> */ >> destroy_dev(cdev); > I do not understand the 'freelist' part. > > You have some usb (or whatever other kind) device, which is represented by > some data structure. This data structure references cdev. In reverse, > cdev points to this data structure by si_drv1 or similar driver-owned > member of struct cdev. > > The structures naming usb devices have some mapping to/from usb bus addresses. > When device is destroyed or created due to external plug event, there is > some mechanism that ensures mapping consistence. It could be lock, it > could be single-threaded process which discover the bus, or something > else, I do not know. > > While the structure notes that device with some address goes out and comes > in, it can look up the corresponding cdev and just change the si_drv1 pointer > to point to the new device. What about events for "devd" that a new character devices is present in the system or being destroyed for user-space applications? > > I find it very strange that you need sleepless operation which can > _both_ destroy and create cdev. At least one operation of creation or > destruction must sleep, at least in the current devfs design. It could > be made sleepless, by making VFS visible part even less connected to the > cdev part, but this is not how it (can) currently work. I think it would be good practice that all resources needed for creating a character device can be allocated prior to registration. That means we first should allocate all resources needed, but not register as a single function. For example: Once make_dev() has returned, we can get an "d_open" callback. But "si_drv1/2" is always set by drivers _after_ that "make_dev()" has returned! This causes a race we could simply avoid by splitting the make_dev() like I suggest. Instead of putting more logic and code inside the drivers to handle the race! >> >>> >>> This would also close a window where /dev node is non-existent or operate >>> erronously. >> >> I'm not saying I plan so, but I think "cdevs" at some point need to >> understand mutexes and locks. That means like with other API's in the >> kernel we can associate a lock with the "cdev", and this lock is then >> used to ensure an atomic shutdown of the system in a non-blocking >> fashion. In my past experience multithreaded APIs should be high level >> implemented like this: >> >> NON-BLOCKING methods: >> lock(); ** >> xxx_start(); >> xxx_stop(); >> unlock(); >> >> BLOCKING methods: >> setup(); // init >> unsetup(); // drain >> >> Any callbacks should always be called locked ** >> >> In devfs there was no non-blocking stop before I added the delist_dev() >> function. >> >>> >>> You do not understand my point. >>> >>> I object against imposing one additional global reference on all cdevs >>> just to cope with the delist hack. See the patch at the end of the message. >> >> It's fine by me. >>> >>> WRT destroy_dev_sched_cb() calling delist_dev(), even after calling >>> delist_dev(), the node still exists in the /dev. It is only removed >>> after populate loop is run sometime later. dev_sched() KPI is inheritly >>> racy, drivers must handle the races for other reasons. >> >> The populate loop is all running under the dev_lock() from what I can >> see and make_dev() is also keeping the same lock when inserting and >> removing new cdevs. The populate loop should always give a consistent > No, populate loop is not run under dev_mtx. Are you sure: > static int > devfs_populate_loop(struct devfs_mount *dm, int cleanup) > { > struct cdev_priv *cdp; > struct devfs_dirent *de; > struct devfs_dirent *dd, *dt; > struct cdev *pdev; > int de_flags, depth, j; > char *q, *s; > > sx_assert(&dm->dm_lock, SX_XLOCKED); > dev_lock(); ^^^^ what is this ? > TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) { > It would not be able to > allocate memory, even in M_NOWAIT fashion. The dev_mtx is after the > vm and vnode locks. Only iteration over the cdevp_list is protected by > dev_mtx, which is dropped right after something which require an > action, is found on the list. Populate() needs some way to avoid > reading inconsistent data from the cdev layer, but there is not > guarantee that we are always up to date. > >> view of the character devices available, and I don't see how "cdev" >> structures without the CDP_ACTIVE flag can appear with recently created >> ones, even if the name is the same. > It cannot simply because it is not synchronized with the device > creation/destruction. > Lookup (or any other VFS-level code) is not protected by dev_mtx, it > is only dm lock which ensures that populate loop is not run in parallel, > modifying direntries. See comment above. > >> >> That system functions can still call into the dangling read/write/ioctl >> functions is another story, and that is why I tell, that in order to >> simplify this teardown, we possibly should associate a client selectable >> lock with each CDEV, for teardown purposes. Like done for several years >> in the callout and USB APIs and possibly many other places. > There is d_purge method which provides the tear-down semantic for > drivers which needs it. Only tty uses the method AFAIK. > > Devfs ensures that no client code is active when cdev is removed for real. --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 11:32:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B40514; Sun, 18 Jan 2015 11:32:01 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2872EE4F; Sun, 18 Jan 2015 11:32:00 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0IBVprB089472 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 18 Jan 2015 13:31:51 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0IBVprB089472 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0IBVp81089471; Sun, 18 Jan 2015 13:31:51 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 18 Jan 2015 13:31:51 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern Message-ID: <20150118113150.GQ42409@kib.kiev.ua> References: <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> <20150116080332.GE42409@kib.kiev.ua> <54B8D31B.9030805@selasky.org> <20150118105410.GN42409@kib.kiev.ua> <54BB942A.5070200@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BB942A.5070200@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 11:32:01 -0000 On Sun, Jan 18, 2015 at 12:08:26PM +0100, Hans Petter Selasky wrote: > Hi Konstantin, > > On 01/18/15 11:54, Konstantin Belousov wrote: > > On Fri, Jan 16, 2015 at 10:00:11AM +0100, Hans Petter Selasky wrote: > >> Hi Konstantin, > >> > >> On 01/16/15 09:03, Konstantin Belousov wrote: > >>> My opinion is that you should have tried to handle the issue at the driver > >>> level, instead of making this devfs issue. I.e., if you already have > >>> cdev node with the correct name, driver should have replaced the private > >>> data to point to new device. > >> > >> I think this way cannot be implemented in a clean way, because of > >> locking order reversal. And if you try to avoid the LOR you end up with > >> the race. Chess mate sort of ;-) Let me explain: > >> > >> Thread 1: > >> usb_sx_lock(); > >> cdev = Look in freelist for existing device(); > >> else > >> cdev = make_dev(); > >> usb_sx_unlock(); > >> > >> Thread 2: > >> usb_sx_lock(); > >> put cdev on freelist > >> usb_sx_unlock(); > >> > >> Thread 3: > >> usb_sx_lock(); > >> cdev = remove first entry in freelist > >> usb_sx_unlock(); > >> > >> /* > >> * XXX because USB needs to call destroy_dev() unlocked we > >> * are racing with Thread 1 again > >> */ > >> destroy_dev(cdev); > > I do not understand the 'freelist' part. > > > > You have some usb (or whatever other kind) device, which is represented by > > some data structure. This data structure references cdev. In reverse, > > cdev points to this data structure by si_drv1 or similar driver-owned > > member of struct cdev. > > > > The structures naming usb devices have some mapping to/from usb bus addresses. > > When device is destroyed or created due to external plug event, there is > > some mechanism that ensures mapping consistence. It could be lock, it > > could be single-threaded process which discover the bus, or something > > else, I do not know. > > > > While the structure notes that device with some address goes out and comes > > in, it can look up the corresponding cdev and just change the si_drv1 pointer > > to point to the new device. > > What about events for "devd" that a new character devices is present in > the system or being destroyed for user-space applications? It is up to the driver to decide. If wanted, it could post the pair of destroy/create itself (e.g., if there is some state which require the userspace to reset), or it could decide not to. The later is reasonable if the destroy/create is believed to be caused by a glitch rather than the actual replug. > > > > > I find it very strange that you need sleepless operation which can > > _both_ destroy and create cdev. At least one operation of creation or > > destruction must sleep, at least in the current devfs design. It could > > be made sleepless, by making VFS visible part even less connected to the > > cdev part, but this is not how it (can) currently work. > > I think it would be good practice that all resources needed for creating > a character device can be allocated prior to registration. That means we > first should allocate all resources needed, but not register as a single > function. > > For example: > > Once make_dev() has returned, we can get an "d_open" callback. But > "si_drv1/2" is always set by drivers _after_ that "make_dev()" has > returned! This causes a race we could simply avoid by splitting the > make_dev() like I suggest. Instead of putting more logic and code inside > the drivers to handle the race! I wanted to tunnel the si_drv values through the make_dev(). I.e. there could appear yet another variant of make_dev() which takes the initialization parameters for the si_* driver vars. I just did not have time/motivation to do the pass. > > >> > >>> > >>> This would also close a window where /dev node is non-existent or operate > >>> erronously. > >> > >> I'm not saying I plan so, but I think "cdevs" at some point need to > >> understand mutexes and locks. That means like with other API's in the > >> kernel we can associate a lock with the "cdev", and this lock is then > >> used to ensure an atomic shutdown of the system in a non-blocking > >> fashion. In my past experience multithreaded APIs should be high level > >> implemented like this: > >> > >> NON-BLOCKING methods: > >> lock(); ** > >> xxx_start(); > >> xxx_stop(); > >> unlock(); > >> > >> BLOCKING methods: > >> setup(); // init > >> unsetup(); // drain > >> > >> Any callbacks should always be called locked ** > >> > >> In devfs there was no non-blocking stop before I added the delist_dev() > >> function. > >> > >>> > >>> You do not understand my point. > >>> > >>> I object against imposing one additional global reference on all cdevs > >>> just to cope with the delist hack. See the patch at the end of the message. > >> > >> It's fine by me. > >>> > >>> WRT destroy_dev_sched_cb() calling delist_dev(), even after calling > >>> delist_dev(), the node still exists in the /dev. It is only removed > >>> after populate loop is run sometime later. dev_sched() KPI is inheritly > >>> racy, drivers must handle the races for other reasons. > >> > >> The populate loop is all running under the dev_lock() from what I can > >> see and make_dev() is also keeping the same lock when inserting and > >> removing new cdevs. The populate loop should always give a consistent > > No, populate loop is not run under dev_mtx. > > Are you sure: Yes, I am sure. I explained it in the next sentences which you break from the first one in the citation. > > > static int > > devfs_populate_loop(struct devfs_mount *dm, int cleanup) > > { > > struct cdev_priv *cdp; > > struct devfs_dirent *de; > > struct devfs_dirent *dd, *dt; > > struct cdev *pdev; > > int de_flags, depth, j; > > char *q, *s; > > > > sx_assert(&dm->dm_lock, SX_XLOCKED); > > dev_lock(); > ^^^^ what is this ? > > TAILQ_FOREACH(cdp, &cdevp_list, cdp_list) { > > > It would not be able to > > allocate memory, even in M_NOWAIT fashion. The dev_mtx is after the > > vm and vnode locks. Only iteration over the cdevp_list is protected by > > dev_mtx, which is dropped right after something which require an > > action, is found on the list. Populate() needs some way to avoid > > reading inconsistent data from the cdev layer, but there is not > > guarantee that we are always up to date. ^^^^^^^^^ > > > >> view of the character devices available, and I don't see how "cdev" > >> structures without the CDP_ACTIVE flag can appear with recently created > >> ones, even if the name is the same. > > It cannot simply because it is not synchronized with the device > > creation/destruction. > > > > > Lookup (or any other VFS-level code) is not protected by dev_mtx, it > > is only dm lock which ensures that populate loop is not run in parallel, > > modifying direntries. > > See comment above. > > > > >> > >> That system functions can still call into the dangling read/write/ioctl > >> functions is another story, and that is why I tell, that in order to > >> simplify this teardown, we possibly should associate a client selectable > >> lock with each CDEV, for teardown purposes. Like done for several years > >> in the callout and USB APIs and possibly many other places. > > There is d_purge method which provides the tear-down semantic for > > drivers which needs it. Only tty uses the method AFAIK. > > > > Devfs ensures that no client code is active when cdev is removed for real. > > --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 11:54:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDA7886F; Sun, 18 Jan 2015 11:54:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B448DFE9; Sun, 18 Jan 2015 11:54:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IBsSEZ089840; Sun, 18 Jan 2015 11:54:28 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IBsLn0089798; Sun, 18 Jan 2015 11:54:21 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501181154.t0IBsLn0089798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Jan 2015 11:54:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277317 - in stable/10: contrib/jemalloc/include/jemalloc/internal contrib/jemalloc/src lib/libc lib/libc/compat-43 lib/libc/gen lib/libc/include lib/libc/stdlib lib/libc/stdlib/jemallo... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 11:54:28 -0000 Author: kib Date: Sun Jan 18 11:54:20 2015 New Revision: 277317 URL: https://svnweb.freebsd.org/changeset/base/277317 Log: Fix known issues which blow up the process after dlopen("libthr.so") (or loading a dso linked to libthr.so into process which was not linked against threading library). MFC r276630: Remove interposing, fix malloc, reinstall signal handlers wrappers on libthr load. MFC r276681: Avoid calling internal libc function through PLT or accessing data though GOT. MFC r277032: Reduce the size of the interposing table and amount of cancellation-handling code in the libthr. MFC note: r276646 ("do not erronously export 'openat' symbol from rtld") is not applicable to stable/10 yet, since PATHFDS support was not merged. Added: stable/10/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c - copied unchanged from r276630, head/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c stable/10/lib/libc/sys/accept.c - copied unchanged from r276630, head/lib/libc/sys/accept.c stable/10/lib/libc/sys/accept4.c - copied unchanged from r276630, head/lib/libc/sys/accept4.c stable/10/lib/libc/sys/aio_suspend.c - copied unchanged from r276630, head/lib/libc/sys/aio_suspend.c stable/10/lib/libc/sys/close.c - copied unchanged from r276630, head/lib/libc/sys/close.c stable/10/lib/libc/sys/connect.c - copied unchanged from r276630, head/lib/libc/sys/connect.c stable/10/lib/libc/sys/fork.c - copied unchanged from r276630, head/lib/libc/sys/fork.c stable/10/lib/libc/sys/fsync.c - copied unchanged from r276630, head/lib/libc/sys/fsync.c stable/10/lib/libc/sys/interposing_table.c - copied, changed from r276630, head/lib/libc/sys/interposing_table.c stable/10/lib/libc/sys/msync.c - copied unchanged from r276630, head/lib/libc/sys/msync.c stable/10/lib/libc/sys/nanosleep.c - copied unchanged from r276630, head/lib/libc/sys/nanosleep.c stable/10/lib/libc/sys/open.c - copied, changed from r276630, head/lib/libc/sys/open.c stable/10/lib/libc/sys/openat.c - copied unchanged from r276630, head/lib/libc/sys/openat.c stable/10/lib/libc/sys/poll.c - copied unchanged from r276630, head/lib/libc/sys/poll.c stable/10/lib/libc/sys/pselect.c - copied unchanged from r276630, head/lib/libc/sys/pselect.c stable/10/lib/libc/sys/read.c - copied unchanged from r276630, head/lib/libc/sys/read.c stable/10/lib/libc/sys/readv.c - copied unchanged from r276630, head/lib/libc/sys/readv.c stable/10/lib/libc/sys/recvfrom.c - copied unchanged from r276630, head/lib/libc/sys/recvfrom.c stable/10/lib/libc/sys/recvmsg.c - copied unchanged from r276630, head/lib/libc/sys/recvmsg.c stable/10/lib/libc/sys/select.c - copied unchanged from r276630, head/lib/libc/sys/select.c stable/10/lib/libc/sys/sendmsg.c - copied unchanged from r276630, head/lib/libc/sys/sendmsg.c stable/10/lib/libc/sys/sendto.c - copied unchanged from r276630, head/lib/libc/sys/sendto.c stable/10/lib/libc/sys/setcontext.c - copied unchanged from r276630, head/lib/libc/sys/setcontext.c stable/10/lib/libc/sys/sigaction.c - copied unchanged from r276630, head/lib/libc/sys/sigaction.c stable/10/lib/libc/sys/sigprocmask.c - copied unchanged from r276630, head/lib/libc/sys/sigprocmask.c stable/10/lib/libc/sys/sigsuspend.c - copied unchanged from r276630, head/lib/libc/sys/sigsuspend.c stable/10/lib/libc/sys/sigtimedwait.c - copied unchanged from r276630, head/lib/libc/sys/sigtimedwait.c stable/10/lib/libc/sys/sigwaitinfo.c - copied unchanged from r276630, head/lib/libc/sys/sigwaitinfo.c stable/10/lib/libc/sys/swapcontext.c - copied unchanged from r276630, head/lib/libc/sys/swapcontext.c stable/10/lib/libc/sys/wait4.c - copied unchanged from r276630, head/lib/libc/sys/wait4.c stable/10/lib/libc/sys/write.c - copied unchanged from r276630, head/lib/libc/sys/write.c stable/10/lib/libc/sys/writev.c - copied unchanged from r276630, head/lib/libc/sys/writev.c Deleted: stable/10/lib/libc/gen/swapcontext.c Modified: stable/10/contrib/jemalloc/include/jemalloc/internal/mutex.h stable/10/contrib/jemalloc/src/jemalloc.c stable/10/contrib/jemalloc/src/mutex.c stable/10/lib/libc/Makefile stable/10/lib/libc/compat-43/creat.c stable/10/lib/libc/gen/Makefile.inc stable/10/lib/libc/gen/Symbol.map stable/10/lib/libc/gen/pause.c stable/10/lib/libc/gen/raise.c stable/10/lib/libc/gen/sleep.c stable/10/lib/libc/gen/termios.c stable/10/lib/libc/gen/usleep.c stable/10/lib/libc/gen/wait.c stable/10/lib/libc/gen/wait3.c stable/10/lib/libc/gen/waitpid.c stable/10/lib/libc/include/libc_private.h stable/10/lib/libc/stdlib/Symbol.map stable/10/lib/libc/stdlib/jemalloc/Symbol.map stable/10/lib/libc/stdlib/system.c stable/10/lib/libc/sys/Makefile.inc stable/10/lib/libc/sys/Symbol.map stable/10/lib/libc/sys/__error.c stable/10/lib/libc/sys/fcntl.c stable/10/lib/libc/sys/sigwait.c stable/10/lib/libthr/Makefile stable/10/lib/libthr/pthread.map stable/10/lib/libthr/sys/thr_error.c stable/10/lib/libthr/thread/thr_create.c stable/10/lib/libthr/thread/thr_fork.c stable/10/lib/libthr/thread/thr_init.c stable/10/lib/libthr/thread/thr_printf.c stable/10/lib/libthr/thread/thr_private.h stable/10/lib/libthr/thread/thr_sig.c stable/10/lib/libthr/thread/thr_syscalls.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/jemalloc/include/jemalloc/internal/mutex.h ============================================================================== --- stable/10/contrib/jemalloc/include/jemalloc/internal/mutex.h Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/contrib/jemalloc/include/jemalloc/internal/mutex.h Sun Jan 18 11:54:20 2015 (r277317) @@ -49,6 +49,7 @@ bool malloc_mutex_init(malloc_mutex_t *m void malloc_mutex_prefork(malloc_mutex_t *mutex); void malloc_mutex_postfork_parent(malloc_mutex_t *mutex); void malloc_mutex_postfork_child(malloc_mutex_t *mutex); +bool malloc_mutex_first_thread(void); bool mutex_boot(void); #endif /* JEMALLOC_H_EXTERNS */ Modified: stable/10/contrib/jemalloc/src/jemalloc.c ============================================================================== --- stable/10/contrib/jemalloc/src/jemalloc.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/contrib/jemalloc/src/jemalloc.c Sun Jan 18 11:54:20 2015 (r277317) @@ -1818,6 +1818,13 @@ jemalloc_postfork_child(void) ctl_postfork_child(); } +void +_malloc_first_thread(void) +{ + + (void)malloc_mutex_first_thread(); +} + /******************************************************************************/ /* * The following functions are used for TLS allocation/deallocation in static Modified: stable/10/contrib/jemalloc/src/mutex.c ============================================================================== --- stable/10/contrib/jemalloc/src/mutex.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/contrib/jemalloc/src/mutex.c Sun Jan 18 11:54:20 2015 (r277317) @@ -67,15 +67,15 @@ pthread_create(pthread_t *__restrict thr JEMALLOC_EXPORT int _pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, void *(calloc_cb)(size_t, size_t)); -__weak_reference(_pthread_mutex_init_calloc_cb_stub, - _pthread_mutex_init_calloc_cb); - +#pragma weak _pthread_mutex_init_calloc_cb int -_pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, +_pthread_mutex_init_calloc_cb(pthread_mutex_t *mutex, void *(calloc_cb)(size_t, size_t)) { - return (0); + return (((int (*)(pthread_mutex_t *, void *(*)(size_t, size_t))) + __libc_interposing[INTERPOS__pthread_mutex_init_calloc_cb])( + mutex, calloc_cb)); } #endif @@ -144,7 +144,7 @@ malloc_mutex_postfork_child(malloc_mutex } bool -mutex_boot(void) +malloc_mutex_first_thread(void) { #ifdef JEMALLOC_MUTEX_INIT_CB @@ -158,3 +158,14 @@ mutex_boot(void) #endif return (false); } + +bool +mutex_boot(void) +{ + +#ifndef JEMALLOC_MUTEX_INIT_CB + return (malloc_mutex_first_thread()); +#else + return (false); +#endif +} Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/Makefile Sun Jan 18 11:54:20 2015 (r277317) @@ -156,6 +156,10 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} cp -p ${.ALLSRC} ${DESTDIR}/sys/libkern/${LIBC_ARCH} .endif +.if !defined(WITHOUT_SYSCALL_COMPAT) +CFLAGS+=-DSYSCALL_COMPAT +.endif + .include # Disable warnings in contributed sources. Modified: stable/10/lib/libc/compat-43/creat.c ============================================================================== --- stable/10/lib/libc/compat-43/creat.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/compat-43/creat.c Sun Jan 18 11:54:20 2015 (r277317) @@ -36,11 +36,18 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include #include "un-namespace.h" +#include "libc_private.h" +__weak_reference(__creat, creat); +__weak_reference(__creat, _creat); + +#pragma weak creat int __creat(const char *path, mode_t mode) { - return(_open(path, O_WRONLY|O_CREAT|O_TRUNC, mode)); + + return (((int (*)(int, const char *, int, ...)) + __libc_interposing[INTERPOS_openat])(AT_FDCWD, path, O_WRONLY | + O_CREAT | O_TRUNC, mode)); } -__weak_reference(__creat, creat); -__weak_reference(__creat, _creat); + Modified: stable/10/lib/libc/gen/Makefile.inc ============================================================================== --- stable/10/lib/libc/gen/Makefile.inc Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/Makefile.inc Sun Jan 18 11:54:20 2015 (r277317) @@ -5,6 +5,7 @@ .PATH: ${.CURDIR}/${LIBC_ARCH}/gen ${.CURDIR}/gen SRCS+= __getosreldate.c \ + __pthread_mutex_init_calloc_cb_stub.c \ __xuname.c \ _once_stub.c \ _pthread_stubs.c \ Modified: stable/10/lib/libc/gen/Symbol.map ============================================================================== --- stable/10/lib/libc/gen/Symbol.map Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/Symbol.map Sun Jan 18 11:54:20 2015 (r277317) @@ -529,6 +529,8 @@ FBSDprivate_1.0 { _libc_sem_post_compat; _libc_sem_getvalue_compat; + __libc_tcdrain; + __elf_aux_vector; __pthread_map_stacks_exec; __fillcontextx; Copied: stable/10/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c (from r276630, head/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c Sun Jan 18 11:54:20 2015 (r277317, copy of r276630, head/lib/libc/gen/__pthread_mutex_init_calloc_cb_stub.c) @@ -0,0 +1,45 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include "libc_private.h" + +int +_pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, + void *(calloc_cb)(size_t, size_t)) +{ + + return (0); +} Modified: stable/10/lib/libc/gen/pause.c ============================================================================== --- stable/10/lib/libc/gen/pause.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/pause.c Sun Jan 18 11:54:20 2015 (r277317) @@ -33,10 +33,10 @@ static char sccsid[] = "@(#)pause.c 8.1 #include __FBSDID("$FreeBSD$"); -#include "namespace.h" #include #include -#include "un-namespace.h" + +#include "libc_private.h" /* * Backwards compatible pause. @@ -46,9 +46,10 @@ __pause(void) { sigset_t oset; - if (_sigprocmask(SIG_BLOCK, NULL, &oset) == -1) + if (sigprocmask(SIG_BLOCK, NULL, &oset) == -1) return (-1); - return (_sigsuspend(&oset)); + return (sigsuspend(&oset)); } + __weak_reference(__pause, pause); __weak_reference(__pause, _pause); Modified: stable/10/lib/libc/gen/raise.c ============================================================================== --- stable/10/lib/libc/gen/raise.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/raise.c Sun Jan 18 11:54:20 2015 (r277317) @@ -36,11 +36,17 @@ __FBSDID("$FreeBSD$"); #include #include +#include "libc_private.h" + __weak_reference(__raise, raise); __weak_reference(__raise, _raise); int __raise(int s) { - return(kill(getpid(), s)); + long id; + + if (__sys_thr_self(&id) == -1) + return (-1); + return (__sys_thr_kill(id, s)); } Modified: stable/10/lib/libc/gen/sleep.c ============================================================================== --- stable/10/lib/libc/gen/sleep.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/sleep.c Sun Jan 18 11:54:20 2015 (r277317) @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "libc_private.h" + unsigned int __sleep(unsigned int seconds) { @@ -55,12 +57,14 @@ __sleep(unsigned int seconds) time_to_sleep.tv_sec = seconds; time_to_sleep.tv_nsec = 0; - if (_nanosleep(&time_to_sleep, &time_remaining) != -1) + if (((int (*)(const struct timespec *, struct timespec *)) + __libc_interposing[INTERPOS_nanosleep])( + &time_to_sleep, &time_remaining) != -1) return (0); if (errno != EINTR) return (seconds); /* best guess */ return (time_remaining.tv_sec + - (time_remaining.tv_nsec != 0)); /* round up */ + (time_remaining.tv_nsec != 0)); /* round up */ } __weak_reference(__sleep, sleep); Modified: stable/10/lib/libc/gen/termios.c ============================================================================== --- stable/10/lib/libc/gen/termios.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/termios.c Sun Jan 18 11:54:20 2015 (r277317) @@ -46,6 +46,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "libc_private.h" + int tcgetattr(int fd, struct termios *t) { @@ -208,13 +210,23 @@ tcsendbreak(int fd, int len __unused) } int -__tcdrain(int fd) +__libc_tcdrain(int fd) { + return (_ioctl(fd, TIOCDRAIN, 0)); } -__weak_reference(__tcdrain, tcdrain); -__weak_reference(__tcdrain, _tcdrain); +#pragma weak tcdrain +int +tcdrain(int fd) +{ + + return (((int (*)(int)) + __libc_interposing[INTERPOS_tcdrain])(fd)); +} + +__weak_reference(__libc_tcdrain, __tcdrain); +__weak_reference(__libc_tcdrain, _tcdrain); int tcflush(int fd, int which) Modified: stable/10/lib/libc/gen/usleep.c ============================================================================== --- stable/10/lib/libc/gen/usleep.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/usleep.c Sun Jan 18 11:54:20 2015 (r277317) @@ -38,6 +38,8 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "libc_private.h" + int __usleep(useconds_t useconds) { @@ -45,7 +47,8 @@ __usleep(useconds_t useconds) time_to_sleep.tv_nsec = (useconds % 1000000) * 1000; time_to_sleep.tv_sec = useconds / 1000000; - return (_nanosleep(&time_to_sleep, NULL)); + return (((int (*)(const struct timespec *, struct timespec *)) + __libc_interposing[INTERPOS_nanosleep])(&time_to_sleep, NULL)); } __weak_reference(__usleep, usleep); Modified: stable/10/lib/libc/gen/wait.c ============================================================================== --- stable/10/lib/libc/gen/wait.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/wait.c Sun Jan 18 11:54:20 2015 (r277317) @@ -40,10 +40,14 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "libc_private.h" + pid_t __wait(int *istat) { - return (_wait4(WAIT_ANY, istat, 0, (struct rusage *)0)); + + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, 0, NULL)); } __weak_reference(__wait, wait); Modified: stable/10/lib/libc/gen/wait3.c ============================================================================== --- stable/10/lib/libc/gen/wait3.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/wait3.c Sun Jan 18 11:54:20 2015 (r277317) @@ -40,11 +40,14 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "libc_private.h" + pid_t -wait3(istat, options, rup) - int *istat; - int options; - struct rusage *rup; +__wait3(int *istat, int options, struct rusage *rup) { - return (_wait4(WAIT_ANY, istat, options, rup)); + + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(WAIT_ANY, istat, options, rup)); } + +__weak_reference(__wait3, wait3); Modified: stable/10/lib/libc/gen/waitpid.c ============================================================================== --- stable/10/lib/libc/gen/waitpid.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/gen/waitpid.c Sun Jan 18 11:54:20 2015 (r277317) @@ -40,10 +40,14 @@ __FBSDID("$FreeBSD$"); #include #include "un-namespace.h" +#include "libc_private.h" + pid_t __waitpid(pid_t pid, int *istat, int options) { - return (_wait4(pid, istat, options, (struct rusage *)0)); + + return (((pid_t (*)(pid_t, int *, int, struct rusage *)) + __libc_interposing[INTERPOS_wait4])(pid, istat, options, NULL)); } __weak_reference(__waitpid, waitpid); Modified: stable/10/lib/libc/include/libc_private.h ============================================================================== --- stable/10/lib/libc/include/libc_private.h Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/include/libc_private.h Sun Jan 18 11:54:20 2015 (r277317) @@ -173,6 +173,52 @@ typedef pthread_func_t pthread_func_entr extern pthread_func_entry_t __thr_jtable[]; +void __set_error_selector(int *(*arg)(void)); +int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, + void *(calloc_cb)(__size_t, __size_t)); + +typedef int (*interpos_func_t)(void); +interpos_func_t *__libc_interposing_slot(int interposno); +extern interpos_func_t __libc_interposing[] __hidden; + +enum { + INTERPOS_accept, + INTERPOS_accept4, + INTERPOS_aio_suspend, + INTERPOS_close, + INTERPOS_connect, + INTERPOS_fcntl, + INTERPOS_fsync, + INTERPOS_fork, + INTERPOS_msync, + INTERPOS_nanosleep, + INTERPOS_openat, + INTERPOS_poll, + INTERPOS_pselect, + INTERPOS_recvfrom, + INTERPOS_recvmsg, + INTERPOS_select, + INTERPOS_sendmsg, + INTERPOS_sendto, + INTERPOS_setcontext, + INTERPOS_sigaction, + INTERPOS_sigprocmask, + INTERPOS_sigsuspend, + INTERPOS_sigwait, + INTERPOS_sigtimedwait, + INTERPOS_sigwaitinfo, + INTERPOS_swapcontext, + INTERPOS_system, + INTERPOS_tcdrain, + INTERPOS_read, + INTERPOS_readv, + INTERPOS_wait4, + INTERPOS_write, + INTERPOS_writev, + INTERPOS__pthread_mutex_init_calloc_cb, + INTERPOS_MAX +}; + /* * yplib internal interfaces */ @@ -215,42 +261,101 @@ void _malloc_thread_cleanup(void); void _malloc_prefork(void); void _malloc_postfork(void); +void _malloc_first_thread(void); + /* * Function to clean up streams, called from abort() and exit(). */ -extern void (*__cleanup)(void) __hidden; +void (*__cleanup)(void) __hidden; /* * Get kern.osreldate to detect ABI revisions. Explicitly * ignores value of $OSVERSION and caches result. Prototypes * for the wrapped "new" pad-less syscalls are here for now. */ -extern int __getosreldate(void); +int __getosreldate(void); #include -/* Without pad */ -extern __off_t __sys_lseek(int, __off_t, int); -extern int __sys_ftruncate(int, __off_t); -extern int __sys_truncate(const char *, __off_t); -extern __ssize_t __sys_pread(int, void *, __size_t, __off_t); -extern __ssize_t __sys_pwrite(int, const void *, __size_t, __off_t); -extern void * __sys_mmap(void *, __size_t, int, int, int, __off_t); +#include /* With pad */ -extern __off_t __sys_freebsd6_lseek(int, int, __off_t, int); -extern int __sys_freebsd6_ftruncate(int, int, __off_t); -extern int __sys_freebsd6_truncate(const char *, int, __off_t); -extern __ssize_t __sys_freebsd6_pread(int, void *, __size_t, int, __off_t); -extern __ssize_t __sys_freebsd6_pwrite(int, const void *, __size_t, int, __off_t); -extern void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t); - -/* Without back-compat translation */ -extern int __sys_fcntl(int, int, ...); - +__off_t __sys_freebsd6_lseek(int, int, __off_t, int); +int __sys_freebsd6_ftruncate(int, int, __off_t); +int __sys_freebsd6_truncate(const char *, int, __off_t); +__ssize_t __sys_freebsd6_pread(int, void *, __size_t, int, __off_t); +__ssize_t __sys_freebsd6_pwrite(int, const void *, __size_t, int, __off_t); +void * __sys_freebsd6_mmap(void *, __size_t, int, int, int, int, __off_t); + +struct aiocb; +struct fd_set; +struct iovec; +struct msghdr; +struct pollfd; +struct rusage; +struct sigaction; +struct sockaddr; struct timespec; struct timeval; struct timezone; -int __sys_gettimeofday(struct timeval *, struct timezone *); -int __sys_clock_gettime(__clockid_t, struct timespec *ts); +struct __siginfo; +struct __ucontext; +int __sys_aio_suspend(const struct aiocb * const[], int, + const struct timespec *); +int __sys_accept(int, struct sockaddr *, __socklen_t *); +int __sys_accept4(int, struct sockaddr *, __socklen_t *, int); +int __sys_clock_gettime(__clockid_t, struct timespec *ts); +int __sys_close(int); +int __sys_connect(int, const struct sockaddr *, __socklen_t); +int __sys_fcntl(int, int, ...); +int __sys_fsync(int); +__pid_t __sys_fork(void); +int __sys_ftruncate(int, __off_t); +int __sys_gettimeofday(struct timeval *, struct timezone *); +__off_t __sys_lseek(int, __off_t, int); +void *__sys_mmap(void *, __size_t, int, int, int, __off_t); +int __sys_msync(void *, __size_t, int); +int __sys_nanosleep(const struct timespec *, struct timespec *); +int __sys_open(const char *, int, ...); +int __sys_openat(int, const char *, int, ...); +int __sys_pselect(int, struct fd_set *, struct fd_set *, + struct fd_set *, const struct timespec *, + const __sigset_t *); +int __sys_poll(struct pollfd *, unsigned, int); +__ssize_t __sys_pread(int, void *, __size_t, __off_t); +__ssize_t __sys_pwrite(int, const void *, __size_t, __off_t); +__ssize_t __sys_read(int, void *, __size_t); +__ssize_t __sys_readv(int, const struct iovec *, int); +__ssize_t __sys_recv(int, void *, __size_t, int); +__ssize_t __sys_recvfrom(int, void *, __size_t, int, struct sockaddr *, + __socklen_t *); +__ssize_t __sys_recvmsg(int, struct msghdr *, int); +int __sys_select(int, struct fd_set *, struct fd_set *, + struct fd_set *, struct timeval *); +__ssize_t __sys_sendmsg(int, const struct msghdr *, int); +__ssize_t __sys_sendto(int, const void *, __size_t, int, + const struct sockaddr *, __socklen_t); +int __sys_setcontext(const struct __ucontext *); +int __sys_sigaction(int, const struct sigaction *, + struct sigaction *); +int __sys_sigprocmask(int, const __sigset_t *, __sigset_t *); +int __sys_sigsuspend(const __sigset_t *); +int __sys_sigtimedwait(const __sigset_t *, struct __siginfo *, + const struct timespec *); +int __sys_sigwait(const __sigset_t *, int *); +int __sys_sigwaitinfo(const __sigset_t *, struct __siginfo *); +int __sys_swapcontext(struct __ucontext *, + const struct __ucontext *); +int __sys_thr_kill(long, int); +int __sys_thr_self(long *); +int __sys_truncate(const char *, __off_t); +__pid_t __sys_wait4(__pid_t, int *, int, struct rusage *); +__ssize_t __sys_write(int, const void *, __size_t); +__ssize_t __sys_writev(int, const struct iovec *, int); + +int __libc_sigwait(const __sigset_t * __restrict, + int * restrict sig); +int __libc_system(const char *); +int __libc_tcdrain(int); +int __fcntl_compat(int fd, int cmd, ...); /* execve() with PATH processing to implement posix_spawnp() */ int _execvpe(const char *, char * const *, char * const *); Modified: stable/10/lib/libc/stdlib/Symbol.map ============================================================================== --- stable/10/lib/libc/stdlib/Symbol.map Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/stdlib/Symbol.map Sun Jan 18 11:54:20 2015 (r277317) @@ -107,4 +107,5 @@ FBSD_1.3 { FBSDprivate_1.0 { __system; _system; + __libc_system; }; Modified: stable/10/lib/libc/stdlib/jemalloc/Symbol.map ============================================================================== --- stable/10/lib/libc/stdlib/jemalloc/Symbol.map Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/stdlib/jemalloc/Symbol.map Sun Jan 18 11:54:20 2015 (r277317) @@ -43,4 +43,5 @@ FBSDprivate_1.0 { _malloc_thread_cleanup; _malloc_prefork; _malloc_postfork; + _malloc_first_thread; }; Modified: stable/10/lib/libc/stdlib/system.c ============================================================================== --- stable/10/lib/libc/stdlib/system.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/stdlib/system.c Sun Jan 18 11:54:20 2015 (r277317) @@ -46,8 +46,17 @@ __FBSDID("$FreeBSD$"); #include "un-namespace.h" #include "libc_private.h" +#pragma weak system int -__system(const char *command) +system(const char *command) +{ + + return (((int (*)(const char *)) + __libc_interposing[INTERPOS_system])(command)); +} + +int +__libc_system(const char *command) { pid_t pid, savedpid; int pstat; @@ -95,5 +104,5 @@ __system(const char *command) return(pid == -1 ? -1 : pstat); } -__weak_reference(__system, system); -__weak_reference(__system, _system); +__weak_reference(__libc_system, __system); +__weak_reference(__libc_system, _system); Modified: stable/10/lib/libc/sys/Makefile.inc ============================================================================== --- stable/10/lib/libc/sys/Makefile.inc Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/sys/Makefile.inc Sun Jan 18 11:54:20 2015 (r277317) @@ -20,17 +20,61 @@ NOASM+= clock_gettime.o gettimeofday.o PSEUDO+= _clock_gettime.o _gettimeofday.o # Sources common to both syscall interfaces: -SRCS+= stack_protector.c stack_protector_compat.c __error.c +SRCS+= \ + stack_protector.c \ + stack_protector_compat.c \ + __error.c \ + interposing_table.c + .if !defined(WITHOUT_SYSCALL_COMPAT) -SYSCALL_COMPAT_SRCS= fcntl.c ftruncate.c lseek.c mmap.c pread.c \ - pwrite.c truncate.c +SYSCALL_COMPAT_SRCS= \ + ftruncate.c \ + lseek.c \ + mmap.c \ + pread.c \ + pwrite.c \ + truncate.c SRCS+= ${SYSCALL_COMPAT_SRCS} NOASM+= ${SYSCALL_COMPAT_SRCS:S/.c/.o/} -PSEUDO+= _fcntl.o .endif -SRCS+= sigwait.c -NOASM+= sigwait.o -PSEUDO+= _sigwait.o + +INTERPOSED = \ + accept \ + accept4 \ + aio_suspend \ + close \ + connect \ + fcntl \ + fsync \ + fork \ + msync \ + nanosleep \ + open \ + openat \ + poll \ + pselect \ + read \ + readv \ + recvfrom \ + recvmsg \ + select \ + sendmsg \ + sendto \ + setcontext \ + sigaction \ + sigprocmask \ + sigsuspend \ + sigtimedwait \ + sigwait \ + sigwaitinfo \ + swapcontext \ + wait4 \ + write \ + writev + +SRCS+= ${INTERPOSED:S/$/.c/} +NOASM+= ${INTERPOSED:S/$/.o/} +PSEUDO+= ${INTERPOSED:C/^.*$/_&.o/} # Add machine dependent asm sources: SRCS+=${MDASM} Modified: stable/10/lib/libc/sys/Symbol.map ============================================================================== --- stable/10/lib/libc/sys/Symbol.map Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/sys/Symbol.map Sun Jan 18 11:54:20 2015 (r277317) @@ -245,7 +245,6 @@ FBSD_1.0 { setaudit; setaudit_addr; setauid; - setcontext; setegid; seteuid; setgid; @@ -286,7 +285,6 @@ FBSD_1.0 { __stack_chk_guard; stat; statfs; - swapcontext; swapoff; swapon; symlink; @@ -351,7 +349,6 @@ FBSD_1.1 { mkfifoat; mknodat; msgctl; - openat; readlinkat; renameat; setfib; @@ -1048,7 +1045,9 @@ FBSDprivate_1.0 { __sys_write; _writev; __sys_writev; - __error_unthreaded; + __set_error_selector; nlm_syscall; gssd_syscall; + __libc_interposing_slot; + __libc_sigwait; }; Modified: stable/10/lib/libc/sys/__error.c ============================================================================== --- stable/10/lib/libc/sys/__error.c Sun Jan 18 10:53:48 2015 (r277316) +++ stable/10/lib/libc/sys/__error.c Sun Jan 18 11:54:20 2015 (r277317) @@ -32,14 +32,25 @@ __FBSDID("$FreeBSD$"); extern int errno; -/* - * Declare a weak reference in case the application is not linked - * with libpthread. - */ -__weak_reference(__error_unthreaded, __error); +static int * +__error_unthreaded(void) +{ + + return (&errno); +} + +static int *(*__error_selector)(void) = __error_unthreaded; + +void +__set_error_selector(int *(*arg)(void)) +{ + + __error_selector = arg; +} int * -__error_unthreaded(void) +__error(void) { - return(&errno); + + return (__error_selector()); } Copied: stable/10/lib/libc/sys/accept.c (from r276630, head/lib/libc/sys/accept.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/accept.c Sun Jan 18 11:54:20 2015 (r277317, copy of r276630, head/lib/libc/sys/accept.c) @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include "libc_private.h" + +__weak_reference(__sys_accept, __accept); + +#pragma weak accept +int +accept(int s, struct sockaddr *addr, socklen_t *addrlen) +{ + + return (((int (*)(int, struct sockaddr *, socklen_t *)) + __libc_interposing[INTERPOS_accept])(s, addr, addrlen)); +} Copied: stable/10/lib/libc/sys/accept4.c (from r276630, head/lib/libc/sys/accept4.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/accept4.c Sun Jan 18 11:54:20 2015 (r277317, copy of r276630, head/lib/libc/sys/accept4.c) @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include "libc_private.h" + +__weak_reference(__sys_accept4, __accept4); + +#pragma weak accept4 +int +accept4(int s, struct sockaddr *addr, socklen_t *addrlen, int flags) +{ + + return (((int (*)(int, struct sockaddr *, socklen_t *, int)) + __libc_interposing[INTERPOS_accept4])(s, addr, addrlen, flags)); +} Copied: stable/10/lib/libc/sys/aio_suspend.c (from r276630, head/lib/libc/sys/aio_suspend.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/aio_suspend.c Sun Jan 18 11:54:20 2015 (r277317, copy of r276630, head/lib/libc/sys/aio_suspend.c) @@ -0,0 +1,51 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "libc_private.h" + +__weak_reference(__sys_aio_suspend, __aio_suspend); + +#pragma weak aio_suspend +int +aio_suspend(const struct aiocb * const iocbs[], int niocb, + const struct timespec *timeout) +{ + + return (((int (*)(const struct aiocb * const[], int, + const struct timespec *)) + __libc_interposing[INTERPOS_aio_suspend])(iocbs, niocb, timeout)); +} Copied: stable/10/lib/libc/sys/close.c (from r276630, head/lib/libc/sys/close.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/close.c Sun Jan 18 11:54:20 2015 (r277317, copy of r276630, head/lib/libc/sys/close.c) @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include "libc_private.h" + +__weak_reference(__sys_close, __close); + +#pragma weak close +int +close(int fd) +{ + + return (((int (*)(int))__libc_interposing[INTERPOS_close])(fd)); +} Copied: stable/10/lib/libc/sys/connect.c (from r276630, head/lib/libc/sys/connect.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/sys/connect.c Sun Jan 18 11:54:20 2015 (r277317, copy of r276630, head/lib/libc/sys/connect.c) @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2014 The FreeBSD Foundation. + * All rights reserved. + * + * Portions of this software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * 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(s), this list of conditions and the following disclaimer as + * the first lines of this file unmodified other than the possible + * addition of one or more copyright notices. + * 2. Redistributions in binary form must reproduce the above copyright + * notice(s), 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 COPYRIGHT HOLDER(S) ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER(S) BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR + * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE + * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include "libc_private.h" + +__weak_reference(__sys_connect, __connect); + +#pragma weak connect +int +connect(int s, const struct sockaddr *addr, socklen_t addrlen) +{ + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 12:45:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 239C0869; Sun, 18 Jan 2015 12:45:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F79981E; Sun, 18 Jan 2015 12:45:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ICjQLl013769; Sun, 18 Jan 2015 12:45:26 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ICjQjG013768; Sun, 18 Jan 2015 12:45:26 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201501181245.t0ICjQjG013768@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Sun, 18 Jan 2015 12:45:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277318 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 12:45:27 -0000 Author: cperciva Date: Sun Jan 18 12:45:26 2015 New Revision: 277318 URL: https://svnweb.freebsd.org/changeset/base/277318 Log: When disabling C3+ CPU states due to the CPU_QUIRK_NO_C3 quirk, don't accidentally enable non-existent states. This bug was triggered if ACPI advertises the presence of a C2 state which we fail to parse via acpi_PkgGas due to our lack of support for FFixedHW resources, and causes an immediate panic when an attempt is made to enter the (NULL) state. One affected platform is the EC2 c4.8xlarge VM instance type; there may be others. MFC after: 1 week Thanks to: jkim, @_msw_ Modified: head/sys/dev/acpica/acpi_cpu.c Modified: head/sys/dev/acpica/acpi_cpu.c ============================================================================== --- head/sys/dev/acpica/acpi_cpu.c Sun Jan 18 11:54:20 2015 (r277317) +++ head/sys/dev/acpica/acpi_cpu.c Sun Jan 18 12:45:26 2015 (r277318) @@ -885,7 +885,7 @@ acpi_cpu_startup(void *arg) for (i = 0; i < cpu_ndevices; i++) { sc = device_get_softc(cpu_devices[i]); if (cpu_quirks & CPU_QUIRK_NO_C3) { - sc->cpu_cx_count = sc->cpu_non_c3 + 1; + sc->cpu_cx_count = min(sc->cpu_cx_count, sc->cpu_non_c3 + 1); } AcpiInstallNotifyHandler(sc->cpu_handle, ACPI_DEVICE_NOTIFY, acpi_cpu_notify, sc); From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 12:54:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F6DDAF7; Sun, 18 Jan 2015 12:54:27 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FA2E979; Sun, 18 Jan 2015 12:54:26 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D2D821FE023; Sun, 18 Jan 2015 13:54:23 +0100 (CET) Message-ID: <54BBAD31.701@selasky.org> Date: Sun, 18 Jan 2015 13:55:13 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277199 - in head/sys: fs/devfs kern References: <20150115033109.GM42409@kib.kiev.ua> <54B76F2B.8040106@selasky.org> <20150115093841.GX42409@kib.kiev.ua> <54B79B25.3070707@selasky.org> <20150115115123.GA42409@kib.kiev.ua> <54B7AF2F.3080802@selasky.org> <20150116080332.GE42409@kib.kiev.ua> <54B8D31B.9030805@selasky.org> <20150118105410.GN42409@kib.kiev.ua> <54BB942A.5070200@selasky.org> <20150118113150.GQ42409@kib.kiev.ua> In-Reply-To: <20150118113150.GQ42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 12:54:27 -0000 Hi Konstantin, On 01/18/15 12:31, Konstantin Belousov wrote: > On Sun, Jan 18, 2015 at 12:08:26PM +0100, Hans Petter Selasky wrote: >> Hi Konstantin, >> >> On 01/18/15 11:54, Konstantin Belousov wrote: >>> On Fri, Jan 16, 2015 at 10:00:11AM +0100, Hans Petter Selasky wrote: >>>> Hi Konstantin, >> >> What about events for "devd" that a new character devices is present in >> the system or being destroyed for user-space applications? > It is up to the driver to decide. If wanted, it could post the pair of > destroy/create itself (e.g., if there is some state which require > the userspace to reset), or it could decide not to. The later is > reasonable if the destroy/create is believed to be caused by a glitch > rather than the actual replug. I would really prefer if that path is chosen, that kern_conf.c exposes an API for this. Consider the following case: You have a daemon that is started and stopped based upon "devd" DEVFS create/destroy events. The daemon is started when the create event is received. Then the kernel side calls destroy_dev(), because the application still keeps the file handle opened, the destroy_dev() never sends the destroy event, and the application then never receives the destroy event --- another example of a totally invisible deadlock. >>> >>> I find it very strange that you need sleepless operation which can >>> _both_ destroy and create cdev. At least one operation of creation or My simple argument against sleepable operation inside devfs functions which are used to register and unregister a character devices is simply that it leads to the fact we cannot make an atomic shutdown of a kernel application which involves devfs and other kernel subsystems. Let me explain. It is not enough that devfs works alone, it needs to work with together with other kernel APIs aswell. Let's make up an example. A kernel module is using three different APIs, lets say USB, the callout subsystem and devfs. Devfs is calling USB to start and stop USB transfers. The callout subsystem is calling selwakeup() and waking up devfs. The USB subsystem is calling selwakeup() and waking up devfs aswell. The USB subsystem is also calling destroy_dev(). This is a very high-level architectural thought and I hope you get it: How can you tear down a kernel application using three different subsystems in the kernel _atomically_ without having lingering callbacks? To make the shutdown sequence atomic, we might want to use a mutex. Now iff destroy_dev() is sleepable we need to drop that mutex when destroying the character device, and then woops - the shutdown sequence is no longer atomic. That's the root of the problem, and please think beyond devfs alone. The problem happens when devfs is used together with other APIs and applications in the kernel. >>> destruction must sleep, at least in the current devfs design. It could >>> be made sleepless, by making VFS visible part even less connected to the >>> cdev part, but this is not how it (can) currently work. >> >> I think it would be good practice that all resources needed for creating >> a character device can be allocated prior to registration. That means we >> first should allocate all resources needed, but not register as a single >> function. >> >> For example: >> >> Once make_dev() has returned, we can get an "d_open" callback. But >> "si_drv1/2" is always set by drivers _after_ that "make_dev()" has >> returned! This causes a race we could simply avoid by splitting the >> make_dev() like I suggest. Instead of putting more logic and code inside >> the drivers to handle the race! > I wanted to tunnel the si_drv values through the make_dev(). > I.e. there could appear yet another variant of make_dev() which takes > the initialization parameters for the si_* driver vars. > > I just did not have time/motivation to do the pass. I might be interested in giving you a hand there, but not right now. >> >>>> >>>>> >>>>> This would also close a window where /dev node is non-existent or operate >>>>> erronously. >>>> >>>> I'm not saying I plan so, but I think "cdevs" at some point need to >>>> understand mutexes and locks. That means like with other API's in the >>>> kernel we can associate a lock with the "cdev", and this lock is then >>>> used to ensure an atomic shutdown of the system in a non-blocking >>>> fashion. In my past experience multithreaded APIs should be high level >>>> implemented like this: >>>> >>>> NON-BLOCKING methods: >>>> lock(); ** >>>> xxx_start(); >>>> xxx_stop(); >>>> unlock(); >>>> >>>> BLOCKING methods: >>>> setup(); // init >>>> unsetup(); // drain >>>> >>>> Any callbacks should always be called locked ** >>>> >>>> In devfs there was no non-blocking stop before I added the delist_dev() >>>> function. >>>> >>>>> >>>>> You do not understand my point. >>>>> >>>>> I object against imposing one additional global reference on all cdevs >>>>> just to cope with the delist hack. See the patch at the end of the message. >>>> >>>> It's fine by me. >>>>> >>>>> WRT destroy_dev_sched_cb() calling delist_dev(), even after calling >>>>> delist_dev(), the node still exists in the /dev. It is only removed >>>>> after populate loop is run sometime later. dev_sched() KPI is inheritly >>>>> racy, drivers must handle the races for other reasons. >>>> >>>> The populate loop is all running under the dev_lock() from what I can >>>> see and make_dev() is also keeping the same lock when inserting and >>>> removing new cdevs. The populate loop should always give a consistent >>> No, populate loop is not run under dev_mtx. >> >> Are you sure: > Yes, I am sure. I explained it in the next sentences which you break from > the first one in the citation. "devfs_populate()" is called exclusivly locked by "dm_lock" and doesn't return until an atomic TAILQ_FOREACH() of the "devp_list" under "dev_lock()" is consistent - right? So the VFS node tree will not be inconsistent under "dm_lock" either - right? Or is there something which I don't see? void devfs_populate(struct devfs_mount *dm) { unsigned gen; sx_assert(&dm->dm_lock, SX_XLOCKED); gen = devfs_generation; if (dm->dm_generation == gen) return; >>> It would not be able to >>> allocate memory, even in M_NOWAIT fashion. The dev_mtx is after the >>> vm and vnode locks. Only iteration over the cdevp_list is protected by >>> dev_mtx, which is dropped right after something which require an >>> action, is found on the list. Populate() needs some way to avoid >>> reading inconsistent data from the cdev layer, but there is not >>> guarantee that we are always up to date. > ^^^^^^^^^ Are you taking the sleepable "dm_lock" into account? --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 13:22:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC0CEE2; Sun, 18 Jan 2015 13:22:44 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 517EED58; Sun, 18 Jan 2015 13:22:44 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 23A9925D3A92; Sun, 18 Jan 2015 13:22:39 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 9F59EC770AE; Sun, 18 Jan 2015 13:22:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id MyryhhT2wYtr; Sun, 18 Jan 2015 13:22:36 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4410:8822:54a5:bf0c:ece7] (unknown [IPv6:fde9:577b:c1a9:4410:8822:54a5:bf0c:ece7]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 1C62AC7706F; Sun, 18 Jan 2015 13:22:34 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... From: "Bjoern A. Zeeb" In-Reply-To: <54BB9114.9010200@selasky.org> Date: Sun, 18 Jan 2015 13:22:02 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: <73ED5E75-FB99-4413-985D-8BF3FF854318@FreeBSD.org> References: <201501171636.t0HGadsf039591@svn.freebsd.org> <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> <54BB81FC.3030501@selasky.org> <54BB9114.9010200@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 13:22:44 -0000 > On 18 Jan 2015, at 10:55 , Hans Petter Selasky = wrote: >=20 > See r277316. >=20 > Thank you! Thanks could you also check i386.XEN which seems to conflict on = redefined macros; here=E2=80=99s only a short excerpt: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:49: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kob= ject.h:34: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/ker= nel.h:40: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/bit= ops.h:38:9: error: 'BITS_TO_LONGS' macro redefined = [-Werror,-Wmacro-redefined] #define BITS_TO_LONGS(n) howmany((n), BITS_PER_LONG) ^ ./machine/xen/xenvar.h:99:9: note: previous definition is here #define BITS_TO_LONGS(bits) \ ^ In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:49: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kob= ject.h:34: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/ker= nel.h:40: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/bit= ops.h:297:9: error: 'test_bit' macro redefined = [-Werror,-Wmacro-redefined] #define test_bit(i, a) = \ ^ ./machine/xen/xen-os.h:224:9: note: previous definition is here #define test_bit(nr,addr) \ ^ In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:49: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kob= ject.h:34: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/ker= nel.h:40: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/bit= ops.h:302:1: error: conflicting types for 'test_and_clear_bit' test_and_clear_bit(long bit, long *var) ^ ./machine/xen/xen-os.h:197:21: note: previous definition is here static __inline int test_and_clear_bit(int nr, volatile void * addr) ^ In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:49: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kob= ject.h:34: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/ker= nel.h:43: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kth= read.h:39: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/sla= b.h:37: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/typ= es.h:63:9: error: 'DECLARE_BITMAP' macro redefined = [-Werror,-Wmacro-redefined] #define DECLARE_BITMAP(n, bits) = \ ^ =E2=80=A6 In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:49: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kob= ject.h:34: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/ker= nel.h:46: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/wai= t.h:32: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/spi= nlock.h:51:9: error: 'spin_lock_irqsave' macro redefined = [-Werror,-Wmacro-redefined] #define spin_lock_irqsave(lock, flags) = \ ^ ./machine/xen/xen-os.h:141:9: note: previous definition is here = = = =20 #define spin_lock_irqsave mtx_lock_irqsave ^ In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:49: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/kob= ject.h:34: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/ker= nel.h:46: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/wai= t.h:32: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/spi= nlock.h:53:9: error: 'spin_unlock_irqrestore' macro redefined = [-Werror,-Wmacro-redefined] #define spin_unlock_irqrestore(lock, flags) = \ ^ ./machine/xen/xen-os.h:142:9: note: previous definition is here #define spin_unlock_irqrestore mtx_unlock_irqrestore ^ In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:50: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/dev= ice.h:41: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/asm/atomi= c.h:39:3: error: typedef redefinition with different types ('struct = atomic_t' vs 'struct atomic_t') } atomic_t; ^ ./machine/xen/xen-os.h:157:42: note: previous definition is here typedef struct { volatile int counter; } atomic_t; ^ In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/lin= ux_compat.c:50: In file included from = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/linux/dev= ice.h:41: = /scratch/tmp/bz/head.svn/sys/modules/linuxapi/../../ofed/include/asm/atomi= c.h:75:1: error: conflicting types for 'atomic_inc' atomic_inc(atomic_t *v) ^ ./machine/xen/xen-os.h:273:24: note: previous definition is here static __inline__ void atomic_inc(atomic_t *v) ^ =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 14:04:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 126DF790; Sun, 18 Jan 2015 14:04:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F2AD4136; Sun, 18 Jan 2015 14:04:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IE4t4w051206; Sun, 18 Jan 2015 14:04:55 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IE4tO9051205; Sun, 18 Jan 2015 14:04:55 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501181404.t0IE4tO9051205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Sun, 18 Jan 2015 14:04:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277319 - head/sys/modules X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 14:04:56 -0000 Author: hselasky Date: Sun Jan 18 14:04:55 2015 New Revision: 277319 URL: https://svnweb.freebsd.org/changeset/base/277319 Log: Make the linuxapi module only build when WITH_OFED=YES is specified. There needs to be some more testing done before it is ready for all platforms and architectures. MFC after: 1 month Sponsored by: Mellanox Technologies Reported by: bz@ Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Sun Jan 18 12:45:26 2015 (r277318) +++ head/sys/modules/Makefile Sun Jan 18 14:04:55 2015 (r277319) @@ -502,7 +502,9 @@ _ipoib= ipoib _linprocfs= linprocfs _linsysfs= linsysfs _linux= linux +.if ${MK_OFED} != "no" _linuxapi= linuxapi +.endif _ndis= ndis .if ${MK_CDDL} != "no" || defined(ALL_MODULES) _opensolaris= opensolaris From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 14:05:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51E918E4; Sun, 18 Jan 2015 14:05:39 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D4FB13E; Sun, 18 Jan 2015 14:05:39 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 90F9A1FE023; Sun, 18 Jan 2015 15:05:36 +0100 (CET) Message-ID: <54BBBDE2.6010306@selasky.org> Date: Sun, 18 Jan 2015 15:06:26 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "Bjoern A. Zeeb" Subject: Re: svn commit: r277302 - in head/sys: conf modules modules/ibcore modules/ipoib modules/linuxapi modules/mlx4 modules/mlx4ib ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/i... References: <201501171636.t0HGadsf039591@svn.freebsd.org> <47909EEB-D9BF-43A1-B485-43680A86E170@FreeBSD.org> <54BB81FC.3030501@selasky.org> <54BB9114.9010200@selasky.org> <73ED5E75-FB99-4413-985D-8BF3FF854318@FreeBSD.org> In-Reply-To: <73ED5E75-FB99-4413-985D-8BF3FF854318@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 14:05:39 -0000 On 01/18/15 14:22, Bjoern A. Zeeb wrote: > >> On 18 Jan 2015, at 10:55 , Hans Petter Selasky wrote: >> >> See r277316. >> >> Thank you! > > Thanks could you also check i386.XEN which seems to conflict on redefined macros; here’s only a short excerpt: See r277319. I see this needs some more testing and CPU time. Until further I will simply make it build only when WITH_OFED=YES . --HPS From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 14:14:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5E54B83; Sun, 18 Jan 2015 14:14:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC7F2229; Sun, 18 Jan 2015 14:14:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IEErXt055880; Sun, 18 Jan 2015 14:14:53 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IEEmYI055850; Sun, 18 Jan 2015 14:14:48 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501181414.t0IEEmYI055850@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Jan 2015 14:14:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277320 - in head: . contrib/llvm/include/llvm/Analysis contrib/llvm/include/llvm/CodeGen contrib/llvm/include/llvm/Target contrib/llvm/lib/Analysis contrib/llvm/lib/MC contrib/llvm/lib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 14:14:54 -0000 Author: dim Date: Sun Jan 18 14:14:47 2015 New Revision: 277320 URL: https://svnweb.freebsd.org/changeset/base/277320 Log: Upgrade our copy of clang and llvm to 3.5.1 release. This is a bugfix only release, no new features have been added. Please note that this version requires C++11 support to build; see UPDATING for more information. Release notes for llvm and clang can be found here: MFC after: 1 month X-MFC-With: 276479 Added: head/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp - copied unchanged from r277223, vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsABIInfo.h - copied unchanged from r277223, vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.h head/contrib/llvm/lib/Target/Mips/MipsCCState.cpp - copied unchanged from r277223, vendor/llvm/dist/lib/Target/Mips/MipsCCState.cpp head/contrib/llvm/lib/Target/Mips/MipsCCState.h - copied unchanged from r277223, vendor/llvm/dist/lib/Target/Mips/MipsCCState.h head/contrib/llvm/patches/patch-07-llvm-r216989-r216990-fix-movw-armv6.diff - copied unchanged from r277318, head/contrib/llvm/patches/patch-08-llvm-r216989-r216990-fix-movw-armv6.diff head/contrib/llvm/patches/patch-08-clang-r217410-i386-garbage-float.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-09-clang-r217410-i386-garbage-float.diff head/contrib/llvm/patches/patch-09-llvm-r221709-debug-oom.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-10-llvm-r221709-debug-oom.diff head/contrib/llvm/patches/patch-10-llvm-r222562-loop-rotate.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-11-llvm-r222562-loop-rotate.diff head/contrib/llvm/patches/patch-11-add-llvm-gvn-option.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-12-add-llvm-gvn-option.diff head/contrib/llvm/patches/patch-12-llvm-r218241-dwarf2-warning.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-13-llvm-r218241-dwarf2-warning.diff head/contrib/llvm/patches/patch-13-llvm-r215352-aarch64-dyn-loader.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-14-llvm-r215352-aarch64-dyn-loader.diff head/contrib/llvm/patches/patch-14-llvm-r216571-dynamiclib-usability.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff head/contrib/llvm/patches/patch-15-clang-r221900-freebsd-aarch64.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-16-clang-r221900-freebsd-aarch64.diff head/contrib/llvm/patches/patch-16-llvm-r222856-libapr-miscompile.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-17-llvm-r222856-libapr-miscompile.diff head/contrib/llvm/patches/patch-17-llvm-r214802-armv6-cp10-cp11.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-18-llvm-r214802-armv6-cp10-cp11.diff head/contrib/llvm/patches/patch-18-llvm-r215811-arm-fpu-directive.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-19-llvm-r215811-arm-fpu-directive.diff head/contrib/llvm/patches/patch-19-enable-armv6-clrex.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-20-enable-armv6-clrex.diff head/contrib/llvm/patches/patch-20-llvm-r223147-arm-cpu-directive.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-22-llvm-r223147-arm-cpu-directive.diff head/contrib/llvm/patches/patch-21-llvm-r221170-ppc-vaarg.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-23-llvm-r221170-ppc-vaarg.diff head/contrib/llvm/patches/patch-22-llvm-r221791-ppc-small-pic.diff - copied, changed from r277299, head/contrib/llvm/patches/patch-24-llvm-r221791-ppc-small-pic.diff head/contrib/llvm/patches/patch-23-llvm-r224415-ppc-local.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-25-llvm-r224415-ppc-local.diff head/contrib/llvm/patches/patch-24-llvm-r213890-ppc-eh_frame.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-26-llvm-r213890-ppc-eh_frame.diff head/contrib/llvm/patches/patch-25-llvm-r224890-ppc-ctr-tls-loop.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-28-llvm-r224890-ppc-ctr-tls-loop.diff head/contrib/llvm/patches/patch-26-clang-r213790-type_traits-crash.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-29-clang-r213790-type_traits-crash.diff head/contrib/llvm/patches/patch-27-llvm-r222587-arm-add-pc.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-30-llvm-r222587-arm-add-pc.diff head/contrib/llvm/patches/patch-28-llvm-r222292-aarch64-no-neon.diff - copied unchanged from r277299, head/contrib/llvm/patches/patch-31-llvm-r222292-aarch64-no-neon.diff Deleted: head/contrib/llvm/patches/patch-07-llvm-r213960-ppc32-tls.diff head/contrib/llvm/patches/patch-08-llvm-r216989-r216990-fix-movw-armv6.diff head/contrib/llvm/patches/patch-09-clang-r217410-i386-garbage-float.diff head/contrib/llvm/patches/patch-10-llvm-r221709-debug-oom.diff head/contrib/llvm/patches/patch-11-llvm-r222562-loop-rotate.diff head/contrib/llvm/patches/patch-12-add-llvm-gvn-option.diff head/contrib/llvm/patches/patch-13-llvm-r218241-dwarf2-warning.diff head/contrib/llvm/patches/patch-14-llvm-r215352-aarch64-dyn-loader.diff head/contrib/llvm/patches/patch-15-llvm-r216571-dynamiclib-usability.diff head/contrib/llvm/patches/patch-16-clang-r221900-freebsd-aarch64.diff head/contrib/llvm/patches/patch-17-llvm-r222856-libapr-miscompile.diff head/contrib/llvm/patches/patch-18-llvm-r214802-armv6-cp10-cp11.diff head/contrib/llvm/patches/patch-19-llvm-r215811-arm-fpu-directive.diff head/contrib/llvm/patches/patch-20-enable-armv6-clrex.diff head/contrib/llvm/patches/patch-21-llvm-r223171-fix-vectorizer.diff head/contrib/llvm/patches/patch-22-llvm-r223147-arm-cpu-directive.diff head/contrib/llvm/patches/patch-23-llvm-r221170-ppc-vaarg.diff head/contrib/llvm/patches/patch-24-llvm-r221791-ppc-small-pic.diff head/contrib/llvm/patches/patch-25-llvm-r224415-ppc-local.diff head/contrib/llvm/patches/patch-26-llvm-r213890-ppc-eh_frame.diff head/contrib/llvm/patches/patch-27-llvm-r221703-ppc-tls_get_addr.diff head/contrib/llvm/patches/patch-28-llvm-r224890-ppc-ctr-tls-loop.diff head/contrib/llvm/patches/patch-29-clang-r213790-type_traits-crash.diff head/contrib/llvm/patches/patch-30-llvm-r222587-arm-add-pc.diff head/contrib/llvm/patches/patch-31-llvm-r222292-aarch64-no-neon.diff Modified: head/ObsoleteFiles.inc head/UPDATING head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/Target/TargetCallingConv.td head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.td head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp head/contrib/llvm/patches/README.TXT head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/utils/TableGen/CallingConvEmitter.cpp head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.include.dist head/etc/mtree/BSD.usr.dist head/lib/clang/include/Makefile head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/config.h head/lib/clang/libllvmmipscodegen/Makefile head/lib/libclang_rt/Makefile.inc head/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: head/contrib/llvm/ (props changed) head/contrib/llvm/tools/clang/ (props changed) Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Sun Jan 18 14:04:55 2015 (r277319) +++ head/ObsoleteFiles.inc Sun Jan 18 14:14:47 2015 (r277320) @@ -38,6 +38,60 @@ # xargs -n1 | sort | uniq -d; # done +# 20150118: new clang import which bumps version from 3.5.0 to 3.5.1. +OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_aes.h +OLD_FILES+=usr/include/clang/3.5.0/__wmmintrin_pclmul.h +OLD_FILES+=usr/include/clang/3.5.0/altivec.h +OLD_FILES+=usr/include/clang/3.5.0/ammintrin.h +OLD_FILES+=usr/include/clang/3.5.0/arm_acle.h +OLD_FILES+=usr/include/clang/3.5.0/arm_neon.h +OLD_FILES+=usr/include/clang/3.5.0/avx2intrin.h +OLD_FILES+=usr/include/clang/3.5.0/avxintrin.h +OLD_FILES+=usr/include/clang/3.5.0/bmi2intrin.h +OLD_FILES+=usr/include/clang/3.5.0/bmiintrin.h +OLD_FILES+=usr/include/clang/3.5.0/cpuid.h +OLD_FILES+=usr/include/clang/3.5.0/emmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/f16cintrin.h +OLD_FILES+=usr/include/clang/3.5.0/fma4intrin.h +OLD_FILES+=usr/include/clang/3.5.0/fmaintrin.h +OLD_FILES+=usr/include/clang/3.5.0/ia32intrin.h +OLD_FILES+=usr/include/clang/3.5.0/immintrin.h +OLD_FILES+=usr/include/clang/3.5.0/lzcntintrin.h +OLD_FILES+=usr/include/clang/3.5.0/mm3dnow.h +OLD_FILES+=usr/include/clang/3.5.0/mm_malloc.h +OLD_FILES+=usr/include/clang/3.5.0/mmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/module.modulemap +OLD_FILES+=usr/include/clang/3.5.0/nmmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/pmmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/popcntintrin.h +OLD_FILES+=usr/include/clang/3.5.0/prfchwintrin.h +OLD_FILES+=usr/include/clang/3.5.0/rdseedintrin.h +OLD_FILES+=usr/include/clang/3.5.0/rtmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/shaintrin.h +OLD_FILES+=usr/include/clang/3.5.0/smmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/tbmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/tmmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/wmmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/x86intrin.h +OLD_FILES+=usr/include/clang/3.5.0/xmmintrin.h +OLD_FILES+=usr/include/clang/3.5.0/xopintrin.h +OLD_DIRS+=usr/include/clang/3.5.0 +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.san-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan-x86_64.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.5.0/lib/freebsd/libclang_rt.ubsan_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.5.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.5.0/lib +OLD_DIRS+=usr/lib/clang/3.5.0 # 20150102: removal of texinfo OLD_FILES+=usr/bin/info OLD_FILES+=usr/bin/infokey Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Jan 18 14:04:55 2015 (r277319) +++ head/UPDATING Sun Jan 18 14:14:47 2015 (r277320) @@ -31,6 +31,12 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 11 disable the most expensive debugging functionality run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20150118: + Clang and llvm have been upgraded to 3.5.1 release. This is a bugfix + only release, no new features have been added. Please see the 20141231 + entry below for information about prerequisites and upgrading, if you + are not already using 3.5.0. + 20150107: ELF tools addr2line, elfcopy (strip), nm, size, and strings are now taken from the ELF Tool Chain project rather than GNU binutils. They Modified: head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h ============================================================================== --- head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h Sun Jan 18 14:14:47 2015 (r277320) @@ -253,13 +253,16 @@ private: const MDNode *TBAAInfo, bool KnownMustAlias = false); void addUnknownInst(Instruction *I, AliasAnalysis &AA); - void removeUnknownInst(Instruction *I) { + void removeUnknownInst(AliasSetTracker &AST, Instruction *I) { + bool WasEmpty = UnknownInsts.empty(); for (size_t i = 0, e = UnknownInsts.size(); i != e; ++i) if (UnknownInsts[i] == I) { UnknownInsts[i] = UnknownInsts.back(); UnknownInsts.pop_back(); --i; --e; // Revisit the moved entry. } + if (!WasEmpty && UnknownInsts.empty()) + dropRef(AST); } void setVolatile() { Volatile = true; } Modified: head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h ============================================================================== --- head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h Sun Jan 18 14:14:47 2015 (r277320) @@ -31,18 +31,25 @@ class TargetRegisterInfo; class CCValAssign { public: enum LocInfo { - Full, // The value fills the full location. - SExt, // The value is sign extended in the location. - ZExt, // The value is zero extended in the location. - AExt, // The value is extended with undefined upper bits. - BCvt, // The value is bit-converted in the location. - VExt, // The value is vector-widened in the location. - // FIXME: Not implemented yet. Code that uses AExt to mean - // vector-widen should be fixed to use VExt instead. - FPExt, // The floating-point value is fp-extended in the location. - Indirect // The location contains pointer to the value. + Full, // The value fills the full location. + SExt, // The value is sign extended in the location. + ZExt, // The value is zero extended in the location. + AExt, // The value is extended with undefined upper bits. + BCvt, // The value is bit-converted in the location. + VExt, // The value is vector-widened in the location. + // FIXME: Not implemented yet. Code that uses AExt to mean + // vector-widen should be fixed to use VExt instead. + FPExt, // The floating-point value is fp-extended in the location. + Indirect, // The location contains pointer to the value. + SExtUpper, // The value is in the upper bits of the location and should be + // sign extended when retrieved. + ZExtUpper, // The value is in the upper bits of the location and should be + // zero extended when retrieved. + AExtUpper // The value is in the upper bits of the location and should be + // extended with undefined upper bits when retrieved. // TODO: a subset of the value is in the location. }; + private: /// ValNo - This is the value number begin assigned (e.g. an argument number). unsigned ValNo; @@ -146,6 +153,9 @@ public: return (HTP == AExt || HTP == SExt || HTP == ZExt); } + bool isUpperBitsInLoc() const { + return HTP == AExtUpper || HTP == SExtUpper || HTP == ZExtUpper; + } }; /// CCAssignFn - This function assigns a location for Val, updating State to @@ -208,10 +218,10 @@ private: // while "%t" goes to the stack: it wouldn't be described in ByValRegs. // // Supposed use-case for this collection: - // 1. Initially ByValRegs is empty, InRegsParamsProceed is 0. + // 1. Initially ByValRegs is empty, InRegsParamsProcessed is 0. // 2. HandleByVal fillups ByValRegs. // 3. Argument analysis (LowerFormatArguments, for example). After - // some byval argument was analyzed, InRegsParamsProceed is increased. + // some byval argument was analyzed, InRegsParamsProcessed is increased. struct ByValInfo { ByValInfo(unsigned B, unsigned E, bool IsWaste = false) : Begin(B), End(E), Waste(IsWaste) {} @@ -229,9 +239,9 @@ private: }; SmallVector ByValRegs; - // InRegsParamsProceed - shows how many instances of ByValRegs was proceed + // InRegsParamsProcessed - shows how many instances of ByValRegs was proceed // during argument analysis. - unsigned InRegsParamsProceed; + unsigned InRegsParamsProcessed; protected: ParmContext CallOrPrologue; @@ -412,7 +422,7 @@ public: unsigned getInRegsParamsCount() const { return ByValRegs.size(); } // Returns count of byval in-regs arguments proceed. - unsigned getInRegsParamsProceed() const { return InRegsParamsProceed; } + unsigned getInRegsParamsProcessed() const { return InRegsParamsProcessed; } // Get information about N-th byval parameter that is stored in registers. // Here "ByValParamIndex" is N. @@ -436,20 +446,20 @@ public: // Returns false, if end is reached. bool nextInRegsParam() { unsigned e = ByValRegs.size(); - if (InRegsParamsProceed < e) - ++InRegsParamsProceed; - return InRegsParamsProceed < e; + if (InRegsParamsProcessed < e) + ++InRegsParamsProcessed; + return InRegsParamsProcessed < e; } // Clear byval registers tracking info. void clearByValRegsInfo() { - InRegsParamsProceed = 0; + InRegsParamsProcessed = 0; ByValRegs.clear(); } // Rewind byval registers tracking info. void rewindByValRegsInfo() { - InRegsParamsProceed = 0; + InRegsParamsProcessed = 0; } ParmContext getCallOrPrologue() const { return CallOrPrologue; } Modified: head/contrib/llvm/include/llvm/Target/TargetCallingConv.td ============================================================================== --- head/contrib/llvm/include/llvm/Target/TargetCallingConv.td Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/include/llvm/Target/TargetCallingConv.td Sun Jan 18 14:14:47 2015 (r277320) @@ -67,6 +67,9 @@ class CCIfSplit : CCIf<"ArgF /// the specified action. class CCIfSRet : CCIf<"ArgFlags.isSRet()", A> {} +/// CCIfVarArg - If the current function is vararg - apply the action +class CCIfVarArg : CCIf<"State.isVarArg()", A> {} + /// CCIfNotVarArg - If the current function is not vararg - apply the action class CCIfNotVarArg : CCIf<"!State.isVarArg()", A> {} @@ -119,6 +122,12 @@ class CCPromoteToType ValueType DestTy = destTy; } +/// CCPromoteToUpperBitsInType - If applied, this promotes the specified current +/// value to the specified type and shifts the value into the upper bits. +class CCPromoteToUpperBitsInType : CCAction { + ValueType DestTy = destTy; +} + /// CCBitConvertToType - If applied, this bitconverts the specified current /// value to the specified type. class CCBitConvertToType : CCAction { @@ -141,6 +150,13 @@ class CCDelegateTo : CCA /// that the target supports. class CallingConv actions> { list Actions = actions; + bit Custom = 0; +} + +/// CustomCallingConv - An instance of this is used to declare calling +/// conventions that are implemented using a custom function of the same name. +class CustomCallingConv : CallingConv<[]> { + let Custom = 1; } /// CalleeSavedRegs - A list of callee saved registers for a given calling Modified: head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -55,10 +55,13 @@ void AliasSet::mergeSetIn(AliasSet &AS, AliasTy = MayAlias; } + bool ASHadUnknownInsts = !AS.UnknownInsts.empty(); if (UnknownInsts.empty()) { // Merge call sites... - if (!AS.UnknownInsts.empty()) + if (ASHadUnknownInsts) { std::swap(UnknownInsts, AS.UnknownInsts); - } else if (!AS.UnknownInsts.empty()) { + addRef(); + } + } else if (ASHadUnknownInsts) { UnknownInsts.insert(UnknownInsts.end(), AS.UnknownInsts.begin(), AS.UnknownInsts.end()); AS.UnknownInsts.clear(); } @@ -76,6 +79,8 @@ void AliasSet::mergeSetIn(AliasSet &AS, AS.PtrListEnd = &AS.PtrList; assert(*AS.PtrListEnd == nullptr && "End of list is not null?"); } + if (ASHadUnknownInsts) + AS.dropRef(AST); } void AliasSetTracker::removeAliasSet(AliasSet *AS) { @@ -123,6 +128,8 @@ void AliasSet::addPointer(AliasSetTracke } void AliasSet::addUnknownInst(Instruction *I, AliasAnalysis &AA) { + if (UnknownInsts.empty()) + addRef(); UnknownInsts.push_back(I); if (!I->mayWriteToMemory()) { @@ -218,13 +225,14 @@ AliasSet *AliasSetTracker::findAliasSetF uint64_t Size, const MDNode *TBAAInfo) { AliasSet *FoundSet = nullptr; - for (iterator I = begin(), E = end(); I != E; ++I) { - if (I->Forward || !I->aliasesPointer(Ptr, Size, TBAAInfo, AA)) continue; + for (iterator I = begin(), E = end(); I != E;) { + iterator Cur = I++; + if (Cur->Forward || !Cur->aliasesPointer(Ptr, Size, TBAAInfo, AA)) continue; if (!FoundSet) { // If this is the first alias set ptr can go into. - FoundSet = I; // Remember it. + FoundSet = Cur; // Remember it. } else { // Otherwise, we must merge the sets. - FoundSet->mergeSetIn(*I, *this); // Merge in contents. + FoundSet->mergeSetIn(*Cur, *this); // Merge in contents. } } @@ -246,14 +254,14 @@ bool AliasSetTracker::containsPointer(Va AliasSet *AliasSetTracker::findAliasSetForUnknownInst(Instruction *Inst) { AliasSet *FoundSet = nullptr; - for (iterator I = begin(), E = end(); I != E; ++I) { - if (I->Forward || !I->aliasesUnknownInst(Inst, AA)) + for (iterator I = begin(), E = end(); I != E;) { + iterator Cur = I++; + if (Cur->Forward || !Cur->aliasesUnknownInst(Inst, AA)) continue; - if (!FoundSet) // If this is the first alias set ptr can go into. - FoundSet = I; // Remember it. - else if (!I->Forward) // Otherwise, we must merge the sets. - FoundSet->mergeSetIn(*I, *this); // Merge in contents. + FoundSet = Cur; // Remember it. + else if (!Cur->Forward) // Otherwise, we must merge the sets. + FoundSet->mergeSetIn(*Cur, *this); // Merge in contents. } return FoundSet; } @@ -393,6 +401,8 @@ void AliasSetTracker::add(const AliasSet /// tracker. void AliasSetTracker::remove(AliasSet &AS) { // Drop all call sites. + if (!AS.UnknownInsts.empty()) + AS.dropRef(*this); AS.UnknownInsts.clear(); // Clear the alias set. @@ -489,10 +499,10 @@ void AliasSetTracker::deleteValue(Value if (Instruction *Inst = dyn_cast(PtrVal)) { if (Inst->mayReadOrWriteMemory()) { // Scan all the alias sets to see if this call site is contained. - for (iterator I = begin(), E = end(); I != E; ++I) { - if (I->Forward) continue; - - I->removeUnknownInst(Inst); + for (iterator I = begin(), E = end(); I != E;) { + iterator Cur = I++; + if (!Cur->Forward) + Cur->removeUnknownInst(*this, Inst); } } } Modified: head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -14,7 +14,7 @@ #include "llvm/Analysis/BlockFrequencyInfoImpl.h" #include "llvm/ADT/SCCIterator.h" #include "llvm/Support/raw_ostream.h" -#include +#include using namespace llvm; using namespace llvm::bfi_detail; @@ -123,8 +123,12 @@ static void combineWeight(Weight &W, con } assert(W.Type == OtherW.Type); assert(W.TargetNode == OtherW.TargetNode); - assert(W.Amount < W.Amount + OtherW.Amount && "Unexpected overflow"); - W.Amount += OtherW.Amount; + assert(OtherW.Amount && "Expected non-zero weight"); + if (W.Amount > W.Amount + OtherW.Amount) + // Saturate on overflow. + W.Amount = UINT64_MAX; + else + W.Amount += OtherW.Amount; } static void combineWeightsBySorting(WeightList &Weights) { // Sort so edges to the same node are adjacent. @@ -207,11 +211,19 @@ void Distribution::normalize() { Shift = 33 - countLeadingZeros(Total); // Early exit if nothing needs to be scaled. - if (!Shift) + if (!Shift) { + // If we didn't overflow then combineWeights() shouldn't have changed the + // sum of the weights, but let's double-check. + assert(Total == std::accumulate(Weights.begin(), Weights.end(), UINT64_C(0), + [](uint64_t Sum, const Weight &W) { + return Sum + W.Amount; + }) && + "Expected total to be correct"); return; + } // Recompute the total through accumulation (rather than shifting it) so that - // it's accurate after shifting. + // it's accurate after shifting and any changes combineWeights() made above. Total = 0; // Sum the weights to each node and shift right if necessary. Modified: head/contrib/llvm/lib/Analysis/ValueTracking.cpp ============================================================================== --- head/contrib/llvm/lib/Analysis/ValueTracking.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Analysis/ValueTracking.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -1987,23 +1987,31 @@ bool llvm::isSafeToSpeculativelyExecute( default: return true; case Instruction::UDiv: - case Instruction::URem: - // x / y is undefined if y == 0, but calculations like x / 3 are safe. - return isKnownNonZero(Inst->getOperand(1), TD); + case Instruction::URem: { + // x / y is undefined if y == 0. + const APInt *V; + if (match(Inst->getOperand(1), m_APInt(V))) + return *V != 0; + return false; + } case Instruction::SDiv: case Instruction::SRem: { - Value *Op = Inst->getOperand(1); - // x / y is undefined if y == 0 - if (!isKnownNonZero(Op, TD)) - return false; - // x / y might be undefined if y == -1 - unsigned BitWidth = getBitWidth(Op->getType(), TD); - if (BitWidth == 0) - return false; - APInt KnownZero(BitWidth, 0); - APInt KnownOne(BitWidth, 0); - computeKnownBits(Op, KnownZero, KnownOne, TD); - return !!KnownZero; + // x / y is undefined if y == 0 or x == INT_MIN and y == -1 + const APInt *X, *Y; + if (match(Inst->getOperand(1), m_APInt(Y))) { + if (*Y != 0) { + if (*Y == -1) { + // The numerator can't be MinSignedValue if the denominator is -1. + if (match(Inst->getOperand(0), m_APInt(X))) + return !Y->isMinSignedValue(); + // The numerator *might* be MinSignedValue. + return false; + } + // The denominator is not 0 or -1, it's safe to proceed. + return true; + } + } + return false; } case Instruction::Load: { const LoadInst *LI = cast(Inst); Modified: head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp ============================================================================== --- head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -341,6 +341,8 @@ void MCObjectFileInfo::InitELFMCObjectFi break; case Triple::mips: case Triple::mipsel: + case Triple::mips64: + case Triple::mips64el: // MIPS uses indirect pointer to refer personality functions, so that the // eh_frame section can be read-only. DW.ref.personality will be generated // for relocation. Modified: head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -566,11 +566,59 @@ void ARMFrameLowering::emitPrologue(Mach AFI->setShouldRestoreSPFromFP(true); } +// Resolve TCReturn pseudo-instruction +void ARMFrameLowering::fixTCReturn(MachineFunction &MF, + MachineBasicBlock &MBB) const { + MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); + assert(MBBI->isReturn() && "Can only insert epilog into returning blocks"); + unsigned RetOpcode = MBBI->getOpcode(); + DebugLoc dl = MBBI->getDebugLoc(); + const ARMBaseInstrInfo &TII = + *MF.getTarget().getSubtarget().getInstrInfo(); + + if (!(RetOpcode == ARM::TCRETURNdi || RetOpcode == ARM::TCRETURNri)) + return; + + // Tail call return: adjust the stack pointer and jump to callee. + MBBI = MBB.getLastNonDebugInstr(); + MachineOperand &JumpTarget = MBBI->getOperand(0); + + // Jump to label or value in register. + if (RetOpcode == ARM::TCRETURNdi) { + unsigned TCOpcode = STI.isThumb() ? + (STI.isTargetMachO() ? ARM::tTAILJMPd : ARM::tTAILJMPdND) : + ARM::TAILJMPd; + MachineInstrBuilder MIB = BuildMI(MBB, MBBI, dl, TII.get(TCOpcode)); + if (JumpTarget.isGlobal()) + MIB.addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset(), + JumpTarget.getTargetFlags()); + else { + assert(JumpTarget.isSymbol()); + MIB.addExternalSymbol(JumpTarget.getSymbolName(), + JumpTarget.getTargetFlags()); + } + + // Add the default predicate in Thumb mode. + if (STI.isThumb()) MIB.addImm(ARMCC::AL).addReg(0); + } else if (RetOpcode == ARM::TCRETURNri) { + BuildMI(MBB, MBBI, dl, + TII.get(STI.isThumb() ? ARM::tTAILJMPr : ARM::TAILJMPr)). + addReg(JumpTarget.getReg(), RegState::Kill); + } + + MachineInstr *NewMI = std::prev(MBBI); + for (unsigned i = 1, e = MBBI->getNumOperands(); i != e; ++i) + NewMI->addOperand(MBBI->getOperand(i)); + + // Delete the pseudo instruction TCRETURN. + MBB.erase(MBBI); + MBBI = NewMI; +} + void ARMFrameLowering::emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const { MachineBasicBlock::iterator MBBI = MBB.getLastNonDebugInstr(); assert(MBBI->isReturn() && "Can only insert epilog into returning blocks"); - unsigned RetOpcode = MBBI->getOpcode(); DebugLoc dl = MBBI->getDebugLoc(); MachineFrameInfo *MFI = MF.getFrameInfo(); ARMFunctionInfo *AFI = MF.getInfo(); @@ -588,8 +636,10 @@ void ARMFrameLowering::emitEpilogue(Mach // All calls are tail calls in GHC calling conv, and functions have no // prologue/epilogue. - if (MF.getFunction()->getCallingConv() == CallingConv::GHC) + if (MF.getFunction()->getCallingConv() == CallingConv::GHC) { + fixTCReturn(MF, MBB); return; + } if (!AFI->hasStackFrame()) { if (NumBytes - ArgRegsSaveSize != 0) @@ -661,42 +711,7 @@ void ARMFrameLowering::emitEpilogue(Mach if (AFI->getGPRCalleeSavedArea1Size()) MBBI++; } - if (RetOpcode == ARM::TCRETURNdi || RetOpcode == ARM::TCRETURNri) { - // Tail call return: adjust the stack pointer and jump to callee. - MBBI = MBB.getLastNonDebugInstr(); - MachineOperand &JumpTarget = MBBI->getOperand(0); - - // Jump to label or value in register. - if (RetOpcode == ARM::TCRETURNdi) { - unsigned TCOpcode = STI.isThumb() ? - (STI.isTargetMachO() ? ARM::tTAILJMPd : ARM::tTAILJMPdND) : - ARM::TAILJMPd; - MachineInstrBuilder MIB = BuildMI(MBB, MBBI, dl, TII.get(TCOpcode)); - if (JumpTarget.isGlobal()) - MIB.addGlobalAddress(JumpTarget.getGlobal(), JumpTarget.getOffset(), - JumpTarget.getTargetFlags()); - else { - assert(JumpTarget.isSymbol()); - MIB.addExternalSymbol(JumpTarget.getSymbolName(), - JumpTarget.getTargetFlags()); - } - - // Add the default predicate in Thumb mode. - if (STI.isThumb()) MIB.addImm(ARMCC::AL).addReg(0); - } else if (RetOpcode == ARM::TCRETURNri) { - BuildMI(MBB, MBBI, dl, - TII.get(STI.isThumb() ? ARM::tTAILJMPr : ARM::TAILJMPr)). - addReg(JumpTarget.getReg(), RegState::Kill); - } - - MachineInstr *NewMI = std::prev(MBBI); - for (unsigned i = 1, e = MBBI->getNumOperands(); i != e; ++i) - NewMI->addOperand(MBBI->getOperand(i)); - - // Delete the pseudo instruction TCRETURN. - MBB.erase(MBBI); - MBBI = NewMI; - } + fixTCReturn(MF, MBB); if (ArgRegsSaveSize) emitSPUpdate(isARM, MBB, MBBI, dl, TII, ArgRegsSaveSize); Modified: head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h Sun Jan 18 14:14:47 2015 (r277320) @@ -31,6 +31,8 @@ public: void emitPrologue(MachineFunction &MF) const override; void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const override; + void fixTCReturn(MachineFunction &MF, MachineBasicBlock &MBB) const; + bool spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector &CSI, Modified: head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -1521,7 +1521,7 @@ ARMTargetLowering::LowerCall(TargetLower // True if this byval aggregate will be split between registers // and memory. unsigned ByValArgsCount = CCInfo.getInRegsParamsCount(); - unsigned CurByValIdx = CCInfo.getInRegsParamsProceed(); + unsigned CurByValIdx = CCInfo.getInRegsParamsProcessed(); if (CurByValIdx < ByValArgsCount) { @@ -2962,7 +2962,7 @@ ARMTargetLowering::LowerFormalArguments( if (Flags.isByVal()) { unsigned ExtraArgRegsSize; unsigned ExtraArgRegsSaveSize; - computeRegArea(CCInfo, MF, CCInfo.getInRegsParamsProceed(), + computeRegArea(CCInfo, MF, CCInfo.getInRegsParamsProcessed(), Flags.getByValSize(), ExtraArgRegsSize, ExtraArgRegsSaveSize); @@ -3086,7 +3086,7 @@ ARMTargetLowering::LowerFormalArguments( // Since they could be overwritten by lowering of arguments in case of // a tail call. if (Flags.isByVal()) { - unsigned CurByValIndex = CCInfo.getInRegsParamsProceed(); + unsigned CurByValIndex = CCInfo.getInRegsParamsProcessed(); ByValStoreOffset = RoundUpToAlignment(ByValStoreOffset, Flags.getByValAlign()); int FrameIndex = StoreByValRegs( Modified: head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -200,14 +200,14 @@ class MipsAsmParser : public MCTargetAsm // Example: INSERT.B $w0[n], $1 => 16 > n >= 0 bool validateMSAIndex(int Val, int RegKind); - void setFeatureBits(unsigned Feature, StringRef FeatureString) { + void setFeatureBits(uint64_t Feature, StringRef FeatureString) { if (!(STI.getFeatureBits() & Feature)) { setAvailableFeatures( ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); } } - void clearFeatureBits(unsigned Feature, StringRef FeatureString) { + void clearFeatureBits(uint64_t Feature, StringRef FeatureString) { if (STI.getFeatureBits() & Feature) { setAvailableFeatures( ComputeAvailableFeatures(STI.ToggleFeature(FeatureString))); Modified: head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -250,6 +250,11 @@ static DecodeStatus DecodeMem(MCInst &In uint64_t Address, const void *Decoder); +static DecodeStatus DecodeCacheOp(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder); + static DecodeStatus DecodeMSA128Mem(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder); @@ -267,6 +272,14 @@ static DecodeStatus DecodeFMem(MCInst &I uint64_t Address, const void *Decoder); +static DecodeStatus DecodeFMem2(MCInst &Inst, unsigned Insn, + uint64_t Address, + const void *Decoder); + +static DecodeStatus DecodeFMem3(MCInst &Inst, unsigned Insn, + uint64_t Address, + const void *Decoder); + static DecodeStatus DecodeSpecial3LlSc(MCInst &Inst, unsigned Insn, uint64_t Address, @@ -451,7 +464,7 @@ static DecodeStatus DecodeAddiGroupBranc InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rs >= Rt) { @@ -490,7 +503,7 @@ static DecodeStatus DecodeDaddiGroupBran InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rs >= Rt) { @@ -530,7 +543,7 @@ static DecodeStatus DecodeBlezlGroupBran InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rt == 0) @@ -575,7 +588,7 @@ static DecodeStatus DecodeBgtzlGroupBran InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; if (Rt == 0) return MCDisassembler::Fail; @@ -617,7 +630,7 @@ static DecodeStatus DecodeBgtzGroupBranc InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; bool HasRt = false; @@ -666,7 +679,7 @@ static DecodeStatus DecodeBlezGroupBranc InsnType Rs = fieldFromInstruction(insn, 21, 5); InsnType Rt = fieldFromInstruction(insn, 16, 5); - InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) << 2; + InsnType Imm = SignExtend64(fieldFromInstruction(insn, 0, 16), 16) * 4; bool HasRs = false; if (Rt == 0) @@ -964,6 +977,23 @@ static DecodeStatus DecodeMem(MCInst &In return MCDisassembler::Success; } +static DecodeStatus DecodeCacheOp(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Hint = fieldFromInstruction(Insn, 16, 5); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + + Inst.addOperand(MCOperand::CreateReg(Base)); + Inst.addOperand(MCOperand::CreateImm(Offset)); + Inst.addOperand(MCOperand::CreateImm(Hint)); + + return MCDisassembler::Success; +} + static DecodeStatus DecodeMSA128Mem(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { int Offset = SignExtend32<10>(fieldFromInstruction(Insn, 16, 10)); @@ -995,15 +1025,15 @@ static DecodeStatus DecodeMSA128Mem(MCIn break; case Mips::LD_H: case Mips::ST_H: - Inst.addOperand(MCOperand::CreateImm(Offset << 1)); + Inst.addOperand(MCOperand::CreateImm(Offset * 2)); break; case Mips::LD_W: case Mips::ST_W: - Inst.addOperand(MCOperand::CreateImm(Offset << 2)); + Inst.addOperand(MCOperand::CreateImm(Offset * 4)); break; case Mips::LD_D: case Mips::ST_D: - Inst.addOperand(MCOperand::CreateImm(Offset << 3)); + Inst.addOperand(MCOperand::CreateImm(Offset * 8)); break; } @@ -1067,6 +1097,42 @@ static DecodeStatus DecodeFMem(MCInst &I return MCDisassembler::Success; } +static DecodeStatus DecodeFMem2(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Reg = fieldFromInstruction(Insn, 16, 5); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + + Reg = getReg(Decoder, Mips::COP2RegClassID, Reg); + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + + Inst.addOperand(MCOperand::CreateReg(Reg)); + Inst.addOperand(MCOperand::CreateReg(Base)); + Inst.addOperand(MCOperand::CreateImm(Offset)); + + return MCDisassembler::Success; +} + +static DecodeStatus DecodeFMem3(MCInst &Inst, + unsigned Insn, + uint64_t Address, + const void *Decoder) { + int Offset = SignExtend32<16>(Insn & 0xffff); + unsigned Reg = fieldFromInstruction(Insn, 16, 5); + unsigned Base = fieldFromInstruction(Insn, 21, 5); + + Reg = getReg(Decoder, Mips::COP3RegClassID, Reg); + Base = getReg(Decoder, Mips::GPR32RegClassID, Base); + + Inst.addOperand(MCOperand::CreateReg(Reg)); + Inst.addOperand(MCOperand::CreateReg(Base)); + Inst.addOperand(MCOperand::CreateImm(Offset)); + + return MCDisassembler::Success; +} + static DecodeStatus DecodeSpecial3LlSc(MCInst &Inst, unsigned Insn, uint64_t Address, @@ -1225,7 +1291,7 @@ static DecodeStatus DecodeBranchTarget(M unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = (SignExtend32<16>(Offset) << 2) + 4; + int32_t BranchOffset = (SignExtend32<16>(Offset) * 4) + 4; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; } @@ -1244,7 +1310,7 @@ static DecodeStatus DecodeBranchTarget21 unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = SignExtend32<21>(Offset) << 2; + int32_t BranchOffset = SignExtend32<21>(Offset) * 4; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; @@ -1254,7 +1320,7 @@ static DecodeStatus DecodeBranchTarget26 unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = SignExtend32<26>(Offset) << 2; + int32_t BranchOffset = SignExtend32<26>(Offset) * 4; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; @@ -1264,7 +1330,7 @@ static DecodeStatus DecodeBranchTargetMM unsigned Offset, uint64_t Address, const void *Decoder) { - int32_t BranchOffset = SignExtend32<16>(Offset) << 1; + int32_t BranchOffset = SignExtend32<16>(Offset) * 2; Inst.addOperand(MCOperand::CreateImm(BranchOffset)); return MCDisassembler::Success; } @@ -1317,12 +1383,12 @@ static DecodeStatus DecodeExtSize(MCInst static DecodeStatus DecodeSimm19Lsl2(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { - Inst.addOperand(MCOperand::CreateImm(SignExtend32<19>(Insn) << 2)); + Inst.addOperand(MCOperand::CreateImm(SignExtend32<19>(Insn) * 4)); return MCDisassembler::Success; } static DecodeStatus DecodeSimm18Lsl3(MCInst &Inst, unsigned Insn, uint64_t Address, const void *Decoder) { - Inst.addOperand(MCOperand::CreateImm(SignExtend32<18>(Insn) << 3)); + Inst.addOperand(MCOperand::CreateImm(SignExtend32<18>(Insn) * 8)); return MCDisassembler::Success; } Modified: head/contrib/llvm/lib/Target/Mips/Mips.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips.td Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/Mips/Mips.td Sun Jan 18 14:14:47 2015 (r277320) @@ -57,6 +57,8 @@ def MipsInstrInfo : InstrInfo; // Mips Subtarget features // //===----------------------------------------------------------------------===// +def FeatureNoABICalls : SubtargetFeature<"noabicalls", "NoABICalls", "true", + "Disable SVR4-style position-independent code.">; def FeatureGP64Bit : SubtargetFeature<"gp64", "IsGP64bit", "true", "General Purpose Registers are 64-bit wide.">; def FeatureFP64Bit : SubtargetFeature<"fp64", "IsFP64bit", "true", @@ -67,13 +69,13 @@ def FeatureNaN2008 : SubtargetFeatur "IEEE 754-2008 NaN encoding.">; def FeatureSingleFloat : SubtargetFeature<"single-float", "IsSingleFloat", "true", "Only supports single precision float">; -def FeatureO32 : SubtargetFeature<"o32", "MipsABI", "O32", +def FeatureO32 : SubtargetFeature<"o32", "ABI", "MipsABIInfo::O32()", "Enable o32 ABI">; -def FeatureN32 : SubtargetFeature<"n32", "MipsABI", "N32", +def FeatureN32 : SubtargetFeature<"n32", "ABI", "MipsABIInfo::N32()", "Enable n32 ABI">; -def FeatureN64 : SubtargetFeature<"n64", "MipsABI", "N64", +def FeatureN64 : SubtargetFeature<"n64", "ABI", "MipsABIInfo::N64()", "Enable n64 ABI">; -def FeatureEABI : SubtargetFeature<"eabi", "MipsABI", "EABI", +def FeatureEABI : SubtargetFeature<"eabi", "ABI", "MipsABIInfo::EABI()", "Enable eabi ABI">; def FeatureNoOddSPReg : SubtargetFeature<"nooddspreg", "UseOddSPReg", "false", "Disable odd numbered single-precision " Modified: head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp Sun Jan 18 14:14:47 2015 (r277320) @@ -241,10 +241,9 @@ Mips16TargetLowering::EmitInstrWithCusto } } -bool Mips16TargetLowering:: -isEligibleForTailCallOptimization(const MipsCC &MipsCCInfo, - unsigned NextStackOffset, - const MipsFunctionInfo& FI) const { +bool Mips16TargetLowering::isEligibleForTailCallOptimization( + const CCState &CCInfo, unsigned NextStackOffset, + const MipsFunctionInfo &FI) const { // No tail call optimization for mips16. return false; } Modified: head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h Sun Jan 18 14:14:47 2015 (r277320) @@ -30,9 +30,9 @@ namespace llvm { MachineBasicBlock *MBB) const override; private: - bool isEligibleForTailCallOptimization(const MipsCC &MipsCCInfo, - unsigned NextStackOffset, - const MipsFunctionInfo& FI) const override; + bool isEligibleForTailCallOptimization( + const CCState &CCInfo, unsigned NextStackOffset, + const MipsFunctionInfo &FI) const override; void setMips16HardFloatLibCalls(); Modified: head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td ============================================================================== --- head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Sun Jan 18 14:04:55 2015 (r277319) +++ head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td Sun Jan 18 14:14:47 2015 (r277320) @@ -419,6 +419,10 @@ defm : SetgePats; defm : SetgeImmPats; // truncate +def : MipsPat<(trunc (assertsext GPR64:$src)), + (EXTRACT_SUBREG GPR64:$src, sub_32)>; +def : MipsPat<(trunc (assertzext GPR64:$src)), + (EXTRACT_SUBREG GPR64:$src, sub_32)>; def : MipsPat<(i32 (trunc GPR64:$src)), (SLL (EXTRACT_SUBREG GPR64:$src, sub_32), 0)>; Copied: head/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp (from r277223, vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.cpp) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/lib/Target/Mips/MipsABIInfo.cpp Sun Jan 18 14:14:47 2015 (r277320, copy of r277223, vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.cpp) @@ -0,0 +1,45 @@ +//===---- MipsABIInfo.cpp - Information about MIPS ABI's ------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#include "MipsABIInfo.h" +#include "MipsRegisterInfo.h" + +using namespace llvm; + +namespace { +static const MCPhysReg O32IntRegs[4] = {Mips::A0, Mips::A1, Mips::A2, Mips::A3}; + +static const MCPhysReg Mips64IntRegs[8] = { + Mips::A0_64, Mips::A1_64, Mips::A2_64, Mips::A3_64, + Mips::T0_64, Mips::T1_64, Mips::T2_64, Mips::T3_64}; +} + +const ArrayRef MipsABIInfo::GetByValArgRegs() const { + if (IsO32()) + return makeArrayRef(O32IntRegs); + if (IsN32() || IsN64()) + return makeArrayRef(Mips64IntRegs); + llvm_unreachable("Unhandled ABI"); +} + +const ArrayRef MipsABIInfo::GetVarArgRegs() const { + if (IsO32()) + return makeArrayRef(O32IntRegs); + if (IsN32() || IsN64()) + return makeArrayRef(Mips64IntRegs); + llvm_unreachable("Unhandled ABI"); +} + +unsigned MipsABIInfo::GetCalleeAllocdArgSizeInBytes(CallingConv::ID CC) const { + if (IsO32()) + return CC != CallingConv::Fast ? 16 : 0; + if (IsN32() || IsN64() || IsEABI()) + return 0; + llvm_unreachable("Unhandled ABI"); +} Copied: head/contrib/llvm/lib/Target/Mips/MipsABIInfo.h (from r277223, vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/llvm/lib/Target/Mips/MipsABIInfo.h Sun Jan 18 14:14:47 2015 (r277320, copy of r277223, vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.h) @@ -0,0 +1,61 @@ +//===---- MipsABIInfo.h - Information about MIPS ABI's --------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef MIPSABIINFO_H +#define MIPSABIINFO_H + +#include "llvm/ADT/ArrayRef.h" +#include "llvm/MC/MCRegisterInfo.h" +#include "llvm/IR/CallingConv.h" + +namespace llvm { + +class MipsABIInfo { +public: + enum class ABI { Unknown, O32, N32, N64, EABI }; + +protected: + ABI ThisABI; + *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 15:03:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 345AC47B; Sun, 18 Jan 2015 15:03:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 153BD8D5; Sun, 18 Jan 2015 15:03:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IF3R5V079512; Sun, 18 Jan 2015 15:03:27 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IF3RXg079509; Sun, 18 Jan 2015 15:03:27 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501181503.t0IF3RXg079509@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Jan 2015 15:03:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277321 - in head/sys: fs/fifofs kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 15:03:28 -0000 Author: kib Date: Sun Jan 18 15:03:26 2015 New Revision: 277321 URL: https://svnweb.freebsd.org/changeset/base/277321 Log: Make SIGSTOP working for sleeps done while waiting for fifo readers or writers in open(2), when the fifo is located on an NFS mount. Reported by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/fifofs/fifo_vnops.c head/sys/kern/kern_sig.c head/sys/sys/signalvar.h Modified: head/sys/fs/fifofs/fifo_vnops.c ============================================================================== --- head/sys/fs/fifofs/fifo_vnops.c Sun Jan 18 14:14:47 2015 (r277320) +++ head/sys/fs/fifofs/fifo_vnops.c Sun Jan 18 15:03:26 2015 (r277321) @@ -137,7 +137,7 @@ fifo_open(ap) struct thread *td; struct fifoinfo *fip; struct pipe *fpipe; - int error; + int error, stops_deferred; vp = ap->a_vp; fp = ap->a_fp; @@ -188,8 +188,11 @@ fifo_open(ap) if ((ap->a_mode & O_NONBLOCK) == 0) { if ((ap->a_mode & FREAD) && fip->fi_writers == 0) { VOP_UNLOCK(vp, 0); + stops_deferred = sigallowstop(); error = msleep(&fip->fi_readers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoor", 0); + if (stops_deferred) + sigdeferstop(); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error) { fip->fi_readers--; @@ -212,8 +215,11 @@ fifo_open(ap) } if ((ap->a_mode & FWRITE) && fip->fi_readers == 0) { VOP_UNLOCK(vp, 0); + stops_deferred = sigallowstop(); error = msleep(&fip->fi_writers, PIPE_MTX(fpipe), PDROP | PCATCH | PSOCK, "fifoow", 0); + if (stops_deferred) + sigdeferstop(); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); if (error) { fip->fi_writers--; Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Jan 18 14:14:47 2015 (r277320) +++ head/sys/kern/kern_sig.c Sun Jan 18 15:03:26 2015 (r277321) @@ -2587,15 +2587,18 @@ sigdeferstop(void) * not immediately suspend if a stop was posted. Instead, the thread * will suspend either via ast() or a subsequent interruptible sleep. */ -void -sigallowstop() +int +sigallowstop(void) { struct thread *td; + int prev; td = curthread; thread_lock(td); + prev = (td->td_flags & TDF_SBDRY) != 0; td->td_flags &= ~TDF_SBDRY; thread_unlock(td); + return (prev); } /* Modified: head/sys/sys/signalvar.h ============================================================================== --- head/sys/sys/signalvar.h Sun Jan 18 14:14:47 2015 (r277320) +++ head/sys/sys/signalvar.h Sun Jan 18 15:03:26 2015 (r277321) @@ -325,7 +325,7 @@ extern struct mtx sigio_lock; int cursig(struct thread *td); int sigdeferstop(void); -void sigallowstop(void); +int sigallowstop(void); void execsigs(struct proc *p); void gsignal(int pgid, int sig, ksiginfo_t *ksi); void killproc(struct proc *p, char *why); From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 15:13:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C13BE7D3; Sun, 18 Jan 2015 15:13:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AB94D9A2; Sun, 18 Jan 2015 15:13:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IFDE8M084176; Sun, 18 Jan 2015 15:13:14 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IFDBLu084161; Sun, 18 Jan 2015 15:13:11 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501181513.t0IFDBLu084161@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sun, 18 Jan 2015 15:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277322 - in head: lib/libc/sys sys/compat/freebsd32 sys/kern sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 15:13:14 -0000 Author: kib Date: Sun Jan 18 15:13:11 2015 New Revision: 277322 URL: https://svnweb.freebsd.org/changeset/base/277322 Log: Add procctl(2) PROC_TRACE_CTL command to enable or disable debugger attachment to the process. Note that the command is not intended to be a security measure, rather it is an obfuscation feature, implemented for parity with other operating systems. Discussed with: jilles, rwatson Man page fixes by: rwatson Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/lib/libc/sys/procctl.2 head/sys/compat/freebsd32/freebsd32_misc.c head/sys/kern/kern_exec.c head/sys/kern/kern_fork.c head/sys/kern/kern_procctl.c head/sys/kern/kern_prot.c head/sys/kern/kern_sig.c head/sys/sys/priv.h head/sys/sys/proc.h head/sys/sys/procctl.h Modified: head/lib/libc/sys/procctl.2 ============================================================================== --- head/lib/libc/sys/procctl.2 Sun Jan 18 15:03:26 2015 (r277321) +++ head/lib/libc/sys/procctl.2 Sun Jan 18 15:13:11 2015 (r277322) @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 16, 2014 +.Dd December 29, 2014 .Dt PROCCTL 2 .Os .Sh NAME @@ -275,7 +275,61 @@ delivery failed, e.g. due to the permiss If no such process exist, the .Fa rk_fpid field is set to -1. +.It Dv PROC_TRACE_CTL +Enable or disable tracing of the specified process(es), according to the +value of the integer argument. +Tracing includes attachment to the process using +.Xr ptrace 2 +and +.Xr ktrace 2 , +debugging sysctls, +.Xr hwpmc 4 , +.Xr dtrace 1 +and core dumping. +Possible values for the +.Fa data +argument are: +.Bl -tag -width "Dv PROC_TRACE_CTL_DISABLE_EXEC" +.It Dv PROC_TRACE_CTL_ENABLE +Enable tracing, after it was disabled by +.Dv PROC_TRACE_CTL_DISABLE . +Only allowed for self. +.It Dv PROC_TRACE_CTL_DISABLE +Disable tracing for the specified process. +Tracing is re-enabled when the process changes the executing +program with +.Xr execve 2 +syscall. +A child inherits the trace settings from the parent on +.Xr fork 2 . +.It Dv PROC_TRACE_CTL_DISABLE_EXEC +Same as +.Dv PROC_TRACE_CTL_DISABLE , +but the setting persist for the process even after +.Xr execve 2 . +.El +.It Dv PROC_TRACE_STATUS +Returns the current tracing status for the specified process in +the integer variable pointed to by +.Fa data . +If tracing is disabled, +.Fa data +is set to -1. +If tracing is enabled, but no debugger is attached by +.Xr ptrace 2 +syscall, +.Fa data +is set to 0. +If a debugger is attached, +.Fa data +is set to the pid of the debugger process. .El +.Sh NOTES +Disabling tracing on a process should not be considered a security +feature, as it is bypassable both by the kernel and privileged processes, +and via other system mechanisms. +As such, it should not be relied on to reliably protect cryptographic +keying material or other confidential data. .Sh RETURN VALUES If an error occurs, a value of -1 is returned and .Va errno @@ -343,11 +397,34 @@ The .Dv PROC_REAP_ACQUIRE request was issued by a process that had already acquired reaper status and has not yet released it. +.It Bq Er EBUSY +The +.Dv PROC_TRACE_CTL +request was issued for a process already being traced. +.It Bq Er EPERM +The +.Dv PROC_TRACE_CTL +request to re-enable tracing of the process ( +.Dv PROC_TRACE_CTL_ENABLE ) , +or to disable persistence of the +.Dv PROC_TRACE_CTL_DISABLE +on +.Xr execve 2 +was issued for a non-current process. +.It Bq Er EINVAL +The value of the integer +.Fa data +parameter for the +.Dv PROC_TRACE_CTL +request is invalid. .El .Sh SEE ALSO +.Xr dtrace 1 , .Xr kill 2 , +.Xr ktrace 2 , .Xr ptrace 2 , .Xr wait 2 , +.Xr hwpmc 4 , .Xr init 8 .Sh HISTORY The Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/compat/freebsd32/freebsd32_misc.c Sun Jan 18 15:13:11 2015 (r277322) @@ -2969,6 +2969,7 @@ freebsd32_procctl(struct thread *td, str switch (uap->com) { case PROC_SPROTECT: + case PROC_TRACE_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -2997,6 +2998,9 @@ freebsd32_procctl(struct thread *td, str return (error); data = &x.rk; break; + case PROC_TRACE_STATUS: + data = &flags; + break; default: return (EINVAL); } @@ -3012,6 +3016,10 @@ freebsd32_procctl(struct thread *td, str if (error == 0) error = error1; break; + case PROC_TRACE_STATUS: + if (error == 0) + error = copyout(&flags, uap->data, sizeof(flags)); + break; } return (error); } Modified: head/sys/kern/kern_exec.c ============================================================================== --- head/sys/kern/kern_exec.c Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/kern/kern_exec.c Sun Jan 18 15:13:11 2015 (r277322) @@ -634,6 +634,8 @@ interpret: * it that it now has its own resources back */ p->p_flag |= P_EXEC; + if ((p->p_flag2 & P2_NOTRACE_EXEC) == 0) + p->p_flag2 &= ~P2_NOTRACE; if (p->p_flag & P_PPWAIT) { p->p_flag &= ~(P_PPWAIT | P_PPTRACE); cv_broadcast(&p->p_pwait); Modified: head/sys/kern/kern_fork.c ============================================================================== --- head/sys/kern/kern_fork.c Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/kern/kern_fork.c Sun Jan 18 15:13:11 2015 (r277322) @@ -494,7 +494,7 @@ do_fork(struct thread *td, int flags, st * Increase reference counts on shared objects. */ p2->p_flag = P_INMEM; - p2->p_flag2 = 0; + p2->p_flag2 = p1->p_flag2 & (P2_NOTRACE | P2_NOTRACE_EXEC); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); Modified: head/sys/kern/kern_procctl.c ============================================================================== --- head/sys/kern/kern_procctl.c Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/kern/kern_procctl.c Sun Jan 18 15:13:11 2015 (r277322) @@ -280,6 +280,62 @@ reap_kill(struct thread *td, struct proc return (error); } +static int +trace_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + /* + * Ktrace changes p_traceflag from or to zero under the + * process lock, so the test does not need to acquire ktrace + * mutex. + */ + if ((p->p_flag & P_TRACED) != 0 || p->p_traceflag != 0) + return (EBUSY); + + switch (state) { + case PROC_TRACE_CTL_ENABLE: + if (td->td_proc != p) + return (EPERM); + p->p_flag2 &= ~(P2_NOTRACE | P2_NOTRACE_EXEC); + break; + case PROC_TRACE_CTL_DISABLE_EXEC: + p->p_flag2 |= P2_NOTRACE_EXEC | P2_NOTRACE; + break; + case PROC_TRACE_CTL_DISABLE: + if ((p->p_flag2 & P2_NOTRACE_EXEC) != 0) { + KASSERT((p->p_flag2 & P2_NOTRACE) != 0, + ("dandling P2_NOTRACE_EXEC")); + if (td->td_proc != p) + return (EPERM); + p->p_flag2 &= ~P2_NOTRACE_EXEC; + } else { + p->p_flag2 |= P2_NOTRACE; + } + break; + default: + return (EINVAL); + } + return (0); +} + +static int +trace_status(struct thread *td, struct proc *p, int *data) +{ + + if ((p->p_flag2 & P2_NOTRACE) != 0) { + KASSERT((p->p_flag & P_TRACED) == 0, + ("%d traced but tracing disabled", p->p_pid)); + *data = -1; + } else if ((p->p_flag & P_TRACED) != 0) { + *data = p->p_pptr->p_pid; + } else { + *data = 0; + } + return (0); +} + #ifndef _SYS_SYSPROTO_H_ struct procctl_args { idtype_t idtype; @@ -302,6 +358,7 @@ sys_procctl(struct thread *td, struct pr switch (uap->com) { case PROC_SPROTECT: + case PROC_TRACE_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -328,6 +385,9 @@ sys_procctl(struct thread *td, struct pr return (error); data = &x.rk; break; + case PROC_TRACE_STATUS: + data = &flags; + break; default: return (EINVAL); } @@ -342,6 +402,10 @@ sys_procctl(struct thread *td, struct pr if (error == 0) error = error1; break; + case PROC_TRACE_STATUS: + if (error == 0) + error = copyout(&flags, uap->data, sizeof(flags)); + break; } return (error); } @@ -364,6 +428,10 @@ kern_procctl_single(struct thread *td, s return (reap_getpids(td, p, data)); case PROC_REAP_KILL: return (reap_kill(td, p, data)); + case PROC_TRACE_CTL: + return (trace_ctl(td, p, *(int *)data)); + case PROC_TRACE_STATUS: + return (trace_status(td, p, data)); default: return (EINVAL); } @@ -375,6 +443,7 @@ kern_procctl(struct thread *td, idtype_t struct pgrp *pg; struct proc *p; int error, first_error, ok; + bool tree_locked; switch (com) { case PROC_REAP_ACQUIRE: @@ -382,6 +451,7 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_STATUS: case PROC_REAP_GETPIDS: case PROC_REAP_KILL: + case PROC_TRACE_STATUS: if (idtype != P_PID) return (EINVAL); } @@ -391,11 +461,17 @@ kern_procctl(struct thread *td, idtype_t case PROC_REAP_STATUS: case PROC_REAP_GETPIDS: case PROC_REAP_KILL: + case PROC_TRACE_CTL: sx_slock(&proctree_lock); + tree_locked = true; break; case PROC_REAP_ACQUIRE: case PROC_REAP_RELEASE: sx_xlock(&proctree_lock); + tree_locked = true; + break; + case PROC_TRACE_STATUS: + tree_locked = false; break; default: return (EINVAL); @@ -456,6 +532,7 @@ kern_procctl(struct thread *td, idtype_t error = EINVAL; break; } - sx_unlock(&proctree_lock); + if (tree_locked) + sx_unlock(&proctree_lock); return (error); } Modified: head/sys/kern/kern_prot.c ============================================================================== --- head/sys/kern/kern_prot.c Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/kern/kern_prot.c Sun Jan 18 15:13:11 2015 (r277322) @@ -1714,6 +1714,13 @@ p_candebug(struct thread *td, struct pro if ((p->p_flag & P_INEXEC) != 0) return (EBUSY); + /* Denied explicitely */ + if ((p->p_flag2 & P2_NOTRACE) != 0) { + error = priv_check(td, PRIV_DEBUG_DENIED); + if (error != 0) + return (error); + } + return (0); } Modified: head/sys/kern/kern_sig.c ============================================================================== --- head/sys/kern/kern_sig.c Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/kern/kern_sig.c Sun Jan 18 15:13:11 2015 (r277322) @@ -3247,7 +3247,8 @@ coredump(struct thread *td) MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); _STOPEVENT(p, S_CORE, 0); - if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0)) { + if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0) || + (p->p_flag2 & P2_NOTRACE) != 0) { PROC_UNLOCK(p); return (EFAULT); } Modified: head/sys/sys/priv.h ============================================================================== --- head/sys/sys/priv.h Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/sys/priv.h Sun Jan 18 15:13:11 2015 (r277322) @@ -111,6 +111,7 @@ #define PRIV_DEBUG_DIFFCRED 80 /* Exempt debugging other users. */ #define PRIV_DEBUG_SUGID 81 /* Exempt debugging setuid proc. */ #define PRIV_DEBUG_UNPRIV 82 /* Exempt unprivileged debug limit. */ +#define PRIV_DEBUG_DENIED 83 /* Exempt P2_NOTRACE. */ /* * Dtrace privileges. Modified: head/sys/sys/proc.h ============================================================================== --- head/sys/sys/proc.h Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/sys/proc.h Sun Jan 18 15:13:11 2015 (r277322) @@ -675,6 +675,8 @@ struct proc { /* These flags are kept in p_flag2. */ #define P2_INHERIT_PROTECTED 0x00000001 /* New children get P_PROTECTED. */ +#define P2_NOTRACE 0x00000002 /* No ptrace(2) attach or coredumps. */ +#define P2_NOTRACE_EXEC 0x00000004 /* Keep P2_NOPTRACE on exec(2). */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ Modified: head/sys/sys/procctl.h ============================================================================== --- head/sys/sys/procctl.h Sun Jan 18 15:03:26 2015 (r277321) +++ head/sys/sys/procctl.h Sun Jan 18 15:13:11 2015 (r277322) @@ -41,6 +41,8 @@ #define PROC_REAP_STATUS 4 /* reaping status */ #define PROC_REAP_GETPIDS 5 /* get descendants */ #define PROC_REAP_KILL 6 /* kill descendants */ +#define PROC_TRACE_CTL 7 /* en/dis ptrace and coredumps */ +#define PROC_TRACE_STATUS 8 /* query tracing status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -96,6 +98,10 @@ struct procctl_reaper_kill { #define REAPER_KILL_CHILDREN 0x00000001 #define REAPER_KILL_SUBTREE 0x00000002 +#define PROC_TRACE_CTL_ENABLE 1 +#define PROC_TRACE_CTL_DISABLE 2 +#define PROC_TRACE_CTL_DISABLE_EXEC 3 + #ifndef _KERNEL __BEGIN_DECLS int procctl(idtype_t, id_t, int, void *); From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 16:17:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D9FC522E; Sun, 18 Jan 2015 16:17:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEDBCEE5; Sun, 18 Jan 2015 16:17:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IGHbsS013093; Sun, 18 Jan 2015 16:17:37 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IGHXEZ013076; Sun, 18 Jan 2015 16:17:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501181617.t0IGHXEZ013076@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Jan 2015 16:17:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277323 - in vendor/llvm/dist: . autoconf bindings bindings/go bindings/go/llvm bindings/ocaml bindings/ocaml/all_backends bindings/ocaml/analysis bindings/ocaml/backends bindings/ocaml... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 16:17:38 -0000 Author: dim Date: Sun Jan 18 16:17:27 2015 New Revision: 277323 URL: https://svnweb.freebsd.org/changeset/base/277323 Log: Vendor import of llvm RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): https://llvm.org/svn/llvm-project/llvm/tags/RELEASE_360/rc1@226102 Added: vendor/llvm/dist/.clang-tidy vendor/llvm/dist/bindings/go/ vendor/llvm/dist/bindings/go/README.txt (contents, props changed) vendor/llvm/dist/bindings/go/build.sh (contents, props changed) vendor/llvm/dist/bindings/go/conftest.go vendor/llvm/dist/bindings/go/llvm/ vendor/llvm/dist/bindings/go/llvm/DIBuilderBindings.cpp (contents, props changed) vendor/llvm/dist/bindings/go/llvm/DIBuilderBindings.h (contents, props changed) vendor/llvm/dist/bindings/go/llvm/IRBindings.cpp (contents, props changed) vendor/llvm/dist/bindings/go/llvm/IRBindings.h (contents, props changed) vendor/llvm/dist/bindings/go/llvm/InstrumentationBindings.cpp (contents, props changed) vendor/llvm/dist/bindings/go/llvm/InstrumentationBindings.h (contents, props changed) vendor/llvm/dist/bindings/go/llvm/SupportBindings.cpp (contents, props changed) vendor/llvm/dist/bindings/go/llvm/SupportBindings.h (contents, props changed) vendor/llvm/dist/bindings/go/llvm/analysis.go vendor/llvm/dist/bindings/go/llvm/bitreader.go vendor/llvm/dist/bindings/go/llvm/bitwriter.go vendor/llvm/dist/bindings/go/llvm/dibuilder.go vendor/llvm/dist/bindings/go/llvm/executionengine.go vendor/llvm/dist/bindings/go/llvm/executionengine_test.go vendor/llvm/dist/bindings/go/llvm/ir.go vendor/llvm/dist/bindings/go/llvm/ir_test.go vendor/llvm/dist/bindings/go/llvm/linker.go vendor/llvm/dist/bindings/go/llvm/llvm_config.go.in (contents, props changed) vendor/llvm/dist/bindings/go/llvm/llvm_dep.go vendor/llvm/dist/bindings/go/llvm/string.go vendor/llvm/dist/bindings/go/llvm/string_test.go vendor/llvm/dist/bindings/go/llvm/support.go vendor/llvm/dist/bindings/go/llvm/target.go vendor/llvm/dist/bindings/go/llvm/transforms_instrumentation.go vendor/llvm/dist/bindings/go/llvm/transforms_ipo.go vendor/llvm/dist/bindings/go/llvm/transforms_pmbuilder.go vendor/llvm/dist/bindings/go/llvm/transforms_scalar.go vendor/llvm/dist/bindings/go/llvm/version.go vendor/llvm/dist/bindings/ocaml/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/all_backends/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/analysis/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/backends/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/bitreader/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/bitwriter/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/executionengine/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/irreader/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/linker/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/llvm/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/target/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/ipo/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/passmgr_builder/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/scalar_opts/ vendor/llvm/dist/bindings/ocaml/transforms/scalar_opts/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/scalar_opts/Makefile (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.ml vendor/llvm/dist/bindings/ocaml/transforms/scalar_opts/llvm_scalar_opts.mli vendor/llvm/dist/bindings/ocaml/transforms/scalar_opts/scalar_opts_ocaml.c (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/utils/ vendor/llvm/dist/bindings/ocaml/transforms/utils/CMakeLists.txt (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/utils/Makefile (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/utils/llvm_transform_utils.ml vendor/llvm/dist/bindings/ocaml/transforms/utils/llvm_transform_utils.mli vendor/llvm/dist/bindings/ocaml/transforms/utils/transform_utils_ocaml.c (contents, props changed) vendor/llvm/dist/bindings/ocaml/transforms/vectorize/CMakeLists.txt (contents, props changed) vendor/llvm/dist/cmake/modules/AddOCaml.cmake vendor/llvm/dist/cmake/modules/CrossCompile.cmake vendor/llvm/dist/cmake/modules/FindOCaml.cmake vendor/llvm/dist/cmake/platforms/iOS.cmake vendor/llvm/dist/docs/CoverageMappingFormat.rst vendor/llvm/dist/docs/MergeFunctions.rst vendor/llvm/dist/docs/R600Usage.rst vendor/llvm/dist/docs/Statepoints.rst vendor/llvm/dist/docs/tutorial/LangImpl9.rst vendor/llvm/dist/examples/Kaleidoscope/Chapter8/ vendor/llvm/dist/examples/Kaleidoscope/Chapter8/CMakeLists.txt (contents, props changed) vendor/llvm/dist/examples/Kaleidoscope/Chapter8/Makefile (contents, props changed) vendor/llvm/dist/examples/Kaleidoscope/Chapter8/toy.cpp (contents, props changed) vendor/llvm/dist/include/llvm/Analysis/AssumptionCache.h (contents, props changed) vendor/llvm/dist/include/llvm/Analysis/FunctionTargetTransformInfo.h (contents, props changed) vendor/llvm/dist/include/llvm/CodeGen/DIE.h (contents, props changed) vendor/llvm/dist/include/llvm/CodeGen/ForwardControlFlowIntegrity.h (contents, props changed) vendor/llvm/dist/include/llvm/CodeGen/MachineCombinerPattern.h (contents, props changed) vendor/llvm/dist/include/llvm/CodeGen/PBQPRAConstraint.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFAbbreviationDeclaration.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFAcceleratorTable.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFCompileUnit.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFContext.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugAbbrev.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugArangeSet.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugAranges.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugFrame.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugInfoEntry.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugLine.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugLoc.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFDebugRangeList.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFRelocMap.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFSection.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFTypeUnit.h (contents, props changed) vendor/llvm/dist/include/llvm/DebugInfo/DWARFUnit.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/Metadata.def vendor/llvm/dist/include/llvm/IR/MetadataTracking.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/PassManagerInternal.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/Statepoint.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/TrackingMDRef.h (contents, props changed) vendor/llvm/dist/include/llvm/IR/UseListOrder.h (contents, props changed) vendor/llvm/dist/include/llvm/ProfileData/CoverageMapping.h (contents, props changed) vendor/llvm/dist/include/llvm/ProfileData/CoverageMappingReader.h (contents, props changed) vendor/llvm/dist/include/llvm/ProfileData/CoverageMappingWriter.h (contents, props changed) vendor/llvm/dist/include/llvm/ProfileData/SampleProf.h (contents, props changed) vendor/llvm/dist/include/llvm/ProfileData/SampleProfReader.h (contents, props changed) vendor/llvm/dist/include/llvm/ProfileData/SampleProfWriter.h (contents, props changed) vendor/llvm/dist/include/llvm/Support/ELFRelocs/ vendor/llvm/dist/include/llvm/Support/ELFRelocs/AArch64.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/ARM.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/Hexagon.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/Mips.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/PowerPC.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/PowerPC64.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/Sparc.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/SystemZ.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/i386.def vendor/llvm/dist/include/llvm/Support/ELFRelocs/x86_64.def vendor/llvm/dist/include/llvm/Support/Options.h (contents, props changed) vendor/llvm/dist/include/llvm/Support/StreamingMemoryObject.h (contents, props changed) vendor/llvm/dist/include/llvm/Support/UniqueLock.h (contents, props changed) vendor/llvm/dist/include/llvm/Transforms/Utils/SymbolRewriter.h (contents, props changed) vendor/llvm/dist/lib/Analysis/AssumptionCache.cpp (contents, props changed) vendor/llvm/dist/lib/Analysis/CFLAliasAnalysis.cpp (contents, props changed) vendor/llvm/dist/lib/Analysis/FunctionTargetTransformInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Analysis/ScopedNoAliasAA.cpp (contents, props changed) vendor/llvm/dist/lib/Analysis/StratifiedSets.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfExpression.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfExpression.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/AtomicExpandPass.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/ForwardControlFlowIntegrity.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/MachineCombiner.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/SelectionDAG/StatepointLowering.cpp (contents, props changed) vendor/llvm/dist/lib/CodeGen/SelectionDAG/StatepointLowering.h (contents, props changed) vendor/llvm/dist/lib/CodeGen/StatepointExampleGC.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/DWARFAcceleratorTable.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/SyntaxHighlighting.cpp (contents, props changed) vendor/llvm/dist/lib/DebugInfo/SyntaxHighlighting.h (contents, props changed) vendor/llvm/dist/lib/ExecutionEngine/GDBRegistrationListener.cpp (contents, props changed) vendor/llvm/dist/lib/ExecutionEngine/MCJIT/ObjectBuffer.h (contents, props changed) vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h (contents, props changed) vendor/llvm/dist/lib/IR/MetadataTracking.cpp (contents, props changed) vendor/llvm/dist/lib/IR/Statepoint.cpp (contents, props changed) vendor/llvm/dist/lib/IR/UseListOrder.cpp (contents, props changed) vendor/llvm/dist/lib/MC/MCDisassembler/MCDisassembler.cpp (contents, props changed) vendor/llvm/dist/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp (contents, props changed) vendor/llvm/dist/lib/MC/MCDisassembler/MCRelocationInfo.cpp (contents, props changed) vendor/llvm/dist/lib/MC/MCWinEH.cpp (contents, props changed) vendor/llvm/dist/lib/ProfileData/CoverageMapping.cpp (contents, props changed) vendor/llvm/dist/lib/ProfileData/CoverageMappingReader.cpp (contents, props changed) vendor/llvm/dist/lib/ProfileData/CoverageMappingWriter.cpp (contents, props changed) vendor/llvm/dist/lib/ProfileData/SampleProf.cpp (contents, props changed) vendor/llvm/dist/lib/ProfileData/SampleProfReader.cpp (contents, props changed) vendor/llvm/dist/lib/ProfileData/SampleProfWriter.cpp (contents, props changed) vendor/llvm/dist/lib/Support/MathExtras.cpp (contents, props changed) vendor/llvm/dist/lib/Support/Options.cpp (contents, props changed) vendor/llvm/dist/lib/Support/StreamingMemoryObject.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64A53Fix835769.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.h (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64ConditionOptimizer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64MachineCombinerPattern.h (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp (contents, props changed) vendor/llvm/dist/lib/Target/AArch64/AArch64PBQPRegAlloc.h (contents, props changed) vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h (contents, props changed) vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h (contents, props changed) vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h (contents, props changed) vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/Disassembler/ vendor/llvm/dist/lib/Target/Hexagon/Disassembler/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/Disassembler/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/Disassembler/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.h (contents, props changed) vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/NVPTX/NVPTXLowerStructArgs.cpp (contents, props changed) vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp (contents, props changed) vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.h (contents, props changed) vendor/llvm/dist/lib/Target/PowerPC/PPCInstrSPE.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleP8.td vendor/llvm/dist/lib/Target/R600/AMDGPUAlwaysInlinePass.cpp (contents, props changed) vendor/llvm/dist/lib/Target/R600/AMDKernelCodeT.h (contents, props changed) vendor/llvm/dist/lib/Target/R600/AsmParser/ vendor/llvm/dist/lib/Target/R600/AsmParser/AMDGPUAsmParser.cpp (contents, props changed) vendor/llvm/dist/lib/Target/R600/AsmParser/CMakeLists.txt (contents, props changed) vendor/llvm/dist/lib/Target/R600/AsmParser/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/lib/Target/R600/AsmParser/Makefile (contents, props changed) vendor/llvm/dist/lib/Target/R600/CIInstructions.td vendor/llvm/dist/lib/Target/R600/SIFoldOperands.cpp (contents, props changed) vendor/llvm/dist/lib/Target/R600/SILoadStoreOptimizer.cpp (contents, props changed) vendor/llvm/dist/lib/Target/R600/SIPrepareScratchRegs.cpp (contents, props changed) vendor/llvm/dist/lib/Target/R600/VIInstrFormats.td vendor/llvm/dist/lib/Target/R600/VIInstructions.td vendor/llvm/dist/lib/Target/X86/X86InstrSGX.td vendor/llvm/dist/lib/Target/X86/X86IntrinsicsInfo.h (contents, props changed) vendor/llvm/dist/lib/Target/X86/X86ScheduleBtVer2.td vendor/llvm/dist/lib/Transforms/Instrumentation/InstrProfiling.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Instrumentation/SanitizerCoverage.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/ObjCARC/ProvenanceAnalysisEvaluator.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp (contents, props changed) vendor/llvm/dist/lib/Transforms/Utils/SymbolRewriter.cpp (contents, props changed) vendor/llvm/dist/test/Analysis/BasicAA/assume.ll vendor/llvm/dist/test/Analysis/BasicAA/zext.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/ vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/arguments-globals.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/arguments.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/basic-interproc-ret.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/basic-interproc.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/const-expr-gep.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/constant-over-index.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/empty.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/full-store-partial-alias.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/gep-signed-arithmetic.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/multilevel-combine.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/multilevel.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/must-and-partial.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/phi-and-select.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/simple.ll vendor/llvm/dist/test/Analysis/CFLAliasAnalysis/va.ll vendor/llvm/dist/test/Analysis/CostModel/PowerPC/cmp-expanded.ll vendor/llvm/dist/test/Analysis/DependenceAnalysis/NonCanonicalizedSubscript.ll vendor/llvm/dist/test/Analysis/Dominators/basic.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/load-with-range-metadata.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw-offset-assume.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/pr22179.ll vendor/llvm/dist/test/Analysis/ScopedNoAliasAA/ vendor/llvm/dist/test/Analysis/ScopedNoAliasAA/basic-domains.ll vendor/llvm/dist/test/Analysis/ScopedNoAliasAA/basic.ll vendor/llvm/dist/test/Analysis/ScopedNoAliasAA/basic2.ll vendor/llvm/dist/test/Assembler/alias-use-list-order.ll vendor/llvm/dist/test/Assembler/distinct-mdnode.ll vendor/llvm/dist/test/Assembler/inline-asm-clobber.ll vendor/llvm/dist/test/Assembler/invalid-attrgrp.ll vendor/llvm/dist/test/Assembler/invalid-datalayout1.ll vendor/llvm/dist/test/Assembler/invalid-datalayout10.ll vendor/llvm/dist/test/Assembler/invalid-datalayout11.ll vendor/llvm/dist/test/Assembler/invalid-datalayout12.ll vendor/llvm/dist/test/Assembler/invalid-datalayout13.ll vendor/llvm/dist/test/Assembler/invalid-datalayout2.ll vendor/llvm/dist/test/Assembler/invalid-datalayout3.ll vendor/llvm/dist/test/Assembler/invalid-datalayout4.ll vendor/llvm/dist/test/Assembler/invalid-datalayout5.ll vendor/llvm/dist/test/Assembler/invalid-datalayout6.ll vendor/llvm/dist/test/Assembler/invalid-datalayout7.ll vendor/llvm/dist/test/Assembler/invalid-datalayout8.ll vendor/llvm/dist/test/Assembler/invalid-datalayout9.ll vendor/llvm/dist/test/Assembler/invalid-fwdref2.ll vendor/llvm/dist/test/Assembler/invalid-hexint.ll vendor/llvm/dist/test/Assembler/invalid-mdlocation-field-bad.ll vendor/llvm/dist/test/Assembler/invalid-mdlocation-field-twice.ll vendor/llvm/dist/test/Assembler/invalid-mdlocation-overflow-column.ll vendor/llvm/dist/test/Assembler/invalid-mdlocation-overflow-line.ll vendor/llvm/dist/test/Assembler/invalid-mdnode-vector.ll vendor/llvm/dist/test/Assembler/invalid-mdnode-vector2.ll vendor/llvm/dist/test/Assembler/invalid-metadata-attachment-has-type.ll vendor/llvm/dist/test/Assembler/invalid-metadata-function-local-attachments.ll vendor/llvm/dist/test/Assembler/invalid-metadata-function-local-complex-1.ll vendor/llvm/dist/test/Assembler/invalid-metadata-function-local-complex-2.ll vendor/llvm/dist/test/Assembler/invalid-metadata-function-local-complex-3.ll vendor/llvm/dist/test/Assembler/invalid-metadata-has-type.ll vendor/llvm/dist/test/Assembler/invalid-name2.ll (contents, props changed) vendor/llvm/dist/test/Assembler/invalid-specialized-mdnode.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-function-between-blocks.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-function-missing-named.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-function-missing-numbered.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-global-missing.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-duplicated.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-empty.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-one.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-ordered.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-range.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-toofew.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-indexes-toomany.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder-type.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder_bb-missing-bb.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder_bb-missing-body.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder_bb-missing-func.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder_bb-not-bb.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder_bb-not-func.ll vendor/llvm/dist/test/Assembler/invalid-uselistorder_bb-numbered.ll vendor/llvm/dist/test/Assembler/mdlocation.ll vendor/llvm/dist/test/Assembler/musttail-invalid-1.ll vendor/llvm/dist/test/Assembler/musttail-invalid-2.ll vendor/llvm/dist/test/Assembler/musttail.ll vendor/llvm/dist/test/Assembler/short-hexpair.ll vendor/llvm/dist/test/Assembler/unnamed-comdat.ll vendor/llvm/dist/test/Assembler/uselistorder.ll vendor/llvm/dist/test/Assembler/uselistorder_bb.ll vendor/llvm/dist/test/Bindings/Go/ vendor/llvm/dist/test/Bindings/Go/go.test vendor/llvm/dist/test/Bindings/Go/lit.local.cfg vendor/llvm/dist/test/Bindings/OCaml/ vendor/llvm/dist/test/Bindings/OCaml/analysis.ml vendor/llvm/dist/test/Bindings/OCaml/bitreader.ml vendor/llvm/dist/test/Bindings/OCaml/bitwriter.ml vendor/llvm/dist/test/Bindings/OCaml/core.ml vendor/llvm/dist/test/Bindings/OCaml/executionengine.ml vendor/llvm/dist/test/Bindings/OCaml/ext_exc.ml vendor/llvm/dist/test/Bindings/OCaml/ipo.ml vendor/llvm/dist/test/Bindings/OCaml/irreader.ml vendor/llvm/dist/test/Bindings/OCaml/linker.ml vendor/llvm/dist/test/Bindings/OCaml/lit.local.cfg vendor/llvm/dist/test/Bindings/OCaml/passmgr_builder.ml vendor/llvm/dist/test/Bindings/OCaml/scalar_opts.ml vendor/llvm/dist/test/Bindings/OCaml/target.ml vendor/llvm/dist/test/Bindings/OCaml/transform_utils.ml vendor/llvm/dist/test/Bindings/OCaml/vectorize.ml vendor/llvm/dist/test/Bindings/llvm-c/objectfile.ll vendor/llvm/dist/test/Bitcode/constantsTest.3.2.ll vendor/llvm/dist/test/Bitcode/constantsTest.3.2.ll.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/function-local-metadata.3.5.ll vendor/llvm/dist/test/Bitcode/function-local-metadata.3.5.ll.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/highLevelStructure.3.2.ll vendor/llvm/dist/test/Bitcode/highLevelStructure.3.2.ll.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/mdstring-high-bits.ll vendor/llvm/dist/test/Bitcode/metadata.3.5.ll vendor/llvm/dist/test/Bitcode/metadata.3.5.ll.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/standardCIntrinsic.3.2.ll vendor/llvm/dist/test/Bitcode/standardCIntrinsic.3.2.ll.bc (contents, props changed) vendor/llvm/dist/test/Bitcode/use-list-order.ll vendor/llvm/dist/test/CodeGen/AArch64/PBQP-chain.ll vendor/llvm/dist/test/CodeGen/AArch64/PBQP-coalesce-benefit.ll vendor/llvm/dist/test/CodeGen/AArch64/PBQP-csr.ll vendor/llvm/dist/test/CodeGen/AArch64/PBQP.ll vendor/llvm/dist/test/CodeGen/AArch64/Redundantstore.ll vendor/llvm/dist/test/CodeGen/AArch64/a57-csel.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-2014-08-11-MachineCombinerCrash.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-2014-12-02-combine-soften.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-a57-fp-load-balancing.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-be-bv.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-fix-cortex-a53-835769.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-gep-opt.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-smull.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64-wide-shuffle.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64_f16_be.ll vendor/llvm/dist/test/CodeGen/AArch64/aarch64_tree_tests.ll vendor/llvm/dist/test/CodeGen/AArch64/analyzecmp.ll vendor/llvm/dist/test/CodeGen/AArch64/and-mask-removal.ll vendor/llvm/dist/test/CodeGen/AArch64/andandshift.ll vendor/llvm/dist/test/CodeGen/AArch64/argument-blocks.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-aapcs-be.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-bcc.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-store.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-patchpoint-scratch-regs.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-patchpoint-webkit_jscc.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-stackmap-nops.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-triv-disjoint-mem-access.ll vendor/llvm/dist/test/CodeGen/AArch64/bitcast-v2i8.ll vendor/llvm/dist/test/CodeGen/AArch64/br-to-eh-lpad.ll vendor/llvm/dist/test/CodeGen/AArch64/br-undef-cond.ll vendor/llvm/dist/test/CodeGen/AArch64/cmp-const-max.ll vendor/llvm/dist/test/CodeGen/AArch64/cmpwithshort.ll vendor/llvm/dist/test/CodeGen/AArch64/combine-comparisons-by-cse.ll vendor/llvm/dist/test/CodeGen/AArch64/dag-combine-invaraints.ll vendor/llvm/dist/test/CodeGen/AArch64/dont-take-over-the-world.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-addressing-modes.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-branch-cond-split.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-branch_weights.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-call-return.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-cbz.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-cmp-branch.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-folding.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-gep.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-int-ext.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-int-ext2.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-int-ext3.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-int-ext4.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-intrinsic.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-logic-op.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-memcpy.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-runtime-libcall.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-sdiv.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-select.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-shift.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-sqrt.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-switch-phi.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-tbz.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-trunc.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-vector-arithmetic.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-vret.ll vendor/llvm/dist/test/CodeGen/AArch64/fdiv-combine.ll vendor/llvm/dist/test/CodeGen/AArch64/fp16-instructions.ll vendor/llvm/dist/test/CodeGen/AArch64/fp16-v4-instructions.ll vendor/llvm/dist/test/CodeGen/AArch64/fp16-v8-instructions.ll vendor/llvm/dist/test/CodeGen/AArch64/fp16-vector-bitcast.ll vendor/llvm/dist/test/CodeGen/AArch64/fp16-vector-load-store.ll vendor/llvm/dist/test/CodeGen/AArch64/fp16-vector-shuffle.ll vendor/llvm/dist/test/CodeGen/AArch64/fpconv-vector-op-scalarize.ll vendor/llvm/dist/test/CodeGen/AArch64/legalize-bug-bogus-cpu.ll vendor/llvm/dist/test/CodeGen/AArch64/machine_cse.ll vendor/llvm/dist/test/CodeGen/AArch64/machine_cse_impdef_killflags.ll vendor/llvm/dist/test/CodeGen/AArch64/madd-combiner.ll vendor/llvm/dist/test/CodeGen/AArch64/madd-lohi.ll vendor/llvm/dist/test/CodeGen/AArch64/paired-load.ll vendor/llvm/dist/test/CodeGen/AArch64/postra-mi-sched.ll vendor/llvm/dist/test/CodeGen/AArch64/remat.ll vendor/llvm/dist/test/CodeGen/AArch64/rm_redundant_cmp.ll vendor/llvm/dist/test/CodeGen/AArch64/sdivpow2.ll vendor/llvm/dist/test/CodeGen/AArch64/stack-guard-remat-bitcast.ll vendor/llvm/dist/test/CodeGen/AArch64/stack_guard_remat.ll vendor/llvm/dist/test/CodeGen/AArch64/tailcall-fastisel.ll vendor/llvm/dist/test/CodeGen/AArch64/tbz-tbnz.ll vendor/llvm/dist/test/CodeGen/ARM/2014-08-04-muls-it.ll vendor/llvm/dist/test/CodeGen/ARM/adv-copy-opt.ll vendor/llvm/dist/test/CodeGen/ARM/arm32-round-conv.ll vendor/llvm/dist/test/CodeGen/ARM/arm32-rounding.ll vendor/llvm/dist/test/CodeGen/ARM/constant-islands.ll vendor/llvm/dist/test/CodeGen/ARM/copy-cpsr.ll vendor/llvm/dist/test/CodeGen/ARM/crc32.ll vendor/llvm/dist/test/CodeGen/ARM/dbg.ll vendor/llvm/dist/test/CodeGen/ARM/dwarf-unwind.ll vendor/llvm/dist/test/CodeGen/ARM/fpcmp-f64-neon-opt.ll vendor/llvm/dist/test/CodeGen/ARM/inlineasm-global.ll vendor/llvm/dist/test/CodeGen/ARM/invalid-target.ll vendor/llvm/dist/test/CodeGen/ARM/isel-v8i32-crash.ll vendor/llvm/dist/test/CodeGen/ARM/negative-offset.ll vendor/llvm/dist/test/CodeGen/ARM/no-tail-call.ll vendor/llvm/dist/test/CodeGen/ARM/none-macho-v4t.ll vendor/llvm/dist/test/CodeGen/ARM/pr18364-movw.ll vendor/llvm/dist/test/CodeGen/ARM/preferred-align.ll vendor/llvm/dist/test/CodeGen/ARM/smulw.ll vendor/llvm/dist/test/CodeGen/ARM/space-directive.ll vendor/llvm/dist/test/CodeGen/ARM/stack-alignment.ll vendor/llvm/dist/test/CodeGen/ARM/stack_guard_remat.ll vendor/llvm/dist/test/CodeGen/ARM/tail-call-weak.ll vendor/llvm/dist/test/CodeGen/ARM/tail-merge-branch-weight.ll vendor/llvm/dist/test/CodeGen/ARM/thumb1_return_sequence.ll vendor/llvm/dist/test/CodeGen/ARM/thumb2-size-opt.ll vendor/llvm/dist/test/CodeGen/ARM/thumb_indirect_calls.ll vendor/llvm/dist/test/CodeGen/ARM/vararg_no_start.ll vendor/llvm/dist/test/CodeGen/ARM/vector-load.ll vendor/llvm/dist/test/CodeGen/ARM/vector-promotion.ll vendor/llvm/dist/test/CodeGen/ARM/vector-store.ll vendor/llvm/dist/test/CodeGen/ARM/wrong-t2stmia-size-opt.ll vendor/llvm/dist/test/CodeGen/Generic/PBQP.ll vendor/llvm/dist/test/CodeGen/Generic/assume.ll vendor/llvm/dist/test/CodeGen/Generic/empty-insertvalue.ll vendor/llvm/dist/test/CodeGen/Generic/empty-phi.ll vendor/llvm/dist/test/CodeGen/Hexagon/cmp-not.ll vendor/llvm/dist/test/CodeGen/Hexagon/ctor.ll vendor/llvm/dist/test/CodeGen/MSP430/asm-clobbers.ll vendor/llvm/dist/test/CodeGen/MSP430/memset.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/br1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/callabi.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fpcmpa.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fpext.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fpintconv.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/fptrunc.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/icmpa.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/loadstoreconv.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/loadstrconst.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/shift.ll vendor/llvm/dist/test/CodeGen/Mips/ctlz-v.ll vendor/llvm/dist/test/CodeGen/Mips/cttz-v.ll vendor/llvm/dist/test/CodeGen/Mips/inlineasm-assembler-directives.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/mul.ll vendor/llvm/dist/test/CodeGen/Mips/llvm-ir/select.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-addiu.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-andi.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-atomic1.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-compact-branches.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-delay-slot-jr.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-delay-slot.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-li.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-rdhwr-directives.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-shift.ll vendor/llvm/dist/test/CodeGen/Mips/mips16-hf-attr-2.ll vendor/llvm/dist/test/CodeGen/Mips/named-register-n32.ll vendor/llvm/dist/test/CodeGen/Mips/named-register-n64.ll vendor/llvm/dist/test/CodeGen/Mips/named-register-o32.ll vendor/llvm/dist/test/CodeGen/NVPTX/bug21465.ll vendor/llvm/dist/test/CodeGen/NVPTX/fma-assoc.ll vendor/llvm/dist/test/CodeGen/NVPTX/machine-sink.ll vendor/llvm/dist/test/CodeGen/NVPTX/nvcl-param-align.ll vendor/llvm/dist/test/CodeGen/NVPTX/vector-global.ll vendor/llvm/dist/test/CodeGen/NVPTX/vector-return.ll vendor/llvm/dist/test/CodeGen/PowerPC/add-fi.ll vendor/llvm/dist/test/CodeGen/PowerPC/addi-licm.ll vendor/llvm/dist/test/CodeGen/PowerPC/arr-fp-arg-no-copy.ll vendor/llvm/dist/test/CodeGen/PowerPC/asm-constraints.ll vendor/llvm/dist/test/CodeGen/PowerPC/atomics-fences.ll vendor/llvm/dist/test/CodeGen/PowerPC/atomics-indexed.ll vendor/llvm/dist/test/CodeGen/PowerPC/atomics.ll vendor/llvm/dist/test/CodeGen/PowerPC/bperm.ll vendor/llvm/dist/test/CodeGen/PowerPC/byval-aliased.ll vendor/llvm/dist/test/CodeGen/PowerPC/cmpb-ppc32.ll vendor/llvm/dist/test/CodeGen/PowerPC/cmpb.ll vendor/llvm/dist/test/CodeGen/PowerPC/code-align.ll vendor/llvm/dist/test/CodeGen/PowerPC/constants-i64.ll vendor/llvm/dist/test/CodeGen/PowerPC/cttz-ctlz-spec.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-const.ll vendor/llvm/dist/test/CodeGen/PowerPC/fdiv-combine.ll vendor/llvm/dist/test/CodeGen/PowerPC/fma-assoc.ll vendor/llvm/dist/test/CodeGen/PowerPC/fma-ext.ll vendor/llvm/dist/test/CodeGen/PowerPC/fma-mutate.ll vendor/llvm/dist/test/CodeGen/PowerPC/fmaxnum.ll vendor/llvm/dist/test/CodeGen/PowerPC/fminnum.ll vendor/llvm/dist/test/CodeGen/PowerPC/fp-to-int-ext.ll vendor/llvm/dist/test/CodeGen/PowerPC/fp-to-int-to-fp.ll vendor/llvm/dist/test/CodeGen/PowerPC/i1-ext-fold.ll vendor/llvm/dist/test/CodeGen/PowerPC/lbz-from-ld-shift.ll vendor/llvm/dist/test/CodeGen/PowerPC/ld-st-upd.ll vendor/llvm/dist/test/CodeGen/PowerPC/no-extra-fp-conv-ldst.ll vendor/llvm/dist/test/CodeGen/PowerPC/post-ra-ec.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc32-cyclecounter.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc32-pic-large.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-anyregcc-crash.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-anyregcc.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-elf-abi.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-gep-opt.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-nonfunc-calls.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-patchpoint.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-stackmap-nops.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-stackmap.ll vendor/llvm/dist/test/CodeGen/PowerPC/retaddr2.ll vendor/llvm/dist/test/CodeGen/PowerPC/rm-zext.ll vendor/llvm/dist/test/CodeGen/PowerPC/sdiv-pow2.ll vendor/llvm/dist/test/CodeGen/PowerPC/split-index-tc.ll vendor/llvm/dist/test/CodeGen/PowerPC/unal-altivec-wint.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-div.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-ldst-builtin-le.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-ldst.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-minmax.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-p8.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx_insert_extract_le.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx_shuffle_le.ll vendor/llvm/dist/test/CodeGen/PowerPC/zext-free.ll vendor/llvm/dist/test/CodeGen/R600/add-debug.ll vendor/llvm/dist/test/CodeGen/R600/commute_modifiers.ll vendor/llvm/dist/test/CodeGen/R600/copy-to-reg.ll vendor/llvm/dist/test/CodeGen/R600/cttz-ctlz.ll vendor/llvm/dist/test/CodeGen/R600/ds-negative-offset-addressing-mode-loop.ll vendor/llvm/dist/test/CodeGen/R600/ds_read2.ll vendor/llvm/dist/test/CodeGen/R600/ds_read2_offset_order.ll vendor/llvm/dist/test/CodeGen/R600/ds_read2st64.ll vendor/llvm/dist/test/CodeGen/R600/ds_write2.ll vendor/llvm/dist/test/CodeGen/R600/ds_write2st64.ll vendor/llvm/dist/test/CodeGen/R600/empty-function.ll vendor/llvm/dist/test/CodeGen/R600/fabs.f64.ll vendor/llvm/dist/test/CodeGen/R600/flat-address-space.ll vendor/llvm/dist/test/CodeGen/R600/fma.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmax3.ll vendor/llvm/dist/test/CodeGen/R600/fmax_legacy.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmax_legacy.ll vendor/llvm/dist/test/CodeGen/R600/fmaxnum.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmaxnum.ll vendor/llvm/dist/test/CodeGen/R600/fmin3.ll vendor/llvm/dist/test/CodeGen/R600/fmin_legacy.f64.ll vendor/llvm/dist/test/CodeGen/R600/fmin_legacy.ll vendor/llvm/dist/test/CodeGen/R600/fminnum.f64.ll vendor/llvm/dist/test/CodeGen/R600/fminnum.ll vendor/llvm/dist/test/CodeGen/R600/fneg-fabs.f64.ll vendor/llvm/dist/test/CodeGen/R600/fneg.f64.ll vendor/llvm/dist/test/CodeGen/R600/fp-classify.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_sint.f64.ll vendor/llvm/dist/test/CodeGen/R600/frem.ll vendor/llvm/dist/test/CodeGen/R600/ftrunc.f64.ll vendor/llvm/dist/test/CodeGen/R600/global-directive.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i1.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i16.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i32.ll vendor/llvm/dist/test/CodeGen/R600/global-extload-i8.ll vendor/llvm/dist/test/CodeGen/R600/global-zero-initializer.ll vendor/llvm/dist/test/CodeGen/R600/global_atomics.ll vendor/llvm/dist/test/CodeGen/R600/hsa.ll vendor/llvm/dist/test/CodeGen/R600/i1-copy-implicit-def.ll vendor/llvm/dist/test/CodeGen/R600/i1-copy-phi.ll vendor/llvm/dist/test/CodeGen/R600/inline-asm.ll vendor/llvm/dist/test/CodeGen/R600/inline-calls.ll vendor/llvm/dist/test/CodeGen/R600/insert_subreg.ll vendor/llvm/dist/test/CodeGen/R600/lds-initializer.ll vendor/llvm/dist/test/CodeGen/R600/lds-zero-initializer.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.class.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.ldexp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.memcpy.ll vendor/llvm/dist/test/CodeGen/R600/m0-spill.ll vendor/llvm/dist/test/CodeGen/R600/mad-sub.ll vendor/llvm/dist/test/CodeGen/R600/max.ll vendor/llvm/dist/test/CodeGen/R600/max3.ll vendor/llvm/dist/test/CodeGen/R600/min.ll vendor/llvm/dist/test/CodeGen/R600/min3.ll vendor/llvm/dist/test/CodeGen/R600/missing-store.ll vendor/llvm/dist/test/CodeGen/R600/no-shrink-extloads.ll vendor/llvm/dist/test/CodeGen/R600/operand-folding.ll vendor/llvm/dist/test/CodeGen/R600/operand-spacing.ll vendor/llvm/dist/test/CodeGen/R600/s_movk_i32.ll vendor/llvm/dist/test/CodeGen/R600/schedule-global-loads.ll vendor/llvm/dist/test/CodeGen/R600/schedule-kernel-arg-loads.ll vendor/llvm/dist/test/CodeGen/R600/sdivrem24.ll vendor/llvm/dist/test/CodeGen/R600/sext-eliminate.ll vendor/llvm/dist/test/CodeGen/R600/shl_add_constant.ll vendor/llvm/dist/test/CodeGen/R600/shl_add_ptr.ll vendor/llvm/dist/test/CodeGen/R600/si-triv-disjoint-mem-access.ll vendor/llvm/dist/test/CodeGen/R600/sint_to_fp.f64.ll vendor/llvm/dist/test/CodeGen/R600/split-scalar-i64-add.ll vendor/llvm/dist/test/CodeGen/R600/store-barrier.ll vendor/llvm/dist/test/CodeGen/R600/subreg-coalescer-crash.ll vendor/llvm/dist/test/CodeGen/R600/trunc-cmp-constant.ll vendor/llvm/dist/test/CodeGen/R600/udivrem24.ll vendor/llvm/dist/test/CodeGen/R600/use-sgpr-multiple-times.ll vendor/llvm/dist/test/CodeGen/SPARC/empty-functions.ll vendor/llvm/dist/test/CodeGen/Thumb/copy_thumb.ll vendor/llvm/dist/test/CodeGen/Thumb/ldm-merge-call.ll vendor/llvm/dist/test/CodeGen/Thumb/ldm-merge-struct.ll vendor/llvm/dist/test/CodeGen/Thumb/ldm-stm-base-materialization.ll vendor/llvm/dist/test/CodeGen/Thumb/stack_guard_remat.ll vendor/llvm/dist/test/CodeGen/Thumb/stm-merge.ll vendor/llvm/dist/test/CodeGen/Thumb2/aapcs.ll vendor/llvm/dist/test/CodeGen/Thumb2/constant-islands-jump-table.ll vendor/llvm/dist/test/CodeGen/Thumb2/constant-islands-new-island-padding.ll vendor/llvm/dist/test/CodeGen/Thumb2/constant-islands-new-island.ll vendor/llvm/dist/test/CodeGen/Thumb2/float-cmp.ll vendor/llvm/dist/test/CodeGen/Thumb2/float-intrinsics-double.ll vendor/llvm/dist/test/CodeGen/Thumb2/float-intrinsics-float.ll vendor/llvm/dist/test/CodeGen/Thumb2/float-ops.ll vendor/llvm/dist/test/CodeGen/Thumb2/stack_guard_remat.ll vendor/llvm/dist/test/CodeGen/X86/2014-08-29-CompactUnwind.ll vendor/llvm/dist/test/CodeGen/X86/TruncAssertZext.ll vendor/llvm/dist/test/CodeGen/X86/add_shl_constant.ll vendor/llvm/dist/test/CodeGen/X86/addr-mode-matcher.ll vendor/llvm/dist/test/CodeGen/X86/adx-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/aligned-variadic.ll vendor/llvm/dist/test/CodeGen/X86/atomic_idempotent.ll vendor/llvm/dist/test/CodeGen/X86/atomic_mi.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx-vperm2x128.ll vendor/llvm/dist/test/CodeGen/X86/avx1-stack-reload-folding.ll vendor/llvm/dist/test/CodeGen/X86/avx2-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/avx2-pmovx-256-old-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/avx2-pmovxrm-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-i1test.ll (contents, props changed) vendor/llvm/dist/test/CodeGen/X86/avx512-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512bw-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512bwvl-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512dq-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512er-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-logic.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-nontemporal.ll vendor/llvm/dist/test/CodeGen/X86/avx512vl-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/break-false-dep.ll vendor/llvm/dist/test/CodeGen/X86/byval-callee-cleanup.ll vendor/llvm/dist/test/CodeGen/X86/cfi_enforcing.ll vendor/llvm/dist/test/CodeGen/X86/cfi_invoke.ll vendor/llvm/dist/test/CodeGen/X86/cfi_non_default_function.ll vendor/llvm/dist/test/CodeGen/X86/cfi_simple_indirect_call.ll vendor/llvm/dist/test/CodeGen/X86/cmpxchg-clobber-flags.ll vendor/llvm/dist/test/CodeGen/X86/coalesce_commute_subreg.ll vendor/llvm/dist/test/CodeGen/X86/combine-and.ll vendor/llvm/dist/test/CodeGen/X86/commute-blend-avx2.ll vendor/llvm/dist/test/CodeGen/X86/commute-blend-sse41.ll vendor/llvm/dist/test/CodeGen/X86/commuted-blend-mask.ll vendor/llvm/dist/test/CodeGen/X86/copysign-constant-magnitude.ll vendor/llvm/dist/test/CodeGen/X86/cpus.ll vendor/llvm/dist/test/CodeGen/X86/critical-anti-dep-breaker.ll vendor/llvm/dist/test/CodeGen/X86/cttz-ctlz.ll vendor/llvm/dist/test/CodeGen/X86/divrem8_ext.ll vendor/llvm/dist/test/CodeGen/X86/dont-trunc-store-double-to-float.ll vendor/llvm/dist/test/CodeGen/X86/dynamic-alloca-lifetime.ll vendor/llvm/dist/test/CodeGen/X86/equiv_with_fndef.ll vendor/llvm/dist/test/CodeGen/X86/equiv_with_vardef.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-call-bool.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-x32.ll vendor/llvm/dist/test/CodeGen/X86/fastmath-optnone.ll vendor/llvm/dist/test/CodeGen/X86/fma-intrinsics-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/fma-phi-213-to-231.ll vendor/llvm/dist/test/CodeGen/X86/fma4-intrinsics-x86_64-folded-load.ll vendor/llvm/dist/test/CodeGen/X86/fmaxnum.ll vendor/llvm/dist/test/CodeGen/X86/fminnum.ll vendor/llvm/dist/test/CodeGen/X86/fmul-combines.ll vendor/llvm/dist/test/CodeGen/X86/fnabs.ll vendor/llvm/dist/test/CodeGen/X86/fold-tied-op.ll vendor/llvm/dist/test/CodeGen/X86/fpstack-debuginstr-kill.ll vendor/llvm/dist/test/CodeGen/X86/frameallocate.ll vendor/llvm/dist/test/CodeGen/X86/gcc_except_table_functions.ll vendor/llvm/dist/test/CodeGen/X86/inalloca-regparm.ll vendor/llvm/dist/test/CodeGen/X86/jump_table_align.ll vendor/llvm/dist/test/CodeGen/X86/large-code-model-isel.ll vendor/llvm/dist/test/CodeGen/X86/lea-5.ll vendor/llvm/dist/test/CodeGen/X86/lower-vec-shift-2.ll vendor/llvm/dist/test/CodeGen/X86/masked_memop.ll vendor/llvm/dist/test/CodeGen/X86/mem-intrin-base-reg.ll vendor/llvm/dist/test/CodeGen/X86/misched-code-difference-with-debug.ll vendor/llvm/dist/test/CodeGen/X86/movtopush.ll vendor/llvm/dist/test/CodeGen/X86/musttail-fastcall.ll vendor/llvm/dist/test/CodeGen/X86/musttail-varargs.ll vendor/llvm/dist/test/CodeGen/X86/nontemporal-2.ll vendor/llvm/dist/test/CodeGen/X86/patchpoint-invoke.ll vendor/llvm/dist/test/CodeGen/X86/patchpoint-webkit_jscc.ll vendor/llvm/dist/test/CodeGen/X86/peephole-fold-movsd.ll vendor/llvm/dist/test/CodeGen/X86/pr18846.ll vendor/llvm/dist/test/CodeGen/X86/pr21099.ll vendor/llvm/dist/test/CodeGen/X86/pr21529.ll vendor/llvm/dist/test/CodeGen/X86/pr22019.ll vendor/llvm/dist/test/CodeGen/X86/pr22103.ll vendor/llvm/dist/test/CodeGen/X86/prologuedata.ll vendor/llvm/dist/test/CodeGen/X86/pshufb-mask-comments.ll vendor/llvm/dist/test/CodeGen/X86/recip-fastmath.ll vendor/llvm/dist/test/CodeGen/X86/regalloc-reconcile-broken-hints.ll vendor/llvm/dist/test/CodeGen/X86/return_zeroext_i2.ll vendor/llvm/dist/test/CodeGen/X86/seh-basic.ll vendor/llvm/dist/test/CodeGen/X86/seh-safe-div.ll vendor/llvm/dist/test/CodeGen/X86/sink-blockfreq.ll vendor/llvm/dist/test/CodeGen/X86/sjlj-baseptr.ll vendor/llvm/dist/test/CodeGen/X86/slow-div.ll vendor/llvm/dist/test/CodeGen/X86/slow-incdec.ll vendor/llvm/dist/test/CodeGen/X86/splat-for-size.ll vendor/llvm/dist/test/CodeGen/X86/sse41-intrinsics-x86-upgrade.ll vendor/llvm/dist/test/CodeGen/X86/sse41-pmovxrm-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/stack-probe-size.ll vendor/llvm/dist/test/CodeGen/X86/stack-protector-weight.ll vendor/llvm/dist/test/CodeGen/X86/stack_guard_remat.ll vendor/llvm/dist/test/CodeGen/X86/stackmap-large-constants.ll vendor/llvm/dist/test/CodeGen/X86/stackmap-shadow-optimization.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-call-lowering.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-forward.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-stack-usage.ll vendor/llvm/dist/test/CodeGen/X86/statepoint-stackmap-format.ll vendor/llvm/dist/test/CodeGen/X86/switch-default-only.ll vendor/llvm/dist/test/CodeGen/X86/switch-jump-table.ll vendor/llvm/dist/test/CodeGen/X86/tailcall-multiret.ll vendor/llvm/dist/test/CodeGen/X86/tls-addr-non-leaf-function.ll vendor/llvm/dist/test/CodeGen/X86/unaligned-32-byte-memops.ll vendor/llvm/dist/test/CodeGen/X86/vararg-callee-cleanup.ll vendor/llvm/dist/test/CodeGen/X86/vararg_no_start.ll vendor/llvm/dist/test/CodeGen/X86/vec-loadsingles-alignment.ll vendor/llvm/dist/test/CodeGen/X86/vec_extract-avx.ll vendor/llvm/dist/test/CodeGen/X86/vec_trunc_sext.ll vendor/llvm/dist/test/CodeGen/X86/vec_unsafe-fp-math.ll vendor/llvm/dist/test/CodeGen/X86/vector-blend.ll vendor/llvm/dist/test/CodeGen/X86/vector-ctpop.ll vendor/llvm/dist/test/CodeGen/X86/vector-sext.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v32.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-256-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-512-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-sse1.ll vendor/llvm/dist/test/CodeGen/X86/vector-trunc.ll vendor/llvm/dist/test/CodeGen/X86/vector-zext.ll vendor/llvm/dist/test/CodeGen/X86/vector-zmov.ll vendor/llvm/dist/test/CodeGen/X86/vectorcall.ll vendor/llvm/dist/test/CodeGen/X86/vselect-avx.ll vendor/llvm/dist/test/CodeGen/X86/win32-pic-jumptable.ll vendor/llvm/dist/test/CodeGen/X86/win64_call_epi.ll vendor/llvm/dist/test/CodeGen/X86/windows-itanium-alloca.ll vendor/llvm/dist/test/CodeGen/X86/x32-function_pointer-1.ll vendor/llvm/dist/test/CodeGen/X86/x32-function_pointer-2.ll vendor/llvm/dist/test/CodeGen/X86/x32-function_pointer-3.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-call.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-stack-and-frame-ptr.ll vendor/llvm/dist/test/CodeGen/X86/x86-inline-asm-validation.ll vendor/llvm/dist/test/CodeGen/X86/x86-mixed-alignment-dagcombine.ll vendor/llvm/dist/test/DebugInfo/AArch64/big-endian-dump.ll vendor/llvm/dist/test/DebugInfo/AArch64/big-endian.ll vendor/llvm/dist/test/DebugInfo/AArch64/cfi-eof-prologue.ll vendor/llvm/dist/test/DebugInfo/AArch64/coalescing.ll vendor/llvm/dist/test/DebugInfo/AArch64/little-endian-dump.ll vendor/llvm/dist/test/DebugInfo/AArch64/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/ARM/big-endian-dump.ll vendor/llvm/dist/test/DebugInfo/ARM/cfi-eof-prologue.ll vendor/llvm/dist/test/DebugInfo/ARM/little-endian-dump.ll vendor/llvm/dist/test/DebugInfo/ARM/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/ARM/s-super-register.ll vendor/llvm/dist/test/DebugInfo/COFF/cpp-mangling.ll vendor/llvm/dist/test/DebugInfo/Inputs/cross-cu-inlining.c (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/cross-cu-inlining.x86_64-macho.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-objc.m vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-objc.x86_64.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/gmlt.ll vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-test (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-test.cc (contents, props changed) vendor/llvm/dist/test/DebugInfo/Inputs/split-dwarf-test.dwo (contents, props changed) vendor/llvm/dist/test/DebugInfo/Mips/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/PowerPC/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/Sparc/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/SystemZ/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/X86/asm-macro-line-number.s (contents, props changed) vendor/llvm/dist/test/DebugInfo/X86/constant-aggregate.ll vendor/llvm/dist/test/DebugInfo/X86/debug-info-access.ll vendor/llvm/dist/test/DebugInfo/X86/fission-inline.ll vendor/llvm/dist/test/DebugInfo/X86/ghost-sdnode-dbgvalues.ll vendor/llvm/dist/test/DebugInfo/X86/gmlt.test vendor/llvm/dist/test/DebugInfo/X86/memberfnptr.ll vendor/llvm/dist/test/DebugInfo/X86/nodebug_with_debug_loc.ll vendor/llvm/dist/test/DebugInfo/X86/pieces-1.ll vendor/llvm/dist/test/DebugInfo/X86/pieces-2.ll vendor/llvm/dist/test/DebugInfo/X86/pieces-3.ll vendor/llvm/dist/test/DebugInfo/X86/processes-relocations.ll vendor/llvm/dist/test/DebugInfo/X86/recursive_inlining.ll vendor/llvm/dist/test/DebugInfo/block-asan.ll vendor/llvm/dist/test/DebugInfo/cross-cu-linkonce-distinct.ll vendor/llvm/dist/test/DebugInfo/debug-info-always-inline.ll vendor/llvm/dist/test/DebugInfo/duplicate_inline.ll vendor/llvm/dist/test/DebugInfo/dwarfdump-accel.test vendor/llvm/dist/test/DebugInfo/dwarfdump-objc.test vendor/llvm/dist/test/DebugInfo/enum-types.ll vendor/llvm/dist/test/DebugInfo/gmlt.test vendor/llvm/dist/test/DebugInfo/incorrect-variable-debugloc1.ll vendor/llvm/dist/test/DebugInfo/member-pointers.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/missing-abstract-variable.o (contents, props changed) vendor/llvm/dist/test/DebugInfo/multiline.ll vendor/llvm/dist/test/DebugInfo/nodebug.ll vendor/llvm/dist/test/ExecutionEngine/Interpreter/ vendor/llvm/dist/test/ExecutionEngine/Interpreter/intrinsics.ll vendor/llvm/dist/test/ExecutionEngine/Interpreter/lit.local.cfg vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/ vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/MachO_ARM64_relocations.s (contents, props changed) vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/AArch64/lit.local.cfg vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_DynNoPIC_relocations.s (contents, props changed) vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/X86/MachO_i386_eh_frame.s (contents, props changed) vendor/llvm/dist/test/ExecutionEngine/frem.ll vendor/llvm/dist/test/Feature/prologuedata.ll vendor/llvm/dist/test/FileCheck/check-empty.txt (contents, props changed) vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_cfi.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_cfi.s (contents, props changed) vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_rep_movs.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_rsp_mem_op.s (contents, props changed) vendor/llvm/dist/test/Instrumentation/AddressSanitizer/do-not-instrument-cstring.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/instrument-dynamic-allocas.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/undecidable-dynamic-alloca-1.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/Inputs/debuglist.txt (contents, props changed) vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/debug.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/union-large.ll vendor/llvm/dist/test/Instrumentation/InstrProfiling/ vendor/llvm/dist/test/Instrumentation/InstrProfiling/no-counters.ll vendor/llvm/dist/test/Instrumentation/InstrProfiling/noruntime.ll vendor/llvm/dist/test/Instrumentation/InstrProfiling/platform.ll vendor/llvm/dist/test/Instrumentation/InstrProfiling/profiling.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/array_types.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/byval-alignment.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/check-constant-shadow.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/origin-alignment.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/ vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/coverage-dbg.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/coverage.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/coverage2-dbg.ll vendor/llvm/dist/test/Instrumentation/SanitizerCoverage/tracing.ll vendor/llvm/dist/test/JitListener/multiple.ll vendor/llvm/dist/test/JitListener/simple.ll vendor/llvm/dist/test/LTO/Inputs/ vendor/llvm/dist/test/LTO/Inputs/bcsection.macho.s (contents, props changed) vendor/llvm/dist/test/LTO/Inputs/bcsection.s (contents, props changed) vendor/llvm/dist/test/LTO/Inputs/invalid.ll.bc (contents, props changed) vendor/llvm/dist/test/LTO/Inputs/list-symbols.ll vendor/llvm/dist/test/LTO/bcsection.ll vendor/llvm/dist/test/LTO/diagnostic-handler-remarks.ll vendor/llvm/dist/test/LTO/invalid.ll vendor/llvm/dist/test/LTO/list-symbols.ll vendor/llvm/dist/test/Linker/ConstantGlobals.ll vendor/llvm/dist/test/Linker/Inputs/2003-01-30-LinkerRename.ll vendor/llvm/dist/test/Linker/Inputs/2003-05-31-LinkerRename.ll vendor/llvm/dist/test/Linker/Inputs/ConstantGlobals.ll vendor/llvm/dist/test/Linker/Inputs/alignment.ll vendor/llvm/dist/test/Linker/Inputs/comdat8.ll vendor/llvm/dist/test/Linker/Inputs/constructor-comdat.ll vendor/llvm/dist/test/Linker/Inputs/ctors.ll vendor/llvm/dist/test/Linker/Inputs/distinct.ll vendor/llvm/dist/test/Linker/Inputs/ident.a.ll vendor/llvm/dist/test/Linker/Inputs/ident.b.ll vendor/llvm/dist/test/Linker/Inputs/linkage2.ll vendor/llvm/dist/test/Linker/Inputs/mdlocation.ll vendor/llvm/dist/test/Linker/Inputs/module-flags-dont-change-others.ll vendor/llvm/dist/test/Linker/Inputs/module-flags-pic-1-b.ll (contents, props changed) vendor/llvm/dist/test/Linker/Inputs/module-flags-pic-2-b.ll vendor/llvm/dist/test/Linker/Inputs/opaque.ll vendor/llvm/dist/test/Linker/Inputs/pr21374.ll vendor/llvm/dist/test/Linker/Inputs/redefinition.ll vendor/llvm/dist/test/Linker/Inputs/replaced-function-matches-first-subprogram.ll vendor/llvm/dist/test/Linker/Inputs/testlink.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-alias.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-dst-types2.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-dst-types3.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-name.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-opaque.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-unrelated2.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-unrelated3.ll vendor/llvm/dist/test/Linker/Inputs/unique-fwd-decl-b.ll vendor/llvm/dist/test/Linker/Inputs/unique-fwd-decl-order.ll vendor/llvm/dist/test/Linker/Inputs/visibility.ll vendor/llvm/dist/test/Linker/alignment.ll vendor/llvm/dist/test/Linker/comdat9.ll vendor/llvm/dist/test/Linker/constructor-comdat.ll vendor/llvm/dist/test/Linker/ctors.ll vendor/llvm/dist/test/Linker/distinct.ll vendor/llvm/dist/test/Linker/ident.ll vendor/llvm/dist/test/Linker/linkage2.ll vendor/llvm/dist/test/Linker/lto-attributes.ll vendor/llvm/dist/test/Linker/mdlocation.ll vendor/llvm/dist/test/Linker/module-flags-dont-change-others.ll vendor/llvm/dist/test/Linker/module-flags-pic-1-a.ll vendor/llvm/dist/test/Linker/module-flags-pic-2-a.ll vendor/llvm/dist/test/Linker/opaque.ll vendor/llvm/dist/test/Linker/pr21374.ll vendor/llvm/dist/test/Linker/pr21494.ll vendor/llvm/dist/test/Linker/prologuedata.ll vendor/llvm/dist/test/Linker/replaced-function-matches-first-subprogram.ll vendor/llvm/dist/test/Linker/testlink.ll vendor/llvm/dist/test/Linker/type-unique-alias.ll vendor/llvm/dist/test/Linker/type-unique-dst-types.ll vendor/llvm/dist/test/Linker/type-unique-name.ll vendor/llvm/dist/test/Linker/type-unique-opaque.ll vendor/llvm/dist/test/Linker/type-unique-src-type.ll vendor/llvm/dist/test/Linker/type-unique-type-array-a.ll vendor/llvm/dist/test/Linker/type-unique-type-array-b.ll vendor/llvm/dist/test/Linker/type-unique-unrelated.ll vendor/llvm/dist/test/Linker/unique-fwd-decl-a.ll vendor/llvm/dist/test/Linker/unique-fwd-decl-order.ll vendor/llvm/dist/test/Linker/visibility.ll vendor/llvm/dist/test/MC/AArch64/elf_osabi_flags.s (contents, props changed) vendor/llvm/dist/test/MC/AArch64/inst-directive-diagnostic.s (contents, props changed) vendor/llvm/dist/test/MC/AArch64/inst-directive.s (contents, props changed) vendor/llvm/dist/test/MC/AArch64/single-slash.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/arm-elf-relocation-diagnostics.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/arm-elf-relocations.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/arm-load-store-multiple-deprecated.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/coproc-diag.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/cps.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/cpu-test.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/d16.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/directive-arch_extension-mode-switch.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/directive-arch_extension-toggle.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/directive-fpu-instrs.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/directive-thumb_func.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/directive-unsupported.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/move-banked-regs.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/neon-mov-vfp.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb-load-store-multiple.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb-not-mclass.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb2-bxj.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb2-exception-return-mclass.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb2-ldrb-ldrh.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb2-ldrexd-strexd.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumb_rewrites.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/thumbv7em.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/virtexts-arm.s (contents, props changed) vendor/llvm/dist/test/MC/ARM/virtexts-thumb.s (contents, props changed) vendor/llvm/dist/test/MC/AsmParser/comments-x86-darwin.s (contents, props changed) vendor/llvm/dist/test/MC/AsmParser/directive-warning.s (contents, props changed) vendor/llvm/dist/test/MC/AsmParser/macro-exitm.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/bigobj.py (contents, props changed) vendor/llvm/dist/test/MC/COFF/comm-align.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/const-gv-with-rel-init.ll vendor/llvm/dist/test/MC/COFF/section-passthru-flags.s (contents, props changed) vendor/llvm/dist/test/MC/COFF/seh-linkonce.s (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/d16.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-thumb-MSR-MClass.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/invalid-virtexts.arm.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/move-banked-regs-arm.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/move-banked-regs-thumb.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/thumb2-preloads.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/virtexts-arm.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/ARM/virtexts-thumb.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/ vendor/llvm/dist/test/MC/Disassembler/Hexagon/alu32_alu.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/alu32_perm.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/alu32_pred.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/cr.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/j.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/jr.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/ld.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/lit.local.cfg vendor/llvm/dist/test/MC/Disassembler/Hexagon/memop.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/nv_j.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/nv_st.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/st.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/system_user.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_alu.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_bit.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_fp.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_mpy.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_perm.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_pred.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Hexagon/xtype_shift.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-mips1-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-mips1.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips1/valid-xfail.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips2/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips2/valid-mips2-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips2/valid-mips2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips3/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips3/valid-mips3-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips3/valid-mips3.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-mips32-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-mips32.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32/valid-xfail-mips32.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2-le.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-mips32r2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2/valid-xfail-mips32r2.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/ vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-mips4-el.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-mips4.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/Mips/mips4/valid-xfail-mips4.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-4xx.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-6xx.txt (contents, props changed) vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-e500.txt (contents, props changed) vendor/llvm/dist/test/MC/ELF/cfi-large-model.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/reloc-same-name-section.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/section-sym-err.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/section-sym.s (contents, props changed) vendor/llvm/dist/test/MC/ELF/section-sym2.s (contents, props changed) vendor/llvm/dist/test/MC/Hexagon/ vendor/llvm/dist/test/MC/Hexagon/basic.ll vendor/llvm/dist/test/MC/Hexagon/inst_add.ll vendor/llvm/dist/test/MC/Hexagon/inst_add64.ll vendor/llvm/dist/test/MC/Hexagon/inst_and.ll vendor/llvm/dist/test/MC/Hexagon/inst_and64.ll vendor/llvm/dist/test/MC/Hexagon/inst_aslh.ll vendor/llvm/dist/test/MC/Hexagon/inst_asrh.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_eq.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_eqi.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_gt.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_gti.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_lt.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_ugt.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_ugti.ll vendor/llvm/dist/test/MC/Hexagon/inst_cmp_ult.ll vendor/llvm/dist/test/MC/Hexagon/inst_or.ll vendor/llvm/dist/test/MC/Hexagon/inst_or64.ll vendor/llvm/dist/test/MC/Hexagon/inst_select.ll vendor/llvm/dist/test/MC/Hexagon/inst_sub.ll vendor/llvm/dist/test/MC/Hexagon/inst_sub64.ll vendor/llvm/dist/test/MC/Hexagon/inst_sxtb.ll vendor/llvm/dist/test/MC/Hexagon/inst_sxth.ll vendor/llvm/dist/test/MC/Hexagon/inst_xor.ll vendor/llvm/dist/test/MC/Hexagon/inst_xor64.ll vendor/llvm/dist/test/MC/Hexagon/inst_zxtb.ll vendor/llvm/dist/test/MC/Hexagon/inst_zxth.ll vendor/llvm/dist/test/MC/Hexagon/lit.local.cfg vendor/llvm/dist/test/MC/MachO/AArch64/mergeable.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/AArch64/reloc-crash.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/AArch64/reloc-crash2.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/bad-darwin-x86_64-reloc-expr1.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/bad-darwin-x86_64-reloc-expr2.s (contents, props changed) vendor/llvm/dist/test/MC/MachO/x86_64-mergeable.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/micromips-branch7.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/micromips-func-addr.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/micromips-invalid.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/micromips-label-test-sections.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/micromips-label-test.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-hwr-register-names.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-jump-delay-slots.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-pdr-bad.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips-pdr.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips32r2.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips32r2.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips4-wrong-error.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips4/invalid-mips32r2.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips5/invalid-mips32r2.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/mips64/invalid-mips32r2.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/msa/set-msa-directive-bad.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/msa/set-msa-directive.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-arch.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-mips-directives-bad.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-mips-directives.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-mips0-directive.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-mips16-directive.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-nodsp.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-push-pop-directives-bad.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/set-push-pop-directives.s (contents, props changed) vendor/llvm/dist/test/MC/Mips/unaligned-nops.s (contents, props changed) vendor/llvm/dist/test/MC/PowerPC/lcomm.s (contents, props changed) vendor/llvm/dist/test/MC/PowerPC/ppc32-ba.s (contents, props changed) vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-4xx.s (contents, props changed) vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-6xx.s (contents, props changed) vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-e500.s (contents, props changed) vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-spe.s (contents, props changed) vendor/llvm/dist/test/MC/R600/ vendor/llvm/dist/test/MC/R600/lit.local.cfg vendor/llvm/dist/test/MC/R600/sopp.s (contents, props changed) vendor/llvm/dist/test/MC/X86/AlignedBundling/labeloffset.s (contents, props changed) vendor/llvm/dist/test/MC/X86/AlignedBundling/nesting.s (contents, props changed) vendor/llvm/dist/test/MC/X86/avx512bw-encoding.s (contents, props changed) vendor/llvm/dist/test/MC/X86/avx512vl-encoding.s (contents, props changed) vendor/llvm/dist/test/MC/X86/compact-unwind.s (contents, props changed) vendor/llvm/dist/test/MC/X86/intel-syntax-ambiguous.s (contents, props changed) vendor/llvm/dist/test/MC/X86/intel-syntax-error.s (contents, props changed) vendor/llvm/dist/test/MC/X86/intel-syntax-ptr-sized.s (contents, props changed) vendor/llvm/dist/test/MC/X86/intel-syntax-unsized-memory.s (contents, props changed) vendor/llvm/dist/test/MC/X86/macho-uleb.s (contents, props changed) vendor/llvm/dist/test/MC/X86/reloc-macho.s (contents, props changed) vendor/llvm/dist/test/MC/X86/sgx-encoding.s (contents, props changed) vendor/llvm/dist/test/MC/X86/validate-inst-att.s (contents, props changed) vendor/llvm/dist/test/MC/X86/validate-inst-intel.s (contents, props changed) vendor/llvm/dist/test/MC/X86/x86-64-avx512bw.s (contents, props changed) vendor/llvm/dist/test/MC/X86/x86-64-avx512bw_vl.s (contents, props changed) vendor/llvm/dist/test/MC/X86/x86-64-avx512dq.s (contents, props changed) vendor/llvm/dist/test/MC/X86/x86-64-avx512dq_vl.s (contents, props changed) vendor/llvm/dist/test/MC/X86/x86-64-avx512f_vl.s (contents, props changed) vendor/llvm/dist/test/Object/AArch64/ vendor/llvm/dist/test/Object/AArch64/yaml2obj-elf-aarch64-rel.yaml vendor/llvm/dist/test/Object/Inputs/COFF/long-section-name.yaml vendor/llvm/dist/test/Object/Inputs/COFF/section-aux-symbol.yaml vendor/llvm/dist/test/Object/Inputs/macho-archive-unsorted-x86_64.a (contents, props changed) vendor/llvm/dist/test/Object/Inputs/macho-no-exports.dylib (contents, props changed) vendor/llvm/dist/test/Object/Inputs/macho-rpath-x86_64 (contents, props changed) vendor/llvm/dist/test/Object/Inputs/macho-zero-ncmds (contents, props changed) vendor/llvm/dist/test/Object/Inputs/micro-mips.elf-mipsel (contents, props changed) vendor/llvm/dist/test/Object/Inputs/mri-crlf.mri vendor/llvm/dist/test/Object/Inputs/thin.a (contents, props changed) vendor/llvm/dist/test/Object/Inputs/trivial-label-test.elf-x86-64 (contents, props changed) vendor/llvm/dist/test/Object/Mips/objdump-micro-mips.test vendor/llvm/dist/test/Object/X86/objdump-label.test vendor/llvm/dist/test/Object/mri-addlib.test vendor/llvm/dist/test/Object/mri-addmod.test vendor/llvm/dist/test/Object/mri-crlf.test vendor/llvm/dist/test/Object/mri1.test vendor/llvm/dist/test/Object/mri2.test vendor/llvm/dist/test/Object/mri3.test vendor/llvm/dist/test/Object/mri4.test vendor/llvm/dist/test/Object/mri5.test vendor/llvm/dist/test/Object/obj2yaml-coff-long-section-name.test vendor/llvm/dist/test/Object/obj2yaml-coff-section-aux-symbol.test vendor/llvm/dist/test/Object/objdump-export-list.test vendor/llvm/dist/test/Object/objdump-macho-quirks.test vendor/llvm/dist/test/Object/objdump-reloc-shared.test vendor/llvm/dist/test/Other/Inputs/block-info-only.bc (contents, props changed) vendor/llvm/dist/test/Other/Inputs/has-block-info.bc (contents, props changed) vendor/llvm/dist/test/Other/Inputs/no-block-info.bc (contents, props changed) vendor/llvm/dist/test/Other/bcanalyzer-block-info.txt (contents, props changed) vendor/llvm/dist/test/Other/lit-unicode.txt (contents, props changed) vendor/llvm/dist/test/SymbolRewriter/ vendor/llvm/dist/test/SymbolRewriter/rewrite.ll vendor/llvm/dist/test/SymbolRewriter/rewrite.map vendor/llvm/dist/test/TableGen/BitOffsetDecoder.td vendor/llvm/dist/test/TableGen/BitsInit.td vendor/llvm/dist/test/TableGen/ClassInstanceValue.td vendor/llvm/dist/test/Transforms/AlignmentFromAssumptions/ vendor/llvm/dist/test/Transforms/AlignmentFromAssumptions/simple.ll vendor/llvm/dist/test/Transforms/AlignmentFromAssumptions/simple32.ll vendor/llvm/dist/test/Transforms/AlignmentFromAssumptions/start-unk.ll vendor/llvm/dist/test/Transforms/ArgumentPromotion/fp80.ll vendor/llvm/dist/test/Transforms/ArgumentPromotion/variadic.ll vendor/llvm/dist/test/Transforms/AtomicExpand/ vendor/llvm/dist/test/Transforms/AtomicExpand/ARM/ vendor/llvm/dist/test/Transforms/AtomicExpand/ARM/atomic-expansion-v7.ll vendor/llvm/dist/test/Transforms/AtomicExpand/ARM/atomic-expansion-v8.ll vendor/llvm/dist/test/Transforms/AtomicExpand/ARM/cmpxchg-weak.ll vendor/llvm/dist/test/Transforms/AtomicExpand/ARM/lit.local.cfg vendor/llvm/dist/test/Transforms/CodeGenPrepare/AArch64/ vendor/llvm/dist/test/Transforms/CodeGenPrepare/AArch64/lit.local.cfg vendor/llvm/dist/test/Transforms/CodeGenPrepare/AArch64/trunc-weird-user.ll vendor/llvm/dist/test/Transforms/ConstProp/trunc_vec.ll vendor/llvm/dist/test/Transforms/CorrelatedValuePropagation/icmp.ll vendor/llvm/dist/test/Transforms/FunctionAttrs/optnone-simple.ll vendor/llvm/dist/test/Transforms/FunctionAttrs/optnone.ll vendor/llvm/dist/test/Transforms/GCOVProfiling/function-numbering.ll vendor/llvm/dist/test/Transforms/GCOVProfiling/return-block.ll vendor/llvm/dist/test/Transforms/GVN/load-from-unreachable-predecessor.ll vendor/llvm/dist/test/Transforms/GVN/noalias.ll vendor/llvm/dist/test/Transforms/GVN/pre-gep-load.ll vendor/llvm/dist/test/Transforms/GlobalDCE/deadblockaddr.ll vendor/llvm/dist/test/Transforms/GlobalDCE/pr20981.ll vendor/llvm/dist/test/Transforms/GlobalOpt/pr21191.ll vendor/llvm/dist/test/Transforms/GlobalOpt/preserve-comdats.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/NVPTX/ vendor/llvm/dist/test/Transforms/IndVarSimplify/NVPTX/lit.local.cfg vendor/llvm/dist/test/Transforms/IndVarSimplify/NVPTX/no-widen-expensive.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/backedge-on-min-max.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/sharpen-range.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/strengthen-overflow.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/use-range-metadata.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/widen-loop-comp.ll vendor/llvm/dist/test/Transforms/Inline/align.ll vendor/llvm/dist/test/Transforms/Inline/ephemeral.ll vendor/llvm/dist/test/Transforms/Inline/inline-musttail-varargs.ll vendor/llvm/dist/test/Transforms/Inline/inline_dbg_declare.ll vendor/llvm/dist/test/Transforms/Inline/noalias-calls.ll vendor/llvm/dist/test/Transforms/Inline/noalias-cs.ll vendor/llvm/dist/test/Transforms/Inline/noalias.ll vendor/llvm/dist/test/Transforms/Inline/noalias2.ll vendor/llvm/dist/test/Transforms/Inline/pr21206.ll vendor/llvm/dist/test/Transforms/InstCombine/alias-recursion.ll vendor/llvm/dist/test/Transforms/InstCombine/align-attr.ll vendor/llvm/dist/test/Transforms/InstCombine/assume-loop-align.ll vendor/llvm/dist/test/Transforms/InstCombine/assume-redundant.ll vendor/llvm/dist/test/Transforms/InstCombine/assume.ll vendor/llvm/dist/test/Transforms/InstCombine/assume2.ll vendor/llvm/dist/test/Transforms/InstCombine/cast-int-fcmp-eq-0.ll vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-alias.ll vendor/llvm/dist/test/Transforms/InstCombine/fabs.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp-range.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp-shr.ll vendor/llvm/dist/test/Transforms/InstCombine/loadstore-metadata.ll vendor/llvm/dist/test/Transforms/InstCombine/maxnum.ll vendor/llvm/dist/test/Transforms/InstCombine/minnum.ll vendor/llvm/dist/test/Transforms/InstCombine/narrow-switch.ll vendor/llvm/dist/test/Transforms/InstCombine/no_cgscc_assert.ll vendor/llvm/dist/test/Transforms/InstCombine/pr21199.ll vendor/llvm/dist/test/Transforms/InstCombine/pr21210.ll vendor/llvm/dist/test/Transforms/InstCombine/pr21651.ll vendor/llvm/dist/test/Transforms/InstCombine/pr21891.ll vendor/llvm/dist/test/Transforms/InstCombine/range-check.ll vendor/llvm/dist/test/Transforms/InstCombine/select-cmp-br.ll vendor/llvm/dist/test/Transforms/InstCombine/statepoint.ll vendor/llvm/dist/test/Transforms/InstCombine/unordered-fcmp-select.ll vendor/llvm/dist/test/Transforms/InstCombine/vsx-unaligned.ll vendor/llvm/dist/test/Transforms/InstMerge/ld_hoist1.ll vendor/llvm/dist/test/Transforms/InstMerge/st_sink_barrier_call.ll vendor/llvm/dist/test/Transforms/InstMerge/st_sink_no_barrier_call.ll vendor/llvm/dist/test/Transforms/InstMerge/st_sink_no_barrier_load.ll vendor/llvm/dist/test/Transforms/InstMerge/st_sink_no_barrier_store.ll vendor/llvm/dist/test/Transforms/InstMerge/st_sink_two_stores.ll vendor/llvm/dist/test/Transforms/InstMerge/st_sink_with_barrier.ll vendor/llvm/dist/test/Transforms/InstSimplify/assume.ll vendor/llvm/dist/test/Transforms/InstSimplify/fold-builtin-fma.ll vendor/llvm/dist/test/Transforms/InstSimplify/gep.ll vendor/llvm/dist/test/Transforms/InstSimplify/noalias-ptr.ll vendor/llvm/dist/test/Transforms/InstSimplify/select.ll vendor/llvm/dist/test/Transforms/InstSimplify/shr-nop.ll vendor/llvm/dist/test/Transforms/InstSimplify/vector_ptr_bitcast.ll vendor/llvm/dist/test/Transforms/JumpThreading/assume-edge-dom.ll vendor/llvm/dist/test/Transforms/JumpThreading/assume.ll vendor/llvm/dist/test/Transforms/JumpThreading/conservative-lvi.ll vendor/llvm/dist/test/Transforms/JumpThreading/pr22086.ll vendor/llvm/dist/test/Transforms/LICM/2014-09-10-doFinalizationAssert.ll vendor/llvm/dist/test/Transforms/LICM/PR19798.ll vendor/llvm/dist/test/Transforms/LICM/preheader-safe.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-aa.ll vendor/llvm/dist/test/Transforms/LoadCombine/load-combine-assume.ll vendor/llvm/dist/test/Transforms/LoopRotate/nosimplifylatch.ll vendor/llvm/dist/test/Transforms/LoopUnroll/PowerPC/p7-unrolling.ll vendor/llvm/dist/test/Transforms/LoopUnroll/ephemeral.ll vendor/llvm/dist/test/Transforms/LoopUnroll/ignore-annotation-intrinsic-cost.ll vendor/llvm/dist/test/Transforms/LoopUnroll/nsw-tripcount.ll vendor/llvm/dist/test/Transforms/LoopUnroll/tripcount-overflow.ll vendor/llvm/dist/test/Transforms/LoopUnroll/update-loop-info-in-subloops.ll vendor/llvm/dist/test/Transforms/LoopVectorize/AArch64/sdiv-pow2.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/assume.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/masked_load_store.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/powof2div.ll vendor/llvm/dist/test/Transforms/LoopVectorize/conditional-assignment.ll vendor/llvm/dist/test/Transforms/LoopVectorize/duplicated-metadata.ll vendor/llvm/dist/test/Transforms/LoopVectorize/exact.ll vendor/llvm/dist/test/Transforms/LoopVectorize/loop-vect-memdep.ll vendor/llvm/dist/test/Transforms/MemCpyOpt/callslot_deref.ll vendor/llvm/dist/test/Transforms/MemCpyOpt/memcpy-to-memset-with-lifetimes.ll vendor/llvm/dist/test/Transforms/MergeFunc/vector-GEP-crash.ll vendor/llvm/dist/test/Transforms/ObjCARC/provenance.ll vendor/llvm/dist/test/Transforms/PartiallyInlineLibCalls/ vendor/llvm/dist/test/Transforms/PartiallyInlineLibCalls/bad-prototype.ll vendor/llvm/dist/test/Transforms/Reassociate/canonicalize-neg-const.ll vendor/llvm/dist/test/Transforms/Reassociate/commute.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-AgressiveSubMove.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-ArrayOutOfBounds.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-MissedTree.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-ReassociateVector.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-SubReassociate.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-basictest.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-fp-commute.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-mightymul.ll vendor/llvm/dist/test/Transforms/Reassociate/fast-multistep.ll vendor/llvm/dist/test/Transforms/Reassociate/mixed-fast-nonfast-fp.ll vendor/llvm/dist/test/Transforms/Reassociate/negation1.ll vendor/llvm/dist/test/Transforms/Reassociate/pr21205.ll vendor/llvm/dist/test/Transforms/Reassociate/wrap-flags.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/commute.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/load-store-q.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/AArch64/sdiv-pow2.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/crash_binaryop.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/crash_gep.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/crash_scheduling.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/extract_in_tree_user.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/powof2div.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/propagate_ir_flags.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/return.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/scheduling.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/unreachable.ll vendor/llvm/dist/test/Transforms/SROA/vector-lifetime-intrinsic.ll vendor/llvm/dist/test/Transforms/SampleProfile/Inputs/fnptr.binprof (contents, props changed) vendor/llvm/dist/test/Transforms/SampleProfile/Inputs/fnptr.prof vendor/llvm/dist/test/Transforms/SampleProfile/fnptr.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch-covered-bug.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/assume.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/branch-fold-threshold.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/hoist-with-range.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/switch-range-to-icmp.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/switch-to-br.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/switch-to-select-multiple-edge-per-block-phi.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/switch-to-select-two-case.ll vendor/llvm/dist/test/Transforms/StructurizeCFG/one-loop-multiple-backedges.ll vendor/llvm/dist/test/Transforms/TailCallElim/EraseBB.ll vendor/llvm/dist/test/Transforms/Util/ vendor/llvm/dist/test/Transforms/Util/flattencfg.ll vendor/llvm/dist/test/Transforms/Util/lowerswitch.ll vendor/llvm/dist/test/Verifier/frameallocate.ll vendor/llvm/dist/test/Verifier/statepoint.ll vendor/llvm/dist/test/tools/dsymutil/ vendor/llvm/dist/test/tools/dsymutil/Inputs/ vendor/llvm/dist/test/tools/dsymutil/Inputs/basic-archive.macho.x86_64 (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic-lto.macho.x86_64 (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic-lto.macho.x86_64.o (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic.macho.x86_64 (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic1.c (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic1.macho.x86_64.o (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic2.c (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic2.macho.x86_64.o (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic3.c (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/basic3.macho.x86_64.o (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/Inputs/libbasic.a (contents, props changed) vendor/llvm/dist/test/tools/dsymutil/debug-map-parsing.test vendor/llvm/dist/test/tools/gold/ vendor/llvm/dist/test/tools/gold/Inputs/ vendor/llvm/dist/test/tools/gold/Inputs/alias-1.ll vendor/llvm/dist/test/tools/gold/Inputs/bcsection.s (contents, props changed) vendor/llvm/dist/test/tools/gold/Inputs/comdat.ll vendor/llvm/dist/test/tools/gold/Inputs/common.ll vendor/llvm/dist/test/tools/gold/Inputs/invalid.bc (contents, props changed) vendor/llvm/dist/test/tools/gold/Inputs/linker-script.export vendor/llvm/dist/test/tools/gold/Inputs/linkonce-weak.ll vendor/llvm/dist/test/tools/gold/Inputs/pr19901-1.ll vendor/llvm/dist/test/tools/gold/Inputs/weak.ll vendor/llvm/dist/test/tools/gold/alias.ll vendor/llvm/dist/test/tools/gold/bad-alias.ll vendor/llvm/dist/test/tools/gold/bcsection.ll vendor/llvm/dist/test/tools/gold/coff.ll vendor/llvm/dist/test/tools/gold/comdat.ll vendor/llvm/dist/test/tools/gold/common.ll vendor/llvm/dist/test/tools/gold/emit-llvm.ll vendor/llvm/dist/test/tools/gold/invalid.ll vendor/llvm/dist/test/tools/gold/linker-script.ll vendor/llvm/dist/test/tools/gold/linkonce-weak.ll vendor/llvm/dist/test/tools/gold/lit.local.cfg vendor/llvm/dist/test/tools/gold/mtriple.ll vendor/llvm/dist/test/tools/gold/option.ll vendor/llvm/dist/test/tools/gold/pr19901.ll vendor/llvm/dist/test/tools/gold/slp-vectorize.ll vendor/llvm/dist/test/tools/gold/stats.ll vendor/llvm/dist/test/tools/gold/vectorize.ll vendor/llvm/dist/test/tools/gold/weak.ll vendor/llvm/dist/test/tools/llvm-cov/Inputs/highlightedRanges.covmapping (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/highlightedRanges.profdata (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/lineExecutionCounts.covmapping (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/lineExecutionCounts.profdata (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/regionMarkers.covmapping (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/regionMarkers.profdata (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/report.covmapping (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/report.profdata (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/showExpansions.covmapping (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/showExpansions.profdata (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/templateInstantiations.covmapping (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/Inputs/templateInstantiations.profdata (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/report.cpp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/showExpansions.cpp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/showHighlightedRanges.cpp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/showLineExecutionCounts.cpp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/showRegionMarkers.cpp (contents, props changed) vendor/llvm/dist/test/tools/llvm-cov/showTemplateInstantiations.cpp (contents, props changed) vendor/llvm/dist/test/tools/llvm-dwarfdump/ vendor/llvm/dist/test/tools/llvm-dwarfdump/AArch64/ vendor/llvm/dist/test/tools/llvm-dwarfdump/ARM/ vendor/llvm/dist/test/tools/llvm-mc/ vendor/llvm/dist/test/tools/llvm-mc/line_end_with_space.test vendor/llvm/dist/test/tools/llvm-objdump/AArch64/ vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/ vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/ObjC.exe.macho-aarch64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/ObjC.obj.macho-aarch64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/hello.exe.macho-aarch64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/AArch64/Inputs/hello.obj.macho-aarch64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/AArch64/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/AArch64/macho-private-headers.test vendor/llvm/dist/test/tools/llvm-objdump/AArch64/macho-symbolized-disassembly.test vendor/llvm/dist/test/tools/llvm-objdump/ARM/ vendor/llvm/dist/test/tools/llvm-objdump/ARM/Inputs/ vendor/llvm/dist/test/tools/llvm-objdump/ARM/Inputs/hello.exe.macho-arm (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/ARM/Inputs/hello.obj.macho-arm (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/ARM/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/ARM/macho-arm-and-thumb.test vendor/llvm/dist/test/tools/llvm-objdump/ARM/macho-mattr-arm.test vendor/llvm/dist/test/tools/llvm-objdump/ARM/macho-mcpu-arm.test vendor/llvm/dist/test/tools/llvm-objdump/ARM/macho-private-headers.test vendor/llvm/dist/test/tools/llvm-objdump/ARM/macho-symbolized-disassembly.test vendor/llvm/dist/test/tools/llvm-objdump/ARM/macho-symbolized-subtractor.test vendor/llvm/dist/test/tools/llvm-objdump/Inputs/bad-ordinal.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/bind.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/bind2.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/compact-unwind.macho-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/compact-unwind.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/exports-trie.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/lazy-bind.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/rebase.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/unwind-info-no-relocs.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/unwind-info.macho-arm64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/unwind-info.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/Inputs/weak-bind.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/ vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/ vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/ObjC.exe.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/ObjC.obj.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/dylibLoadKinds.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/dylibRoutines.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/dylibSubClient.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/dylibSubFramework.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/dylibSubLibrary.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/dylibSubUmbrella.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/exeThread.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/hello.exe.macho-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/hello.exe.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/hello.obj.macho-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/hello.obj.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/hello_cpp.exe.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/linkerOption.macho-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/macho-universal-archive.x86_64.i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/macho-universal.x86_64.i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/out-of-section-sym.elf-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/Inputs/trivial.obj.elf-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-objdump/X86/disassembly-show-raw.test vendor/llvm/dist/test/tools/llvm-objdump/X86/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-private-headers.test vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-symbolized-disassembly.test vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-symbolized-subtractor-i386.test vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-symbolized-subtractor.test vendor/llvm/dist/test/tools/llvm-objdump/X86/macho-universal-x86_64.i386.test vendor/llvm/dist/test/tools/llvm-objdump/X86/out-of-section-sym.test vendor/llvm/dist/test/tools/llvm-objdump/macho-bad-ordinal.test vendor/llvm/dist/test/tools/llvm-objdump/macho-bind.test vendor/llvm/dist/test/tools/llvm-objdump/macho-bind2.test vendor/llvm/dist/test/tools/llvm-objdump/macho-compact-unwind-i386.test vendor/llvm/dist/test/tools/llvm-objdump/macho-compact-unwind-x86_64.test vendor/llvm/dist/test/tools/llvm-objdump/macho-exports-trie.test vendor/llvm/dist/test/tools/llvm-objdump/macho-lazy-bind.test vendor/llvm/dist/test/tools/llvm-objdump/macho-rebase.test vendor/llvm/dist/test/tools/llvm-objdump/macho-unwind-info-arm64.test vendor/llvm/dist/test/tools/llvm-objdump/macho-unwind-info-no-relocs.test vendor/llvm/dist/test/tools/llvm-objdump/macho-unwind-info-x86_64.test vendor/llvm/dist/test/tools/llvm-objdump/macho-weak-bind.test vendor/llvm/dist/test/tools/llvm-profdata/Inputs/bad-hash.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/bar3-1.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/c-general.profraw (contents, props changed) vendor/llvm/dist/test/tools/llvm-profdata/Inputs/compat.profdata.v1 (contents, props changed) vendor/llvm/dist/test/tools/llvm-profdata/Inputs/empty.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/extra-word.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3-1.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3-2.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3bar3-1.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/invalid-count-later.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/no-counts.proftext vendor/llvm/dist/test/tools/llvm-profdata/Inputs/sample-profile.proftext vendor/llvm/dist/test/tools/llvm-profdata/compat.proftext vendor/llvm/dist/test/tools/llvm-profdata/count-mismatch.proftext vendor/llvm/dist/test/tools/llvm-profdata/general.proftext vendor/llvm/dist/test/tools/llvm-profdata/hash-mismatch.proftext vendor/llvm/dist/test/tools/llvm-profdata/lit.local.cfg vendor/llvm/dist/test/tools/llvm-profdata/multiple-inputs.test vendor/llvm/dist/test/tools/llvm-profdata/overflow.proftext vendor/llvm/dist/test/tools/llvm-profdata/sample-profile-basic.test vendor/llvm/dist/test/tools/llvm-profdata/text-format-errors.test vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-0.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-1.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-10.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-11.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-12.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-13.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-136.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-14.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-15.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-2.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-3.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-4.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-5.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-6.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-7.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-8.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-9.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-A.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-M.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-R.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-S.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-conformance-1.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/ARM/attribute-conformance-2.s (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/bad-relocs.obj.coff-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/basereloc.obj.coff-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/bigobj.coff-x86-64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/comdat-function-linetables.obj.coff-2012-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/comdat-function-linetables.obj.coff-2013-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/directives.obj.coff-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/export-arm.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/export-x64.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/export-x86.dll (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/imports.exe.coff-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/imports.exe.coff-x86-64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifile-linetables.obj.coff-2013-i368 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifile-linetables.obj.coff-2013-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifunction-linetables.obj.coff-2013-i368 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifunction-linetables.obj.coff-2013-x86_64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/Inputs/relocs-no-symtab.obj.coff-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-readobj/bigobj.test vendor/llvm/dist/test/tools/llvm-readobj/coff-basereloc.test vendor/llvm/dist/test/tools/llvm-readobj/coff-directives.test vendor/llvm/dist/test/tools/llvm-readobj/coff-exports.test vendor/llvm/dist/test/tools/llvm-readobj/imports.test vendor/llvm/dist/test/tools/llvm-symbolizer/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-differentname.dSYM/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-differentname.dSYM/Contents/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-differentname.dSYM/Contents/Info.plist (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-differentname.dSYM/Contents/Resources/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-differentname.dSYM/Contents/Resources/DWARF/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-differentname.dSYM/Contents/Resources/DWARF/dsym-test-exe-second (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe-second (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe.dSYM/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe.dSYM/Contents/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe.dSYM/Contents/Info.plist (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe.dSYM/Contents/Resources/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe.dSYM/Contents/Resources/DWARF/ vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test-exe.dSYM/Contents/Resources/DWARF/dsym-test-exe (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/dsym-test.c (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/Inputs/ppc64 (contents, props changed) vendor/llvm/dist/test/tools/llvm-symbolizer/dsym.test vendor/llvm/dist/test/tools/llvm-symbolizer/ppc64.test vendor/llvm/dist/test/tools/llvm-vtabledump/ vendor/llvm/dist/test/tools/llvm-vtabledump/Inputs/ vendor/llvm/dist/test/tools/llvm-vtabledump/Inputs/trivial.obj.coff-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-vtabledump/Inputs/trivial.obj.elf-i386 (contents, props changed) vendor/llvm/dist/test/tools/llvm-vtabledump/trivial.test vendor/llvm/dist/tools/dsymutil/ vendor/llvm/dist/tools/dsymutil/BinaryHolder.cpp (contents, props changed) vendor/llvm/dist/tools/dsymutil/BinaryHolder.h (contents, props changed) vendor/llvm/dist/tools/dsymutil/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/dsymutil/DebugMap.cpp (contents, props changed) vendor/llvm/dist/tools/dsymutil/DebugMap.h (contents, props changed) vendor/llvm/dist/tools/dsymutil/DwarfLinker.cpp (contents, props changed) vendor/llvm/dist/tools/dsymutil/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/tools/dsymutil/MachODebugMapParser.cpp (contents, props changed) vendor/llvm/dist/tools/dsymutil/Makefile (contents, props changed) vendor/llvm/dist/tools/dsymutil/dsymutil.cpp (contents, props changed) vendor/llvm/dist/tools/dsymutil/dsymutil.h (contents, props changed) vendor/llvm/dist/tools/llvm-ar/install_symlink.cmake vendor/llvm/dist/tools/llvm-cov/CodeCoverage.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageFilters.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageFilters.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageReport.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageReport.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageSummary.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageSummary.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageSummaryInfo.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageSummaryInfo.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/CoverageViewOptions.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/RenderingSupport.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/SourceCoverageView.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/SourceCoverageView.h (contents, props changed) vendor/llvm/dist/tools/llvm-cov/TestingSupport.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-cov/gcov.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-go/ vendor/llvm/dist/tools/llvm-go/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/llvm-go/Makefile (contents, props changed) vendor/llvm/dist/tools/llvm-go/llvm-go.go vendor/llvm/dist/tools/llvm-shlib/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/llvm-shlib/libllvm.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/ vendor/llvm/dist/tools/llvm-vtabledump/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/Error.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/Error.h (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/Makefile (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/llvm-vtabledump.cpp (contents, props changed) vendor/llvm/dist/tools/llvm-vtabledump/llvm-vtabledump.h (contents, props changed) vendor/llvm/dist/tools/msbuild/toolset-vs2014.targets vendor/llvm/dist/tools/msbuild/toolset-vs2014_xp.targets vendor/llvm/dist/tools/verify-uselistorder/ vendor/llvm/dist/tools/verify-uselistorder/CMakeLists.txt (contents, props changed) vendor/llvm/dist/tools/verify-uselistorder/LLVMBuild.txt (contents, props changed) vendor/llvm/dist/tools/verify-uselistorder/Makefile (contents, props changed) vendor/llvm/dist/tools/verify-uselistorder/verify-uselistorder.cpp (contents, props changed) vendor/llvm/dist/unittests/ADT/FunctionRefTest.cpp (contents, props changed) vendor/llvm/dist/unittests/ADT/PostOrderIteratorTest.cpp (contents, props changed) vendor/llvm/dist/unittests/Analysis/CallGraphTest.cpp (contents, props changed) vendor/llvm/dist/unittests/Bitcode/BitstreamReaderTest.cpp (contents, props changed) vendor/llvm/dist/unittests/IR/DebugInfoTest.cpp (contents, props changed) vendor/llvm/dist/unittests/IR/UseTest.cpp (contents, props changed) vendor/llvm/dist/unittests/MC/Disassembler.cpp (contents, props changed) vendor/llvm/dist/unittests/Support/StreamingMemoryObject.cpp (contents, props changed) vendor/llvm/dist/utils/bisect (contents, props changed) vendor/llvm/dist/utils/lit/tests/xunit-output.py (contents, props changed) vendor/llvm/dist/utils/shuffle_fuzz.py (contents, props changed) vendor/llvm/dist/utils/update_llc_test_checks.py (contents, props changed) Deleted: vendor/llvm/dist/bindings/ocaml/transforms/scalar/Makefile vendor/llvm/dist/bindings/ocaml/transforms/scalar/llvm_scalar_opts.ml vendor/llvm/dist/bindings/ocaml/transforms/scalar/llvm_scalar_opts.mli vendor/llvm/dist/bindings/ocaml/transforms/scalar/scalar_opts_ocaml.c vendor/llvm/dist/include/llvm/Analysis/FindUsedTypes.h vendor/llvm/dist/include/llvm/CodeGen/JITCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachineCodeEmitter.h vendor/llvm/dist/include/llvm/CodeGen/MachineCodeInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineRelocation.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/RegAllocSolver.h vendor/llvm/dist/include/llvm/ExecutionEngine/JIT.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITMemoryManager.h vendor/llvm/dist/include/llvm/ExecutionEngine/ObjectBuffer.h vendor/llvm/dist/include/llvm/ExecutionEngine/ObjectImage.h vendor/llvm/dist/include/llvm/IR/LeakDetector.h vendor/llvm/dist/include/llvm/MC/MCAnalysis/MCAtom.h vendor/llvm/dist/include/llvm/MC/MCAnalysis/MCFunction.h vendor/llvm/dist/include/llvm/MC/MCAnalysis/MCModule.h vendor/llvm/dist/include/llvm/MC/MCAnalysis/MCModuleYAML.h vendor/llvm/dist/include/llvm/MC/MCObjectDisassembler.h vendor/llvm/dist/include/llvm/MC/MCObjectSymbolizer.h vendor/llvm/dist/include/llvm/Support/IncludeFile.h vendor/llvm/dist/include/llvm/Support/StreamableMemoryObject.h vendor/llvm/dist/include/llvm/Support/StringRefMemoryObject.h vendor/llvm/dist/include/llvm/Target/TargetJITInfo.h vendor/llvm/dist/lib/Analysis/IPA/FindUsedTypes.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.h vendor/llvm/dist/lib/CodeGen/AtomicExpandLoadLinkedPass.cpp vendor/llvm/dist/lib/CodeGen/JITCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/MachineCodeEmitter.cpp vendor/llvm/dist/lib/CodeGen/Spiller.cpp vendor/llvm/dist/lib/DebugInfo/DWARFAbbreviationDeclaration.h vendor/llvm/dist/lib/DebugInfo/DWARFCompileUnit.h vendor/llvm/dist/lib/DebugInfo/DWARFContext.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugAbbrev.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugArangeSet.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugAranges.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugFrame.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugInfoEntry.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugLine.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugLoc.h vendor/llvm/dist/lib/DebugInfo/DWARFDebugRangeList.h vendor/llvm/dist/lib/DebugInfo/DWARFRelocMap.h vendor/llvm/dist/lib/DebugInfo/DWARFTypeUnit.h vendor/llvm/dist/lib/DebugInfo/DWARFUnit.h vendor/llvm/dist/lib/ExecutionEngine/JIT/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JIT.h vendor/llvm/dist/lib/ExecutionEngine/JIT/JITEmitter.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/JITMemoryManager.cpp vendor/llvm/dist/lib/ExecutionEngine/JIT/LLVMBuild.txt vendor/llvm/dist/lib/ExecutionEngine/JIT/Makefile vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/GDBRegistrar.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/JITRegistrar.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/ObjectImageCommon.h vendor/llvm/dist/lib/IR/LeakDetector.cpp vendor/llvm/dist/lib/MC/MCAnalysis/CMakeLists.txt vendor/llvm/dist/lib/MC/MCAnalysis/LLVMBuild.txt vendor/llvm/dist/lib/MC/MCAnalysis/MCAtom.cpp vendor/llvm/dist/lib/MC/MCAnalysis/MCFunction.cpp vendor/llvm/dist/lib/MC/MCAnalysis/MCModule.cpp vendor/llvm/dist/lib/MC/MCAnalysis/MCModuleYAML.cpp vendor/llvm/dist/lib/MC/MCAnalysis/MCObjectDisassembler.cpp vendor/llvm/dist/lib/MC/MCAnalysis/MCObjectSymbolizer.cpp vendor/llvm/dist/lib/MC/MCAnalysis/Makefile vendor/llvm/dist/lib/MC/MCDisassembler.cpp vendor/llvm/dist/lib/MC/MCExternalSymbolizer.cpp vendor/llvm/dist/lib/MC/MCRelocationInfo.cpp vendor/llvm/dist/lib/Support/IncludeFile.cpp vendor/llvm/dist/lib/Support/StreamableMemoryObject.cpp vendor/llvm/dist/lib/Support/StringRefMemoryObject.cpp vendor/llvm/dist/lib/Target/ARM/ARMCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/ARMJITInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMJITInfo.h vendor/llvm/dist/lib/Target/ARM/ARMRelocations.h vendor/llvm/dist/lib/Target/Hexagon/InstPrinter/ vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsABIInfo.h vendor/llvm/dist/lib/Target/Mips/MipsCodeEmitter.cpp vendor/llvm/dist/lib/Target/Mips/MipsJITInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsJITInfo.h vendor/llvm/dist/lib/Target/Mips/MipsRelocations.h vendor/llvm/dist/lib/Target/PowerPC/PPCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCJITInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCJITInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRelocations.h vendor/llvm/dist/lib/Target/Sparc/SparcCodeEmitter.cpp vendor/llvm/dist/lib/Target/Sparc/SparcJITInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcJITInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcRelocations.h vendor/llvm/dist/lib/Target/TargetJITInfo.cpp vendor/llvm/dist/lib/Target/X86/X86AtomicExpandPass.cpp vendor/llvm/dist/lib/Target/X86/X86CodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/X86JITInfo.cpp vendor/llvm/dist/lib/Target/X86/X86JITInfo.h vendor/llvm/dist/lib/Target/X86/X86Relocations.h vendor/llvm/dist/lib/Transforms/Instrumentation/DebugIR.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/DebugIR.h vendor/llvm/dist/test/Bindings/Ocaml/ vendor/llvm/dist/test/Bitcode/deprecated-linker_private-linker_private_weak.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-dagcombiner-indexed-load.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-select.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-frameaddr.ll vendor/llvm/dist/test/CodeGen/ARM/2009-10-21-InvalidFNeg.ll vendor/llvm/dist/test/CodeGen/ARM/jump_tables.ll vendor/llvm/dist/test/CodeGen/Mips/fptr2.ll vendor/llvm/dist/test/CodeGen/PowerPC/Atomics-32.ll vendor/llvm/dist/test/CodeGen/R600/fp64_to_sint.ll vendor/llvm/dist/test/CodeGen/R600/insert_vector_elt_f64.ll vendor/llvm/dist/test/CodeGen/R600/sint_to_fp64.ll vendor/llvm/dist/test/CodeGen/X86/2008-06-18-BadShuffle.ll vendor/llvm/dist/test/CodeGen/X86/2009-04-21-NoReloadImpDef.ll vendor/llvm/dist/test/CodeGen/X86/2012-05-19-avx2-store.ll vendor/llvm/dist/test/CodeGen/X86/avx-blend.ll vendor/llvm/dist/test/CodeGen/X86/avx-movdup.ll vendor/llvm/dist/test/CodeGen/X86/avx-sext.ll vendor/llvm/dist/test/CodeGen/X86/avx-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/avx-vmovddup.ll vendor/llvm/dist/test/CodeGen/X86/avx-vperm2f128.ll vendor/llvm/dist/test/CodeGen/X86/avx-vpermil.ll vendor/llvm/dist/test/CodeGen/X86/avx-vshufp.ll vendor/llvm/dist/test/CodeGen/X86/avx-zext.ll vendor/llvm/dist/test/CodeGen/X86/avx2-blend.ll vendor/llvm/dist/test/CodeGen/X86/avx2-palignr.ll vendor/llvm/dist/test/CodeGen/X86/avx2-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/avx2-unpack.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vperm2i128.ll vendor/llvm/dist/test/CodeGen/X86/avx512-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/avx512-zext-load-crash.ll vendor/llvm/dist/test/CodeGen/X86/blend-msb.ll vendor/llvm/dist/test/CodeGen/X86/break-avx-dep.ll vendor/llvm/dist/test/CodeGen/X86/break-sse-dep.ll vendor/llvm/dist/test/CodeGen/X86/combine-vec-shuffle-2.ll vendor/llvm/dist/test/CodeGen/X86/combine-vec-shuffle-3.ll vendor/llvm/dist/test/CodeGen/X86/combine-vec-shuffle-4.ll vendor/llvm/dist/test/CodeGen/X86/combine-vec-shuffle-5.ll vendor/llvm/dist/test/CodeGen/X86/combine-vec-shuffle.ll vendor/llvm/dist/test/CodeGen/X86/copysign-zero.ll vendor/llvm/dist/test/CodeGen/X86/fma4-intrinsics-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/fold-pcmpeqd-0.ll vendor/llvm/dist/test/CodeGen/X86/i8-umulo.ll vendor/llvm/dist/test/CodeGen/X86/long-extend.ll vendor/llvm/dist/test/CodeGen/X86/no-compact-unwind.ll vendor/llvm/dist/test/CodeGen/X86/peep-vector-extract-concat.ll vendor/llvm/dist/test/CodeGen/X86/peep-vector-extract-insert.ll vendor/llvm/dist/test/CodeGen/X86/pr12359.ll vendor/llvm/dist/test/CodeGen/X86/splat-scalar-load.ll vendor/llvm/dist/test/CodeGen/X86/sse-scalar-fp-arith-2.ll vendor/llvm/dist/test/CodeGen/X86/sse2-blend.ll vendor/llvm/dist/test/CodeGen/X86/sse2-mul.ll vendor/llvm/dist/test/CodeGen/X86/sse41-blend.ll vendor/llvm/dist/test/CodeGen/X86/swizzle.ll vendor/llvm/dist/test/CodeGen/X86/v-binop-widen.ll vendor/llvm/dist/test/CodeGen/X86/v-binop-widen2.ll vendor/llvm/dist/test/CodeGen/X86/vec_compare-2.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-6.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-5.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-9.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-E.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-G.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-I.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-J.ll vendor/llvm/dist/test/CodeGen/X86/vec_sext.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-11.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-14.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-15.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-16.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-17.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-18.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-19.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-20.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-22.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-23.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-24.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-25.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-26.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-27.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-28.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-30.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-31.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-34.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-35.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-36.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-37.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-38.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-39.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-40.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle-41.ll vendor/llvm/dist/test/CodeGen/X86/vec_shuffle.ll vendor/llvm/dist/test/CodeGen/X86/vec_splat-2.ll vendor/llvm/dist/test/CodeGen/X86/vec_splat-3.ll vendor/llvm/dist/test/CodeGen/X86/vec_splat.ll vendor/llvm/dist/test/CodeGen/X86/vec_zext.ll vendor/llvm/dist/test/DebugInfo/cu-line-tables.ll vendor/llvm/dist/test/ExecutionEngine/2003-05-11-PHIRegAllocBug.ll vendor/llvm/dist/test/ExecutionEngine/2003-06-04-bzip2-bug.ll vendor/llvm/dist/test/ExecutionEngine/2003-06-05-PHIBug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/non-extern-addend-smallcodemodel.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/coverage-dbg.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/coverage.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/keep-instrumented_functions.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/do-not-emit-module-limits.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/wrap_indirect_calls.ll vendor/llvm/dist/test/JitListener/test-common-symbols.ll vendor/llvm/dist/test/JitListener/test-inline.ll vendor/llvm/dist/test/JitListener/test-parameters.ll vendor/llvm/dist/test/Linker/2006-06-15-GlobalVarAlignment.ll vendor/llvm/dist/test/Linker/ConstantGlobals1.ll vendor/llvm/dist/test/Linker/ConstantGlobals2.ll vendor/llvm/dist/test/Linker/ConstantGlobals3.ll vendor/llvm/dist/test/Linker/link-messages.ll vendor/llvm/dist/test/Linker/prefixdata.ll vendor/llvm/dist/test/Linker/testlink1.ll vendor/llvm/dist/test/Linker/testlink2.ll vendor/llvm/dist/test/Linker/visibility1.ll vendor/llvm/dist/test/Linker/visibility2.ll vendor/llvm/dist/test/MC/ARM/directive-eabi_attribute-2.s vendor/llvm/dist/test/MC/Disassembler/X86/invalid-cmp-imm.txt vendor/llvm/dist/test/MC/MachO/empty-dwarf-lines.s vendor/llvm/dist/test/MC/Mips/elf-objdump.s vendor/llvm/dist/test/Object/X86/objdump-cfg-invalid-opcode.yaml vendor/llvm/dist/test/Object/X86/objdump-cfg-textatomsize.yaml vendor/llvm/dist/test/Object/X86/objdump-cfg.yaml vendor/llvm/dist/test/Object/X86/objdump-disassembly-symbolic.test vendor/llvm/dist/test/Other/link-opts.ll vendor/llvm/dist/test/Transforms/AtomicExpandLoadLinked/ARM/atomic-expansion-v7.ll vendor/llvm/dist/test/Transforms/AtomicExpandLoadLinked/ARM/atomic-expansion-v8.ll vendor/llvm/dist/test/Transforms/AtomicExpandLoadLinked/ARM/cmpxchg-weak.ll vendor/llvm/dist/test/Transforms/AtomicExpandLoadLinked/ARM/lit.local.cfg vendor/llvm/dist/test/Transforms/DebugIR/ vendor/llvm/dist/test/Transforms/InstCombine/2008-02-16-SDivOverflow.ll vendor/llvm/dist/test/Transforms/InstCombine/add4.ll vendor/llvm/dist/test/Transforms/InstCombine/devirt.ll vendor/llvm/dist/test/Transforms/InstCombine/load-addrspace-cast.ll vendor/llvm/dist/test/Transforms/InstSimplify/ashr-nop.ll vendor/llvm/dist/test/tools/llvm-objdump/Inputs/out-of-section-sym.elf-i386 vendor/llvm/dist/test/tools/llvm-objdump/Inputs/trivial.obj.elf-i386 vendor/llvm/dist/test/tools/llvm-objdump/disassembly-show-raw.test vendor/llvm/dist/test/tools/llvm-objdump/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/out-of-section-sym.test vendor/llvm/dist/test/tools/llvm-profdata/Inputs/bad-hash.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/bar3-1.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/c-general.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/empty.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/extra-word.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3-1.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3-2.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3bar3-1.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo3bar3-2.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo4-1.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/foo4-2.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/invalid-count-later.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/no-counts.profdata vendor/llvm/dist/test/tools/llvm-profdata/Inputs/overflow.profdata vendor/llvm/dist/test/tools/llvm-profdata/errors.test vendor/llvm/dist/test/tools/llvm-profdata/simple.test vendor/llvm/dist/test/tools/llvm-readobj/ARM/attributes.s vendor/llvm/dist/unittests/ExecutionEngine/JIT/CMakeLists.txt vendor/llvm/dist/unittests/ExecutionEngine/JIT/IntelJITEventListenerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITEventListenerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITEventListenerTestCommon.h vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITMemoryManagerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/JITTests.def vendor/llvm/dist/unittests/ExecutionEngine/JIT/Makefile vendor/llvm/dist/unittests/ExecutionEngine/JIT/MultiJITTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/JIT/OProfileJITEventListenerTest.cpp vendor/llvm/dist/unittests/IR/LeakDetectorTest.cpp vendor/llvm/dist/unittests/MC/MCAtomTest.cpp vendor/llvm/dist/unittests/Object/ vendor/llvm/dist/unittests/Transforms/DebugIR/ Modified: vendor/llvm/dist/.gitignore vendor/llvm/dist/CMakeLists.txt vendor/llvm/dist/CODE_OWNERS.TXT vendor/llvm/dist/CREDITS.TXT vendor/llvm/dist/Makefile.config.in vendor/llvm/dist/Makefile.rules vendor/llvm/dist/README.txt vendor/llvm/dist/autoconf/config.sub vendor/llvm/dist/autoconf/configure.ac vendor/llvm/dist/bindings/Makefile vendor/llvm/dist/bindings/ocaml/Makefile vendor/llvm/dist/bindings/ocaml/Makefile.ocaml vendor/llvm/dist/bindings/ocaml/all_backends/Makefile vendor/llvm/dist/bindings/ocaml/analysis/Makefile vendor/llvm/dist/bindings/ocaml/analysis/analysis_ocaml.c vendor/llvm/dist/bindings/ocaml/analysis/llvm_analysis.ml vendor/llvm/dist/bindings/ocaml/analysis/llvm_analysis.mli vendor/llvm/dist/bindings/ocaml/backends/META.llvm_backend.in vendor/llvm/dist/bindings/ocaml/backends/backend_ocaml.c vendor/llvm/dist/bindings/ocaml/bitreader/Makefile vendor/llvm/dist/bindings/ocaml/bitreader/bitreader_ocaml.c vendor/llvm/dist/bindings/ocaml/bitreader/llvm_bitreader.ml vendor/llvm/dist/bindings/ocaml/bitreader/llvm_bitreader.mli vendor/llvm/dist/bindings/ocaml/bitwriter/Makefile vendor/llvm/dist/bindings/ocaml/bitwriter/bitwriter_ocaml.c vendor/llvm/dist/bindings/ocaml/bitwriter/llvm_bitwriter.ml vendor/llvm/dist/bindings/ocaml/bitwriter/llvm_bitwriter.mli vendor/llvm/dist/bindings/ocaml/executionengine/Makefile vendor/llvm/dist/bindings/ocaml/executionengine/executionengine_ocaml.c vendor/llvm/dist/bindings/ocaml/executionengine/llvm_executionengine.ml vendor/llvm/dist/bindings/ocaml/executionengine/llvm_executionengine.mli vendor/llvm/dist/bindings/ocaml/irreader/irreader_ocaml.c vendor/llvm/dist/bindings/ocaml/irreader/llvm_irreader.ml vendor/llvm/dist/bindings/ocaml/linker/linker_ocaml.c vendor/llvm/dist/bindings/ocaml/linker/llvm_linker.ml vendor/llvm/dist/bindings/ocaml/linker/llvm_linker.mli vendor/llvm/dist/bindings/ocaml/llvm/META.llvm.in vendor/llvm/dist/bindings/ocaml/llvm/Makefile vendor/llvm/dist/bindings/ocaml/llvm/llvm.ml vendor/llvm/dist/bindings/ocaml/llvm/llvm.mli vendor/llvm/dist/bindings/ocaml/llvm/llvm_ocaml.c vendor/llvm/dist/bindings/ocaml/target/llvm_target.ml vendor/llvm/dist/bindings/ocaml/target/llvm_target.mli vendor/llvm/dist/bindings/ocaml/target/target_ocaml.c vendor/llvm/dist/bindings/ocaml/transforms/Makefile vendor/llvm/dist/bindings/ocaml/transforms/ipo/Makefile vendor/llvm/dist/bindings/ocaml/transforms/ipo/ipo_ocaml.c vendor/llvm/dist/bindings/ocaml/transforms/ipo/llvm_ipo.ml vendor/llvm/dist/bindings/ocaml/transforms/ipo/llvm_ipo.mli vendor/llvm/dist/bindings/ocaml/transforms/passmgr_builder/llvm_passmgr_builder.mli vendor/llvm/dist/bindings/ocaml/transforms/passmgr_builder/passmgr_builder_ocaml.c vendor/llvm/dist/bindings/ocaml/transforms/vectorize/Makefile vendor/llvm/dist/bindings/ocaml/transforms/vectorize/llvm_vectorize.ml vendor/llvm/dist/bindings/ocaml/transforms/vectorize/llvm_vectorize.mli vendor/llvm/dist/cmake/config-ix.cmake vendor/llvm/dist/cmake/modules/AddLLVM.cmake vendor/llvm/dist/cmake/modules/AddSphinxTarget.cmake vendor/llvm/dist/cmake/modules/CMakeLists.txt vendor/llvm/dist/cmake/modules/CheckAtomic.cmake vendor/llvm/dist/cmake/modules/FindSphinx.cmake vendor/llvm/dist/cmake/modules/GetSVN.cmake vendor/llvm/dist/cmake/modules/HandleLLVMOptions.cmake vendor/llvm/dist/cmake/modules/LLVM-Config.cmake vendor/llvm/dist/cmake/modules/LLVMConfig.cmake.in vendor/llvm/dist/cmake/modules/LLVMProcessSources.cmake vendor/llvm/dist/cmake/modules/Makefile vendor/llvm/dist/cmake/modules/TableGen.cmake vendor/llvm/dist/configure vendor/llvm/dist/docs/Atomics.rst vendor/llvm/dist/docs/BitCodeFormat.rst vendor/llvm/dist/docs/CMake.rst vendor/llvm/dist/docs/CMakeLists.txt vendor/llvm/dist/docs/CodeGenerator.rst vendor/llvm/dist/docs/CodingStandards.rst vendor/llvm/dist/docs/CommandGuide/lit.rst vendor/llvm/dist/docs/CommandGuide/llvm-config.rst vendor/llvm/dist/docs/CommandGuide/llvm-symbolizer.rst vendor/llvm/dist/docs/CommandGuide/opt.rst vendor/llvm/dist/docs/CommandLine.rst vendor/llvm/dist/docs/CompilerWriterInfo.rst vendor/llvm/dist/docs/DeveloperPolicy.rst vendor/llvm/dist/docs/ExtendingLLVM.rst vendor/llvm/dist/docs/GarbageCollection.rst vendor/llvm/dist/docs/GettingStarted.rst vendor/llvm/dist/docs/GettingStartedVS.rst vendor/llvm/dist/docs/GoldPlugin.rst vendor/llvm/dist/docs/HowToSubmitABug.rst vendor/llvm/dist/docs/LangRef.rst vendor/llvm/dist/docs/Lexicon.rst vendor/llvm/dist/docs/LinkTimeOptimization.rst vendor/llvm/dist/docs/MCJITDesignAndImplementation.rst vendor/llvm/dist/docs/Makefile vendor/llvm/dist/docs/Passes.rst vendor/llvm/dist/docs/Phabricator.rst vendor/llvm/dist/docs/ProgrammersManual.rst vendor/llvm/dist/docs/ReleaseNotes.rst vendor/llvm/dist/docs/SourceLevelDebugging.rst vendor/llvm/dist/docs/StackMaps.rst vendor/llvm/dist/docs/TableGen/BackEnds.rst vendor/llvm/dist/docs/TableGen/LangIntro.rst vendor/llvm/dist/docs/TableGen/LangRef.rst vendor/llvm/dist/docs/TableGen/index.rst vendor/llvm/dist/docs/TestingGuide.rst vendor/llvm/dist/docs/WritingAnLLVMBackend.rst vendor/llvm/dist/docs/WritingAnLLVMPass.rst vendor/llvm/dist/docs/conf.py vendor/llvm/dist/docs/index.rst vendor/llvm/dist/docs/tutorial/LangImpl3.rst vendor/llvm/dist/docs/tutorial/LangImpl4.rst vendor/llvm/dist/docs/tutorial/LangImpl5.rst vendor/llvm/dist/docs/tutorial/LangImpl6.rst vendor/llvm/dist/docs/tutorial/LangImpl7.rst vendor/llvm/dist/docs/tutorial/LangImpl8.rst vendor/llvm/dist/examples/BrainF/BrainFDriver.cpp vendor/llvm/dist/examples/BrainF/CMakeLists.txt vendor/llvm/dist/examples/BrainF/Makefile vendor/llvm/dist/examples/ExceptionDemo/CMakeLists.txt vendor/llvm/dist/examples/ExceptionDemo/ExceptionDemo.cpp vendor/llvm/dist/examples/ExceptionDemo/Makefile vendor/llvm/dist/examples/Fibonacci/CMakeLists.txt vendor/llvm/dist/examples/Fibonacci/Makefile vendor/llvm/dist/examples/Fibonacci/fibonacci.cpp vendor/llvm/dist/examples/HowToUseJIT/CMakeLists.txt vendor/llvm/dist/examples/HowToUseJIT/HowToUseJIT.cpp vendor/llvm/dist/examples/HowToUseJIT/Makefile vendor/llvm/dist/examples/Kaleidoscope/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter2/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter3/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter4/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter4/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter4/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter5/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter5/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter5/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter6/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter6/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter6/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Chapter7/CMakeLists.txt vendor/llvm/dist/examples/Kaleidoscope/Chapter7/Makefile vendor/llvm/dist/examples/Kaleidoscope/Chapter7/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/MCJIT/cached/toy-jit.cpp vendor/llvm/dist/examples/Kaleidoscope/MCJIT/cached/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/MCJIT/complete/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/MCJIT/initial/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/MCJIT/lazy/toy-jit.cpp vendor/llvm/dist/examples/Kaleidoscope/MCJIT/lazy/toy.cpp vendor/llvm/dist/examples/Kaleidoscope/Makefile vendor/llvm/dist/examples/ParallelJIT/CMakeLists.txt vendor/llvm/dist/examples/ParallelJIT/Makefile vendor/llvm/dist/examples/ParallelJIT/ParallelJIT.cpp vendor/llvm/dist/include/llvm-c/BitReader.h vendor/llvm/dist/include/llvm-c/BitWriter.h vendor/llvm/dist/include/llvm-c/Core.h vendor/llvm/dist/include/llvm-c/Disassembler.h vendor/llvm/dist/include/llvm-c/ExecutionEngine.h vendor/llvm/dist/include/llvm-c/Initialization.h vendor/llvm/dist/include/llvm-c/Linker.h vendor/llvm/dist/include/llvm-c/Support.h vendor/llvm/dist/include/llvm-c/Transforms/Scalar.h vendor/llvm/dist/include/llvm-c/lto.h vendor/llvm/dist/include/llvm/ADT/APFloat.h vendor/llvm/dist/include/llvm/ADT/APInt.h vendor/llvm/dist/include/llvm/ADT/APSInt.h vendor/llvm/dist/include/llvm/ADT/ArrayRef.h vendor/llvm/dist/include/llvm/ADT/BitVector.h vendor/llvm/dist/include/llvm/ADT/DenseMap.h vendor/llvm/dist/include/llvm/ADT/DenseSet.h vendor/llvm/dist/include/llvm/ADT/DepthFirstIterator.h vendor/llvm/dist/include/llvm/ADT/IntrusiveRefCntPtr.h vendor/llvm/dist/include/llvm/ADT/MapVector.h vendor/llvm/dist/include/llvm/ADT/Optional.h vendor/llvm/dist/include/llvm/ADT/PostOrderIterator.h vendor/llvm/dist/include/llvm/ADT/STLExtras.h vendor/llvm/dist/include/llvm/ADT/ScopedHashTable.h vendor/llvm/dist/include/llvm/ADT/SetVector.h vendor/llvm/dist/include/llvm/ADT/SmallBitVector.h vendor/llvm/dist/include/llvm/ADT/SmallPtrSet.h vendor/llvm/dist/include/llvm/ADT/SmallSet.h vendor/llvm/dist/include/llvm/ADT/SmallVector.h vendor/llvm/dist/include/llvm/ADT/SparseBitVector.h vendor/llvm/dist/include/llvm/ADT/SparseMultiSet.h vendor/llvm/dist/include/llvm/ADT/SparseSet.h vendor/llvm/dist/include/llvm/ADT/StringMap.h vendor/llvm/dist/include/llvm/ADT/StringRef.h vendor/llvm/dist/include/llvm/ADT/StringSet.h vendor/llvm/dist/include/llvm/ADT/TinyPtrVector.h vendor/llvm/dist/include/llvm/ADT/Triple.h vendor/llvm/dist/include/llvm/ADT/Twine.h vendor/llvm/dist/include/llvm/ADT/VariadicFunction.h vendor/llvm/dist/include/llvm/ADT/ilist.h vendor/llvm/dist/include/llvm/ADT/ilist_node.h vendor/llvm/dist/include/llvm/ADT/iterator.h vendor/llvm/dist/include/llvm/ADT/iterator_range.h vendor/llvm/dist/include/llvm/Analysis/AliasAnalysis.h vendor/llvm/dist/include/llvm/Analysis/AliasSetTracker.h vendor/llvm/dist/include/llvm/Analysis/BlockFrequencyInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/BranchProbabilityInfo.h vendor/llvm/dist/include/llvm/Analysis/CFGPrinter.h vendor/llvm/dist/include/llvm/Analysis/CGSCCPassManager.h vendor/llvm/dist/include/llvm/Analysis/CallGraph.h vendor/llvm/dist/include/llvm/Analysis/CodeMetrics.h vendor/llvm/dist/include/llvm/Analysis/DOTGraphTraitsPass.h vendor/llvm/dist/include/llvm/Analysis/DependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/DominanceFrontier.h vendor/llvm/dist/include/llvm/Analysis/DominanceFrontierImpl.h vendor/llvm/dist/include/llvm/Analysis/IVUsers.h vendor/llvm/dist/include/llvm/Analysis/InlineCost.h vendor/llvm/dist/include/llvm/Analysis/InstructionSimplify.h vendor/llvm/dist/include/llvm/Analysis/IntervalIterator.h vendor/llvm/dist/include/llvm/Analysis/JumpInstrTableInfo.h vendor/llvm/dist/include/llvm/Analysis/LazyCallGraph.h vendor/llvm/dist/include/llvm/Analysis/LazyValueInfo.h vendor/llvm/dist/include/llvm/Analysis/Loads.h vendor/llvm/dist/include/llvm/Analysis/LoopPass.h vendor/llvm/dist/include/llvm/Analysis/MemoryDependenceAnalysis.h vendor/llvm/dist/include/llvm/Analysis/PHITransAddr.h vendor/llvm/dist/include/llvm/Analysis/Passes.h vendor/llvm/dist/include/llvm/Analysis/PostDominators.h vendor/llvm/dist/include/llvm/Analysis/RegionInfo.h vendor/llvm/dist/include/llvm/Analysis/RegionInfoImpl.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolution.h vendor/llvm/dist/include/llvm/Analysis/ScalarEvolutionExpressions.h vendor/llvm/dist/include/llvm/Analysis/TargetTransformInfo.h vendor/llvm/dist/include/llvm/Analysis/ValueTracking.h vendor/llvm/dist/include/llvm/AsmParser/Parser.h vendor/llvm/dist/include/llvm/Bitcode/BitCodes.h vendor/llvm/dist/include/llvm/Bitcode/BitcodeWriterPass.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamReader.h vendor/llvm/dist/include/llvm/Bitcode/BitstreamWriter.h vendor/llvm/dist/include/llvm/Bitcode/LLVMBitCodes.h vendor/llvm/dist/include/llvm/Bitcode/ReaderWriter.h vendor/llvm/dist/include/llvm/CMakeLists.txt vendor/llvm/dist/include/llvm/CodeGen/Analysis.h vendor/llvm/dist/include/llvm/CodeGen/AsmPrinter.h vendor/llvm/dist/include/llvm/CodeGen/CalcSpillWeights.h vendor/llvm/dist/include/llvm/CodeGen/CallingConvLower.h vendor/llvm/dist/include/llvm/CodeGen/CommandFlags.h vendor/llvm/dist/include/llvm/CodeGen/DFAPacketizer.h vendor/llvm/dist/include/llvm/CodeGen/FastISel.h vendor/llvm/dist/include/llvm/CodeGen/FunctionLoweringInfo.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadata.h vendor/llvm/dist/include/llvm/CodeGen/GCMetadataPrinter.h vendor/llvm/dist/include/llvm/CodeGen/GCStrategy.h vendor/llvm/dist/include/llvm/CodeGen/GCs.h vendor/llvm/dist/include/llvm/CodeGen/ISDOpcodes.h vendor/llvm/dist/include/llvm/CodeGen/JumpInstrTables.h vendor/llvm/dist/include/llvm/CodeGen/LexicalScopes.h vendor/llvm/dist/include/llvm/CodeGen/LinkAllCodegenComponents.h vendor/llvm/dist/include/llvm/CodeGen/LiveInterval.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/LiveIntervalUnion.h vendor/llvm/dist/include/llvm/CodeGen/LivePhysRegs.h vendor/llvm/dist/include/llvm/CodeGen/LiveRangeEdit.h vendor/llvm/dist/include/llvm/CodeGen/LiveVariables.h vendor/llvm/dist/include/llvm/CodeGen/MachineBasicBlock.h vendor/llvm/dist/include/llvm/CodeGen/MachineDominators.h vendor/llvm/dist/include/llvm/CodeGen/MachineFrameInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineFunction.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstr.h vendor/llvm/dist/include/llvm/CodeGen/MachineInstrBuilder.h vendor/llvm/dist/include/llvm/CodeGen/MachineMemOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachineModuleInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineOperand.h vendor/llvm/dist/include/llvm/CodeGen/MachinePostDominators.h vendor/llvm/dist/include/llvm/CodeGen/MachineRegisterInfo.h vendor/llvm/dist/include/llvm/CodeGen/MachineScheduler.h vendor/llvm/dist/include/llvm/CodeGen/MachineTraceMetrics.h vendor/llvm/dist/include/llvm/CodeGen/MachineValueType.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/CostAllocator.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Graph.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Math.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/ReductionRules.h vendor/llvm/dist/include/llvm/CodeGen/PBQP/Solution.h vendor/llvm/dist/include/llvm/CodeGen/Passes.h vendor/llvm/dist/include/llvm/CodeGen/RegAllocPBQP.h vendor/llvm/dist/include/llvm/CodeGen/RegisterScavenging.h vendor/llvm/dist/include/llvm/CodeGen/RuntimeLibcalls.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAG.h vendor/llvm/dist/include/llvm/CodeGen/ScheduleDAGInstrs.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAG.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGISel.h vendor/llvm/dist/include/llvm/CodeGen/SelectionDAGNodes.h vendor/llvm/dist/include/llvm/CodeGen/StackMapLivenessAnalysis.h vendor/llvm/dist/include/llvm/CodeGen/StackMaps.h vendor/llvm/dist/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h vendor/llvm/dist/include/llvm/CodeGen/TargetSchedule.h vendor/llvm/dist/include/llvm/Config/config.h.cmake vendor/llvm/dist/include/llvm/Config/config.h.in vendor/llvm/dist/include/llvm/Config/llvm-config.h.cmake vendor/llvm/dist/include/llvm/Config/llvm-config.h.in vendor/llvm/dist/include/llvm/DebugInfo/DIContext.h vendor/llvm/dist/include/llvm/DebugInfo/DWARFFormValue.h vendor/llvm/dist/include/llvm/ExecutionEngine/ExecutionEngine.h vendor/llvm/dist/include/llvm/ExecutionEngine/JITEventListener.h vendor/llvm/dist/include/llvm/ExecutionEngine/ObjectCache.h vendor/llvm/dist/include/llvm/ExecutionEngine/RTDyldMemoryManager.h vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyld.h vendor/llvm/dist/include/llvm/ExecutionEngine/RuntimeDyldChecker.h vendor/llvm/dist/include/llvm/IR/Argument.h vendor/llvm/dist/include/llvm/IR/AssemblyAnnotationWriter.h vendor/llvm/dist/include/llvm/IR/BasicBlock.h vendor/llvm/dist/include/llvm/IR/CFG.h vendor/llvm/dist/include/llvm/IR/CallingConv.h vendor/llvm/dist/include/llvm/IR/Constant.h vendor/llvm/dist/include/llvm/IR/ConstantRange.h vendor/llvm/dist/include/llvm/IR/Constants.h vendor/llvm/dist/include/llvm/IR/DIBuilder.h vendor/llvm/dist/include/llvm/IR/DataLayout.h vendor/llvm/dist/include/llvm/IR/DebugInfo.h vendor/llvm/dist/include/llvm/IR/DebugLoc.h vendor/llvm/dist/include/llvm/IR/DerivedTypes.h vendor/llvm/dist/include/llvm/IR/DiagnosticInfo.h vendor/llvm/dist/include/llvm/IR/DiagnosticPrinter.h vendor/llvm/dist/include/llvm/IR/Dominators.h vendor/llvm/dist/include/llvm/IR/Function.h vendor/llvm/dist/include/llvm/IR/GVMaterializer.h vendor/llvm/dist/include/llvm/IR/GlobalObject.h vendor/llvm/dist/include/llvm/IR/GlobalValue.h vendor/llvm/dist/include/llvm/IR/IRBuilder.h vendor/llvm/dist/include/llvm/IR/IRPrintingPasses.h vendor/llvm/dist/include/llvm/IR/InlineAsm.h vendor/llvm/dist/include/llvm/IR/InstrTypes.h vendor/llvm/dist/include/llvm/IR/Instruction.h vendor/llvm/dist/include/llvm/IR/Instructions.h vendor/llvm/dist/include/llvm/IR/IntrinsicInst.h vendor/llvm/dist/include/llvm/IR/Intrinsics.h vendor/llvm/dist/include/llvm/IR/Intrinsics.td vendor/llvm/dist/include/llvm/IR/IntrinsicsARM.td vendor/llvm/dist/include/llvm/IR/IntrinsicsNVVM.td vendor/llvm/dist/include/llvm/IR/IntrinsicsPowerPC.td vendor/llvm/dist/include/llvm/IR/IntrinsicsR600.td vendor/llvm/dist/include/llvm/IR/IntrinsicsX86.td vendor/llvm/dist/include/llvm/IR/LLVMContext.h vendor/llvm/dist/include/llvm/IR/LegacyPassManager.h vendor/llvm/dist/include/llvm/IR/LegacyPassManagers.h vendor/llvm/dist/include/llvm/IR/MDBuilder.h vendor/llvm/dist/include/llvm/IR/Mangler.h vendor/llvm/dist/include/llvm/IR/Metadata.h vendor/llvm/dist/include/llvm/IR/Module.h vendor/llvm/dist/include/llvm/IR/Operator.h vendor/llvm/dist/include/llvm/IR/PassManager.h vendor/llvm/dist/include/llvm/IR/PatternMatch.h vendor/llvm/dist/include/llvm/IR/PredIteratorCache.h vendor/llvm/dist/include/llvm/IR/Type.h vendor/llvm/dist/include/llvm/IR/TypeFinder.h vendor/llvm/dist/include/llvm/IR/User.h vendor/llvm/dist/include/llvm/IR/Value.h vendor/llvm/dist/include/llvm/IR/ValueHandle.h vendor/llvm/dist/include/llvm/IR/ValueMap.h vendor/llvm/dist/include/llvm/IR/Verifier.h vendor/llvm/dist/include/llvm/IRReader/IRReader.h vendor/llvm/dist/include/llvm/InitializePasses.h vendor/llvm/dist/include/llvm/LTO/LTOCodeGenerator.h vendor/llvm/dist/include/llvm/LTO/LTOModule.h vendor/llvm/dist/include/llvm/LinkAllPasses.h vendor/llvm/dist/include/llvm/Linker/Linker.h vendor/llvm/dist/include/llvm/MC/ConstantPools.h vendor/llvm/dist/include/llvm/MC/MCAsmBackend.h vendor/llvm/dist/include/llvm/MC/MCAsmInfo.h vendor/llvm/dist/include/llvm/MC/MCAsmInfoDarwin.h vendor/llvm/dist/include/llvm/MC/MCAsmInfoELF.h vendor/llvm/dist/include/llvm/MC/MCAssembler.h vendor/llvm/dist/include/llvm/MC/MCContext.h vendor/llvm/dist/include/llvm/MC/MCDisassembler.h vendor/llvm/dist/include/llvm/MC/MCDwarf.h vendor/llvm/dist/include/llvm/MC/MCELFStreamer.h vendor/llvm/dist/include/llvm/MC/MCExpr.h vendor/llvm/dist/include/llvm/MC/MCInst.h vendor/llvm/dist/include/llvm/MC/MCInstPrinter.h vendor/llvm/dist/include/llvm/MC/MCInstrDesc.h vendor/llvm/dist/include/llvm/MC/MCInstrItineraries.h vendor/llvm/dist/include/llvm/MC/MCLinkerOptimizationHint.h vendor/llvm/dist/include/llvm/MC/MCMachObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCObjectFileInfo.h vendor/llvm/dist/include/llvm/MC/MCObjectStreamer.h vendor/llvm/dist/include/llvm/MC/MCObjectWriter.h vendor/llvm/dist/include/llvm/MC/MCParser/AsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmLexer.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParser.h vendor/llvm/dist/include/llvm/MC/MCParser/MCAsmParserExtension.h vendor/llvm/dist/include/llvm/MC/MCRegisterInfo.h vendor/llvm/dist/include/llvm/MC/MCSchedule.h vendor/llvm/dist/include/llvm/MC/MCStreamer.h vendor/llvm/dist/include/llvm/MC/MCSubtargetInfo.h vendor/llvm/dist/include/llvm/MC/MCSymbol.h vendor/llvm/dist/include/llvm/MC/MCTargetAsmParser.h vendor/llvm/dist/include/llvm/MC/MCTargetOptions.h vendor/llvm/dist/include/llvm/MC/MCTargetOptionsCommandFlags.h vendor/llvm/dist/include/llvm/MC/MCWin64EH.h vendor/llvm/dist/include/llvm/MC/MCWinCOFFStreamer.h vendor/llvm/dist/include/llvm/MC/MCWinEH.h vendor/llvm/dist/include/llvm/MC/StringTableBuilder.h vendor/llvm/dist/include/llvm/MC/SubtargetFeature.h vendor/llvm/dist/include/llvm/Object/Archive.h vendor/llvm/dist/include/llvm/Object/Binary.h vendor/llvm/dist/include/llvm/Object/COFF.h vendor/llvm/dist/include/llvm/Object/COFFYAML.h vendor/llvm/dist/include/llvm/Object/ELF.h vendor/llvm/dist/include/llvm/Object/ELFObjectFile.h vendor/llvm/dist/include/llvm/Object/ELFTypes.h vendor/llvm/dist/include/llvm/Object/ELFYAML.h vendor/llvm/dist/include/llvm/Object/Error.h vendor/llvm/dist/include/llvm/Object/IRObjectFile.h vendor/llvm/dist/include/llvm/Object/MachO.h vendor/llvm/dist/include/llvm/Object/MachOUniversal.h vendor/llvm/dist/include/llvm/Object/ObjectFile.h vendor/llvm/dist/include/llvm/Object/RelocVisitor.h vendor/llvm/dist/include/llvm/Object/SymbolicFile.h vendor/llvm/dist/include/llvm/Option/ArgList.h vendor/llvm/dist/include/llvm/PassRegistry.h vendor/llvm/dist/include/llvm/PassSupport.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfReader.h vendor/llvm/dist/include/llvm/ProfileData/InstrProfWriter.h vendor/llvm/dist/include/llvm/Support/ARMBuildAttributes.h vendor/llvm/dist/include/llvm/Support/ARMEHABI.h vendor/llvm/dist/include/llvm/Support/ARMWinEH.h vendor/llvm/dist/include/llvm/Support/Allocator.h vendor/llvm/dist/include/llvm/Support/CBindingWrapping.h vendor/llvm/dist/include/llvm/Support/COFF.h vendor/llvm/dist/include/llvm/Support/Casting.h vendor/llvm/dist/include/llvm/Support/CodeGen.h vendor/llvm/dist/include/llvm/Support/CommandLine.h vendor/llvm/dist/include/llvm/Support/Compiler.h vendor/llvm/dist/include/llvm/Support/Compression.h vendor/llvm/dist/include/llvm/Support/CrashRecoveryContext.h vendor/llvm/dist/include/llvm/Support/DataExtractor.h vendor/llvm/dist/include/llvm/Support/DataTypes.h.cmake vendor/llvm/dist/include/llvm/Support/DataTypes.h.in vendor/llvm/dist/include/llvm/Support/Dwarf.h vendor/llvm/dist/include/llvm/Support/DynamicLibrary.h vendor/llvm/dist/include/llvm/Support/ELF.h vendor/llvm/dist/include/llvm/Support/Endian.h vendor/llvm/dist/include/llvm/Support/EndianStream.h vendor/llvm/dist/include/llvm/Support/ErrorOr.h vendor/llvm/dist/include/llvm/Support/FileOutputBuffer.h vendor/llvm/dist/include/llvm/Support/FileSystem.h vendor/llvm/dist/include/llvm/Support/Format.h vendor/llvm/dist/include/llvm/Support/GCOV.h vendor/llvm/dist/include/llvm/Support/GenericDomTree.h vendor/llvm/dist/include/llvm/Support/GenericDomTreeConstruction.h vendor/llvm/dist/include/llvm/Support/LEB128.h vendor/llvm/dist/include/llvm/Support/LineIterator.h vendor/llvm/dist/include/llvm/Support/MD5.h vendor/llvm/dist/include/llvm/Support/MachO.h vendor/llvm/dist/include/llvm/Support/ManagedStatic.h vendor/llvm/dist/include/llvm/Support/MathExtras.h vendor/llvm/dist/include/llvm/Support/MemoryBuffer.h vendor/llvm/dist/include/llvm/Support/MemoryObject.h vendor/llvm/dist/include/llvm/Support/Mutex.h vendor/llvm/dist/include/llvm/Support/MutexGuard.h vendor/llvm/dist/include/llvm/Support/OnDiskHashTable.h vendor/llvm/dist/include/llvm/Support/Path.h vendor/llvm/dist/include/llvm/Support/Process.h vendor/llvm/dist/include/llvm/Support/Program.h vendor/llvm/dist/include/llvm/Support/RWMutex.h vendor/llvm/dist/include/llvm/Support/RandomNumberGenerator.h vendor/llvm/dist/include/llvm/Support/Registry.h vendor/llvm/dist/include/llvm/Support/ScaledNumber.h vendor/llvm/dist/include/llvm/Support/SourceMgr.h vendor/llvm/dist/include/llvm/Support/SpecialCaseList.h vendor/llvm/dist/include/llvm/Support/StringPool.h vendor/llvm/dist/include/llvm/Support/SwapByteOrder.h vendor/llvm/dist/include/llvm/Support/TargetRegistry.h vendor/llvm/dist/include/llvm/Support/ThreadLocal.h vendor/llvm/dist/include/llvm/Support/Threading.h vendor/llvm/dist/include/llvm/Support/TimeValue.h vendor/llvm/dist/include/llvm/Support/ToolOutputFile.h vendor/llvm/dist/include/llvm/Support/Win64EH.h vendor/llvm/dist/include/llvm/Support/WindowsError.h vendor/llvm/dist/include/llvm/Support/YAMLParser.h vendor/llvm/dist/include/llvm/Support/YAMLTraits.h vendor/llvm/dist/include/llvm/Support/raw_ostream.h vendor/llvm/dist/include/llvm/TableGen/Record.h vendor/llvm/dist/include/llvm/TableGen/SetTheory.h vendor/llvm/dist/include/llvm/TableGen/StringToOffsetTable.h vendor/llvm/dist/include/llvm/Target/Target.td vendor/llvm/dist/include/llvm/Target/TargetFrameLowering.h vendor/llvm/dist/include/llvm/Target/TargetInstrInfo.h vendor/llvm/dist/include/llvm/Target/TargetIntrinsicInfo.h vendor/llvm/dist/include/llvm/Target/TargetLibraryInfo.h vendor/llvm/dist/include/llvm/Target/TargetLowering.h vendor/llvm/dist/include/llvm/Target/TargetLoweringObjectFile.h vendor/llvm/dist/include/llvm/Target/TargetMachine.h vendor/llvm/dist/include/llvm/Target/TargetOpcodes.h vendor/llvm/dist/include/llvm/Target/TargetOptions.h vendor/llvm/dist/include/llvm/Target/TargetRegisterInfo.h vendor/llvm/dist/include/llvm/Target/TargetSelectionDAG.td vendor/llvm/dist/include/llvm/Target/TargetSelectionDAGInfo.h vendor/llvm/dist/include/llvm/Target/TargetSubtargetInfo.h vendor/llvm/dist/include/llvm/Transforms/IPO/PassManagerBuilder.h vendor/llvm/dist/include/llvm/Transforms/Instrumentation.h vendor/llvm/dist/include/llvm/Transforms/Scalar.h vendor/llvm/dist/include/llvm/Transforms/Utils/BasicBlockUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/BuildLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/Cloning.h vendor/llvm/dist/include/llvm/Transforms/Utils/CodeExtractor.h vendor/llvm/dist/include/llvm/Transforms/Utils/CtorUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/Local.h vendor/llvm/dist/include/llvm/Transforms/Utils/LoopUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/ModuleUtils.h vendor/llvm/dist/include/llvm/Transforms/Utils/PromoteMemToReg.h vendor/llvm/dist/include/llvm/Transforms/Utils/SimplifyLibCalls.h vendor/llvm/dist/include/llvm/Transforms/Utils/UnifyFunctionExitNodes.h vendor/llvm/dist/include/llvm/Transforms/Utils/UnrollLoop.h vendor/llvm/dist/include/llvm/Transforms/Utils/ValueMapper.h vendor/llvm/dist/include/llvm/Transforms/Utils/VectorUtils.h vendor/llvm/dist/include/llvm/module.modulemap vendor/llvm/dist/lib/Analysis/AliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/AliasAnalysisEvaluator.cpp vendor/llvm/dist/lib/Analysis/AliasSetTracker.cpp vendor/llvm/dist/lib/Analysis/Analysis.cpp vendor/llvm/dist/lib/Analysis/BasicAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/BlockFrequencyInfoImpl.cpp vendor/llvm/dist/lib/Analysis/BranchProbabilityInfo.cpp vendor/llvm/dist/lib/Analysis/CFG.cpp vendor/llvm/dist/lib/Analysis/CFGPrinter.cpp vendor/llvm/dist/lib/Analysis/CGSCCPassManager.cpp vendor/llvm/dist/lib/Analysis/CMakeLists.txt vendor/llvm/dist/lib/Analysis/CaptureTracking.cpp vendor/llvm/dist/lib/Analysis/CodeMetrics.cpp vendor/llvm/dist/lib/Analysis/ConstantFolding.cpp vendor/llvm/dist/lib/Analysis/DependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/IPA/CMakeLists.txt vendor/llvm/dist/lib/Analysis/IPA/CallGraph.cpp vendor/llvm/dist/lib/Analysis/IPA/CallGraphSCCPass.cpp vendor/llvm/dist/lib/Analysis/IPA/IPA.cpp vendor/llvm/dist/lib/Analysis/IPA/InlineCost.cpp vendor/llvm/dist/lib/Analysis/IVUsers.cpp vendor/llvm/dist/lib/Analysis/InstructionSimplify.cpp vendor/llvm/dist/lib/Analysis/JumpInstrTableInfo.cpp vendor/llvm/dist/lib/Analysis/LazyCallGraph.cpp vendor/llvm/dist/lib/Analysis/LazyValueInfo.cpp vendor/llvm/dist/lib/Analysis/LibCallSemantics.cpp vendor/llvm/dist/lib/Analysis/Lint.cpp vendor/llvm/dist/lib/Analysis/Loads.cpp vendor/llvm/dist/lib/Analysis/LoopInfo.cpp vendor/llvm/dist/lib/Analysis/LoopPass.cpp vendor/llvm/dist/lib/Analysis/MemDepPrinter.cpp vendor/llvm/dist/lib/Analysis/MemoryBuiltins.cpp vendor/llvm/dist/lib/Analysis/MemoryDependenceAnalysis.cpp vendor/llvm/dist/lib/Analysis/NoAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/PHITransAddr.cpp vendor/llvm/dist/lib/Analysis/PtrUseVisitor.cpp vendor/llvm/dist/lib/Analysis/RegionInfo.cpp vendor/llvm/dist/lib/Analysis/RegionPass.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolution.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionExpander.cpp vendor/llvm/dist/lib/Analysis/ScalarEvolutionNormalization.cpp vendor/llvm/dist/lib/Analysis/TargetTransformInfo.cpp vendor/llvm/dist/lib/Analysis/TypeBasedAliasAnalysis.cpp vendor/llvm/dist/lib/Analysis/ValueTracking.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.cpp vendor/llvm/dist/lib/AsmParser/LLLexer.h vendor/llvm/dist/lib/AsmParser/LLParser.cpp vendor/llvm/dist/lib/AsmParser/LLParser.h vendor/llvm/dist/lib/AsmParser/LLToken.h vendor/llvm/dist/lib/AsmParser/Parser.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.cpp vendor/llvm/dist/lib/Bitcode/Reader/BitcodeReader.h vendor/llvm/dist/lib/Bitcode/Reader/BitstreamReader.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriter.cpp vendor/llvm/dist/lib/Bitcode/Writer/BitcodeWriterPass.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.cpp vendor/llvm/dist/lib/Bitcode/Writer/ValueEnumerator.h vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/AggressiveAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AllocationOrder.h vendor/llvm/dist/lib/CodeGen/Analysis.cpp vendor/llvm/dist/lib/CodeGen/AntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/ARMException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AddressPool.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/ByteStreamer.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIE.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DIEHash.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugLocEntry.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DebugLocList.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfAccelTable.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfAccelTable.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfDebug.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfException.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfFile.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfFile.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfStringPool.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfStringPool.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/DwarfUnit.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/EHStreamer.h vendor/llvm/dist/lib/CodeGen/AsmPrinter/ErlangGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/OcamlGCPrinter.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/Win64Exception.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp vendor/llvm/dist/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h vendor/llvm/dist/lib/CodeGen/BasicTargetTransformInfo.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.cpp vendor/llvm/dist/lib/CodeGen/BranchFolding.h vendor/llvm/dist/lib/CodeGen/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/CalcSpillWeights.cpp vendor/llvm/dist/lib/CodeGen/CallingConvLower.cpp vendor/llvm/dist/lib/CodeGen/CodeGen.cpp vendor/llvm/dist/lib/CodeGen/CodeGenPrepare.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.cpp vendor/llvm/dist/lib/CodeGen/CriticalAntiDepBreaker.h vendor/llvm/dist/lib/CodeGen/DFAPacketizer.cpp vendor/llvm/dist/lib/CodeGen/DeadMachineInstructionElim.cpp vendor/llvm/dist/lib/CodeGen/DwarfEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/EarlyIfConversion.cpp vendor/llvm/dist/lib/CodeGen/ErlangGC.cpp vendor/llvm/dist/lib/CodeGen/ExecutionDepsFix.cpp vendor/llvm/dist/lib/CodeGen/ExpandISelPseudos.cpp vendor/llvm/dist/lib/CodeGen/ExpandPostRAPseudos.cpp vendor/llvm/dist/lib/CodeGen/GCMetadata.cpp vendor/llvm/dist/lib/CodeGen/GCMetadataPrinter.cpp vendor/llvm/dist/lib/CodeGen/GCStrategy.cpp vendor/llvm/dist/lib/CodeGen/GlobalMerge.cpp vendor/llvm/dist/lib/CodeGen/IfConversion.cpp vendor/llvm/dist/lib/CodeGen/InlineSpiller.cpp vendor/llvm/dist/lib/CodeGen/InterferenceCache.h vendor/llvm/dist/lib/CodeGen/IntrinsicLowering.cpp vendor/llvm/dist/lib/CodeGen/JumpInstrTables.cpp vendor/llvm/dist/lib/CodeGen/LLVMTargetMachine.cpp vendor/llvm/dist/lib/CodeGen/LexicalScopes.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.cpp vendor/llvm/dist/lib/CodeGen/LiveDebugVariables.h vendor/llvm/dist/lib/CodeGen/LiveInterval.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveIntervalUnion.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.cpp vendor/llvm/dist/lib/CodeGen/LiveRangeCalc.h vendor/llvm/dist/lib/CodeGen/LiveRangeEdit.cpp vendor/llvm/dist/lib/CodeGen/LiveRegMatrix.cpp vendor/llvm/dist/lib/CodeGen/LiveStackAnalysis.cpp vendor/llvm/dist/lib/CodeGen/LiveVariables.cpp vendor/llvm/dist/lib/CodeGen/LocalStackSlotAllocation.cpp vendor/llvm/dist/lib/CodeGen/MachineBasicBlock.cpp vendor/llvm/dist/lib/CodeGen/MachineBlockPlacement.cpp vendor/llvm/dist/lib/CodeGen/MachineCSE.cpp vendor/llvm/dist/lib/CodeGen/MachineCopyPropagation.cpp vendor/llvm/dist/lib/CodeGen/MachineDominanceFrontier.cpp vendor/llvm/dist/lib/CodeGen/MachineDominators.cpp vendor/llvm/dist/lib/CodeGen/MachineFunction.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionAnalysis.cpp vendor/llvm/dist/lib/CodeGen/MachineFunctionPrinterPass.cpp vendor/llvm/dist/lib/CodeGen/MachineInstr.cpp vendor/llvm/dist/lib/CodeGen/MachineInstrBundle.cpp vendor/llvm/dist/lib/CodeGen/MachineLICM.cpp vendor/llvm/dist/lib/CodeGen/MachineModuleInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineRegionInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/MachineSSAUpdater.cpp vendor/llvm/dist/lib/CodeGen/MachineScheduler.cpp vendor/llvm/dist/lib/CodeGen/MachineSink.cpp vendor/llvm/dist/lib/CodeGen/MachineTraceMetrics.cpp vendor/llvm/dist/lib/CodeGen/MachineVerifier.cpp vendor/llvm/dist/lib/CodeGen/OptimizePHIs.cpp vendor/llvm/dist/lib/CodeGen/PHIElimination.cpp vendor/llvm/dist/lib/CodeGen/PHIEliminationUtils.h vendor/llvm/dist/lib/CodeGen/Passes.cpp vendor/llvm/dist/lib/CodeGen/PeepholeOptimizer.cpp vendor/llvm/dist/lib/CodeGen/PostRASchedulerList.cpp vendor/llvm/dist/lib/CodeGen/ProcessImplicitDefs.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.cpp vendor/llvm/dist/lib/CodeGen/PrologEpilogInserter.h vendor/llvm/dist/lib/CodeGen/PseudoSourceValue.cpp vendor/llvm/dist/lib/CodeGen/RegAllocBase.cpp vendor/llvm/dist/lib/CodeGen/RegAllocBase.h vendor/llvm/dist/lib/CodeGen/RegAllocBasic.cpp vendor/llvm/dist/lib/CodeGen/RegAllocFast.cpp vendor/llvm/dist/lib/CodeGen/RegAllocGreedy.cpp vendor/llvm/dist/lib/CodeGen/RegAllocPBQP.cpp vendor/llvm/dist/lib/CodeGen/RegisterClassInfo.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.cpp vendor/llvm/dist/lib/CodeGen/RegisterCoalescer.h vendor/llvm/dist/lib/CodeGen/RegisterPressure.cpp vendor/llvm/dist/lib/CodeGen/RegisterScavenging.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAG.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGInstrs.cpp vendor/llvm/dist/lib/CodeGen/ScheduleDAGPrinter.cpp vendor/llvm/dist/lib/CodeGen/ScoreboardHazardRecognizer.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/CMakeLists.txt vendor/llvm/dist/lib/CodeGen/SelectionDAG/DAGCombiner.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FastISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/InstrEmitter.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGFast.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/ScheduleDAGVLIW.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAG.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp vendor/llvm/dist/lib/CodeGen/SelectionDAG/TargetLowering.cpp vendor/llvm/dist/lib/CodeGen/ShadowStackGC.cpp vendor/llvm/dist/lib/CodeGen/SjLjEHPrepare.cpp vendor/llvm/dist/lib/CodeGen/SpillPlacement.cpp vendor/llvm/dist/lib/CodeGen/SpillPlacement.h vendor/llvm/dist/lib/CodeGen/Spiller.h vendor/llvm/dist/lib/CodeGen/SplitKit.cpp vendor/llvm/dist/lib/CodeGen/SplitKit.h vendor/llvm/dist/lib/CodeGen/StackColoring.cpp vendor/llvm/dist/lib/CodeGen/StackMapLivenessAnalysis.cpp vendor/llvm/dist/lib/CodeGen/StackMaps.cpp vendor/llvm/dist/lib/CodeGen/StackProtector.cpp vendor/llvm/dist/lib/CodeGen/StackSlotColoring.cpp vendor/llvm/dist/lib/CodeGen/TailDuplication.cpp vendor/llvm/dist/lib/CodeGen/TargetFrameLoweringImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetInstrInfo.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringBase.cpp vendor/llvm/dist/lib/CodeGen/TargetLoweringObjectFileImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetOptionsImpl.cpp vendor/llvm/dist/lib/CodeGen/TargetRegisterInfo.cpp vendor/llvm/dist/lib/CodeGen/TargetSchedule.cpp vendor/llvm/dist/lib/CodeGen/TwoAddressInstructionPass.cpp vendor/llvm/dist/lib/CodeGen/UnreachableBlockElim.cpp vendor/llvm/dist/lib/CodeGen/VirtRegMap.cpp vendor/llvm/dist/lib/DebugInfo/CMakeLists.txt vendor/llvm/dist/lib/DebugInfo/DIContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARFAbbreviationDeclaration.cpp vendor/llvm/dist/lib/DebugInfo/DWARFCompileUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARFContext.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugAbbrev.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugArangeSet.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugAranges.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugFrame.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugInfoEntry.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugLine.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugLoc.cpp vendor/llvm/dist/lib/DebugInfo/DWARFDebugRangeList.cpp vendor/llvm/dist/lib/DebugInfo/DWARFFormValue.cpp vendor/llvm/dist/lib/DebugInfo/DWARFTypeUnit.cpp vendor/llvm/dist/lib/DebugInfo/DWARFUnit.cpp vendor/llvm/dist/lib/ExecutionEngine/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/EventListenerCommon.h vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngine.cpp vendor/llvm/dist/lib/ExecutionEngine/ExecutionEngineBindings.cpp vendor/llvm/dist/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/IntelJITEvents/LLVMBuild.txt vendor/llvm/dist/lib/ExecutionEngine/Interpreter/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.cpp vendor/llvm/dist/lib/ExecutionEngine/Interpreter/Interpreter.h vendor/llvm/dist/lib/ExecutionEngine/LLVMBuild.txt vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.cpp vendor/llvm/dist/lib/ExecutionEngine/MCJIT/MCJIT.h vendor/llvm/dist/lib/ExecutionEngine/Makefile vendor/llvm/dist/lib/ExecutionEngine/OProfileJIT/OProfileJITEventListener.cpp vendor/llvm/dist/lib/ExecutionEngine/RTDyldMemoryManager.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/CMakeLists.txt vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h vendor/llvm/dist/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h vendor/llvm/dist/lib/ExecutionEngine/TargetSelect.cpp vendor/llvm/dist/lib/IR/AsmWriter.cpp vendor/llvm/dist/lib/IR/AsmWriter.h vendor/llvm/dist/lib/IR/AttributeImpl.h vendor/llvm/dist/lib/IR/AutoUpgrade.cpp vendor/llvm/dist/lib/IR/BasicBlock.cpp vendor/llvm/dist/lib/IR/CMakeLists.txt vendor/llvm/dist/lib/IR/ConstantFold.cpp vendor/llvm/dist/lib/IR/ConstantFold.h vendor/llvm/dist/lib/IR/Constants.cpp vendor/llvm/dist/lib/IR/ConstantsContext.h vendor/llvm/dist/lib/IR/Core.cpp vendor/llvm/dist/lib/IR/DIBuilder.cpp vendor/llvm/dist/lib/IR/DataLayout.cpp vendor/llvm/dist/lib/IR/DebugInfo.cpp vendor/llvm/dist/lib/IR/DebugLoc.cpp vendor/llvm/dist/lib/IR/DiagnosticInfo.cpp vendor/llvm/dist/lib/IR/DiagnosticPrinter.cpp vendor/llvm/dist/lib/IR/Dominators.cpp vendor/llvm/dist/lib/IR/Function.cpp vendor/llvm/dist/lib/IR/GCOV.cpp vendor/llvm/dist/lib/IR/Globals.cpp vendor/llvm/dist/lib/IR/IRBuilder.cpp vendor/llvm/dist/lib/IR/IRPrintingPasses.cpp vendor/llvm/dist/lib/IR/InlineAsm.cpp vendor/llvm/dist/lib/IR/Instruction.cpp vendor/llvm/dist/lib/IR/Instructions.cpp vendor/llvm/dist/lib/IR/IntrinsicInst.cpp vendor/llvm/dist/lib/IR/LLVMContext.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.cpp vendor/llvm/dist/lib/IR/LLVMContextImpl.h vendor/llvm/dist/lib/IR/LeaksContext.h vendor/llvm/dist/lib/IR/LegacyPassManager.cpp vendor/llvm/dist/lib/IR/MDBuilder.cpp vendor/llvm/dist/lib/IR/Mangler.cpp vendor/llvm/dist/lib/IR/Metadata.cpp vendor/llvm/dist/lib/IR/Module.cpp vendor/llvm/dist/lib/IR/PassManager.cpp vendor/llvm/dist/lib/IR/PassRegistry.cpp vendor/llvm/dist/lib/IR/SymbolTableListTraitsImpl.h vendor/llvm/dist/lib/IR/Type.cpp vendor/llvm/dist/lib/IR/TypeFinder.cpp vendor/llvm/dist/lib/IR/Use.cpp vendor/llvm/dist/lib/IR/User.cpp vendor/llvm/dist/lib/IR/Value.cpp vendor/llvm/dist/lib/IR/ValueSymbolTable.cpp vendor/llvm/dist/lib/IR/Verifier.cpp vendor/llvm/dist/lib/IRReader/IRReader.cpp vendor/llvm/dist/lib/LTO/LLVMBuild.txt vendor/llvm/dist/lib/LTO/LTOCodeGenerator.cpp vendor/llvm/dist/lib/LTO/LTOModule.cpp vendor/llvm/dist/lib/Linker/LinkModules.cpp vendor/llvm/dist/lib/MC/CMakeLists.txt vendor/llvm/dist/lib/MC/ConstantPools.cpp vendor/llvm/dist/lib/MC/ELFObjectWriter.cpp vendor/llvm/dist/lib/MC/LLVMBuild.txt vendor/llvm/dist/lib/MC/MCAsmInfo.cpp vendor/llvm/dist/lib/MC/MCAsmInfoCOFF.cpp vendor/llvm/dist/lib/MC/MCAsmInfoDarwin.cpp vendor/llvm/dist/lib/MC/MCAsmInfoELF.cpp vendor/llvm/dist/lib/MC/MCAsmStreamer.cpp vendor/llvm/dist/lib/MC/MCAssembler.cpp vendor/llvm/dist/lib/MC/MCContext.cpp vendor/llvm/dist/lib/MC/MCDisassembler/CMakeLists.txt vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.cpp vendor/llvm/dist/lib/MC/MCDisassembler/Disassembler.h vendor/llvm/dist/lib/MC/MCDwarf.cpp vendor/llvm/dist/lib/MC/MCELFStreamer.cpp vendor/llvm/dist/lib/MC/MCExpr.cpp vendor/llvm/dist/lib/MC/MCLinkerOptimizationHint.cpp vendor/llvm/dist/lib/MC/MCMachOStreamer.cpp vendor/llvm/dist/lib/MC/MCNullStreamer.cpp vendor/llvm/dist/lib/MC/MCObjectFileInfo.cpp vendor/llvm/dist/lib/MC/MCObjectStreamer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/AsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/COFFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/DarwinAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/ELFAsmParser.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmLexer.cpp vendor/llvm/dist/lib/MC/MCParser/MCAsmParser.cpp vendor/llvm/dist/lib/MC/MCSectionCOFF.cpp vendor/llvm/dist/lib/MC/MCSectionELF.cpp vendor/llvm/dist/lib/MC/MCStreamer.cpp vendor/llvm/dist/lib/MC/MCSubtargetInfo.cpp vendor/llvm/dist/lib/MC/MCTargetOptions.cpp vendor/llvm/dist/lib/MC/MCWin64EH.cpp vendor/llvm/dist/lib/MC/MachObjectWriter.cpp vendor/llvm/dist/lib/MC/Makefile vendor/llvm/dist/lib/MC/StringTableBuilder.cpp vendor/llvm/dist/lib/MC/SubtargetFeature.cpp vendor/llvm/dist/lib/MC/WinCOFFObjectWriter.cpp vendor/llvm/dist/lib/MC/WinCOFFStreamer.cpp vendor/llvm/dist/lib/Object/Archive.cpp vendor/llvm/dist/lib/Object/Binary.cpp vendor/llvm/dist/lib/Object/COFFObjectFile.cpp vendor/llvm/dist/lib/Object/COFFYAML.cpp vendor/llvm/dist/lib/Object/ELF.cpp vendor/llvm/dist/lib/Object/ELFObjectFile.cpp vendor/llvm/dist/lib/Object/ELFYAML.cpp vendor/llvm/dist/lib/Object/Error.cpp vendor/llvm/dist/lib/Object/IRObjectFile.cpp vendor/llvm/dist/lib/Object/MachOObjectFile.cpp vendor/llvm/dist/lib/Object/MachOUniversal.cpp vendor/llvm/dist/lib/Object/Object.cpp vendor/llvm/dist/lib/Object/ObjectFile.cpp vendor/llvm/dist/lib/Object/RecordStreamer.h vendor/llvm/dist/lib/Object/SymbolicFile.cpp vendor/llvm/dist/lib/Option/ArgList.cpp vendor/llvm/dist/lib/Option/OptTable.cpp vendor/llvm/dist/lib/Option/Option.cpp vendor/llvm/dist/lib/ProfileData/CMakeLists.txt vendor/llvm/dist/lib/ProfileData/InstrProf.cpp vendor/llvm/dist/lib/ProfileData/InstrProfIndexed.h vendor/llvm/dist/lib/ProfileData/InstrProfReader.cpp vendor/llvm/dist/lib/ProfileData/InstrProfWriter.cpp vendor/llvm/dist/lib/ProfileData/LLVMBuild.txt vendor/llvm/dist/lib/Support/APFloat.cpp vendor/llvm/dist/lib/Support/APInt.cpp vendor/llvm/dist/lib/Support/CMakeLists.txt vendor/llvm/dist/lib/Support/CommandLine.cpp vendor/llvm/dist/lib/Support/Compression.cpp vendor/llvm/dist/lib/Support/DataStream.cpp vendor/llvm/dist/lib/Support/Debug.cpp vendor/llvm/dist/lib/Support/Dwarf.cpp vendor/llvm/dist/lib/Support/Errno.cpp vendor/llvm/dist/lib/Support/ErrorHandling.cpp vendor/llvm/dist/lib/Support/FileOutputBuffer.cpp vendor/llvm/dist/lib/Support/FileUtilities.cpp vendor/llvm/dist/lib/Support/GraphWriter.cpp vendor/llvm/dist/lib/Support/Host.cpp vendor/llvm/dist/lib/Support/LineIterator.cpp vendor/llvm/dist/lib/Support/LockFileManager.cpp vendor/llvm/dist/lib/Support/MD5.cpp vendor/llvm/dist/lib/Support/MemoryBuffer.cpp vendor/llvm/dist/lib/Support/MemoryObject.cpp vendor/llvm/dist/lib/Support/Path.cpp vendor/llvm/dist/lib/Support/Process.cpp vendor/llvm/dist/lib/Support/RandomNumberGenerator.cpp vendor/llvm/dist/lib/Support/ScaledNumber.cpp vendor/llvm/dist/lib/Support/SmallPtrSet.cpp vendor/llvm/dist/lib/Support/SourceMgr.cpp vendor/llvm/dist/lib/Support/SpecialCaseList.cpp vendor/llvm/dist/lib/Support/StringRef.cpp vendor/llvm/dist/lib/Support/ThreadLocal.cpp vendor/llvm/dist/lib/Support/TimeValue.cpp vendor/llvm/dist/lib/Support/Timer.cpp vendor/llvm/dist/lib/Support/ToolOutputFile.cpp vendor/llvm/dist/lib/Support/Triple.cpp vendor/llvm/dist/lib/Support/Unix/Host.inc vendor/llvm/dist/lib/Support/Unix/Memory.inc vendor/llvm/dist/lib/Support/Unix/Path.inc vendor/llvm/dist/lib/Support/Unix/Process.inc vendor/llvm/dist/lib/Support/Unix/Program.inc vendor/llvm/dist/lib/Support/Unix/RWMutex.inc vendor/llvm/dist/lib/Support/Unix/Signals.inc vendor/llvm/dist/lib/Support/Unix/ThreadLocal.inc vendor/llvm/dist/lib/Support/Unix/TimeValue.inc vendor/llvm/dist/lib/Support/Unix/Unix.h vendor/llvm/dist/lib/Support/Windows/DynamicLibrary.inc vendor/llvm/dist/lib/Support/Windows/Host.inc vendor/llvm/dist/lib/Support/Windows/Path.inc vendor/llvm/dist/lib/Support/Windows/Process.inc vendor/llvm/dist/lib/Support/Windows/Program.inc vendor/llvm/dist/lib/Support/Windows/RWMutex.inc vendor/llvm/dist/lib/Support/Windows/ThreadLocal.inc vendor/llvm/dist/lib/Support/Windows/WindowsSupport.h vendor/llvm/dist/lib/Support/Windows/explicit_symbols.inc vendor/llvm/dist/lib/Support/YAMLParser.cpp vendor/llvm/dist/lib/Support/YAMLTraits.cpp vendor/llvm/dist/lib/Support/raw_ostream.cpp vendor/llvm/dist/lib/TableGen/Main.cpp vendor/llvm/dist/lib/TableGen/Record.cpp vendor/llvm/dist/lib/TableGen/TGLexer.cpp vendor/llvm/dist/lib/TableGen/TGLexer.h vendor/llvm/dist/lib/TableGen/TGParser.cpp vendor/llvm/dist/lib/TableGen/TGParser.h vendor/llvm/dist/lib/Target/AArch64/AArch64.h vendor/llvm/dist/lib/Target/AArch64/AArch64AddressTypePromotion.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64AsmPrinter.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64BranchRelaxation.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64CallingConvention.td vendor/llvm/dist/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64CollectLOH.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ConditionalCompares.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FastISel.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64FrameLowering.h vendor/llvm/dist/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64ISelLowering.h vendor/llvm/dist/lib/Target/AArch64/AArch64InstrAtomics.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstrFormats.td vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64InstrInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64MCInstLower.h vendor/llvm/dist/lib/Target/AArch64/AArch64MachineFunctionInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64PerfectShuffle.h vendor/llvm/dist/lib/Target/AArch64/AArch64PromoteConstant.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64RegisterInfo.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedA57.td vendor/llvm/dist/lib/Target/AArch64/AArch64SchedA57WriteRes.td vendor/llvm/dist/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64SelectionDAGInfo.h vendor/llvm/dist/lib/Target/AArch64/AArch64StorePairSuppress.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64Subtarget.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.cpp vendor/llvm/dist/lib/Target/AArch64/AArch64TargetMachine.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetObjectFile.h vendor/llvm/dist/lib/Target/AArch64/AArch64TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp vendor/llvm/dist/lib/Target/AArch64/CMakeLists.txt vendor/llvm/dist/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp vendor/llvm/dist/lib/Target/AArch64/Disassembler/AArch64Disassembler.h vendor/llvm/dist/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.h vendor/llvm/dist/lib/Target/AArch64/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp vendor/llvm/dist/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h vendor/llvm/dist/lib/Target/AArch64/LLVMBuild.txt vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64FixupKinds.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCAsmInfo.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCExpr.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64MachObjectWriter.cpp vendor/llvm/dist/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp vendor/llvm/dist/lib/Target/AArch64/TargetInfo/AArch64TargetInfo.cpp vendor/llvm/dist/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp vendor/llvm/dist/lib/Target/AArch64/Utils/AArch64BaseInfo.h vendor/llvm/dist/lib/Target/ARM/A15SDOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARM.h vendor/llvm/dist/lib/Target/ARM/ARM.td vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.cpp vendor/llvm/dist/lib/Target/ARM/ARMAsmPrinter.h vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMBaseRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMCallingConv.h vendor/llvm/dist/lib/Target/ARM/ARMConstantIslandPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMConstantPoolValue.h vendor/llvm/dist/lib/Target/ARM/ARMExpandPseudoInsts.cpp vendor/llvm/dist/lib/Target/ARM/ARMFPUName.def vendor/llvm/dist/lib/Target/ARM/ARMFPUName.h vendor/llvm/dist/lib/Target/ARM/ARMFastISel.cpp vendor/llvm/dist/lib/Target/ARM/ARMFeatures.h vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMFrameLowering.h vendor/llvm/dist/lib/Target/ARM/ARMHazardRecognizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMHazardRecognizer.h vendor/llvm/dist/lib/Target/ARM/ARMISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.cpp vendor/llvm/dist/lib/Target/ARM/ARMISelLowering.h vendor/llvm/dist/lib/Target/ARM/ARMInstrFormats.td vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.h vendor/llvm/dist/lib/Target/ARM/ARMInstrInfo.td vendor/llvm/dist/lib/Target/ARM/ARMInstrNEON.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb.td vendor/llvm/dist/lib/Target/ARM/ARMInstrThumb2.td vendor/llvm/dist/lib/Target/ARM/ARMInstrVFP.td vendor/llvm/dist/lib/Target/ARM/ARMLoadStoreOptimizer.cpp vendor/llvm/dist/lib/Target/ARM/ARMMCInstLower.cpp vendor/llvm/dist/lib/Target/ARM/ARMMachineFunctionInfo.h vendor/llvm/dist/lib/Target/ARM/ARMOptimizeBarriersPass.cpp vendor/llvm/dist/lib/Target/ARM/ARMPerfectShuffle.h vendor/llvm/dist/lib/Target/ARM/ARMRegisterInfo.h vendor/llvm/dist/lib/Target/ARM/ARMSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/ARM/ARMSelectionDAGInfo.h vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.cpp vendor/llvm/dist/lib/Target/ARM/ARMSubtarget.h vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.cpp vendor/llvm/dist/lib/Target/ARM/ARMTargetMachine.h vendor/llvm/dist/lib/Target/ARM/ARMTargetObjectFile.h vendor/llvm/dist/lib/Target/ARM/ARMTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/ARM/AsmParser/ARMAsmParser.cpp vendor/llvm/dist/lib/Target/ARM/CMakeLists.txt vendor/llvm/dist/lib/Target/ARM/Disassembler/ARMDisassembler.cpp vendor/llvm/dist/lib/Target/ARM/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp vendor/llvm/dist/lib/Target/ARM/InstPrinter/ARMInstPrinter.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMArchName.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCExpr.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCExpr.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/ARMUnwindOpAsm.h vendor/llvm/dist/lib/Target/ARM/MCTargetDesc/LLVMBuild.txt vendor/llvm/dist/lib/Target/ARM/MLxExpansionPass.cpp vendor/llvm/dist/lib/Target/ARM/Makefile vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1FrameLowering.h vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb1RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2ITBlockPass.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2InstrInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.cpp vendor/llvm/dist/lib/Target/ARM/Thumb2RegisterInfo.h vendor/llvm/dist/lib/Target/ARM/Thumb2SizeReduction.cpp vendor/llvm/dist/lib/Target/CMakeLists.txt vendor/llvm/dist/lib/Target/CppBackend/CPPTargetMachine.h vendor/llvm/dist/lib/Target/Hexagon/CMakeLists.txt vendor/llvm/dist/lib/Target/Hexagon/Hexagon.h vendor/llvm/dist/lib/Target/Hexagon/Hexagon.td vendor/llvm/dist/lib/Target/Hexagon/HexagonAsmPrinter.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonAsmPrinter.h vendor/llvm/dist/lib/Target/Hexagon/HexagonCFGOptimizer.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonCallingConvLower.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonCallingConvLower.h vendor/llvm/dist/lib/Target/Hexagon/HexagonCopyToCombine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFixupHwLoops.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonFrameLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonHardwareLoops.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonISelLowering.h vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormats.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrFormatsV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfoV3.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfoV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonInstrInfoV5.td vendor/llvm/dist/lib/Target/Hexagon/HexagonIntrinsics.td vendor/llvm/dist/lib/Target/Hexagon/HexagonIntrinsicsDerived.td vendor/llvm/dist/lib/Target/Hexagon/HexagonIntrinsicsV4.td vendor/llvm/dist/lib/Target/Hexagon/HexagonMCInstLower.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineFunctionInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineScheduler.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonMachineScheduler.h vendor/llvm/dist/lib/Target/Hexagon/HexagonNewValueJump.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonOperands.td vendor/llvm/dist/lib/Target/Hexagon/HexagonPeephole.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonRegisterInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonRegisterInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonRegisterInfo.td vendor/llvm/dist/lib/Target/Hexagon/HexagonSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonSubtarget.h vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetMachine.h vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonTargetObjectFile.h vendor/llvm/dist/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp vendor/llvm/dist/lib/Target/Hexagon/HexagonVarargsCallingConvention.h vendor/llvm/dist/lib/Target/Hexagon/LLVMBuild.txt vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/CMakeLists.txt vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCInst.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.h vendor/llvm/dist/lib/Target/Hexagon/MCTargetDesc/LLVMBuild.txt vendor/llvm/dist/lib/Target/Hexagon/Makefile vendor/llvm/dist/lib/Target/MSP430/InstPrinter/MSP430InstPrinter.h vendor/llvm/dist/lib/Target/MSP430/MCTargetDesc/MSP430MCAsmInfo.h vendor/llvm/dist/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp vendor/llvm/dist/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.h vendor/llvm/dist/lib/Target/MSP430/MSP430.h vendor/llvm/dist/lib/Target/MSP430/MSP430BranchSelector.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430CallingConv.td vendor/llvm/dist/lib/Target/MSP430/MSP430FrameLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430FrameLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430ISelLowering.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430InstrInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430MCInstLower.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430MCInstLower.h vendor/llvm/dist/lib/Target/MSP430/MSP430MachineFunctionInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430RegisterInfo.td vendor/llvm/dist/lib/Target/MSP430/MSP430SelectionDAGInfo.h vendor/llvm/dist/lib/Target/MSP430/MSP430Subtarget.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430Subtarget.h vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.cpp vendor/llvm/dist/lib/Target/MSP430/MSP430TargetMachine.h vendor/llvm/dist/lib/Target/Mips/AsmParser/MipsAsmParser.cpp vendor/llvm/dist/lib/Target/Mips/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/Mips/Disassembler/MipsDisassembler.cpp vendor/llvm/dist/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp vendor/llvm/dist/lib/Target/Mips/InstPrinter/MipsInstPrinter.h vendor/llvm/dist/lib/Target/Mips/LLVMBuild.txt vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/CMakeLists.txt vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsELFStreamer.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCExpr.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCNaCl.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.h vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsNaClELFStreamer.cpp vendor/llvm/dist/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp vendor/llvm/dist/lib/Target/Mips/Makefile vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MicroMipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/Mips.h vendor/llvm/dist/lib/Target/Mips/Mips16FrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/Mips16FrameLowering.h vendor/llvm/dist/lib/Target/Mips/Mips16HardFloat.cpp vendor/llvm/dist/lib/Target/Mips/Mips16HardFloat.h vendor/llvm/dist/lib/Target/Mips/Mips16HardFloatInfo.h vendor/llvm/dist/lib/Target/Mips/Mips16ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/Mips16ISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/Mips16ISelLowering.h vendor/llvm/dist/lib/Target/Mips/Mips16InstrFormats.td vendor/llvm/dist/lib/Target/Mips/Mips16InstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/Mips16InstrInfo.h vendor/llvm/dist/lib/Target/Mips/Mips16InstrInfo.td vendor/llvm/dist/lib/Target/Mips/Mips16RegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/Mips16RegisterInfo.h vendor/llvm/dist/lib/Target/Mips/Mips32r6InstrFormats.td vendor/llvm/dist/lib/Target/Mips/Mips64InstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsAnalyzeImmediate.cpp vendor/llvm/dist/lib/Target/Mips/MipsAnalyzeImmediate.h vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.cpp vendor/llvm/dist/lib/Target/Mips/MipsAsmPrinter.h vendor/llvm/dist/lib/Target/Mips/MipsCCState.h vendor/llvm/dist/lib/Target/Mips/MipsCallingConv.td vendor/llvm/dist/lib/Target/Mips/MipsCondMov.td vendor/llvm/dist/lib/Target/Mips/MipsConstantIslandPass.cpp vendor/llvm/dist/lib/Target/Mips/MipsDelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Mips/MipsFastISel.cpp vendor/llvm/dist/lib/Target/Mips/MipsFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsFrameLowering.h vendor/llvm/dist/lib/Target/Mips/MipsISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsInstrFPU.td vendor/llvm/dist/lib/Target/Mips/MipsInstrFormats.td vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsLongBranch.cpp vendor/llvm/dist/lib/Target/Mips/MipsMCInstLower.h vendor/llvm/dist/lib/Target/Mips/MipsMSAInstrInfo.td vendor/llvm/dist/lib/Target/Mips/MipsMachineFunction.cpp vendor/llvm/dist/lib/Target/Mips/MipsMachineFunction.h vendor/llvm/dist/lib/Target/Mips/MipsModuleISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsOptimizePICCall.cpp vendor/llvm/dist/lib/Target/Mips/MipsOptionRecord.h vendor/llvm/dist/lib/Target/Mips/MipsOs16.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.h vendor/llvm/dist/lib/Target/Mips/MipsRegisterInfo.td vendor/llvm/dist/lib/Target/Mips/MipsSEFrameLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEFrameLowering.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelDAGToDAG.h vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEISelLowering.h vendor/llvm/dist/lib/Target/Mips/MipsSEInstrInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsSEInstrInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSERegisterInfo.cpp vendor/llvm/dist/lib/Target/Mips/MipsSERegisterInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.cpp vendor/llvm/dist/lib/Target/Mips/MipsSubtarget.h vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetMachine.h vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.cpp vendor/llvm/dist/lib/Target/Mips/MipsTargetObjectFile.h vendor/llvm/dist/lib/Target/Mips/MipsTargetStreamer.h vendor/llvm/dist/lib/Target/NVPTX/CMakeLists.txt vendor/llvm/dist/lib/Target/NVPTX/InstPrinter/NVPTXInstPrinter.h vendor/llvm/dist/lib/Target/NVPTX/MCTargetDesc/NVPTXBaseInfo.h vendor/llvm/dist/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.h vendor/llvm/dist/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.h vendor/llvm/dist/lib/Target/NVPTX/ManagedStringPool.h vendor/llvm/dist/lib/Target/NVPTX/NVPTX.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXAllocaHoisting.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXAsmPrinter.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXFrameLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXFrameLowering.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelDAGToDAG.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXISelLowering.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXImageOptimizer.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXInstrInfo.td vendor/llvm/dist/lib/Target/NVPTX/NVPTXLowerAggrCopies.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXMCExpr.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXMachineFunctionInfo.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXRegisterInfo.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXReplaceImageHandles.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXSection.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXSubtarget.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXSubtarget.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetMachine.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXTargetObjectFile.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXUtilities.cpp vendor/llvm/dist/lib/Target/NVPTX/NVPTXUtilities.h vendor/llvm/dist/lib/Target/NVPTX/NVPTXVector.td vendor/llvm/dist/lib/Target/NVPTX/NVPTXutil.h vendor/llvm/dist/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp vendor/llvm/dist/lib/Target/PowerPC/CMakeLists.txt vendor/llvm/dist/lib/Target/PowerPC/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp vendor/llvm/dist/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h vendor/llvm/dist/lib/Target/PowerPC/LLVMBuild.txt vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCFixupKinds.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCAsmInfo.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCExpr.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.h vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp vendor/llvm/dist/lib/Target/PowerPC/MCTargetDesc/PPCPredicates.h vendor/llvm/dist/lib/Target/PowerPC/Makefile vendor/llvm/dist/lib/Target/PowerPC/PPC.h vendor/llvm/dist/lib/Target/PowerPC/PPC.td vendor/llvm/dist/lib/Target/PowerPC/PPCAsmPrinter.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCBranchSelector.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCTRLoops.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCCallingConv.td vendor/llvm/dist/lib/Target/PowerPC/PPCFastISel.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCFrameLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCHazardRecognizers.h vendor/llvm/dist/lib/Target/PowerPC/PPCISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCISelLowering.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstr64Bit.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrAltivec.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrBuilder.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrFormats.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCInstrInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCInstrVSX.td vendor/llvm/dist/lib/Target/PowerPC/PPCMCInstLower.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCMachineFunctionInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCPerfectShuffle.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCRegisterInfo.td vendor/llvm/dist/lib/Target/PowerPC/PPCSchedule.td vendor/llvm/dist/lib/Target/PowerPC/PPCScheduleP7.td vendor/llvm/dist/lib/Target/PowerPC/PPCSelectionDAGInfo.h vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCSubtarget.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.cpp vendor/llvm/dist/lib/Target/PowerPC/PPCTargetMachine.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetObjectFile.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetStreamer.h vendor/llvm/dist/lib/Target/PowerPC/PPCTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/PowerPC/README.txt vendor/llvm/dist/lib/Target/R600/AMDGPU.h vendor/llvm/dist/lib/Target/R600/AMDGPU.td vendor/llvm/dist/lib/Target/R600/AMDGPUAsmPrinter.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUAsmPrinter.h vendor/llvm/dist/lib/Target/R600/AMDGPUCallingConv.td vendor/llvm/dist/lib/Target/R600/AMDGPUFrameLowering.h vendor/llvm/dist/lib/Target/R600/AMDGPUISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUISelLowering.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUISelLowering.h vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.h vendor/llvm/dist/lib/Target/R600/AMDGPUInstrInfo.td vendor/llvm/dist/lib/Target/R600/AMDGPUInstructions.td vendor/llvm/dist/lib/Target/R600/AMDGPUIntrinsicInfo.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUIntrinsicInfo.h vendor/llvm/dist/lib/Target/R600/AMDGPUMCInstLower.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUMCInstLower.h vendor/llvm/dist/lib/Target/R600/AMDGPUMachineFunction.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUMachineFunction.h vendor/llvm/dist/lib/Target/R600/AMDGPUPromoteAlloca.cpp vendor/llvm/dist/lib/Target/R600/AMDGPURegisterInfo.cpp vendor/llvm/dist/lib/Target/R600/AMDGPURegisterInfo.h vendor/llvm/dist/lib/Target/R600/AMDGPUSubtarget.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUSubtarget.h vendor/llvm/dist/lib/Target/R600/AMDGPUTargetMachine.cpp vendor/llvm/dist/lib/Target/R600/AMDGPUTargetMachine.h vendor/llvm/dist/lib/Target/R600/AMDGPUTargetTransformInfo.cpp vendor/llvm/dist/lib/Target/R600/AMDILCFGStructurizer.cpp vendor/llvm/dist/lib/Target/R600/CMakeLists.txt vendor/llvm/dist/lib/Target/R600/CaymanInstructions.td vendor/llvm/dist/lib/Target/R600/EvergreenInstructions.td vendor/llvm/dist/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.cpp vendor/llvm/dist/lib/Target/R600/InstPrinter/AMDGPUInstPrinter.h vendor/llvm/dist/lib/Target/R600/LLVMBuild.txt vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUAsmBackend.cpp vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUFixupKinds.h vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.cpp vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUMCAsmInfo.h vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUMCCodeEmitter.h vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.cpp vendor/llvm/dist/lib/Target/R600/MCTargetDesc/AMDGPUMCTargetDesc.h vendor/llvm/dist/lib/Target/R600/MCTargetDesc/SIMCCodeEmitter.cpp vendor/llvm/dist/lib/Target/R600/Makefile vendor/llvm/dist/lib/Target/R600/Processors.td vendor/llvm/dist/lib/Target/R600/R600ClauseMergePass.cpp vendor/llvm/dist/lib/Target/R600/R600ControlFlowFinalizer.cpp vendor/llvm/dist/lib/Target/R600/R600Defines.h vendor/llvm/dist/lib/Target/R600/R600EmitClauseMarkers.cpp vendor/llvm/dist/lib/Target/R600/R600ExpandSpecialInstrs.cpp vendor/llvm/dist/lib/Target/R600/R600ISelLowering.cpp vendor/llvm/dist/lib/Target/R600/R600ISelLowering.h vendor/llvm/dist/lib/Target/R600/R600InstrFormats.td vendor/llvm/dist/lib/Target/R600/R600InstrInfo.cpp vendor/llvm/dist/lib/Target/R600/R600InstrInfo.h vendor/llvm/dist/lib/Target/R600/R600Instructions.td vendor/llvm/dist/lib/Target/R600/R600MachineFunctionInfo.h vendor/llvm/dist/lib/Target/R600/R600MachineScheduler.cpp vendor/llvm/dist/lib/Target/R600/R600MachineScheduler.h vendor/llvm/dist/lib/Target/R600/R600OptimizeVectorRegisters.cpp vendor/llvm/dist/lib/Target/R600/R600Packetizer.cpp vendor/llvm/dist/lib/Target/R600/R600RegisterInfo.h vendor/llvm/dist/lib/Target/R600/SIDefines.h vendor/llvm/dist/lib/Target/R600/SIFixSGPRCopies.cpp vendor/llvm/dist/lib/Target/R600/SIFixSGPRLiveRanges.cpp vendor/llvm/dist/lib/Target/R600/SIISelLowering.cpp vendor/llvm/dist/lib/Target/R600/SIISelLowering.h vendor/llvm/dist/lib/Target/R600/SIInsertWaits.cpp vendor/llvm/dist/lib/Target/R600/SIInstrFormats.td vendor/llvm/dist/lib/Target/R600/SIInstrInfo.cpp vendor/llvm/dist/lib/Target/R600/SIInstrInfo.h vendor/llvm/dist/lib/Target/R600/SIInstrInfo.td vendor/llvm/dist/lib/Target/R600/SIInstructions.td vendor/llvm/dist/lib/Target/R600/SILowerControlFlow.cpp vendor/llvm/dist/lib/Target/R600/SILowerI1Copies.cpp vendor/llvm/dist/lib/Target/R600/SIMachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/R600/SIMachineFunctionInfo.h vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.cpp vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.h vendor/llvm/dist/lib/Target/R600/SIRegisterInfo.td vendor/llvm/dist/lib/Target/R600/SISchedule.td vendor/llvm/dist/lib/Target/R600/SIShrinkInstructions.cpp vendor/llvm/dist/lib/Target/R600/SITypeRewriter.cpp vendor/llvm/dist/lib/Target/R600/TargetInfo/AMDGPUTargetInfo.cpp vendor/llvm/dist/lib/Target/README.txt vendor/llvm/dist/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp vendor/llvm/dist/lib/Target/Sparc/CMakeLists.txt vendor/llvm/dist/lib/Target/Sparc/DelaySlotFiller.cpp vendor/llvm/dist/lib/Target/Sparc/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp vendor/llvm/dist/lib/Target/Sparc/InstPrinter/SparcInstPrinter.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcFixupKinds.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCAsmInfo.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCExpr.h vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp vendor/llvm/dist/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.h vendor/llvm/dist/lib/Target/Sparc/Makefile vendor/llvm/dist/lib/Target/Sparc/README.txt vendor/llvm/dist/lib/Target/Sparc/Sparc.h vendor/llvm/dist/lib/Target/Sparc/SparcAsmPrinter.cpp vendor/llvm/dist/lib/Target/Sparc/SparcFrameLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcFrameLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.cpp vendor/llvm/dist/lib/Target/Sparc/SparcISelLowering.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcInstrInfo.td vendor/llvm/dist/lib/Target/Sparc/SparcInstrVIS.td vendor/llvm/dist/lib/Target/Sparc/SparcMachineFunctionInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.cpp vendor/llvm/dist/lib/Target/Sparc/SparcRegisterInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcSelectionDAGInfo.h vendor/llvm/dist/lib/Target/Sparc/SparcSubtarget.h vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.cpp vendor/llvm/dist/lib/Target/Sparc/SparcTargetMachine.h vendor/llvm/dist/lib/Target/Sparc/SparcTargetObjectFile.h vendor/llvm/dist/lib/Target/Sparc/SparcTargetStreamer.h vendor/llvm/dist/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp vendor/llvm/dist/lib/Target/SystemZ/CMakeLists.txt vendor/llvm/dist/lib/Target/SystemZ/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp vendor/llvm/dist/lib/Target/SystemZ/InstPrinter/SystemZInstPrinter.h vendor/llvm/dist/lib/Target/SystemZ/LLVMBuild.txt vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmInfo.h vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCFixups.h vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp vendor/llvm/dist/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.h vendor/llvm/dist/lib/Target/SystemZ/Makefile vendor/llvm/dist/lib/Target/SystemZ/SystemZ.h vendor/llvm/dist/lib/Target/SystemZ/SystemZAsmPrinter.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZAsmPrinter.h vendor/llvm/dist/lib/Target/SystemZ/SystemZCallingConv.h vendor/llvm/dist/lib/Target/SystemZ/SystemZConstantPoolValue.h vendor/llvm/dist/lib/Target/SystemZ/SystemZElimCompare.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZFrameLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZFrameLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZISelLowering.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrBuilder.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrFP.td vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZInstrInfo.td vendor/llvm/dist/lib/Target/SystemZ/SystemZLongBranch.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZMCInstLower.h vendor/llvm/dist/lib/Target/SystemZ/SystemZMachineFunctionInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZRegisterInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZSelectionDAGInfo.h vendor/llvm/dist/lib/Target/SystemZ/SystemZShortenInst.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZSubtarget.h vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.cpp vendor/llvm/dist/lib/Target/SystemZ/SystemZTargetMachine.h vendor/llvm/dist/lib/Target/Target.cpp vendor/llvm/dist/lib/Target/TargetLibraryInfo.cpp vendor/llvm/dist/lib/Target/TargetLoweringObjectFile.cpp vendor/llvm/dist/lib/Target/TargetMachine.cpp vendor/llvm/dist/lib/Target/TargetMachineC.cpp vendor/llvm/dist/lib/Target/TargetSubtargetInfo.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/AsmParser/LLVMBuild.txt vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmInstrumentation.h vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParser.cpp vendor/llvm/dist/lib/Target/X86/AsmParser/X86AsmParserCommon.h vendor/llvm/dist/lib/Target/X86/AsmParser/X86Operand.h vendor/llvm/dist/lib/Target/X86/CMakeLists.txt vendor/llvm/dist/lib/Target/X86/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86Disassembler.h vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h vendor/llvm/dist/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h vendor/llvm/dist/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86ATTInstPrinter.h vendor/llvm/dist/lib/Target/X86/InstPrinter/X86InstComments.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86InstComments.h vendor/llvm/dist/lib/Target/X86/InstPrinter/X86IntelInstPrinter.cpp vendor/llvm/dist/lib/Target/X86/InstPrinter/X86IntelInstPrinter.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/LLVMBuild.txt vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86BaseInfo.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86FixupKinds.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp vendor/llvm/dist/lib/Target/X86/MCTargetDesc/X86WinCOFFStreamer.cpp vendor/llvm/dist/lib/Target/X86/README.txt vendor/llvm/dist/lib/Target/X86/TargetInfo/X86TargetInfo.cpp vendor/llvm/dist/lib/Target/X86/Utils/LLVMBuild.txt vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.cpp vendor/llvm/dist/lib/Target/X86/Utils/X86ShuffleDecode.h vendor/llvm/dist/lib/Target/X86/X86.h vendor/llvm/dist/lib/Target/X86/X86.td vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.cpp vendor/llvm/dist/lib/Target/X86/X86AsmPrinter.h vendor/llvm/dist/lib/Target/X86/X86CallingConv.h vendor/llvm/dist/lib/Target/X86/X86CallingConv.td vendor/llvm/dist/lib/Target/X86/X86FastISel.cpp vendor/llvm/dist/lib/Target/X86/X86FixupLEAs.cpp vendor/llvm/dist/lib/Target/X86/X86FloatingPoint.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.cpp vendor/llvm/dist/lib/Target/X86/X86FrameLowering.h vendor/llvm/dist/lib/Target/X86/X86ISelDAGToDAG.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.cpp vendor/llvm/dist/lib/Target/X86/X86ISelLowering.h vendor/llvm/dist/lib/Target/X86/X86InstrAVX512.td vendor/llvm/dist/lib/Target/X86/X86InstrArithmetic.td vendor/llvm/dist/lib/Target/X86/X86InstrBuilder.h vendor/llvm/dist/lib/Target/X86/X86InstrCompiler.td vendor/llvm/dist/lib/Target/X86/X86InstrControl.td vendor/llvm/dist/lib/Target/X86/X86InstrExtension.td vendor/llvm/dist/lib/Target/X86/X86InstrFMA.td vendor/llvm/dist/lib/Target/X86/X86InstrFPStack.td vendor/llvm/dist/lib/Target/X86/X86InstrFormats.td vendor/llvm/dist/lib/Target/X86/X86InstrFragmentsSIMD.td vendor/llvm/dist/lib/Target/X86/X86InstrInfo.cpp vendor/llvm/dist/lib/Target/X86/X86InstrInfo.h vendor/llvm/dist/lib/Target/X86/X86InstrInfo.td vendor/llvm/dist/lib/Target/X86/X86InstrMMX.td vendor/llvm/dist/lib/Target/X86/X86InstrSSE.td vendor/llvm/dist/lib/Target/X86/X86InstrShiftRotate.td vendor/llvm/dist/lib/Target/X86/X86InstrSystem.td vendor/llvm/dist/lib/Target/X86/X86InstrTSX.td vendor/llvm/dist/lib/Target/X86/X86MCInstLower.cpp vendor/llvm/dist/lib/Target/X86/X86MachineFunctionInfo.cpp vendor/llvm/dist/lib/Target/X86/X86MachineFunctionInfo.h vendor/llvm/dist/lib/Target/X86/X86PadShortFunction.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.cpp vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.h vendor/llvm/dist/lib/Target/X86/X86RegisterInfo.td vendor/llvm/dist/lib/Target/X86/X86SchedHaswell.td vendor/llvm/dist/lib/Target/X86/X86SchedSandyBridge.td vendor/llvm/dist/lib/Target/X86/X86Schedule.td vendor/llvm/dist/lib/Target/X86/X86ScheduleAtom.td vendor/llvm/dist/lib/Target/X86/X86ScheduleSLM.td vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/X86/X86SelectionDAGInfo.h vendor/llvm/dist/lib/Target/X86/X86Subtarget.cpp vendor/llvm/dist/lib/Target/X86/X86Subtarget.h vendor/llvm/dist/lib/Target/X86/X86TargetMachine.cpp vendor/llvm/dist/lib/Target/X86/X86TargetMachine.h vendor/llvm/dist/lib/Target/X86/X86TargetObjectFile.h vendor/llvm/dist/lib/Target/X86/X86TargetTransformInfo.cpp vendor/llvm/dist/lib/Target/X86/X86VZeroUpper.cpp vendor/llvm/dist/lib/Target/XCore/Disassembler/LLVMBuild.txt vendor/llvm/dist/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp vendor/llvm/dist/lib/Target/XCore/InstPrinter/XCoreInstPrinter.h vendor/llvm/dist/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.cpp vendor/llvm/dist/lib/Target/XCore/MCTargetDesc/XCoreMCAsmInfo.h vendor/llvm/dist/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp vendor/llvm/dist/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.h vendor/llvm/dist/lib/Target/XCore/XCore.h vendor/llvm/dist/lib/Target/XCore/XCoreAsmPrinter.cpp vendor/llvm/dist/lib/Target/XCore/XCoreFrameLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreFrameLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.cpp vendor/llvm/dist/lib/Target/XCore/XCoreISelLowering.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreInstrInfo.td vendor/llvm/dist/lib/Target/XCore/XCoreMCInstLower.h vendor/llvm/dist/lib/Target/XCore/XCoreMachineFunctionInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreRegisterInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreSelectionDAGInfo.cpp vendor/llvm/dist/lib/Target/XCore/XCoreSelectionDAGInfo.h vendor/llvm/dist/lib/Target/XCore/XCoreSubtarget.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetMachine.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetObjectFile.cpp vendor/llvm/dist/lib/Target/XCore/XCoreTargetObjectFile.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetStreamer.h vendor/llvm/dist/lib/Target/XCore/XCoreTargetTransformInfo.cpp vendor/llvm/dist/lib/Transforms/IPO/ArgumentPromotion.cpp vendor/llvm/dist/lib/Transforms/IPO/ConstantMerge.cpp vendor/llvm/dist/lib/Transforms/IPO/DeadArgumentElimination.cpp vendor/llvm/dist/lib/Transforms/IPO/ExtractGV.cpp vendor/llvm/dist/lib/Transforms/IPO/FunctionAttrs.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalDCE.cpp vendor/llvm/dist/lib/Transforms/IPO/GlobalOpt.cpp vendor/llvm/dist/lib/Transforms/IPO/InlineAlways.cpp vendor/llvm/dist/lib/Transforms/IPO/InlineSimple.cpp vendor/llvm/dist/lib/Transforms/IPO/Inliner.cpp vendor/llvm/dist/lib/Transforms/IPO/Internalize.cpp vendor/llvm/dist/lib/Transforms/IPO/MergeFunctions.cpp vendor/llvm/dist/lib/Transforms/IPO/PassManagerBuilder.cpp vendor/llvm/dist/lib/Transforms/IPO/PruneEH.cpp vendor/llvm/dist/lib/Transforms/IPO/StripSymbols.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombine.h vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAddSub.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCalls.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCasts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineCompares.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombinePHI.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSelect.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineShifts.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp vendor/llvm/dist/lib/Transforms/InstCombine/InstCombineWorklist.h vendor/llvm/dist/lib/Transforms/InstCombine/InstructionCombining.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/AddressSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/GCOVProfiling.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/Instrumentation.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/LLVMBuild.txt vendor/llvm/dist/lib/Transforms/Instrumentation/MemorySanitizer.cpp vendor/llvm/dist/lib/Transforms/Instrumentation/ThreadSanitizer.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ARCRuntimeEntryPoints.h vendor/llvm/dist/lib/Transforms/ObjCARC/CMakeLists.txt vendor/llvm/dist/lib/Transforms/ObjCARC/DependencyAnalysis.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/DependencyAnalysis.h vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARC.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARC.h vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCAliasAnalysis.h vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCContract.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ObjCARCOpts.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ProvenanceAnalysis.cpp vendor/llvm/dist/lib/Transforms/ObjCARC/ProvenanceAnalysis.h vendor/llvm/dist/lib/Transforms/Scalar/ADCE.cpp vendor/llvm/dist/lib/Transforms/Scalar/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Scalar/ConstantHoisting.cpp vendor/llvm/dist/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp vendor/llvm/dist/lib/Transforms/Scalar/DeadStoreElimination.cpp vendor/llvm/dist/lib/Transforms/Scalar/EarlyCSE.cpp vendor/llvm/dist/lib/Transforms/Scalar/GVN.cpp vendor/llvm/dist/lib/Transforms/Scalar/IndVarSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/JumpThreading.cpp vendor/llvm/dist/lib/Transforms/Scalar/LICM.cpp vendor/llvm/dist/lib/Transforms/Scalar/LLVMBuild.txt vendor/llvm/dist/lib/Transforms/Scalar/LoadCombine.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopDeletion.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopInstSimplify.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRerollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopRotation.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopStrengthReduce.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnrollPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/LoopUnswitch.cpp vendor/llvm/dist/lib/Transforms/Scalar/MemCpyOptimizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp vendor/llvm/dist/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reassociate.cpp vendor/llvm/dist/lib/Transforms/Scalar/Reg2Mem.cpp vendor/llvm/dist/lib/Transforms/Scalar/SCCP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SROA.cpp vendor/llvm/dist/lib/Transforms/Scalar/SampleProfile.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalar.cpp vendor/llvm/dist/lib/Transforms/Scalar/ScalarReplAggregates.cpp vendor/llvm/dist/lib/Transforms/Scalar/Scalarizer.cpp vendor/llvm/dist/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp vendor/llvm/dist/lib/Transforms/Scalar/SimplifyCFGPass.cpp vendor/llvm/dist/lib/Transforms/Scalar/Sink.cpp vendor/llvm/dist/lib/Transforms/Scalar/StructurizeCFG.cpp vendor/llvm/dist/lib/Transforms/Scalar/TailRecursionElimination.cpp vendor/llvm/dist/lib/Transforms/Utils/AddDiscriminators.cpp vendor/llvm/dist/lib/Transforms/Utils/BasicBlockUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/BreakCriticalEdges.cpp vendor/llvm/dist/lib/Transforms/Utils/BuildLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/CMakeLists.txt vendor/llvm/dist/lib/Transforms/Utils/CloneFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/CloneModule.cpp vendor/llvm/dist/lib/Transforms/Utils/CtorUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/FlattenCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/GlobalStatus.cpp vendor/llvm/dist/lib/Transforms/Utils/InlineFunction.cpp vendor/llvm/dist/lib/Transforms/Utils/IntegerDivision.cpp vendor/llvm/dist/lib/Transforms/Utils/LCSSA.cpp vendor/llvm/dist/lib/Transforms/Utils/Local.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopSimplify.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnroll.cpp vendor/llvm/dist/lib/Transforms/Utils/LoopUnrollRuntime.cpp vendor/llvm/dist/lib/Transforms/Utils/LowerSwitch.cpp vendor/llvm/dist/lib/Transforms/Utils/Mem2Reg.cpp vendor/llvm/dist/lib/Transforms/Utils/ModuleUtils.cpp vendor/llvm/dist/lib/Transforms/Utils/PromoteMemoryToRegister.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyCFG.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyIndVar.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyInstructions.cpp vendor/llvm/dist/lib/Transforms/Utils/SimplifyLibCalls.cpp vendor/llvm/dist/lib/Transforms/Utils/ValueMapper.cpp vendor/llvm/dist/lib/Transforms/Vectorize/BBVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/LoopVectorize.cpp vendor/llvm/dist/lib/Transforms/Vectorize/SLPVectorizer.cpp vendor/llvm/dist/projects/CMakeLists.txt vendor/llvm/dist/test/Analysis/BasicAA/2008-04-15-Byval.ll vendor/llvm/dist/test/Analysis/BasicAA/full-store-partial-alias.ll vendor/llvm/dist/test/Analysis/BasicAA/gcsetest.ll vendor/llvm/dist/test/Analysis/BasicAA/invariant_load.ll vendor/llvm/dist/test/Analysis/BasicAA/modref.ll vendor/llvm/dist/test/Analysis/BasicAA/phi-aa.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/bad_input.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/basic.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/double_backedge.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/double_exit.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/extremely-likely-loop-successor.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/irreducible.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/loop_with_branch.ll vendor/llvm/dist/test/Analysis/BlockFrequencyInfo/nested_loop_with_branches.ll vendor/llvm/dist/test/Analysis/BranchProbabilityInfo/basic.ll vendor/llvm/dist/test/Analysis/CostModel/ARM/cast.ll vendor/llvm/dist/test/Analysis/CostModel/X86/cast.ll vendor/llvm/dist/test/Analysis/CostModel/X86/cmp.ll vendor/llvm/dist/test/Analysis/CostModel/X86/sitofp.ll vendor/llvm/dist/test/Analysis/CostModel/X86/uitofp.ll vendor/llvm/dist/test/Analysis/GlobalsModRef/pr12351.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/nsw.ll vendor/llvm/dist/test/Analysis/ScalarEvolution/sext-iv-1.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/PR17620.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/aliastest.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/argument-promotion.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/dse.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/dynamic-indices.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/functionattrs.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/gvn-nonlocal-type-mismatch.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/intrinsics.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/licm.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/memcpyopt.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/placement-tbaa.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/precedence.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/sink.ll vendor/llvm/dist/test/Analysis/TypeBasedAliasAnalysis/tbaa-path.ll vendor/llvm/dist/test/Assembler/2002-03-08-NameCollision.ll vendor/llvm/dist/test/Assembler/2002-03-08-NameCollision2.ll vendor/llvm/dist/test/Assembler/2002-04-07-HexFloatConstants.ll vendor/llvm/dist/test/Assembler/2002-04-07-InfConstant.ll vendor/llvm/dist/test/Assembler/2002-04-29-NameBinding.ll vendor/llvm/dist/test/Assembler/2002-05-02-InvalidForwardRef.ll vendor/llvm/dist/test/Assembler/2002-07-14-OpaqueType.ll vendor/llvm/dist/test/Assembler/2002-07-25-QuoteInString.ll vendor/llvm/dist/test/Assembler/2002-07-25-ReturnPtrFunction.ll vendor/llvm/dist/test/Assembler/2002-07-31-SlashInString.ll vendor/llvm/dist/test/Assembler/2002-08-15-CastAmbiguity.ll vendor/llvm/dist/test/Assembler/2002-08-15-ConstantExprProblem.ll vendor/llvm/dist/test/Assembler/2002-08-15-UnresolvedGlobalReference.ll vendor/llvm/dist/test/Assembler/2002-08-16-ConstExprInlined.ll vendor/llvm/dist/test/Assembler/2002-08-19-BytecodeReader.ll vendor/llvm/dist/test/Assembler/2002-08-22-DominanceProblem.ll vendor/llvm/dist/test/Assembler/2002-10-08-LargeArrayPerformance.ll vendor/llvm/dist/test/Assembler/2002-10-13-ConstantEncodingProblem.ll vendor/llvm/dist/test/Assembler/2002-12-15-GlobalResolve.ll vendor/llvm/dist/test/Assembler/2003-01-30-UnsignedString.ll vendor/llvm/dist/test/Assembler/2003-04-25-UnresolvedGlobalReference.ll vendor/llvm/dist/test/Assembler/2003-05-03-BytecodeReaderProblem.ll vendor/llvm/dist/test/Assembler/2003-05-12-MinIntProblem.ll vendor/llvm/dist/test/Assembler/2003-05-15-AssemblerProblem.ll vendor/llvm/dist/test/Assembler/2003-05-15-SwitchBug.ll vendor/llvm/dist/test/Assembler/2003-05-21-ConstantShiftExpr.ll vendor/llvm/dist/test/Assembler/2003-05-21-EmptyStructTest.ll vendor/llvm/dist/test/Assembler/2003-08-20-ConstantExprGEP-Fold.ll vendor/llvm/dist/test/Assembler/2003-08-21-ConstantExprCast-Fold.ll vendor/llvm/dist/test/Assembler/2003-11-05-ConstantExprShift.ll vendor/llvm/dist/test/Assembler/2003-11-12-ConstantExprCast.ll vendor/llvm/dist/test/Assembler/2004-01-11-getelementptrfolding.ll vendor/llvm/dist/test/Assembler/2004-01-20-MaxLongLong.ll vendor/llvm/dist/test/Assembler/2004-02-01-NegativeZero.ll vendor/llvm/dist/test/Assembler/2004-02-27-SelfUseAssertError.ll vendor/llvm/dist/test/Assembler/2004-03-07-FunctionAddressAlignment.ll vendor/llvm/dist/test/Assembler/2004-04-04-GetElementPtrIndexTypes.ll vendor/llvm/dist/test/Assembler/2004-06-07-VerifierBug.ll vendor/llvm/dist/test/Assembler/2004-10-22-BCWriterUndefBug.ll vendor/llvm/dist/test/Assembler/2004-11-28-InvalidTypeCrash.ll vendor/llvm/dist/test/Assembler/2005-01-03-FPConstantDisassembly.ll vendor/llvm/dist/test/Assembler/2005-01-31-CallingAggregateFunction.ll vendor/llvm/dist/test/Assembler/2005-05-05-OpaqueUndefValues.ll vendor/llvm/dist/test/Assembler/2005-12-21-ZeroInitVector.ll vendor/llvm/dist/test/Assembler/2006-12-09-Cast-To-Bool.ll vendor/llvm/dist/test/Assembler/2007-01-02-Undefined-Arg-Type.ll vendor/llvm/dist/test/Assembler/2007-01-05-Cmp-ConstExpr.ll vendor/llvm/dist/test/Assembler/2007-03-19-NegValue.ll vendor/llvm/dist/test/Assembler/2007-04-20-AlignedLoad.ll vendor/llvm/dist/test/Assembler/2007-04-20-AlignedStore.ll vendor/llvm/dist/test/Assembler/2007-04-25-AssemblerFoldExternWeak.ll vendor/llvm/dist/test/Assembler/2007-05-21-Escape.ll vendor/llvm/dist/test/Assembler/2007-07-19-ParamAttrAmbiguity.ll vendor/llvm/dist/test/Assembler/2007-09-10-AliasFwdRef.ll vendor/llvm/dist/test/Assembler/2007-09-29-GC.ll vendor/llvm/dist/test/Assembler/2007-12-11-AddressSpaces.ll vendor/llvm/dist/test/Assembler/2008-01-11-VarargAttrs.ll vendor/llvm/dist/test/Assembler/2008-07-10-APInt.ll vendor/llvm/dist/test/Assembler/2008-09-02-FunctionNotes.ll vendor/llvm/dist/test/Assembler/2008-09-29-RetAttr.ll vendor/llvm/dist/test/Assembler/2008-10-14-QuoteInName.ll vendor/llvm/dist/test/Assembler/2009-02-01-UnnamedForwardRef.ll vendor/llvm/dist/test/Assembler/2009-02-28-CastOpc.ll vendor/llvm/dist/test/Assembler/2009-02-28-StripOpaqueName.ll vendor/llvm/dist/test/Assembler/2009-03-24-ZextConstantExpr.ll vendor/llvm/dist/test/Assembler/2009-07-24-ZeroArgGEP.ll vendor/llvm/dist/test/Assembler/2010-02-05-FunctionLocalMetadataBecomesNull.ll vendor/llvm/dist/test/Assembler/ConstantExprFold.ll vendor/llvm/dist/test/Assembler/ConstantExprFoldCast.ll vendor/llvm/dist/test/Assembler/ConstantExprFoldSelect.ll vendor/llvm/dist/test/Assembler/ConstantExprNoFold.ll vendor/llvm/dist/test/Assembler/MultipleReturnValueType.ll vendor/llvm/dist/test/Assembler/addrspacecast-alias.ll vendor/llvm/dist/test/Assembler/aggregate-constant-values.ll vendor/llvm/dist/test/Assembler/aggregate-return-single-value.ll vendor/llvm/dist/test/Assembler/align-inst.ll vendor/llvm/dist/test/Assembler/alignstack.ll vendor/llvm/dist/test/Assembler/anon-functions.ll vendor/llvm/dist/test/Assembler/atomic.ll vendor/llvm/dist/test/Assembler/auto_upgrade_intrinsics.ll vendor/llvm/dist/test/Assembler/bcwrap.ll vendor/llvm/dist/test/Assembler/comment.ll vendor/llvm/dist/test/Assembler/externally-initialized.ll vendor/llvm/dist/test/Assembler/fast-math-flags.ll vendor/llvm/dist/test/Assembler/flags.ll vendor/llvm/dist/test/Assembler/functionlocal-metadata.ll vendor/llvm/dist/test/Assembler/getelementptr.ll vendor/llvm/dist/test/Assembler/global-addrspace-forwardref.ll vendor/llvm/dist/test/Assembler/half-constprop.ll vendor/llvm/dist/test/Assembler/half-conv.ll vendor/llvm/dist/test/Assembler/half.ll vendor/llvm/dist/test/Assembler/huge-array.ll vendor/llvm/dist/test/Assembler/inalloca.ll vendor/llvm/dist/test/Assembler/insertextractvalue.ll vendor/llvm/dist/test/Assembler/internal-hidden-alias.ll vendor/llvm/dist/test/Assembler/internal-protected-alias.ll vendor/llvm/dist/test/Assembler/invalid-comdat.ll vendor/llvm/dist/test/Assembler/invalid-name.ll (contents, props changed) vendor/llvm/dist/test/Assembler/metadata.ll vendor/llvm/dist/test/Assembler/named-metadata.ll vendor/llvm/dist/test/Assembler/numbered-values.ll vendor/llvm/dist/test/Assembler/private-hidden-alias.ll vendor/llvm/dist/test/Assembler/private-protected-alias.ll vendor/llvm/dist/test/Assembler/select.ll vendor/llvm/dist/test/Assembler/tls-models.ll vendor/llvm/dist/test/Assembler/unnamed-addr.ll vendor/llvm/dist/test/Assembler/unnamed.ll vendor/llvm/dist/test/Assembler/upgrade-loop-metadata.ll vendor/llvm/dist/test/Assembler/vbool-cmp.ll vendor/llvm/dist/test/Assembler/vector-cmp.ll vendor/llvm/dist/test/Assembler/vector-select.ll vendor/llvm/dist/test/Assembler/vector-shift.ll vendor/llvm/dist/test/Assembler/x86mmx.ll vendor/llvm/dist/test/Bindings/llvm-c/disassemble.test vendor/llvm/dist/test/Bitcode/2006-12-11-Cast-ConstExpr.ll vendor/llvm/dist/test/Bitcode/2009-06-11-FirstClassAggregateConstant.ll vendor/llvm/dist/test/Bitcode/aggregateInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/arm32_neon_vcnt_upgrade.ll vendor/llvm/dist/test/Bitcode/atomic.ll vendor/llvm/dist/test/Bitcode/attributes-3.3.ll vendor/llvm/dist/test/Bitcode/attributes.ll vendor/llvm/dist/test/Bitcode/binaryFloatInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/binaryIntInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/bitwiseInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/blockaddress.ll vendor/llvm/dist/test/Bitcode/calling-conventions.3.2.ll vendor/llvm/dist/test/Bitcode/case-ranges-3.3.ll vendor/llvm/dist/test/Bitcode/cmpxchg-upgrade.ll vendor/llvm/dist/test/Bitcode/conversionInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/conversionInstructions.3.2.ll.bc vendor/llvm/dist/test/Bitcode/drop-debug-info.ll vendor/llvm/dist/test/Bitcode/extractelement.ll vendor/llvm/dist/test/Bitcode/flags.ll vendor/llvm/dist/test/Bitcode/function-encoding-rel-operands.ll vendor/llvm/dist/test/Bitcode/global-variables.3.2.ll vendor/llvm/dist/test/Bitcode/inalloca.ll vendor/llvm/dist/test/Bitcode/invalid.ll vendor/llvm/dist/test/Bitcode/linkage-types-3.2.ll vendor/llvm/dist/test/Bitcode/local-linkage-default-visibility.3.4.ll vendor/llvm/dist/test/Bitcode/memInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/metadata-2.ll vendor/llvm/dist/test/Bitcode/metadata.ll vendor/llvm/dist/test/Bitcode/miscInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/miscInstructions.3.2.ll.bc vendor/llvm/dist/test/Bitcode/old-aliases.ll vendor/llvm/dist/test/Bitcode/ptest-new.ll vendor/llvm/dist/test/Bitcode/ptest-old.ll vendor/llvm/dist/test/Bitcode/select.ll vendor/llvm/dist/test/Bitcode/shuffle.ll vendor/llvm/dist/test/Bitcode/ssse3_palignr.ll vendor/llvm/dist/test/Bitcode/tailcall.ll vendor/llvm/dist/test/Bitcode/terminatorInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/terminatorInstructions.3.2.ll.bc vendor/llvm/dist/test/Bitcode/upgrade-global-ctors.ll vendor/llvm/dist/test/Bitcode/upgrade-loop-metadata.ll vendor/llvm/dist/test/Bitcode/upgrade-tbaa.ll vendor/llvm/dist/test/Bitcode/variableArgumentIntrinsic.3.2.ll vendor/llvm/dist/test/Bitcode/vectorInstructions.3.2.ll vendor/llvm/dist/test/Bitcode/visibility-styles.3.2.ll vendor/llvm/dist/test/Bitcode/weak-cmpxchg-upgrade.ll vendor/llvm/dist/test/BugPoint/metadata.ll vendor/llvm/dist/test/CMakeLists.txt vendor/llvm/dist/test/CodeGen/AArch64/adc.ll vendor/llvm/dist/test/CodeGen/AArch64/analyze-branch.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-2011-03-17-AsmPrinterCrash.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-2011-10-18-LdStOptBug.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-2012-05-22-LdStOptBug.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-2012-06-06-FPToUI.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-AdvSIMD-Scalar.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-EXT-undef-mask.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-aapcs.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-abi.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-abi_align.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-addr-mode-folding.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-addrmode.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-atomic-128.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-big-endian-bitconverts.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-big-endian-eh.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-big-endian-varargs.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-big-endian-vector-callee.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-big-endian-vector-caller.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-ccmp-heuristics.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-cse.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-dagcombiner-dead-indexed-load.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-extern-weak.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-addr-offset.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-alloca.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-br.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-call.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-conversion.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-fcmp.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-gv.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-icmp.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-indirectbr.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-intrinsic.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-materialize.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-noconvert.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-rem.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel-ret.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fast-isel.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fastcc-tailcall.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-fold-address.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-indexed-memory.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-indexed-vector-ldst-2.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-inline-asm.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-named-reg-alloc.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-named-reg-notareg.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-neon-select_cc.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-patchpoint.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-popcnt.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-prefetch.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-promote-const.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-scaled_iv.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-scvt.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-setcc-int-to-fp-combine.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-shifted-sext.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-st1.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-stackmap.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-stackpointer.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-tls-dynamics.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vabs.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-variadic-aapcs.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-vector-ext.ll vendor/llvm/dist/test/CodeGen/AArch64/arm64-xaluo.ll vendor/llvm/dist/test/CodeGen/AArch64/atomic-ops.ll vendor/llvm/dist/test/CodeGen/AArch64/compiler-ident.ll vendor/llvm/dist/test/CodeGen/AArch64/cond-sel.ll vendor/llvm/dist/test/CodeGen/AArch64/dp-3source.ll vendor/llvm/dist/test/CodeGen/AArch64/extern-weak.ll vendor/llvm/dist/test/CodeGen/AArch64/fast-isel-mul.ll vendor/llvm/dist/test/CodeGen/AArch64/fpimm.ll vendor/llvm/dist/test/CodeGen/AArch64/frameaddr.ll vendor/llvm/dist/test/CodeGen/AArch64/func-argpassing.ll vendor/llvm/dist/test/CodeGen/AArch64/func-calls.ll vendor/llvm/dist/test/CodeGen/AArch64/global-merge-1.ll vendor/llvm/dist/test/CodeGen/AArch64/global-merge-2.ll vendor/llvm/dist/test/CodeGen/AArch64/init-array.ll vendor/llvm/dist/test/CodeGen/AArch64/jump-table.ll vendor/llvm/dist/test/CodeGen/AArch64/mul-lohi.ll vendor/llvm/dist/test/CodeGen/AArch64/neon-perm.ll vendor/llvm/dist/test/CodeGen/AArch64/pic-eh-stubs.ll vendor/llvm/dist/test/CodeGen/AArch64/ragreedy-csr.ll vendor/llvm/dist/test/CodeGen/AArch64/tail-call.ll vendor/llvm/dist/test/CodeGen/AArch64/trunc-v1i64.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-07-tailmerge-1.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-09-tailmerge-2.ll vendor/llvm/dist/test/CodeGen/ARM/2007-05-22-tailmerge-3.ll vendor/llvm/dist/test/CodeGen/ARM/2009-10-16-Scope.ll vendor/llvm/dist/test/CodeGen/ARM/2010-04-15-ScavengerDebugValue.ll vendor/llvm/dist/test/CodeGen/ARM/2010-06-25-Thumb2ITInvalidIterator.ll vendor/llvm/dist/test/CodeGen/ARM/2010-08-04-StackVariable.ll vendor/llvm/dist/test/CodeGen/ARM/2010-11-15-SpillEarlyClobber.ll vendor/llvm/dist/test/CodeGen/ARM/2011-01-19-MergedGlobalDbg.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-12-AlignBug.ll vendor/llvm/dist/test/CodeGen/ARM/2011-04-12-FastRegAlloc.ll vendor/llvm/dist/test/CodeGen/ARM/2011-05-04-MultipleLandingPadSuccs.ll vendor/llvm/dist/test/CodeGen/ARM/2011-08-02-MergedGlobalDbg.ll vendor/llvm/dist/test/CodeGen/ARM/2012-04-24-SplitEHCriticalEdge.ll vendor/llvm/dist/test/CodeGen/ARM/2012-08-04-DtripleSpillReload.ll vendor/llvm/dist/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv.ll vendor/llvm/dist/test/CodeGen/ARM/2012-09-25-InlineAsmScalarToVectorConv2.ll vendor/llvm/dist/test/CodeGen/ARM/2014-07-18-earlyclobber-str-post.ll vendor/llvm/dist/test/CodeGen/ARM/aapcs-hfa-code.ll vendor/llvm/dist/test/CodeGen/ARM/aliases.ll vendor/llvm/dist/test/CodeGen/ARM/alloc-no-stack-realign.ll vendor/llvm/dist/test/CodeGen/ARM/arm-abi-attr.ll vendor/llvm/dist/test/CodeGen/ARM/atomic-64bit.ll vendor/llvm/dist/test/CodeGen/ARM/atomic-cmpxchg.ll vendor/llvm/dist/test/CodeGen/ARM/atomic-load-store.ll vendor/llvm/dist/test/CodeGen/ARM/atomic-op.ll vendor/llvm/dist/test/CodeGen/ARM/build-attributes-encoding.s vendor/llvm/dist/test/CodeGen/ARM/build-attributes.ll vendor/llvm/dist/test/CodeGen/ARM/carry.ll vendor/llvm/dist/test/CodeGen/ARM/coalesce-dbgvalue.ll vendor/llvm/dist/test/CodeGen/ARM/cse-ldrlit.ll vendor/llvm/dist/test/CodeGen/ARM/cse-libcalls.ll vendor/llvm/dist/test/CodeGen/ARM/dagcombine-concatvector.ll vendor/llvm/dist/test/CodeGen/ARM/darwin-eabi.ll vendor/llvm/dist/test/CodeGen/ARM/debug-frame-large-stack.ll vendor/llvm/dist/test/CodeGen/ARM/debug-frame-vararg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-frame.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-arg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-blocks.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-branch-folding.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-d16-reg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-qreg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-s16-reg.ll vendor/llvm/dist/test/CodeGen/ARM/debug-info-sreg2.ll vendor/llvm/dist/test/CodeGen/ARM/debug-segmented-stacks.ll vendor/llvm/dist/test/CodeGen/ARM/emit-big-cst.ll vendor/llvm/dist/test/CodeGen/ARM/fabs-neon.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-call.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-deadcode.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-intrinsic.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-mvn.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-select.ll vendor/llvm/dist/test/CodeGen/ARM/fast-isel-vararg.ll vendor/llvm/dist/test/CodeGen/ARM/fnegs.ll vendor/llvm/dist/test/CodeGen/ARM/fold-stack-adjust.ll vendor/llvm/dist/test/CodeGen/ARM/fp16.ll vendor/llvm/dist/test/CodeGen/ARM/ghc-tcreturn-lowered.ll vendor/llvm/dist/test/CodeGen/ARM/global-merge-1.ll vendor/llvm/dist/test/CodeGen/ARM/globals.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt-branch-weight-bug.ll vendor/llvm/dist/test/CodeGen/ARM/ifcvt-branch-weight.ll vendor/llvm/dist/test/CodeGen/ARM/inline-diagnostics.ll vendor/llvm/dist/test/CodeGen/ARM/interrupt-attr.ll vendor/llvm/dist/test/CodeGen/ARM/memcpy-inline.ll vendor/llvm/dist/test/CodeGen/ARM/metadata-default.ll vendor/llvm/dist/test/CodeGen/ARM/metadata-short-enums.ll vendor/llvm/dist/test/CodeGen/ARM/metadata-short-wchar.ll vendor/llvm/dist/test/CodeGen/ARM/named-reg-alloc.ll vendor/llvm/dist/test/CodeGen/ARM/named-reg-notareg.ll vendor/llvm/dist/test/CodeGen/ARM/none-macho.ll vendor/llvm/dist/test/CodeGen/ARM/out-of-registers.ll vendor/llvm/dist/test/CodeGen/ARM/prefetch.ll vendor/llvm/dist/test/CodeGen/ARM/sbfx.ll vendor/llvm/dist/test/CodeGen/ARM/select_xform.ll vendor/llvm/dist/test/CodeGen/ARM/spill-q.ll vendor/llvm/dist/test/CodeGen/ARM/stackpointer.ll vendor/llvm/dist/test/CodeGen/ARM/swift-atomics.ll vendor/llvm/dist/test/CodeGen/ARM/sxt_rot.ll vendor/llvm/dist/test/CodeGen/ARM/tail-call.ll vendor/llvm/dist/test/CodeGen/ARM/taildup-branch-weight.ll vendor/llvm/dist/test/CodeGen/ARM/thumb1-varalloc.ll vendor/llvm/dist/test/CodeGen/ARM/thumb2-it-block.ll vendor/llvm/dist/test/CodeGen/ARM/tls1.ll vendor/llvm/dist/test/CodeGen/ARM/varargs-spill-stack-align-nacl.ll vendor/llvm/dist/test/CodeGen/ARM/vargs_align.ll vendor/llvm/dist/test/CodeGen/ARM/vfp-regs-dwarf.ll vendor/llvm/dist/test/CodeGen/ARM/vld1.ll vendor/llvm/dist/test/CodeGen/ARM/vldm-sched-a9.ll vendor/llvm/dist/test/CodeGen/ARM/vminmaxnm.ll vendor/llvm/dist/test/CodeGen/ARM/vst1.ll vendor/llvm/dist/test/CodeGen/Generic/2009-03-17-LSR-APInt.ll vendor/llvm/dist/test/CodeGen/Generic/2011-07-07-ScheduleDAGCrash.ll vendor/llvm/dist/test/CodeGen/Generic/MachineBranchProb.ll vendor/llvm/dist/test/CodeGen/Generic/dbg_value.ll vendor/llvm/dist/test/CodeGen/Generic/print-machineinstrs.ll vendor/llvm/dist/test/CodeGen/Hexagon/BranchPredict.ll vendor/llvm/dist/test/CodeGen/Hexagon/block-addr.ll vendor/llvm/dist/test/CodeGen/Hexagon/cext-check.ll vendor/llvm/dist/test/CodeGen/Hexagon/hwloop-dbg.ll vendor/llvm/dist/test/CodeGen/Hexagon/idxload-with-zero-offset.ll vendor/llvm/dist/test/CodeGen/Hexagon/newvaluestore.ll vendor/llvm/dist/test/CodeGen/Hexagon/pred-absolute-store.ll vendor/llvm/dist/test/CodeGen/Hexagon/struct_args_large.ll vendor/llvm/dist/test/CodeGen/Inputs/DbgValueOtherTargets.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/loadstore2.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/nullvoid.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/simplestore.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/simplestorefp1.ll vendor/llvm/dist/test/CodeGen/Mips/Fast-ISel/simplestorei.ll vendor/llvm/dist/test/CodeGen/Mips/atomic.ll vendor/llvm/dist/test/CodeGen/Mips/brsize3.ll vendor/llvm/dist/test/CodeGen/Mips/brsize3a.ll vendor/llvm/dist/test/CodeGen/Mips/ci2.ll vendor/llvm/dist/test/CodeGen/Mips/cmov.ll vendor/llvm/dist/test/CodeGen/Mips/const1.ll vendor/llvm/dist/test/CodeGen/Mips/const4a.ll vendor/llvm/dist/test/CodeGen/Mips/const6.ll vendor/llvm/dist/test/CodeGen/Mips/const6a.ll vendor/llvm/dist/test/CodeGen/Mips/fp16instrinsmc.ll vendor/llvm/dist/test/CodeGen/Mips/gpreg-lazy-binding.ll vendor/llvm/dist/test/CodeGen/Mips/hfptrcall.ll vendor/llvm/dist/test/CodeGen/Mips/init-array.ll vendor/llvm/dist/test/CodeGen/Mips/inlineasm-cnstrnt-reg.ll vendor/llvm/dist/test/CodeGen/Mips/inlineasmmemop.ll vendor/llvm/dist/test/CodeGen/Mips/lcb2.ll vendor/llvm/dist/test/CodeGen/Mips/lcb3c.ll vendor/llvm/dist/test/CodeGen/Mips/lcb4a.ll vendor/llvm/dist/test/CodeGen/Mips/lcb5.ll vendor/llvm/dist/test/CodeGen/Mips/longbranch.ll vendor/llvm/dist/test/CodeGen/Mips/mbrsize4a.ll vendor/llvm/dist/test/CodeGen/Mips/micromips-atomic.ll vendor/llvm/dist/test/CodeGen/Mips/mips16-hf-attr.ll vendor/llvm/dist/test/CodeGen/Mips/mips64-f128.ll vendor/llvm/dist/test/CodeGen/Mips/msa/arithmetic_float.ll vendor/llvm/dist/test/CodeGen/Mips/nomips16.ll vendor/llvm/dist/test/CodeGen/Mips/octeon.ll vendor/llvm/dist/test/CodeGen/Mips/powif64_16.ll vendor/llvm/dist/test/CodeGen/Mips/prevent-hoisting.ll vendor/llvm/dist/test/CodeGen/Mips/seleq.ll vendor/llvm/dist/test/CodeGen/Mips/small-section-reserve-gp.ll vendor/llvm/dist/test/CodeGen/Mips/start-asm-file.ll vendor/llvm/dist/test/CodeGen/NVPTX/annotations.ll vendor/llvm/dist/test/CodeGen/NVPTX/call-with-alloca-buffer.ll vendor/llvm/dist/test/CodeGen/NVPTX/calling-conv.ll vendor/llvm/dist/test/CodeGen/NVPTX/fma.ll vendor/llvm/dist/test/CodeGen/NVPTX/generic-to-nvvm.ll vendor/llvm/dist/test/CodeGen/NVPTX/i1-global.ll vendor/llvm/dist/test/CodeGen/NVPTX/i1-param.ll vendor/llvm/dist/test/CodeGen/NVPTX/ldu-i8.ll vendor/llvm/dist/test/CodeGen/NVPTX/ldu-ldg.ll vendor/llvm/dist/test/CodeGen/NVPTX/ldu-reg-plus-offset.ll vendor/llvm/dist/test/CodeGen/NVPTX/managed.ll vendor/llvm/dist/test/CodeGen/NVPTX/mulwide.ll vendor/llvm/dist/test/CodeGen/NVPTX/noduplicate-syncthreads.ll vendor/llvm/dist/test/CodeGen/NVPTX/refl1.ll vendor/llvm/dist/test/CodeGen/NVPTX/simple-call.ll vendor/llvm/dist/test/CodeGen/NVPTX/surf-read-cuda.ll vendor/llvm/dist/test/CodeGen/NVPTX/surf-read.ll vendor/llvm/dist/test/CodeGen/NVPTX/surf-write-cuda.ll vendor/llvm/dist/test/CodeGen/NVPTX/surf-write.ll vendor/llvm/dist/test/CodeGen/NVPTX/tex-read-cuda.ll vendor/llvm/dist/test/CodeGen/NVPTX/tex-read.ll vendor/llvm/dist/test/CodeGen/NVPTX/texsurf-queries.ll vendor/llvm/dist/test/CodeGen/NVPTX/weak-linkage.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-03-24-cntlzd.ll vendor/llvm/dist/test/CodeGen/PowerPC/2007-09-08-unaligned.ll vendor/llvm/dist/test/CodeGen/PowerPC/2011-12-05-NoSpillDupCR.ll vendor/llvm/dist/test/CodeGen/PowerPC/2011-12-06-SpillAndRestoreCR.ll vendor/llvm/dist/test/CodeGen/PowerPC/2012-10-12-bitcast.ll vendor/llvm/dist/test/CodeGen/PowerPC/Frames-large.ll vendor/llvm/dist/test/CodeGen/PowerPC/aa-tbaa.ll vendor/llvm/dist/test/CodeGen/PowerPC/asm-Zy.ll vendor/llvm/dist/test/CodeGen/PowerPC/atomic-2.ll vendor/llvm/dist/test/CodeGen/PowerPC/buildvec_canonicalize.ll vendor/llvm/dist/test/CodeGen/PowerPC/complex-return.ll vendor/llvm/dist/test/CodeGen/PowerPC/copysignl.ll vendor/llvm/dist/test/CodeGen/PowerPC/crsave.ll vendor/llvm/dist/test/CodeGen/PowerPC/ctrloops.ll vendor/llvm/dist/test/CodeGen/PowerPC/dbg.ll vendor/llvm/dist/test/CodeGen/PowerPC/early-ret2.ll vendor/llvm/dist/test/CodeGen/PowerPC/empty-functions.ll vendor/llvm/dist/test/CodeGen/PowerPC/fabs.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-call.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-cmp-imm.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-conversion.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-load-store.ll vendor/llvm/dist/test/CodeGen/PowerPC/fast-isel-ret.ll vendor/llvm/dist/test/CodeGen/PowerPC/fcpsgn.ll vendor/llvm/dist/test/CodeGen/PowerPC/fma.ll vendor/llvm/dist/test/CodeGen/PowerPC/fnabs.ll vendor/llvm/dist/test/CodeGen/PowerPC/fp-branch.ll vendor/llvm/dist/test/CodeGen/PowerPC/fp_to_uint.ll vendor/llvm/dist/test/CodeGen/PowerPC/fsel.ll vendor/llvm/dist/test/CodeGen/PowerPC/fsqrt.ll vendor/llvm/dist/test/CodeGen/PowerPC/glob-comp-aa-crash.ll vendor/llvm/dist/test/CodeGen/PowerPC/i64_fp.ll vendor/llvm/dist/test/CodeGen/PowerPC/ia-neg-const.ll vendor/llvm/dist/test/CodeGen/PowerPC/in-asm-f64-reg.ll vendor/llvm/dist/test/CodeGen/PowerPC/inlineasm-i64-reg.ll vendor/llvm/dist/test/CodeGen/PowerPC/mcm-10.ll vendor/llvm/dist/test/CodeGen/PowerPC/mcm-12.ll vendor/llvm/dist/test/CodeGen/PowerPC/mcm-2.ll vendor/llvm/dist/test/CodeGen/PowerPC/mcm-4.ll vendor/llvm/dist/test/CodeGen/PowerPC/mult-alt-generic-powerpc.ll vendor/llvm/dist/test/CodeGen/PowerPC/mult-alt-generic-powerpc64.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r0.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r1-64.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r1.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r13-64.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r13.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r2-64.ll vendor/llvm/dist/test/CodeGen/PowerPC/named-reg-alloc-r2.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc32-lshrti3.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc32-pic.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc440-msync.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-align-long-double.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-calls.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-prefetch.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64-vaarg-int.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppc64le-aggregates.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppcf128-1.ll vendor/llvm/dist/test/CodeGen/PowerPC/ppcf128-endian.ll vendor/llvm/dist/test/CodeGen/PowerPC/pr15630.ll vendor/llvm/dist/test/CodeGen/PowerPC/pr17168.ll vendor/llvm/dist/test/CodeGen/PowerPC/recipest.ll vendor/llvm/dist/test/CodeGen/PowerPC/rlwimi-and.ll vendor/llvm/dist/test/CodeGen/PowerPC/rlwimi2.ll vendor/llvm/dist/test/CodeGen/PowerPC/rounding-ops.ll vendor/llvm/dist/test/CodeGen/PowerPC/sections.ll vendor/llvm/dist/test/CodeGen/PowerPC/subsumes-pred-regs.ll vendor/llvm/dist/test/CodeGen/PowerPC/toc-load-sched-bug.ll vendor/llvm/dist/test/CodeGen/PowerPC/unal4-std.ll vendor/llvm/dist/test/CodeGen/PowerPC/unaligned.ll vendor/llvm/dist/test/CodeGen/PowerPC/unsafe-math.ll vendor/llvm/dist/test/CodeGen/PowerPC/unwind-dw2-g.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec-abi-align.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_misaligned.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_mul.ll vendor/llvm/dist/test/CodeGen/PowerPC/vec_shuffle_le.ll vendor/llvm/dist/test/CodeGen/PowerPC/vrspill.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-args.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-fma-m.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-self-copy.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx-spill.ll vendor/llvm/dist/test/CodeGen/PowerPC/vsx.ll vendor/llvm/dist/test/CodeGen/R600/128bit-kernel-args.ll vendor/llvm/dist/test/CodeGen/R600/32-bit-local-address-space.ll vendor/llvm/dist/test/CodeGen/R600/64bit-kernel-args.ll vendor/llvm/dist/test/CodeGen/R600/add.ll vendor/llvm/dist/test/CodeGen/R600/add_i64.ll vendor/llvm/dist/test/CodeGen/R600/address-space.ll vendor/llvm/dist/test/CodeGen/R600/and.ll vendor/llvm/dist/test/CodeGen/R600/anyext.ll vendor/llvm/dist/test/CodeGen/R600/array-ptr-calc-i32.ll vendor/llvm/dist/test/CodeGen/R600/array-ptr-calc-i64.ll vendor/llvm/dist/test/CodeGen/R600/atomic_cmp_swap_local.ll vendor/llvm/dist/test/CodeGen/R600/atomic_load_add.ll vendor/llvm/dist/test/CodeGen/R600/atomic_load_sub.ll vendor/llvm/dist/test/CodeGen/R600/basic-branch.ll vendor/llvm/dist/test/CodeGen/R600/basic-loop.ll vendor/llvm/dist/test/CodeGen/R600/bfe_uint.ll vendor/llvm/dist/test/CodeGen/R600/bfi_int.ll vendor/llvm/dist/test/CodeGen/R600/big_alu.ll vendor/llvm/dist/test/CodeGen/R600/bitcast.ll vendor/llvm/dist/test/CodeGen/R600/bswap.ll vendor/llvm/dist/test/CodeGen/R600/build_vector.ll vendor/llvm/dist/test/CodeGen/R600/call.ll vendor/llvm/dist/test/CodeGen/R600/call_fs.ll vendor/llvm/dist/test/CodeGen/R600/cayman-loop-bug.ll vendor/llvm/dist/test/CodeGen/R600/cf-stack-bug.ll vendor/llvm/dist/test/CodeGen/R600/codegen-prepare-addrmode-sext.ll vendor/llvm/dist/test/CodeGen/R600/combine_vloads.ll vendor/llvm/dist/test/CodeGen/R600/complex-folding.ll vendor/llvm/dist/test/CodeGen/R600/concat_vectors.ll vendor/llvm/dist/test/CodeGen/R600/copy-illegal-type.ll vendor/llvm/dist/test/CodeGen/R600/ctlz_zero_undef.ll vendor/llvm/dist/test/CodeGen/R600/ctpop.ll vendor/llvm/dist/test/CodeGen/R600/ctpop64.ll vendor/llvm/dist/test/CodeGen/R600/cttz_zero_undef.ll vendor/llvm/dist/test/CodeGen/R600/cvt_f32_ubyte.ll vendor/llvm/dist/test/CodeGen/R600/dagcombiner-bug-illegal-vec4-int-to-fp.ll vendor/llvm/dist/test/CodeGen/R600/default-fp-mode.ll vendor/llvm/dist/test/CodeGen/R600/disconnected-predset-break-bug.ll vendor/llvm/dist/test/CodeGen/R600/dot4-folding.ll vendor/llvm/dist/test/CodeGen/R600/elf.ll vendor/llvm/dist/test/CodeGen/R600/extload.ll vendor/llvm/dist/test/CodeGen/R600/extract_vector_elt_i16.ll vendor/llvm/dist/test/CodeGen/R600/fabs.ll vendor/llvm/dist/test/CodeGen/R600/fadd.ll vendor/llvm/dist/test/CodeGen/R600/fadd64.ll vendor/llvm/dist/test/CodeGen/R600/fceil.ll vendor/llvm/dist/test/CodeGen/R600/fceil64.ll vendor/llvm/dist/test/CodeGen/R600/fcmp.ll vendor/llvm/dist/test/CodeGen/R600/fcmp64.ll vendor/llvm/dist/test/CodeGen/R600/fconst64.ll vendor/llvm/dist/test/CodeGen/R600/fcopysign.f32.ll vendor/llvm/dist/test/CodeGen/R600/fcopysign.f64.ll vendor/llvm/dist/test/CodeGen/R600/fdiv.ll vendor/llvm/dist/test/CodeGen/R600/fdiv64.ll vendor/llvm/dist/test/CodeGen/R600/fetch-limits.r600.ll vendor/llvm/dist/test/CodeGen/R600/fetch-limits.r700+.ll vendor/llvm/dist/test/CodeGen/R600/ffloor.ll vendor/llvm/dist/test/CodeGen/R600/fma.ll vendor/llvm/dist/test/CodeGen/R600/fmul.ll vendor/llvm/dist/test/CodeGen/R600/fmul64.ll vendor/llvm/dist/test/CodeGen/R600/fmuladd.ll vendor/llvm/dist/test/CodeGen/R600/fnearbyint.ll vendor/llvm/dist/test/CodeGen/R600/fneg-fabs.ll vendor/llvm/dist/test/CodeGen/R600/fneg.ll vendor/llvm/dist/test/CodeGen/R600/fp16_to_fp.ll vendor/llvm/dist/test/CodeGen/R600/fp32_to_fp16.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_sint.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_uint.f64.ll vendor/llvm/dist/test/CodeGen/R600/fp_to_uint.ll vendor/llvm/dist/test/CodeGen/R600/fpext.ll vendor/llvm/dist/test/CodeGen/R600/fptrunc.ll vendor/llvm/dist/test/CodeGen/R600/fsqrt.ll vendor/llvm/dist/test/CodeGen/R600/fsub.ll vendor/llvm/dist/test/CodeGen/R600/fsub64.ll vendor/llvm/dist/test/CodeGen/R600/ftrunc.ll vendor/llvm/dist/test/CodeGen/R600/gep-address-space.ll vendor/llvm/dist/test/CodeGen/R600/gv-const-addrspace-fail.ll vendor/llvm/dist/test/CodeGen/R600/gv-const-addrspace.ll vendor/llvm/dist/test/CodeGen/R600/half.ll vendor/llvm/dist/test/CodeGen/R600/icmp64.ll vendor/llvm/dist/test/CodeGen/R600/imm.ll vendor/llvm/dist/test/CodeGen/R600/indirect-addressing-si.ll vendor/llvm/dist/test/CodeGen/R600/indirect-private-64.ll vendor/llvm/dist/test/CodeGen/R600/infinite-loop.ll vendor/llvm/dist/test/CodeGen/R600/input-mods.ll vendor/llvm/dist/test/CodeGen/R600/insert_vector_elt.ll vendor/llvm/dist/test/CodeGen/R600/kcache-fold.ll vendor/llvm/dist/test/CodeGen/R600/kernel-args.ll vendor/llvm/dist/test/CodeGen/R600/large-alloca.ll vendor/llvm/dist/test/CodeGen/R600/large-constant-initializer.ll vendor/llvm/dist/test/CodeGen/R600/lds-oqap-crash.ll vendor/llvm/dist/test/CodeGen/R600/lds-output-queue.ll vendor/llvm/dist/test/CodeGen/R600/lds-size.ll vendor/llvm/dist/test/CodeGen/R600/legalizedag-bug-expand-setcc.ll vendor/llvm/dist/test/CodeGen/R600/literals.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.abs.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.barrier.global.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.barrier.local.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfe.i32.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfe.u32.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfi.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.bfm.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.brev.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.clamp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.cube.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.cvt_f32_ubyte.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.div_fixup.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.div_fmas.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.div_scale.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.fract.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imad24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imax.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imin.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.imul24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.kill.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.legacy.rsq.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rcp.f64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rcp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rsq.clamped.f64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rsq.clamped.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.rsq.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.trig_preop.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.trunc.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umad24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umax.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umin.ll vendor/llvm/dist/test/CodeGen/R600/llvm.AMDGPU.umul24.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.fs.interp.constant.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.gather4.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.getlod.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.image.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.image.sample.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.image.sample.o.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.imageload.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.load.dword.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.resinfo.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sample-masked.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sample.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sampled.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.sendmsg.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.tbuffer.store.ll vendor/llvm/dist/test/CodeGen/R600/llvm.SI.tid.ll vendor/llvm/dist/test/CodeGen/R600/llvm.amdgpu.kilp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.amdgpu.lrp.ll vendor/llvm/dist/test/CodeGen/R600/llvm.cos.ll vendor/llvm/dist/test/CodeGen/R600/llvm.exp2.ll vendor/llvm/dist/test/CodeGen/R600/llvm.floor.ll vendor/llvm/dist/test/CodeGen/R600/llvm.log2.ll vendor/llvm/dist/test/CodeGen/R600/llvm.rint.f64.ll vendor/llvm/dist/test/CodeGen/R600/llvm.rint.ll vendor/llvm/dist/test/CodeGen/R600/llvm.round.ll vendor/llvm/dist/test/CodeGen/R600/llvm.sin.ll vendor/llvm/dist/test/CodeGen/R600/llvm.sqrt.ll vendor/llvm/dist/test/CodeGen/R600/llvm.trunc.ll vendor/llvm/dist/test/CodeGen/R600/load-i1.ll vendor/llvm/dist/test/CodeGen/R600/load-input-fold.ll vendor/llvm/dist/test/CodeGen/R600/load.ll vendor/llvm/dist/test/CodeGen/R600/load.vec.ll vendor/llvm/dist/test/CodeGen/R600/load64.ll vendor/llvm/dist/test/CodeGen/R600/local-64.ll vendor/llvm/dist/test/CodeGen/R600/local-atomics.ll vendor/llvm/dist/test/CodeGen/R600/local-atomics64.ll vendor/llvm/dist/test/CodeGen/R600/local-memory-two-objects.ll vendor/llvm/dist/test/CodeGen/R600/local-memory.ll vendor/llvm/dist/test/CodeGen/R600/loop-address.ll vendor/llvm/dist/test/CodeGen/R600/loop-idiom.ll vendor/llvm/dist/test/CodeGen/R600/lshl.ll vendor/llvm/dist/test/CodeGen/R600/lshr.ll vendor/llvm/dist/test/CodeGen/R600/mad_int24.ll vendor/llvm/dist/test/CodeGen/R600/mad_uint24.ll vendor/llvm/dist/test/CodeGen/R600/max-literals.ll vendor/llvm/dist/test/CodeGen/R600/mubuf.ll vendor/llvm/dist/test/CodeGen/R600/mul.ll vendor/llvm/dist/test/CodeGen/R600/mul_int24.ll vendor/llvm/dist/test/CodeGen/R600/mul_uint24.ll vendor/llvm/dist/test/CodeGen/R600/mulhu.ll vendor/llvm/dist/test/CodeGen/R600/no-initializer-constant-addrspace.ll vendor/llvm/dist/test/CodeGen/R600/or.ll vendor/llvm/dist/test/CodeGen/R600/packetizer.ll vendor/llvm/dist/test/CodeGen/R600/parallelandifcollapse.ll vendor/llvm/dist/test/CodeGen/R600/predicate-dp4.ll vendor/llvm/dist/test/CodeGen/R600/predicates.ll vendor/llvm/dist/test/CodeGen/R600/private-memory-atomics.ll vendor/llvm/dist/test/CodeGen/R600/private-memory-broken.ll vendor/llvm/dist/test/CodeGen/R600/private-memory.ll vendor/llvm/dist/test/CodeGen/R600/pv.ll vendor/llvm/dist/test/CodeGen/R600/r600-encoding.ll vendor/llvm/dist/test/CodeGen/R600/r600-export-fix.ll vendor/llvm/dist/test/CodeGen/R600/r600-infinite-loop-bug-while-reorganizing-vector.ll vendor/llvm/dist/test/CodeGen/R600/r600cfg.ll vendor/llvm/dist/test/CodeGen/R600/register-count-comments.ll vendor/llvm/dist/test/CodeGen/R600/reorder-stores.ll vendor/llvm/dist/test/CodeGen/R600/rotl.i64.ll vendor/llvm/dist/test/CodeGen/R600/rotl.ll vendor/llvm/dist/test/CodeGen/R600/rotr.i64.ll vendor/llvm/dist/test/CodeGen/R600/rotr.ll vendor/llvm/dist/test/CodeGen/R600/rsq.ll vendor/llvm/dist/test/CodeGen/R600/saddo.ll vendor/llvm/dist/test/CodeGen/R600/salu-to-valu.ll vendor/llvm/dist/test/CodeGen/R600/scalar_to_vector.ll vendor/llvm/dist/test/CodeGen/R600/schedule-vs-if-nested-loop-failure.ll vendor/llvm/dist/test/CodeGen/R600/sdiv.ll vendor/llvm/dist/test/CodeGen/R600/select-i1.ll vendor/llvm/dist/test/CodeGen/R600/select-vectors.ll vendor/llvm/dist/test/CodeGen/R600/select.ll vendor/llvm/dist/test/CodeGen/R600/select64.ll vendor/llvm/dist/test/CodeGen/R600/selectcc-opt.ll vendor/llvm/dist/test/CodeGen/R600/selectcc.ll vendor/llvm/dist/test/CodeGen/R600/set-dx10.ll vendor/llvm/dist/test/CodeGen/R600/setcc-equivalent.ll vendor/llvm/dist/test/CodeGen/R600/setcc-opt.ll vendor/llvm/dist/test/CodeGen/R600/setcc.ll vendor/llvm/dist/test/CodeGen/R600/setcc64.ll vendor/llvm/dist/test/CodeGen/R600/seto.ll vendor/llvm/dist/test/CodeGen/R600/setuo.ll vendor/llvm/dist/test/CodeGen/R600/sext-in-reg.ll vendor/llvm/dist/test/CodeGen/R600/sgpr-control-flow.ll vendor/llvm/dist/test/CodeGen/R600/sgpr-copy-duplicate-operand.ll vendor/llvm/dist/test/CodeGen/R600/sgpr-copy.ll vendor/llvm/dist/test/CodeGen/R600/shared-op-cycle.ll vendor/llvm/dist/test/CodeGen/R600/shl.ll vendor/llvm/dist/test/CodeGen/R600/si-annotate-cf-assertion.ll vendor/llvm/dist/test/CodeGen/R600/si-lod-bias.ll vendor/llvm/dist/test/CodeGen/R600/si-sgpr-spill.ll vendor/llvm/dist/test/CodeGen/R600/si-vector-hang.ll vendor/llvm/dist/test/CodeGen/R600/sign_extend.ll vendor/llvm/dist/test/CodeGen/R600/simplify-demanded-bits-build-pair.ll vendor/llvm/dist/test/CodeGen/R600/sint_to_fp.ll vendor/llvm/dist/test/CodeGen/R600/smrd.ll vendor/llvm/dist/test/CodeGen/R600/sra.ll vendor/llvm/dist/test/CodeGen/R600/srem.ll vendor/llvm/dist/test/CodeGen/R600/srl.ll vendor/llvm/dist/test/CodeGen/R600/ssubo.ll vendor/llvm/dist/test/CodeGen/R600/store-v3i32.ll vendor/llvm/dist/test/CodeGen/R600/store-v3i64.ll vendor/llvm/dist/test/CodeGen/R600/store-vector-ptrs.ll vendor/llvm/dist/test/CodeGen/R600/store.ll vendor/llvm/dist/test/CodeGen/R600/store.r600.ll vendor/llvm/dist/test/CodeGen/R600/structurize.ll vendor/llvm/dist/test/CodeGen/R600/structurize1.ll vendor/llvm/dist/test/CodeGen/R600/sub.ll vendor/llvm/dist/test/CodeGen/R600/swizzle-export.ll vendor/llvm/dist/test/CodeGen/R600/trunc-store-i1.ll vendor/llvm/dist/test/CodeGen/R600/trunc-vector-store-assertion-failure.ll vendor/llvm/dist/test/CodeGen/R600/trunc.ll vendor/llvm/dist/test/CodeGen/R600/uaddo.ll vendor/llvm/dist/test/CodeGen/R600/udiv.ll vendor/llvm/dist/test/CodeGen/R600/udivrem.ll vendor/llvm/dist/test/CodeGen/R600/udivrem64.ll vendor/llvm/dist/test/CodeGen/R600/uint_to_fp.f64.ll vendor/llvm/dist/test/CodeGen/R600/uint_to_fp.ll vendor/llvm/dist/test/CodeGen/R600/unaligned-load-store.ll vendor/llvm/dist/test/CodeGen/R600/unhandled-loop-condition-assertion.ll vendor/llvm/dist/test/CodeGen/R600/unsupported-cc.ll vendor/llvm/dist/test/CodeGen/R600/urecip.ll vendor/llvm/dist/test/CodeGen/R600/urem.ll vendor/llvm/dist/test/CodeGen/R600/usubo.ll vendor/llvm/dist/test/CodeGen/R600/v1i64-kernel-arg.ll vendor/llvm/dist/test/CodeGen/R600/v_cndmask.ll vendor/llvm/dist/test/CodeGen/R600/valu-i1.ll vendor/llvm/dist/test/CodeGen/R600/vector-alloca.ll vendor/llvm/dist/test/CodeGen/R600/vertex-fetch-encoding.ll vendor/llvm/dist/test/CodeGen/R600/vop-shrink.ll vendor/llvm/dist/test/CodeGen/R600/vselect.ll vendor/llvm/dist/test/CodeGen/R600/vselect64.ll vendor/llvm/dist/test/CodeGen/R600/vtx-fetch-branch.ll vendor/llvm/dist/test/CodeGen/R600/vtx-schedule.ll vendor/llvm/dist/test/CodeGen/R600/wait.ll vendor/llvm/dist/test/CodeGen/R600/work-item-intrinsics.ll vendor/llvm/dist/test/CodeGen/R600/wrong-transalu-pos-fix.ll vendor/llvm/dist/test/CodeGen/R600/xor.ll vendor/llvm/dist/test/CodeGen/R600/zero_extend.ll vendor/llvm/dist/test/CodeGen/SPARC/2008-10-10-InlineAsmMemoryOperand.ll vendor/llvm/dist/test/CodeGen/SPARC/inlineasm.ll vendor/llvm/dist/test/CodeGen/SPARC/mult-alt-generic-sparc.ll vendor/llvm/dist/test/CodeGen/SPARC/setjmp.ll vendor/llvm/dist/test/CodeGen/SystemZ/alias-01.ll vendor/llvm/dist/test/CodeGen/SystemZ/and-08.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-01.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-02.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-03.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-04.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-05.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-06.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-07.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-08.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-09.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-10.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-11.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-12.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-13.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-14.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-15.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-16.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-17.ll vendor/llvm/dist/test/CodeGen/SystemZ/asm-18.ll vendor/llvm/dist/test/CodeGen/SystemZ/fp-cmp-04.ll vendor/llvm/dist/test/CodeGen/SystemZ/int-cmp-44.ll vendor/llvm/dist/test/CodeGen/SystemZ/int-cmp-45.ll vendor/llvm/dist/test/CodeGen/SystemZ/memchr-02.ll vendor/llvm/dist/test/CodeGen/SystemZ/memcpy-02.ll vendor/llvm/dist/test/CodeGen/Thumb/2010-07-15-debugOrdering.ll vendor/llvm/dist/test/CodeGen/Thumb/2012-04-26-M0ISelBug.ll vendor/llvm/dist/test/CodeGen/Thumb/2014-06-10-thumb1-ldst-opt-bug.ll vendor/llvm/dist/test/CodeGen/Thumb/dyn-stackalloc.ll vendor/llvm/dist/test/CodeGen/Thumb/fastcc.ll vendor/llvm/dist/test/CodeGen/Thumb/iabs.ll vendor/llvm/dist/test/CodeGen/Thumb/inlineasm-thumb.ll vendor/llvm/dist/test/CodeGen/Thumb/large-stack.ll vendor/llvm/dist/test/CodeGen/Thumb/pop.ll vendor/llvm/dist/test/CodeGen/Thumb/thumb-ldm.ll vendor/llvm/dist/test/CodeGen/Thumb/thumb-memcpy-ldm-stm.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-08-06-SpDecBug.ll vendor/llvm/dist/test/CodeGen/Thumb2/2009-12-01-LoopIVUsers.ll vendor/llvm/dist/test/CodeGen/Thumb2/aligned-spill.ll vendor/llvm/dist/test/CodeGen/Thumb2/cortex-fp.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-cmn.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-spill-q.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-sxt_rot.ll vendor/llvm/dist/test/CodeGen/Thumb2/thumb2-uxt_rot.ll vendor/llvm/dist/test/CodeGen/X86/2007-09-06-ExtWeakAliasee.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-12-DebugInfoVLA.ll vendor/llvm/dist/test/CodeGen/X86/2009-02-26-MachineLICMBug.ll vendor/llvm/dist/test/CodeGen/X86/2009-06-05-VZextByteShort.ll vendor/llvm/dist/test/CodeGen/X86/2009-10-16-Scope.ll vendor/llvm/dist/test/CodeGen/X86/2010-01-18-DbgValue.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-01-DbgValueCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-02-11-NonTemporal.ll vendor/llvm/dist/test/CodeGen/X86/2010-04-23-mmx-movdq2q.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-05-LocalAllocEarlyClobber.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-25-DotDebugLoc.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-26-DotDebugLoc.ll vendor/llvm/dist/test/CodeGen/X86/2010-05-28-Crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-01-DeadArg-DbgInfo.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-15-FastAllocEarlyCLobber.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-25-asm-RA-crash.ll vendor/llvm/dist/test/CodeGen/X86/2010-06-28-FastAllocTiedOperand.ll vendor/llvm/dist/test/CodeGen/X86/2010-07-06-DbgCrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-08-04-StackVariable.ll vendor/llvm/dist/test/CodeGen/X86/2010-09-16-EmptyFilename.ll vendor/llvm/dist/test/CodeGen/X86/2010-09-16-asmcrash.ll vendor/llvm/dist/test/CodeGen/X86/2010-11-02-DbgParameter.ll vendor/llvm/dist/test/CodeGen/X86/2011-01-24-DbgValue-Before-Use.ll vendor/llvm/dist/test/CodeGen/X86/2011-06-14-mmx-inlineasm.ll vendor/llvm/dist/test/CodeGen/X86/2011-08-29-InitOrder.ll vendor/llvm/dist/test/CodeGen/X86/2012-01-16-mfence-nosse-flags.ll vendor/llvm/dist/test/CodeGen/X86/2012-04-26-sdglue.ll vendor/llvm/dist/test/CodeGen/X86/2012-07-15-broadcastfold.ll vendor/llvm/dist/test/CodeGen/X86/2012-10-02-DAGCycle.ll vendor/llvm/dist/test/CodeGen/X86/2012-11-30-handlemove-dbg.ll vendor/llvm/dist/test/CodeGen/X86/2012-11-30-misched-dbg.ll vendor/llvm/dist/test/CodeGen/X86/2012-11-30-regpres-dbg.ll vendor/llvm/dist/test/CodeGen/X86/2013-10-14-FastISel-incorrect-vreg.ll vendor/llvm/dist/test/CodeGen/X86/MachineBranchProb.ll vendor/llvm/dist/test/CodeGen/X86/MachineSink-DbgValue.ll vendor/llvm/dist/test/CodeGen/X86/MergeConsecutiveStores.ll vendor/llvm/dist/test/CodeGen/X86/StackColoring-dbg.ll vendor/llvm/dist/test/CodeGen/X86/SwizzleShuff.ll vendor/llvm/dist/test/CodeGen/X86/aliases.ll vendor/llvm/dist/test/CodeGen/X86/alloca-align-rounding.ll vendor/llvm/dist/test/CodeGen/X86/asm-block-labels.ll vendor/llvm/dist/test/CodeGen/X86/asm-label.ll vendor/llvm/dist/test/CodeGen/X86/atomic-load-store-wide.ll vendor/llvm/dist/test/CodeGen/X86/atomic16.ll vendor/llvm/dist/test/CodeGen/X86/atomic_add.ll vendor/llvm/dist/test/CodeGen/X86/avoid_complex_am.ll vendor/llvm/dist/test/CodeGen/X86/avx-basic.ll vendor/llvm/dist/test/CodeGen/X86/avx-intel-ocl.ll vendor/llvm/dist/test/CodeGen/X86/avx-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/avx-splat.ll vendor/llvm/dist/test/CodeGen/X86/avx.ll vendor/llvm/dist/test/CodeGen/X86/avx2-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/avx2-nontemporal.ll vendor/llvm/dist/test/CodeGen/X86/avx2-vbroadcast.ll vendor/llvm/dist/test/CodeGen/X86/avx512-arith.ll vendor/llvm/dist/test/CodeGen/X86/avx512-build-vector.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cmp.ll vendor/llvm/dist/test/CodeGen/X86/avx512-cvt.ll vendor/llvm/dist/test/CodeGen/X86/avx512-fma-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-insert-extract.ll vendor/llvm/dist/test/CodeGen/X86/avx512-intrinsics.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mask-op.ll vendor/llvm/dist/test/CodeGen/X86/avx512-mov.ll vendor/llvm/dist/test/CodeGen/X86/avx512-nontemporal.ll vendor/llvm/dist/test/CodeGen/X86/avx512-select.ll vendor/llvm/dist/test/CodeGen/X86/avx512-trunc-ext.ll vendor/llvm/dist/test/CodeGen/X86/avx512-vbroadcast.ll vendor/llvm/dist/test/CodeGen/X86/avx512-vec-cmp.ll vendor/llvm/dist/test/CodeGen/X86/block-placement.ll vendor/llvm/dist/test/CodeGen/X86/chain_order.ll vendor/llvm/dist/test/CodeGen/X86/clobber-fi0.ll vendor/llvm/dist/test/CodeGen/X86/cmov.ll vendor/llvm/dist/test/CodeGen/X86/coalescer-dce.ll vendor/llvm/dist/test/CodeGen/X86/codegen-prepare-addrmode-sext.ll vendor/llvm/dist/test/CodeGen/X86/codegen-prepare-extload.ll vendor/llvm/dist/test/CodeGen/X86/coff-comdat.ll vendor/llvm/dist/test/CodeGen/X86/coff-comdat2.ll vendor/llvm/dist/test/CodeGen/X86/coff-comdat3.ll vendor/llvm/dist/test/CodeGen/X86/combine-or.ll vendor/llvm/dist/test/CodeGen/X86/compact-unwind.ll vendor/llvm/dist/test/CodeGen/X86/constructor.ll vendor/llvm/dist/test/CodeGen/X86/crash-O0.ll vendor/llvm/dist/test/CodeGen/X86/crash.ll vendor/llvm/dist/test/CodeGen/X86/dbg-changes-codegen-branch-folding.ll vendor/llvm/dist/test/CodeGen/X86/dbg-changes-codegen.ll vendor/llvm/dist/test/CodeGen/X86/divide-by-constant.ll vendor/llvm/dist/test/CodeGen/X86/dllexport-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/dllexport.ll vendor/llvm/dist/test/CodeGen/X86/dllimport-x86_64.ll vendor/llvm/dist/test/CodeGen/X86/dllimport.ll vendor/llvm/dist/test/CodeGen/X86/dwarf-comp-dir.ll vendor/llvm/dist/test/CodeGen/X86/elf-comdat.ll vendor/llvm/dist/test/CodeGen/X86/elf-comdat2.ll vendor/llvm/dist/test/CodeGen/X86/empty-functions.ll vendor/llvm/dist/test/CodeGen/X86/exedepsfix-broadcast.ll vendor/llvm/dist/test/CodeGen/X86/extractelement-load.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-args-fail.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-branch_weights.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-cmp-branch.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-cmp-branch3.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-constpool.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-gep.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-mem.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-tls.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-x86-64.ll vendor/llvm/dist/test/CodeGen/X86/fast-isel-x86.ll vendor/llvm/dist/test/CodeGen/X86/fma_patterns.ll vendor/llvm/dist/test/CodeGen/X86/force-align-stack-alloca.ll vendor/llvm/dist/test/CodeGen/X86/fp-load-trunc.ll vendor/llvm/dist/test/CodeGen/X86/fp-trunc.ll vendor/llvm/dist/test/CodeGen/X86/frameaddr.ll vendor/llvm/dist/test/CodeGen/X86/gather-addresses.ll vendor/llvm/dist/test/CodeGen/X86/ghc-cc.ll vendor/llvm/dist/test/CodeGen/X86/ghc-cc64.ll vendor/llvm/dist/test/CodeGen/X86/global-sections.ll vendor/llvm/dist/test/CodeGen/X86/hoist-invariant-load.ll vendor/llvm/dist/test/CodeGen/X86/ident-metadata.ll vendor/llvm/dist/test/CodeGen/X86/inalloca-ctor.ll vendor/llvm/dist/test/CodeGen/X86/inalloca-invoke.ll vendor/llvm/dist/test/CodeGen/X86/inalloca-stdcall.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-flag-clobber.ll vendor/llvm/dist/test/CodeGen/X86/inline-asm-fpstack.ll vendor/llvm/dist/test/CodeGen/X86/jump_sign.ll vendor/llvm/dist/test/CodeGen/X86/jump_table_alias.ll vendor/llvm/dist/test/CodeGen/X86/jump_table_bitcast.ll vendor/llvm/dist/test/CodeGen/X86/jump_tables.ll vendor/llvm/dist/test/CodeGen/X86/lea-2.ll vendor/llvm/dist/test/CodeGen/X86/lea-3.ll vendor/llvm/dist/test/CodeGen/X86/lea-4.ll vendor/llvm/dist/test/CodeGen/X86/lea.ll vendor/llvm/dist/test/CodeGen/X86/loop-strength-reduce8.ll vendor/llvm/dist/test/CodeGen/X86/lower-bitcast.ll vendor/llvm/dist/test/CodeGen/X86/lzcnt-tzcnt.ll vendor/llvm/dist/test/CodeGen/X86/macho-comdat.ll vendor/llvm/dist/test/CodeGen/X86/mem-promote-integers.ll vendor/llvm/dist/test/CodeGen/X86/misched-copy.ll vendor/llvm/dist/test/CodeGen/X86/misched-crash.ll vendor/llvm/dist/test/CodeGen/X86/misched-matmul.ll vendor/llvm/dist/test/CodeGen/X86/movgs.ll vendor/llvm/dist/test/CodeGen/X86/movntdq-no-avx.ll vendor/llvm/dist/test/CodeGen/X86/ms-inline-asm.ll vendor/llvm/dist/test/CodeGen/X86/named-reg-alloc.ll vendor/llvm/dist/test/CodeGen/X86/named-reg-notareg.ll vendor/llvm/dist/test/CodeGen/X86/nancvt.ll vendor/llvm/dist/test/CodeGen/X86/narrow-shl-load.ll vendor/llvm/dist/test/CodeGen/X86/nonconst-static-ev.ll vendor/llvm/dist/test/CodeGen/X86/nonconst-static-iv.ll vendor/llvm/dist/test/CodeGen/X86/nontemporal.ll vendor/llvm/dist/test/CodeGen/X86/norex-subreg.ll vendor/llvm/dist/test/CodeGen/X86/null-streamer.ll vendor/llvm/dist/test/CodeGen/X86/objc-gc-module-flags.ll vendor/llvm/dist/test/CodeGen/X86/object-size.ll vendor/llvm/dist/test/CodeGen/X86/osx-private-labels.ll vendor/llvm/dist/test/CodeGen/X86/palignr.ll vendor/llvm/dist/test/CodeGen/X86/patchpoint.ll vendor/llvm/dist/test/CodeGen/X86/peep-test-2.ll vendor/llvm/dist/test/CodeGen/X86/phys_subreg_coalesce-3.ll vendor/llvm/dist/test/CodeGen/X86/pmul.ll vendor/llvm/dist/test/CodeGen/X86/pr11334.ll vendor/llvm/dist/test/CodeGen/X86/pr11468.ll vendor/llvm/dist/test/CodeGen/X86/pr12360.ll vendor/llvm/dist/test/CodeGen/X86/pr14161.ll vendor/llvm/dist/test/CodeGen/X86/pr15267.ll vendor/llvm/dist/test/CodeGen/X86/pre-ra-sched.ll vendor/llvm/dist/test/CodeGen/X86/prefixdata.ll vendor/llvm/dist/test/CodeGen/X86/ragreedy-bug.ll vendor/llvm/dist/test/CodeGen/X86/ragreedy-hoist-spill.ll vendor/llvm/dist/test/CodeGen/X86/ragreedy-last-chance-recoloring.ll vendor/llvm/dist/test/CodeGen/X86/remat-phys-dead.ll vendor/llvm/dist/test/CodeGen/X86/scev-interchange.ll vendor/llvm/dist/test/CodeGen/X86/segmented-stacks-dynamic.ll vendor/llvm/dist/test/CodeGen/X86/segmented-stacks.ll vendor/llvm/dist/test/CodeGen/X86/select.ll vendor/llvm/dist/test/CodeGen/X86/sext-i1.ll vendor/llvm/dist/test/CodeGen/X86/shrink-compare.ll vendor/llvm/dist/test/CodeGen/X86/sibcall-4.ll vendor/llvm/dist/test/CodeGen/X86/sibcall-5.ll vendor/llvm/dist/test/CodeGen/X86/sincos-opt.ll vendor/llvm/dist/test/CodeGen/X86/sink-hoist.ll vendor/llvm/dist/test/CodeGen/X86/sink-out-of-loop.ll vendor/llvm/dist/test/CodeGen/X86/small-byval-memcpy.ll vendor/llvm/dist/test/CodeGen/X86/sqrt-fastmath.ll vendor/llvm/dist/test/CodeGen/X86/sse-align-12.ll vendor/llvm/dist/test/CodeGen/X86/sse-domains.ll vendor/llvm/dist/test/CodeGen/X86/sse-minmax.ll vendor/llvm/dist/test/CodeGen/X86/sse-scalar-fp-arith.ll vendor/llvm/dist/test/CodeGen/X86/sse1.ll vendor/llvm/dist/test/CodeGen/X86/sse2-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/sse2.ll vendor/llvm/dist/test/CodeGen/X86/sse3-avx-addsub-2.ll vendor/llvm/dist/test/CodeGen/X86/sse3-avx-addsub.ll vendor/llvm/dist/test/CodeGen/X86/sse3.ll vendor/llvm/dist/test/CodeGen/X86/sse41-intrinsics-x86.ll vendor/llvm/dist/test/CodeGen/X86/sse41.ll vendor/llvm/dist/test/CodeGen/X86/sse_partial_update.ll vendor/llvm/dist/test/CodeGen/X86/stack-protector-dbginfo.ll vendor/llvm/dist/test/CodeGen/X86/stackmap-fast-isel.ll vendor/llvm/dist/test/CodeGen/X86/stackmap-liveness.ll vendor/llvm/dist/test/CodeGen/X86/stackmap-nops.ll vendor/llvm/dist/test/CodeGen/X86/stackmap.ll vendor/llvm/dist/test/CodeGen/X86/stackpointer.ll vendor/llvm/dist/test/CodeGen/X86/store-narrow.ll vendor/llvm/dist/test/CodeGen/X86/swizzle-2.ll vendor/llvm/dist/test/CodeGen/X86/tailcall-returndup-void.ll vendor/llvm/dist/test/CodeGen/X86/tls-models.ll vendor/llvm/dist/test/CodeGen/X86/trunc-ext-ld-st.ll vendor/llvm/dist/test/CodeGen/X86/uint_to_fp-2.ll vendor/llvm/dist/test/CodeGen/X86/unknown-location.ll vendor/llvm/dist/test/CodeGen/X86/utf16-cfstrings.ll vendor/llvm/dist/test/CodeGen/X86/v2f32.ll vendor/llvm/dist/test/CodeGen/X86/vaargs.ll vendor/llvm/dist/test/CodeGen/X86/vastart-defs-eflags.ll vendor/llvm/dist/test/CodeGen/X86/vec_cast2.ll vendor/llvm/dist/test/CodeGen/X86/vec_ctbits.ll vendor/llvm/dist/test/CodeGen/X86/vec_extract-sse4.ll vendor/llvm/dist/test/CodeGen/X86/vec_extract.ll vendor/llvm/dist/test/CodeGen/X86/vec_fabs.ll vendor/llvm/dist/test/CodeGen/X86/vec_fneg.ll vendor/llvm/dist/test/CodeGen/X86/vec_insert-5.ll vendor/llvm/dist/test/CodeGen/X86/vec_loadsingles.ll vendor/llvm/dist/test/CodeGen/X86/vec_set-3.ll vendor/llvm/dist/test/CodeGen/X86/vec_setcc.ll vendor/llvm/dist/test/CodeGen/X86/vec_uint_to_fp.ll vendor/llvm/dist/test/CodeGen/X86/vector-idiv.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v16.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v2.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v4.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-128-v8.ll vendor/llvm/dist/test/CodeGen/X86/vector-shuffle-combining.ll vendor/llvm/dist/test/CodeGen/X86/vselect-2.ll vendor/llvm/dist/test/CodeGen/X86/vselect-minmax.ll vendor/llvm/dist/test/CodeGen/X86/vselect.ll vendor/llvm/dist/test/CodeGen/X86/vshift-4.ll vendor/llvm/dist/test/CodeGen/X86/widen_cast-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_conv-1.ll vendor/llvm/dist/test/CodeGen/X86/widen_conversions.ll vendor/llvm/dist/test/CodeGen/X86/widen_load-2.ll vendor/llvm/dist/test/CodeGen/X86/widen_shuffle-1.ll vendor/llvm/dist/test/CodeGen/X86/win64_eh.ll vendor/llvm/dist/test/CodeGen/X86/win64_vararg.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-pic-10.ll vendor/llvm/dist/test/CodeGen/X86/x86-64-tls-1.ll vendor/llvm/dist/test/CodeGen/X86/x86-setcc-int-to-fp-combine.ll vendor/llvm/dist/test/CodeGen/X86/xaluo.ll vendor/llvm/dist/test/CodeGen/XCore/atomic.ll vendor/llvm/dist/test/CodeGen/XCore/dwarf_debug.ll vendor/llvm/dist/test/CodeGen/XCore/exception.ll vendor/llvm/dist/test/DebugInfo/2009-10-16-Phi.ll vendor/llvm/dist/test/DebugInfo/2009-11-03-InsertExtractValue.ll vendor/llvm/dist/test/DebugInfo/2009-11-05-DeadGlobalVariable.ll vendor/llvm/dist/test/DebugInfo/2009-11-06-NamelessGlobalVariable.ll vendor/llvm/dist/test/DebugInfo/2009-11-10-CurrentFn.ll vendor/llvm/dist/test/DebugInfo/2010-01-05-DbgScope.ll vendor/llvm/dist/test/DebugInfo/2010-03-12-llc-crash.ll vendor/llvm/dist/test/DebugInfo/2010-03-19-DbgDeclare.ll vendor/llvm/dist/test/DebugInfo/2010-03-24-MemberFn.ll vendor/llvm/dist/test/DebugInfo/2010-03-30-InvalidDbgInfoCrash.ll vendor/llvm/dist/test/DebugInfo/2010-04-06-NestedFnDbgInfo.ll vendor/llvm/dist/test/DebugInfo/2010-04-19-FramePtr.ll vendor/llvm/dist/test/DebugInfo/2010-05-03-DisableFramePtr.ll vendor/llvm/dist/test/DebugInfo/2010-05-03-OriginDIE.ll vendor/llvm/dist/test/DebugInfo/2010-05-10-MultipleCU.ll vendor/llvm/dist/test/DebugInfo/2010-06-29-InlinedFnLocalVar.ll vendor/llvm/dist/test/DebugInfo/2010-07-19-Crash.ll vendor/llvm/dist/test/DebugInfo/2010-10-01-crash.ll vendor/llvm/dist/test/DebugInfo/AArch64/dwarfdump.ll vendor/llvm/dist/test/DebugInfo/AArch64/struct_by_value.ll vendor/llvm/dist/test/DebugInfo/ARM/PR16736.ll vendor/llvm/dist/test/DebugInfo/ARM/lowerbdgdeclare_vla.ll vendor/llvm/dist/test/DebugInfo/ARM/sectionorder.ll vendor/llvm/dist/test/DebugInfo/ARM/selectiondag-deadcode.ll vendor/llvm/dist/test/DebugInfo/ARM/tls.ll vendor/llvm/dist/test/DebugInfo/COFF/asan-module-ctor.ll vendor/llvm/dist/test/DebugInfo/COFF/asan-module-without-functions.ll vendor/llvm/dist/test/DebugInfo/COFF/asm.ll vendor/llvm/dist/test/DebugInfo/COFF/multifile.ll vendor/llvm/dist/test/DebugInfo/COFF/multifunction.ll vendor/llvm/dist/test/DebugInfo/COFF/simple.ll vendor/llvm/dist/test/DebugInfo/COFF/tail-call-without-lexical-scopes.ll vendor/llvm/dist/test/DebugInfo/Inputs/dwarfdump-inl-test.elf-x86-64 vendor/llvm/dist/test/DebugInfo/Mips/delay-slot.ll vendor/llvm/dist/test/DebugInfo/PR20038.ll vendor/llvm/dist/test/DebugInfo/PowerPC/tls-fission.ll vendor/llvm/dist/test/DebugInfo/PowerPC/tls.ll vendor/llvm/dist/test/DebugInfo/Sparc/gnu-window-save.ll vendor/llvm/dist/test/DebugInfo/SystemZ/variable-loc.ll vendor/llvm/dist/test/DebugInfo/X86/2010-04-13-PubType.ll vendor/llvm/dist/test/DebugInfo/X86/2010-08-10-DbgConstant.ll vendor/llvm/dist/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll vendor/llvm/dist/test/DebugInfo/X86/2011-12-16-BadStructRef.ll vendor/llvm/dist/test/DebugInfo/X86/DW_AT_byte_size.ll vendor/llvm/dist/test/DebugInfo/X86/DW_AT_linkage_name.ll vendor/llvm/dist/test/DebugInfo/X86/DW_AT_location-reference.ll vendor/llvm/dist/test/DebugInfo/X86/DW_AT_object_pointer.ll vendor/llvm/dist/test/DebugInfo/X86/DW_AT_specification.ll vendor/llvm/dist/test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll vendor/llvm/dist/test/DebugInfo/X86/DW_TAG_friend.ll vendor/llvm/dist/test/DebugInfo/X86/aligned_stack_var.ll vendor/llvm/dist/test/DebugInfo/X86/arange.ll vendor/llvm/dist/test/DebugInfo/X86/arguments.ll vendor/llvm/dist/test/DebugInfo/X86/array.ll vendor/llvm/dist/test/DebugInfo/X86/array2.ll vendor/llvm/dist/test/DebugInfo/X86/block-capture.ll vendor/llvm/dist/test/DebugInfo/X86/byvalstruct.ll vendor/llvm/dist/test/DebugInfo/X86/c-type-units.ll vendor/llvm/dist/test/DebugInfo/X86/coff_debug_info_type.ll vendor/llvm/dist/test/DebugInfo/X86/coff_relative_names.ll vendor/llvm/dist/test/DebugInfo/X86/concrete_out_of_line.ll vendor/llvm/dist/test/DebugInfo/X86/cu-ranges-odr.ll vendor/llvm/dist/test/DebugInfo/X86/cu-ranges.ll vendor/llvm/dist/test/DebugInfo/X86/data_member_location.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-asm.s vendor/llvm/dist/test/DebugInfo/X86/dbg-at-specficiation.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-byval-parameter.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-const-int.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-const.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-declare-arg.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-declare.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-file-name.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-i128-const.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-merge-loc-entry.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-prolog-end.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-subrange.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-const-byref.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-dag-combine.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-inlined-parameter.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-isel.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-location.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-range.ll vendor/llvm/dist/test/DebugInfo/X86/dbg-value-terminator.ll vendor/llvm/dist/test/DebugInfo/X86/dbg_value_direct.ll vendor/llvm/dist/test/DebugInfo/X86/debug-dead-local-var.ll vendor/llvm/dist/test/DebugInfo/X86/debug-info-block-captured-self.ll vendor/llvm/dist/test/DebugInfo/X86/debug-info-blocks.ll vendor/llvm/dist/test/DebugInfo/X86/debug-info-static-member.ll vendor/llvm/dist/test/DebugInfo/X86/debug-loc-asan.ll vendor/llvm/dist/test/DebugInfo/X86/debug-loc-offset.ll vendor/llvm/dist/test/DebugInfo/X86/debug-ranges-offset.ll vendor/llvm/dist/test/DebugInfo/X86/debug_frame.ll vendor/llvm/dist/test/DebugInfo/X86/decl-derived-member.ll vendor/llvm/dist/test/DebugInfo/X86/discriminator.ll vendor/llvm/dist/test/DebugInfo/X86/dwarf-aranges-no-dwarf-labels.ll vendor/llvm/dist/test/DebugInfo/X86/dwarf-aranges.ll vendor/llvm/dist/test/DebugInfo/X86/dwarf-public-names.ll vendor/llvm/dist/test/DebugInfo/X86/dwarf-pubnames-split.ll vendor/llvm/dist/test/DebugInfo/X86/earlydup-crash.ll vendor/llvm/dist/test/DebugInfo/X86/elf-names.ll vendor/llvm/dist/test/DebugInfo/X86/empty-and-one-elem-array.ll vendor/llvm/dist/test/DebugInfo/X86/empty-array.ll vendor/llvm/dist/test/DebugInfo/X86/ending-run.ll vendor/llvm/dist/test/DebugInfo/X86/enum-class.ll vendor/llvm/dist/test/DebugInfo/X86/enum-fwd-decl.ll vendor/llvm/dist/test/DebugInfo/X86/fission-cu.ll vendor/llvm/dist/test/DebugInfo/X86/fission-hash.ll vendor/llvm/dist/test/DebugInfo/X86/fission-ranges.ll vendor/llvm/dist/test/DebugInfo/X86/formal_parameter.ll vendor/llvm/dist/test/DebugInfo/X86/generate-odr-hash.ll vendor/llvm/dist/test/DebugInfo/X86/gnu-public-names-empty.ll vendor/llvm/dist/test/DebugInfo/X86/gnu-public-names.ll vendor/llvm/dist/test/DebugInfo/X86/inline-member-function.ll vendor/llvm/dist/test/DebugInfo/X86/inline-seldag-test.ll vendor/llvm/dist/test/DebugInfo/X86/instcombine-instrinsics.ll vendor/llvm/dist/test/DebugInfo/X86/lexical_block.ll vendor/llvm/dist/test/DebugInfo/X86/line-info.ll vendor/llvm/dist/test/DebugInfo/X86/linkage-name.ll vendor/llvm/dist/test/DebugInfo/X86/low-pc-cu.ll vendor/llvm/dist/test/DebugInfo/X86/misched-dbg-value.ll vendor/llvm/dist/test/DebugInfo/X86/multiple-aranges.ll vendor/llvm/dist/test/DebugInfo/X86/multiple-at-const-val.ll vendor/llvm/dist/test/DebugInfo/X86/nondefault-subrange-array.ll vendor/llvm/dist/test/DebugInfo/X86/objc-fwd-decl.ll vendor/llvm/dist/test/DebugInfo/X86/objc-property-void.ll vendor/llvm/dist/test/DebugInfo/X86/op_deref.ll vendor/llvm/dist/test/DebugInfo/X86/parameters.ll vendor/llvm/dist/test/DebugInfo/X86/pointer-type-size.ll vendor/llvm/dist/test/DebugInfo/X86/pr11300.ll vendor/llvm/dist/test/DebugInfo/X86/pr12831.ll vendor/llvm/dist/test/DebugInfo/X86/pr13303.ll vendor/llvm/dist/test/DebugInfo/X86/pr19307.ll vendor/llvm/dist/test/DebugInfo/X86/prologue-stack.ll vendor/llvm/dist/test/DebugInfo/X86/ref_addr_relocation.ll vendor/llvm/dist/test/DebugInfo/X86/reference-argument.ll vendor/llvm/dist/test/DebugInfo/X86/rvalue-ref.ll vendor/llvm/dist/test/DebugInfo/X86/sret.ll vendor/llvm/dist/test/DebugInfo/X86/stmt-list-multiple-compile-units.ll vendor/llvm/dist/test/DebugInfo/X86/stmt-list.ll vendor/llvm/dist/test/DebugInfo/X86/stringpool.ll vendor/llvm/dist/test/DebugInfo/X86/struct-loc.ll vendor/llvm/dist/test/DebugInfo/X86/subrange-type.ll vendor/llvm/dist/test/DebugInfo/X86/subreg.ll vendor/llvm/dist/test/DebugInfo/X86/subregisters.ll vendor/llvm/dist/test/DebugInfo/X86/template.ll vendor/llvm/dist/test/DebugInfo/X86/tls.ll vendor/llvm/dist/test/DebugInfo/X86/type_units_with_addresses.ll vendor/llvm/dist/test/DebugInfo/X86/union-template.ll vendor/llvm/dist/test/DebugInfo/X86/vector.ll vendor/llvm/dist/test/DebugInfo/X86/vla.ll vendor/llvm/dist/test/DebugInfo/array.ll vendor/llvm/dist/test/DebugInfo/bug_null_debuginfo.ll vendor/llvm/dist/test/DebugInfo/constant-pointers.ll vendor/llvm/dist/test/DebugInfo/cross-cu-inlining.ll vendor/llvm/dist/test/DebugInfo/cross-cu-linkonce.ll vendor/llvm/dist/test/DebugInfo/cu-range-hole.ll vendor/llvm/dist/test/DebugInfo/cu-ranges.ll vendor/llvm/dist/test/DebugInfo/dead-argument-order.ll vendor/llvm/dist/test/DebugInfo/debug-info-qualifiers.ll vendor/llvm/dist/test/DebugInfo/debuginfofinder-multiple-cu.ll vendor/llvm/dist/test/DebugInfo/dwarf-public-names.ll vendor/llvm/dist/test/DebugInfo/dwarfdump-ranges.test vendor/llvm/dist/test/DebugInfo/empty.ll vendor/llvm/dist/test/DebugInfo/enum.ll vendor/llvm/dist/test/DebugInfo/global.ll vendor/llvm/dist/test/DebugInfo/incorrect-variable-debugloc.ll vendor/llvm/dist/test/DebugInfo/inheritance.ll vendor/llvm/dist/test/DebugInfo/inline-debug-info-multiret.ll vendor/llvm/dist/test/DebugInfo/inline-debug-info.ll vendor/llvm/dist/test/DebugInfo/inline-no-debug-info.ll vendor/llvm/dist/test/DebugInfo/inline-scopes.ll vendor/llvm/dist/test/DebugInfo/inlined-arguments.ll vendor/llvm/dist/test/DebugInfo/inlined-vars.ll vendor/llvm/dist/test/DebugInfo/llvm-symbolizer.test vendor/llvm/dist/test/DebugInfo/lto-comp-dir.ll vendor/llvm/dist/test/DebugInfo/member-order.ll vendor/llvm/dist/test/DebugInfo/member-pointers.ll vendor/llvm/dist/test/DebugInfo/missing-abstract-variable.ll vendor/llvm/dist/test/DebugInfo/namespace.ll vendor/llvm/dist/test/DebugInfo/namespace_function_definition.ll vendor/llvm/dist/test/DebugInfo/namespace_inline_function_definition.ll vendor/llvm/dist/test/DebugInfo/restrict.ll vendor/llvm/dist/test/DebugInfo/sugared-constants.ll vendor/llvm/dist/test/DebugInfo/template-recursive-void.ll vendor/llvm/dist/test/DebugInfo/tu-composite.ll vendor/llvm/dist/test/DebugInfo/tu-member-pointer.ll vendor/llvm/dist/test/DebugInfo/two-cus-from-same-file.ll vendor/llvm/dist/test/DebugInfo/typedef.ll vendor/llvm/dist/test/DebugInfo/unconditional-branch.ll vendor/llvm/dist/test/DebugInfo/varargs.ll vendor/llvm/dist/test/DebugInfo/version.ll vendor/llvm/dist/test/ExecutionEngine/2002-12-16-ArgTest.ll vendor/llvm/dist/test/ExecutionEngine/2003-01-04-ArgumentBug.ll vendor/llvm/dist/test/ExecutionEngine/2003-01-04-LoopTest.ll vendor/llvm/dist/test/ExecutionEngine/2003-01-15-AlignmentTest.ll vendor/llvm/dist/test/ExecutionEngine/2003-05-06-LivenessClobber.ll vendor/llvm/dist/test/ExecutionEngine/2003-05-07-ArgumentTest.ll vendor/llvm/dist/test/ExecutionEngine/2003-08-15-AllocaAssertion.ll vendor/llvm/dist/test/ExecutionEngine/2003-08-21-EnvironmentTest.ll vendor/llvm/dist/test/ExecutionEngine/2003-08-23-RegisterAllocatePhysReg.ll vendor/llvm/dist/test/ExecutionEngine/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll vendor/llvm/dist/test/ExecutionEngine/2005-12-02-TailCallBug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2002-12-16-ArgTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-01-04-ArgumentBug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-01-04-LoopTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-01-04-PhiTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-01-09-SARTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-01-10-FUCOM.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-01-15-AlignmentTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-05-06-LivenessClobber.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-05-07-ArgumentTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-05-11-PHIRegAllocBug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-06-04-bzip2-bug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-06-05-PHIBug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-08-15-AllocaAssertion.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-08-21-EnvironmentTest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-08-23-RegisterAllocatePhysReg.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2003-10-18-PHINode-ConstantExpr-CondCode-Failure.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2005-12-02-TailCallBug.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2007-12-10-APIntLoadStore.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2008-06-05-APInt-OverAShr.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2010-01-15-UndefValue.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/2013-04-04-RelocAddend.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/cross-module-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/cross-module-sm-pic-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/eh-lg-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/eh-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/eh.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/fpbitcast.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/hello-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/hello.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/hello2.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/load-object-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/multi-module-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/multi-module-eh-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/multi-module-sm-pic-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/non-extern-addend.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/pr13727.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/cross-module-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/cross-module-sm-pic-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/multi-module-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/multi-module-sm-pic-a.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/simpletest-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/stubs-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/stubs-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-common-symbols-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-data-align-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-fp-no-external-funcs-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-global-init-nonzero-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-remote.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/remote/test-ptr-reloc-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/simplesttest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/simpletest.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/stubs-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/stubs.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-arith.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-branch.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-call-no-external-funcs.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-call.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-cast.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-common-symbols-alignment.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-common-symbols.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-constantexpr.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-data-align.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-fp-no-external-funcs.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-fp.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-global-ctors.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-global-init-nonzero-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-global-init-nonzero.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-global.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-loadstore.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-local.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-logical.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-loop.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-phi.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-ptr-reloc-sm-pic.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-ptr-reloc.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-ret.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-return.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-setcond-fp.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-setcond-int.ll vendor/llvm/dist/test/ExecutionEngine/MCJIT/test-shift.ll vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/ARM/MachO_ARM_PIC_relocations.s vendor/llvm/dist/test/ExecutionEngine/RuntimeDyld/X86/MachO_x86-64_PIC_relocations.s vendor/llvm/dist/test/ExecutionEngine/hello.ll vendor/llvm/dist/test/ExecutionEngine/hello2.ll vendor/llvm/dist/test/ExecutionEngine/mov64zext32.ll vendor/llvm/dist/test/ExecutionEngine/simpletest.ll vendor/llvm/dist/test/ExecutionEngine/stubs.ll vendor/llvm/dist/test/ExecutionEngine/test-call-no-external-funcs.ll vendor/llvm/dist/test/ExecutionEngine/test-call.ll vendor/llvm/dist/test/ExecutionEngine/test-common-symbols.ll vendor/llvm/dist/test/ExecutionEngine/test-fp-no-external-funcs.ll vendor/llvm/dist/test/ExecutionEngine/test-fp.ll vendor/llvm/dist/test/ExecutionEngine/test-global-init-nonzero.ll vendor/llvm/dist/test/ExecutionEngine/test-global.ll vendor/llvm/dist/test/ExecutionEngine/test-loadstore.ll vendor/llvm/dist/test/ExecutionEngine/test-local.ll vendor/llvm/dist/test/Feature/NamedMDNode.ll vendor/llvm/dist/test/Feature/NamedMDNode2.ll vendor/llvm/dist/test/Feature/aliases.ll vendor/llvm/dist/test/Feature/callingconventions.ll vendor/llvm/dist/test/Feature/comdat.ll vendor/llvm/dist/test/Feature/md_on_instruction.ll vendor/llvm/dist/test/Feature/metadata.ll vendor/llvm/dist/test/Feature/optnone-llc.ll vendor/llvm/dist/test/Feature/weak_constant.ll vendor/llvm/dist/test/FileCheck/validate-check-prefix.txt vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_mov.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_mov.s vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_mov_no_instrumentation.s vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/asm_swap_intel.s vendor/llvm/dist/test/Instrumentation/AddressSanitizer/X86/bug_11395.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/basic.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/debug_info.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/do-not-touch-comdat-global.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/global_metadata.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/instrument_global.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/instrument_initializer_metadata.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/stack_layout.ll vendor/llvm/dist/test/Instrumentation/AddressSanitizer/ubsan.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/abilist.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/args-unreachable-bb.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/arith.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/call.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/debug-nonzero-labels.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/load.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/memset.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/prefix-rename.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/store.ll vendor/llvm/dist/test/Instrumentation/DataFlowSanitizer/union.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/missing_origin.ll vendor/llvm/dist/test/Instrumentation/MemorySanitizer/store-origin.ll vendor/llvm/dist/test/Instrumentation/ThreadSanitizer/read_from_global.ll vendor/llvm/dist/test/Instrumentation/ThreadSanitizer/vptr_read.ll vendor/llvm/dist/test/Instrumentation/ThreadSanitizer/vptr_update.ll vendor/llvm/dist/test/JitListener/lit.local.cfg vendor/llvm/dist/test/LTO/cfi_endproc.ll vendor/llvm/dist/test/LTO/jump-table-type.ll vendor/llvm/dist/test/LTO/linkonce_odr_func.ll vendor/llvm/dist/test/Linker/2003-01-30-LinkerRename.ll vendor/llvm/dist/test/Linker/2003-05-31-LinkerRename.ll vendor/llvm/dist/test/Linker/2008-03-05-AliasReference.ll vendor/llvm/dist/test/Linker/2009-09-03-mdnode.ll vendor/llvm/dist/test/Linker/2009-09-03-mdnode2.ll vendor/llvm/dist/test/Linker/2011-08-04-DebugLoc.ll vendor/llvm/dist/test/Linker/2011-08-04-DebugLoc2.ll vendor/llvm/dist/test/Linker/2011-08-04-Metadata.ll vendor/llvm/dist/test/Linker/2011-08-04-Metadata2.ll vendor/llvm/dist/test/Linker/2011-08-18-unique-class-type.ll vendor/llvm/dist/test/Linker/2011-08-18-unique-class-type2.ll vendor/llvm/dist/test/Linker/2011-08-18-unique-debug-type.ll vendor/llvm/dist/test/Linker/2011-08-18-unique-debug-type2.ll vendor/llvm/dist/test/Linker/2011-08-22-ResolveAlias.ll vendor/llvm/dist/test/Linker/2011-08-22-ResolveAlias2.ll vendor/llvm/dist/test/Linker/DbgDeclare.ll vendor/llvm/dist/test/Linker/DbgDeclare2.ll vendor/llvm/dist/test/Linker/Inputs/comdat.ll vendor/llvm/dist/test/Linker/Inputs/comdat2.ll vendor/llvm/dist/test/Linker/Inputs/comdat3.ll vendor/llvm/dist/test/Linker/Inputs/comdat4.ll vendor/llvm/dist/test/Linker/Inputs/comdat5.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-inheritance-a.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-inheritance-b.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-simple2-a.ll vendor/llvm/dist/test/Linker/Inputs/type-unique-simple2-b.ll vendor/llvm/dist/test/Linker/comdat.ll vendor/llvm/dist/test/Linker/comdat2.ll vendor/llvm/dist/test/Linker/comdat3.ll vendor/llvm/dist/test/Linker/comdat4.ll vendor/llvm/dist/test/Linker/comdat5.ll vendor/llvm/dist/test/Linker/comdat6.ll vendor/llvm/dist/test/Linker/comdat7.ll vendor/llvm/dist/test/Linker/comdat8.ll vendor/llvm/dist/test/Linker/debug-info-version-a.ll vendor/llvm/dist/test/Linker/debug-info-version-b.ll vendor/llvm/dist/test/Linker/global_ctors.ll vendor/llvm/dist/test/Linker/linkmdnode.ll vendor/llvm/dist/test/Linker/linkmdnode2.ll vendor/llvm/dist/test/Linker/linknamedmdnode.ll vendor/llvm/dist/test/Linker/linknamedmdnode2.ll vendor/llvm/dist/test/Linker/metadata-a.ll vendor/llvm/dist/test/Linker/metadata-b.ll vendor/llvm/dist/test/Linker/module-flags-1-a.ll vendor/llvm/dist/test/Linker/module-flags-1-b.ll vendor/llvm/dist/test/Linker/module-flags-2-a.ll vendor/llvm/dist/test/Linker/module-flags-2-b.ll vendor/llvm/dist/test/Linker/module-flags-3-a.ll vendor/llvm/dist/test/Linker/module-flags-3-b.ll vendor/llvm/dist/test/Linker/module-flags-4-a.ll vendor/llvm/dist/test/Linker/module-flags-4-b.ll vendor/llvm/dist/test/Linker/module-flags-5-a.ll vendor/llvm/dist/test/Linker/module-flags-5-b.ll vendor/llvm/dist/test/Linker/module-flags-6-a.ll vendor/llvm/dist/test/Linker/module-flags-6-b.ll vendor/llvm/dist/test/Linker/module-flags-7-a.ll vendor/llvm/dist/test/Linker/module-flags-7-b.ll vendor/llvm/dist/test/Linker/module-flags-8-a.ll vendor/llvm/dist/test/Linker/module-flags-8-b.ll vendor/llvm/dist/test/Linker/redefinition.ll vendor/llvm/dist/test/Linker/targettriple.ll vendor/llvm/dist/test/Linker/type-unique-odr-a.ll vendor/llvm/dist/test/Linker/type-unique-odr-b.ll vendor/llvm/dist/test/Linker/type-unique-simple-a.ll vendor/llvm/dist/test/Linker/type-unique-simple-b.ll vendor/llvm/dist/test/Linker/type-unique-simple2-a.ll vendor/llvm/dist/test/Linker/type-unique-simple2-b.ll vendor/llvm/dist/test/Linker/unnamed-addr1-b.ll vendor/llvm/dist/test/Linker/weakextern.ll vendor/llvm/dist/test/MC/AArch64/adrp-relocation.s vendor/llvm/dist/test/MC/AArch64/arm64-be-datalayout.s vendor/llvm/dist/test/MC/AArch64/arm64-elf-relocs.s vendor/llvm/dist/test/MC/AArch64/arm64-system-encoding.s vendor/llvm/dist/test/MC/AArch64/arm64-tls-relocs.s vendor/llvm/dist/test/MC/AArch64/basic-a64-diagnostics.s vendor/llvm/dist/test/MC/AArch64/basic-a64-instructions.s vendor/llvm/dist/test/MC/AArch64/inline-asm-modifiers.s vendor/llvm/dist/test/MC/AArch64/tls-relocs.s vendor/llvm/dist/test/MC/ARM/arm_instructions.s vendor/llvm/dist/test/MC/ARM/basic-arm-instructions.s vendor/llvm/dist/test/MC/ARM/coff-debugging-secrel.ll vendor/llvm/dist/test/MC/ARM/coff-file.s vendor/llvm/dist/test/MC/ARM/diagnostics.s vendor/llvm/dist/test/MC/ARM/directive-arch-iwmmxt.s vendor/llvm/dist/test/MC/ARM/directive-arch-iwmmxt2.s vendor/llvm/dist/test/MC/ARM/directive-arch_extension-crc.s vendor/llvm/dist/test/MC/ARM/directive-arch_extension-fp.s vendor/llvm/dist/test/MC/ARM/directive-arch_extension-idiv.s vendor/llvm/dist/test/MC/ARM/directive-arch_extension-simd.s vendor/llvm/dist/test/MC/ARM/directive-cpu.s vendor/llvm/dist/test/MC/ARM/directive-eabi_attribute-diagnostics.s vendor/llvm/dist/test/MC/ARM/directive-eabi_attribute-overwrite.s vendor/llvm/dist/test/MC/ARM/directive-eabi_attribute.s vendor/llvm/dist/test/MC/ARM/dwarf-asm-multiple-sections.s vendor/llvm/dist/test/MC/ARM/ldr-pseudo-parse-errors.s vendor/llvm/dist/test/MC/ARM/neon-bitwise-encoding.s vendor/llvm/dist/test/MC/ARM/symbol-variants.s vendor/llvm/dist/test/MC/ARM/thumb-diagnostics.s vendor/llvm/dist/test/MC/ARM/thumb2-mclass.s vendor/llvm/dist/test/MC/ARM/v8_IT_manual.s vendor/llvm/dist/test/MC/ARM/vfp4.s vendor/llvm/dist/test/MC/ARM/vorr-vbic-illegal-cases.s vendor/llvm/dist/test/MC/AsmParser/directive_set.s vendor/llvm/dist/test/MC/AsmParser/macros-darwin-vararg.s vendor/llvm/dist/test/MC/COFF/alias.s vendor/llvm/dist/test/MC/COFF/basic-coff-64.s vendor/llvm/dist/test/MC/COFF/basic-coff.s vendor/llvm/dist/test/MC/COFF/bss_section.ll vendor/llvm/dist/test/MC/COFF/comm.ll vendor/llvm/dist/test/MC/COFF/comm.s vendor/llvm/dist/test/MC/COFF/feat00.s vendor/llvm/dist/test/MC/COFF/file.s vendor/llvm/dist/test/MC/COFF/ir-to-imgrel.ll vendor/llvm/dist/test/MC/COFF/linker-options.ll vendor/llvm/dist/test/MC/COFF/secidx.s vendor/llvm/dist/test/MC/COFF/section-invalid-flags.s vendor/llvm/dist/test/MC/COFF/section-name-encoding.s vendor/llvm/dist/test/MC/COFF/seh-section.s vendor/llvm/dist/test/MC/COFF/simple-fixups.s vendor/llvm/dist/test/MC/COFF/symbol-fragment-offset-64.s vendor/llvm/dist/test/MC/COFF/symbol-fragment-offset.s vendor/llvm/dist/test/MC/COFF/weak.s vendor/llvm/dist/test/MC/Disassembler/ARM/arm-tests.txt vendor/llvm/dist/test/MC/Disassembler/ARM/basic-arm-instructions.txt vendor/llvm/dist/test/MC/Disassembler/ARM/thumb-MSR-MClass.txt vendor/llvm/dist/test/MC/Disassembler/ARM/thumb-tests.txt vendor/llvm/dist/test/MC/Disassembler/Mips/micromips.txt vendor/llvm/dist/test/MC/Disassembler/Mips/micromips_le.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2.txt vendor/llvm/dist/test/MC/Disassembler/Mips/mips32r2_le.txt vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookII.txt vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-bookIII.txt vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding-ext.txt vendor/llvm/dist/test/MC/Disassembler/PowerPC/ppc64-encoding.txt vendor/llvm/dist/test/MC/Disassembler/X86/avx-512.txt vendor/llvm/dist/test/MC/Disassembler/X86/intel-syntax-32.txt vendor/llvm/dist/test/MC/Disassembler/X86/intel-syntax.txt vendor/llvm/dist/test/MC/Disassembler/X86/moffs.txt vendor/llvm/dist/test/MC/Disassembler/X86/prefixes.txt vendor/llvm/dist/test/MC/Disassembler/X86/simple-tests.txt vendor/llvm/dist/test/MC/Disassembler/X86/x86-32.txt vendor/llvm/dist/test/MC/Disassembler/X86/x86-64.txt vendor/llvm/dist/test/MC/ELF/alias.s vendor/llvm/dist/test/MC/ELF/cfi-version.ll vendor/llvm/dist/test/MC/ELF/comdat.s vendor/llvm/dist/test/MC/MachO/AArch64/darwin-ARM64-reloc.s vendor/llvm/dist/test/MC/MachO/ARM/aliased-symbols.s vendor/llvm/dist/test/MC/MachO/ARM/darwin-ARM-reloc.s vendor/llvm/dist/test/MC/MachO/ARM/ios-version-min-load-command.s vendor/llvm/dist/test/MC/MachO/ARM/static-movt-relocs.s vendor/llvm/dist/test/MC/MachO/absolute.s vendor/llvm/dist/test/MC/MachO/absolutize.s vendor/llvm/dist/test/MC/MachO/comm-1.s vendor/llvm/dist/test/MC/MachO/darwin-complex-difference.s vendor/llvm/dist/test/MC/MachO/darwin-x86_64-diff-reloc-assign-2.s vendor/llvm/dist/test/MC/MachO/darwin-x86_64-diff-relocs.s vendor/llvm/dist/test/MC/MachO/darwin-x86_64-reloc.s vendor/llvm/dist/test/MC/MachO/file.s vendor/llvm/dist/test/MC/MachO/gen-dwarf.s vendor/llvm/dist/test/MC/MachO/indirect-symbols.s vendor/llvm/dist/test/MC/MachO/lcomm-attributes.s vendor/llvm/dist/test/MC/MachO/linker-options.ll vendor/llvm/dist/test/MC/MachO/osx-version-min-load-command.s vendor/llvm/dist/test/MC/MachO/reloc.s vendor/llvm/dist/test/MC/MachO/section-align-2.s vendor/llvm/dist/test/MC/MachO/string-table.s vendor/llvm/dist/test/MC/MachO/symbol-diff.s vendor/llvm/dist/test/MC/MachO/symbol-flags.s vendor/llvm/dist/test/MC/MachO/symbol-indirect.s vendor/llvm/dist/test/MC/MachO/symbols-1.s vendor/llvm/dist/test/MC/MachO/tbss.s vendor/llvm/dist/test/MC/MachO/tls.s vendor/llvm/dist/test/MC/MachO/tlv-reloc.s vendor/llvm/dist/test/MC/MachO/variable-exprs.s vendor/llvm/dist/test/MC/MachO/x86_32-symbols.s vendor/llvm/dist/test/MC/MachO/x86_64-symbols.s vendor/llvm/dist/test/MC/MachO/zerofill-3.s vendor/llvm/dist/test/MC/Mips/cpload-bad.s vendor/llvm/dist/test/MC/Mips/cpload.s vendor/llvm/dist/test/MC/Mips/micromips-16-bit-instructions.s vendor/llvm/dist/test/MC/Mips/micromips-bad-branches.s vendor/llvm/dist/test/MC/Mips/micromips-branch-instructions.s vendor/llvm/dist/test/MC/Mips/micromips-control-instructions.s vendor/llvm/dist/test/MC/Mips/micromips-fpu-instructions.s vendor/llvm/dist/test/MC/Mips/micromips-jump-instructions.s vendor/llvm/dist/test/MC/Mips/micromips-loadstore-instructions.s vendor/llvm/dist/test/MC/Mips/mips-expansions-bad.s vendor/llvm/dist/test/MC/Mips/mips-expansions.s vendor/llvm/dist/test/MC/Mips/mips-noat.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips2.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips3.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips4-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips1/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips1/valid.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips3.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips32r2.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips4-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips2/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips2/valid.s vendor/llvm/dist/test/MC/Mips/mips3/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips3/valid.s vendor/llvm/dist/test/MC/Mips/mips32/invalid-mips32r2.s vendor/llvm/dist/test/MC/Mips/mips32/valid.s vendor/llvm/dist/test/MC/Mips/mips32r2/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips32r2/valid.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips1-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips1.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips2-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips2.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips32-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips32.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips4-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips4.s vendor/llvm/dist/test/MC/Mips/mips32r6/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips32r6/valid.s vendor/llvm/dist/test/MC/Mips/mips4/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips4/valid.s vendor/llvm/dist/test/MC/Mips/mips5/valid.s vendor/llvm/dist/test/MC/Mips/mips64-register-names-n32-n64.s vendor/llvm/dist/test/MC/Mips/mips64/valid.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid-xfail.s vendor/llvm/dist/test/MC/Mips/mips64r2/valid.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips1-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips1.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips2.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips3-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips32-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips4-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips4.s vendor/llvm/dist/test/MC/Mips/mips64r6/invalid-mips5-wrong-error.s vendor/llvm/dist/test/MC/Mips/mips64r6/valid.s vendor/llvm/dist/test/MC/Mips/mips_directives_bad.s vendor/llvm/dist/test/MC/Mips/nacl-mask.s vendor/llvm/dist/test/MC/Mips/octeon-instructions.s vendor/llvm/dist/test/MC/Mips/set-at-directive-explicit-at.s vendor/llvm/dist/test/MC/PowerPC/ppc-reloc.s vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-bookII.s vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-bookIII.s vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding-ext.s vendor/llvm/dist/test/MC/PowerPC/ppc64-encoding.s vendor/llvm/dist/test/MC/PowerPC/ppc64-fixup-apply.s vendor/llvm/dist/test/MC/PowerPC/ppc64-fixups.s vendor/llvm/dist/test/MC/PowerPC/vsx.s vendor/llvm/dist/test/MC/SystemZ/lit.local.cfg vendor/llvm/dist/test/MC/X86/AlignedBundling/long-nop-pad.s vendor/llvm/dist/test/MC/X86/avx512-encodings.s vendor/llvm/dist/test/MC/X86/intel-syntax-2.s vendor/llvm/dist/test/MC/X86/intel-syntax.s vendor/llvm/dist/test/MC/X86/shuffle-comments.s vendor/llvm/dist/test/MC/X86/stackmap-nops.ll vendor/llvm/dist/test/MC/X86/x86-32-coverage.s vendor/llvm/dist/test/MC/X86/x86-32-ms-inline-asm.s vendor/llvm/dist/test/MC/X86/x86_errors.s vendor/llvm/dist/test/MC/X86/x86_operands.s vendor/llvm/dist/test/Makefile vendor/llvm/dist/test/Object/ARM/macho-data-in-code.test vendor/llvm/dist/test/Object/X86/nm-ir.ll vendor/llvm/dist/test/Object/X86/objdump-disassembly-inline-relocations.test vendor/llvm/dist/test/Object/archive-error-tmp.txt vendor/llvm/dist/test/Object/archive-symtab.test vendor/llvm/dist/test/Object/archive-toc.test vendor/llvm/dist/test/Object/coff-archive-short.test vendor/llvm/dist/test/Object/coff-archive.test vendor/llvm/dist/test/Object/nm-archive.test vendor/llvm/dist/test/Object/nm-trivial-object.test vendor/llvm/dist/test/Object/nm-universal-binary.test vendor/llvm/dist/test/Object/objdump-private-headers.test vendor/llvm/dist/test/Object/objdump-relocations.test vendor/llvm/dist/test/Object/yaml2obj-elf-file-headers-with-e_flags.yaml vendor/llvm/dist/test/Object/yaml2obj-elf-symbol-visibility.yaml vendor/llvm/dist/test/Other/new-pass-manager.ll vendor/llvm/dist/test/Other/pass-pipeline-parsing.ll vendor/llvm/dist/test/TableGen/ForeachList.td vendor/llvm/dist/test/TableGen/ForeachLoop.td vendor/llvm/dist/test/TableGen/NestedForeach.td vendor/llvm/dist/test/TableGen/SiblingForeach.td vendor/llvm/dist/test/TableGen/if.td vendor/llvm/dist/test/TableGen/ifbit.td vendor/llvm/dist/test/TableGen/intrinsic-varargs.td vendor/llvm/dist/test/TableGen/list-element-bitref.td vendor/llvm/dist/test/TableGen/math.td vendor/llvm/dist/test/Transforms/AddDiscriminators/basic.ll vendor/llvm/dist/test/Transforms/AddDiscriminators/first-only.ll vendor/llvm/dist/test/Transforms/AddDiscriminators/multiple.ll vendor/llvm/dist/test/Transforms/AddDiscriminators/no-discriminators.ll vendor/llvm/dist/test/Transforms/ArgumentPromotion/dbg.ll vendor/llvm/dist/test/Transforms/ArgumentPromotion/reserve-tbaa.ll vendor/llvm/dist/test/Transforms/ArgumentPromotion/tail.ll vendor/llvm/dist/test/Transforms/BBVectorize/loop1.ll vendor/llvm/dist/test/Transforms/BBVectorize/metadata.ll vendor/llvm/dist/test/Transforms/BranchFolding/2007-10-19-InlineAsmDirectives.ll vendor/llvm/dist/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll vendor/llvm/dist/test/Transforms/DeadArgElim/dbginfo.ll vendor/llvm/dist/test/Transforms/DeadArgElim/dead_vaargs.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/2011-03-25-DSEMiscompile.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/atomic.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/const-pointers.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/inst-limits.ll vendor/llvm/dist/test/Transforms/DeadStoreElimination/no-targetdata.ll vendor/llvm/dist/test/Transforms/EarlyCSE/basic.ll vendor/llvm/dist/test/Transforms/GCOVProfiling/global-ctor.ll vendor/llvm/dist/test/Transforms/GCOVProfiling/linezero.ll vendor/llvm/dist/test/Transforms/GCOVProfiling/linkagename.ll vendor/llvm/dist/test/Transforms/GCOVProfiling/version.ll vendor/llvm/dist/test/Transforms/GVN/2009-03-10-PREOnVoid.ll vendor/llvm/dist/test/Transforms/GVN/atomic.ll vendor/llvm/dist/test/Transforms/GVN/cond_br2.ll vendor/llvm/dist/test/Transforms/GVN/condprop.ll vendor/llvm/dist/test/Transforms/GVN/edge.ll vendor/llvm/dist/test/Transforms/GVN/fpmath.ll vendor/llvm/dist/test/Transforms/GVN/invariant-load.ll vendor/llvm/dist/test/Transforms/GVN/load-pre-nonlocal.ll vendor/llvm/dist/test/Transforms/GVN/preserve-tbaa.ll vendor/llvm/dist/test/Transforms/GVN/range.ll vendor/llvm/dist/test/Transforms/GVN/tbaa.ll vendor/llvm/dist/test/Transforms/GlobalDCE/2009-01-05-DeadAliases.ll vendor/llvm/dist/test/Transforms/GlobalDCE/2009-02-17-AliasUsesAliasee.ll vendor/llvm/dist/test/Transforms/GlobalOpt/2009-02-15-ResolveAlias.ll vendor/llvm/dist/test/Transforms/GlobalOpt/2009-03-05-dbg.ll vendor/llvm/dist/test/Transforms/GlobalOpt/alias-resolve.ll vendor/llvm/dist/test/Transforms/GlobalOpt/alias-used-address-space.ll vendor/llvm/dist/test/Transforms/GlobalOpt/alias-used-section.ll vendor/llvm/dist/test/Transforms/GlobalOpt/alias-used.ll vendor/llvm/dist/test/Transforms/GlobalOpt/constantfold-initializers.ll vendor/llvm/dist/test/Transforms/GlobalOpt/externally-initialized-global-ctr.ll vendor/llvm/dist/test/Transforms/GlobalOpt/metadata.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/2011-09-10-widen-nsw.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/lftr-extend-const.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/no-iv-rewrite.ll vendor/llvm/dist/test/Transforms/IndVarSimplify/verify-scev.ll vendor/llvm/dist/test/Transforms/Inline/byval-tail-call.ll vendor/llvm/dist/test/Transforms/Inline/debug-invoke.ll vendor/llvm/dist/test/Transforms/Inline/ignore-debug-info.ll vendor/llvm/dist/test/Transforms/Inline/inline-vla.ll vendor/llvm/dist/test/Transforms/Inline/optimization-remarks.ll vendor/llvm/dist/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll vendor/llvm/dist/test/Transforms/InstCombine/2007-09-17-AliasConstFold2.ll vendor/llvm/dist/test/Transforms/InstCombine/2007-10-10-EliminateMemCpy.ll vendor/llvm/dist/test/Transforms/InstCombine/2008-05-23-CompareFold.ll vendor/llvm/dist/test/Transforms/InstCombine/2008-11-08-FCmp.ll vendor/llvm/dist/test/Transforms/InstCombine/2011-06-13-nsw-alloca.ll vendor/llvm/dist/test/Transforms/InstCombine/AddOverFlow.ll vendor/llvm/dist/test/Transforms/InstCombine/add2.ll vendor/llvm/dist/test/Transforms/InstCombine/addnegneg.ll vendor/llvm/dist/test/Transforms/InstCombine/and-compare.ll vendor/llvm/dist/test/Transforms/InstCombine/and-xor-merge.ll vendor/llvm/dist/test/Transforms/InstCombine/and2.ll vendor/llvm/dist/test/Transforms/InstCombine/apint-call-cast-target.ll vendor/llvm/dist/test/Transforms/InstCombine/apint-sub.ll vendor/llvm/dist/test/Transforms/InstCombine/atomic.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-alias-function.ll vendor/llvm/dist/test/Transforms/InstCombine/bitcast-store.ll vendor/llvm/dist/test/Transforms/InstCombine/bswap-fold.ll vendor/llvm/dist/test/Transforms/InstCombine/call-cast-target.ll vendor/llvm/dist/test/Transforms/InstCombine/canonicalize_branch.ll vendor/llvm/dist/test/Transforms/InstCombine/cast.ll vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-address-space-pointer.ll vendor/llvm/dist/test/Transforms/InstCombine/constant-fold-math.ll vendor/llvm/dist/test/Transforms/InstCombine/debug-line.ll vendor/llvm/dist/test/Transforms/InstCombine/debuginfo.ll vendor/llvm/dist/test/Transforms/InstCombine/descale-zero.ll vendor/llvm/dist/test/Transforms/InstCombine/div.ll vendor/llvm/dist/test/Transforms/InstCombine/double-float-shrink-1.ll vendor/llvm/dist/test/Transforms/InstCombine/fast-math.ll vendor/llvm/dist/test/Transforms/InstCombine/fcmp.ll vendor/llvm/dist/test/Transforms/InstCombine/float-shrink-compare.ll vendor/llvm/dist/test/Transforms/InstCombine/fmul.ll vendor/llvm/dist/test/Transforms/InstCombine/fold-phi.ll vendor/llvm/dist/test/Transforms/InstCombine/fpcast.ll vendor/llvm/dist/test/Transforms/InstCombine/getelementptr.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp-logical.ll vendor/llvm/dist/test/Transforms/InstCombine/icmp.ll vendor/llvm/dist/test/Transforms/InstCombine/intrinsics.ll vendor/llvm/dist/test/Transforms/InstCombine/load.ll vendor/llvm/dist/test/Transforms/InstCombine/malloc-free-delete.ll vendor/llvm/dist/test/Transforms/InstCombine/memcmp-1.ll vendor/llvm/dist/test/Transforms/InstCombine/memcpy_chk-1.ll vendor/llvm/dist/test/Transforms/InstCombine/mul.ll vendor/llvm/dist/test/Transforms/InstCombine/not-fcmp.ll vendor/llvm/dist/test/Transforms/InstCombine/not.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize-address-space.ll vendor/llvm/dist/test/Transforms/InstCombine/objsize.ll vendor/llvm/dist/test/Transforms/InstCombine/or-xor.ll vendor/llvm/dist/test/Transforms/InstCombine/or.ll vendor/llvm/dist/test/Transforms/InstCombine/overflow-mul.ll vendor/llvm/dist/test/Transforms/InstCombine/pr12251.ll vendor/llvm/dist/test/Transforms/InstCombine/pr12338.ll vendor/llvm/dist/test/Transforms/InstCombine/select.ll vendor/llvm/dist/test/Transforms/InstCombine/shift.ll vendor/llvm/dist/test/Transforms/InstCombine/signext.ll vendor/llvm/dist/test/Transforms/InstCombine/store.ll vendor/llvm/dist/test/Transforms/InstCombine/strcmp-1.ll vendor/llvm/dist/test/Transforms/InstCombine/strncmp-1.ll vendor/llvm/dist/test/Transforms/InstCombine/struct-assign-tbaa.ll vendor/llvm/dist/test/Transforms/InstCombine/sub-xor.ll vendor/llvm/dist/test/Transforms/InstCombine/sub.ll vendor/llvm/dist/test/Transforms/InstCombine/vec_demanded_elts.ll vendor/llvm/dist/test/Transforms/InstCombine/xor.ll vendor/llvm/dist/test/Transforms/InstCombine/xor2.ll vendor/llvm/dist/test/Transforms/InstSimplify/AndOrXor.ll vendor/llvm/dist/test/Transforms/InstSimplify/compare.ll vendor/llvm/dist/test/Transforms/InstSimplify/exact-nsw-nuw.ll vendor/llvm/dist/test/Transforms/InstSimplify/rem.ll vendor/llvm/dist/test/Transforms/InstSimplify/undef.ll vendor/llvm/dist/test/Transforms/Internalize/2009-01-05-InternalizeAliases.ll vendor/llvm/dist/test/Transforms/Internalize/local-visibility.ll vendor/llvm/dist/test/Transforms/JumpThreading/thread-loads.ll vendor/llvm/dist/test/Transforms/LCSSA/indirectbr.ll vendor/llvm/dist/test/Transforms/LICM/2011-04-06-PromoteResultOfPromotion.ll vendor/llvm/dist/test/Transforms/LICM/debug-value.ll vendor/llvm/dist/test/Transforms/LICM/hoist-invariant-load.ll vendor/llvm/dist/test/Transforms/LICM/promote-order.ll vendor/llvm/dist/test/Transforms/LICM/scalar_promote.ll vendor/llvm/dist/test/Transforms/LICM/sinking.ll vendor/llvm/dist/test/Transforms/LoopIdiom/debug-line.ll vendor/llvm/dist/test/Transforms/LoopRotate/dbgvalue.ll vendor/llvm/dist/test/Transforms/LoopRotate/simplifylatch.ll vendor/llvm/dist/test/Transforms/LoopSimplify/merge-exits.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/AArch64/lsr-memset.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/ARM/ivchain-ARM.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/pr12018.ll vendor/llvm/dist/test/Transforms/LoopStrengthReduce/pr18165.ll vendor/llvm/dist/test/Transforms/LoopUnroll/PowerPC/a2-unrolling.ll vendor/llvm/dist/test/Transforms/LoopUnroll/partial-unroll-optsize.ll vendor/llvm/dist/test/Transforms/LoopUnroll/runtime-loop.ll vendor/llvm/dist/test/Transforms/LoopUnroll/runtime-loop1.ll vendor/llvm/dist/test/Transforms/LoopUnroll/runtime-loop2.ll vendor/llvm/dist/test/Transforms/LoopUnroll/scevunroll.ll vendor/llvm/dist/test/Transforms/LoopUnroll/unroll-pragmas-disabled.ll vendor/llvm/dist/test/Transforms/LoopUnroll/unroll-pragmas.ll vendor/llvm/dist/test/Transforms/LoopVectorize/12-12-11-if-conv.ll vendor/llvm/dist/test/Transforms/LoopVectorize/2012-10-20-infloop.ll vendor/llvm/dist/test/Transforms/LoopVectorize/2012-10-22-isconsec.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/already-vectorized.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/gcc-examples.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/illegal-parallel-loop-uniform-write.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/metadata-enable.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/min-trip-count-switch.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/parallel-loops-after-reg2mem.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/parallel-loops.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/small-size.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/tripcount.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/unroll-small-loops.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/unroll_selection.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vect.omp.force.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vect.omp.force.small-tc.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vectorization-remarks-missed.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/vectorization-remarks.ll vendor/llvm/dist/test/Transforms/LoopVectorize/X86/x86_fp80-vector-store.ll vendor/llvm/dist/test/Transforms/LoopVectorize/XCore/no-vector-registers.ll vendor/llvm/dist/test/Transforms/LoopVectorize/align.ll vendor/llvm/dist/test/Transforms/LoopVectorize/bsd_regex.ll vendor/llvm/dist/test/Transforms/LoopVectorize/bzip_reverse_loops.ll vendor/llvm/dist/test/Transforms/LoopVectorize/calloc.ll vendor/llvm/dist/test/Transforms/LoopVectorize/cast-induction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/control-flow.ll vendor/llvm/dist/test/Transforms/LoopVectorize/cpp-new-array.ll vendor/llvm/dist/test/Transforms/LoopVectorize/dbg.value.ll vendor/llvm/dist/test/Transforms/LoopVectorize/debugloc.ll vendor/llvm/dist/test/Transforms/LoopVectorize/ee-crash.ll vendor/llvm/dist/test/Transforms/LoopVectorize/flags.ll vendor/llvm/dist/test/Transforms/LoopVectorize/float-reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/funcall.ll vendor/llvm/dist/test/Transforms/LoopVectorize/gcc-examples.ll vendor/llvm/dist/test/Transforms/LoopVectorize/global_alias.ll vendor/llvm/dist/test/Transforms/LoopVectorize/hoist-loads.ll vendor/llvm/dist/test/Transforms/LoopVectorize/i8-induction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-conv-crash.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-conversion-nest.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-conversion-reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-conversion.ll vendor/llvm/dist/test/Transforms/LoopVectorize/if-pred-stores.ll vendor/llvm/dist/test/Transforms/LoopVectorize/incorrect-dom-info.ll vendor/llvm/dist/test/Transforms/LoopVectorize/increment.ll vendor/llvm/dist/test/Transforms/LoopVectorize/induction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/induction_plus.ll vendor/llvm/dist/test/Transforms/LoopVectorize/intrinsic.ll vendor/llvm/dist/test/Transforms/LoopVectorize/lcssa-crash.ll vendor/llvm/dist/test/Transforms/LoopVectorize/lifetime.ll vendor/llvm/dist/test/Transforms/LoopVectorize/memdep.ll vendor/llvm/dist/test/Transforms/LoopVectorize/metadata-unroll.ll vendor/llvm/dist/test/Transforms/LoopVectorize/metadata-width.ll vendor/llvm/dist/test/Transforms/LoopVectorize/metadata.ll vendor/llvm/dist/test/Transforms/LoopVectorize/minmax_reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/multi-use-reduction-bug.ll vendor/llvm/dist/test/Transforms/LoopVectorize/multiple-address-spaces.ll vendor/llvm/dist/test/Transforms/LoopVectorize/no_array_bounds.ll vendor/llvm/dist/test/Transforms/LoopVectorize/no_idiv_reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/no_int_induction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/no_outside_user.ll vendor/llvm/dist/test/Transforms/LoopVectorize/no_switch.ll vendor/llvm/dist/test/Transforms/LoopVectorize/nofloat.ll vendor/llvm/dist/test/Transforms/LoopVectorize/non-const-n.ll vendor/llvm/dist/test/Transforms/LoopVectorize/nsw-crash.ll vendor/llvm/dist/test/Transforms/LoopVectorize/opt.ll vendor/llvm/dist/test/Transforms/LoopVectorize/ptr_loops.ll vendor/llvm/dist/test/Transforms/LoopVectorize/read-only.ll vendor/llvm/dist/test/Transforms/LoopVectorize/reduction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/reverse_induction.ll vendor/llvm/dist/test/Transforms/LoopVectorize/reverse_iter.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check-address-space.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check-readonly-address-space.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check-readonly.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-check.ll vendor/llvm/dist/test/Transforms/LoopVectorize/runtime-limit.ll vendor/llvm/dist/test/Transforms/LoopVectorize/safegep.ll vendor/llvm/dist/test/Transforms/LoopVectorize/same-base-access.ll vendor/llvm/dist/test/Transforms/LoopVectorize/scalar-select.ll vendor/llvm/dist/test/Transforms/LoopVectorize/scev-exitlim-crash.ll vendor/llvm/dist/test/Transforms/LoopVectorize/simple-unroll.ll vendor/llvm/dist/test/Transforms/LoopVectorize/small-loop.ll vendor/llvm/dist/test/Transforms/LoopVectorize/start-non-zero.ll vendor/llvm/dist/test/Transforms/LoopVectorize/store-shuffle-bug.ll vendor/llvm/dist/test/Transforms/LoopVectorize/struct_access.ll vendor/llvm/dist/test/Transforms/LoopVectorize/tbaa-nodep.ll vendor/llvm/dist/test/Transforms/LoopVectorize/undef-inst-bug.ll vendor/llvm/dist/test/Transforms/LoopVectorize/unroll_novec.ll vendor/llvm/dist/test/Transforms/LoopVectorize/value-ptr-bug.ll vendor/llvm/dist/test/Transforms/LoopVectorize/vect.omp.persistence.ll vendor/llvm/dist/test/Transforms/LoopVectorize/vect.stats.ll vendor/llvm/dist/test/Transforms/LoopVectorize/vectorize-once.ll vendor/llvm/dist/test/Transforms/LoopVectorize/version-mem-access.ll vendor/llvm/dist/test/Transforms/LoopVectorize/write-only.ll vendor/llvm/dist/test/Transforms/LowerExpectIntrinsic/basic.ll vendor/llvm/dist/test/Transforms/Mem2Reg/2007-08-27-VolatileLoadsStores.ll vendor/llvm/dist/test/Transforms/Mem2Reg/ConvertDebugInfo.ll vendor/llvm/dist/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll vendor/llvm/dist/test/Transforms/MergeFunc/call-and-invoke-with-ranges.ll vendor/llvm/dist/test/Transforms/MergeFunc/ranges.ll vendor/llvm/dist/test/Transforms/MetaRenamer/metarenamer.ll vendor/llvm/dist/test/Transforms/ObjCARC/allocas.ll vendor/llvm/dist/test/Transforms/ObjCARC/arc-annotations.ll vendor/llvm/dist/test/Transforms/ObjCARC/basic.ll vendor/llvm/dist/test/Transforms/ObjCARC/cfg-hazards.ll vendor/llvm/dist/test/Transforms/ObjCARC/contract-marker.ll vendor/llvm/dist/test/Transforms/ObjCARC/contract-storestrong.ll vendor/llvm/dist/test/Transforms/ObjCARC/contract-testcases.ll vendor/llvm/dist/test/Transforms/ObjCARC/empty-block.ll vendor/llvm/dist/test/Transforms/ObjCARC/ensure-that-exception-unwind-path-is-visited.ll vendor/llvm/dist/test/Transforms/ObjCARC/escape.ll vendor/llvm/dist/test/Transforms/ObjCARC/intrinsic-use.ll vendor/llvm/dist/test/Transforms/ObjCARC/invoke.ll vendor/llvm/dist/test/Transforms/ObjCARC/nested.ll vendor/llvm/dist/test/Transforms/ObjCARC/path-overflow.ll vendor/llvm/dist/test/Transforms/ObjCARC/retain-not-declared.ll vendor/llvm/dist/test/Transforms/ObjCARC/split-backedge.ll vendor/llvm/dist/test/Transforms/ObjCARC/weak-copies.ll vendor/llvm/dist/test/Transforms/Reassociate/2006-04-27-ReassociateVector.ll vendor/llvm/dist/test/Transforms/Reassociate/basictest.ll vendor/llvm/dist/test/Transforms/Reassociate/multistep.ll vendor/llvm/dist/test/Transforms/SCCP/ipsccp-basic.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/ARM/sroa.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/addsub.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/align.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/consecutive-access.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/crash_vectorizeTree.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/cycle_dup.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/debug_info.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/hoist.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/horizontal.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/in-tree-user.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/insert-element-build-vector.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/loopinvariant.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/metadata.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/multi_user.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/pr16899.ll vendor/llvm/dist/test/Transforms/SLPVectorizer/X86/saxpy.ll vendor/llvm/dist/test/Transforms/SROA/alignment.ll vendor/llvm/dist/test/Transforms/SROA/basictest.ll vendor/llvm/dist/test/Transforms/SROA/phi-and-select.ll vendor/llvm/dist/test/Transforms/SROA/slice-width.ll vendor/llvm/dist/test/Transforms/SROA/vector-promotion.ll vendor/llvm/dist/test/Transforms/SampleProfile/branch.ll vendor/llvm/dist/test/Transforms/SampleProfile/calls.ll vendor/llvm/dist/test/Transforms/SampleProfile/discriminator.ll vendor/llvm/dist/test/Transforms/SampleProfile/propagate.ll vendor/llvm/dist/test/Transforms/SampleProfile/syntax.ll vendor/llvm/dist/test/Transforms/ScalarRepl/debuginfo-preserved.ll vendor/llvm/dist/test/Transforms/Scalarizer/basic.ll vendor/llvm/dist/test/Transforms/Scalarizer/dbginfo.ll vendor/llvm/dist/test/Transforms/SeparateConstOffsetFromGEP/NVPTX/split-gep.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/UnreachableEliminate.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/X86/switch_to_lookup_table.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/basictest.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/branch-fold-dbg.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/hoist-dbgvalue.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/lifetime.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/preserve-branchweights-partial.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/preserve-branchweights-switch-create.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/preserve-branchweights.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/sink-common-code.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/speculate-math.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/trap-debugloc.ll vendor/llvm/dist/test/Transforms/SimplifyCFG/volatile-phioper.ll vendor/llvm/dist/test/Transforms/StripSymbols/2010-06-30-StripDebug.ll vendor/llvm/dist/test/Transforms/StripSymbols/2010-08-25-crash.ll vendor/llvm/dist/test/Transforms/StripSymbols/strip-dead-debug-info.ll vendor/llvm/dist/test/Transforms/TailCallElim/reorder_load.ll vendor/llvm/dist/test/Verifier/alias.ll vendor/llvm/dist/test/Verifier/comdat.ll vendor/llvm/dist/test/Verifier/comdat2.ll vendor/llvm/dist/test/Verifier/fpmath.ll vendor/llvm/dist/test/Verifier/ident-meta1.ll vendor/llvm/dist/test/Verifier/ident-meta2.ll vendor/llvm/dist/test/Verifier/ident-meta3.ll vendor/llvm/dist/test/Verifier/invoke.ll vendor/llvm/dist/test/Verifier/module-flags-1.ll vendor/llvm/dist/test/Verifier/musttail-valid.ll vendor/llvm/dist/test/Verifier/range-1.ll vendor/llvm/dist/test/Verifier/range-2.ll vendor/llvm/dist/test/lit.cfg vendor/llvm/dist/test/lit.site.cfg.in vendor/llvm/dist/test/tools/llvm-cov/Inputs/README vendor/llvm/dist/test/tools/llvm-cov/lit.local.cfg vendor/llvm/dist/test/tools/llvm-objdump/coff-large-bss.test vendor/llvm/dist/test/tools/llvm-profdata/c-general.test vendor/llvm/dist/test/tools/llvm-profdata/raw-two-profiles.test vendor/llvm/dist/test/tools/llvm-readobj/Inputs/file-aux-record.yaml vendor/llvm/dist/test/tools/llvm-readobj/Inputs/file-multiple-aux-records.yaml vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifile-linetables.obj.coff-2012-i368 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifile-linetables.obj.coff-2012-x86_64 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifunction-linetables.obj.coff-2012-i368 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/multifunction-linetables.obj.coff-2012-x86_64 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/relocs.obj.coff-i386 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/relocs.obj.coff-x86_64 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/relocs.obj.elf-aarch64 vendor/llvm/dist/test/tools/llvm-readobj/Inputs/relocs.obj.elf-arm vendor/llvm/dist/test/tools/llvm-readobj/Inputs/relocs.py vendor/llvm/dist/test/tools/llvm-readobj/codeview-linetables.test vendor/llvm/dist/test/tools/llvm-readobj/coff-file-sections-reading.test vendor/llvm/dist/test/tools/llvm-readobj/cxx-cli-aux.test vendor/llvm/dist/test/tools/llvm-readobj/file-headers.test vendor/llvm/dist/test/tools/llvm-readobj/peplus.test vendor/llvm/dist/test/tools/llvm-readobj/reloc-types.test vendor/llvm/dist/test/tools/llvm-readobj/relocations.test vendor/llvm/dist/test/tools/llvm-readobj/sections-ext.test vendor/llvm/dist/test/tools/llvm-readobj/symbols.test vendor/llvm/dist/tools/CMakeLists.txt vendor/llvm/dist/tools/LLVMBuild.txt vendor/llvm/dist/tools/Makefile vendor/llvm/dist/tools/bugpoint/BugDriver.cpp vendor/llvm/dist/tools/bugpoint/BugDriver.h vendor/llvm/dist/tools/bugpoint/CrashDebugger.cpp vendor/llvm/dist/tools/bugpoint/ExtractFunction.cpp vendor/llvm/dist/tools/bugpoint/ListReducer.h vendor/llvm/dist/tools/bugpoint/Miscompilation.cpp vendor/llvm/dist/tools/bugpoint/OptimizerDriver.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.cpp vendor/llvm/dist/tools/bugpoint/ToolRunner.h vendor/llvm/dist/tools/bugpoint/bugpoint.cpp vendor/llvm/dist/tools/gold/CMakeLists.txt vendor/llvm/dist/tools/gold/Makefile vendor/llvm/dist/tools/gold/gold-plugin.cpp vendor/llvm/dist/tools/llc/llc.cpp vendor/llvm/dist/tools/lli/CMakeLists.txt vendor/llvm/dist/tools/lli/ChildTarget/ChildTarget.cpp vendor/llvm/dist/tools/lli/LLVMBuild.txt vendor/llvm/dist/tools/lli/Makefile vendor/llvm/dist/tools/lli/RPCChannel.h vendor/llvm/dist/tools/lli/RemoteMemoryManager.cpp vendor/llvm/dist/tools/lli/RemoteMemoryManager.h vendor/llvm/dist/tools/lli/RemoteTarget.h vendor/llvm/dist/tools/lli/RemoteTargetExternal.h vendor/llvm/dist/tools/lli/RemoteTargetMessage.h vendor/llvm/dist/tools/lli/lli.cpp vendor/llvm/dist/tools/llvm-ar/CMakeLists.txt vendor/llvm/dist/tools/llvm-ar/llvm-ar.cpp vendor/llvm/dist/tools/llvm-as/llvm-as.cpp vendor/llvm/dist/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp vendor/llvm/dist/tools/llvm-c-test/CMakeLists.txt vendor/llvm/dist/tools/llvm-c-test/disassemble.c vendor/llvm/dist/tools/llvm-config/BuildVariables.inc.in vendor/llvm/dist/tools/llvm-config/CMakeLists.txt vendor/llvm/dist/tools/llvm-config/Makefile vendor/llvm/dist/tools/llvm-config/llvm-config.cpp vendor/llvm/dist/tools/llvm-cov/CMakeLists.txt vendor/llvm/dist/tools/llvm-cov/LLVMBuild.txt vendor/llvm/dist/tools/llvm-cov/Makefile vendor/llvm/dist/tools/llvm-cov/llvm-cov.cpp vendor/llvm/dist/tools/llvm-diff/DiffConsumer.h vendor/llvm/dist/tools/llvm-diff/DiffLog.h vendor/llvm/dist/tools/llvm-diff/DifferenceEngine.h vendor/llvm/dist/tools/llvm-diff/llvm-diff.cpp vendor/llvm/dist/tools/llvm-dis/llvm-dis.cpp vendor/llvm/dist/tools/llvm-dwarfdump/llvm-dwarfdump.cpp vendor/llvm/dist/tools/llvm-extract/llvm-extract.cpp vendor/llvm/dist/tools/llvm-jitlistener/CMakeLists.txt vendor/llvm/dist/tools/llvm-jitlistener/LLVMBuild.txt vendor/llvm/dist/tools/llvm-jitlistener/Makefile vendor/llvm/dist/tools/llvm-jitlistener/llvm-jitlistener.cpp vendor/llvm/dist/tools/llvm-link/llvm-link.cpp vendor/llvm/dist/tools/llvm-lto/llvm-lto.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.cpp vendor/llvm/dist/tools/llvm-mc/Disassembler.h vendor/llvm/dist/tools/llvm-mc/llvm-mc.cpp vendor/llvm/dist/tools/llvm-mcmarkup/llvm-mcmarkup.cpp vendor/llvm/dist/tools/llvm-nm/llvm-nm.cpp vendor/llvm/dist/tools/llvm-objdump/CMakeLists.txt vendor/llvm/dist/tools/llvm-objdump/COFFDump.cpp vendor/llvm/dist/tools/llvm-objdump/LLVMBuild.txt vendor/llvm/dist/tools/llvm-objdump/MachODump.cpp vendor/llvm/dist/tools/llvm-objdump/Makefile vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.cpp vendor/llvm/dist/tools/llvm-objdump/llvm-objdump.h vendor/llvm/dist/tools/llvm-profdata/CMakeLists.txt vendor/llvm/dist/tools/llvm-profdata/llvm-profdata.cpp vendor/llvm/dist/tools/llvm-readobj/ARMAttributeParser.cpp vendor/llvm/dist/tools/llvm-readobj/ARMAttributeParser.h vendor/llvm/dist/tools/llvm-readobj/ARMEHABIPrinter.h vendor/llvm/dist/tools/llvm-readobj/ARMWinEHPrinter.cpp vendor/llvm/dist/tools/llvm-readobj/ARMWinEHPrinter.h vendor/llvm/dist/tools/llvm-readobj/COFFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/ELFDumper.cpp vendor/llvm/dist/tools/llvm-readobj/Error.cpp vendor/llvm/dist/tools/llvm-readobj/Error.h vendor/llvm/dist/tools/llvm-readobj/MachODumper.cpp vendor/llvm/dist/tools/llvm-readobj/ObjDumper.h vendor/llvm/dist/tools/llvm-readobj/StreamWriter.h vendor/llvm/dist/tools/llvm-readobj/Win64EHDumper.h vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.cpp vendor/llvm/dist/tools/llvm-readobj/llvm-readobj.h vendor/llvm/dist/tools/llvm-rtdyld/CMakeLists.txt vendor/llvm/dist/tools/llvm-rtdyld/LLVMBuild.txt vendor/llvm/dist/tools/llvm-rtdyld/Makefile vendor/llvm/dist/tools/llvm-rtdyld/llvm-rtdyld.cpp vendor/llvm/dist/tools/llvm-size/llvm-size.cpp vendor/llvm/dist/tools/llvm-stress/llvm-stress.cpp vendor/llvm/dist/tools/llvm-symbolizer/LLVMSymbolize.cpp vendor/llvm/dist/tools/llvm-symbolizer/LLVMSymbolize.h vendor/llvm/dist/tools/llvm-symbolizer/llvm-symbolizer.cpp vendor/llvm/dist/tools/lto/CMakeLists.txt vendor/llvm/dist/tools/lto/Makefile vendor/llvm/dist/tools/lto/lto.cpp vendor/llvm/dist/tools/lto/lto.exports vendor/llvm/dist/tools/macho-dump/macho-dump.cpp vendor/llvm/dist/tools/msbuild/CMakeLists.txt vendor/llvm/dist/tools/msbuild/install.bat vendor/llvm/dist/tools/msbuild/uninstall.bat vendor/llvm/dist/tools/obj2yaml/CMakeLists.txt vendor/llvm/dist/tools/obj2yaml/Error.cpp vendor/llvm/dist/tools/obj2yaml/Error.h vendor/llvm/dist/tools/obj2yaml/Makefile vendor/llvm/dist/tools/obj2yaml/coff2yaml.cpp vendor/llvm/dist/tools/obj2yaml/elf2yaml.cpp vendor/llvm/dist/tools/obj2yaml/obj2yaml.cpp vendor/llvm/dist/tools/obj2yaml/obj2yaml.h vendor/llvm/dist/tools/opt/BreakpointPrinter.cpp vendor/llvm/dist/tools/opt/NewPMDriver.cpp vendor/llvm/dist/tools/opt/NewPMDriver.h vendor/llvm/dist/tools/opt/PassRegistry.def vendor/llvm/dist/tools/opt/Passes.cpp vendor/llvm/dist/tools/opt/Passes.h vendor/llvm/dist/tools/opt/opt.cpp vendor/llvm/dist/tools/yaml2obj/CMakeLists.txt vendor/llvm/dist/tools/yaml2obj/Makefile vendor/llvm/dist/tools/yaml2obj/yaml2coff.cpp vendor/llvm/dist/tools/yaml2obj/yaml2elf.cpp vendor/llvm/dist/tools/yaml2obj/yaml2obj.cpp vendor/llvm/dist/tools/yaml2obj/yaml2obj.h vendor/llvm/dist/unittests/ADT/APFloatTest.cpp vendor/llvm/dist/unittests/ADT/APIntTest.cpp vendor/llvm/dist/unittests/ADT/ArrayRefTest.cpp vendor/llvm/dist/unittests/ADT/CMakeLists.txt vendor/llvm/dist/unittests/ADT/DenseMapTest.cpp vendor/llvm/dist/unittests/ADT/DenseSetTest.cpp vendor/llvm/dist/unittests/ADT/MapVectorTest.cpp vendor/llvm/dist/unittests/ADT/OptionalTest.cpp vendor/llvm/dist/unittests/ADT/SmallVectorTest.cpp vendor/llvm/dist/unittests/ADT/StringMapTest.cpp vendor/llvm/dist/unittests/ADT/TinyPtrVectorTest.cpp vendor/llvm/dist/unittests/ADT/TripleTest.cpp vendor/llvm/dist/unittests/Analysis/CFGTest.cpp vendor/llvm/dist/unittests/Analysis/CMakeLists.txt vendor/llvm/dist/unittests/Analysis/LazyCallGraphTest.cpp vendor/llvm/dist/unittests/Analysis/Makefile vendor/llvm/dist/unittests/Analysis/MixedTBAATest.cpp vendor/llvm/dist/unittests/Bitcode/BitReaderTest.cpp vendor/llvm/dist/unittests/Bitcode/CMakeLists.txt vendor/llvm/dist/unittests/Bitcode/Makefile vendor/llvm/dist/unittests/CMakeLists.txt vendor/llvm/dist/unittests/CodeGen/DIEHashTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/CMakeLists.txt vendor/llvm/dist/unittests/ExecutionEngine/ExecutionEngineTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/CMakeLists.txt vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITCAPITest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITMemoryManagerTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITMultipleModuleTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITObjectCacheTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITTest.cpp vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITTestAPICommon.h vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/MCJITTestBase.h vendor/llvm/dist/unittests/ExecutionEngine/MCJIT/Makefile vendor/llvm/dist/unittests/ExecutionEngine/Makefile vendor/llvm/dist/unittests/IR/CMakeLists.txt vendor/llvm/dist/unittests/IR/ConstantsTest.cpp vendor/llvm/dist/unittests/IR/DominatorTreeTest.cpp vendor/llvm/dist/unittests/IR/IRBuilderTest.cpp vendor/llvm/dist/unittests/IR/LegacyPassManagerTest.cpp vendor/llvm/dist/unittests/IR/MDBuilderTest.cpp vendor/llvm/dist/unittests/IR/MetadataTest.cpp vendor/llvm/dist/unittests/IR/PassManagerTest.cpp vendor/llvm/dist/unittests/IR/UserTest.cpp vendor/llvm/dist/unittests/IR/ValueMapTest.cpp vendor/llvm/dist/unittests/IR/ValueTest.cpp vendor/llvm/dist/unittests/IR/WaymarkTest.cpp vendor/llvm/dist/unittests/LineEditor/CMakeLists.txt vendor/llvm/dist/unittests/Linker/CMakeLists.txt vendor/llvm/dist/unittests/Linker/LinkModulesTest.cpp vendor/llvm/dist/unittests/Linker/Makefile vendor/llvm/dist/unittests/MC/CMakeLists.txt vendor/llvm/dist/unittests/MC/Makefile vendor/llvm/dist/unittests/MC/StringTableBuilderTest.cpp vendor/llvm/dist/unittests/Support/AllocatorTest.cpp vendor/llvm/dist/unittests/Support/CMakeLists.txt vendor/llvm/dist/unittests/Support/Casting.cpp vendor/llvm/dist/unittests/Support/CommandLineTest.cpp vendor/llvm/dist/unittests/Support/CompressionTest.cpp vendor/llvm/dist/unittests/Support/ConvertUTFTest.cpp vendor/llvm/dist/unittests/Support/ErrorOrTest.cpp vendor/llvm/dist/unittests/Support/FileOutputBufferTest.cpp vendor/llvm/dist/unittests/Support/LEB128Test.cpp vendor/llvm/dist/unittests/Support/LineIteratorTest.cpp vendor/llvm/dist/unittests/Support/LockFileManagerTest.cpp vendor/llvm/dist/unittests/Support/MD5Test.cpp vendor/llvm/dist/unittests/Support/MemoryBufferTest.cpp vendor/llvm/dist/unittests/Support/MemoryTest.cpp vendor/llvm/dist/unittests/Support/Path.cpp vendor/llvm/dist/unittests/Support/ProcessTest.cpp vendor/llvm/dist/unittests/Support/ProgramTest.cpp vendor/llvm/dist/unittests/Support/ScaledNumberTest.cpp vendor/llvm/dist/unittests/Support/SourceMgrTest.cpp vendor/llvm/dist/unittests/Support/SpecialCaseListTest.cpp vendor/llvm/dist/unittests/Support/StringPool.cpp vendor/llvm/dist/unittests/Support/ThreadLocalTest.cpp vendor/llvm/dist/unittests/Support/YAMLIOTest.cpp vendor/llvm/dist/unittests/Support/YAMLParserTest.cpp vendor/llvm/dist/unittests/Support/raw_ostream_test.cpp vendor/llvm/dist/unittests/Transforms/CMakeLists.txt vendor/llvm/dist/unittests/Transforms/Makefile vendor/llvm/dist/unittests/Transforms/Utils/Cloning.cpp vendor/llvm/dist/utils/FileCheck/FileCheck.cpp vendor/llvm/dist/utils/TableGen/AsmMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterEmitter.cpp vendor/llvm/dist/utils/TableGen/AsmWriterInst.cpp vendor/llvm/dist/utils/TableGen/AsmWriterInst.h vendor/llvm/dist/utils/TableGen/CTagsEmitter.cpp vendor/llvm/dist/utils/TableGen/CallingConvEmitter.cpp vendor/llvm/dist/utils/TableGen/CodeEmitterGen.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.cpp vendor/llvm/dist/utils/TableGen/CodeGenDAGPatterns.h vendor/llvm/dist/utils/TableGen/CodeGenInstruction.cpp vendor/llvm/dist/utils/TableGen/CodeGenInstruction.h vendor/llvm/dist/utils/TableGen/CodeGenIntrinsics.h vendor/llvm/dist/utils/TableGen/CodeGenRegisters.cpp vendor/llvm/dist/utils/TableGen/CodeGenRegisters.h vendor/llvm/dist/utils/TableGen/CodeGenSchedule.cpp vendor/llvm/dist/utils/TableGen/CodeGenSchedule.h vendor/llvm/dist/utils/TableGen/CodeGenTarget.cpp vendor/llvm/dist/utils/TableGen/CodeGenTarget.h vendor/llvm/dist/utils/TableGen/DAGISelEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcher.h vendor/llvm/dist/utils/TableGen/DAGISelMatcherEmitter.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherGen.cpp vendor/llvm/dist/utils/TableGen/DAGISelMatcherOpt.cpp vendor/llvm/dist/utils/TableGen/FastISelEmitter.cpp vendor/llvm/dist/utils/TableGen/FixedLenDecoderEmitter.cpp vendor/llvm/dist/utils/TableGen/InstrInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/IntrinsicEmitter.cpp vendor/llvm/dist/utils/TableGen/PseudoLoweringEmitter.cpp vendor/llvm/dist/utils/TableGen/RegisterInfoEmitter.cpp vendor/llvm/dist/utils/TableGen/SequenceToOffsetTable.h vendor/llvm/dist/utils/TableGen/SubtargetEmitter.cpp vendor/llvm/dist/utils/TableGen/TableGen.cpp vendor/llvm/dist/utils/TableGen/TableGenBackends.h vendor/llvm/dist/utils/TableGen/X86DisassemblerShared.h vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.cpp vendor/llvm/dist/utils/TableGen/X86DisassemblerTables.h vendor/llvm/dist/utils/TableGen/X86ModRMFilters.h vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.cpp vendor/llvm/dist/utils/TableGen/X86RecognizableInstr.h vendor/llvm/dist/utils/emacs/emacs.el vendor/llvm/dist/utils/emacs/llvm-mode.el vendor/llvm/dist/utils/emacs/tablegen-mode.el vendor/llvm/dist/utils/findmisopt vendor/llvm/dist/utils/git-svn/git-svnrevert vendor/llvm/dist/utils/lit/lit/ProgressBar.py vendor/llvm/dist/utils/lit/lit/Test.py vendor/llvm/dist/utils/lit/lit/TestRunner.py vendor/llvm/dist/utils/lit/lit/TestingConfig.py vendor/llvm/dist/utils/lit/lit/__init__.py vendor/llvm/dist/utils/lit/lit/discovery.py vendor/llvm/dist/utils/lit/lit/formats/googletest.py vendor/llvm/dist/utils/lit/lit/main.py vendor/llvm/dist/utils/lit/lit/util.py vendor/llvm/dist/utils/lit/tests/test-output.py vendor/llvm/dist/utils/lldbDataFormatters.py vendor/llvm/dist/utils/llvm-build/llvmbuild/main.py vendor/llvm/dist/utils/not/not.cpp vendor/llvm/dist/utils/release/export.sh vendor/llvm/dist/utils/release/merge.sh vendor/llvm/dist/utils/release/tag.sh vendor/llvm/dist/utils/release/test-release.sh vendor/llvm/dist/utils/valgrind/x86_64-pc-linux-gnu.supp vendor/llvm/dist/utils/vim/llvm.vim vendor/llvm/dist/utils/yaml-bench/YAMLBench.cpp Added: vendor/llvm/dist/.clang-tidy ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/.clang-tidy Sun Jan 18 16:17:27 2015 (r277323) @@ -0,0 +1 @@ +Checks: '-*,clang-diagnostic-*,llvm-*,misc-*' Modified: vendor/llvm/dist/.gitignore ============================================================================== --- vendor/llvm/dist/.gitignore Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/.gitignore Sun Jan 18 16:17:27 2015 (r277323) @@ -24,6 +24,13 @@ #==============================================================================# # Explicit files to ignore (only matches one). #==============================================================================# +# Various tag programs +/tags +/TAGS +/GPATH +/GRTAGS +/GSYMS +/GTAGS .gitusers autom4te.cache cscope.files @@ -45,7 +52,15 @@ tools/clang tools/lldb # lld, which is tracked independently. tools/lld +# llgo, which is tracked independently. +tools/llgo # Polly, which is tracked independently. tools/polly # Sphinx build tree, if building in-source dir. docs/_build + +#==============================================================================# +# Files created in tree by the Go bindings. +#==============================================================================# +bindings/go/llvm/llvm_config.go +bindings/go/llvm/workdir Modified: vendor/llvm/dist/CMakeLists.txt ============================================================================== --- vendor/llvm/dist/CMakeLists.txt Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/CMakeLists.txt Sun Jan 18 16:17:27 2015 (r277323) @@ -16,8 +16,29 @@ else() endif() endif() +if(CMAKE_VERSION VERSION_LESS 3.1.20141117) + set(cmake_3_2_USES_TERMINAL) +else() + set(cmake_3_2_USES_TERMINAL USES_TERMINAL) +endif() + project(LLVM) +# The following only works with the Ninja generator in CMake >= 3.0. +set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING + "Define the maximum number of concurrent compilation jobs.") +if(LLVM_PARALLEL_COMPILE_JOBS) + set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${LLVM_PARALLEL_COMPILE_JOBS}) + set(CMAKE_JOB_POOL_COMPILE compile_job_pool) +endif() + +set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING + "Define the maximum number of concurrent link jobs.") +if(LLVM_PARALLEL_LINK_JOBS) + set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${LLVM_PARALLEL_LINK_JOBS}) + set(CMAKE_JOB_POOL_LINK link_job_pool) +endif() + # Add path for custom modules set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} @@ -26,11 +47,11 @@ set(CMAKE_MODULE_PATH ) set(LLVM_VERSION_MAJOR 3) -set(LLVM_VERSION_MINOR 5) -set(LLVM_VERSION_PATCH 1) +set(LLVM_VERSION_MINOR 6) +set(LLVM_VERSION_PATCH 0) if (NOT PACKAGE_VERSION) - set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}svn") + set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}") endif() option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) @@ -111,9 +132,11 @@ endif() string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE) +set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) + # They are used as destination of target generators. set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) -set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib) +set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) if(WIN32 OR CYGWIN) # DLL platform -- put DLLs into bin. set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) @@ -130,7 +153,6 @@ set(LLVM_BINARY_DIR ${CMAKE_CURREN set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include) -set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) set(LLVM_ALL_TARGETS AArch64 @@ -208,6 +230,7 @@ else() option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON) endif() +option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF) option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF) option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF) option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON) @@ -301,6 +324,12 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx t option (LLVM_BUILD_EXTERNAL_COMPILER_RT "Build compiler-rt as an external project." OFF) +option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" OFF) +option(LLVM_DISABLE_LLVM_DYLIB_ATEXIT "Disable llvm-shlib's atexit destructors." ON) +if(LLVM_DISABLE_LLVM_DYLIB_ATEXIT) + set(DISABLE_LLVM_DYLIB_ATEXIT 1) +endif() + # All options referred to from HandleLLVMOptions have to be specified # BEFORE this include, otherwise options will not be correctly set on # first cmake run @@ -315,7 +344,9 @@ set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET include(HandleLLVMOptions) # Verify that we can find a Python 2 interpreter. Python 3 is unsupported. -set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5) +# FIXME: We should support systems with only Python 3, but that requires work +# on LLDB. +set(Python_ADDITIONAL_VERSIONS 2.7) include(FindPythonInterp) if( NOT PYTHONINTERP_FOUND ) message(FATAL_ERROR @@ -324,6 +355,10 @@ if( NOT PYTHONINTERP_FOUND ) Please install Python or specify the PYTHON_EXECUTABLE CMake variable.") endif() +if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 ) + message(FATAL_ERROR "Python 2.7 or newer is required") +endif() + ###### # LLVMBuild Integration # @@ -449,8 +484,8 @@ configure_file( # They are not referenced. See set_output_directory(). set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin ) -set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib ) -set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib ) +set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) +set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) if (APPLE) @@ -458,17 +493,33 @@ if (APPLE) set(CMAKE_INSTALL_RPATH "@executable_path/../lib") else(UNIX) if(NOT DEFINED CMAKE_INSTALL_RPATH) - set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib") + set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}") if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD) set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin") + set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,origin") endif() endif(NOT DEFINED CMAKE_INSTALL_RPATH) endif() +# Work around a broken bfd ld behavior. When linking a binary with a +# foo.so library, it will try to find any library that foo.so uses and +# check its symbols. This is wasteful (the check was done when foo.so +# was created) and can fail since it is not the dynamic linker and +# doesn't know how to handle search paths correctly. +if (UNIX AND NOT APPLE) + set(CMAKE_EXE_LINKER_FLAGS + "${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined") +endif() + set(CMAKE_INCLUDE_CURRENT_DIR ON) include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR}) +# when crosscompiling import the executable targets from a file +if(CMAKE_CROSSCOMPILING) + include(CrossCompile) +endif(CMAKE_CROSSCOMPILING) + if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD ) # On FreeBSD, /usr/local/* is not used by default. In order to build LLVM # with libxml2, iconv.h, etc., we must add /usr/local paths. @@ -521,6 +572,12 @@ if(LLVM_INCLUDE_TESTS) add_subdirectory(utils/unittest) endif() +foreach( binding ${LLVM_BINDINGS_LIST} ) + if( EXISTS "${LLVM_MAIN_SRC_DIR}/bindings/${binding}/CMakeLists.txt" ) + add_subdirectory(bindings/${binding}) + endif() +endforeach() + add_subdirectory(projects) if(WITH_POLLY) Modified: vendor/llvm/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/llvm/dist/CODE_OWNERS.TXT Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/CODE_OWNERS.TXT Sun Jan 18 16:17:27 2015 (r277323) @@ -6,7 +6,7 @@ what goes in or not. The list is sorted by surname and formatted to allow easy grepping and beautification by scripts. The fields are: name (N), email (E), web-address (W), PGP key ID and fingerprint (P), description (D), and snail-mail address -(S). +(S). Each entry should contain at least the (N), (E) and (D) fields. N: Joe Abbey E: jabbey@arxan.com @@ -20,6 +20,10 @@ N: Rafael Avila de Espindola E: rafael.espindola@gmail.com D: Gold plugin (tools/gold/*) +N: Justin Bogner +E: mail@justinbogner.com +D: InstrProfiling and related parts of ProfileData + N: Chandler Carruth E: chandlerc@gmail.com E: chandlerc@google.com @@ -29,43 +33,50 @@ N: Evan Cheng E: evan.cheng@apple.com D: ARM target, parts of code generator not covered by someone else -N: Renato Golin -E: renato.golin@linaro.org -D: ARM Linux support - N: Eric Christopher E: echristo@gmail.com D: Debug Information, autotools/configure/make build, inline assembly N: Greg Clayton +E: gclayton@apple.com D: LLDB +N: Marshall Clow +E: mclow.lists@gmail.com +D: libc++ + N: Peter Collingbourne -D: libclc +E: peter@pcc.me.uk +D: llgo N: Anshuman Dasgupta E: adasgupt@codeaurora.org D: Hexagon Backend +N: Duncan P. N. Exon Smith +E: dexonsmith@apple.com +D: Branch weights and BlockFrequencyInfo + N: Hal Finkel E: hfinkel@anl.gov -D: BBVectorize, the loop reroller and the PowerPC target +D: BBVectorize, the loop reroller, alias analysis and the PowerPC target + +N: Renato Golin +E: renato.golin@linaro.org +D: ARM Linux support N: Venkatraman Govindaraju E: venkatra@cs.wisc.edu D: Sparc Backend (lib/Target/Sparc/*) N: Tobias Grosser +E: tobias@grosser.es D: Polly N: James Grosbach E: grosbach@apple.com D: MC layer -N: Marshall Clow -E: mclow.lists@gmail.com -D: libc++ - N: Justin Holewinski E: jholewinski@nvidia.com D: NVPTX Target (lib/Target/NVPTX/*) @@ -99,7 +110,12 @@ N: Tim Northover E: t.p.northover@gmail.com D: AArch64 backend +N: Diego Novillo +E: dnovillo@google.com +D: SampleProfile and related parts of ProfileData + N: Jakob Olesen +E: stoklund@2pi.dk D: Register allocators and TableGen N: Richard Osborne @@ -118,10 +134,6 @@ N: Daniel Sanders E: daniel.sanders@imgtec.com D: MIPS Backend (lib/Target/Mips/*) -N: Richard Sandiford -E: rsandifo@linux.vnet.ibm.com -D: SystemZ Backend - N: Duncan Sands E: baldrick@free.fr D: DragonEgg @@ -137,7 +149,7 @@ D: Windows parts of Support, Object, ar, N: Tom Stellard E: thomas.stellard@amd.com E: mesa-dev@lists.freedesktop.org -D: R600 Backend +D: Release manager for the 3.5 branch, R600 Backend, libclc N: Evgeniy Stepanov E: eugenis@google.com @@ -147,6 +159,10 @@ N: Andrew Trick E: atrick@apple.com D: IndVar Simplify, Loop Strength Reduction, Instruction Scheduling +N: Ulrich Weigand +E: uweigand@de.ibm.com +D: SystemZ Backend + N: Bill Wendling E: isanbard@gmail.com D: libLTO, IR Linker Modified: vendor/llvm/dist/CREDITS.TXT ============================================================================== --- vendor/llvm/dist/CREDITS.TXT Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/CREDITS.TXT Sun Jan 18 16:17:27 2015 (r277323) @@ -119,6 +119,10 @@ N: Hal Finkel E: hfinkel@anl.gov D: Basic-block autovectorization, PowerPC backend improvements +N: Eric Fiselier +E: eric@efcs.ca +D: LIT patches and documentation. + N: Ryan Flynn E: pizza@parseerror.com D: Miscellaneous bug fixes @@ -281,8 +285,11 @@ D: Backend for Qualcomm's Hexagon VLIW p N: Bruno Cardoso Lopes E: bruno.cardoso@gmail.com -W: http://www.brunocardoso.org -D: The Mips backend +I: bruno +W: http://brunocardoso.cc +D: Mips backend +D: Random ARM integrated assembler and assembly parser improvements +D: General X86 AVX1 support N: Duraid Madina E: duraid@octopus.com.au @@ -456,3 +463,4 @@ D: Bunches of stuff N: Bob Wilson E: bob.wilson@acm.org D: Advanced SIMD (NEON) support in the ARM backend. + Modified: vendor/llvm/dist/Makefile.config.in ============================================================================== --- vendor/llvm/dist/Makefile.config.in Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/Makefile.config.in Sun Jan 18 16:17:27 2015 (r277323) @@ -202,10 +202,8 @@ DOT := @DOT@ DOXYGEN := @DOXYGEN@ GROFF := @GROFF@ GZIPBIN := @GZIPBIN@ -OCAMLC := @OCAMLC@ -OCAMLOPT := @OCAMLOPT@ -OCAMLDEP := @OCAMLDEP@ -OCAMLDOC := @OCAMLDOC@ +GO := @GO@ +OCAMLFIND := @OCAMLFIND@ GAS := @GAS@ POD2HTML := @POD2HTML@ POD2MAN := @POD2MAN@ @@ -217,6 +215,9 @@ HAVE_DLOPEN := @HAVE_DLOPEN@ HAVE_PTHREAD := @HAVE_PTHREAD@ HAVE_TERMINFO := @HAVE_TERMINFO@ +HAVE_OCAMLOPT := @HAVE_OCAMLOPT@ +HAVE_OCAML_OUNIT := @HAVE_OCAML_OUNIT@ + LIBS := @LIBS@ # Targets that are possible to build @@ -370,7 +371,6 @@ HUGE_VAL_SANITY = @HUGE_VAL_SANITY@ # Bindings that we should build BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@ -ALL_BINDINGS := @ALL_BINDINGS@ OCAML_LIBDIR := @OCAML_LIBDIR@ # When compiling under Mingw/Cygwin, executables such as tblgen @@ -396,6 +396,8 @@ COVERED_SWITCH_DEFAULT = @COVERED_SWITCH NO_UNINITIALIZED = @NO_UNINITIALIZED@ # -Wno-maybe-uninitialized NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@ +# -Wno-comment +NO_COMMENT = @NO_COMMENT@ # Was polly found in tools/polly? LLVM_HAS_POLLY = @LLVM_HAS_POLLY@ Modified: vendor/llvm/dist/Makefile.rules ============================================================================== --- vendor/llvm/dist/Makefile.rules Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/Makefile.rules Sun Jan 18 16:17:27 2015 (r277323) @@ -449,7 +449,6 @@ ifeq ($(HOST_OS),MingW) endif endif -CXX.Flags += -Woverloaded-virtual CPP.BaseFlags += $(CPP.Defines) AR.Flags := cru @@ -680,7 +679,7 @@ endif CompileCommonOpts += -Wall -W -Wno-unused-parameter -Wwrite-strings \ $(EXTRA_OPTIONS) $(COVERED_SWITCH_DEFAULT) \ $(NO_UNINITIALIZED) $(NO_MAYBE_UNINITIALIZED) \ - $(NO_MISSING_FIELD_INITIALIZERS) + $(NO_MISSING_FIELD_INITIALIZERS) $(NO_COMMENT) # Enable cast-qual for C++; the workaround is to use const_cast. CXX.Flags += -Wcast-qual @@ -727,10 +726,6 @@ ifeq ($(HOST_OS),SunOS) CPP.BaseFlags += -include llvm/Support/Solaris.h endif -ifeq ($(HOST_OS),AuroraUX) -CPP.BaseFlags += -include llvm/Support/Solaris.h -endif # !HOST_OS - AuroraUX. - # On Windows, SharedLibDir != LibDir. The order is important. ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) LD.Flags += -L$(SharedLibDir) -L$(LibDir) -L$(LLVMToolDir) -L$(LLVMLibDir) @@ -1673,18 +1668,13 @@ $(ObjDir)/%GenAsmMatcher.inc.tmp : %.td $(TARGET:%=$(ObjDir)/%GenMCCodeEmitter.inc.tmp): \ $(ObjDir)/%GenMCCodeEmitter.inc.tmp: %.td $(ObjDir)/.dir $(LLVM_TBLGEN) $(Echo) "Building $(= 2.5]) +AC_MSG_CHECKING([for python >= 2.7]) ac_python_version=`$PYTHON -V 2>&1 | cut -d' ' -f2` ac_python_version_major=`echo $ac_python_version | cut -d'.' -f1` ac_python_version_minor=`echo $ac_python_version | cut -d'.' -f2` ac_python_version_patch=`echo $ac_python_version | cut -d'.' -f3` if test "$ac_python_version_major" -gt "2" || \ (test "$ac_python_version_major" -eq "2" && \ - test "$ac_python_version_minor" -ge "5") ; then + test "$ac_python_version_minor" -ge "7") ; then AC_MSG_RESULT([$PYTHON ($ac_python_version)]) else AC_MSG_RESULT([not found]) - AC_MSG_FAILURE([found python $ac_python_version ($PYTHON); required >= 2.5]) + AC_MSG_FAILURE([found python $ac_python_version ($PYTHON); required >= 2.7]) fi dnl===-----------------------------------------------------------------------=== @@ -1530,7 +1542,7 @@ AC_ARG_WITH(oprofile, fi ;; *) AC_MSG_ERROR([OProfile support is available on Linux only.]) ;; - esac + esac ], [ AC_SUBST(USE_OPROFILE, [0]) @@ -1598,8 +1610,12 @@ AC_HEADER_SYS_WAIT AC_HEADER_TIME AC_LANG_PUSH([C++]) -AC_CHECK_HEADERS([cxxabi.h]) +dnl size_t must be defined before including cxxabi.h on FreeBSD 10.0. +AC_CHECK_HEADERS([cxxabi.h], [], [], +[#include +]) AC_LANG_POP([C++]) + AC_CHECK_HEADERS([dlfcn.h execinfo.h fcntl.h inttypes.h link.h]) AC_CHECK_HEADERS([malloc.h setjmp.h signal.h stdint.h termios.h unistd.h]) AC_CHECK_HEADERS([utime.h]) @@ -1871,37 +1887,52 @@ AC_DEFINE_UNQUOTED(LLVM_DEFAULT_TARGET_T dnl Determine which bindings to build. if test "$BINDINGS_TO_BUILD" = auto ; then BINDINGS_TO_BUILD="" - if test "x$OCAMLC" != x -a "x$OCAMLDEP" != x ; then + if test "x$OCAMLFIND" != x ; then BINDINGS_TO_BUILD="ocaml $BINDINGS_TO_BUILD" fi + if test "x$GO" != x ; then + if $GO run ${srcdir}/bindings/go/conftest.go ; then + BINDINGS_TO_BUILD="go $BINDINGS_TO_BUILD" + fi + fi fi AC_SUBST(BINDINGS_TO_BUILD,$BINDINGS_TO_BUILD) -dnl This isn't really configurey, but it avoids having to repeat the list in -dnl other files. -AC_SUBST(ALL_BINDINGS,ocaml) - dnl Do any work necessary to ensure that bindings have what they need. binding_prereqs_failed=0 for a_binding in $BINDINGS_TO_BUILD ; do case "$a_binding" in ocaml) - if test "x$OCAMLC" = x ; then - AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamlc not found. Try configure OCAMLC=/path/to/ocamlc]) + if test "x$OCAMLFIND" = x ; then + AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamlfind not found. Try configure OCAMLFIND=/path/to/ocamlfind]) binding_prereqs_failed=1 fi - if test "x$OCAMLDEP" = x ; then - AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamldep not found. Try configure OCAMLDEP=/path/to/ocamldep]) + + if $OCAMLFIND opt -version >/dev/null 2>/dev/null ; then + HAVE_OCAMLOPT=1 + else + HAVE_OCAMLOPT=0 + fi + AC_SUBST(HAVE_OCAMLOPT) + + if ! $OCAMLFIND query ctypes >/dev/null 2>/dev/null; then + AC_MSG_WARN([--enable-bindings=ocaml specified, but ctypes is not installed]) binding_prereqs_failed=1 fi - if test "x$OCAMLOPT" = x ; then - AC_MSG_WARN([--enable-bindings=ocaml specified, but ocamlopt not found. Try configure OCAMLOPT=/path/to/ocamlopt]) - dnl ocamlopt is optional! + + if $OCAMLFIND query oUnit >/dev/null 2>/dev/null; then + HAVE_OCAML_OUNIT=1 + else + HAVE_OCAML_OUNIT=0 + AC_MSG_WARN([--enable-bindings=ocaml specified, but OUnit 2 is not installed. Tests will not run]) + dnl oUnit is optional! fi + AC_SUBST(HAVE_OCAML_OUNIT) + if test "x$with_ocaml_libdir" != xauto ; then AC_SUBST(OCAML_LIBDIR,$with_ocaml_libdir) else - ocaml_stdlib="`"$OCAMLC" -where`" + ocaml_stdlib="`"$OCAMLFIND" ocamlc -where`" if test "$LLVM_PREFIX" '<' "$ocaml_stdlib" -a "$ocaml_stdlib" '<' "$LLVM_PREFIX~" then # ocaml stdlib is beneath our prefix; use stdlib @@ -1912,6 +1943,19 @@ for a_binding in $BINDINGS_TO_BUILD ; do fi fi ;; + go) + if test "x$GO" = x ; then + AC_MSG_WARN([--enable-bindings=go specified, but go not found. Try configure GO=/path/to/go]) + binding_prereqs_failed=1 + else + if $GO run ${srcdir}/bindings/go/conftest.go ; then + : + else + AC_MSG_WARN([--enable-bindings=go specified, but need at least Go 1.2. Try configure GO=/path/to/go]) + binding_prereqs_failed=1 + fi + fi + ;; esac done if test "$binding_prereqs_failed" = 1 ; then @@ -1973,6 +2017,11 @@ if test "${clang_src_root}" = ""; then clang_src_root="$srcdir/tools/clang" fi if test -f ${clang_src_root}/README.txt; then + dnl Clang supports build systems which use the multilib libdir suffix. + dnl The autoconf system doesn't support this so stub out that variable. + AC_DEFINE_UNQUOTED(CLANG_LIBDIR_SUFFIX,"", + [Multilib suffix for libdir.]) + dnl Use variables to stay under 80 columns. configh="include/clang/Config/config.h" doxy="docs/doxygen.cfg" Modified: vendor/llvm/dist/bindings/Makefile ============================================================================== --- vendor/llvm/dist/bindings/Makefile Sun Jan 18 15:13:11 2015 (r277322) +++ vendor/llvm/dist/bindings/Makefile Sun Jan 18 16:17:27 2015 (r277323) @@ -11,6 +11,10 @@ LEVEL := .. include $(LEVEL)/Makefile.config -PARALLEL_DIRS = $(BINDINGS_TO_BUILD) +PARALLEL_DIRS = + +ifneq (,$(filter ocaml,$(BINDINGS_TO_BUILD))) +PARALLEL_DIRS += ocaml +endif include $(LEVEL)/Makefile.common Added: vendor/llvm/dist/bindings/go/README.txt ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/bindings/go/README.txt Sun Jan 18 16:17:27 2015 (r277323) @@ -0,0 +1,53 @@ +This directory contains LLVM bindings for the Go programming language +(http://golang.org). + +Prerequisites +------------- + +* Go 1.2+. +* CMake (to build LLVM). + +Using the bindings +------------------ + +The package path "llvm.org/llvm/bindings/go/llvm" can be used to +import the latest development version of LLVM from SVN. Paths such as +"llvm.org/llvm.v36/bindings/go/llvm" refer to released versions of LLVM. + +It is recommended to use the "-d" flag with "go get" to download the +package or a dependency, as an additional step is required to build LLVM +(see "Building LLVM" below). + +Building LLVM +------------- + +The script "build.sh" in this directory can be used to build LLVM and prepare +it to be used by the bindings. If you receive an error message from "go build" +like this: + + ./analysis.go:4:84: fatal error: llvm-c/Analysis.h: No such file or directory + #include // If you are getting an error here read bindings/go/README.txt + +or like this: + + ./llvm_dep.go:5: undefined: run_build_sh + +it means that LLVM needs to be built or updated by running the script. + + $ $GOPATH/src/llvm.org/llvm/bindings/go/build.sh + +Any command line arguments supplied to the script are passed to LLVM's CMake +build system. A good set of arguments to use during development are: + + $ $GOPATH/src/llvm.org/llvm/bindings/go/build.sh -DCMAKE_BUILD_TYPE=Debug -DLLVM_TARGETS_TO_BUILD=host -DBUILD_SHARED_LIBS=ON + +Note that CMake keeps a cache of build settings so once you have built +LLVM there is no need to pass these arguments again after updating. + +Alternatively, you can build LLVM yourself, but you must then set the +CGO_CPPFLAGS, CGO_CXXFLAGS and CGO_LDFLAGS environment variables: + + $ export CGO_CPPFLAGS="`/path/to/llvm-build/bin/llvm-config --cppflags`" + $ export CGO_CXXFLAGS=-std=c++11 + $ export CGO_LDFLAGS="`/path/to/llvm-build/bin/llvm-config --ldflags --libs --system-libs all`" + $ go build -tags byollvm Added: vendor/llvm/dist/bindings/go/build.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/bindings/go/build.sh Sun Jan 18 16:17:27 2015 (r277323) @@ -0,0 +1,28 @@ +#!/bin/sh -xe + +gollvmdir=$(dirname "$0")/llvm + +workdir=$gollvmdir/workdir +llvmdir=$gollvmdir/../../.. +llvm_builddir=$workdir/llvm_build + +mkdir -p $llvm_builddir + +cmake_flags="../../../../.. $@" +llvm_config="$llvm_builddir/bin/llvm-config" +llvm_go="$llvm_builddir/bin/llvm-go" + +if test -n "`which ninja`" ; then + # If Ninja is available, we can speed up the build by building only the + # required subset of LLVM. + (cd $llvm_builddir && cmake -G Ninja $cmake_flags) + ninja -C $llvm_builddir llvm-config llvm-go + llvm_components="$($llvm_go print-components)" + llvm_buildtargets="$($llvm_config --libs $llvm_components | sed -e 's/-l//g')" + ninja -C $llvm_builddir $llvm_buildtargets FileCheck +else + (cd $llvm_builddir && cmake $cmake_flags) + make -C $llvm_builddir -j4 +fi + +$llvm_go print-config > $gollvmdir/llvm_config.go Added: vendor/llvm/dist/bindings/go/conftest.go ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/bindings/go/conftest.go Sun Jan 18 16:17:27 2015 (r277323) @@ -0,0 +1,16 @@ +package main + +import ( + "go/build" + "os" +) + +// Tests that the Go compiler is at least version 1.2. +func main() { + for _, tag := range build.Default.ReleaseTags { + if tag == "go1.2" { + os.Exit(0) + } + } + os.Exit(1) +} Added: vendor/llvm/dist/bindings/go/llvm/DIBuilderBindings.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/llvm/dist/bindings/go/llvm/DIBuilderBindings.cpp Sun Jan 18 16:17:27 2015 (r277323) @@ -0,0 +1,242 @@ +//===- DIBuilderBindings.cpp - Bindings for DIBuilder ---------------------===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file defines C bindings for the DIBuilder class. +// +//===----------------------------------------------------------------------===// + +#include "DIBuilderBindings.h" + +#include "IRBindings.h" +#include "llvm/IR/IRBuilder.h" +#include "llvm/IR/Module.h" +#include "llvm/IR/DIBuilder.h" + +using namespace llvm; + +DEFINE_SIMPLE_CONVERSION_FUNCTIONS(DIBuilder, LLVMDIBuilderRef) + +namespace { +template T unwrapDI(LLVMMetadataRef v) { + return v ? T(unwrap(v)) : T(); +} +} + +LLVMDIBuilderRef LLVMNewDIBuilder(LLVMModuleRef mref) { + Module *m = unwrap(mref); + return wrap(new DIBuilder(*m)); +} + +void LLVMDIBuilderDestroy(LLVMDIBuilderRef dref) { + DIBuilder *d = unwrap(dref); + delete d; +} + +void LLVMDIBuilderFinalize(LLVMDIBuilderRef dref) { unwrap(dref)->finalize(); } + +LLVMMetadataRef LLVMDIBuilderCreateCompileUnit(LLVMDIBuilderRef Dref, + unsigned Lang, const char *File, + const char *Dir, + const char *Producer, + int Optimized, const char *Flags, + unsigned RuntimeVersion) { + DIBuilder *D = unwrap(Dref); + DICompileUnit CU = D->createCompileUnit(Lang, File, Dir, Producer, Optimized, + Flags, RuntimeVersion); + return wrap(CU); +} + +LLVMMetadataRef LLVMDIBuilderCreateFile(LLVMDIBuilderRef Dref, const char *File, + const char *Dir) { + DIBuilder *D = unwrap(Dref); + DIFile F = D->createFile(File, Dir); + return wrap(F); +} + +LLVMMetadataRef LLVMDIBuilderCreateLexicalBlock(LLVMDIBuilderRef Dref, + LLVMMetadataRef Scope, + LLVMMetadataRef File, + unsigned Line, + unsigned Column) { + DIBuilder *D = unwrap(Dref); + DILexicalBlock LB = D->createLexicalBlock( + unwrapDI(Scope), unwrapDI(File), Line, Column); + return wrap(LB); +} + +LLVMMetadataRef LLVMDIBuilderCreateLexicalBlockFile(LLVMDIBuilderRef Dref, + LLVMMetadataRef Scope, + LLVMMetadataRef File, + unsigned Discriminator) { + DIBuilder *D = unwrap(Dref); + DILexicalBlockFile LBF = D->createLexicalBlockFile( + unwrapDI(Scope), unwrapDI(File), Discriminator); + return wrap(LBF); +} + +LLVMMetadataRef LLVMDIBuilderCreateFunction( + LLVMDIBuilderRef Dref, LLVMMetadataRef Scope, const char *Name, + const char *LinkageName, LLVMMetadataRef File, unsigned Line, + LLVMMetadataRef CompositeType, int IsLocalToUnit, int IsDefinition, + unsigned ScopeLine, unsigned Flags, int IsOptimized, LLVMValueRef Func) { + DIBuilder *D = unwrap(Dref); + DISubprogram SP = D->createFunction( + unwrapDI(Scope), Name, LinkageName, unwrapDI(File), + Line, unwrapDI(CompositeType), IsLocalToUnit, + IsDefinition, ScopeLine, Flags, IsOptimized, unwrap(Func)); + return wrap(SP); +} + +LLVMMetadataRef LLVMDIBuilderCreateLocalVariable( + LLVMDIBuilderRef Dref, unsigned Tag, LLVMMetadataRef Scope, + const char *Name, LLVMMetadataRef File, unsigned Line, LLVMMetadataRef Ty, + int AlwaysPreserve, unsigned Flags, unsigned ArgNo) { + DIBuilder *D = unwrap(Dref); + DIVariable V = D->createLocalVariable( + Tag, unwrapDI(Scope), Name, unwrapDI(File), Line, + unwrapDI(Ty), AlwaysPreserve, Flags, ArgNo); + return wrap(V); +} + +LLVMMetadataRef LLVMDIBuilderCreateBasicType(LLVMDIBuilderRef Dref, + const char *Name, + uint64_t SizeInBits, + uint64_t AlignInBits, + unsigned Encoding) { + DIBuilder *D = unwrap(Dref); + DIBasicType T = D->createBasicType(Name, SizeInBits, AlignInBits, Encoding); + return wrap(T); +} + +LLVMMetadataRef LLVMDIBuilderCreatePointerType(LLVMDIBuilderRef Dref, + LLVMMetadataRef PointeeType, + uint64_t SizeInBits, + uint64_t AlignInBits, + const char *Name) { + DIBuilder *D = unwrap(Dref); + DIDerivedType T = D->createPointerType(unwrapDI(PointeeType), *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 16:19:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21C2B366; Sun, 18 Jan 2015 16:19:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E8D14EF2; Sun, 18 Jan 2015 16:19:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IGJXVG013873; Sun, 18 Jan 2015 16:19:33 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IGJX4V013872; Sun, 18 Jan 2015 16:19:33 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501181619.t0IGJX4V013872@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Jan 2015 16:19:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277324 - vendor/llvm/llvm-release_360-r226102 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 16:19:34 -0000 Author: dim Date: Sun Jan 18 16:19:33 2015 New Revision: 277324 URL: https://svnweb.freebsd.org/changeset/base/277324 Log: Tag llvm tags/RELEASE_360/rc1 r226102 (effectively, 3.6.0 RC1). Added: vendor/llvm/llvm-release_360-r226102/ - copied from r277323, vendor/llvm/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 16:23:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F08AF4A1; Sun, 18 Jan 2015 16:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D733FF93; Sun, 18 Jan 2015 16:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IGNs2u017864; Sun, 18 Jan 2015 16:23:54 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IGNpRG017847; Sun, 18 Jan 2015 16:23:51 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501181623.t0IGNpRG017847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Jan 2015 16:23:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277325 - in vendor/clang/dist: . bindings/python/clang bindings/python/tests/cindex cmake cmake/modules docs docs/tools examples/PrintFunctionNames examples/clang-interpreter include/c... X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 16:23:55 -0000 Author: dim Date: Sun Jan 18 16:23:48 2015 New Revision: 277325 URL: https://svnweb.freebsd.org/changeset/base/277325 Log: Vendor import of clang RELEASE_360/rc1 tag r226102 (effectively, 3.6.0 RC1): https://llvm.org/svn/llvm-project/cfe/tags/RELEASE_360/rc1@226102 Added: vendor/clang/dist/.clang-tidy vendor/clang/dist/cmake/ vendor/clang/dist/cmake/modules/ vendor/clang/dist/cmake/modules/ClangConfig.cmake vendor/clang/dist/include/clang/Analysis/CodeInjector.h (contents, props changed) vendor/clang/dist/include/clang/Basic/BuiltinsLe64.def vendor/clang/dist/include/clang/Basic/SanitizerBlacklist.h (contents, props changed) vendor/clang/dist/include/clang/Basic/Sanitizers.h (contents, props changed) vendor/clang/dist/include/clang/Frontend/SerializedDiagnosticReader.h (contents, props changed) vendor/clang/dist/include/clang/Frontend/SerializedDiagnostics.h (contents, props changed) vendor/clang/dist/include/clang/StaticAnalyzer/Frontend/ModelConsumer.h (contents, props changed) vendor/clang/dist/include/clang/Tooling/Core/ vendor/clang/dist/include/clang/Tooling/Core/Replacement.h (contents, props changed) vendor/clang/dist/lib/Analysis/CodeInjector.cpp (contents, props changed) vendor/clang/dist/lib/Basic/SanitizerBlacklist.cpp (contents, props changed) vendor/clang/dist/lib/Basic/Sanitizers.cpp (contents, props changed) vendor/clang/dist/lib/CodeGen/CoverageMappingGen.cpp (contents, props changed) vendor/clang/dist/lib/CodeGen/CoverageMappingGen.h (contents, props changed) vendor/clang/dist/lib/CodeGen/SanitizerMetadata.cpp (contents, props changed) vendor/clang/dist/lib/CodeGen/SanitizerMetadata.h (contents, props changed) vendor/clang/dist/lib/Driver/CrossWindowsToolChain.cpp (contents, props changed) vendor/clang/dist/lib/Driver/MSVCToolChain.cpp (contents, props changed) vendor/clang/dist/lib/Format/UnwrappedLineFormatter.cpp (contents, props changed) vendor/clang/dist/lib/Format/UnwrappedLineFormatter.h (contents, props changed) vendor/clang/dist/lib/Frontend/CodeGenOptions.cpp (contents, props changed) vendor/clang/dist/lib/Frontend/SerializedDiagnosticReader.cpp (contents, props changed) vendor/clang/dist/lib/Headers/__stddef_max_align_t.h (contents, props changed) vendor/clang/dist/lib/Headers/adxintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/avx512bwintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/avx512erintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/avx512fintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/avx512vlbwintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/avx512vlintrin.h (contents, props changed) vendor/clang/dist/lib/Headers/stdatomic.h (contents, props changed) vendor/clang/dist/lib/Headers/vadefs.h (contents, props changed) vendor/clang/dist/lib/Sema/SemaCUDA.cpp (contents, props changed) vendor/clang/dist/lib/StaticAnalyzer/Frontend/ModelConsumer.cpp (contents, props changed) vendor/clang/dist/lib/StaticAnalyzer/Frontend/ModelInjector.cpp (contents, props changed) vendor/clang/dist/lib/StaticAnalyzer/Frontend/ModelInjector.h (contents, props changed) vendor/clang/dist/lib/Tooling/Core/ vendor/clang/dist/lib/Tooling/Core/CMakeLists.txt (contents, props changed) vendor/clang/dist/lib/Tooling/Core/Makefile (contents, props changed) vendor/clang/dist/lib/Tooling/Core/Replacement.cpp (contents, props changed) vendor/clang/dist/test/ARCMT/objcmt-property-dot-syntax.m vendor/clang/dist/test/ARCMT/objcmt-property-dot-syntax.m.result vendor/clang/dist/test/ARCMT/objcmt-undefined-ns-macros.m vendor/clang/dist/test/ARCMT/objcmt-undefined-ns-macros.m.result vendor/clang/dist/test/Analysis/Inputs/Models/ vendor/clang/dist/test/Analysis/Inputs/Models/modeledFunction.model vendor/clang/dist/test/Analysis/Inputs/Models/notzero.model vendor/clang/dist/test/Analysis/Inputs/system-header-simulator-for-pthread-lock.h (contents, props changed) vendor/clang/dist/test/Analysis/NewDeleteLeaks-PR19102.cpp (contents, props changed) vendor/clang/dist/test/Analysis/disable-all-checks.c (contents, props changed) vendor/clang/dist/test/Analysis/malloc-protoype.c (contents, props changed) vendor/clang/dist/test/Analysis/malloc-sizeof.cpp (contents, props changed) vendor/clang/dist/test/Analysis/model-file.cpp (contents, props changed) vendor/clang/dist/test/Analysis/unix-api.c (contents, props changed) vendor/clang/dist/test/Analysis/vla.c (contents, props changed) vendor/clang/dist/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.general/ vendor/clang/dist/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.general/p8.cpp (contents, props changed) vendor/clang/dist/test/CXX/drs/dr16xx.cpp (contents, props changed) vendor/clang/dist/test/CXX/drs/dr18xx.cpp (contents, props changed) vendor/clang/dist/test/CXX/drs/dr6xx.cpp (contents, props changed) vendor/clang/dist/test/CXX/except/except.spec/p5-delayed.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/24-bit.c (contents, props changed) vendor/clang/dist/test/CodeGen/aarch64-fix-cortex-a53-835769.c (contents, props changed) vendor/clang/dist/test/CodeGen/adc-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/address-sanitizer-and-array-cookie.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/adx-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/align_value.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/arm-neon-directed-rounding.c (contents, props changed) vendor/clang/dist/test/CodeGen/arm-neon-numeric-maxmin.c (contents, props changed) vendor/clang/dist/test/CodeGen/avx512bw-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/avx512f-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/avx512vl-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/avx512vlbw-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/block-with-perdefinedexpr.c (contents, props changed) vendor/clang/dist/test/CodeGen/builtin-assume-aligned.c (contents, props changed) vendor/clang/dist/test/CodeGen/builtin-recursive.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/builtins-arm-msvc-compat-error.c (contents, props changed) vendor/clang/dist/test/CodeGen/builtins-arm-msvc-compat-only.c (contents, props changed) vendor/clang/dist/test/CodeGen/builtins-ppc-vsx.c (contents, props changed) vendor/clang/dist/test/CodeGen/complex-math.c (contents, props changed) vendor/clang/dist/test/CodeGen/debug-info-block-out-return.c (contents, props changed) vendor/clang/dist/test/CodeGen/ext-vector-indexing.c (contents, props changed) vendor/clang/dist/test/CodeGen/fp128_complex.c (contents, props changed) vendor/clang/dist/test/CodeGen/fsgsbase-builtins.c (contents, props changed) vendor/clang/dist/test/CodeGen/mangle-blocks.c (contents, props changed) vendor/clang/dist/test/CodeGen/mips-transparent-union.c (contents, props changed) vendor/clang/dist/test/CodeGen/ms-align-tentative.c (contents, props changed) vendor/clang/dist/test/CodeGen/ms-inline-asm-functions.c (contents, props changed) vendor/clang/dist/test/CodeGen/piclevels.c (contents, props changed) vendor/clang/dist/test/CodeGen/ppc-signbit.c (contents, props changed) vendor/clang/dist/test/CodeGen/ppc-varargs-struct.c (contents, props changed) vendor/clang/dist/test/CodeGen/ppc64-elf-abi.c (contents, props changed) vendor/clang/dist/test/CodeGen/sanitize-address-field-padding.cpp (contents, props changed) vendor/clang/dist/test/CodeGen/variadic-null-win64.c (contents, props changed) vendor/clang/dist/test/CodeGen/vectorcall.c (contents, props changed) vendor/clang/dist/test/CodeGen/vlt_to_pointer.c (contents, props changed) vendor/clang/dist/test/CodeGen/windows-struct-abi.c (contents, props changed) vendor/clang/dist/test/CodeGen/x86-atomic-long_double.c (contents, props changed) vendor/clang/dist/test/CodeGen/x86_64-arguments-win32.c (contents, props changed) vendor/clang/dist/test/CodeGenCXX/align-avx-complete-objects.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/call-with-static-chain.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/ctor-globalopt.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/cxx1y-variable-template-linkage.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/cxx1z-fold-expression.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/debug-info-access.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/debug-info-line.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/debug-info-ptr-to-member-function.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/debug-info-windows-dtor.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/dllexport-alias.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/homogeneous-aggregates.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/mangle-literal-suffix.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/mangle-local-anonymous-unions.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/merge-functions.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/microsoft-abi-byval-thunks.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/microsoft-abi-structors-delayed-template.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vmemptr-conflicts.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vmemptr-fastcall.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/microsoft-uuidof-mangling.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/mingw-w64-seh-exceptions.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/ms-inline-asm-return.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/ms-thread_local.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/nrvo-noreturn.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/optnone-def-decl.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pr18635.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pr20719.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pr20897.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/pr21989.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/predefined-expr-cxx14.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/sections.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/vararg-non-pod-ms-compat.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/vla-lambda-capturing.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/vlt_to_reference.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/vtable-align.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/vtable-holder-self-reference.cpp (contents, props changed) vendor/clang/dist/test/CodeGenCXX/x86_64-arguments-nacl-x32.cpp (contents, props changed) vendor/clang/dist/test/CodeGenObjC/block-over-align.m vendor/clang/dist/test/CodeGenObjC/debug-info-block-type.m vendor/clang/dist/test/CodeGenObjC/debug-info-nested-blocks.m vendor/clang/dist/test/CodeGenObjC/debug-info-variadic-method.m vendor/clang/dist/test/CodeGenObjC/mangle-blocks.m vendor/clang/dist/test/CodeGenObjC/private-extern-selector-reference.m vendor/clang/dist/test/CodeGenObjC/undefined-protocol2.m vendor/clang/dist/test/CodeGenObjCXX/arc-cxx11-init-list.mm vendor/clang/dist/test/CodeGenObjCXX/block-id.mm vendor/clang/dist/test/CodeGenObjCXX/debug-info-line.mm vendor/clang/dist/test/CodeGenObjCXX/destroy.mm vendor/clang/dist/test/CodeGenObjCXX/subst-sel.mm vendor/clang/dist/test/CodeGenOpenCL/address-spaces-conversions.cl vendor/clang/dist/test/CodeGenOpenCL/amdgpu-num-gpr-attr.cl vendor/clang/dist/test/CodeGenOpenCL/const-str-array-decay.cl vendor/clang/dist/test/CodeGenOpenCL/constant-addr-space-globals.cl vendor/clang/dist/test/CodeGenOpenCL/denorms-are-zero.cl vendor/clang/dist/test/CodeGenOpenCL/local-initializer-undef.cl vendor/clang/dist/test/CodeGenOpenCL/relaxed-fpmath.cl vendor/clang/dist/test/CoverageMapping/ vendor/clang/dist/test/CoverageMapping/Inputs/ vendor/clang/dist/test/CoverageMapping/Inputs/code.h (contents, props changed) vendor/clang/dist/test/CoverageMapping/Inputs/header1.h (contents, props changed) vendor/clang/dist/test/CoverageMapping/break.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/builtinmacro.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/casts.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/classtemplate.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/continue.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/header.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/if.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/includehell.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/ir.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/label.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/logical.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/loopmacro.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/loops.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/macroception.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/macroparams.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/macroparams2.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/macros.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/nestedclass.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/objc.m vendor/clang/dist/test/CoverageMapping/preprocessor.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/return.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/switch.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/templates.cpp (contents, props changed) vendor/clang/dist/test/CoverageMapping/test.c (contents, props changed) vendor/clang/dist/test/CoverageMapping/trycatch.cpp (contents, props changed) vendor/clang/dist/test/Driver/Inputs/Windows/ vendor/clang/dist/test/Driver/Inputs/Windows/ARM/ vendor/clang/dist/test/Driver/Inputs/Windows/ARM/8.1/ vendor/clang/dist/test/Driver/Inputs/Windows/ARM/8.1/usr/ vendor/clang/dist/test/Driver/Inputs/Windows/ARM/8.1/usr/bin/ vendor/clang/dist/test/Driver/Inputs/Windows/ARM/8.1/usr/bin/armv7-windows-itanium-ld (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_netbsd_tree/usr/lib/eabihf/ vendor/clang/dist/test/Driver/Inputs/basic_netbsd_tree/usr/lib/eabihf/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/basic_netbsd_tree/usr/lib/powerpc/ vendor/clang/dist/test/Driver/Inputs/basic_netbsd_tree/usr/lib/powerpc/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/cc1-response.txt (contents, props changed) vendor/clang/dist/test/Driver/Inputs/gen-response.c (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/el/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/nan2008/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/nan2008/el/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/soft-float/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/soft-float/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/include-fixed/uclibc/soft-float/el/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/el/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/el/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/nan2008/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/nan2008/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/nan2008/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/nan2008/el/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/nan2008/el/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/soft-float/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/soft-float/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/soft-float/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/soft-float/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/soft-float/el/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/lib/gcc/mips-linux-gnu/4.6.3/uclibc/soft-float/el/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/el/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/nan2008/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/nan2008/el/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/soft-float/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/soft-float/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/lib/uclibc/soft-float/el/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/lib/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/include/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/el/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/lib/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/lib/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/include/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/el/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/lib/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/include/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/nan2008/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/lib/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/include/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/el/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/lib/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/include/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/soft-float/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/include/.keep vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_cs_tree/mips-linux-gnu/libc/uclibc/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/nan2008/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/nan2008/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/sof/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/el/sof/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/nan2008/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/nan2008/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/sof/crtbegin.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/lib/gcc/mips-mti-linux-gnu/4.9.0/uclibc/sof/crtend.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/nan2008/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/nan2008/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/sof/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/el/sof/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/nan2008/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/nan2008/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/sof/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/include/c++/4.9.0/mips-mti-linux-gnu/uclibc/sof/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/el/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/el/nan2008/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/el/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/el/sof/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/nan2008/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/mips-mti-linux-gnu/lib/uclibc/sof/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/include/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/include/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/nan2008/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/include/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/include/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/sof/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/include/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/include/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/el/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/include/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/include/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/nan2008/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/include/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/include/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/sof/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/include/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/include/bits/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/include/bits/.keep vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/lib/ vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/lib/crt1.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/lib/crti.o (contents, props changed) vendor/clang/dist/test/Driver/Inputs/mips_fsf_tree/sysroot/uclibc/usr/lib/crtn.o (contents, props changed) vendor/clang/dist/test/Driver/aarch64-fix-cortex-a53-835769.c (contents, props changed) vendor/clang/dist/test/Driver/arm-abi.c (contents, props changed) vendor/clang/dist/test/Driver/biarch.c (contents, props changed) vendor/clang/dist/test/Driver/cc1-response-files.c (contents, props changed) vendor/clang/dist/test/Driver/cl-link-at-file.c (contents, props changed) vendor/clang/dist/test/Driver/cl-zc.cpp (contents, props changed) vendor/clang/dist/test/Driver/clang-s-opts.s (contents, props changed) vendor/clang/dist/test/Driver/coverage_no_integrated_as.c (contents, props changed) vendor/clang/dist/test/Driver/crash report spaces.c (contents, props changed) vendor/clang/dist/test/Driver/crash-report-null.test vendor/clang/dist/test/Driver/darwin-ld-demangle.c (contents, props changed) vendor/clang/dist/test/Driver/darwin-max-type-align.c (contents, props changed) vendor/clang/dist/test/Driver/default-image-name.c (contents, props changed) vendor/clang/dist/test/Driver/env.c (contents, props changed) vendor/clang/dist/test/Driver/fatal-warnings.c (contents, props changed) vendor/clang/dist/test/Driver/fortran.f95 vendor/clang/dist/test/Driver/freebsd.cpp (contents, props changed) vendor/clang/dist/test/Driver/le64-unknown-unknown.cpp (contents, props changed) vendor/clang/dist/test/Driver/no-canonical-prefixes.c (contents, props changed) vendor/clang/dist/test/Driver/parse-progname.c (contents, props changed) vendor/clang/dist/test/Driver/ppc-abi.c (contents, props changed) vendor/clang/dist/test/Driver/response-file.c (contents, props changed) vendor/clang/dist/test/Driver/rewrite-map-in-diagnostics.c (contents, props changed) vendor/clang/dist/test/Driver/symbol-rewriter.c (contents, props changed) vendor/clang/dist/test/Driver/systemz-as.s (contents, props changed) vendor/clang/dist/test/Driver/thread-model.c (contents, props changed) vendor/clang/dist/test/Driver/windows-cross.c (contents, props changed) vendor/clang/dist/test/Driver/x86-march.c (contents, props changed) vendor/clang/dist/test/FixIt/fixit-class-method-messaging.m vendor/clang/dist/test/FixIt/multiarg-selector-fixit.m vendor/clang/dist/test/FixIt/property-access-fixit.m vendor/clang/dist/test/Frontend/Inputs/profile-sample-use-loc-tracking.prof vendor/clang/dist/test/Frontend/profile-sample-use-loc-tracking.c (contents, props changed) vendor/clang/dist/test/Frontend/source-col-map.c (contents, props changed) vendor/clang/dist/test/Frontend/std.cl vendor/clang/dist/test/Frontend/trigraphs.cpp (contents, props changed) vendor/clang/dist/test/Frontend/verify-unknown-arg.c (contents, props changed) vendor/clang/dist/test/Frontend/x86-target-cpu.c (contents, props changed) vendor/clang/dist/test/Headers/altivec-intrin.c (contents, props changed) vendor/clang/dist/test/Headers/cpuid.c (contents, props changed) vendor/clang/dist/test/Index/Inputs/complete-at-EOF.c (contents, props changed) vendor/clang/dist/test/Index/Inputs/declare-objc-predef.h (contents, props changed) vendor/clang/dist/test/Index/Inputs/module-undef.h (contents, props changed) vendor/clang/dist/test/Index/comment-lots-of-unknown-commands.c (contents, props changed) vendor/clang/dist/test/Index/complete-at-EOF.c (contents, props changed) vendor/clang/dist/test/Index/complete-module-undef.m vendor/clang/dist/test/Index/print-mangled-name.cpp (contents, props changed) vendor/clang/dist/test/Index/reparse-predef-objc-protocol.m vendor/clang/dist/test/Layout/itanium-union-bitfield.cpp (contents, props changed) vendor/clang/dist/test/Layout/ms-x86-empty-layout.c (contents, props changed) vendor/clang/dist/test/Lexer/ms-compatibility.c (contents, props changed) vendor/clang/dist/test/Misc/ast-dump-invalid.cpp (contents, props changed) vendor/clang/dist/test/Misc/ast-dump-lookups.cpp (contents, props changed) vendor/clang/dist/test/Misc/ast-print-objectivec.m vendor/clang/dist/test/Misc/attr-source-range.cpp (contents, props changed) vendor/clang/dist/test/Misc/diag-special-chars.c (contents, props changed) vendor/clang/dist/test/Misc/serialized-diags-driver.c (contents, props changed) vendor/clang/dist/test/Modules/Inputs/AddRemovePrivate.framework/ vendor/clang/dist/test/Modules/Inputs/AddRemovePrivate.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/AddRemovePrivate.framework/Headers/AddRemovePrivate.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/AddRemovePrivate.framework/Modules/ vendor/clang/dist/test/Modules/Inputs/AddRemovePrivate.framework/Modules/module.modulemap vendor/clang/dist/test/Modules/Inputs/AddRemovePrivate.framework/Modules/module.private.modulemap vendor/clang/dist/test/Modules/Inputs/PR20399/ vendor/clang/dist/test/Modules/Inputs/PR20399/FirstHeader.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR20399/SecondHeader.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR20399/module.modulemap vendor/clang/dist/test/Modules/Inputs/PR20399/stl_map.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR20399/vector vendor/clang/dist/test/Modules/Inputs/PR20786/ vendor/clang/dist/test/Modules/Inputs/PR20786/TBranchProxy.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR20786/TFormula.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR20786/TMath.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/PR20786/module.modulemap vendor/clang/dist/test/Modules/Inputs/PR20786/random.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/StdDef/include_again.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/StdDef/ptrdiff_t.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/attr-unavailable/ vendor/clang/dist/test/Modules/Inputs/attr-unavailable/module.modulemap vendor/clang/dist/test/Modules/Inputs/attr-unavailable/oneA.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/attr-unavailable/oneB.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/attr-unavailable/oneC.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/attr-unavailable/two.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-decls-premerged.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-lookup/ vendor/clang/dist/test/Modules/Inputs/cxx-lookup/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-lookup/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-lookup/c1.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-lookup/c2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-lookup/module.modulemap vendor/clang/dist/test/Modules/Inputs/cxx-lookup/x.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-lookup/y.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-templates-d.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/cxx-templates-textual.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/declare-use/k.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/declare-use/l.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/declare-use/m.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/declare-use/m2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/dependency-gen-base.modulemap vendor/clang/dist/test/Modules/Inputs/dependency-gen-base2.modulemap vendor/clang/dist/test/Modules/Inputs/dependency-gen-included.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/dependency-gen-included2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/dependency-gen.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build/ vendor/clang/dist/test/Modules/Inputs/explicit-build/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build/c.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/explicit-build/module.modulemap vendor/clang/dist/test/Modules/Inputs/filename/ vendor/clang/dist/test/Modules/Inputs/filename/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/filename/module.map vendor/clang/dist/test/Modules/Inputs/include_next/ vendor/clang/dist/test/Modules/Inputs/include_next/x/ vendor/clang/dist/test/Modules/Inputs/include_next/x/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/include_next/x/module.modulemap vendor/clang/dist/test/Modules/Inputs/include_next/x/subdir/ vendor/clang/dist/test/Modules/Inputs/include_next/x/subdir/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/include_next/y/ vendor/clang/dist/test/Modules/Inputs/include_next/y/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/include_next/y/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/include_next/y/module.modulemap vendor/clang/dist/test/Modules/Inputs/inferred-attr/ vendor/clang/dist/test/Modules/Inputs/inferred-attr/InferredExternC.framework/ vendor/clang/dist/test/Modules/Inputs/inferred-attr/InferredExternC.framework/Headers/ vendor/clang/dist/test/Modules/Inputs/inferred-attr/InferredExternC.framework/Headers/InferredExternC.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/inferred-attr/module.modulemap vendor/clang/dist/test/Modules/Inputs/macros_bottom.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/malformed/c.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-typedefs/ vendor/clang/dist/test/Modules/Inputs/merge-typedefs/a1.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-typedefs/a2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-typedefs/b1.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-typedefs/b2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-typedefs/module.modulemap vendor/clang/dist/test/Modules/Inputs/merge-using-decls/ vendor/clang/dist/test/Modules/Inputs/merge-using-decls/a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-using-decls/b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/merge-using-decls/module.modulemap vendor/clang/dist/test/Modules/Inputs/modular_maps-moduleb-cwd.map vendor/clang/dist/test/Modules/Inputs/modular_maps/c.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/modular_maps/modulea-cwd.map vendor/clang/dist/test/Modules/Inputs/modular_maps/modulec-cwd.map vendor/clang/dist/test/Modules/Inputs/modular_maps/modulec.map vendor/clang/dist/test/Modules/Inputs/pr19692/ vendor/clang/dist/test/Modules/Inputs/pr19692/AIX.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pr19692/Blah.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pr19692/TBlah.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pr19692/TFoo.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/pr19692/module.map vendor/clang/dist/test/Modules/Inputs/pr19692/stdint.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/preprocess-prefix.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/relative-dep-gen-1.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/relative-dep-gen-2.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/relative-dep-gen-cwd.modulemap vendor/clang/dist/test/Modules/Inputs/relative-dep-gen.modulemap vendor/clang/dist/test/Modules/Inputs/va_list/ vendor/clang/dist/test/Modules/Inputs/va_list/module.modulemap vendor/clang/dist/test/Modules/Inputs/va_list/va_list_a.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/va_list/va_list_b.h (contents, props changed) vendor/clang/dist/test/Modules/Inputs/warn-unused-local-typedef.h (contents, props changed) vendor/clang/dist/test/Modules/add-remove-private.m vendor/clang/dist/test/Modules/attr-unavailable.m vendor/clang/dist/test/Modules/cxx-lookup.cpp (contents, props changed) vendor/clang/dist/test/Modules/dependency-gen.modulemap.cpp (contents, props changed) vendor/clang/dist/test/Modules/explicit-build-flags.cpp (contents, props changed) vendor/clang/dist/test/Modules/explicit-build-relpath.cpp (contents, props changed) vendor/clang/dist/test/Modules/explicit-build.cpp (contents, props changed) vendor/clang/dist/test/Modules/filename.cpp (contents, props changed) vendor/clang/dist/test/Modules/implementation-of-module.m vendor/clang/dist/test/Modules/include_next.c (contents, props changed) vendor/clang/dist/test/Modules/inferred-attributes.mm vendor/clang/dist/test/Modules/macro-reexport/e1.h (contents, props changed) vendor/clang/dist/test/Modules/macro-reexport/e2.h (contents, props changed) vendor/clang/dist/test/Modules/macro-reexport/f1.h (contents, props changed) vendor/clang/dist/test/Modules/merge-typedefs.cpp (contents, props changed) vendor/clang/dist/test/Modules/merge-using-decls.cpp (contents, props changed) vendor/clang/dist/test/Modules/no-implicit-maps.cpp (contents, props changed) vendor/clang/dist/test/Modules/pr19692.cpp (contents, props changed) vendor/clang/dist/test/Modules/pr20399.cpp (contents, props changed) vendor/clang/dist/test/Modules/pr20786.cpp (contents, props changed) vendor/clang/dist/test/Modules/pr21217.cpp (contents, props changed) vendor/clang/dist/test/Modules/preprocess.m vendor/clang/dist/test/Modules/rebuild.m vendor/clang/dist/test/Modules/relative-dep-gen.cpp (contents, props changed) vendor/clang/dist/test/Modules/stddef.c (contents, props changed) vendor/clang/dist/test/Modules/templates-2.mm vendor/clang/dist/test/Modules/textual-headers.cpp (contents, props changed) vendor/clang/dist/test/Modules/va_list.m vendor/clang/dist/test/Modules/warn-unused-local-typedef.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/atomic_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/atomic_messages.c (contents, props changed) vendor/clang/dist/test/OpenMP/atomic_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/barrier_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/critical_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/flush_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_aligned_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_collapse_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_firstprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_lastprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_linear_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_loop_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_misc_messages.c (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_private_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_reduction_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_safelen_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/for_simd_schedule_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/master_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/ordered_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/ordered_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_firstprivate_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_aligned_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_collapse_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_copyin_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_default_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_firstprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_if_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_lastprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_linear_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_loop_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_misc_messages.c (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_num_threads_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_private_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_proc_bind_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_reduction_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_safelen_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_for_simd_schedule_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_if_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_num_threads_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/parallel_private_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/simd_codegen.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_if_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/target_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_ast_print.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_default_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_firstprivate_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_private_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_reduction_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/teams_shared_messages.cpp (contents, props changed) vendor/clang/dist/test/OpenMP/threadprivate_codegen.cpp (contents, props changed) vendor/clang/dist/test/PCH/chain-openmp-threadprivate.cpp (contents, props changed) vendor/clang/dist/test/Parser/PR21872.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx11-templates.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx1z-attributes.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx1z-fold-expressions.cpp (contents, props changed) vendor/clang/dist/test/Parser/cxx1z-nested-namespace-definition.cpp (contents, props changed) vendor/clang/dist/test/Parser/debugger-import-module.m vendor/clang/dist/test/Parser/eof2.cpp (contents, props changed) vendor/clang/dist/test/Parser/ms-if-exists.c (contents, props changed) vendor/clang/dist/test/Parser/opencl-cl20.cl vendor/clang/dist/test/Parser/vsx.c (contents, props changed) vendor/clang/dist/test/Preprocessor/arm-acle-6.5.c (contents, props changed) vendor/clang/dist/test/Preprocessor/has_attribute.cpp (contents, props changed) vendor/clang/dist/test/Preprocessor/macro-reserved-cxx11.cpp (contents, props changed) vendor/clang/dist/test/Preprocessor/macro-reserved-ms.c (contents, props changed) vendor/clang/dist/test/Preprocessor/macro-reserved.c (contents, props changed) vendor/clang/dist/test/Preprocessor/macro-reserved.cpp (contents, props changed) vendor/clang/dist/test/Profile/Inputs/c-general.profdata.v1 (contents, props changed) vendor/clang/dist/test/Profile/c-unreachable-after-switch.c (contents, props changed) vendor/clang/dist/test/Sema/128bitfloat.cpp (contents, props changed) vendor/clang/dist/test/Sema/align_value.c (contents, props changed) vendor/clang/dist/test/Sema/attr-flag-enum.c (contents, props changed) vendor/clang/dist/test/Sema/attr-nonnull.c (contents, props changed) vendor/clang/dist/test/Sema/builtin-assume-aligned.c (contents, props changed) vendor/clang/dist/test/Sema/builtins-x86.c (contents, props changed) vendor/clang/dist/test/Sema/call-with-static-chain.c (contents, props changed) vendor/clang/dist/test/Sema/decl-microsoft-call-conv.c (contents, props changed) vendor/clang/dist/test/Sema/gnu-attributes.c (contents, props changed) vendor/clang/dist/test/Sema/inline-asm-validate-aarch64.c (contents, props changed) vendor/clang/dist/test/Sema/inline-asm-validate-x86.c (contents, props changed) vendor/clang/dist/test/Sema/sizeof-struct-non-zero-as-member.cl vendor/clang/dist/test/Sema/typo-correction.c (contents, props changed) vendor/clang/dist/test/Sema/warn-cast-qual.c (contents, props changed) vendor/clang/dist/test/Sema/warn-string-conversion.c (contents, props changed) vendor/clang/dist/test/Sema/warn-tautological-compare.c (contents, props changed) vendor/clang/dist/test/SemaCUDA/amdgpu-num-gpr-attr.cu vendor/clang/dist/test/SemaCUDA/implicit-copy.cu vendor/clang/dist/test/SemaCUDA/implicit-intrinsic.cu vendor/clang/dist/test/SemaCUDA/implicit-member-target-collision-cxx11.cu vendor/clang/dist/test/SemaCUDA/implicit-member-target-collision.cu vendor/clang/dist/test/SemaCUDA/implicit-member-target.cu vendor/clang/dist/test/SemaCUDA/method-target.cu vendor/clang/dist/test/SemaCXX/Inputs/header-with-pragma-optimize-off.h (contents, props changed) vendor/clang/dist/test/SemaCXX/Inputs/override-system-header.h (contents, props changed) vendor/clang/dist/test/SemaCXX/MicrosoftSuper.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/PR20705.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/align_value.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/attr-cxx0x-fixit.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/attr-flag-enum-reject.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/attr-gnu.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/attributed-auto-deduction.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/bitfield.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/builtin-assume-aligned-tmpl.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/builtin-assume-aligned.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/call-with-static-chain.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/complex-folding.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/cxx-deprecated.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/cxx11-thread-unsupported.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/devirtualize-vtable-marking.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/libstdcxx_explicit_init_list_hack.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/libstdcxx_pair_swap_hack.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/override-in-system-header.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/typo-correction-delayed.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/vtable-instantiation.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-self-move.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-thread-safety-negative.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-thread-safety-verbose.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-unused-local-typedef-serialize.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-unused-local-typedef-x86asm.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-unused-local-typedef.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-unused-private-field-delayed-template.cpp (contents, props changed) vendor/clang/dist/test/SemaCXX/warn-unused-value-cxx11.cpp (contents, props changed) vendor/clang/dist/test/SemaObjC/attr-availability-1.m vendor/clang/dist/test/SemaObjC/attr-deprecated-pch.m vendor/clang/dist/test/SemaObjC/format-cstrings-warning.m vendor/clang/dist/test/SemaObjC/objc-cf-audited-warning.m vendor/clang/dist/test/SemaObjC/resolve-method-in-global-pool.m vendor/clang/dist/test/SemaObjC/warn-category-method-deprecated.m vendor/clang/dist/test/SemaObjC/warn-explicit-call-initialize.m vendor/clang/dist/test/SemaObjCXX/synchronized.mm vendor/clang/dist/test/SemaOpenCL/address-spaces-conversions-cl2.0.cl vendor/clang/dist/test/SemaOpenCL/amdgpu-num-register-attrs.cl vendor/clang/dist/test/SemaTemplate/crash.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/cxx1z-fold-expressions.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/enum-bool.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/instantiate-scope.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/temp_arg_enum_printing.cpp (contents, props changed) vendor/clang/dist/test/SemaTemplate/temp_arg_nontype_cxx1z.cpp (contents, props changed) vendor/clang/dist/tools/scan-build/c++-analyzer.bat vendor/clang/dist/tools/scan-build/ccc-analyzer.bat vendor/clang/dist/unittests/Basic/DiagnosticTest.cpp (contents, props changed) vendor/clang/dist/unittests/CodeGen/ vendor/clang/dist/unittests/CodeGen/BufferSourceTest.cpp (contents, props changed) vendor/clang/dist/unittests/CodeGen/CMakeLists.txt (contents, props changed) vendor/clang/dist/unittests/CodeGen/Makefile (contents, props changed) vendor/clang/dist/unittests/Format/FormatTestJava.cpp (contents, props changed) vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTestCallVisitor.cpp (contents, props changed) vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTestDeclVisitor.cpp (contents, props changed) vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTestExprVisitor.cpp (contents, props changed) vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTestTypeLocVisitor.cpp (contents, props changed) Deleted: vendor/clang/dist/lib/AST/MangleNumberingContext.cpp vendor/clang/dist/lib/CodeGen/SanitizerBlacklist.cpp vendor/clang/dist/lib/CodeGen/SanitizerBlacklist.h vendor/clang/dist/lib/Driver/WindowsToolChain.cpp vendor/clang/dist/test/CodeGen/builtin-recursive.cc vendor/clang/dist/test/CodeGen/ppc64-varargs-struct.c vendor/clang/dist/test/CodeGen/sections.c vendor/clang/dist/test/CodeGenCXX/nrvo-noreturn.cc vendor/clang/dist/test/Driver/freebsd.cc vendor/clang/dist/test/Parser/nested-namespaces-recovery.cpp vendor/clang/dist/test/Sema/128bitfloat.cc vendor/clang/dist/test/SemaCXX/cxx0x-initializer-stdinitializerlist-system-header.cpp vendor/clang/dist/test/SemaCXX/typo-correction-pt2.cpp vendor/clang/dist/test/SemaCXX/vtable-instantiation.cc Modified: vendor/clang/dist/CMakeLists.txt vendor/clang/dist/CODE_OWNERS.TXT vendor/clang/dist/bindings/python/clang/cindex.py vendor/clang/dist/bindings/python/tests/cindex/test_cursor.py vendor/clang/dist/docs/AddressSanitizer.rst vendor/clang/dist/docs/ClangFormat.rst vendor/clang/dist/docs/ClangFormatStyleOptions.rst vendor/clang/dist/docs/CrossCompilation.rst vendor/clang/dist/docs/InternalsManual.rst vendor/clang/dist/docs/LanguageExtensions.rst vendor/clang/dist/docs/LibASTMatchersReference.html vendor/clang/dist/docs/MSVCCompatibility.rst vendor/clang/dist/docs/Modules.rst vendor/clang/dist/docs/RAVFrontendAction.rst vendor/clang/dist/docs/ReleaseNotes.rst vendor/clang/dist/docs/ThreadSafetyAnalysis.rst vendor/clang/dist/docs/UsersManual.rst vendor/clang/dist/docs/conf.py vendor/clang/dist/docs/tools/dump_format_style.py vendor/clang/dist/examples/PrintFunctionNames/PrintFunctionNames.cpp vendor/clang/dist/examples/clang-interpreter/CMakeLists.txt vendor/clang/dist/examples/clang-interpreter/Makefile vendor/clang/dist/examples/clang-interpreter/main.cpp vendor/clang/dist/include/clang-c/BuildSystem.h vendor/clang/dist/include/clang-c/CXCompilationDatabase.h vendor/clang/dist/include/clang-c/CXErrorCode.h vendor/clang/dist/include/clang-c/CXString.h vendor/clang/dist/include/clang-c/Documentation.h vendor/clang/dist/include/clang-c/Index.h vendor/clang/dist/include/clang-c/Platform.h vendor/clang/dist/include/clang/ARCMigrate/ARCMTActions.h vendor/clang/dist/include/clang/ARCMigrate/FileRemapper.h vendor/clang/dist/include/clang/AST/ASTContext.h vendor/clang/dist/include/clang/AST/ASTDiagnostic.h vendor/clang/dist/include/clang/AST/ASTFwd.h vendor/clang/dist/include/clang/AST/ASTLambda.h vendor/clang/dist/include/clang/AST/ASTMutationListener.h vendor/clang/dist/include/clang/AST/ASTTypeTraits.h vendor/clang/dist/include/clang/AST/ASTVector.h vendor/clang/dist/include/clang/AST/Attr.h vendor/clang/dist/include/clang/AST/CanonicalType.h vendor/clang/dist/include/clang/AST/Comment.h vendor/clang/dist/include/clang/AST/CommentBriefParser.h vendor/clang/dist/include/clang/AST/CommentCommandTraits.h vendor/clang/dist/include/clang/AST/CommentDiagnostic.h vendor/clang/dist/include/clang/AST/CommentLexer.h vendor/clang/dist/include/clang/AST/CommentParser.h vendor/clang/dist/include/clang/AST/CommentSema.h vendor/clang/dist/include/clang/AST/DataRecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Decl.h vendor/clang/dist/include/clang/AST/DeclBase.h vendor/clang/dist/include/clang/AST/DeclCXX.h vendor/clang/dist/include/clang/AST/DeclLookups.h vendor/clang/dist/include/clang/AST/DeclObjC.h vendor/clang/dist/include/clang/AST/DeclOpenMP.h vendor/clang/dist/include/clang/AST/DeclTemplate.h vendor/clang/dist/include/clang/AST/DeclarationName.h vendor/clang/dist/include/clang/AST/DependentDiagnostic.h vendor/clang/dist/include/clang/AST/EvaluatedExprVisitor.h vendor/clang/dist/include/clang/AST/Expr.h vendor/clang/dist/include/clang/AST/ExprCXX.h vendor/clang/dist/include/clang/AST/ExprObjC.h vendor/clang/dist/include/clang/AST/ExternalASTSource.h vendor/clang/dist/include/clang/AST/LambdaCapture.h vendor/clang/dist/include/clang/AST/Mangle.h vendor/clang/dist/include/clang/AST/MangleNumberingContext.h vendor/clang/dist/include/clang/AST/NSAPI.h vendor/clang/dist/include/clang/AST/NestedNameSpecifier.h vendor/clang/dist/include/clang/AST/OpenMPClause.h vendor/clang/dist/include/clang/AST/OperationKinds.h vendor/clang/dist/include/clang/AST/ParentMap.h vendor/clang/dist/include/clang/AST/PrettyPrinter.h vendor/clang/dist/include/clang/AST/RawCommentList.h vendor/clang/dist/include/clang/AST/RecordLayout.h vendor/clang/dist/include/clang/AST/RecursiveASTVisitor.h vendor/clang/dist/include/clang/AST/Stmt.h vendor/clang/dist/include/clang/AST/StmtGraphTraits.h vendor/clang/dist/include/clang/AST/StmtIterator.h vendor/clang/dist/include/clang/AST/StmtOpenMP.h vendor/clang/dist/include/clang/AST/TemplateBase.h vendor/clang/dist/include/clang/AST/Type.h vendor/clang/dist/include/clang/AST/TypeLoc.h vendor/clang/dist/include/clang/AST/TypeOrdering.h vendor/clang/dist/include/clang/AST/UnresolvedSet.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchFinder.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchers.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchersInternal.h vendor/clang/dist/include/clang/ASTMatchers/ASTMatchersMacros.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Diagnostics.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Parser.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/Registry.h vendor/clang/dist/include/clang/ASTMatchers/Dynamic/VariantValue.h vendor/clang/dist/include/clang/Analysis/Analyses/CFGReachabilityAnalysis.h vendor/clang/dist/include/clang/Analysis/Analyses/Consumed.h vendor/clang/dist/include/clang/Analysis/Analyses/Dominators.h vendor/clang/dist/include/clang/Analysis/Analyses/FormatString.h vendor/clang/dist/include/clang/Analysis/Analyses/LiveVariables.h vendor/clang/dist/include/clang/Analysis/Analyses/PostOrderCFGView.h vendor/clang/dist/include/clang/Analysis/Analyses/PseudoConstantAnalysis.h vendor/clang/dist/include/clang/Analysis/Analyses/ReachableCode.h vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafety.h vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafetyCommon.h vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafetyLogical.h vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafetyOps.def vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafetyTIL.h vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafetyTraverse.h vendor/clang/dist/include/clang/Analysis/Analyses/ThreadSafetyUtil.h vendor/clang/dist/include/clang/Analysis/Analyses/UninitializedValues.h vendor/clang/dist/include/clang/Analysis/AnalysisContext.h vendor/clang/dist/include/clang/Analysis/AnalysisDiagnostic.h vendor/clang/dist/include/clang/Analysis/CFG.h vendor/clang/dist/include/clang/Analysis/CFGStmtMap.h vendor/clang/dist/include/clang/Analysis/CallGraph.h vendor/clang/dist/include/clang/Analysis/DomainSpecific/CocoaConventions.h vendor/clang/dist/include/clang/Analysis/DomainSpecific/ObjCNoReturn.h vendor/clang/dist/include/clang/Analysis/ProgramPoint.h vendor/clang/dist/include/clang/Analysis/Support/BumpVector.h vendor/clang/dist/include/clang/Basic/ABI.h vendor/clang/dist/include/clang/Basic/AddressSpaces.h vendor/clang/dist/include/clang/Basic/AllDiagnostics.h vendor/clang/dist/include/clang/Basic/Attr.td vendor/clang/dist/include/clang/Basic/AttrDocs.td vendor/clang/dist/include/clang/Basic/AttrKinds.h vendor/clang/dist/include/clang/Basic/Attributes.h vendor/clang/dist/include/clang/Basic/Builtins.def vendor/clang/dist/include/clang/Basic/Builtins.h vendor/clang/dist/include/clang/Basic/BuiltinsAArch64.def vendor/clang/dist/include/clang/Basic/BuiltinsARM.def vendor/clang/dist/include/clang/Basic/BuiltinsNVPTX.def vendor/clang/dist/include/clang/Basic/BuiltinsPPC.def vendor/clang/dist/include/clang/Basic/BuiltinsR600.def vendor/clang/dist/include/clang/Basic/BuiltinsX86.def vendor/clang/dist/include/clang/Basic/CharInfo.h vendor/clang/dist/include/clang/Basic/CommentOptions.h vendor/clang/dist/include/clang/Basic/Diagnostic.h vendor/clang/dist/include/clang/Basic/DiagnosticASTKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticCommonKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticDriverKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticFrontendKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticGroups.td vendor/clang/dist/include/clang/Basic/DiagnosticIDs.h vendor/clang/dist/include/clang/Basic/DiagnosticLexKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticOptions.def vendor/clang/dist/include/clang/Basic/DiagnosticOptions.h vendor/clang/dist/include/clang/Basic/DiagnosticParseKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSemaKinds.td vendor/clang/dist/include/clang/Basic/DiagnosticSerializationKinds.td vendor/clang/dist/include/clang/Basic/ExceptionSpecificationType.h vendor/clang/dist/include/clang/Basic/ExpressionTraits.h vendor/clang/dist/include/clang/Basic/FileManager.h vendor/clang/dist/include/clang/Basic/FileSystemStatCache.h vendor/clang/dist/include/clang/Basic/IdentifierTable.h vendor/clang/dist/include/clang/Basic/LLVM.h vendor/clang/dist/include/clang/Basic/Lambda.h vendor/clang/dist/include/clang/Basic/LangOptions.def vendor/clang/dist/include/clang/Basic/LangOptions.h vendor/clang/dist/include/clang/Basic/Module.h vendor/clang/dist/include/clang/Basic/ObjCRuntime.h vendor/clang/dist/include/clang/Basic/OpenMPKinds.def vendor/clang/dist/include/clang/Basic/OpenMPKinds.h vendor/clang/dist/include/clang/Basic/OperatorKinds.h vendor/clang/dist/include/clang/Basic/OperatorPrecedence.h vendor/clang/dist/include/clang/Basic/PartialDiagnostic.h vendor/clang/dist/include/clang/Basic/PlistSupport.h vendor/clang/dist/include/clang/Basic/PrettyStackTrace.h vendor/clang/dist/include/clang/Basic/Sanitizers.def vendor/clang/dist/include/clang/Basic/SourceLocation.h vendor/clang/dist/include/clang/Basic/SourceManager.h vendor/clang/dist/include/clang/Basic/SourceManagerInternals.h vendor/clang/dist/include/clang/Basic/Specifiers.h vendor/clang/dist/include/clang/Basic/StmtNodes.td vendor/clang/dist/include/clang/Basic/TargetBuiltins.h vendor/clang/dist/include/clang/Basic/TargetCXXABI.h vendor/clang/dist/include/clang/Basic/TargetInfo.h vendor/clang/dist/include/clang/Basic/TargetOptions.h vendor/clang/dist/include/clang/Basic/TemplateKinds.h vendor/clang/dist/include/clang/Basic/TokenKinds.def vendor/clang/dist/include/clang/Basic/TokenKinds.h vendor/clang/dist/include/clang/Basic/TypeTraits.h vendor/clang/dist/include/clang/Basic/VersionTuple.h vendor/clang/dist/include/clang/Basic/VirtualFileSystem.h vendor/clang/dist/include/clang/Basic/arm_neon.td vendor/clang/dist/include/clang/CodeGen/BackendUtil.h vendor/clang/dist/include/clang/CodeGen/CGFunctionInfo.h vendor/clang/dist/include/clang/CodeGen/CodeGenABITypes.h vendor/clang/dist/include/clang/CodeGen/CodeGenAction.h vendor/clang/dist/include/clang/CodeGen/ModuleBuilder.h vendor/clang/dist/include/clang/Config/config.h.cmake vendor/clang/dist/include/clang/Config/config.h.in vendor/clang/dist/include/clang/Driver/Action.h vendor/clang/dist/include/clang/Driver/CC1Options.td vendor/clang/dist/include/clang/Driver/CLCompatOptions.td vendor/clang/dist/include/clang/Driver/Compilation.h vendor/clang/dist/include/clang/Driver/Driver.h vendor/clang/dist/include/clang/Driver/DriverDiagnostic.h vendor/clang/dist/include/clang/Driver/Job.h vendor/clang/dist/include/clang/Driver/Multilib.h vendor/clang/dist/include/clang/Driver/Options.h vendor/clang/dist/include/clang/Driver/Options.td vendor/clang/dist/include/clang/Driver/Phases.h vendor/clang/dist/include/clang/Driver/SanitizerArgs.h vendor/clang/dist/include/clang/Driver/Tool.h vendor/clang/dist/include/clang/Driver/ToolChain.h vendor/clang/dist/include/clang/Driver/Types.h vendor/clang/dist/include/clang/Driver/Util.h vendor/clang/dist/include/clang/Format/Format.h vendor/clang/dist/include/clang/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Frontend/ASTUnit.h vendor/clang/dist/include/clang/Frontend/ChainedDiagnosticConsumer.h vendor/clang/dist/include/clang/Frontend/CodeGenOptions.def vendor/clang/dist/include/clang/Frontend/CodeGenOptions.h vendor/clang/dist/include/clang/Frontend/CompilerInstance.h vendor/clang/dist/include/clang/Frontend/DiagnosticRenderer.h vendor/clang/dist/include/clang/Frontend/FrontendAction.h vendor/clang/dist/include/clang/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Frontend/FrontendDiagnostic.h vendor/clang/dist/include/clang/Frontend/FrontendOptions.h vendor/clang/dist/include/clang/Frontend/FrontendPluginRegistry.h vendor/clang/dist/include/clang/Frontend/LangStandard.h vendor/clang/dist/include/clang/Frontend/LangStandards.def vendor/clang/dist/include/clang/Frontend/LogDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/MigratorOptions.h vendor/clang/dist/include/clang/Frontend/MultiplexConsumer.h vendor/clang/dist/include/clang/Frontend/SerializedDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/TextDiagnostic.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticBuffer.h vendor/clang/dist/include/clang/Frontend/TextDiagnosticPrinter.h vendor/clang/dist/include/clang/Frontend/Utils.h vendor/clang/dist/include/clang/Frontend/VerifyDiagnosticConsumer.h vendor/clang/dist/include/clang/Lex/ExternalPreprocessorSource.h vendor/clang/dist/include/clang/Lex/HeaderMap.h vendor/clang/dist/include/clang/Lex/HeaderSearch.h vendor/clang/dist/include/clang/Lex/HeaderSearchOptions.h vendor/clang/dist/include/clang/Lex/LexDiagnostic.h vendor/clang/dist/include/clang/Lex/Lexer.h vendor/clang/dist/include/clang/Lex/LiteralSupport.h vendor/clang/dist/include/clang/Lex/MacroArgs.h vendor/clang/dist/include/clang/Lex/MacroInfo.h vendor/clang/dist/include/clang/Lex/ModuleLoader.h vendor/clang/dist/include/clang/Lex/ModuleMap.h vendor/clang/dist/include/clang/Lex/MultipleIncludeOpt.h vendor/clang/dist/include/clang/Lex/PPCallbacks.h vendor/clang/dist/include/clang/Lex/PTHLexer.h vendor/clang/dist/include/clang/Lex/PTHManager.h vendor/clang/dist/include/clang/Lex/Pragma.h vendor/clang/dist/include/clang/Lex/Preprocessor.h vendor/clang/dist/include/clang/Lex/PreprocessorLexer.h vendor/clang/dist/include/clang/Lex/ScratchBuffer.h vendor/clang/dist/include/clang/Lex/Token.h vendor/clang/dist/include/clang/Lex/TokenConcatenation.h vendor/clang/dist/include/clang/Lex/TokenLexer.h vendor/clang/dist/include/clang/Parse/ParseDiagnostic.h vendor/clang/dist/include/clang/Parse/Parser.h vendor/clang/dist/include/clang/Rewrite/Core/DeltaTree.h vendor/clang/dist/include/clang/Rewrite/Core/HTMLRewrite.h vendor/clang/dist/include/clang/Rewrite/Core/RewriteRope.h vendor/clang/dist/include/clang/Rewrite/Core/Rewriter.h vendor/clang/dist/include/clang/Rewrite/Core/TokenRewriter.h vendor/clang/dist/include/clang/Rewrite/Frontend/ASTConsumers.h vendor/clang/dist/include/clang/Rewrite/Frontend/FixItRewriter.h vendor/clang/dist/include/clang/Rewrite/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Rewrite/Frontend/Rewriters.h vendor/clang/dist/include/clang/Sema/AnalysisBasedWarnings.h vendor/clang/dist/include/clang/Sema/AttributeList.h vendor/clang/dist/include/clang/Sema/DeclSpec.h vendor/clang/dist/include/clang/Sema/DelayedDiagnostic.h vendor/clang/dist/include/clang/Sema/ExternalSemaSource.h vendor/clang/dist/include/clang/Sema/IdentifierResolver.h vendor/clang/dist/include/clang/Sema/Lookup.h vendor/clang/dist/include/clang/Sema/LoopHint.h vendor/clang/dist/include/clang/Sema/MultiplexExternalSemaSource.h vendor/clang/dist/include/clang/Sema/ObjCMethodList.h vendor/clang/dist/include/clang/Sema/Overload.h vendor/clang/dist/include/clang/Sema/PrettyDeclStackTrace.h vendor/clang/dist/include/clang/Sema/Scope.h vendor/clang/dist/include/clang/Sema/ScopeInfo.h vendor/clang/dist/include/clang/Sema/Sema.h vendor/clang/dist/include/clang/Sema/SemaDiagnostic.h vendor/clang/dist/include/clang/Sema/SemaFixItUtils.h vendor/clang/dist/include/clang/Sema/SemaInternal.h vendor/clang/dist/include/clang/Sema/SemaLambda.h vendor/clang/dist/include/clang/Sema/TemplateDeduction.h vendor/clang/dist/include/clang/Sema/TypoCorrection.h vendor/clang/dist/include/clang/Serialization/ASTBitCodes.h vendor/clang/dist/include/clang/Serialization/ASTDeserializationListener.h vendor/clang/dist/include/clang/Serialization/ASTReader.h vendor/clang/dist/include/clang/Serialization/ASTWriter.h vendor/clang/dist/include/clang/Serialization/ContinuousRangeMap.h vendor/clang/dist/include/clang/Serialization/GlobalModuleIndex.h vendor/clang/dist/include/clang/Serialization/Module.h vendor/clang/dist/include/clang/Serialization/ModuleManager.h vendor/clang/dist/include/clang/Serialization/SerializationDiagnostic.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/LocalCheckers.h vendor/clang/dist/include/clang/StaticAnalyzer/Checkers/ObjCRetainCount.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/AnalyzerOptions.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporter.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/BugType.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/CommonBugCategories.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/Checker.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/CheckerManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathDiagnosticConsumers.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/APSIntType.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/AnalysisManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/BlockCounter.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerHelpers.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ConstraintManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/DynamicTypeInfo.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramStateTrait.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState_Fwd.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/Store.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/StoreRef.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/TaintManager.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/TaintTag.h vendor/clang/dist/include/clang/StaticAnalyzer/Core/PathSensitive/WorkList.h vendor/clang/dist/include/clang/StaticAnalyzer/Frontend/AnalysisConsumer.h vendor/clang/dist/include/clang/StaticAnalyzer/Frontend/CheckerRegistration.h vendor/clang/dist/include/clang/StaticAnalyzer/Frontend/FrontendActions.h vendor/clang/dist/include/clang/Tooling/ArgumentsAdjusters.h vendor/clang/dist/include/clang/Tooling/CommonOptionsParser.h vendor/clang/dist/include/clang/Tooling/CompilationDatabase.h vendor/clang/dist/include/clang/Tooling/CompilationDatabasePluginRegistry.h vendor/clang/dist/include/clang/Tooling/FileMatchTrie.h vendor/clang/dist/include/clang/Tooling/JSONCompilationDatabase.h vendor/clang/dist/include/clang/Tooling/Refactoring.h vendor/clang/dist/include/clang/Tooling/RefactoringCallbacks.h vendor/clang/dist/include/clang/Tooling/ReplacementsYaml.h vendor/clang/dist/include/clang/Tooling/Tooling.h vendor/clang/dist/include/clang/module.modulemap vendor/clang/dist/lib/ARCMigrate/ARCMT.cpp vendor/clang/dist/lib/ARCMigrate/FileRemapper.cpp vendor/clang/dist/lib/ARCMigrate/Internals.h vendor/clang/dist/lib/ARCMigrate/ObjCMT.cpp vendor/clang/dist/lib/ARCMigrate/PlistReporter.cpp vendor/clang/dist/lib/ARCMigrate/TransformActions.cpp vendor/clang/dist/lib/AST/APValue.cpp vendor/clang/dist/lib/AST/ASTContext.cpp vendor/clang/dist/lib/AST/ASTDiagnostic.cpp vendor/clang/dist/lib/AST/ASTDumper.cpp vendor/clang/dist/lib/AST/ASTImporter.cpp vendor/clang/dist/lib/AST/ASTTypeTraits.cpp vendor/clang/dist/lib/AST/CMakeLists.txt vendor/clang/dist/lib/AST/CXXABI.h vendor/clang/dist/lib/AST/Comment.cpp vendor/clang/dist/lib/AST/CommentCommandTraits.cpp vendor/clang/dist/lib/AST/CommentLexer.cpp vendor/clang/dist/lib/AST/Decl.cpp vendor/clang/dist/lib/AST/DeclBase.cpp vendor/clang/dist/lib/AST/DeclCXX.cpp vendor/clang/dist/lib/AST/DeclObjC.cpp vendor/clang/dist/lib/AST/DeclPrinter.cpp vendor/clang/dist/lib/AST/Expr.cpp vendor/clang/dist/lib/AST/ExprCXX.cpp vendor/clang/dist/lib/AST/ExprClassification.cpp vendor/clang/dist/lib/AST/ExprConstant.cpp vendor/clang/dist/lib/AST/ItaniumCXXABI.cpp vendor/clang/dist/lib/AST/ItaniumMangle.cpp vendor/clang/dist/lib/AST/Mangle.cpp vendor/clang/dist/lib/AST/MicrosoftCXXABI.cpp vendor/clang/dist/lib/AST/MicrosoftMangle.cpp vendor/clang/dist/lib/AST/NSAPI.cpp vendor/clang/dist/lib/AST/NestedNameSpecifier.cpp vendor/clang/dist/lib/AST/RecordLayoutBuilder.cpp vendor/clang/dist/lib/AST/Stmt.cpp vendor/clang/dist/lib/AST/StmtPrinter.cpp vendor/clang/dist/lib/AST/StmtProfile.cpp vendor/clang/dist/lib/AST/TemplateBase.cpp vendor/clang/dist/lib/AST/Type.cpp vendor/clang/dist/lib/AST/TypeLoc.cpp vendor/clang/dist/lib/AST/TypePrinter.cpp vendor/clang/dist/lib/AST/VTTBuilder.cpp vendor/clang/dist/lib/AST/VTableBuilder.cpp vendor/clang/dist/lib/ASTMatchers/ASTMatchFinder.cpp vendor/clang/dist/lib/ASTMatchers/ASTMatchersInternal.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Marshallers.h vendor/clang/dist/lib/ASTMatchers/Dynamic/Parser.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/Registry.cpp vendor/clang/dist/lib/ASTMatchers/Dynamic/VariantValue.cpp vendor/clang/dist/lib/Analysis/AnalysisDeclContext.cpp vendor/clang/dist/lib/Analysis/BodyFarm.cpp vendor/clang/dist/lib/Analysis/BodyFarm.h vendor/clang/dist/lib/Analysis/CFG.cpp vendor/clang/dist/lib/Analysis/CMakeLists.txt vendor/clang/dist/lib/Analysis/CallGraph.cpp vendor/clang/dist/lib/Analysis/FormatString.cpp vendor/clang/dist/lib/Analysis/FormatStringParsing.h vendor/clang/dist/lib/Analysis/LiveVariables.cpp vendor/clang/dist/lib/Analysis/PrintfFormatString.cpp vendor/clang/dist/lib/Analysis/ReachableCode.cpp vendor/clang/dist/lib/Analysis/ScanfFormatString.cpp vendor/clang/dist/lib/Analysis/ThreadSafety.cpp vendor/clang/dist/lib/Analysis/ThreadSafetyCommon.cpp vendor/clang/dist/lib/Analysis/ThreadSafetyTIL.cpp vendor/clang/dist/lib/Analysis/UninitializedValues.cpp vendor/clang/dist/lib/Basic/Attributes.cpp vendor/clang/dist/lib/Basic/CMakeLists.txt vendor/clang/dist/lib/Basic/Diagnostic.cpp vendor/clang/dist/lib/Basic/DiagnosticIDs.cpp vendor/clang/dist/lib/Basic/FileManager.cpp vendor/clang/dist/lib/Basic/FileSystemStatCache.cpp vendor/clang/dist/lib/Basic/IdentifierTable.cpp vendor/clang/dist/lib/Basic/LangOptions.cpp vendor/clang/dist/lib/Basic/Module.cpp vendor/clang/dist/lib/Basic/OpenMPKinds.cpp vendor/clang/dist/lib/Basic/SourceLocation.cpp vendor/clang/dist/lib/Basic/SourceManager.cpp vendor/clang/dist/lib/Basic/TargetInfo.cpp vendor/clang/dist/lib/Basic/Targets.cpp vendor/clang/dist/lib/Basic/Version.cpp vendor/clang/dist/lib/Basic/VersionTuple.cpp vendor/clang/dist/lib/Basic/VirtualFileSystem.cpp vendor/clang/dist/lib/CodeGen/ABIInfo.h vendor/clang/dist/lib/CodeGen/BackendUtil.cpp vendor/clang/dist/lib/CodeGen/CGAtomic.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.cpp vendor/clang/dist/lib/CodeGen/CGBlocks.h vendor/clang/dist/lib/CodeGen/CGBuilder.h vendor/clang/dist/lib/CodeGen/CGBuiltin.cpp vendor/clang/dist/lib/CodeGen/CGCUDARuntime.cpp vendor/clang/dist/lib/CodeGen/CGCUDARuntime.h vendor/clang/dist/lib/CodeGen/CGCXX.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.cpp vendor/clang/dist/lib/CodeGen/CGCXXABI.h vendor/clang/dist/lib/CodeGen/CGCall.cpp vendor/clang/dist/lib/CodeGen/CGCall.h vendor/clang/dist/lib/CodeGen/CGClass.cpp vendor/clang/dist/lib/CodeGen/CGCleanup.cpp vendor/clang/dist/lib/CodeGen/CGCleanup.h vendor/clang/dist/lib/CodeGen/CGDebugInfo.cpp vendor/clang/dist/lib/CodeGen/CGDebugInfo.h vendor/clang/dist/lib/CodeGen/CGDecl.cpp vendor/clang/dist/lib/CodeGen/CGDeclCXX.cpp vendor/clang/dist/lib/CodeGen/CGException.cpp vendor/clang/dist/lib/CodeGen/CGExpr.cpp vendor/clang/dist/lib/CodeGen/CGExprCXX.cpp vendor/clang/dist/lib/CodeGen/CGExprComplex.cpp vendor/clang/dist/lib/CodeGen/CGExprConstant.cpp vendor/clang/dist/lib/CodeGen/CGExprScalar.cpp vendor/clang/dist/lib/CodeGen/CGLoopInfo.cpp vendor/clang/dist/lib/CodeGen/CGLoopInfo.h vendor/clang/dist/lib/CodeGen/CGObjC.cpp vendor/clang/dist/lib/CodeGen/CGObjCGNU.cpp vendor/clang/dist/lib/CodeGen/CGObjCMac.cpp vendor/clang/dist/lib/CodeGen/CGObjCRuntime.h vendor/clang/dist/lib/CodeGen/CGOpenCLRuntime.h vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.cpp vendor/clang/dist/lib/CodeGen/CGOpenMPRuntime.h vendor/clang/dist/lib/CodeGen/CGRecordLayout.h vendor/clang/dist/lib/CodeGen/CGRecordLayoutBuilder.cpp vendor/clang/dist/lib/CodeGen/CGStmt.cpp vendor/clang/dist/lib/CodeGen/CGStmtOpenMP.cpp vendor/clang/dist/lib/CodeGen/CGVTables.cpp vendor/clang/dist/lib/CodeGen/CGVTables.h vendor/clang/dist/lib/CodeGen/CGValue.h vendor/clang/dist/lib/CodeGen/CMakeLists.txt vendor/clang/dist/lib/CodeGen/CodeGenABITypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenAction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.cpp vendor/clang/dist/lib/CodeGen/CodeGenFunction.h vendor/clang/dist/lib/CodeGen/CodeGenModule.cpp vendor/clang/dist/lib/CodeGen/CodeGenModule.h vendor/clang/dist/lib/CodeGen/CodeGenPGO.cpp vendor/clang/dist/lib/CodeGen/CodeGenPGO.h vendor/clang/dist/lib/CodeGen/CodeGenTBAA.h vendor/clang/dist/lib/CodeGen/CodeGenTypes.cpp vendor/clang/dist/lib/CodeGen/CodeGenTypes.h vendor/clang/dist/lib/CodeGen/EHScopeStack.h vendor/clang/dist/lib/CodeGen/ItaniumCXXABI.cpp vendor/clang/dist/lib/CodeGen/MicrosoftCXXABI.cpp vendor/clang/dist/lib/CodeGen/ModuleBuilder.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.cpp vendor/clang/dist/lib/CodeGen/TargetInfo.h vendor/clang/dist/lib/Driver/Action.cpp vendor/clang/dist/lib/Driver/CMakeLists.txt vendor/clang/dist/lib/Driver/Compilation.cpp vendor/clang/dist/lib/Driver/Driver.cpp vendor/clang/dist/lib/Driver/InputInfo.h vendor/clang/dist/lib/Driver/Job.cpp vendor/clang/dist/lib/Driver/Multilib.cpp vendor/clang/dist/lib/Driver/Phases.cpp vendor/clang/dist/lib/Driver/SanitizerArgs.cpp vendor/clang/dist/lib/Driver/Tool.cpp vendor/clang/dist/lib/Driver/ToolChain.cpp vendor/clang/dist/lib/Driver/ToolChains.cpp vendor/clang/dist/lib/Driver/ToolChains.h vendor/clang/dist/lib/Driver/Tools.cpp vendor/clang/dist/lib/Driver/Tools.h vendor/clang/dist/lib/Driver/Types.cpp vendor/clang/dist/lib/Edit/EditedSource.cpp vendor/clang/dist/lib/Edit/RewriteObjCFoundationAPI.cpp vendor/clang/dist/lib/Format/BreakableToken.cpp vendor/clang/dist/lib/Format/BreakableToken.h vendor/clang/dist/lib/Format/CMakeLists.txt vendor/clang/dist/lib/Format/ContinuationIndenter.cpp vendor/clang/dist/lib/Format/ContinuationIndenter.h vendor/clang/dist/lib/Format/Encoding.h vendor/clang/dist/lib/Format/Format.cpp vendor/clang/dist/lib/Format/FormatToken.cpp vendor/clang/dist/lib/Format/FormatToken.h vendor/clang/dist/lib/Format/TokenAnnotator.cpp vendor/clang/dist/lib/Format/TokenAnnotator.h vendor/clang/dist/lib/Format/UnwrappedLineParser.cpp vendor/clang/dist/lib/Format/UnwrappedLineParser.h vendor/clang/dist/lib/Format/WhitespaceManager.cpp vendor/clang/dist/lib/Format/WhitespaceManager.h vendor/clang/dist/lib/Frontend/ASTConsumers.cpp vendor/clang/dist/lib/Frontend/ASTMerge.cpp vendor/clang/dist/lib/Frontend/ASTUnit.cpp vendor/clang/dist/lib/Frontend/CMakeLists.txt vendor/clang/dist/lib/Frontend/CacheTokens.cpp vendor/clang/dist/lib/Frontend/ChainedIncludesSource.cpp vendor/clang/dist/lib/Frontend/CompilerInstance.cpp vendor/clang/dist/lib/Frontend/CompilerInvocation.cpp vendor/clang/dist/lib/Frontend/CreateInvocationFromCommandLine.cpp vendor/clang/dist/lib/Frontend/DependencyFile.cpp vendor/clang/dist/lib/Frontend/DependencyGraph.cpp vendor/clang/dist/lib/Frontend/DiagnosticRenderer.cpp vendor/clang/dist/lib/Frontend/FrontendAction.cpp vendor/clang/dist/lib/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Frontend/HeaderIncludeGen.cpp vendor/clang/dist/lib/Frontend/InitHeaderSearch.cpp vendor/clang/dist/lib/Frontend/InitPreprocessor.cpp vendor/clang/dist/lib/Frontend/LogDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/ModuleDependencyCollector.cpp vendor/clang/dist/lib/Frontend/MultiplexConsumer.cpp vendor/clang/dist/lib/Frontend/PrintPreprocessedOutput.cpp vendor/clang/dist/lib/Frontend/Rewrite/FixItRewriter.cpp vendor/clang/dist/lib/Frontend/Rewrite/FrontendActions.cpp vendor/clang/dist/lib/Frontend/Rewrite/HTMLPrint.cpp vendor/clang/dist/lib/Frontend/Rewrite/InclusionRewriter.cpp vendor/clang/dist/lib/Frontend/Rewrite/RewriteModernObjC.cpp vendor/clang/dist/lib/Frontend/Rewrite/RewriteObjC.cpp vendor/clang/dist/lib/Frontend/SerializedDiagnosticPrinter.cpp vendor/clang/dist/lib/Frontend/TextDiagnostic.cpp vendor/clang/dist/lib/Frontend/VerifyDiagnosticConsumer.cpp vendor/clang/dist/lib/FrontendTool/ExecuteCompilerInvocation.cpp vendor/clang/dist/lib/Headers/CMakeLists.txt vendor/clang/dist/lib/Headers/Intrin.h vendor/clang/dist/lib/Headers/altivec.h vendor/clang/dist/lib/Headers/arm_acle.h vendor/clang/dist/lib/Headers/bmiintrin.h vendor/clang/dist/lib/Headers/cpuid.h vendor/clang/dist/lib/Headers/emmintrin.h vendor/clang/dist/lib/Headers/float.h vendor/clang/dist/lib/Headers/immintrin.h vendor/clang/dist/lib/Headers/lzcntintrin.h vendor/clang/dist/lib/Headers/module.modulemap vendor/clang/dist/lib/Headers/shaintrin.h vendor/clang/dist/lib/Headers/stddef.h vendor/clang/dist/lib/Headers/unwind.h vendor/clang/dist/lib/Headers/xmmintrin.h vendor/clang/dist/lib/Index/CMakeLists.txt vendor/clang/dist/lib/Index/CommentToXML.cpp vendor/clang/dist/lib/Index/SimpleFormatContext.h vendor/clang/dist/lib/Index/USRGeneration.cpp vendor/clang/dist/lib/Lex/HeaderMap.cpp vendor/clang/dist/lib/Lex/HeaderSearch.cpp vendor/clang/dist/lib/Lex/Lexer.cpp vendor/clang/dist/lib/Lex/LiteralSupport.cpp vendor/clang/dist/lib/Lex/MacroArgs.cpp vendor/clang/dist/lib/Lex/ModuleMap.cpp vendor/clang/dist/lib/Lex/PPDirectives.cpp vendor/clang/dist/lib/Lex/PPExpressions.cpp vendor/clang/dist/lib/Lex/PPLexerChange.cpp vendor/clang/dist/lib/Lex/PPMacroExpansion.cpp vendor/clang/dist/lib/Lex/PTHLexer.cpp vendor/clang/dist/lib/Lex/Pragma.cpp vendor/clang/dist/lib/Lex/Preprocessor.cpp vendor/clang/dist/lib/Lex/ScratchBuffer.cpp vendor/clang/dist/lib/Lex/TokenConcatenation.cpp vendor/clang/dist/lib/Lex/TokenLexer.cpp vendor/clang/dist/lib/Lex/UnicodeCharSets.h vendor/clang/dist/lib/Parse/ParseAST.cpp vendor/clang/dist/lib/Parse/ParseCXXInlineMethods.cpp vendor/clang/dist/lib/Parse/ParseDecl.cpp vendor/clang/dist/lib/Parse/ParseDeclCXX.cpp vendor/clang/dist/lib/Parse/ParseExpr.cpp vendor/clang/dist/lib/Parse/ParseExprCXX.cpp vendor/clang/dist/lib/Parse/ParseInit.cpp vendor/clang/dist/lib/Parse/ParseObjc.cpp vendor/clang/dist/lib/Parse/ParseOpenMP.cpp vendor/clang/dist/lib/Parse/ParsePragma.cpp vendor/clang/dist/lib/Parse/ParseStmt.cpp vendor/clang/dist/lib/Parse/ParseStmtAsm.cpp vendor/clang/dist/lib/Parse/ParseTemplate.cpp vendor/clang/dist/lib/Parse/ParseTentative.cpp vendor/clang/dist/lib/Parse/Parser.cpp vendor/clang/dist/lib/Parse/RAIIObjectsForParser.h vendor/clang/dist/lib/Rewrite/CMakeLists.txt vendor/clang/dist/lib/Rewrite/RewriteRope.cpp vendor/clang/dist/lib/Rewrite/Rewriter.cpp vendor/clang/dist/lib/Sema/AnalysisBasedWarnings.cpp vendor/clang/dist/lib/Sema/AttributeList.cpp vendor/clang/dist/lib/Sema/CMakeLists.txt vendor/clang/dist/lib/Sema/DeclSpec.cpp vendor/clang/dist/lib/Sema/IdentifierResolver.cpp vendor/clang/dist/lib/Sema/JumpDiagnostics.cpp vendor/clang/dist/lib/Sema/MultiplexExternalSemaSource.cpp vendor/clang/dist/lib/Sema/Scope.cpp vendor/clang/dist/lib/Sema/ScopeInfo.cpp vendor/clang/dist/lib/Sema/Sema.cpp vendor/clang/dist/lib/Sema/SemaAccess.cpp vendor/clang/dist/lib/Sema/SemaAttr.cpp vendor/clang/dist/lib/Sema/SemaCXXScopeSpec.cpp vendor/clang/dist/lib/Sema/SemaCast.cpp vendor/clang/dist/lib/Sema/SemaChecking.cpp vendor/clang/dist/lib/Sema/SemaCodeComplete.cpp vendor/clang/dist/lib/Sema/SemaDecl.cpp vendor/clang/dist/lib/Sema/SemaDeclAttr.cpp vendor/clang/dist/lib/Sema/SemaDeclCXX.cpp vendor/clang/dist/lib/Sema/SemaDeclObjC.cpp vendor/clang/dist/lib/Sema/SemaExceptionSpec.cpp vendor/clang/dist/lib/Sema/SemaExpr.cpp vendor/clang/dist/lib/Sema/SemaExprCXX.cpp vendor/clang/dist/lib/Sema/SemaExprMember.cpp vendor/clang/dist/lib/Sema/SemaExprObjC.cpp vendor/clang/dist/lib/Sema/SemaInit.cpp vendor/clang/dist/lib/Sema/SemaLambda.cpp vendor/clang/dist/lib/Sema/SemaLookup.cpp vendor/clang/dist/lib/Sema/SemaObjCProperty.cpp vendor/clang/dist/lib/Sema/SemaOpenMP.cpp vendor/clang/dist/lib/Sema/SemaOverload.cpp vendor/clang/dist/lib/Sema/SemaPseudoObject.cpp vendor/clang/dist/lib/Sema/SemaStmt.cpp vendor/clang/dist/lib/Sema/SemaStmtAsm.cpp vendor/clang/dist/lib/Sema/SemaStmtAttr.cpp vendor/clang/dist/lib/Sema/SemaTemplate.cpp vendor/clang/dist/lib/Sema/SemaTemplateDeduction.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiate.cpp vendor/clang/dist/lib/Sema/SemaTemplateInstantiateDecl.cpp vendor/clang/dist/lib/Sema/SemaTemplateVariadic.cpp vendor/clang/dist/lib/Sema/SemaType.cpp vendor/clang/dist/lib/Sema/TreeTransform.h vendor/clang/dist/lib/Sema/TypeLocBuilder.h vendor/clang/dist/lib/Serialization/ASTCommon.cpp vendor/clang/dist/lib/Serialization/ASTCommon.h vendor/clang/dist/lib/Serialization/ASTReader.cpp vendor/clang/dist/lib/Serialization/ASTReaderDecl.cpp vendor/clang/dist/lib/Serialization/ASTReaderInternals.h vendor/clang/dist/lib/Serialization/ASTReaderStmt.cpp vendor/clang/dist/lib/Serialization/ASTWriter.cpp vendor/clang/dist/lib/Serialization/ASTWriterDecl.cpp vendor/clang/dist/lib/Serialization/ASTWriterStmt.cpp vendor/clang/dist/lib/Serialization/GlobalModuleIndex.cpp vendor/clang/dist/lib/Serialization/Module.cpp vendor/clang/dist/lib/Serialization/ModuleManager.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/AllocationDiagnostics.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/BuiltinFunctionChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CStringChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/Checkers.td vendor/clang/dist/lib/StaticAnalyzer/Checkers/ClangSACheckers.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/IdenticalExprChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/InterCheckerAPI.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/MacOSKeychainAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/MallocSizeofChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/NonNullParamChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/SelectorExtras.h vendor/clang/dist/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/TestAfterDivZeroChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UndefCapturedBlockVarChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/UnixAPIChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Checkers/VirtualCallChecker.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/AnalysisManager.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/AnalyzerOptions.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporter.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CallEvent.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/CoreEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExplodedGraph.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/ExprEngine.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/MemRegion.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/PathDiagnostic.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/PrettyStackTraceLocationContext.h vendor/clang/dist/lib/StaticAnalyzer/Core/ProgramState.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/RangeConstraintManager.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/RegionStore.cpp vendor/clang/dist/lib/StaticAnalyzer/Core/SimpleConstraintManager.h vendor/clang/dist/lib/StaticAnalyzer/Core/Store.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/CMakeLists.txt vendor/clang/dist/lib/StaticAnalyzer/Frontend/CheckerRegistration.cpp vendor/clang/dist/lib/StaticAnalyzer/Frontend/FrontendActions.cpp vendor/clang/dist/lib/Tooling/ArgumentsAdjusters.cpp vendor/clang/dist/lib/Tooling/CMakeLists.txt vendor/clang/dist/lib/Tooling/CommonOptionsParser.cpp vendor/clang/dist/lib/Tooling/CompilationDatabase.cpp vendor/clang/dist/lib/Tooling/JSONCompilationDatabase.cpp vendor/clang/dist/lib/Tooling/Makefile vendor/clang/dist/lib/Tooling/Refactoring.cpp vendor/clang/dist/lib/Tooling/Tooling.cpp vendor/clang/dist/runtime/CMakeLists.txt vendor/clang/dist/runtime/compiler-rt/Makefile vendor/clang/dist/test/ARCMT/checking.m vendor/clang/dist/test/ARCMT/objcmt-boxing.m vendor/clang/dist/test/ARCMT/objcmt-boxing.m.result vendor/clang/dist/test/ARCMT/objcmt-ns-macros.m vendor/clang/dist/test/ARCMT/objcmt-ns-macros.m.result vendor/clang/dist/test/Analysis/Malloc+MismatchedDeallocator+NewDelete.cpp vendor/clang/dist/test/Analysis/Malloc+NewDelete_intersections.cpp vendor/clang/dist/test/Analysis/NSContainers.m vendor/clang/dist/test/Analysis/NewDelete+MismatchedDeallocator_intersections.cpp vendor/clang/dist/test/Analysis/NewDelete-checker-test.cpp vendor/clang/dist/test/Analysis/NewDelete-custom.cpp vendor/clang/dist/test/Analysis/NewDelete-intersections.mm vendor/clang/dist/test/Analysis/NewDelete-variadic.cpp vendor/clang/dist/test/Analysis/NewDeleteLeaks-PR18394.cpp vendor/clang/dist/test/Analysis/bstring.c vendor/clang/dist/test/Analysis/builtin-functions.cpp vendor/clang/dist/test/Analysis/cfg.cpp vendor/clang/dist/test/Analysis/debug-CallGraph.c vendor/clang/dist/test/Analysis/identical-expressions.cpp vendor/clang/dist/test/Analysis/logical-ops.c vendor/clang/dist/test/Analysis/misc-ps.m vendor/clang/dist/test/Analysis/nonnull.m vendor/clang/dist/test/Analysis/objc-boxing.m vendor/clang/dist/test/Analysis/pthreadlock.c vendor/clang/dist/test/Analysis/temp-obj-dtors-cfg-output.cpp vendor/clang/dist/test/Analysis/temporaries.cpp vendor/clang/dist/test/Analysis/virtualcall.cpp vendor/clang/dist/test/CXX/basic/basic.types/p10.cpp vendor/clang/dist/test/CXX/class.access/class.friend/p11.cpp vendor/clang/dist/test/CXX/class/class.mem/p2.cpp vendor/clang/dist/test/CXX/dcl.dcl/basic.namespace/namespace.udecl/p8-cxx0x.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.attr/dcl.attr.deprecated/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p1.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p3.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p4.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p5.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p8.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.constexpr/p9.cpp vendor/clang/dist/test/CXX/dcl.dcl/dcl.spec/dcl.typedef/p2-0x.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.fct.def/dcl.fct.def.default/p2.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.list/p3-0x.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/dcl.init.ref/p5-cxx03-extra-copy.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.init/p6.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p13.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/dcl.fct/p14.cpp vendor/clang/dist/test/CXX/dcl.decl/dcl.meaning/p1.cpp vendor/clang/dist/test/CXX/drs/dr0xx.cpp vendor/clang/dist/test/CXX/drs/dr10xx.cpp vendor/clang/dist/test/CXX/drs/dr13xx.cpp vendor/clang/dist/test/CXX/drs/dr14xx.cpp vendor/clang/dist/test/CXX/drs/dr15xx.cpp vendor/clang/dist/test/CXX/drs/dr1xx.cpp vendor/clang/dist/test/CXX/drs/dr2xx.cpp vendor/clang/dist/test/CXX/drs/dr3xx.cpp vendor/clang/dist/test/CXX/drs/dr412.cpp vendor/clang/dist/test/CXX/drs/dr4xx.cpp vendor/clang/dist/test/CXX/drs/dr5xx.cpp vendor/clang/dist/test/CXX/drs/dr9xx.cpp vendor/clang/dist/test/CXX/except/except.spec/p1.cpp vendor/clang/dist/test/CXX/expr/expr.const/p2-0x.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.general/p3-0x.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p19.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p2-generic-lambda-1y.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p2.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p3.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/p4.cpp vendor/clang/dist/test/CXX/expr/expr.prim/expr.prim.lambda/templates.cpp vendor/clang/dist/test/CXX/expr/expr.unary/expr.unary.noexcept/sema.cpp vendor/clang/dist/test/CXX/lex/lex.literal/lex.ext/p3.cpp vendor/clang/dist/test/CXX/lex/lex.trigraph/p1.cpp vendor/clang/dist/test/CXX/lex/lex.trigraph/p2.cpp vendor/clang/dist/test/CXX/lex/lex.trigraph/p3.cpp vendor/clang/dist/test/CXX/stmt.stmt/stmt.dcl/p3-0x.cpp vendor/clang/dist/test/CXX/stmt.stmt/stmt.dcl/p3.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.class/temp.static/p1.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.friend/p5.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/metafunctions.cpp vendor/clang/dist/test/CXX/temp/temp.decls/temp.variadic/p5.cpp vendor/clang/dist/test/CXX/temp/temp.param/p5.cpp vendor/clang/dist/test/CXX/temp/temp.spec/temp.explicit/p1-0x.cpp vendor/clang/dist/test/CodeGen/2003-08-21-WideString.c vendor/clang/dist/test/CodeGen/2005-06-15-ExpandGotoInternalProblem.c vendor/clang/dist/test/CodeGen/2005-09-24-AsmUserPrefix.c vendor/clang/dist/test/CodeGen/2007-06-18-SextAttrAggregate.c vendor/clang/dist/test/CodeGen/2008-07-22-bitfield-init-after-zero-len-array.c vendor/clang/dist/test/CodeGen/2009-07-15-pad-wchar_t-array.c vendor/clang/dist/test/CodeGen/2009-10-20-GlobalDebug.c vendor/clang/dist/test/CodeGen/2010-02-15-DbgStaticVar.c vendor/clang/dist/test/CodeGen/2010-07-08-DeclDebugLineNo.c vendor/clang/dist/test/CodeGen/Atomics.c vendor/clang/dist/test/CodeGen/aarch64-poly64.c vendor/clang/dist/test/CodeGen/aarch64-type-sizes.c vendor/clang/dist/test/CodeGen/aarch64-varargs.c vendor/clang/dist/test/CodeGen/address-safety-attr.cpp vendor/clang/dist/test/CodeGen/alias.c vendor/clang/dist/test/CodeGen/arm-aapcs-vfp.c vendor/clang/dist/test/CodeGen/arm-arguments.c vendor/clang/dist/test/CodeGen/arm-homogenous.c vendor/clang/dist/test/CodeGen/arm-metadata.c vendor/clang/dist/test/CodeGen/arm64-aapcs-arguments.c vendor/clang/dist/test/CodeGen/arm64-arguments.c vendor/clang/dist/test/CodeGen/arm64-be-bitfield.c vendor/clang/dist/test/CodeGen/arm64-be-hfa-vararg.c vendor/clang/dist/test/CodeGen/arm64-lanes.c vendor/clang/dist/test/CodeGen/arm_acle.c vendor/clang/dist/test/CodeGen/arm_neon_intrinsics.c vendor/clang/dist/test/CodeGen/asan-globals.cpp vendor/clang/dist/test/CodeGen/asm.c vendor/clang/dist/test/CodeGen/atomic-ops-libcall.c vendor/clang/dist/test/CodeGen/atomic-ops.c vendor/clang/dist/test/CodeGen/atomic.c vendor/clang/dist/test/CodeGen/atomic_ops.c vendor/clang/dist/test/CodeGen/atomics-inlining.c vendor/clang/dist/test/CodeGen/attr-naked.c vendor/clang/dist/test/CodeGen/attr-optnone.c vendor/clang/dist/test/CodeGen/attributes.c vendor/clang/dist/test/CodeGen/avx2-builtins.c vendor/clang/dist/test/CodeGen/bmi2-builtins.c vendor/clang/dist/test/CodeGen/bool_test.c vendor/clang/dist/test/CodeGen/builtin-assume.c vendor/clang/dist/test/CodeGen/builtins-arm.c vendor/clang/dist/test/CodeGen/builtins-arm64.c vendor/clang/dist/test/CodeGen/builtins-nvptx.c vendor/clang/dist/test/CodeGen/builtins-ppc-altivec.c vendor/clang/dist/test/CodeGen/builtins-x86.c vendor/clang/dist/test/CodeGen/builtins.c vendor/clang/dist/test/CodeGen/c11atomics-ios.c vendor/clang/dist/test/CodeGen/c11atomics.c vendor/clang/dist/test/CodeGen/captured-statements-nested.c vendor/clang/dist/test/CodeGen/captured-statements.c vendor/clang/dist/test/CodeGen/catch-undef-behavior.c vendor/clang/dist/test/CodeGen/complex.c vendor/clang/dist/test/CodeGen/compound-assign-overflow.c vendor/clang/dist/test/CodeGen/const-init.c vendor/clang/dist/test/CodeGen/debug-info-args.c vendor/clang/dist/test/CodeGen/debug-info-block-decl.c vendor/clang/dist/test/CodeGen/debug-info-enum.c vendor/clang/dist/test/CodeGen/debug-info-line3.c vendor/clang/dist/test/CodeGen/debug-info-line4.c vendor/clang/dist/test/CodeGen/debug-info-scope-file.c vendor/clang/dist/test/CodeGen/debug-info-scope.c vendor/clang/dist/test/CodeGen/debug-info-typedef.c vendor/clang/dist/test/CodeGen/debug-info-version.c vendor/clang/dist/test/CodeGen/debug-info-vla.c vendor/clang/dist/test/CodeGen/debug-info.c vendor/clang/dist/test/CodeGen/dependent-lib.c vendor/clang/dist/test/CodeGen/designated-initializers.c vendor/clang/dist/test/CodeGen/dllimport.c vendor/clang/dist/test/CodeGen/dwarf-version.c vendor/clang/dist/test/CodeGen/lineno-dbginfo.c vendor/clang/dist/test/CodeGen/linetable-endscope.c vendor/clang/dist/test/CodeGen/link-bitcode-file.c vendor/clang/dist/test/CodeGen/lzcnt-builtins.c vendor/clang/dist/test/CodeGen/mangle-windows.c vendor/clang/dist/test/CodeGen/may-alias.c vendor/clang/dist/test/CodeGen/merge-statics.c vendor/clang/dist/test/CodeGen/microsoft-call-conv.c vendor/clang/dist/test/CodeGen/mips-constraint-regs.c vendor/clang/dist/test/CodeGen/mips-constraints-mem.c vendor/clang/dist/test/CodeGen/mips-inline-asm-modifiers.c vendor/clang/dist/test/CodeGen/mips-varargs.c vendor/clang/dist/test/CodeGen/mmx-inline-asm-error.c vendor/clang/dist/test/CodeGen/mozilla-ms-inline-asm.c vendor/clang/dist/test/CodeGen/mrtd.c vendor/clang/dist/test/CodeGen/ms-declspecs.c vendor/clang/dist/test/CodeGen/ms-inline-asm.c vendor/clang/dist/test/CodeGen/ms-inline-asm.cpp vendor/clang/dist/test/CodeGen/ms-intrinsics.c vendor/clang/dist/test/CodeGen/mult-alt-generic.c vendor/clang/dist/test/CodeGen/named_reg_global.c vendor/clang/dist/test/CodeGen/nonnull.c vendor/clang/dist/test/CodeGen/nvptx-abi.c vendor/clang/dist/test/CodeGen/ppc64le-aggregates.c vendor/clang/dist/test/CodeGen/pr5406.c vendor/clang/dist/test/CodeGen/pragma-comment.c vendor/clang/dist/test/CodeGen/pragma-detect_mismatch.c vendor/clang/dist/test/CodeGen/pragma-loop.cpp vendor/clang/dist/test/CodeGen/pragma-unroll.cpp vendor/clang/dist/test/CodeGen/pragma-weak.c vendor/clang/dist/test/CodeGen/predefined-expr.c vendor/clang/dist/test/CodeGen/sanitize-init-order.cpp vendor/clang/dist/test/CodeGen/sanitize-recover.c vendor/clang/dist/test/CodeGen/sse-builtins.c vendor/clang/dist/test/CodeGen/target-data.c vendor/clang/dist/test/CodeGen/tbaa-class.cpp vendor/clang/dist/test/CodeGen/tbaa-for-vptr.cpp vendor/clang/dist/test/CodeGen/tbaa-ms-abi.cpp vendor/clang/dist/test/CodeGen/tbaa-struct.cpp vendor/clang/dist/test/CodeGen/tbaa.cpp vendor/clang/dist/test/CodeGen/transparent-union.c vendor/clang/dist/test/CodeGen/ubsan-type-blacklist.cpp vendor/clang/dist/test/CodeGen/wchar-const.c vendor/clang/dist/test/CodeGen/x86_32-inline-asm.c vendor/clang/dist/test/CodeGen/xcore-stringtype.c vendor/clang/dist/test/CodeGenCUDA/launch-bounds.cu vendor/clang/dist/test/CodeGenCUDA/ptx-kernels.cu vendor/clang/dist/test/CodeGenCXX/2010-07-23-DeclLoc.cpp vendor/clang/dist/test/CodeGenCXX/PR20038.cpp vendor/clang/dist/test/CodeGenCXX/atomicinit.cpp vendor/clang/dist/test/CodeGenCXX/attr-used.cpp vendor/clang/dist/test/CodeGenCXX/catch-undef-behavior.cpp vendor/clang/dist/test/CodeGenCXX/class-layout.cpp vendor/clang/dist/test/CodeGenCXX/compound-literals.cpp vendor/clang/dist/test/CodeGenCXX/constructor-destructor-return-this.cpp vendor/clang/dist/test/CodeGenCXX/constructor-init.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-synthesis-2.cpp vendor/clang/dist/test/CodeGenCXX/copy-constructor-synthesis.cpp vendor/clang/dist/test/CodeGenCXX/coverage.cpp vendor/clang/dist/test/CodeGenCXX/crash.cpp vendor/clang/dist/test/CodeGenCXX/ctor-dtor-alias.cpp vendor/clang/dist/test/CodeGenCXX/cxx11-exception-spec.cpp vendor/clang/dist/test/CodeGenCXX/cxx11-special-members.cpp vendor/clang/dist/test/CodeGenCXX/cxx11-thread-local.cpp vendor/clang/dist/test/CodeGenCXX/cxx1y-initializer-aggregate.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-alias.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-artificial-arg.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-class.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-cxx1y.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-decl-nested.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-enum-class.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-enum.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-flex-member.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-function-context.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-global.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-globalinit.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-line-if.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-method.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-namespace.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-qualifiers.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-rvalue-ref.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-scope.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-static-fns.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-static-member.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template-explicit-specialization.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template-limit.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template-member.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template-partial-specialization.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template-quals.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-template.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-thunk.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-union-template.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-uuid.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-varargs.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-wchar.cpp vendor/clang/dist/test/CodeGenCXX/debug-info-zero-length-arrays.cpp vendor/clang/dist/test/CodeGenCXX/debug-info.cpp vendor/clang/dist/test/CodeGenCXX/debug-lambda-expressions.cpp vendor/clang/dist/test/CodeGenCXX/debug-lambda-this.cpp vendor/clang/dist/test/CodeGenCXX/destructor-debug-info.cpp vendor/clang/dist/test/CodeGenCXX/destructors.cpp vendor/clang/dist/test/CodeGenCXX/devirtualize-virtual-function-calls-final.cpp vendor/clang/dist/test/CodeGenCXX/dllexport-members.cpp vendor/clang/dist/test/CodeGenCXX/dllexport.cpp vendor/clang/dist/test/CodeGenCXX/dllimport-members.cpp vendor/clang/dist/test/CodeGenCXX/dllimport-rtti.cpp vendor/clang/dist/test/CodeGenCXX/dllimport.cpp vendor/clang/dist/test/CodeGenCXX/duplicate-mangled-name.cpp vendor/clang/dist/test/CodeGenCXX/explicit-instantiation.cpp vendor/clang/dist/test/CodeGenCXX/extern-c.cpp vendor/clang/dist/test/CodeGenCXX/field-access-debug-info.cpp vendor/clang/dist/test/CodeGenCXX/funcsig.cpp vendor/clang/dist/test/CodeGenCXX/function-template-specialization.cpp vendor/clang/dist/test/CodeGenCXX/globalinit-loc.cpp vendor/clang/dist/test/CodeGenCXX/lambda-expressions.cpp vendor/clang/dist/test/CodeGenCXX/linetable-cleanup.cpp vendor/clang/dist/test/CodeGenCXX/linetable-eh.cpp vendor/clang/dist/test/CodeGenCXX/linetable-fnbegin.cpp vendor/clang/dist/test/CodeGenCXX/lpad-linetable.cpp vendor/clang/dist/test/CodeGenCXX/mangle-exprs.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms-cxx11.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms-cxx14.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms-string-literals.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms-templates.cpp vendor/clang/dist/test/CodeGenCXX/mangle-ms.cpp vendor/clang/dist/test/CodeGenCXX/mangle.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-byval-sret.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-dynamic-cast.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-member-pointers.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-multiple-nonvirtual-inheritance.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-nontrivial-covariant-thunk.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-static-initializers.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-structors.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-thunks.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-typeid.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vftables.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-virtual-inheritance-vtordisps.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-virtual-member-pointers.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-return-adjustment.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vtables-multiple-nonvirtual-inheritance-this-adjustment.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vtables-return-thunks.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vtables-single-inheritance.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance-vtordisps.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-abi-vtables-virtual-inheritance.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-interface.cpp vendor/clang/dist/test/CodeGenCXX/microsoft-no-rtti-data.cpp vendor/clang/dist/test/CodeGenCXX/ms-integer-static-data-members-exported.cpp vendor/clang/dist/test/CodeGenCXX/ms-integer-static-data-members.cpp vendor/clang/dist/test/CodeGenCXX/pod-member-memcpys.cpp vendor/clang/dist/test/CodeGenCXX/pointers-to-data-members.cpp vendor/clang/dist/test/CodeGenCXX/pr12251.cpp vendor/clang/dist/test/CodeGenCXX/pr18962.cpp vendor/clang/dist/test/CodeGenCXX/pragma-init_seg.cpp vendor/clang/dist/test/CodeGenCXX/predefined-expr.cpp vendor/clang/dist/test/CodeGenCXX/runtimecc.cpp vendor/clang/dist/test/CodeGenCXX/skip-vtable-pointer-initialization.cpp vendor/clang/dist/test/CodeGenCXX/split-stacks.cpp vendor/clang/dist/test/CodeGenCXX/static-data-member.cpp vendor/clang/dist/test/CodeGenCXX/static-init.cpp vendor/clang/dist/test/CodeGenCXX/static-local-in-local-class.cpp vendor/clang/dist/test/CodeGenCXX/static-member-variable-explicit-specialization.cpp vendor/clang/dist/test/CodeGenCXX/temporaries.cpp vendor/clang/dist/test/CodeGenCXX/try-catch.cpp vendor/clang/dist/test/CodeGenCXX/unknown-anytype.cpp vendor/clang/dist/test/CodeGenCXX/virtual-base-cast.cpp vendor/clang/dist/test/CodeGenCXX/virtual-destructor-calls.cpp vendor/clang/dist/test/CodeGenCXX/virtual-operator-call.cpp vendor/clang/dist/test/CodeGenCXX/vtable-pointer-initialization.cpp vendor/clang/dist/test/CodeGenCXX/x86_64-arguments.cpp vendor/clang/dist/test/CodeGenObjC/2010-02-09-DbgSelf.m vendor/clang/dist/test/CodeGenObjC/2010-02-15-Dbg-MethodStart.m vendor/clang/dist/test/CodeGenObjC/arc-foreach.m vendor/clang/dist/test/CodeGenObjC/arc-linetable-autorelease.m vendor/clang/dist/test/CodeGenObjC/arc-linetable.m vendor/clang/dist/test/CodeGenObjC/arc-literals.m vendor/clang/dist/test/CodeGenObjC/arc-loadweakretained-release.m vendor/clang/dist/test/CodeGenObjC/arc-precise-lifetime.m vendor/clang/dist/test/CodeGenObjC/arc-property.m vendor/clang/dist/test/CodeGenObjC/arc.m vendor/clang/dist/test/CodeGenObjC/arm-atomic-scalar-setter-getter.m vendor/clang/dist/test/CodeGenObjC/block-byref-debuginfo.m vendor/clang/dist/test/CodeGenObjC/boxing.m vendor/clang/dist/test/CodeGenObjC/catch-lexical-block.m vendor/clang/dist/test/CodeGenObjC/category-super-class-meth.m vendor/clang/dist/test/CodeGenObjC/debug-info-block-captured-self.m vendor/clang/dist/test/CodeGenObjC/debug-info-blocks.m vendor/clang/dist/test/CodeGenObjC/debug-info-getter-name.m vendor/clang/dist/test/CodeGenObjC/debug-info-id-with-protocol.m vendor/clang/dist/test/CodeGenObjC/debug-info-instancetype.m vendor/clang/dist/test/CodeGenObjC/debug-info-ivars-extension.m vendor/clang/dist/test/CodeGenObjC/debug-info-lifetime-crash.m vendor/clang/dist/test/CodeGenObjC/debug-info-property-accessors.m vendor/clang/dist/test/CodeGenObjC/debug-info-property3.m vendor/clang/dist/test/CodeGenObjC/debug-info-self.m vendor/clang/dist/test/CodeGenObjC/debug-info-static-var.m vendor/clang/dist/test/CodeGenObjC/debug-info-synthesis.m vendor/clang/dist/test/CodeGenObjC/debug-property-synth.m vendor/clang/dist/test/CodeGenObjC/encode-test.m vendor/clang/dist/test/CodeGenObjC/exceptions-asm-attribute.m vendor/clang/dist/test/CodeGenObjC/externally-initialized-selectors.m vendor/clang/dist/test/CodeGenObjC/forward-protocol-metadata-symbols.m vendor/clang/dist/test/CodeGenObjC/image-info.m vendor/clang/dist/test/CodeGenObjC/ivar-layout-64.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-32.m vendor/clang/dist/test/CodeGenObjC/metadata-symbols-64.m vendor/clang/dist/test/CodeGenObjC/metadata_symbols.m vendor/clang/dist/test/CodeGenObjC/non-lazy-classes.m vendor/clang/dist/test/CodeGenObjC/objc-align.m vendor/clang/dist/test/CodeGenObjC/objc-container-subscripting-1.m vendor/clang/dist/test/CodeGenObjC/objc-fixed-enum.m vendor/clang/dist/test/CodeGenObjC/optimize-ivar-offset-load.m vendor/clang/dist/test/CodeGenObjC/optimized-setter-ios-device.m vendor/clang/dist/test/CodeGenObjC/property-array-type.m vendor/clang/dist/test/CodeGenObjC/property-type-mismatch.m vendor/clang/dist/test/CodeGenObjC/property.m vendor/clang/dist/test/CodeGenObjC/reorder-synthesized-ivars.m vendor/clang/dist/test/CodeGenObjC/selector-ref-invariance.m vendor/clang/dist/test/CodeGenObjC/super-message-fragileabi.m vendor/clang/dist/test/CodeGenObjC/tentative-cfconstantstring.m vendor/clang/dist/test/CodeGenObjCXX/arc-cxx11-member-init.mm vendor/clang/dist/test/CodeGenObjCXX/arc-references.mm vendor/clang/dist/test/CodeGenObjCXX/arc.mm vendor/clang/dist/test/CodeGenObjCXX/externally-initialized-selectors.mm vendor/clang/dist/test/CodeGenObjCXX/lambda-expressions.mm vendor/clang/dist/test/CodeGenObjCXX/lvalue-reference-getter.mm vendor/clang/dist/test/CodeGenObjCXX/mangle-blocks.mm vendor/clang/dist/test/CodeGenObjCXX/property-lvalue-capture.mm vendor/clang/dist/test/CodeGenObjCXX/property-object-reference.mm vendor/clang/dist/test/CodeGenObjCXX/property-objects.mm vendor/clang/dist/test/CodeGenOpenCL/addr-space-struct-arg.cl vendor/clang/dist/test/CodeGenOpenCL/address-space-constant-initializers.cl vendor/clang/dist/test/CodeGenOpenCL/builtins-r600.cl vendor/clang/dist/test/CodeGenOpenCL/fpmath.cl vendor/clang/dist/test/CodeGenOpenCL/kernel-arg-info.cl vendor/clang/dist/test/CodeGenOpenCL/kernel-attributes.cl vendor/clang/dist/test/CodeGenOpenCL/kernel-metadata.cl vendor/clang/dist/test/CodeGenOpenCL/local.cl vendor/clang/dist/test/CodeGenOpenCL/opencl_types.cl vendor/clang/dist/test/CodeGenOpenCL/ptx-calls.cl vendor/clang/dist/test/CodeGenOpenCL/ptx-kernels.cl vendor/clang/dist/test/CodeGenOpenCL/str_literals.cl vendor/clang/dist/test/Coverage/html-diagnostics.c vendor/clang/dist/test/Driver/B-opt.c vendor/clang/dist/test/Driver/aarch64-cpus.c vendor/clang/dist/test/Driver/arm-alignment.c vendor/clang/dist/test/Driver/arm-cortex-cpus.c vendor/clang/dist/test/Driver/arm-fixed-r9.c vendor/clang/dist/test/Driver/arm-mfpu.c vendor/clang/dist/test/Driver/ast.c vendor/clang/dist/test/Driver/cl-inputs.c vendor/clang/dist/test/Driver/cl-link.c vendor/clang/dist/test/Driver/cl-options.c vendor/clang/dist/test/Driver/cl-outputs.c vendor/clang/dist/test/Driver/clang-g-opts.c vendor/clang/dist/test/Driver/clang_f_opts.c vendor/clang/dist/test/Driver/constructors.c vendor/clang/dist/test/Driver/crash-report-modules.m vendor/clang/dist/test/Driver/crash-report.c vendor/clang/dist/test/Driver/cross-linux.c vendor/clang/dist/test/Driver/darwin-arch-default.c vendor/clang/dist/test/Driver/darwin-debug-flags.c vendor/clang/dist/test/Driver/darwin-dsymutil.c vendor/clang/dist/test/Driver/darwin-ld.c vendor/clang/dist/test/Driver/darwin-sanitizer-ld.c vendor/clang/dist/test/Driver/darwin-sdkroot.c vendor/clang/dist/test/Driver/darwin-verify-debug.c vendor/clang/dist/test/Driver/debug-options.c vendor/clang/dist/test/Driver/freebsd.c vendor/clang/dist/test/Driver/fsanitize.c vendor/clang/dist/test/Driver/gcc-version-debug.c vendor/clang/dist/test/Driver/gcc_forward.c vendor/clang/dist/test/Driver/hexagon-toolchain-elf.c vendor/clang/dist/test/Driver/hexagon-toolchain.c vendor/clang/dist/test/Driver/ident_md.c vendor/clang/dist/test/Driver/instrprof-ld.c vendor/clang/dist/test/Driver/le32-unknown-nacl.cpp vendor/clang/dist/test/Driver/linux-header-search.cpp vendor/clang/dist/test/Driver/linux-ld.c vendor/clang/dist/test/Driver/lto.c vendor/clang/dist/test/Driver/mips-as.c vendor/clang/dist/test/Driver/mips-cs.cpp vendor/clang/dist/test/Driver/mips-features.c vendor/clang/dist/test/Driver/mips-fsf.cpp vendor/clang/dist/test/Driver/mips-integrated-as.s vendor/clang/dist/test/Driver/mips-reduced-toolchain.cpp vendor/clang/dist/test/Driver/modules.m vendor/clang/dist/test/Driver/modules.mm vendor/clang/dist/test/Driver/msvc_forward.c vendor/clang/dist/test/Driver/netbsd.c vendor/clang/dist/test/Driver/netbsd.cpp vendor/clang/dist/test/Driver/openbsd.c vendor/clang/dist/test/Driver/phases.c vendor/clang/dist/test/Driver/pic.c vendor/clang/dist/test/Driver/ppc-features.cpp vendor/clang/dist/test/Driver/prefixed-tools.c vendor/clang/dist/test/Driver/r600-mcpu.cl vendor/clang/dist/test/Driver/rewrite-legacy-objc.m vendor/clang/dist/test/Driver/rewrite-objc.m vendor/clang/dist/test/Driver/sanitizer-ld.c vendor/clang/dist/test/Driver/save-temps.c vendor/clang/dist/test/Driver/sparc-float.c vendor/clang/dist/test/Driver/split-debug.c vendor/clang/dist/test/Driver/split-debug.s vendor/clang/dist/test/Driver/std.c vendor/clang/dist/test/Driver/unknown-gcc-arch.c vendor/clang/dist/test/Driver/warning-options.cpp vendor/clang/dist/test/FixIt/fixit-cxx1y-compat.cpp vendor/clang/dist/test/FixIt/fixit-errors.c vendor/clang/dist/test/FixIt/fixit-unrecoverable.cpp vendor/clang/dist/test/FixIt/fixit.cpp vendor/clang/dist/test/Frontend/exceptions.c vendor/clang/dist/test/Frontend/invalid-o-level.c vendor/clang/dist/test/Frontend/output-failures.c vendor/clang/dist/test/Frontend/print-header-includes.c vendor/clang/dist/test/Headers/altivec-header.c vendor/clang/dist/test/Headers/c11.c vendor/clang/dist/test/Headers/cxx11.cpp vendor/clang/dist/test/Headers/ms-intrin.cpp vendor/clang/dist/test/Headers/x86intrin.c vendor/clang/dist/test/Index/Inputs/module.map vendor/clang/dist/test/Index/annotate-deep-statements.cpp vendor/clang/dist/test/Index/attributes-cuda.cu vendor/clang/dist/test/Index/comment-c-decls.c vendor/clang/dist/test/Index/comment-to-html-xml-conversion.cpp vendor/clang/dist/test/Index/cursor-dynamic-call.mm vendor/clang/dist/test/Index/cxx11-lambdas.cpp vendor/clang/dist/test/Index/format-comment-cdecls.c vendor/clang/dist/test/Index/get-cursor.cpp vendor/clang/dist/test/Index/index-many-call-ops.cpp vendor/clang/dist/test/Index/index-many-logical-ops.c vendor/clang/dist/test/Index/index-module.m vendor/clang/dist/test/Index/index-templates.cpp vendor/clang/dist/test/Index/overriding-ftemplate-comments.cpp vendor/clang/dist/test/Index/overriding-method-comments.mm vendor/clang/dist/test/Index/preamble_macro_template.cpp vendor/clang/dist/test/Index/skip-parsed-bodies/compile_commands.json vendor/clang/dist/test/Index/usrs-cxx0x.cpp vendor/clang/dist/test/Index/usrs.cpp vendor/clang/dist/test/Layout/ms-x86-basic-layout.cpp vendor/clang/dist/test/Layout/ms-x86-pack-and-align.cpp vendor/clang/dist/test/Layout/ms-x86-vtordisp.cpp vendor/clang/dist/test/Lexer/bcpl-escaped-newline.c vendor/clang/dist/test/Lexer/block_cmt_end.c vendor/clang/dist/test/Lexer/constants.c vendor/clang/dist/test/Lexer/cxx-features.cpp vendor/clang/dist/test/Lexer/cxx1z-trigraphs.cpp vendor/clang/dist/test/Lexer/escape_newline.c vendor/clang/dist/test/Lexer/has_extension.c vendor/clang/dist/test/Lexer/has_feature_c1x.c vendor/clang/dist/test/Lexer/has_feature_cxx0x.cpp vendor/clang/dist/test/Lexer/string-literal-errors.cpp vendor/clang/dist/test/Lexer/utf8-char-literal.cpp vendor/clang/dist/test/Lexer/wchar-signedness.c vendor/clang/dist/test/Misc/ast-dump-arm-attr.c vendor/clang/dist/test/Misc/ast-dump-attr.cpp vendor/clang/dist/test/Misc/ast-dump-color.cpp vendor/clang/dist/test/Misc/ast-dump-decl.cpp vendor/clang/dist/test/Misc/ast-dump-msp430-attr.c vendor/clang/dist/test/Misc/ast-dump-templates.cpp vendor/clang/dist/test/Misc/ast-print-pragmas.cpp vendor/clang/dist/test/Misc/serialized-diags.m vendor/clang/dist/test/Misc/warning-flags.c vendor/clang/dist/test/Modules/Inputs/StdDef/module.map vendor/clang/dist/test/Modules/Inputs/cxx-decls-imported.h vendor/clang/dist/test/Modules/Inputs/cxx-decls-merged.h vendor/clang/dist/test/Modules/Inputs/cxx-irgen-left.h vendor/clang/dist/test/Modules/Inputs/cxx-irgen-right.h vendor/clang/dist/test/Modules/Inputs/cxx-irgen-top.h vendor/clang/dist/test/Modules/Inputs/cxx-templates-a.h vendor/clang/dist/test/Modules/Inputs/cxx-templates-b.h vendor/clang/dist/test/Modules/Inputs/cxx-templates-c.h vendor/clang/dist/test/Modules/Inputs/cxx-templates-common.h vendor/clang/dist/test/Modules/Inputs/declare-use/module.map vendor/clang/dist/test/Modules/Inputs/diamond_left.h vendor/clang/dist/test/Modules/Inputs/diamond_top.h vendor/clang/dist/test/Modules/Inputs/macros_right_undef.h vendor/clang/dist/test/Modules/Inputs/macros_top.h vendor/clang/dist/test/Modules/Inputs/malformed/module.map vendor/clang/dist/test/Modules/Inputs/modular_maps/common.h vendor/clang/dist/test/Modules/Inputs/module.map vendor/clang/dist/test/Modules/Inputs/odr/a.h vendor/clang/dist/test/Modules/Inputs/odr/b.h vendor/clang/dist/test/Modules/Inputs/pch-used.h vendor/clang/dist/test/Modules/Inputs/templates-left.h vendor/clang/dist/test/Modules/Inputs/templates-right.h vendor/clang/dist/test/Modules/Inputs/templates-top.h vendor/clang/dist/test/Modules/Rmodule-build.m vendor/clang/dist/test/Modules/Werror-Wsystem-headers.m vendor/clang/dist/test/Modules/Werror.m vendor/clang/dist/test/Modules/autolink.m vendor/clang/dist/test/Modules/cstd.m vendor/clang/dist/test/Modules/cxx-decls.cpp vendor/clang/dist/test/Modules/cxx-irgen.cpp vendor/clang/dist/test/Modules/cxx-templates.cpp vendor/clang/dist/test/Modules/dependency-gen.m vendor/clang/dist/test/Modules/fmodules-validate-once-per-build-session.c vendor/clang/dist/test/Modules/incomplete-module.m vendor/clang/dist/test/Modules/load-after-failure.m vendor/clang/dist/test/Modules/macro-reexport/c1.h vendor/clang/dist/test/Modules/macro-reexport/d1.h vendor/clang/dist/test/Modules/macro-reexport/macro-reexport.cpp vendor/clang/dist/test/Modules/macro-reexport/module.modulemap vendor/clang/dist/test/Modules/macros.c vendor/clang/dist/test/Modules/malformed.cpp vendor/clang/dist/test/Modules/modular_maps.cpp vendor/clang/dist/test/Modules/module_file_info.m vendor/clang/dist/test/Modules/modules-with-same-name.m vendor/clang/dist/test/Modules/no-stale-modtime.m vendor/clang/dist/test/Modules/odr.cpp vendor/clang/dist/test/Modules/pch-used.m vendor/clang/dist/test/Modules/require-modular-includes.m vendor/clang/dist/test/Modules/resolution-change.m vendor/clang/dist/test/Modules/system_headers.m vendor/clang/dist/test/Modules/system_version.m vendor/clang/dist/test/Modules/templates.mm vendor/clang/dist/test/Modules/validate-system-headers.m vendor/clang/dist/test/OpenMP/for_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/for_loop_messages.cpp vendor/clang/dist/test/OpenMP/for_misc_messages.c vendor/clang/dist/test/OpenMP/for_private_messages.cpp vendor/clang/dist/test/OpenMP/nesting_of_regions.cpp vendor/clang/dist/test/OpenMP/parallel_codegen.cpp vendor/clang/dist/test/OpenMP/parallel_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/parallel_for_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/parallel_for_loop_messages.cpp vendor/clang/dist/test/OpenMP/parallel_for_misc_messages.c vendor/clang/dist/test/OpenMP/parallel_for_private_messages.cpp vendor/clang/dist/test/OpenMP/parallel_private_messages.cpp vendor/clang/dist/test/OpenMP/parallel_sections_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/parallel_sections_private_messages.cpp vendor/clang/dist/test/OpenMP/sections_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/sections_private_messages.cpp vendor/clang/dist/test/OpenMP/simd_aligned_messages.cpp vendor/clang/dist/test/OpenMP/simd_loop_messages.cpp vendor/clang/dist/test/OpenMP/simd_metadata.c vendor/clang/dist/test/OpenMP/simd_misc_messages.c vendor/clang/dist/test/OpenMP/simd_private_messages.cpp vendor/clang/dist/test/OpenMP/single_copyprivate_messages.cpp vendor/clang/dist/test/OpenMP/single_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/single_private_messages.cpp vendor/clang/dist/test/OpenMP/task_firstprivate_messages.cpp vendor/clang/dist/test/OpenMP/task_messages.cpp vendor/clang/dist/test/OpenMP/task_private_messages.cpp vendor/clang/dist/test/OpenMP/threadprivate_messages.cpp vendor/clang/dist/test/PCH/cxx-namespaces.cpp vendor/clang/dist/test/PCH/cxx-traits.cpp vendor/clang/dist/test/PCH/cxx-traits.h vendor/clang/dist/test/PCH/cxx1y-lambdas.mm vendor/clang/dist/test/PCH/pragma-loop.cpp vendor/clang/dist/test/PCH/pragma-optimize.c vendor/clang/dist/test/PCH/stmt-attrs.cpp vendor/clang/dist/test/PCH/verify_pch.m vendor/clang/dist/test/Parser/MicrosoftExtensions.c vendor/clang/dist/test/Parser/MicrosoftExtensions.cpp vendor/clang/dist/test/Parser/access-spec-attrs.cpp vendor/clang/dist/test/Parser/altivec.c vendor/clang/dist/test/Parser/asm.cpp vendor/clang/dist/test/Parser/atomic.c vendor/clang/dist/test/Parser/attributes.c vendor/clang/dist/test/Parser/c11-noreturn.c vendor/clang/dist/test/Parser/c1x-alignas.c vendor/clang/dist/test/Parser/colon-colon-parentheses.cpp vendor/clang/dist/test/Parser/cxx-altivec.cpp vendor/clang/dist/test/Parser/cxx-ambig-init-templ.cpp vendor/clang/dist/test/Parser/cxx-attributes.cpp vendor/clang/dist/test/Parser/cxx-class.cpp vendor/clang/dist/test/Parser/cxx-default-args.cpp vendor/clang/dist/test/Parser/cxx-member-initializers.cpp vendor/clang/dist/test/Parser/cxx-template-argument.cpp vendor/clang/dist/test/Parser/cxx-template-decl.cpp vendor/clang/dist/test/Parser/cxx-variadic-func.cpp vendor/clang/dist/test/Parser/cxx0x-attributes.cpp vendor/clang/dist/test/Parser/cxx0x-decl.cpp vendor/clang/dist/test/Parser/cxx0x-in-cxx98.cpp vendor/clang/dist/test/Parser/cxx0x-lambda-expressions.cpp vendor/clang/dist/test/Parser/declarators.c vendor/clang/dist/test/Parser/ms-inline-asm.c vendor/clang/dist/test/Parser/namespaces.cpp vendor/clang/dist/test/Parser/pragma-loop.cpp vendor/clang/dist/test/Parser/pragma-unroll.cpp vendor/clang/dist/test/Parser/switch-recovery.cpp vendor/clang/dist/test/Preprocessor/_Pragma.c vendor/clang/dist/test/Preprocessor/aarch64-target-features.c vendor/clang/dist/test/Preprocessor/arm-acle-6.4.c vendor/clang/dist/test/Preprocessor/arm-target-features.c vendor/clang/dist/test/Preprocessor/cxx_oper_keyword_ms_compat.cpp vendor/clang/dist/test/Preprocessor/feature_tests.c vendor/clang/dist/test/Preprocessor/has_attribute.c vendor/clang/dist/test/Preprocessor/headermap-rel2.c vendor/clang/dist/test/Preprocessor/init.c vendor/clang/dist/test/Preprocessor/iwithprefix.c vendor/clang/dist/test/Preprocessor/line-directive.c vendor/clang/dist/test/Preprocessor/macro_arg_directive.c vendor/clang/dist/test/Preprocessor/macro_paste_bad.c vendor/clang/dist/test/Preprocessor/predefined-arch-macros.c vendor/clang/dist/test/Preprocessor/predefined-exceptions.m vendor/clang/dist/test/Preprocessor/predefined-macros.c vendor/clang/dist/test/Preprocessor/stdint.c vendor/clang/dist/test/Preprocessor/x86_target_features.c vendor/clang/dist/test/Profile/c-captured.c vendor/clang/dist/test/Profile/c-counter-overflows.c vendor/clang/dist/test/Profile/c-general.c vendor/clang/dist/test/Profile/c-linkage-available_externally.c vendor/clang/dist/test/Profile/c-linkage.c vendor/clang/dist/test/Profile/cxx-class.cpp vendor/clang/dist/test/Profile/cxx-lambda.cpp vendor/clang/dist/test/Profile/cxx-linkage.cpp vendor/clang/dist/test/Profile/cxx-templates.cpp vendor/clang/dist/test/Profile/cxx-throws.cpp vendor/clang/dist/test/Profile/objc-general.m vendor/clang/dist/test/Rewriter/rewrite-block-literal.mm vendor/clang/dist/test/Rewriter/rewrite-modern-block.mm vendor/clang/dist/test/Rewriter/rewrite-modern-captured-nested-bvar.mm vendor/clang/dist/test/Sema/128bitint.c vendor/clang/dist/test/Sema/MicrosoftExtensions.c vendor/clang/dist/test/Sema/anonymous-struct-union-c11.c vendor/clang/dist/test/Sema/anonymous-struct-union.c vendor/clang/dist/test/Sema/arm-darwin-aapcs.cpp vendor/clang/dist/test/Sema/arm64-inline-asm.c vendor/clang/dist/test/Sema/arm64-neon-args.c vendor/clang/dist/test/Sema/arm_acle.c vendor/clang/dist/test/Sema/array-init.c vendor/clang/dist/test/Sema/asm.c vendor/clang/dist/test/Sema/ast-print.c vendor/clang/dist/test/Sema/atomic-ops.c vendor/clang/dist/test/Sema/attr-bounded.c vendor/clang/dist/test/Sema/attr-deprecated.c vendor/clang/dist/test/Sema/attr-msp430.c vendor/clang/dist/test/Sema/attr-naked.c vendor/clang/dist/test/Sema/attr-ownership.c vendor/clang/dist/test/Sema/big-endian-neon-initializers.c vendor/clang/dist/test/Sema/bitfield.c vendor/clang/dist/test/Sema/block-misc.c vendor/clang/dist/test/Sema/builtin-assume.c vendor/clang/dist/test/Sema/builtin-object-size.c vendor/clang/dist/test/Sema/builtins-arm.c vendor/clang/dist/test/Sema/builtins-arm64.c vendor/clang/dist/test/Sema/builtins.c vendor/clang/dist/test/Sema/callingconv.c vendor/clang/dist/test/Sema/constructor-attribute.c vendor/clang/dist/test/Sema/dllexport.c vendor/clang/dist/test/Sema/dllimport.c vendor/clang/dist/test/Sema/expr-comma-c99.c vendor/clang/dist/test/Sema/expr-comma.c vendor/clang/dist/test/Sema/exprs.c vendor/clang/dist/test/Sema/format-strings-gnu.c vendor/clang/dist/test/Sema/format-strings-ms.c vendor/clang/dist/test/Sema/format-strings.c vendor/clang/dist/test/Sema/inline-asm-validate.c vendor/clang/dist/test/Sema/ms-inline-asm.c vendor/clang/dist/test/Sema/ms_bitfield_layout.c vendor/clang/dist/test/Sema/nonnull.c vendor/clang/dist/test/Sema/parentheses.cpp vendor/clang/dist/test/Sema/scope-check.c vendor/clang/dist/test/Sema/sentinel-attribute.c vendor/clang/dist/test/Sema/statements.c vendor/clang/dist/test/Sema/static-array.c vendor/clang/dist/test/Sema/stdcall-fastcall.c vendor/clang/dist/test/Sema/string-plus-char.c vendor/clang/dist/test/Sema/struct-packed-align.c vendor/clang/dist/test/Sema/switch-1.c vendor/clang/dist/test/Sema/switch.c vendor/clang/dist/test/Sema/types.c vendor/clang/dist/test/Sema/var-redecl.c vendor/clang/dist/test/Sema/warn-thread-safety-analysis.c vendor/clang/dist/test/Sema/warn-unsequenced.c vendor/clang/dist/test/Sema/warn-unused-value.c vendor/clang/dist/test/Sema/wchar.c vendor/clang/dist/test/SemaCUDA/function-target.cu vendor/clang/dist/test/SemaCUDA/launch_bounds.cu vendor/clang/dist/test/SemaCXX/MicrosoftCompatibility.cpp vendor/clang/dist/test/SemaCXX/MicrosoftExtensions.cpp vendor/clang/dist/test/SemaCXX/PR10177.cpp vendor/clang/dist/test/SemaCXX/anonymous-union.cpp vendor/clang/dist/test/SemaCXX/arrow-operator.cpp vendor/clang/dist/test/SemaCXX/ast-print.cpp vendor/clang/dist/test/SemaCXX/atomic-type.cpp vendor/clang/dist/test/SemaCXX/attr-nodebug.cpp vendor/clang/dist/test/SemaCXX/attr-nonnull.cpp vendor/clang/dist/test/SemaCXX/attr-optnone.cpp vendor/clang/dist/test/SemaCXX/attr-print.cpp vendor/clang/dist/test/SemaCXX/blocks.cpp vendor/clang/dist/test/SemaCXX/const-cast.cpp vendor/clang/dist/test/SemaCXX/constant-expression-cxx11.cpp vendor/clang/dist/test/SemaCXX/constant-expression-cxx1y.cpp vendor/clang/dist/test/SemaCXX/constexpr-value-init.cpp vendor/clang/dist/test/SemaCXX/conversion-function.cpp vendor/clang/dist/test/SemaCXX/conversion.cpp vendor/clang/dist/test/SemaCXX/crashes.cpp vendor/clang/dist/test/SemaCXX/cxx0x-compat.cpp vendor/clang/dist/test/SemaCXX/cxx0x-cursory-default-delete.cpp vendor/clang/dist/test/SemaCXX/cxx0x-initializer-references.cpp vendor/clang/dist/test/SemaCXX/cxx11-ast-print.cpp vendor/clang/dist/test/SemaCXX/cxx1y-constexpr-not-const.cpp vendor/clang/dist/test/SemaCXX/cxx1y-deduced-return-type.cpp vendor/clang/dist/test/SemaCXX/cxx1y-generic-lambdas.cpp vendor/clang/dist/test/SemaCXX/cxx1y-variable-templates_in_class.cpp vendor/clang/dist/test/SemaCXX/cxx98-compat-flags.cpp vendor/clang/dist/test/SemaCXX/cxx98-compat-pedantic.cpp vendor/clang/dist/test/SemaCXX/cxx98-compat.cpp vendor/clang/dist/test/SemaCXX/decl-init-ref.cpp vendor/clang/dist/test/SemaCXX/decl-microsoft-call-conv.cpp vendor/clang/dist/test/SemaCXX/default1.cpp vendor/clang/dist/test/SemaCXX/default2.cpp vendor/clang/dist/test/SemaCXX/dependent-noexcept-unevaluated.cpp vendor/clang/dist/test/SemaCXX/deprecated.cpp vendor/clang/dist/test/SemaCXX/dllexport.cpp vendor/clang/dist/test/SemaCXX/dllimport.cpp vendor/clang/dist/test/SemaCXX/enable_if.cpp vendor/clang/dist/test/SemaCXX/enum-scoped.cpp vendor/clang/dist/test/SemaCXX/exceptions.cpp vendor/clang/dist/test/SemaCXX/explicit.cpp vendor/clang/dist/test/SemaCXX/flexible-array-test.cpp vendor/clang/dist/test/SemaCXX/for-range-examples.cpp vendor/clang/dist/test/SemaCXX/friend.cpp vendor/clang/dist/test/SemaCXX/goto.cpp vendor/clang/dist/test/SemaCXX/implicit-exception-spec.cpp vendor/clang/dist/test/SemaCXX/issue547.cpp vendor/clang/dist/test/SemaCXX/lambda-expressions.cpp vendor/clang/dist/test/SemaCXX/libstdcxx_is_pod_hack.cpp vendor/clang/dist/test/SemaCXX/member-init.cpp vendor/clang/dist/test/SemaCXX/member-pointer-ms.cpp vendor/clang/dist/test/SemaCXX/namespace-alias.cpp vendor/clang/dist/test/SemaCXX/nonnull.cpp vendor/clang/dist/test/SemaCXX/nullptr.cpp vendor/clang/dist/test/SemaCXX/overloaded-operator.cpp vendor/clang/dist/test/SemaCXX/pragma-optimize.cpp vendor/clang/dist/test/SemaCXX/predefined-expr.cpp vendor/clang/dist/test/SemaCXX/return-noreturn.cpp vendor/clang/dist/test/SemaCXX/return.cpp vendor/clang/dist/test/SemaCXX/runtimediag-ppe.cpp vendor/clang/dist/test/SemaCXX/scope-check.cpp vendor/clang/dist/test/SemaCXX/statements.cpp vendor/clang/dist/test/SemaCXX/string-plus-int.cpp vendor/clang/dist/test/SemaCXX/struct-class-redecl.cpp vendor/clang/dist/test/SemaCXX/trailing-return-0x.cpp vendor/clang/dist/test/SemaCXX/type-traits.cpp vendor/clang/dist/test/SemaCXX/typeid.cpp vendor/clang/dist/test/SemaCXX/typo-correction.cpp vendor/clang/dist/test/SemaCXX/undefined-internal.cpp vendor/clang/dist/test/SemaCXX/uninitialized.cpp vendor/clang/dist/test/SemaCXX/unknown-type-name.cpp vendor/clang/dist/test/SemaCXX/using-decl-1.cpp vendor/clang/dist/test/SemaCXX/vararg-non-pod.cpp vendor/clang/dist/test/SemaCXX/warn-bool-conversion.cpp vendor/clang/dist/test/SemaCXX/warn-consumed-parsing.cpp vendor/clang/dist/test/SemaCXX/warn-global-constructors.cpp vendor/clang/dist/test/SemaCXX/warn-overloaded-virtual.cpp vendor/clang/dist/test/SemaCXX/warn-tautological-compare.cpp vendor/clang/dist/test/SemaCXX/warn-tautological-undefined-compare.cpp vendor/clang/dist/test/SemaCXX/warn-thread-safety-analysis.cpp vendor/clang/dist/test/SemaCXX/warn-undefined-bool-conversion.cpp vendor/clang/dist/test/SemaCXX/warn-unused-comparison.cpp vendor/clang/dist/test/SemaCXX/warn-unused-filescoped.cpp vendor/clang/dist/test/SemaCXX/warn-unused-result.cpp vendor/clang/dist/test/SemaCXX/warn-unused-value.cpp vendor/clang/dist/test/SemaObjC/access-property-getter.m vendor/clang/dist/test/SemaObjC/arc-jump-block.m vendor/clang/dist/test/SemaObjC/arc-repeated-weak.mm vendor/clang/dist/test/SemaObjC/arc.m vendor/clang/dist/test/SemaObjC/attr-availability.m vendor/clang/dist/test/SemaObjC/attr-deprecated.m vendor/clang/dist/test/SemaObjC/autoreleasepool.m vendor/clang/dist/test/SemaObjC/compare-qualified-class.m vendor/clang/dist/test/SemaObjC/conditional-expr.m vendor/clang/dist/test/SemaObjC/debugger-support.m vendor/clang/dist/test/SemaObjC/default-synthesize-1.m vendor/clang/dist/test/SemaObjC/default-synthesize-3.m vendor/clang/dist/test/SemaObjC/default-synthesize.m vendor/clang/dist/test/SemaObjC/encode-typeof-test.m vendor/clang/dist/test/SemaObjC/format-strings-objc.m vendor/clang/dist/test/SemaObjC/iboutlet.m vendor/clang/dist/test/SemaObjC/ivar-lookup.m vendor/clang/dist/test/SemaObjC/method-lookup-3.m vendor/clang/dist/test/SemaObjC/nonnull.m vendor/clang/dist/test/SemaObjC/objc-dictionary-literal.m vendor/clang/dist/test/SemaObjC/objcbridge-attribute-arc.m vendor/clang/dist/test/SemaObjC/property-user-setter.m vendor/clang/dist/test/SemaObjC/protocol-expr-1.m vendor/clang/dist/test/SemaObjC/protocol-expr-neg-1.m vendor/clang/dist/test/SemaObjC/protocols-suppress-conformance.m vendor/clang/dist/test/SemaObjC/scope-check.m vendor/clang/dist/test/SemaObjC/super-property-notation.m vendor/clang/dist/test/SemaObjC/warn-strict-selector-match.m vendor/clang/dist/test/SemaObjCXX/arc-ppe.mm vendor/clang/dist/test/SemaOpenCL/address-spaces.cl vendor/clang/dist/test/SemaOpenCL/extern.cl vendor/clang/dist/test/SemaTemplate/canonical-expr-type.cpp vendor/clang/dist/test/SemaTemplate/class-template-decl.cpp vendor/clang/dist/test/SemaTemplate/constructor-template.cpp vendor/clang/dist/test/SemaTemplate/deduction.cpp vendor/clang/dist/test/SemaTemplate/dependent-type-identity.cpp vendor/clang/dist/test/SemaTemplate/derived.cpp vendor/clang/dist/test/SemaTemplate/explicit-instantiation.cpp vendor/clang/dist/test/SemaTemplate/function-template-specialization-noreturn.cpp vendor/clang/dist/test/SemaTemplate/instantiate-exception-spec-cxx11.cpp vendor/clang/dist/test/SemaTemplate/instantiate-exception-spec.cpp vendor/clang/dist/test/SemaTemplate/instantiate-expr-1.cpp vendor/clang/dist/test/SemaTemplate/instantiate-init.cpp vendor/clang/dist/test/SemaTemplate/instantiate-method.cpp vendor/clang/dist/test/SemaTemplate/instantiate-non-dependent-types.cpp vendor/clang/dist/test/SemaTemplate/instantiate-typeof.cpp vendor/clang/dist/test/SemaTemplate/lookup-dependent-bases.cpp vendor/clang/dist/test/SemaTemplate/ms-lookup-template-base-classes.cpp vendor/clang/dist/test/SemaTemplate/pack-deduction.cpp vendor/clang/dist/test/SemaTemplate/virtual-member-functions.cpp vendor/clang/dist/test/Tooling/auto-detect-from-source-parent-of-cwd.cpp vendor/clang/dist/test/Tooling/auto-detect-from-source-parent.cpp vendor/clang/dist/test/Tooling/auto-detect-from-source.cpp vendor/clang/dist/test/Tooling/clang-check-autodetect-dir.cpp vendor/clang/dist/test/Tooling/clang-check-pwd.cpp vendor/clang/dist/test/Tooling/pch.cpp vendor/clang/dist/test/VFS/external-names.c vendor/clang/dist/test/VFS/umbrella-mismatch.m vendor/clang/dist/test/lit.cfg vendor/clang/dist/tools/arcmt-test/arcmt-test.cpp vendor/clang/dist/tools/c-arcmt-test/CMakeLists.txt vendor/clang/dist/tools/c-arcmt-test/Makefile vendor/clang/dist/tools/c-index-test/CMakeLists.txt vendor/clang/dist/tools/c-index-test/Makefile vendor/clang/dist/tools/c-index-test/c-index-test.c vendor/clang/dist/tools/clang-check/ClangCheck.cpp vendor/clang/dist/tools/clang-format-vs/CMakeLists.txt vendor/clang/dist/tools/clang-format-vs/ClangFormat/ClangFormat.csproj vendor/clang/dist/tools/clang-format-vs/README.txt vendor/clang/dist/tools/clang-format-vs/source.extension.vsixmanifest.in vendor/clang/dist/tools/clang-format/CMakeLists.txt vendor/clang/dist/tools/clang-format/ClangFormat.cpp vendor/clang/dist/tools/clang-format/Makefile vendor/clang/dist/tools/clang-format/clang-format-diff.py vendor/clang/dist/tools/clang-format/clang-format.el vendor/clang/dist/tools/clang-format/clang-format.py vendor/clang/dist/tools/clang-format/git-clang-format vendor/clang/dist/tools/diagtool/DiagTool.cpp vendor/clang/dist/tools/diagtool/DiagTool.h vendor/clang/dist/tools/diagtool/DiagnosticNames.h vendor/clang/dist/tools/diagtool/ListWarnings.cpp vendor/clang/dist/tools/diagtool/ShowEnabledWarnings.cpp vendor/clang/dist/tools/driver/cc1_main.cpp vendor/clang/dist/tools/driver/cc1as_main.cpp vendor/clang/dist/tools/driver/driver.cpp vendor/clang/dist/tools/libclang/ARCMigrate.cpp vendor/clang/dist/tools/libclang/CIndex.cpp vendor/clang/dist/tools/libclang/CIndexCodeCompletion.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.cpp vendor/clang/dist/tools/libclang/CIndexDiagnostic.h vendor/clang/dist/tools/libclang/CIndexUSRs.cpp vendor/clang/dist/tools/libclang/CIndexer.h vendor/clang/dist/tools/libclang/CLog.h vendor/clang/dist/tools/libclang/CMakeLists.txt vendor/clang/dist/tools/libclang/CXComment.cpp vendor/clang/dist/tools/libclang/CXComment.h vendor/clang/dist/tools/libclang/CXCompilationDatabase.cpp vendor/clang/dist/tools/libclang/CXCursor.cpp vendor/clang/dist/tools/libclang/CXCursor.h vendor/clang/dist/tools/libclang/CXLoadedDiagnostic.cpp vendor/clang/dist/tools/libclang/CXLoadedDiagnostic.h vendor/clang/dist/tools/libclang/CXSourceLocation.h vendor/clang/dist/tools/libclang/CXString.h vendor/clang/dist/tools/libclang/CXTranslationUnit.h vendor/clang/dist/tools/libclang/CXType.cpp vendor/clang/dist/tools/libclang/CXType.h vendor/clang/dist/tools/libclang/CursorVisitor.h vendor/clang/dist/tools/libclang/IndexBody.cpp vendor/clang/dist/tools/libclang/IndexTypeSourceInfo.cpp vendor/clang/dist/tools/libclang/Index_Internal.h vendor/clang/dist/tools/libclang/Indexing.cpp vendor/clang/dist/tools/libclang/IndexingContext.h vendor/clang/dist/tools/libclang/Makefile vendor/clang/dist/tools/libclang/libclang.exports vendor/clang/dist/tools/scan-build/ccc-analyzer vendor/clang/dist/tools/scan-build/scan-build vendor/clang/dist/unittests/AST/ASTTypeTraitsTest.cpp vendor/clang/dist/unittests/AST/ASTVectorTest.cpp vendor/clang/dist/unittests/AST/CommentLexer.cpp vendor/clang/dist/unittests/AST/CommentParser.cpp vendor/clang/dist/unittests/AST/DeclPrinterTest.cpp vendor/clang/dist/unittests/AST/EvaluateAsRValueTest.cpp vendor/clang/dist/unittests/AST/ExternalASTSourceTest.cpp vendor/clang/dist/unittests/AST/MatchVerifier.h vendor/clang/dist/unittests/AST/NamedDeclPrinterTest.cpp vendor/clang/dist/unittests/AST/SourceLocationTest.cpp vendor/clang/dist/unittests/ASTMatchers/ASTMatchersTest.cpp vendor/clang/dist/unittests/ASTMatchers/ASTMatchersTest.h vendor/clang/dist/unittests/ASTMatchers/Dynamic/ParserTest.cpp vendor/clang/dist/unittests/ASTMatchers/Dynamic/RegistryTest.cpp vendor/clang/dist/unittests/Basic/CMakeLists.txt vendor/clang/dist/unittests/Basic/FileManagerTest.cpp vendor/clang/dist/unittests/Basic/SourceManagerTest.cpp vendor/clang/dist/unittests/Basic/VirtualFileSystemTest.cpp vendor/clang/dist/unittests/CMakeLists.txt vendor/clang/dist/unittests/Format/CMakeLists.txt vendor/clang/dist/unittests/Format/FormatTest.cpp vendor/clang/dist/unittests/Format/FormatTestJS.cpp vendor/clang/dist/unittests/Format/FormatTestProto.cpp vendor/clang/dist/unittests/Format/FormatTestUtils.h vendor/clang/dist/unittests/Format/Makefile vendor/clang/dist/unittests/Frontend/CMakeLists.txt vendor/clang/dist/unittests/Frontend/FrontendActionTest.cpp vendor/clang/dist/unittests/Lex/CMakeLists.txt vendor/clang/dist/unittests/Lex/LexerTest.cpp vendor/clang/dist/unittests/Lex/PPCallbacksTest.cpp vendor/clang/dist/unittests/Lex/PPConditionalDirectiveRecordTest.cpp vendor/clang/dist/unittests/Makefile vendor/clang/dist/unittests/Sema/ExternalSemaSourceTest.cpp vendor/clang/dist/unittests/Tooling/CMakeLists.txt vendor/clang/dist/unittests/Tooling/Makefile vendor/clang/dist/unittests/Tooling/RecursiveASTVisitorTest.cpp vendor/clang/dist/unittests/Tooling/RefactoringTest.cpp vendor/clang/dist/unittests/Tooling/RewriterTestContext.h vendor/clang/dist/unittests/Tooling/TestVisitor.h vendor/clang/dist/unittests/Tooling/ToolingTest.cpp vendor/clang/dist/unittests/libclang/LibclangTest.cpp vendor/clang/dist/unittests/libclang/Makefile vendor/clang/dist/utils/ABITest/ABITestGen.py vendor/clang/dist/utils/ABITest/TypeGen.py vendor/clang/dist/utils/TableGen/ClangAttrEmitter.cpp vendor/clang/dist/utils/TableGen/NeonEmitter.cpp vendor/clang/dist/utils/TableGen/TableGenBackends.h vendor/clang/dist/utils/analyzer/SATestBuild.py vendor/clang/dist/www/analyzer/open_projects.html vendor/clang/dist/www/analyzer/potential_checkers.html vendor/clang/dist/www/analyzer/scan-build.html vendor/clang/dist/www/compatibility.html vendor/clang/dist/www/cxx_dr_status.html vendor/clang/dist/www/cxx_status.html vendor/clang/dist/www/make_cxx_dr_status Added: vendor/clang/dist/.clang-tidy ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/.clang-tidy Sun Jan 18 16:23:48 2015 (r277325) @@ -0,0 +1 @@ +Checks: '-*,clang-diagnostic-*,llvm-*,misc-*' Modified: vendor/clang/dist/CMakeLists.txt ============================================================================== --- vendor/clang/dist/CMakeLists.txt Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/CMakeLists.txt Sun Jan 18 16:23:48 2015 (r277325) @@ -83,7 +83,13 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR # They are used as destination of target generators. set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin) - set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib) + set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX}) + if(WIN32 OR CYGWIN) + # DLL platform -- put DLLs into bin. + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) + else() + set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) + endif() option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF) @@ -105,8 +111,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURR link_directories("${LLVM_LIBRARY_DIR}") set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin ) - set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) - set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib ) + set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) + set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} ) if(LLVM_INCLUDE_TESTS) # Check prebuilt llvm/utils. @@ -193,6 +199,9 @@ endif() set(CLANG_VENDOR_UTI "org.llvm.clang" CACHE STRING "Vendor-specific uti.") +# The libdir suffix must exactly match whatever LLVM's configuration used. +set(CLANG_LIBDIR_SUFFIX "${LLVM_LIBDIR_SUFFIX}") + set(CLANG_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(CLANG_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) @@ -240,7 +249,7 @@ configure_file( # Add appropriate flags for GCC if (LLVM_COMPILER_IS_GCC_COMPATIBLE) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing") + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-common -Woverloaded-virtual -fno-strict-aliasing") # Enable -pedantic for Clang even if it's not enabled for LLVM. if (NOT LLVM_ENABLE_PEDANTIC) @@ -253,6 +262,26 @@ if (LLVM_COMPILER_IS_GCC_COMPATIBLE) endif() endif () +# Determine HOST_LINK_VERSION on Darwin. +set(HOST_LINK_VERSION) +if (APPLE) + set(LD_V_OUTPUT) + execute_process( + COMMAND sh -c "${CMAKE_LINKER} -v 2>&1 | head -1" + RESULT_VARIABLE HAD_ERROR + OUTPUT_VARIABLE LD_V_OUTPUT + ) + if (NOT HAD_ERROR) + if ("${LD_V_OUTPUT}" MATCHES ".*ld64-([0-9.]+).*") + string(REGEX REPLACE ".*ld64-([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) + elseif ("${LD_V_OUTPUT}" MATCHES "[^0-9]*([0-9.]+).*") + string(REGEX REPLACE "[^0-9]*([0-9.]+).*" "\\1" HOST_LINK_VERSION ${LD_V_OUTPUT}) + endif() + else() + message(FATAL_ERROR "${CMAKE_LINKER} failed with status ${HAD_ERROR}") + endif() +endif() + configure_file( ${CLANG_SOURCE_DIR}/include/clang/Config/config.h.cmake ${CLANG_BINARY_DIR}/include/clang/Config/config.h) @@ -337,6 +366,7 @@ macro(add_clang_library name) ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX} RUNTIME DESTINATION bin) endif() + set_property(GLOBAL APPEND PROPERTY CLANG_EXPORTS ${name}) else() # Add empty "phony" target add_custom_target(${name}) @@ -478,3 +508,27 @@ endif() set(CLANG_ORDER_FILE "" CACHE FILEPATH "Order file to use when compiling clang in order to improve startup time.") + +if (CLANG_BUILT_STANDALONE) + # Generate a list of CMake library targets so that other CMake projects can + # link against them. LLVM calls its version of this file LLVMExports.cmake, but + # the usual CMake convention seems to be ${Project}Targets.cmake. + set(CLANG_INSTALL_PACKAGE_DIR share/clang/cmake) + set(clang_cmake_builddir "${CMAKE_BINARY_DIR}/${CLANG_INSTALL_PACKAGE_DIR}") + get_property(CLANG_EXPORTS GLOBAL PROPERTY CLANG_EXPORTS) + export(TARGETS ${CLANG_EXPORTS} FILE ${clang_cmake_builddir}/ClangTargets.cmake) + + # Install a /share/clang/cmake/ClangConfig.cmake file so that + # find_package(Clang) works. Install the target list with it. + install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake + ${CLANG_BINARY_DIR}/share/clang/cmake/ClangTargets.cmake + DESTINATION share/clang/cmake) + + # Also copy ClangConfig.cmake to the build directory so that dependent projects + # can build against a build directory of Clang more easily. + configure_file( + ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules/ClangConfig.cmake + ${CLANG_BINARY_DIR}/share/clang/cmake/ClangConfig.cmake + COPYONLY) +endif () Modified: vendor/clang/dist/CODE_OWNERS.TXT ============================================================================== --- vendor/clang/dist/CODE_OWNERS.TXT Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/CODE_OWNERS.TXT Sun Jan 18 16:23:48 2015 (r277325) @@ -22,6 +22,7 @@ E: echristo@gmail.com D: Debug Information, autotools/configure/make build, inline assembly N: Doug Gregor +E: dgregor@apple.com D: All parts of Clang not covered by someone else N: Anton Korobeynikov @@ -29,6 +30,7 @@ E: anton@korobeynikov.info D: Exception handling, Windows codegen, ARM EABI N: Ted Kremenek +E: kremenek@apple.com D: Clang Static Analyzer N: John McCall @@ -37,7 +39,7 @@ D: Clang LLVM IR generation N: Chad Rosier E: mcrosier@codeaurora.org -D: MS-inline asm, and the compiler driver +D: Compiler driver N: Richard Smith E: richard@metafoo.co.uk Modified: vendor/clang/dist/bindings/python/clang/cindex.py ============================================================================== --- vendor/clang/dist/bindings/python/clang/cindex.py Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/bindings/python/clang/cindex.py Sun Jan 18 16:23:48 2015 (r277325) @@ -496,24 +496,28 @@ class TokenKind(object): setattr(TokenKind, name, kind) ### Cursor Kinds ### - -class CursorKind(object): - """ - A CursorKind describes the kind of entity that a cursor points to. +class BaseEnumeration(object): """ + Common base class for named enumerations held in sync with Index.h values. - # The unique kind objects, indexed by id. + Subclasses must define their own _kinds and _name_map members, as: _kinds = [] _name_map = None + These values hold the per-subclass instances and value-to-name mappings, + respectively. + + """ def __init__(self, value): - if value >= len(CursorKind._kinds): - CursorKind._kinds += [None] * (value - len(CursorKind._kinds) + 1) - if CursorKind._kinds[value] is not None: - raise ValueError,'CursorKind already loaded' + if value >= len(self.__class__._kinds): + self.__class__._kinds += [None] * (value - len(self.__class__._kinds) + 1) + if self.__class__._kinds[value] is not None: + raise ValueError,'{0} value {1} already loaded'.format( + str(self.__class__), value) self.value = value - CursorKind._kinds[value] = self - CursorKind._name_map = None + self.__class__._kinds[value] = self + self.__class__._name_map = None + def from_param(self): return self.value @@ -523,16 +527,29 @@ class CursorKind(object): """Get the enumeration name of this cursor kind.""" if self._name_map is None: self._name_map = {} - for key,value in CursorKind.__dict__.items(): - if isinstance(value,CursorKind): + for key, value in self.__class__.__dict__.items(): + if isinstance(value, self.__class__): self._name_map[value] = key return self._name_map[self] - @staticmethod - def from_id(id): - if id >= len(CursorKind._kinds) or CursorKind._kinds[id] is None: - raise ValueError,'Unknown cursor kind %d' % id - return CursorKind._kinds[id] + @classmethod + def from_id(cls, id): + if id >= len(cls._kinds) or cls._kinds[id] is None: + raise ValueError,'Unknown template argument kind %d' % id + return cls._kinds[id] + + def __repr__(self): + return '%s.%s' % (self.__class__, self.name,) + + +class CursorKind(BaseEnumeration): + """ + A CursorKind describes the kind of entity that a cursor points to. + """ + + # The required BaseEnumeration declarations. + _kinds = [] + _name_map = None @staticmethod def get_all_kinds(): @@ -578,11 +595,6 @@ class CursorKind(object): def __repr__(self): return 'CursorKind.%s' % (self.name,) -# FIXME: Is there a nicer way to expose this enumeration? We could potentially -# represent the nested structure, or even build a class hierarchy. The main -# things we want for sure are (a) simple external access to kinds, (b) a place -# to hang a description and name, (c) easy to keep in sync with Index.h. - ### # Declaration Kinds @@ -1086,6 +1098,7 @@ CursorKind.CUDACONSTANT_ATTR = CursorKin CursorKind.CUDADEVICE_ATTR = CursorKind(413) CursorKind.CUDAGLOBAL_ATTR = CursorKind(414) CursorKind.CUDAHOST_ATTR = CursorKind(415) +CursorKind.CUDASHARED_ATTR = CursorKind(416) ### # Preprocessing @@ -1100,6 +1113,24 @@ CursorKind.INCLUSION_DIRECTIVE = CursorK # A module import declaration. CursorKind.MODULE_IMPORT_DECL = CursorKind(600) + +### Template Argument Kinds ### +class TemplateArgumentKind(BaseEnumeration): + """ + A TemplateArgumentKind describes the kind of entity that a template argument + represents. + """ + + # The required BaseEnumeration declarations. + _kinds = [] + _name_map = None + +TemplateArgumentKind.NULL = TemplateArgumentKind(0) +TemplateArgumentKind.TYPE = TemplateArgumentKind(1) +TemplateArgumentKind.DECLARATION = TemplateArgumentKind(2) +TemplateArgumentKind.NULLPTR = TemplateArgumentKind(3) +TemplateArgumentKind.INTEGRAL = TemplateArgumentKind(4) + ### Cursors ### class Cursor(Structure): @@ -1176,9 +1207,9 @@ class Cursor(Structure): """ Return the display name for the entity referenced by this cursor. - The display name contains extra information that helps identify the cursor, - such as the parameters of a function or template or the arguments of a - class template specialization. + The display name contains extra information that helps identify the + cursor, such as the parameters of a function or template or the + arguments of a class template specialization. """ if not hasattr(self, '_displayname'): self._displayname = conf.lib.clang_getCursorDisplayName(self) @@ -1186,6 +1217,14 @@ class Cursor(Structure): return self._displayname @property + def mangled_name(self): + """Return the mangled name for the entity referenced by this cursor.""" + if not hasattr(self, '_mangled_name'): + self._mangled_name = conf.lib.clang_Cursor_getMangling(self) + + return self._mangled_name + + @property def location(self): """ Return the source location (the starting character) of the entity @@ -1208,6 +1247,17 @@ class Cursor(Structure): return self._extent @property + def storage_class(self): + """ + Retrieves the storage class (if any) of the entity pointed at by the + cursor. + """ + if not hasattr(self, '_storage_class'): + self._storage_class = conf.lib.clang_Cursor_getStorageClass(self) + + return StorageClass.from_id(self._storage_class) + + @property def access_specifier(self): """ Retrieves the access specifier (if any) of the entity pointed at by the @@ -1369,6 +1419,27 @@ class Cursor(Structure): for i in range(0, num_args): yield conf.lib.clang_Cursor_getArgument(self, i) + def get_num_template_arguments(self): + """Returns the number of template args associated with this cursor.""" + return conf.lib.clang_Cursor_getNumTemplateArguments(self) + + def get_template_argument_kind(self, num): + """Returns the TemplateArgumentKind for the indicated template + argument.""" + return conf.lib.clang_Cursor_getTemplateArgumentKind(self, num) + + def get_template_argument_type(self, num): + """Returns the CXType for the indicated template argument.""" + return conf.lib.clang_Cursor_getTemplateArgumentType(self, num) + + def get_template_argument_value(self, num): + """Returns the value of the indicated arg as a signed 64b integer.""" + return conf.lib.clang_Cursor_getTemplateArgumentValue(self, num) + + def get_template_argument_unsigned_value(self, num): + """Returns the value of the indicated arg as an unsigned 64b integer.""" + return conf.lib.clang_Cursor_getTemplateArgumentUnsignedValue(self, num) + def get_children(self): """Return an iterator for accessing the children of this cursor.""" @@ -1450,11 +1521,9 @@ class Cursor(Structure): res._tu = args[0]._tu return res -### C++ access specifiers ### - -class AccessSpecifier(object): +class StorageClass(object): """ - Describes the access of a C++ class member + Describes the storage class of a declaration """ # The unique kind objects, index by id. @@ -1462,32 +1531,59 @@ class AccessSpecifier(object): _name_map = None def __init__(self, value): - if value >= len(AccessSpecifier._kinds): - AccessSpecifier._kinds += [None] * (value - len(AccessSpecifier._kinds) + 1) - if AccessSpecifier._kinds[value] is not None: - raise ValueError,'AccessSpecifier already loaded' + if value >= len(StorageClass._kinds): + StorageClass._kinds += [None] * (value - len(StorageClass._kinds) + 1) + if StorageClass._kinds[value] is not None: + raise ValueError,'StorageClass already loaded' self.value = value - AccessSpecifier._kinds[value] = self - AccessSpecifier._name_map = None + StorageClass._kinds[value] = self + StorageClass._name_map = None def from_param(self): return self.value @property def name(self): - """Get the enumeration name of this access specifier.""" + """Get the enumeration name of this storage class.""" if self._name_map is None: self._name_map = {} - for key,value in AccessSpecifier.__dict__.items(): - if isinstance(value,AccessSpecifier): + for key,value in StorageClass.__dict__.items(): + if isinstance(value,StorageClass): self._name_map[value] = key return self._name_map[self] @staticmethod def from_id(id): - if id >= len(AccessSpecifier._kinds) or not AccessSpecifier._kinds[id]: - raise ValueError,'Unknown access specifier %d' % id - return AccessSpecifier._kinds[id] + if id >= len(StorageClass._kinds) or not StorageClass._kinds[id]: + raise ValueError,'Unknown storage class %d' % id + return StorageClass._kinds[id] + + def __repr__(self): + return 'StorageClass.%s' % (self.name,) + +StorageClass.INVALID = StorageClass(0) +StorageClass.NONE = StorageClass(1) +StorageClass.EXTERN = StorageClass(2) +StorageClass.STATIC = StorageClass(3) +StorageClass.PRIVATEEXTERN = StorageClass(4) +StorageClass.OPENCLWORKGROUPLOCAL = StorageClass(5) +StorageClass.AUTO = StorageClass(6) +StorageClass.REGISTER = StorageClass(7) + + +### C++ access specifiers ### + +class AccessSpecifier(BaseEnumeration): + """ + Describes the access of a C++ class member + """ + + # The unique kind objects, index by id. + _kinds = [] + _name_map = None + + def from_param(self): + return self.value def __repr__(self): return 'AccessSpecifier.%s' % (self.name,) @@ -1500,7 +1596,7 @@ AccessSpecifier.NONE = AccessSpecifier(4 ### Type Kinds ### -class TypeKind(object): +class TypeKind(BaseEnumeration): """ Describes the kind of type. """ @@ -1509,39 +1605,11 @@ class TypeKind(object): _kinds = [] _name_map = None - def __init__(self, value): - if value >= len(TypeKind._kinds): - TypeKind._kinds += [None] * (value - len(TypeKind._kinds) + 1) - if TypeKind._kinds[value] is not None: - raise ValueError,'TypeKind already loaded' - self.value = value - TypeKind._kinds[value] = self - TypeKind._name_map = None - - def from_param(self): - return self.value - - @property - def name(self): - """Get the enumeration name of this cursor kind.""" - if self._name_map is None: - self._name_map = {} - for key,value in TypeKind.__dict__.items(): - if isinstance(value,TypeKind): - self._name_map[value] = key - return self._name_map[self] - @property def spelling(self): """Retrieve the spelling of this TypeKind.""" return conf.lib.clang_getTypeKindSpelling(self.value) - @staticmethod - def from_id(id): - if id >= len(TypeKind._kinds) or TypeKind._kinds[id] is None: - raise ValueError,'Unknown type kind %d' % id - return TypeKind._kinds[id] - def __repr__(self): return 'TypeKind.%s' % (self.name,) @@ -1594,43 +1662,16 @@ TypeKind.VARIABLEARRAY = TypeKind(115) TypeKind.DEPENDENTSIZEDARRAY = TypeKind(116) TypeKind.MEMBERPOINTER = TypeKind(117) -class RefQualifierKind(object): +class RefQualifierKind(BaseEnumeration): """Describes a specific ref-qualifier of a type.""" # The unique kind objects, indexed by id. _kinds = [] _name_map = None - def __init__(self, value): - if value >= len(RefQualifierKind._kinds): - num_kinds = value - len(RefQualifierKind._kinds) + 1 - RefQualifierKind._kinds += [None] * num_kinds - if RefQualifierKind._kinds[value] is not None: - raise ValueError, 'RefQualifierKind already loaded' - self.value = value - RefQualifierKind._kinds[value] = self - RefQualifierKind._name_map = None - def from_param(self): return self.value - @property - def name(self): - """Get the enumeration name of this kind.""" - if self._name_map is None: - self._name_map = {} - for key, value in RefQualifierKind.__dict__.items(): - if isinstance(value, RefQualifierKind): - self._name_map[value] = key - return self._name_map[self] - - @staticmethod - def from_id(id): - if (id >= len(RefQualifierKind._kinds) or - RefQualifierKind._kinds[id] is None): - raise ValueError, 'Unknown type kind %d' % id - return RefQualifierKind._kinds[id] - def __repr__(self): return 'RefQualifierKind.%s' % (self.name,) @@ -2973,6 +3014,11 @@ functionList = [ _CXString, _CXString.from_result), + ("clang_Cursor_getMangling", + [Cursor], + _CXString, + _CXString.from_result), + # ("clang_getCXTUResourceUsage", # [TranslationUnit], # CXTUResourceUsage), @@ -3300,6 +3346,27 @@ functionList = [ Cursor, Cursor.from_result), + ("clang_Cursor_getNumTemplateArguments", + [Cursor], + c_int), + + ("clang_Cursor_getTemplateArgumentKind", + [Cursor, c_uint], + TemplateArgumentKind.from_id), + + ("clang_Cursor_getTemplateArgumentType", + [Cursor, c_uint], + Type, + Type.from_result), + + ("clang_Cursor_getTemplateArgumentValue", + [Cursor, c_uint], + c_longlong), + + ("clang_Cursor_getTemplateArgumentUnsignedValue", + [Cursor, c_uint], + c_ulonglong), + ("clang_Cursor_isBitField", [Cursor], bool), Modified: vendor/clang/dist/bindings/python/tests/cindex/test_cursor.py ============================================================================== --- vendor/clang/dist/bindings/python/tests/cindex/test_cursor.py Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/bindings/python/tests/cindex/test_cursor.py Sun Jan 18 16:23:48 2015 (r277325) @@ -1,6 +1,8 @@ +import ctypes import gc from clang.cindex import CursorKind +from clang.cindex import TemplateArgumentKind from clang.cindex import TranslationUnit from clang.cindex import TypeKind from .util import get_cursor @@ -244,6 +246,48 @@ def test_get_arguments(): assert arguments[0].spelling == "i" assert arguments[1].spelling == "j" +kTemplateArgTest = """\ + template + void foo(); + + template<> + void foo<-7, float, true>(); + """ + +def test_get_num_template_arguments(): + tu = get_tu(kTemplateArgTest, lang='cpp') + foos = get_cursors(tu, 'foo') + + assert foos[1].get_num_template_arguments() == 3 + +def test_get_template_argument_kind(): + tu = get_tu(kTemplateArgTest, lang='cpp') + foos = get_cursors(tu, 'foo') + + assert foos[1].get_template_argument_kind(0) == TemplateArgumentKind.INTEGRAL + assert foos[1].get_template_argument_kind(1) == TemplateArgumentKind.TYPE + assert foos[1].get_template_argument_kind(2) == TemplateArgumentKind.INTEGRAL + +def test_get_template_argument_type(): + tu = get_tu(kTemplateArgTest, lang='cpp') + foos = get_cursors(tu, 'foo') + + assert foos[1].get_template_argument_type(1).kind == TypeKind.FLOAT + +def test_get_template_argument_value(): + tu = get_tu(kTemplateArgTest, lang='cpp') + foos = get_cursors(tu, 'foo') + + assert foos[1].get_template_argument_value(0) == -7 + assert foos[1].get_template_argument_value(2) == True + +def test_get_template_argument_unsigned_value(): + tu = get_tu(kTemplateArgTest, lang='cpp') + foos = get_cursors(tu, 'foo') + + assert foos[1].get_template_argument_unsigned_value(0) == 2 ** 32 - 7 + assert foos[1].get_template_argument_unsigned_value(2) == True + def test_referenced(): tu = get_tu('void foo(); void bar() { foo(); }') foo = get_cursor(tu, 'foo') @@ -252,3 +296,17 @@ def test_referenced(): if c.kind == CursorKind.CALL_EXPR: assert c.referenced.spelling == foo.spelling break + +def test_mangled_name(): + kInputForMangling = """\ + int foo(int, int); + """ + tu = get_tu(kInputForMangling, lang='cpp') + foo = get_cursor(tu, 'foo') + + # Since libclang does not link in targets, we cannot pass a triple to it + # and force the target. To enable this test to pass on all platforms, accept + # all valid manglings. + # [c-index-test handles this by running the source through clang, emitting + # an AST file and running libclang on that AST file] + assert foo.mangled_name in ('_Z3fooii', '__Z3fooii', '?foo@@YAHHH') Added: vendor/clang/dist/cmake/modules/ClangConfig.cmake ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ vendor/clang/dist/cmake/modules/ClangConfig.cmake Sun Jan 18 16:23:48 2015 (r277325) @@ -0,0 +1,8 @@ +# This file allows users to call find_package(Clang) and pick up our targets. + +# Clang doesn't have any CMake configuration settings yet because it mostly +# uses LLVM's. When it does, we should move this file to ClangConfig.cmake.in +# and call configure_file() on it. + +# Provide all our library targets to users. +include("${CMAKE_CURRENT_LIST_DIR}/ClangTargets.cmake") Modified: vendor/clang/dist/docs/AddressSanitizer.rst ============================================================================== --- vendor/clang/dist/docs/AddressSanitizer.rst Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/docs/AddressSanitizer.rst Sun Jan 18 16:23:48 2015 (r277325) @@ -165,9 +165,9 @@ problems happening in certain source fil # Disable out-of-bound checks for global: global:bad_array # Disable out-of-bound checks for global instances of a given class ... - type:class.Namespace::BadClassName + type:Namespace::BadClassName # ... or a given struct. Use wildcard to deal with anonymous namespace. - type:struct.Namespace2::*::BadStructName + type:Namespace2::*::BadStructName # Disable initialization-order checks for globals: global:bad_init_global=init type:*BadInitClassSubstring*=init @@ -187,6 +187,7 @@ AddressSanitizer is supported on * Linux i386/x86\_64 (tested on Ubuntu 12.04); * MacOS 10.6 - 10.9 (i386/x86\_64). * Android ARM +* FreeBSD i386/x86\_64 (tested on FreeBSD 11-current) Ports to various other platforms are in progress. Modified: vendor/clang/dist/docs/ClangFormat.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormat.rst Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/docs/ClangFormat.rst Sun Jan 18 16:23:48 2015 (r277325) @@ -96,8 +96,8 @@ This can be integrated by adding the fol .. code-block:: vim - map :pyf /clang-format.py - imap :pyf /clang-format.pyi + map :pyf /clang-format.py + imap :pyf /clang-format.py The first line enables :program:`clang-format` for NORMAL and VISUAL mode, the second line adds support for INSERT mode. Change "C-K" to another binding if Modified: vendor/clang/dist/docs/ClangFormatStyleOptions.rst ============================================================================== --- vendor/clang/dist/docs/ClangFormatStyleOptions.rst Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/docs/ClangFormatStyleOptions.rst Sun Jan 18 16:23:48 2015 (r277325) @@ -33,6 +33,43 @@ The ``.clang-format`` file uses YAML for # A comment. ... +The configuration file can consist of several sections each having different +``Language:`` parameter denoting the programming language this section of the +configuration is targeted at. See the description of the **Language** option +below for the list of supported languages. The first section may have no +language set, it will set the default style options for all lanugages. +Configuration sections for specific language will override options set in the +default section. + +When :program:`clang-format` formats a file, it auto-detects the language using +the file name. When formatting standard input or a file that doesn't have the +extension corresponding to its language, ``-assume-filename=`` option can be +used to override the file name :program:`clang-format` uses to detect the +language. + +An example of a configuration file for multiple languages: + +.. code-block:: yaml + + --- + # We'll use defaults from the LLVM style, but with 4 columns indentation. + BasedOnStyle: LLVM + IndentWidth: 4 + --- + Language: Cpp + # Force pointers to the type for C++. + DerivePointerAlignment: false + PointerAlignment: Left + --- + Language: JavaScript + # Use 100 columns for JS. + ColumnLimit: 100 + --- + Language: Proto + # Don't format .proto files. + DisableFormat: true + ... + An easy way to get a valid ``.clang-format`` file containing all configuration options of a certain predefined style is: @@ -48,6 +85,24 @@ is applied for all input files. The form -style='{key1: value1, key2: value2, ...}' +Disabling Formatting on a Piece of Code +======================================= + +Clang-format understands also special comments that switch formatting in a +delimited range. The code between a comment ``// clang-format off`` or +``/* clang-format off */`` up to a comment ``// clang-format on`` or +``/* clang-format on */`` will not be formatted. The comments themselves +will be formatted (aligned) normally. + +.. code-block:: c++ + + int formatted_code; + // clang-format off + void unformatted_code ; + // clang-format on + void formatted_code_again; + + Configuring Style in Code ========================= @@ -95,10 +150,24 @@ the configuration (without a prefix: ``A **AccessModifierOffset** (``int``) The extra indent or outdent of access modifiers, e.g. ``public:``. +**AlignAfterOpenBracket** (``bool``) + If ``true``, horizontally aligns arguments after an open bracket. + + This applies to round brackets (parentheses), angle brackets and square + brackets. This will result in formattings like + \code + someLongFunction(argument1, + argument2); + \endcode + **AlignEscapedNewlinesLeft** (``bool``) If ``true``, aligns escaped newlines as far left as possible. Otherwise puts them into the right-most column. +**AlignOperands** (``bool``) + If ``true``, horizontally align operands of binary and ternary + expressions. + **AlignTrailingComments** (``bool``) If ``true``, aligns trailing comments. @@ -111,6 +180,9 @@ the configuration (without a prefix: ``A E.g., this allows ``if (a) { return; }`` to be put on a single line. +**AllowShortCaseLabelsOnASingleLine** (``bool``) + If ``true``, short case labels will be contracted to a single line. + **AllowShortFunctionsOnASingleLine** (``ShortFunctionStyle``) Dependent on the value, ``int f() { return 0; }`` can be put on a single line. @@ -121,6 +193,8 @@ the configuration (without a prefix: ``A Never merge functions into a single line. * ``SFS_Inline`` (in configuration: ``Inline``) Only merge functions defined inside a class. + * ``SFS_Empty`` (in configuration: ``Empty``) + Only merge empty functions. * ``SFS_All`` (in configuration: ``All``) Merge all functions fitting on a single line. @@ -133,6 +207,13 @@ the configuration (without a prefix: ``A If ``true``, ``while (true) continue;`` can be put on a single line. +**AlwaysBreakAfterDefinitionReturnType** (``bool``) + If ``true``, always break after function definition return types. + + More truthfully called 'break before the identifier following the type + in a function definition'. PenaltyReturnTypeOnItsOwnLine becomes + irrelevant. + **AlwaysBreakBeforeMultilineStrings** (``bool``) If ``true``, always break before multiline string literals. @@ -140,12 +221,26 @@ the configuration (without a prefix: ``A If ``true``, always break after the ``template<...>`` of a template declaration. +**BinPackArguments** (``bool``) + If ``false``, a function call's arguments will either be all on the + same line or will have one line each. + **BinPackParameters** (``bool``) - If ``false``, a function call's or function definition's parameters - will either all be on the same line or will have one line each. + If ``false``, a function declaration's or function definition's + parameters will either all be on the same line or will have one line each. + +**BreakBeforeBinaryOperators** (``BinaryOperatorStyle``) + The way to wrap binary operators. + + Possible values: + + * ``BOS_None`` (in configuration: ``None``) + Break after operators. + * ``BOS_NonAssignment`` (in configuration: ``NonAssignment``) + Break before operators that aren't assignments. + * ``BOS_All`` (in configuration: ``All``) + Break before operators. -**BreakBeforeBinaryOperators** (``bool``) - If ``true``, binary operators will be placed after line breaks. **BreakBeforeBraces** (``BraceBreakingStyle``) The brace breaking style to use. @@ -158,7 +253,7 @@ the configuration (without a prefix: ``A Like ``Attach``, but break before braces on function, namespace and class definitions. * ``BS_Stroustrup`` (in configuration: ``Stroustrup``) - Like ``Attach``, but break before function definitions. + Like ``Attach``, but break before function definitions, and 'else'. * ``BS_Allman`` (in configuration: ``Allman``) Always break before braces. * ``BS_GNU`` (in configuration: ``GNU``) @@ -267,6 +362,8 @@ the configuration (without a prefix: ``A Do not use. * ``LK_Cpp`` (in configuration: ``Cpp``) Should be used for C, C++, ObjectiveC, ObjectiveC++. + * ``LK_Java`` (in configuration: ``Java``) + Should be used for Java. * ``LK_JavaScript`` (in configuration: ``JavaScript``) Should be used for JavaScript. * ``LK_Proto`` (in configuration: ``Proto``) @@ -290,6 +387,9 @@ the configuration (without a prefix: ``A Indent in all namespaces. +**ObjCBlockIndentWidth** (``unsigned``) + The number of characters to use for indentation of ObjC blocks. + **ObjCSpaceAfterProperty** (``bool``) Add a space after ``@property`` in Objective-C, i.e. use ``\@property (readonly)`` instead of ``\@property(readonly)``. @@ -330,6 +430,9 @@ the configuration (without a prefix: ``A Align pointer in the middle. +**SpaceAfterCStyleCast** (``bool``) + If ``true``, a space may be inserted after C style casts. + **SpaceBeforeAssignmentOperators** (``bool``) If ``false``, spaces will be removed before assignment operators. @@ -374,6 +477,9 @@ the configuration (without a prefix: ``A **SpacesInParentheses** (``bool``) If ``true``, spaces will be inserted after '(' and before ')'. +**SpacesInSquareBrackets** (``bool``) + If ``true``, spaces will be inserted after '[' and before ']'. + **Standard** (``LanguageStandard``) Format compatible with this standard, e.g. use ``A >`` instead of ``A>`` for LS_Cpp03. Modified: vendor/clang/dist/docs/CrossCompilation.rst ============================================================================== --- vendor/clang/dist/docs/CrossCompilation.rst Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/docs/CrossCompilation.rst Sun Jan 18 16:23:48 2015 (r277325) @@ -201,4 +201,3 @@ uses hard-float), Clang will pick the `` The same is true if you're compiling for different ABIs, like ``gnueabi`` and ``androideabi``, and might even link and run, but produce run-time errors, which are much harder to track down and fix. - Modified: vendor/clang/dist/docs/InternalsManual.rst ============================================================================== --- vendor/clang/dist/docs/InternalsManual.rst Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/docs/InternalsManual.rst Sun Jan 18 16:23:48 2015 (r277325) @@ -784,9 +784,24 @@ buffer uses this idiom and is subsequent simply check to see whether the guarding condition is defined or not. If so, the preprocessor can completely ignore the include of the header. +.. _Parser: + The Parser Library ================== +This library contains a recursive-descent parser that polls tokens from the +preprocessor and notifies a client of the parsing progress. + +Historically, the parser used to talk to an abstract ``Action`` interface that +had virtual methods for parse events, for example ``ActOnBinOp()``. When Clang +grew C++ support, the parser stopped supporting general ``Action`` clients -- +it now always talks to the :ref:`Sema libray `. However, the Parser +still accesses AST objects only through opaque types like ``ExprResult`` and +``StmtResult``. Only :ref:`Sema ` looks at the AST node contents of these +wrappers. + +.. _AST: + The AST Library =============== @@ -1396,10 +1411,7 @@ body by single call to a static class me .. code-block:: c++ Stmt *FooBody = ... - CFG *FooCFG = CFG::buildCFG(FooBody); - -It is the responsibility of the caller of ``CFG::buildCFG`` to ``delete`` the -returned ``CFG*`` when the CFG is no longer needed. + std::unique_ptr FooCFG = CFG::buildCFG(FooBody); Along with providing an interface to iterate over its ``CFGBlocks``, the ``CFG`` class also provides methods that are useful for debugging and @@ -1585,6 +1597,23 @@ interacts with constant evaluation: * ``__builtin_strlen`` and ``strlen``: These are constant folded as integer constant expressions if the argument is a string literal. +.. _Sema: + +The Sema Library +================ + +This library is called by the :ref:`Parser library ` during parsing to +do semantic analysis of the input. For valid programs, Sema builds an AST for +parsed constructs. + +.. _CodeGen: + +The CodeGen Library +=================== + +CodeGen takes an :ref:`AST ` as input and produces `LLVM IR code +`_ from it. + How to change Clang =================== Modified: vendor/clang/dist/docs/LanguageExtensions.rst ============================================================================== --- vendor/clang/dist/docs/LanguageExtensions.rst Sun Jan 18 16:19:33 2015 (r277324) +++ vendor/clang/dist/docs/LanguageExtensions.rst Sun Jan 18 16:23:48 2015 (r277325) @@ -109,12 +109,42 @@ following ``__`` (double underscore) to the same name. For instance, ``__cxx_rvalue_references__`` can be used instead of ``cxx_rvalue_references``. +``__has_cpp_attribute`` +----------------------- + +This function-like macro takes a single argument that is the name of a +C++11-style attribute. The argument can either be a single identifier, or a +scoped identifier. If the attribute is supported, a nonzero value is returned. +If the attribute is a standards-based attribute, this macro returns a nonzero +value based on the year and month in which the attribute was voted into the +working draft. If the attribute is not supported by the current compliation +target, this macro evaluates to 0. It can be used like this: + +.. code-block:: c++ + + #ifndef __has_cpp_attribute // Optional of course. + #define __has_cpp_attribute(x) 0 // Compatibility with non-clang compilers. + #endif + + ... + #if __has_cpp_attribute(clang::fallthrough) + #define FALLTHROUGH [[clang::fallthrough]] + #else + #define FALLTHROUGH + #endif + ... + +The attribute identifier (but not scope) can also be specified with a preceding +and following ``__`` (double underscore) to avoid interference from a macro with +the same name. For instance, ``gnu::__const__`` can be used instead of +``gnu::const``. + ``__has_attribute`` ------------------- *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 16:25:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC5495D7; Sun, 18 Jan 2015 16:25:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EC11FA0; Sun, 18 Jan 2015 16:25:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IGPGm0018415; Sun, 18 Jan 2015 16:25:16 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IGPGql018414; Sun, 18 Jan 2015 16:25:16 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201501181625.t0IGPGql018414@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Sun, 18 Jan 2015 16:25:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277326 - vendor/clang/clang-release_360-r226102 X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 16:25:16 -0000 Author: dim Date: Sun Jan 18 16:25:15 2015 New Revision: 277326 URL: https://svnweb.freebsd.org/changeset/base/277326 Log: Tag clang tags/RELEASE_360/rc1 r226102 (effectively, 3.6.0 RC1). Added: vendor/clang/clang-release_360-r226102/ - copied from r277325, vendor/clang/dist/ From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 17:25:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 602C11000; Sun, 18 Jan 2015 17:25:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BC467A0; Sun, 18 Jan 2015 17:25:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IHPgBS046847; Sun, 18 Jan 2015 17:25:42 GMT (envelope-from allanjude@FreeBSD.org) Received: (from allanjude@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IHPg98046846; Sun, 18 Jan 2015 17:25:42 GMT (envelope-from allanjude@FreeBSD.org) Message-Id: <201501181725.t0IHPg98046846@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: allanjude set sender to allanjude@FreeBSD.org using -f From: Allan Jude Date: Sun, 18 Jan 2015 17:25:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277328 - head/contrib/ee X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 17:25:42 -0000 Author: allanjude (doc committer) Date: Sun Jan 18 17:25:41 2015 New Revision: 277328 URL: https://svnweb.freebsd.org/changeset/base/277328 Log: Fix minor syntax and grammar errors in the markup of the ee(1) man page Differential Revision: https://reviews.freebsd.org/D1552 Submitted by: bcallah@openbsd.org (original) Approved by: wblock (mentor) MFC after: 1 week Sponsored by: ScaleEngine Inc. Modified: head/contrib/ee/ee.1 Modified: head/contrib/ee/ee.1 ============================================================================== --- head/contrib/ee/ee.1 Sun Jan 18 17:01:14 2015 (r277327) +++ head/contrib/ee/ee.1 Sun Jan 18 17:25:41 2015 (r277328) @@ -329,8 +329,8 @@ A window showing the keyboard operations displayed or not. .IP "\fBemacs keys\fR" Control keys may be given bindings similar to emacs, or not. -.IP "\f16 bit characters\fR" -Toggles whether sixteen bit characters are handled as one 16-bit quantities or +.IP "\fB16 bit characters\fR" +Toggles whether sixteen bit characters are handled as one 16-bit quantity or two 8-bit quantities. This works primarily with the Chinese Big 5 code set. .RE .PP @@ -461,7 +461,7 @@ Turns off display of eight bit character value inside angle brackets, e.g., "<220>"). .IP \fB16bit\fR Turns on handling of 16-bit characters. -.IP \fbno16bit\fR +.IP \fBno16bit\fR Turns off handling of 16-bit characters. .IP \fBemacs\fR Turns on emacs key bindings. From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 17:43:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4BA0A363; Sun, 18 Jan 2015 17:43:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 371F5932; Sun, 18 Jan 2015 17:43:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IHh1Bu055924; Sun, 18 Jan 2015 17:43:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IHh1XQ055922; Sun, 18 Jan 2015 17:43:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501181743.t0IHh1XQ055922@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 18 Jan 2015 17:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277329 - head/sys/contrib/dev/ath/ath_hal/ar9300 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 17:43:01 -0000 Author: adrian Date: Sun Jan 18 17:43:00 2015 New Revision: 277329 URL: https://svnweb.freebsd.org/changeset/base/277329 Log: Oops - use the correct argument order for ar9300_set_beacon(). (It's only an issue in AP/adhoc modes. But, still. Grr.) Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Modified: head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c ============================================================================== --- head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sun Jan 18 17:25:41 2015 (r277328) +++ head/sys/contrib/dev/ath/ath_hal/ar9300/ar9300_freebsd.c Sun Jan 18 17:43:00 2015 (r277329) @@ -606,8 +606,8 @@ ar9300_freebsd_beacon_init(struct ath_ha uint32_t beacon_period) { - ar9300_beacon_init(ah, AH_PRIVATE(ah)->ah_opmode, - next_beacon, beacon_period); + ar9300_beacon_init(ah, next_beacon, beacon_period, + AH_PRIVATE(ah)->ah_opmode); } HAL_BOOL From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 18:06:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAD4EB1B; Sun, 18 Jan 2015 18:06:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A478CAFF; Sun, 18 Jan 2015 18:06:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0II6ixL066273; Sun, 18 Jan 2015 18:06:44 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0II6f8h066258; Sun, 18 Jan 2015 18:06:41 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501181806.t0II6f8h066258@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sun, 18 Jan 2015 18:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277331 - in head/sys: conf dev/e1000 dev/ixgbe dev/ixl net netinet netinet6 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 18:06:44 -0000 Author: adrian Date: Sun Jan 18 18:06:40 2015 New Revision: 277331 URL: https://svnweb.freebsd.org/changeset/base/277331 Log: Refactor / restructure the RSS code into generic, IPv4 and IPv6 specific bits. The motivation here is to eventually teach netisr and potentially other networking subsystems a bit more about how RSS work queues / buckets are configured so things have a hope of auto-configuring in the future. * net/rss_config.[ch] takes care of the generic bits for doing configuration, hash function selection, etc; * topelitz.[ch] is now in net/ rather than netinet/; * (and would be in libkern if it didn't directly include RSS_KEYSIZE; that's a later thing to fix up.) * netinet/in_rss.[ch] now just contains the IPv4 specific methods; * and netinet/in6_rss.[ch] now just contains the IPv6 specific methods. This should have no functional impact on anyone currently using the RSS support. Differential Revision: D1383 Reviewed by: gnn, jfv (intel driver bits) Added: head/sys/net/rss_config.c - copied, changed from r276951, head/sys/netinet/in_rss.c head/sys/net/rss_config.h - copied, changed from r276951, head/sys/netinet/in_rss.h head/sys/net/toeplitz.c - copied, changed from r277328, head/sys/netinet/toeplitz.c head/sys/net/toeplitz.h - copied unchanged from r276951, head/sys/netinet/toeplitz.h head/sys/netinet6/in6_rss.c - copied, changed from r276951, head/sys/netinet/in_rss.c head/sys/netinet6/in6_rss.h - copied, changed from r276951, head/sys/netinet/in_rss.h Deleted: head/sys/netinet/toeplitz.c head/sys/netinet/toeplitz.h Modified: head/sys/conf/files head/sys/dev/e1000/if_igb.c head/sys/dev/ixgbe/ixgbe.c head/sys/dev/ixl/ixl_txrx.c head/sys/net/if_ethersubr.c head/sys/netinet/in_pcb.c head/sys/netinet/in_pcbgroup.c head/sys/netinet/in_rss.c head/sys/netinet/in_rss.h head/sys/netinet/ip_input.c head/sys/netinet/ip_output.c head/sys/netinet/tcp_timer.c head/sys/netinet/udp_usrreq.c head/sys/netinet6/in6_pcbgroup.c head/sys/netinet6/ip6_output.c head/sys/netinet6/udp6_usrreq.c Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/conf/files Sun Jan 18 18:06:40 2015 (r277331) @@ -3270,9 +3270,11 @@ net/radix_mpath.c standard net/raw_cb.c standard net/raw_usrreq.c standard net/route.c standard +net/rss_config.c optional inet rss | inet6 rss net/rtsock.c standard net/slcompress.c optional netgraph_vjc | sppp | \ netgraph_sppp +net/toeplitz.c optional inet rss | inet6 rss net/vnet.c optional vimage net/zlib.c optional crypto | geom_uzip | ipsec | \ mxge | netgraph_deflate | \ @@ -3422,7 +3424,7 @@ netinet/in_pcb.c optional inet | inet6 netinet/in_pcbgroup.c optional inet pcbgroup | inet6 pcbgroup netinet/in_proto.c optional inet | inet6 netinet/in_rmx.c optional inet -netinet/in_rss.c optional inet rss | inet6 rss +netinet/in_rss.c optional inet rss netinet/ip_divert.c optional inet ipdivert ipfirewall netinet/ip_ecn.c optional inet | inet6 netinet/ip_encap.c optional inet | inet6 @@ -3465,7 +3467,6 @@ netinet/tcp_syncache.c optional inet | netinet/tcp_timer.c optional inet | inet6 netinet/tcp_timewait.c optional inet | inet6 netinet/tcp_usrreq.c optional inet | inet6 -netinet/toeplitz.c optional inet rss | inet6 rss netinet/udp_usrreq.c optional inet | inet6 netinet/libalias/alias.c optional libalias inet | netgraph_nat inet netinet/libalias/alias_db.c optional libalias inet | netgraph_nat inet @@ -3485,6 +3486,7 @@ netinet6/in6_pcb.c optional inet6 netinet6/in6_pcbgroup.c optional inet6 pcbgroup netinet6/in6_proto.c optional inet6 netinet6/in6_rmx.c optional inet6 +netinet6/in6_rss.c optional inet6 rss netinet6/in6_src.c optional inet6 netinet6/ip6_forward.c optional inet6 netinet6/ip6_gre.c optional gre inet6 Modified: head/sys/dev/e1000/if_igb.c ============================================================================== --- head/sys/dev/e1000/if_igb.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/dev/e1000/if_igb.c Sun Jan 18 18:06:40 2015 (r277331) @@ -73,6 +73,9 @@ #include #include #include +#ifdef RSS +#include +#endif #include #include @@ -85,9 +88,6 @@ #include #include #include -#ifdef RSS -#include -#endif #include #include Modified: head/sys/dev/ixgbe/ixgbe.c ============================================================================== --- head/sys/dev/ixgbe/ixgbe.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/dev/ixgbe/ixgbe.c Sun Jan 18 18:06:40 2015 (r277331) @@ -39,7 +39,7 @@ #include "ixgbe.h" #ifdef RSS -#include +#include #endif /********************************************************************* Modified: head/sys/dev/ixl/ixl_txrx.c ============================================================================== --- head/sys/dev/ixl/ixl_txrx.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/dev/ixl/ixl_txrx.c Sun Jan 18 18:06:40 2015 (r277331) @@ -1378,7 +1378,7 @@ static inline int ixl_ptype_to_hash(u8 ptype) { struct i40e_rx_ptype_decoded decoded; - u8 ex = 0 + u8 ex = 0; decoded = decode_rx_desc_ptype(ptype); ex = decoded.outer_frag; Modified: head/sys/net/if_ethersubr.c ============================================================================== --- head/sys/net/if_ethersubr.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/net/if_ethersubr.c Sun Jan 18 18:06:40 2015 (r277331) @@ -63,6 +63,7 @@ #include #include #include +#include #include #include @@ -71,7 +72,6 @@ #include #include #include -#include #include #include #endif Copied and modified: head/sys/net/rss_config.c (from r276951, head/sys/netinet/in_rss.c) ============================================================================== --- head/sys/netinet/in_rss.c Sat Jan 10 23:43:39 2015 (r276951, copy source) +++ head/sys/net/rss_config.c Sun Jan 18 18:06:40 2015 (r277331) @@ -50,17 +50,20 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include +#if 0 #include #include #include #include -#include /* for software rss hash support */ #include #include #include +#endif /*- * Operating system parts of receiver-side scaling (RSS), which allows @@ -89,6 +92,7 @@ __FBSDID("$FreeBSD$"); * placement and pcbgroup expectations. */ +SYSCTL_DECL(_net_inet); SYSCTL_NODE(_net_inet, OID_AUTO, rss, CTLFLAG_RW, 0, "Receive-side steering"); /* @@ -175,8 +179,6 @@ struct rss_table_entry { }; static struct rss_table_entry rss_table[RSS_TABLE_MAXLEN]; -static inline u_int rss_gethashconfig_local(void); - static void rss_init(__unused void *arg) { @@ -282,7 +284,7 @@ rss_naive_hash(u_int keylen, const uint8 return (v); } -static uint32_t +uint32_t rss_hash(u_int datalen, const uint8_t *data) { @@ -302,88 +304,6 @@ rss_hash(u_int datalen, const uint8_t *d } /* - * Hash an IPv4 2-tuple. - */ -uint32_t -rss_hash_ip4_2tuple(struct in_addr src, struct in_addr dst) -{ - uint8_t data[sizeof(src) + sizeof(dst)]; - u_int datalen; - - datalen = 0; - bcopy(&src, &data[datalen], sizeof(src)); - datalen += sizeof(src); - bcopy(&dst, &data[datalen], sizeof(dst)); - datalen += sizeof(dst); - return (rss_hash(datalen, data)); -} - -/* - * Hash an IPv4 4-tuple. - */ -uint32_t -rss_hash_ip4_4tuple(struct in_addr src, u_short srcport, struct in_addr dst, - u_short dstport) -{ - uint8_t data[sizeof(src) + sizeof(dst) + sizeof(srcport) + - sizeof(dstport)]; - u_int datalen; - - datalen = 0; - bcopy(&src, &data[datalen], sizeof(src)); - datalen += sizeof(src); - bcopy(&dst, &data[datalen], sizeof(dst)); - datalen += sizeof(dst); - bcopy(&srcport, &data[datalen], sizeof(srcport)); - datalen += sizeof(srcport); - bcopy(&dstport, &data[datalen], sizeof(dstport)); - datalen += sizeof(dstport); - return (rss_hash(datalen, data)); -} - -#ifdef INET6 -/* - * Hash an IPv6 2-tuple. - */ -uint32_t -rss_hash_ip6_2tuple(const struct in6_addr *src, const struct in6_addr *dst) -{ - uint8_t data[sizeof(*src) + sizeof(*dst)]; - u_int datalen; - - datalen = 0; - bcopy(src, &data[datalen], sizeof(*src)); - datalen += sizeof(*src); - bcopy(dst, &data[datalen], sizeof(*dst)); - datalen += sizeof(*dst); - return (rss_hash(datalen, data)); -} - -/* - * Hash an IPv6 4-tuple. - */ -uint32_t -rss_hash_ip6_4tuple(const struct in6_addr *src, u_short srcport, - const struct in6_addr *dst, u_short dstport) -{ - uint8_t data[sizeof(*src) + sizeof(*dst) + sizeof(srcport) + - sizeof(dstport)]; - u_int datalen; - - datalen = 0; - bcopy(src, &data[datalen], sizeof(*src)); - datalen += sizeof(*src); - bcopy(dst, &data[datalen], sizeof(*dst)); - datalen += sizeof(*dst); - bcopy(&srcport, &data[datalen], sizeof(srcport)); - datalen += sizeof(srcport); - bcopy(&dstport, &data[datalen], sizeof(dstport)); - datalen += sizeof(dstport); - return (rss_hash(datalen, data)); -} -#endif /* INET6 */ - -/* * Query the number of RSS bits in use. */ u_int @@ -498,260 +418,6 @@ rss_m2bucket(struct mbuf *m, uint32_t *b } /* - * Calculate an appropriate ipv4 2-tuple or 4-tuple given the given - * IPv4 source/destination address, UDP or TCP source/destination ports - * and the protocol type. - * - * The protocol code may wish to do a software hash of the given - * tuple. This depends upon the currently configured RSS hash types. - * - * This assumes that the packet in question isn't a fragment. - * - * It also assumes the packet source/destination address - * are in "incoming" packet order (ie, source is "far" address.) - */ -int -rss_proto_software_hash_v4(struct in_addr s, struct in_addr d, - u_short sp, u_short dp, int proto, - uint32_t *hashval, uint32_t *hashtype) -{ - uint32_t hash; - - /* - * Next, choose the hash type depending upon the protocol - * identifier. - */ - if ((proto == IPPROTO_TCP) && - (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4)) { - hash = rss_hash_ip4_4tuple(s, sp, d, dp); - *hashval = hash; - *hashtype = M_HASHTYPE_RSS_TCP_IPV4; - return (0); - } else if ((proto == IPPROTO_UDP) && - (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4)) { - hash = rss_hash_ip4_4tuple(s, sp, d, dp); - *hashval = hash; - *hashtype = M_HASHTYPE_RSS_UDP_IPV4; - return (0); - } else if (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) { - /* RSS doesn't hash on other protocols like SCTP; so 2-tuple */ - hash = rss_hash_ip4_2tuple(s, d); - *hashval = hash; - *hashtype = M_HASHTYPE_RSS_IPV4; - return (0); - } - - /* No configured available hashtypes! */ - printf("%s: no available hashtypes!\n", __func__); - return (-1); -} - -/* - * Do a software calculation of the RSS for the given mbuf. - * - * This is typically used by the input path to recalculate the RSS after - * some form of packet processing (eg de-capsulation, IP fragment reassembly.) - * - * dir is the packet direction - RSS_HASH_PKT_INGRESS for incoming and - * RSS_HASH_PKT_EGRESS for outgoing. - * - * Returns 0 if a hash was done, -1 if no hash was done, +1 if - * the mbuf already had a valid RSS flowid. - * - * This function doesn't modify the mbuf. It's up to the caller to - * assign flowid/flowtype as appropriate. - */ -int -rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, uint32_t *hashval, - uint32_t *hashtype) -{ - const struct ip *ip; - const struct tcphdr *th; - const struct udphdr *uh; - uint32_t flowid; - uint32_t flowtype; - uint8_t proto; - int iphlen; - int is_frag = 0; - - /* - * XXX For now this only handles hashing on incoming mbufs. - */ - if (dir != RSS_HASH_PKT_INGRESS) { - printf("%s: called on EGRESS packet!\n", __func__); - return (-1); - } - - /* - * First, validate that the mbuf we have is long enough - * to have an IPv4 header in it. - */ - if (m->m_pkthdr.len < (sizeof(struct ip))) { - printf("%s: short mbuf pkthdr\n", __func__); - return (-1); - } - if (m->m_len < (sizeof(struct ip))) { - printf("%s: short mbuf len\n", __func__); - return (-1); - } - - /* Ok, let's dereference that */ - ip = mtod(m, struct ip *); - proto = ip->ip_p; - iphlen = ip->ip_hl << 2; - - /* - * If this is a fragment then it shouldn't be four-tuple - * hashed just yet. Once it's reassembled into a full - * frame it should be re-hashed. - */ - if (ip->ip_off & htons(IP_MF | IP_OFFMASK)) - is_frag = 1; - - /* - * If the mbuf flowid/flowtype matches the packet type, - * and we don't support the 4-tuple version of the given protocol, - * then signal to the owner that it can trust the flowid/flowtype - * details. - * - * This is a little picky - eg, if TCPv4 / UDPv4 hashing - * is supported but we got a TCP/UDP frame only 2-tuple hashed, - * then we shouldn't just "trust" the 2-tuple hash. We need - * a 4-tuple hash. - */ - flowid = m->m_pkthdr.flowid; - flowtype = M_HASHTYPE_GET(m); - - if (flowtype != M_HASHTYPE_NONE) { - switch (proto) { - case IPPROTO_UDP: - if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4) && - (flowtype == M_HASHTYPE_RSS_UDP_IPV4) && - (is_frag == 0)) { - return (1); - } - /* - * Only allow 2-tuple for UDP frames if we don't also - * support 4-tuple for UDP. - */ - if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) && - ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4) == 0) && - flowtype == M_HASHTYPE_RSS_IPV4) { - return (1); - } - break; - case IPPROTO_TCP: - if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4) && - (flowtype == M_HASHTYPE_RSS_TCP_IPV4) && - (is_frag == 0)) { - return (1); - } - /* - * Only allow 2-tuple for TCP frames if we don't also - * support 2-tuple for TCP. - */ - if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) && - ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4) == 0) && - flowtype == M_HASHTYPE_RSS_IPV4) { - return (1); - } - break; - default: - if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) && - flowtype == M_HASHTYPE_RSS_IPV4) { - return (1); - } - break; - } - } - - /* - * Decode enough information to make a hash decision. - * - * XXX TODO: does the hardware hash on 4-tuple if IP - * options are present? - */ - if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_TCP_IPV4) && - (proto == IPPROTO_TCP) && - (is_frag == 0)) { - if (m->m_len < iphlen + sizeof(struct tcphdr)) { - printf("%s: short TCP frame?\n", __func__); - return (-1); - } - th = (struct tcphdr *)((caddr_t)ip + iphlen); - return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, - th->th_sport, - th->th_dport, - proto, - hashval, - hashtype); - } else if ((rss_gethashconfig_local() & RSS_HASHTYPE_RSS_UDP_IPV4) && - (proto == IPPROTO_UDP) && - (is_frag == 0)) { - uh = (struct udphdr *)((caddr_t)ip + iphlen); - if (m->m_len < iphlen + sizeof(struct udphdr)) { - printf("%s: short UDP frame?\n", __func__); - return (-1); - } - return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, - uh->uh_sport, - uh->uh_dport, - proto, - hashval, - hashtype); - } else if (rss_gethashconfig_local() & RSS_HASHTYPE_RSS_IPV4) { - /* Default to 2-tuple hash */ - return rss_proto_software_hash_v4(ip->ip_src, ip->ip_dst, - 0, /* source port */ - 0, /* destination port */ - 0, /* IPPROTO_IP */ - hashval, - hashtype); - } else { - printf("%s: no available hashtypes!\n", __func__); - return (-1); - } -} - -/* - * Similar to rss_m2cpuid, but designed to be used by the IP NETISR - * on incoming frames. - * - * If an existing RSS hash exists and it matches what the configured - * hashing is, then use it. - * - * If there's an existing RSS hash but the desired hash is different, - * or if there's no useful RSS hash, then calculate it via - * the software path. - * - * XXX TODO: definitely want statistics here! - */ -struct mbuf * -rss_soft_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid) -{ - uint32_t hash_val, hash_type; - int ret; - - M_ASSERTPKTHDR(m); - - ret = rss_mbuf_software_hash_v4(m, RSS_HASH_PKT_INGRESS, - &hash_val, &hash_type); - if (ret > 0) { - /* mbuf has a valid hash already; don't need to modify it */ - *cpuid = rss_hash2cpuid(m->m_pkthdr.flowid, M_HASHTYPE_GET(m)); - } else if (ret == 0) { - /* hash was done; update */ - m->m_pkthdr.flowid = hash_val; - M_HASHTYPE_SET(m, hash_type); - *cpuid = rss_hash2cpuid(m->m_pkthdr.flowid, M_HASHTYPE_GET(m)); - } else { /* ret < 0 */ - /* no hash was done */ - *cpuid = NETISR_CPUID_NONE; - } - return (m); -} - -/* * Query the RSS hash algorithm. */ u_int @@ -799,8 +465,14 @@ rss_getnumcpus(void) return (rss_ncpus); } -static inline u_int -rss_gethashconfig_local(void) +/* + * Return the supported RSS hash configuration. + * + * NICs should query this to determine what to configure in their redirection + * matching table. + */ +inline u_int +rss_gethashconfig(void) { /* Return 4-tuple for TCP; 2-tuple for others */ @@ -829,19 +501,6 @@ rss_gethashconfig_local(void) } /* - * Return the supported RSS hash configuration. - * - * NICs should query this to determine what to configure in their redirection - * matching table. - */ -u_int -rss_gethashconfig(void) -{ - - return (rss_gethashconfig_local()); -} - -/* * XXXRW: Confirm that sysctl -a won't dump this keying material, don't want * it appearing in debugging output unnecessarily. */ Copied and modified: head/sys/net/rss_config.h (from r276951, head/sys/netinet/in_rss.h) ============================================================================== --- head/sys/netinet/in_rss.h Sat Jan 10 23:43:39 2015 (r276951, copy source) +++ head/sys/net/rss_config.h Sun Jan 18 18:06:40 2015 (r277331) @@ -29,8 +29,8 @@ * $FreeBSD$ */ -#ifndef _NETINET_IN_RSS_H_ -#define _NETINET_IN_RSS_H_ +#ifndef _NET_RSS_CONFIG_H_ +#define _NET_RSS_CONFIG_H_ #include /* in_addr_t */ @@ -107,36 +107,17 @@ u_int rss_getnumcpus(void); u_int rss_gethashconfig(void); /* - * Network stack interface to generate a hash for a protocol tuple. + * Hash calculation functions. */ -uint32_t rss_hash_ip4_4tuple(struct in_addr src, u_short srcport, - struct in_addr dst, u_short dstport); -uint32_t rss_hash_ip4_2tuple(struct in_addr src, struct in_addr dst); -uint32_t rss_hash_ip6_4tuple(const struct in6_addr *src, u_short srcport, - const struct in6_addr *dst, u_short dstport); -uint32_t rss_hash_ip6_2tuple(const struct in6_addr *src, - const struct in6_addr *dst); +uint32_t rss_hash(u_int datalen, const uint8_t *data); /* * Network stack interface to query desired CPU affinity of a packet. */ -struct mbuf *rss_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid); -u_int rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type); -int rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, - uint32_t *bucket_id); -int rss_m2bucket(struct mbuf *m, uint32_t *bucket_id); - -/* - * Functions to calculate a software RSS hash for a given mbuf or - * packet detail. - */ -int rss_mbuf_software_hash_v4(const struct mbuf *m, int dir, - uint32_t *hashval, uint32_t *hashtype); -int rss_proto_software_hash_v4(struct in_addr src, - struct in_addr dst, u_short src_port, u_short dst_port, - int proto, uint32_t *hashval, - uint32_t *hashtype); -struct mbuf * rss_soft_m2cpuid(struct mbuf *m, uintptr_t source, - u_int *cpuid); +struct mbuf * rss_m2cpuid(struct mbuf *m, uintptr_t source, u_int *cpuid); +u_int rss_hash2cpuid(uint32_t hash_val, uint32_t hash_type); +int rss_hash2bucket(uint32_t hash_val, uint32_t hash_type, + uint32_t *bucket_id); +int rss_m2bucket(struct mbuf *m, uint32_t *bucket_id); -#endif /* !_NETINET_IN_RSS_H_ */ +#endif /* !_NET_RSS_CONFIG_H_ */ Copied and modified: head/sys/net/toeplitz.c (from r277328, head/sys/netinet/toeplitz.c) ============================================================================== --- head/sys/netinet/toeplitz.c Sun Jan 18 17:25:41 2015 (r277328, copy source) +++ head/sys/net/toeplitz.c Sun Jan 18 18:06:40 2015 (r277331) @@ -29,8 +29,8 @@ __FBSDID("$FreeBSD$"); #include -#include -#include +#include +#include #include Copied: head/sys/net/toeplitz.h (from r276951, head/sys/netinet/toeplitz.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/net/toeplitz.h Sun Jan 18 18:06:40 2015 (r277331, copy of r276951, head/sys/netinet/toeplitz.h) @@ -0,0 +1,40 @@ +/*- + * Copyright (c) 2010 David Malone + * 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$ + */ + +#ifndef _NETINET_TOEPLITZ_H_ +#define _NETINET_TOEPLITZ_H_ + +/* + * Toeplitz (RSS) hash algorithm; possibly we should cache intermediate + * results between runs, in which case we'll need explicit init/destroy and + * state management. + */ +uint32_t toeplitz_hash(u_int keylen, const uint8_t *key, + u_int datalen, const uint8_t *data); + +#endif /* !_NETINET_TOEPLITZ_H_ */ Modified: head/sys/netinet/in_pcb.c ============================================================================== --- head/sys/netinet/in_pcb.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/netinet/in_pcb.c Sun Jan 18 18:06:40 2015 (r277331) @@ -71,12 +71,12 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #if defined(INET) || defined(INET6) #include #include -#include #include #include #include Modified: head/sys/netinet/in_pcbgroup.c ============================================================================== --- head/sys/netinet/in_pcbgroup.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/netinet/in_pcbgroup.c Sun Jan 18 18:06:40 2015 (r277331) @@ -42,7 +42,10 @@ __FBSDID("$FreeBSD$"); #include #include +#include + #include + #include #include #ifdef INET6 Modified: head/sys/netinet/in_rss.c ============================================================================== --- head/sys/netinet/in_rss.c Sun Jan 18 18:02:12 2015 (r277330) +++ head/sys/netinet/in_rss.c Sun Jan 18 18:06:40 2015 (r277331) @@ -50,257 +50,18 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include #include -#include /* for software rss hash support */ #include #include #include -/*- - * Operating system parts of receiver-side scaling (RSS), which allows - * network cards to direct flows to particular receive queues based on hashes - * of header tuples. This implementation aligns RSS buckets with connection - * groups at the TCP/IP layer, so each bucket is associated with exactly one - * group. As a result, the group lookup structures (and lock) should have an - * effective affinity with exactly one CPU. - * - * Network device drivers needing to configure RSS will query this framework - * for parameters, such as the current RSS key, hashing policies, number of - * bits, and indirection table mapping hashes to buckets and CPUs. They may - * provide their own supplementary information, such as queue<->CPU bindings. - * It is the responsibility of the network device driver to inject packets - * into the stack on as close to the right CPU as possible, if playing by RSS - * rules. - * - * TODO: - * - * - Synchronization for rss_key and other future-configurable parameters. - * - Event handler drivers can register to pick up RSS configuration changes. - * - Should we allow rss_basecpu to be configured? - * - Randomize key on boot. - * - IPv6 support. - * - Statistics on how often there's a misalignment between hardware - * placement and pcbgroup expectations. - */ - -SYSCTL_NODE(_net_inet, OID_AUTO, rss, CTLFLAG_RW, 0, "Receive-side steering"); - -/* - * Toeplitz is the only required hash function in the RSS spec, so use it by - * default. - */ -static u_int rss_hashalgo = RSS_HASH_TOEPLITZ; -SYSCTL_INT(_net_inet_rss, OID_AUTO, hashalgo, CTLFLAG_RDTUN, &rss_hashalgo, 0, - "RSS hash algorithm"); - -/* - * Size of the indirection table; at most 128 entries per the RSS spec. We - * size it to at least 2 times the number of CPUs by default to allow useful - * rebalancing. If not set explicitly with a loader tunable, we tune based - * on the number of CPUs present. - * - * XXXRW: buckets might be better to use for the tunable than bits. - */ -static u_int rss_bits; -SYSCTL_INT(_net_inet_rss, OID_AUTO, bits, CTLFLAG_RDTUN, &rss_bits, 0, - "RSS bits"); - -static u_int rss_mask; -SYSCTL_INT(_net_inet_rss, OID_AUTO, mask, CTLFLAG_RD, &rss_mask, 0, - "RSS mask"); - -static const u_int rss_maxbits = RSS_MAXBITS; -SYSCTL_INT(_net_inet_rss, OID_AUTO, maxbits, CTLFLAG_RD, - __DECONST(int *, &rss_maxbits), 0, "RSS maximum bits"); - -/* - * RSS's own count of the number of CPUs it could be using for processing. - * Bounded to 64 by RSS constants. - */ -static u_int rss_ncpus; -SYSCTL_INT(_net_inet_rss, OID_AUTO, ncpus, CTLFLAG_RD, &rss_ncpus, 0, - "Number of CPUs available to RSS"); - -#define RSS_MAXCPUS (1 << (RSS_MAXBITS - 1)) -static const u_int rss_maxcpus = RSS_MAXCPUS; -SYSCTL_INT(_net_inet_rss, OID_AUTO, maxcpus, CTLFLAG_RD, - __DECONST(int *, &rss_maxcpus), 0, "RSS maximum CPUs that can be used"); - -/* - * Variable exists just for reporting rss_bits in a user-friendly way. - */ -static u_int rss_buckets; -SYSCTL_INT(_net_inet_rss, OID_AUTO, buckets, CTLFLAG_RD, &rss_buckets, 0, - "RSS buckets"); - -/* - * Base CPU number; devices will add this to all CPU numbers returned by the - * RSS indirection table. Currently unmodifable in FreeBSD. - */ -static const u_int rss_basecpu; -SYSCTL_INT(_net_inet_rss, OID_AUTO, basecpu, CTLFLAG_RD, - __DECONST(int *, &rss_basecpu), 0, "RSS base CPU"); - -/* - * RSS secret key, intended to prevent attacks on load-balancing. Its - * effectiveness may be limited by algorithm choice and available entropy - * during the boot. - * - * XXXRW: And that we don't randomize it yet! - * - * This is the default Microsoft RSS specification key which is also - * the Chelsio T5 firmware default key. - */ -static uint8_t rss_key[RSS_KEYSIZE] = { - 0x6d, 0x5a, 0x56, 0xda, 0x25, 0x5b, 0x0e, 0xc2, - 0x41, 0x67, 0x25, 0x3d, 0x43, 0xa3, 0x8f, 0xb0, - 0xd0, 0xca, 0x2b, 0xcb, 0xae, 0x7b, 0x30, 0xb4, - 0x77, 0xcb, 0x2d, 0xa3, 0x80, 0x30, 0xf2, 0x0c, - 0x6a, 0x42, 0xb7, 0x3b, 0xbe, 0xac, 0x01, 0xfa, -}; - -/* - * RSS hash->CPU table, which maps hashed packet headers to particular CPUs. - * Drivers may supplement this table with a seperate CPU<->queue table when - * programming devices. - */ -struct rss_table_entry { - uint8_t rte_cpu; /* CPU affinity of bucket. */ -}; -static struct rss_table_entry rss_table[RSS_TABLE_MAXLEN]; - -static inline u_int rss_gethashconfig_local(void); - -static void -rss_init(__unused void *arg) -{ - u_int i; - u_int cpuid; - - /* - * Validate tunables, coerce to sensible values. - */ - switch (rss_hashalgo) { - case RSS_HASH_TOEPLITZ: - case RSS_HASH_NAIVE: - break; - - default: - printf("%s: invalid RSS hashalgo %u, coercing to %u", - __func__, rss_hashalgo, RSS_HASH_TOEPLITZ); - rss_hashalgo = RSS_HASH_TOEPLITZ; - } - - /* - * Count available CPUs. - * - * XXXRW: Note incorrect assumptions regarding contiguity of this set - * elsewhere. - */ - rss_ncpus = 0; - for (i = 0; i <= mp_maxid; i++) { - if (CPU_ABSENT(i)) - continue; - rss_ncpus++; - } - if (rss_ncpus > RSS_MAXCPUS) - rss_ncpus = RSS_MAXCPUS; - - /* - * Tune RSS table entries to be no less than 2x the number of CPUs - * -- unless we're running uniprocessor, in which case there's not - * much point in having buckets to rearrange for load-balancing! - */ - if (rss_ncpus > 1) { - if (rss_bits == 0) - rss_bits = fls(rss_ncpus - 1) + 1; - - /* - * Microsoft limits RSS table entries to 128, so apply that - * limit to both auto-detected CPU counts and user-configured - * ones. - */ - if (rss_bits == 0 || rss_bits > RSS_MAXBITS) { - printf("%s: RSS bits %u not valid, coercing to %u", - __func__, rss_bits, RSS_MAXBITS); - rss_bits = RSS_MAXBITS; - } - - /* - * Figure out how many buckets to use; warn if less than the - * number of configured CPUs, although this is not a fatal - * problem. - */ - rss_buckets = (1 << rss_bits); - if (rss_buckets < rss_ncpus) - printf("%s: WARNING: rss_buckets (%u) less than " - "rss_ncpus (%u)\n", __func__, rss_buckets, - rss_ncpus); - rss_mask = rss_buckets - 1; - } else { - rss_bits = 0; - rss_buckets = 1; - rss_mask = 0; - } - - /* - * Set up initial CPU assignments: round-robin by default. - */ - cpuid = CPU_FIRST(); - for (i = 0; i < rss_buckets; i++) { - rss_table[i].rte_cpu = cpuid; - cpuid = CPU_NEXT(cpuid); - } - - /* - * Randomize rrs_key. - * - * XXXRW: Not yet. If nothing else, will require an rss_isbadkey() - * loop to check for "bad" RSS keys. - */ -} -SYSINIT(rss_init, SI_SUB_SOFTINTR, SI_ORDER_SECOND, rss_init, NULL); - -static uint32_t -rss_naive_hash(u_int keylen, const uint8_t *key, u_int datalen, - const uint8_t *data) -{ - uint32_t v; - u_int i; - - v = 0; - for (i = 0; i < keylen; i++) - v += key[i]; - for (i = 0; i < datalen; i++) - v += data[i]; - return (v); -} - -static uint32_t -rss_hash(u_int datalen, const uint8_t *data) -{ - - switch (rss_hashalgo) { - case RSS_HASH_TOEPLITZ: - return (toeplitz_hash(sizeof(rss_key), rss_key, datalen, - data)); - - case RSS_HASH_NAIVE: - return (rss_naive_hash(sizeof(rss_key), rss_key, datalen, - data)); - - default: - panic("%s: unsupported/unknown hashalgo %d", __func__, - rss_hashalgo); - } -} - /* * Hash an IPv4 2-tuple. */ @@ -341,162 +102,6 @@ rss_hash_ip4_4tuple(struct in_addr src, return (rss_hash(datalen, data)); } -#ifdef INET6 -/* - * Hash an IPv6 2-tuple. - */ -uint32_t -rss_hash_ip6_2tuple(const struct in6_addr *src, const struct in6_addr *dst) -{ - uint8_t data[sizeof(*src) + sizeof(*dst)]; - u_int datalen; - - datalen = 0; - bcopy(src, &data[datalen], sizeof(*src)); - datalen += sizeof(*src); - bcopy(dst, &data[datalen], sizeof(*dst)); - datalen += sizeof(*dst); - return (rss_hash(datalen, data)); -} - -/* - * Hash an IPv6 4-tuple. - */ -uint32_t -rss_hash_ip6_4tuple(const struct in6_addr *src, u_short srcport, - const struct in6_addr *dst, u_short dstport) -{ - uint8_t data[sizeof(*src) + sizeof(*dst) + sizeof(srcport) + - sizeof(dstport)]; - u_int datalen; - - datalen = 0; - bcopy(src, &data[datalen], sizeof(*src)); - datalen += sizeof(*src); - bcopy(dst, &data[datalen], sizeof(*dst)); - datalen += sizeof(*dst); - bcopy(&srcport, &data[datalen], sizeof(srcport)); - datalen += sizeof(srcport); - bcopy(&dstport, &data[datalen], sizeof(dstport)); - datalen += sizeof(dstport); - return (rss_hash(datalen, data)); -} -#endif /* INET6 */ - -/* - * Query the number of RSS bits in use. - */ -u_int -rss_getbits(void) -{ - - return (rss_bits); -} - -/* - * Query the RSS bucket associated with an RSS hash. *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 18:25:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6A433EA8; Sun, 18 Jan 2015 18:25:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 56550CB3; Sun, 18 Jan 2015 18:25:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IIPDxY075820; Sun, 18 Jan 2015 18:25:13 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IIPDti075819; Sun, 18 Jan 2015 18:25:13 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501181825.t0IIPDti075819@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 18 Jan 2015 18:25:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277333 - head/usr.sbin/bsdinstall/scripts X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 18:25:13 -0000 Author: smh Date: Sun Jan 18 18:25:12 2015 New Revision: 277333 URL: https://svnweb.freebsd.org/changeset/base/277333 Log: Fix bsdinstall when working with geli boot disks PR: 196790 Differential Revision: https://reviews.freebsd.org/D566 Submitted by: Michael Gmelin MFC after: 2 weeks Sponsored by: Multiplay Modified: head/usr.sbin/bsdinstall/scripts/zfsboot Modified: head/usr.sbin/bsdinstall/scripts/zfsboot ============================================================================== --- head/usr.sbin/bsdinstall/scripts/zfsboot Sun Jan 18 18:11:54 2015 (r277332) +++ head/usr.sbin/bsdinstall/scripts/zfsboot Sun Jan 18 18:25:12 2015 (r277333) @@ -1077,6 +1077,9 @@ zfs_create_boot() boot_vdevs="$boot_vdevs $disk$bootpart" fi zroot_vdevs="$zroot_vdevs $disk$targetpart" + if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then + zroot_vdevs="$zroot_vdevs.eli" + fi n=$(( $n + 1 )) done # disks From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 18:32:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1000119E; Sun, 18 Jan 2015 18:32:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE079D86; Sun, 18 Jan 2015 18:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IIWknR080247; Sun, 18 Jan 2015 18:32:46 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IIWipJ080231; Sun, 18 Jan 2015 18:32:44 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501181832.t0IIWipJ080231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 18 Jan 2015 18:32:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277334 - in head/sys: conf powerpc/aim powerpc/booke powerpc/include powerpc/ofw powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 18:32:47 -0000 Author: nwhitehorn Date: Sun Jan 18 18:32:43 2015 New Revision: 277334 URL: https://svnweb.freebsd.org/changeset/base/277334 Log: Refactor PowerPC (especially AIM) init sequence to be less baroque. MFC after: 2 months Modified: head/sys/conf/ldscript.powerpc head/sys/conf/ldscript.powerpc64 head/sys/powerpc/aim/locore32.S head/sys/powerpc/aim/locore64.S head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/booke/locore.S head/sys/powerpc/include/trap.h head/sys/powerpc/ofw/ofw_machdep.c head/sys/powerpc/powerpc/intr_machdep.c head/sys/powerpc/powerpc/vm_machdep.c Modified: head/sys/conf/ldscript.powerpc ============================================================================== --- head/sys/conf/ldscript.powerpc Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/conf/ldscript.powerpc Sun Jan 18 18:32:43 2015 (r277334) @@ -11,6 +11,7 @@ SECTIONS /* Read-only sections, merged into text segment: */ . = kernbase + SIZEOF_HEADERS; + PROVIDE (begin = . - SIZEOF_HEADERS); .text : { Modified: head/sys/conf/ldscript.powerpc64 ============================================================================== --- head/sys/conf/ldscript.powerpc64 Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/conf/ldscript.powerpc64 Sun Jan 18 18:32:43 2015 (r277334) @@ -11,6 +11,7 @@ SECTIONS /* Read-only sections, merged into text segment: */ . = kernbase + SIZEOF_HEADERS; + PROVIDE (begin = . - SIZEOF_HEADERS); .text : { @@ -68,7 +69,7 @@ SECTIONS .toc1 : ALIGN(8) { *(.toc1) } .opd : ALIGN(8) { KEEP (*(.opd)) } .branch_lt : ALIGN(8) { *(.branch_lt) } - .got : ALIGN(8) { *(.got .toc) } + .got : ALIGN(8) { __tocbase = .; *(.got .toc) } .dynamic : { *(.dynamic) } /* Put .ctors and .dtors next to the .got2 section, so that the pointers Modified: head/sys/powerpc/aim/locore32.S ============================================================================== --- head/sys/powerpc/aim/locore32.S Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/aim/locore32.S Sun Jan 18 18:32:43 2015 (r277334) @@ -76,29 +76,19 @@ .globl kernbase .set kernbase, KERNBASE -#define TMPSTKSZ 8192 /* 8K temporary stack */ - /* * Globals */ .data + .align 3 +GLOBAL(__startkernel) + .long begin +GLOBAL(__endkernel) + .long end .align 4 +#define TMPSTKSZ 8192 /* 8K temporary stack */ GLOBAL(tmpstk) .space TMPSTKSZ -GLOBAL(esym) - .long 0 /* end of symbol table */ - -#define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ -GLOBAL(intrnames) - .space INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 -GLOBAL(sintrnames) - .long INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 - - .align 4 -GLOBAL(intrcnt) - .space INTRCNT_COUNT * 4 * 2 -GLOBAL(sintrcnt) - .long INTRCNT_COUNT * 4 * 2 .text .globl btext @@ -142,43 +132,9 @@ __start: cmplw 8,9 blt 2b - /* Save the argument pointer and length */ - mr 20,6 - mr 21,7 - - lis 8,openfirmware_entry@ha - stw 5,openfirmware_entry@l(8) /* save client interface handler */ - lis 1,(tmpstk+TMPSTKSZ-16)@ha addi 1,1,(tmpstk+TMPSTKSZ-16)@l - mfmsr 0 - lis 9,ofmsr@ha - stwu 0,ofmsr@l(9) - - mfsprg0 0 /* save SPRG0-3 */ - stw 0,4(9) /* ofmsr[1] = sprg0 */ - mfsprg1 0 - stw 0,8(9) /* ofmsr[2] = sprg1 */ - mfsprg2 0 - stw 0,12(9) /* ofmsr[3] = sprg2 */ - mfsprg3 0 - stw 0,16(9) /* ofmsr[4] = sprg3 */ - - bl OF_initial_setup - - lis 3,kernel_text@ha - addi 3,3,kernel_text@l - - lis 4,end@ha - addi 4,4,end@l - add 4,4,3 - mr 5,4 - - /* Restore the argument pointer and length */ - mr 6,20 - mr 7,21 - bl powerpc_init mr %r1, %r3 li %r3, 0 Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/aim/locore64.S Sun Jan 18 18:32:43 2015 (r277334) @@ -68,36 +68,28 @@ /* Locate the per-CPU data structure */ #define GET_CPUINFO(r) \ mfsprg0 r - -/* - * Compiled KERNBASE location and the kernel load address - */ - .globl kernbase - .set kernbase, KERNBASE - -#define TMPSTKSZ 16384 /* 16K temporary stack */ +#define GET_TOCBASE(r) \ + li r,TRAP_TOCBASE; /* Magic address for TOC */ \ + ld r,0(r) + +/* Glue for linker script */ +.globl kernbase +.set kernbase, KERNBASE /* * Globals */ .data + .align 3 +GLOBAL(__startkernel) + .llong begin +GLOBAL(__endkernel) + .llong end + .align 4 +#define TMPSTKSZ 16384 /* 16K temporary stack */ GLOBAL(tmpstk) .space TMPSTKSZ -GLOBAL(esym) - .llong 0 /* end of symbol table */ - -#define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ -GLOBAL(intrnames) - .space INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 -GLOBAL(sintrnames) - .quad INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 - - .align 4 -GLOBAL(intrcnt) - .space INTRCNT_COUNT * 4 * 2 -GLOBAL(sintrcnt) - .quad INTRCNT_COUNT * 4 * 2 .text .globl btext @@ -113,90 +105,52 @@ kernel_text: /* * Startup entry. Note, this must be the first thing in the text * segment! + * + * Calling convention: + * r3: Flattened Device Tree pointer (or zero) + * r4: ignored + * r5: OF client interface pointer (or zero) + * r6: Loader metadata pointer (or zero) */ .text ASENTRY_NOPROF(__start) - li 8,0 - li 9,0x100 - mtctr 9 -1: - dcbf 0,8 - icbi 0,8 - addi 8,8,0x20 - bdnz 1b - sync - isync - - /* Save the argument pointer and length */ - mr 20,6 - mr 21,7 - - lis 8,openfirmware_entry@ha - std 5,openfirmware_entry@l(8) /* save client interface handler */ - - /* Set up the stack pointer */ - lis 1,(tmpstk+TMPSTKSZ-48)@ha - addi 1,1,(tmpstk+TMPSTKSZ-48)@l - /* Set up the TOC pointer */ - lis 2,tocbase@ha - ld 2,tocbase@l(2) + b 0f + .align 3 +0: nop + bl 1f + .llong __tocbase + 0x8000 +1: mflr %r2 + ld %r2,0(%r2) - mfmsr 0 - lis 9,ofmsr@ha - stdu 0,ofmsr@l(9) - - mfsprg0 0 /* save SPRG0-3 */ - std 0,8(9) /* ofmsr[1] = sprg0 */ - mfsprg1 0 - std 0,16(9) /* ofmsr[2] = sprg1 */ - mfsprg2 0 - std 0,24(9) /* ofmsr[3] = sprg2 */ - mfsprg3 0 - std 0,32(9) /* ofmsr[4] = sprg3 */ + /* Set up the stack pointer */ + lis %r1,(tmpstk+TMPSTKSZ-48)@ha + addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l /* Switch to 64-bit mode */ - mfmsr 9 - li 8,1 - insrdi 9,8,1,0 - mtmsrd 9 + mfmsr %r9 + li %r8,1 + insrdi %r9,%r8,1,0 + mtmsrd %r9 isync - bl OF_initial_setup - nop - - lis 3,kernbase@ha - addi 3,3,kernbase@l - - lis 4,end@ha - addi 4,4,end@l - add 4,4,3 - mr 5,4 - - /* Restore the argument pointer and length */ - mr 6,20 - mr 7,21 - + /* Begin CPU init */ + mr %r4,%r2 /* Replace ignored r4 with tocbase for trap handlers */ bl powerpc_init nop + + /* Set stack pointer to new value and branch to mi_startup */ mr %r1, %r3 li %r3, 0 std %r3, 0(%r1) bl mi_startup nop + + /* If this returns (it won't), go back to firmware */ b OF_exit nop /* - * PPC64 ABI TOC base - */ - - .align 3 - .globl tocbase -tocbase: - .llong .TOC.@tocbase - -/* * int setfault() * * Similar to setjmp to setup for handling faults on accesses to user memory. Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/aim/machdep.c Sun Jan 18 18:32:43 2015 (r277334) @@ -223,7 +223,7 @@ cpu_startup(void *dummy) vm_pager_bufferinit(); } -extern char kernel_text[], _end[]; +extern vm_offset_t __startkernel, __endkernel; #ifndef __powerpc64__ /* Bits for running on 64-bit systems in 32-bit mode. */ @@ -244,13 +244,12 @@ extern void *dblow, *dbsize; extern void *imisstrap, *imisssize; extern void *dlmisstrap, *dlmisssize; extern void *dsmisstrap, *dsmisssize; -char save_trap_init[0x2f00]; /* EXC_LAST */ uintptr_t -powerpc_init(vm_offset_t startkernel, vm_offset_t endkernel, - vm_offset_t basekernel, void *mdp) +powerpc_init(vm_offset_t fdt, vm_offset_t toc, vm_offset_t ofentry, void *mdp) { struct pcpu *pc; + vm_offset_t startkernel, endkernel; void *generictrap; size_t trap_offset; void *kmdp; @@ -273,8 +272,12 @@ powerpc_init(vm_offset_t startkernel, vm trap_offset = 0; cacheline_warn = 0; - /* Save trap vectors. */ - ofw_save_trap_vec(save_trap_init); + /* Store boot environment state */ + OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); + + /* First guess at start/end kernel positions */ + startkernel = __startkernel; + endkernel = __endkernel; #ifdef WII /* @@ -490,6 +493,9 @@ powerpc_init(vm_offset_t startkernel, vm #else /* powerpc64 */ cpu_features |= PPC_FEATURE_64; generictrap = &trapcode; + + /* Set TOC base so that the interrupt code can get at it */ + *((register_t *)TRAP_TOCBASE) = toc; #endif bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstsize); Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/aim/trap_subr64.S Sun Jan 18 18:32:43 2015 (r277334) @@ -310,8 +310,7 @@ cpu_reset: lis %r1,(tmpstk+TMPSTKSZ-48)@ha /* get new SP */ addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l - lis %r3,tocbase@ha - ld %r2,tocbase@l(%r3) + GET_TOCBASE(%r2) bl CNAME(cpudep_ap_early_bootstrap) /* Set PCPU */ nop lis %r3,1@l @@ -445,8 +444,7 @@ kern_slbtrap: addi %r1,%r1,PC_SLBSTACK-48+1024 li %r2,~15 and %r1,%r1,%r2 - lis %r3,tocbase@ha - ld %r2,tocbase@l(%r3) + GET_TOCBASE(%r2) mflr %r3 andi. %r3,%r3,0xff80 mfdar %r4 @@ -683,8 +681,7 @@ k_trap: FRAME_SETUP(PC_TEMPSAVE) /* Call C interrupt dispatcher: */ trapagain: - lis %r3,tocbase@ha - ld %r2,tocbase@l(%r3) + GET_TOCBASE(%r2) addi %r3,%r1,48 bl CNAME(powerpc_interrupt) nop @@ -711,8 +708,7 @@ CNAME(trapexit): ori %r3,%r3,PSL_EE@l mtmsr %r3 isync - lis %r3,tocbase@ha - ld %r2,tocbase@l(%r3) + GET_TOCBASE(%r2) addi %r3,%r1,48 bl CNAME(ast) nop @@ -760,8 +756,7 @@ dbtrap: FRAME_SETUP(PC_DBSAVE) /* Call C trap code: */ - lis %r3,tocbase@ha - ld %r2,tocbase@l(%r3) + GET_TOCBASE(%r2) addi %r3,%r1,48 bl CNAME(db_trap_glue) nop Modified: head/sys/powerpc/booke/locore.S ============================================================================== --- head/sys/powerpc/booke/locore.S Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/booke/locore.S Sun Jan 18 18:32:43 2015 (r277334) @@ -207,7 +207,7 @@ done_mapping: */ lis %r1, tmpstack@ha addi %r1, %r1, tmpstack@l - addi %r1, %r1, (TMPSTACKSZ - 8) + addi %r1, %r1, (TMPSTACKSZ - 16) /* * Initialise exception vector offsets @@ -367,7 +367,7 @@ bp_tlb1_end: */ lis %r1, tmpstack@ha addi %r1, %r1, tmpstack@l - addi %r1, %r1, (TMPSTACKSZ - 8) + addi %r1, %r1, (TMPSTACKSZ - 16) /* * Initialise exception vector offsets @@ -757,6 +757,8 @@ setfault: .align 4 tmpstack: .space TMPSTACKSZ +tmpstackbound: + .space 10240 /* XXX: this really should not be necessary */ /* * Compiled KERNBASE locations @@ -764,20 +766,4 @@ tmpstack: .globl kernbase .set kernbase, KERNBASE -/* - * Globals - */ -#define INTRCNT_COUNT 256 /* max(HROWPIC_IRQMAX,OPENPIC_IRQMAX) */ - -GLOBAL(intrnames) - .space INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 -GLOBAL(sintrnames) - .long INTRCNT_COUNT * (MAXCOMLEN + 1) * 2 - - .align 4 -GLOBAL(intrcnt) - .space INTRCNT_COUNT * 4 * 2 -GLOBAL(sintrcnt) - .long INTRCNT_COUNT * 4 * 2 - #include Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/include/trap.h Sun Jan 18 18:32:43 2015 (r277334) @@ -123,6 +123,9 @@ /* DTrace trap opcode. */ #define EXC_DTRACE 0x7c810808 +/* Magic pointer to store TOC base for trap handlers on ppc64 */ +#define TRAP_TOCBASE 0x1f8 + #ifndef LOCORE struct trapframe; struct pcb; Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/ofw/ofw_machdep.c Sun Jan 18 18:32:43 2015 (r277334) @@ -66,8 +66,8 @@ extern register_t ofmsr[5]; extern void *openfirmware_entry; static void *fdt; int ofw_real_mode; -extern char save_trap_init[0x2f00]; /* EXC_LAST */ -char save_trap_of[0x2f00]; /* EXC_LAST */ +char save_trap_init[0x2f00]; /* EXC_LAST */ +char save_trap_of[0x2f00]; /* EXC_LAST */ int ofwcall(void *); static int openfirmware(void *args); @@ -257,18 +257,30 @@ ofw_mem_regions(struct mem_region *memp, void OF_initial_setup(void *fdt_ptr, void *junk, int (*openfirm)(void *)) { + ofmsr[0] = mfmsr(); + #ifdef __powerpc64__ + ofmsr[0] &= ~PSL_SF; + #endif + __asm __volatile("mfsprg0 %0" : "=&r"(ofmsr[1])); + __asm __volatile("mfsprg1 %0" : "=&r"(ofmsr[2])); + __asm __volatile("mfsprg2 %0" : "=&r"(ofmsr[3])); + __asm __volatile("mfsprg3 %0" : "=&r"(ofmsr[4])); + if (ofmsr[0] & PSL_DR) ofw_real_mode = 0; else ofw_real_mode = 1; fdt = fdt_ptr; + openfirmware_entry = openfirm; #ifdef FDT_DTB_STATIC /* Check for a statically included blob */ if (fdt == NULL) fdt = &fdt_static_dtb; #endif + + ofw_save_trap_vec(save_trap_init); } boolean_t Modified: head/sys/powerpc/powerpc/intr_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/intr_machdep.c Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/powerpc/intr_machdep.c Sun Jan 18 18:32:43 2015 (r277334) @@ -127,6 +127,11 @@ static u_int nirqs = 0; /* Allocated IR #endif static u_int stray_count; +u_long intrcnt[INTR_VECTORS]; +char intrnames[INTR_VECTORS * MAXCOMLEN]; +size_t sintrcnt = sizeof(intrcnt); +size_t sintrnames = sizeof(intrnames); + device_t root_pic; #ifdef SMP Modified: head/sys/powerpc/powerpc/vm_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/vm_machdep.c Sun Jan 18 18:25:12 2015 (r277333) +++ head/sys/powerpc/powerpc/vm_machdep.c Sun Jan 18 18:32:43 2015 (r277334) @@ -99,11 +99,6 @@ #include #include -#ifdef __powerpc64__ -extern uintptr_t tocbase; -#endif - - /* * Finish a fork operation, with process p2 nearly set up. * Copy and update the pcb, set up the stack so that the child @@ -149,7 +144,7 @@ cpu_fork(struct thread *td1, struct proc cf = (struct callframe *)tf - 1; memset(cf, 0, sizeof(struct callframe)); #ifdef __powerpc64__ - cf->cf_toc = tocbase; + cf->cf_toc = ((register_t *)fork_return)[1]; #endif cf->cf_func = (register_t)fork_return; cf->cf_arg0 = (register_t)td2; From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:00:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1708C442; Sun, 18 Jan 2015 20:00:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EB86587F; Sun, 18 Jan 2015 20:00:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IK0ZPX019326; Sun, 18 Jan 2015 20:00:35 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IK0YxW019320; Sun, 18 Jan 2015 20:00:34 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501182000.t0IK0YxW019320@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sun, 18 Jan 2015 20:00:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277335 - in head/sys/powerpc: aim include ofw powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:00:36 -0000 Author: nwhitehorn Date: Sun Jan 18 20:00:33 2015 New Revision: 277335 URL: https://svnweb.freebsd.org/changeset/base/277335 Log: Use TOC to look up all kernel globals on powerpc64 instead of doing the non-relocatable lis @ha, ori @l dance and hoping they are below 4 GB. MFC after: 2 months Modified: head/sys/powerpc/aim/locore64.S head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/asm.h head/sys/powerpc/ofw/ofwcall64.S head/sys/powerpc/powerpc/swtch64.S Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Sun Jan 18 18:32:43 2015 (r277334) +++ head/sys/powerpc/aim/locore64.S Sun Jan 18 20:00:33 2015 (r277335) @@ -91,6 +91,8 @@ GLOBAL(__endkernel) GLOBAL(tmpstk) .space TMPSTKSZ +TOC_ENTRY(tmpstk) + .text .globl btext btext: @@ -124,8 +126,8 @@ ASENTRY_NOPROF(__start) ld %r2,0(%r2) /* Set up the stack pointer */ - lis %r1,(tmpstk+TMPSTKSZ-48)@ha - addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l + ld %r1,TOC_REF(tmpstk)(%r2) + addi %r1,%r1,TMPSTKSZ-48 /* Switch to 64-bit mode */ mfmsr %r9 Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Sun Jan 18 18:32:43 2015 (r277334) +++ head/sys/powerpc/aim/trap_subr64.S Sun Jan 18 20:00:33 2015 (r277335) @@ -307,10 +307,11 @@ CNAME(rstcode): CNAME(rstsize) = . - CNAME(rstcode) cpu_reset: - lis %r1,(tmpstk+TMPSTKSZ-48)@ha /* get new SP */ - addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l - GET_TOCBASE(%r2) + + ld %r1,TOC_REF(tmpstk)(%r2) /* get new SP */ + addi %r1,%r1,(TMPSTKSZ-48) + bl CNAME(cpudep_ap_early_bootstrap) /* Set PCPU */ nop lis %r3,1@l @@ -751,8 +752,10 @@ dbtrap: andi. %r1,%r1,0xff00 mtsprg3 %r1 - lis %r1,(tmpstk+TMPSTKSZ-48)@ha /* get new SP */ - addi %r1,%r1,(tmpstk+TMPSTKSZ-48)@l + li %r1,TRAP_TOCBASE /* get new SP */ + ld %r1,0(%r1) + ld %r1,TOC_REF(tmpstk)(%r1) + addi %r1,%r1,(TMPSTKSZ-48) FRAME_SETUP(PC_DBSAVE) /* Call C trap code: */ Modified: head/sys/powerpc/include/asm.h ============================================================================== --- head/sys/powerpc/include/asm.h Sun Jan 18 18:32:43 2015 (r277334) +++ head/sys/powerpc/include/asm.h Sun Jan 18 20:00:33 2015 (r277335) @@ -80,6 +80,12 @@ name: #ifdef __powerpc64__ +#define TOC_REF(name) __CONCAT(.L,name) +#define TOC_ENTRY(name) \ + .section ".toc","aw"; \ + TOC_REF(name): \ + .tc name[TC],name + #define _ENTRY(name) \ .section ".text"; \ .p2align 2; \ Modified: head/sys/powerpc/ofw/ofwcall64.S ============================================================================== --- head/sys/powerpc/ofw/ofwcall64.S Sun Jan 18 18:32:43 2015 (r277334) +++ head/sys/powerpc/ofw/ofwcall64.S Sun Jan 18 20:00:33 2015 (r277335) @@ -52,6 +52,13 @@ GLOBAL(openfirmware_entry) GLOBAL(rtas_entry) .llong 0 /* RTAS entry point */ +TOC_ENTRY(ofmsr) +TOC_ENTRY(ofwstk) +TOC_ENTRY(rtasmsr) +TOC_ENTRY(openfirmware_entry) +TOC_ENTRY(rtas_entry) +TOC_ENTRY(rtas_regsave) + /* * Open Firmware Real-mode Entry Point. This is a huge pain. */ @@ -94,16 +101,20 @@ ASENTRY_NOPROF(ofwcall) mfmsr %r6 /* read client interface handler */ - lis %r4,openfirmware_entry@ha - ld %r4,openfirmware_entry@l(%r4) + ld %r4,TOC_REF(openfirmware_entry)(%r2) + ld %r4,0(%r4) + + /* Get OF stack pointer */ + ld %r7,TOC_REF(ofwstk)(%r2) + addi %r7,%r7,OFWSTKSZ-32 /* * Set the MSR to the OF value. This has the side effect of disabling * exceptions, which is important for the next few steps. */ - lis %r5,ofmsr@ha - ld %r5,ofmsr@l(%r5) + ld %r5,TOC_REF(ofmsr)(%r2) + ld %r5,0(%r5) mtmsrd %r5 isync @@ -114,8 +125,7 @@ ASENTRY_NOPROF(ofwcall) * the old MSR so we can get them back later. */ mr %r5,%r1 - lis %r1,(ofwstk+OFWSTKSZ-32)@ha - addi %r1,%r1,(ofwstk+OFWSTKSZ-32)@l + mr %r1,%r7 std %r5,8(%r1) /* Save real stack pointer */ std %r2,16(%r1) /* Save old TOC */ std %r6,24(%r1) /* Save old MSR */ @@ -212,17 +222,18 @@ ASENTRY_NOPROF(rtascall) /* Record the old MSR */ mfmsr %r6 - /* read client interface handler */ - lis %r5,rtas_entry@ha - ld %r5,rtas_entry@l(%r5) + /* Read RTAS entry and reg save area pointers */ + ld %r5,TOC_REF(rtas_entry)(%r2) + ld %r5,0(%r5) + ld %r8,TOC_REF(rtas_regsave)(%r2) /* * Set the MSR to the RTAS value. This has the side effect of disabling * exceptions, which is important for the next few steps. */ - lis %r7,rtasmsr@ha - ld %r7,rtasmsr@l(%r7) + ld %r7,TOC_REF(rtasmsr)(%r2) + ld %r7,0(%r7) mtmsrd %r7 isync @@ -233,8 +244,7 @@ ASENTRY_NOPROF(rtascall) * are below 4 GB, so this is safe. */ mr %r7,%r1 - lis %r1,rtas_regsave@ha - addi %r1,%r1,rtas_regsave@l + mr %r1,%r8 std %r7,0(%r1) /* Save 64-bit stack pointer */ std %r2,8(%r1) /* Save TOC */ std %r6,16(%r1) /* Save MSR */ Modified: head/sys/powerpc/powerpc/swtch64.S ============================================================================== --- head/sys/powerpc/powerpc/swtch64.S Sun Jan 18 18:32:43 2015 (r277334) +++ head/sys/powerpc/powerpc/swtch64.S Sun Jan 18 20:00:33 2015 (r277335) @@ -65,6 +65,8 @@ #include #include +TOC_ENTRY(blocked_lock) + /* * void cpu_throw(struct thread *old, struct thread *new) */ @@ -145,8 +147,7 @@ ENTRY(cpu_switch) cpu_switchin: #if defined(SMP) && defined(SCHED_ULE) /* Wait for the new thread to become unblocked */ - lis %r6,blocked_lock@ha - addi %r6,%r6,blocked_lock@l + ld %r6,TOC_REF(blocked_lock)(%r2) blocked_loop: ld %r7,TD_LOCK(%r13) cmpd %r6,%r7 From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:20:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F716987; Sun, 18 Jan 2015 20:20:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B64BA4C; Sun, 18 Jan 2015 20:20:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKKSJm030195; Sun, 18 Jan 2015 20:20:28 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKKSM1030194; Sun, 18 Jan 2015 20:20:28 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501182020.t0IKKSM1030194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 18 Jan 2015 20:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277337 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:20:28 -0000 Author: tuexen Date: Sun Jan 18 20:20:27 2015 New Revision: 277337 URL: https://svnweb.freebsd.org/changeset/base/277337 Log: Remove an unused variable. Reported by: Coverity CID: 750999 MFC after: 1 week Modified: head/sys/netinet/sctp_usrreq.c Modified: head/sys/netinet/sctp_usrreq.c ============================================================================== --- head/sys/netinet/sctp_usrreq.c Sun Jan 18 20:15:47 2015 (r277336) +++ head/sys/netinet/sctp_usrreq.c Sun Jan 18 20:20:27 2015 (r277337) @@ -4720,7 +4720,6 @@ sctp_setopt(struct socket *so, int optna case SCTP_CONNECT_X_COMPLETE: { struct sockaddr *sa; - struct sctp_nets *net; /* FIXME MT: check correct? */ SCTP_CHECK_AND_CAST(sa, optval, struct sockaddr, optsize); @@ -4731,7 +4730,6 @@ sctp_setopt(struct socket *so, int optna stcb = LIST_FIRST(&inp->sctp_asoc_list); if (stcb) { SCTP_TCB_LOCK(stcb); - net = sctp_findnet(stcb, sa); } SCTP_INP_RUNLOCK(inp); } else { @@ -4743,7 +4741,7 @@ sctp_setopt(struct socket *so, int optna * TCB.. aka NULL. */ SCTP_INP_INCR_REF(inp); - stcb = sctp_findassociation_ep_addr(&inp, sa, &net, NULL, NULL); + stcb = sctp_findassociation_ep_addr(&inp, sa, NULL, NULL, NULL); if (stcb == NULL) { SCTP_INP_DECR_REF(inp); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:26:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 257B6F23; Sun, 18 Jan 2015 20:26:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F830B09; Sun, 18 Jan 2015 20:26:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKQRRK032904; Sun, 18 Jan 2015 20:26:27 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKQR9Z032903; Sun, 18 Jan 2015 20:26:27 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501182026.t0IKQR9Z032903@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jan 2015 20:26:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277340 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:26:28 -0000 Author: pfg Date: Sun Jan 18 20:26:27 2015 New Revision: 277340 URL: https://svnweb.freebsd.org/changeset/base/277340 Log: Remove dead code. After the ext2 variant of the "orlov allocator" was implemented, the case for a negative or zero dirsize disappeared. Drop the dead code and unsign dirsize given that it can't be negative anyways. CID: 1008669 MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_alloc.c Modified: head/sys/fs/ext2fs/ext2_alloc.c ============================================================================== --- head/sys/fs/ext2fs/ext2_alloc.c Sun Jan 18 20:25:41 2015 (r277339) +++ head/sys/fs/ext2fs/ext2_alloc.c Sun Jan 18 20:26:27 2015 (r277340) @@ -443,11 +443,11 @@ static u_long ext2_dirpref(struct inode *pip) { struct m_ext2fs *fs; - int cg, prefcg, dirsize, cgsize; + int cg, prefcg, cgsize; u_int avgifree, avgbfree, avgndir, curdirsize; u_int minifree, minbfree, maxndir; u_int mincg, minndir; - u_int maxcontigdirs; + u_int dirsize, maxcontigdirs; mtx_assert(EXT2_MTX(pip->i_ump), MA_OWNED); fs = pip->i_e2fs; @@ -498,10 +498,7 @@ ext2_dirpref(struct inode *pip) curdirsize = avgndir ? (cgsize - avgbfree * fs->e2fs_bsize) / avgndir : 0; if (dirsize < curdirsize) dirsize = curdirsize; - if (dirsize <= 0) - maxcontigdirs = 0; /* dirsize overflowed */ - else - maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); + maxcontigdirs = min((avgbfree * fs->e2fs_bsize) / dirsize, 255); maxcontigdirs = min(maxcontigdirs, fs->e2fs_ipg / AFPDIR); if (maxcontigdirs == 0) maxcontigdirs = 1; From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:38:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2E04748F; Sun, 18 Jan 2015 20:38:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 181D5C08; Sun, 18 Jan 2015 20:38:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKceWt038082; Sun, 18 Jan 2015 20:38:40 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKccCv038071; Sun, 18 Jan 2015 20:38:38 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501182038.t0IKccCv038071@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 18 Jan 2015 20:38:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277343 - in stable/10/sys/dev/cxgb: . common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:38:41 -0000 Author: np Date: Sun Jan 18 20:38:38 2015 New Revision: 277343 URL: https://svnweb.freebsd.org/changeset/base/277343 Log: MFC r276959: cxgb: replace r273280 with a more comprehensive fix. Poll for link state when the link is down, even for interrupt capable PHYs. Allow PHYs to report a dubious "partial" link. If this state is seen 3 consecutive times (each check is ~1s apart) then reset the PHY. This is a workaround for a situation where repeatedly toggling the link from the peer gets the AEL2005 PHY into a state where it never establishes a PCS block lock even when everything is in order. Modified: stable/10/sys/dev/cxgb/common/cxgb_ael1002.c stable/10/sys/dev/cxgb/common/cxgb_aq100x.c stable/10/sys/dev/cxgb/common/cxgb_common.h stable/10/sys/dev/cxgb/common/cxgb_mv88e1xxx.c stable/10/sys/dev/cxgb/common/cxgb_t3_hw.c stable/10/sys/dev/cxgb/common/cxgb_tn1010.c stable/10/sys/dev/cxgb/common/cxgb_vsc8211.c stable/10/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 18 20:38:38 2015 (r277343) @@ -283,10 +283,10 @@ static int ael1002_intr_noop(struct cphy /* * Get link status for a 10GBASE-R device. */ -static int get_link_status_r(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_r(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -296,10 +296,16 @@ static int get_link_status_r(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; - if (*link_ok == 0) - return (0); + stat0 &= 1; + stat1 &= 1; + stat2 = (stat2 >> 12) & 1; + if (stat0 & stat1 & stat2) + *link_state = PHY_LINK_UP; + else if (stat0 == 1 && stat1 == 0 && stat2 == 1) + *link_state = PHY_LINK_PARTIAL; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -1345,10 +1351,8 @@ static int ael2005_intr_handler(struct c return ret; ret |= cause; - if (!ret) { - (void) ael2005_reset(phy, 0); + if (!ret) ret |= cphy_cause_link_change; - } return ret; } @@ -2156,10 +2160,10 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, /* * Get link status for a 10GBASE-X device. */ -static int get_link_status_x(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_x(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -2169,7 +2173,10 @@ static int get_link_status_x(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1; + if ((stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1) + *link_state = PHY_LINK_UP; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -2230,10 +2237,10 @@ static int xaui_direct_reset(struct cphy return 0; } -static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, +static int xaui_direct_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int status; adapter_t *adapter = phy->adapter; @@ -2245,7 +2252,7 @@ static int xaui_direct_get_link_status(s XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) | t3_read_reg(adapter, XGM_REG(A_XGM_SERDES_STAT3, phy->addr)); - *link_ok = !(status & F_LOWSIG0); + *link_state = status & F_LOWSIG0 ? PHY_LINK_DOWN : PHY_LINK_UP; } if (speed) *speed = SPEED_10000; Modified: stable/10/sys/dev/cxgb/common/cxgb_aq100x.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 18 20:38:38 2015 (r277343) @@ -350,7 +350,7 @@ aq100x_set_speed_duplex(struct cphy *phy } static int -aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, +aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { int err; @@ -440,8 +440,8 @@ aq100x_get_link_status(struct cphy *phy, link = 1; done: - if (link_ok) - *link_ok = link; + if (link_state) + *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN; return (0); } Modified: stable/10/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_common.h Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_common.h Sun Jan 18 20:38:38 2015 (r277343) @@ -543,6 +543,12 @@ enum { phy_modtype_unknown }; +enum { + PHY_LINK_DOWN = 0, + PHY_LINK_UP, + PHY_LINK_PARTIAL +}; + /* PHY operations */ struct cphy_ops { int (*reset)(struct cphy *phy, int wait); @@ -558,7 +564,7 @@ struct cphy_ops { int (*advertise)(struct cphy *phy, unsigned int advertise_map); int (*set_loopback)(struct cphy *phy, int mmd, int dir, int enable); int (*set_speed_duplex)(struct cphy *phy, int speed, int duplex); - int (*get_link_status)(struct cphy *phy, int *link_ok, int *speed, + int (*get_link_status)(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc); int (*power_down)(struct cphy *phy, int enable); }; @@ -567,6 +573,7 @@ struct cphy_ops { struct cphy { u8 addr; /* PHY address */ u8 modtype; /* PHY module type */ + u8 rst; unsigned int priv; /* scratch pad */ unsigned int caps; /* PHY capabilities */ adapter_t *adapter; /* associated adapter */ Modified: stable/10/sys/dev/cxgb/common/cxgb_mv88e1xxx.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 18 20:38:38 2015 (r277343) @@ -185,7 +185,7 @@ static int mv88e1xxx_set_loopback(struct on ? BMCR_LOOPBACK : 0); } -static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_ok, +static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { u32 status; @@ -206,8 +206,9 @@ static int mv88e1xxx_get_link_status(str else sp = SPEED_1000; } - if (link_ok) - *link_ok = (status & V_PSSR_LINK) != 0; + if (link_state) + *link_state = status & V_PSSR_LINK ? PHY_LINK_UP : + PHY_LINK_DOWN; if (speed) *speed = sp; if (duplex) Modified: stable/10/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 18 20:38:38 2015 (r277343) @@ -1520,7 +1520,7 @@ static void t3_clear_faults(adapter_t *a */ void t3_link_changed(adapter_t *adapter, int port_id) { - int link_ok, speed, duplex, fc, link_fault; + int link_ok, speed, duplex, fc, link_fault, link_state; struct port_info *pi = adap2pinfo(adapter, port_id); struct cphy *phy = &pi->phy; struct cmac *mac = &pi->mac; @@ -1532,7 +1532,14 @@ void t3_link_changed(adapter_t *adapter, fc = lc->fc; link_fault = 0; - phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + phy->ops->get_link_status(phy, &link_state, &speed, &duplex, &fc); + link_ok = (link_state == PHY_LINK_UP); + if (link_state != PHY_LINK_PARTIAL) + phy->rst = 0; + else if (++phy->rst == 3) { + phy->ops->reset(phy, 0); + phy->rst = 0; + } if (link_ok == 0) pi->link_fault = LF_NO; Modified: stable/10/sys/dev/cxgb/common/cxgb_tn1010.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 18 20:38:38 2015 (r277343) @@ -129,7 +129,7 @@ static int tn1010_advertise(struct cphy ADVERTISE_LOOP_TIMING); } -static int tn1010_get_link_status(struct cphy *phy, int *link_ok, +static int tn1010_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int status, lpa, adv; @@ -139,8 +139,9 @@ static int tn1010_get_link_status(struct if (err) return err; - if (link_ok) - *link_ok = (status & F_LINK_STAT) != 0; + if (link_state) + *link_state = status & F_LINK_STAT ? PHY_LINK_UP : + PHY_LINK_DOWN; if (G_ANEG_STAT(status) == ANEG_COMPLETE) { sp = (status & F_ANEG_SPEED_1G) ? SPEED_1000 : SPEED_10000; Modified: stable/10/sys/dev/cxgb/common/cxgb_vsc8211.c ============================================================================== --- stable/10/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 18 20:38:38 2015 (r277343) @@ -129,7 +129,7 @@ static int vsc8211_autoneg_restart(struc BMCR_ANRESTART); } -static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -141,7 +141,7 @@ static int vsc8211_get_link_status(struc if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -150,7 +150,8 @@ static int vsc8211_get_link_status(struc err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; @@ -201,7 +202,7 @@ static int vsc8211_get_link_status(struc return 0; } -static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -213,7 +214,7 @@ static int vsc8211_get_link_status_fiber if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -222,7 +223,8 @@ static int vsc8211_get_link_status_fiber err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; Modified: stable/10/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/10/sys/dev/cxgb/cxgb_main.c Sun Jan 18 20:32:51 2015 (r277342) +++ stable/10/sys/dev/cxgb/cxgb_main.c Sun Jan 18 20:38:38 2015 (r277343) @@ -2226,7 +2226,8 @@ check_link_status(void *arg, int pending t3_link_changed(sc, pi->port_id); - if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ) || + pi->link_config.link_ok == 0) callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:39:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED5BC5C8; Sun, 18 Jan 2015 20:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7BCBC11; Sun, 18 Jan 2015 20:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKdR79038284; Sun, 18 Jan 2015 20:39:27 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKdPxr038268; Sun, 18 Jan 2015 20:39:25 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501182039.t0IKdPxr038268@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 18 Jan 2015 20:39:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277344 - in stable/9/sys/dev/cxgb: . common X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:39:28 -0000 Author: np Date: Sun Jan 18 20:39:24 2015 New Revision: 277344 URL: https://svnweb.freebsd.org/changeset/base/277344 Log: MFC r276959: cxgb: replace r273280 with a more comprehensive fix. Poll for link state when the link is down, even for interrupt capable PHYs. Allow PHYs to report a dubious "partial" link. If this state is seen 3 consecutive times (each check is ~1s apart) then reset the PHY. This is a workaround for a situation where repeatedly toggling the link from the peer gets the AEL2005 PHY into a state where it never establishes a PCS block lock even when everything is in order. Modified: stable/9/sys/dev/cxgb/common/cxgb_ael1002.c stable/9/sys/dev/cxgb/common/cxgb_aq100x.c stable/9/sys/dev/cxgb/common/cxgb_common.h stable/9/sys/dev/cxgb/common/cxgb_mv88e1xxx.c stable/9/sys/dev/cxgb/common/cxgb_t3_hw.c stable/9/sys/dev/cxgb/common/cxgb_tn1010.c stable/9/sys/dev/cxgb/common/cxgb_vsc8211.c stable/9/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 18 20:39:24 2015 (r277344) @@ -283,10 +283,10 @@ static int ael1002_intr_noop(struct cphy /* * Get link status for a 10GBASE-R device. */ -static int get_link_status_r(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_r(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -296,10 +296,16 @@ static int get_link_status_r(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; - if (*link_ok == 0) - return (0); + stat0 &= 1; + stat1 &= 1; + stat2 = (stat2 >> 12) & 1; + if (stat0 & stat1 & stat2) + *link_state = PHY_LINK_UP; + else if (stat0 == 1 && stat1 == 0 && stat2 == 1) + *link_state = PHY_LINK_PARTIAL; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -1345,10 +1351,8 @@ static int ael2005_intr_handler(struct c return ret; ret |= cause; - if (!ret) { - (void) ael2005_reset(phy, 0); + if (!ret) ret |= cphy_cause_link_change; - } return ret; } @@ -2156,10 +2160,10 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, /* * Get link status for a 10GBASE-X device. */ -static int get_link_status_x(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_x(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -2169,7 +2173,10 @@ static int get_link_status_x(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1; + if ((stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1) + *link_state = PHY_LINK_UP; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -2230,10 +2237,10 @@ static int xaui_direct_reset(struct cphy return 0; } -static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, +static int xaui_direct_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int status; adapter_t *adapter = phy->adapter; @@ -2245,7 +2252,7 @@ static int xaui_direct_get_link_status(s XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) | t3_read_reg(adapter, XGM_REG(A_XGM_SERDES_STAT3, phy->addr)); - *link_ok = !(status & F_LOWSIG0); + *link_state = status & F_LOWSIG0 ? PHY_LINK_DOWN : PHY_LINK_UP; } if (speed) *speed = SPEED_10000; Modified: stable/9/sys/dev/cxgb/common/cxgb_aq100x.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 18 20:39:24 2015 (r277344) @@ -350,7 +350,7 @@ aq100x_set_speed_duplex(struct cphy *phy } static int -aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, +aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { int err; @@ -440,8 +440,8 @@ aq100x_get_link_status(struct cphy *phy, link = 1; done: - if (link_ok) - *link_ok = link; + if (link_state) + *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN; return (0); } Modified: stable/9/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_common.h Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_common.h Sun Jan 18 20:39:24 2015 (r277344) @@ -543,6 +543,12 @@ enum { phy_modtype_unknown }; +enum { + PHY_LINK_DOWN = 0, + PHY_LINK_UP, + PHY_LINK_PARTIAL +}; + /* PHY operations */ struct cphy_ops { int (*reset)(struct cphy *phy, int wait); @@ -558,7 +564,7 @@ struct cphy_ops { int (*advertise)(struct cphy *phy, unsigned int advertise_map); int (*set_loopback)(struct cphy *phy, int mmd, int dir, int enable); int (*set_speed_duplex)(struct cphy *phy, int speed, int duplex); - int (*get_link_status)(struct cphy *phy, int *link_ok, int *speed, + int (*get_link_status)(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc); int (*power_down)(struct cphy *phy, int enable); }; @@ -567,6 +573,7 @@ struct cphy_ops { struct cphy { u8 addr; /* PHY address */ u8 modtype; /* PHY module type */ + u8 rst; unsigned int priv; /* scratch pad */ unsigned int caps; /* PHY capabilities */ adapter_t *adapter; /* associated adapter */ Modified: stable/9/sys/dev/cxgb/common/cxgb_mv88e1xxx.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 18 20:39:24 2015 (r277344) @@ -185,7 +185,7 @@ static int mv88e1xxx_set_loopback(struct on ? BMCR_LOOPBACK : 0); } -static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_ok, +static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { u32 status; @@ -206,8 +206,9 @@ static int mv88e1xxx_get_link_status(str else sp = SPEED_1000; } - if (link_ok) - *link_ok = (status & V_PSSR_LINK) != 0; + if (link_state) + *link_state = status & V_PSSR_LINK ? PHY_LINK_UP : + PHY_LINK_DOWN; if (speed) *speed = sp; if (duplex) Modified: stable/9/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 18 20:39:24 2015 (r277344) @@ -1520,7 +1520,7 @@ static void t3_clear_faults(adapter_t *a */ void t3_link_changed(adapter_t *adapter, int port_id) { - int link_ok, speed, duplex, fc, link_fault; + int link_ok, speed, duplex, fc, link_fault, link_state; struct port_info *pi = adap2pinfo(adapter, port_id); struct cphy *phy = &pi->phy; struct cmac *mac = &pi->mac; @@ -1532,7 +1532,14 @@ void t3_link_changed(adapter_t *adapter, fc = lc->fc; link_fault = 0; - phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + phy->ops->get_link_status(phy, &link_state, &speed, &duplex, &fc); + link_ok = (link_state == PHY_LINK_UP); + if (link_state != PHY_LINK_PARTIAL) + phy->rst = 0; + else if (++phy->rst == 3) { + phy->ops->reset(phy, 0); + phy->rst = 0; + } if (link_ok == 0) pi->link_fault = LF_NO; Modified: stable/9/sys/dev/cxgb/common/cxgb_tn1010.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 18 20:39:24 2015 (r277344) @@ -129,7 +129,7 @@ static int tn1010_advertise(struct cphy ADVERTISE_LOOP_TIMING); } -static int tn1010_get_link_status(struct cphy *phy, int *link_ok, +static int tn1010_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int status, lpa, adv; @@ -139,8 +139,9 @@ static int tn1010_get_link_status(struct if (err) return err; - if (link_ok) - *link_ok = (status & F_LINK_STAT) != 0; + if (link_state) + *link_state = status & F_LINK_STAT ? PHY_LINK_UP : + PHY_LINK_DOWN; if (G_ANEG_STAT(status) == ANEG_COMPLETE) { sp = (status & F_ANEG_SPEED_1G) ? SPEED_1000 : SPEED_10000; Modified: stable/9/sys/dev/cxgb/common/cxgb_vsc8211.c ============================================================================== --- stable/9/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 18 20:39:24 2015 (r277344) @@ -129,7 +129,7 @@ static int vsc8211_autoneg_restart(struc BMCR_ANRESTART); } -static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -141,7 +141,7 @@ static int vsc8211_get_link_status(struc if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -150,7 +150,8 @@ static int vsc8211_get_link_status(struc err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; @@ -201,7 +202,7 @@ static int vsc8211_get_link_status(struc return 0; } -static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -213,7 +214,7 @@ static int vsc8211_get_link_status_fiber if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -222,7 +223,8 @@ static int vsc8211_get_link_status_fiber err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; Modified: stable/9/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/9/sys/dev/cxgb/cxgb_main.c Sun Jan 18 20:38:38 2015 (r277343) +++ stable/9/sys/dev/cxgb/cxgb_main.c Sun Jan 18 20:39:24 2015 (r277344) @@ -2226,7 +2226,8 @@ check_link_status(void *arg, int pending t3_link_changed(sc, pi->port_id); - if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ) || + pi->link_config.link_ok == 0) callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:40:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 389016F4; Sun, 18 Jan 2015 20:40:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22899C19; Sun, 18 Jan 2015 20:40:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKeBFv038573; Sun, 18 Jan 2015 20:40:11 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKe94T038559; Sun, 18 Jan 2015 20:40:09 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501182040.t0IKe94T038559@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sun, 18 Jan 2015 20:40:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r277345 - in stable/8/sys/dev/cxgb: . common X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:40:11 -0000 Author: np Date: Sun Jan 18 20:40:08 2015 New Revision: 277345 URL: https://svnweb.freebsd.org/changeset/base/277345 Log: MFC r276959: cxgb: replace r273280 with a more comprehensive fix. Poll for link state when the link is down, even for interrupt capable PHYs. Allow PHYs to report a dubious "partial" link. If this state is seen 3 consecutive times (each check is ~1s apart) then reset the PHY. This is a workaround for a situation where repeatedly toggling the link from the peer gets the AEL2005 PHY into a state where it never establishes a PCS block lock even when everything is in order. Modified: stable/8/sys/dev/cxgb/common/cxgb_ael1002.c stable/8/sys/dev/cxgb/common/cxgb_aq100x.c stable/8/sys/dev/cxgb/common/cxgb_common.h stable/8/sys/dev/cxgb/common/cxgb_mv88e1xxx.c stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c stable/8/sys/dev/cxgb/common/cxgb_tn1010.c stable/8/sys/dev/cxgb/common/cxgb_vsc8211.c stable/8/sys/dev/cxgb/cxgb_main.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/cxgb/ (props changed) Modified: stable/8/sys/dev/cxgb/common/cxgb_ael1002.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_ael1002.c Sun Jan 18 20:40:08 2015 (r277345) @@ -283,10 +283,10 @@ static int ael1002_intr_noop(struct cphy /* * Get link status for a 10GBASE-R device. */ -static int get_link_status_r(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_r(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -296,10 +296,16 @@ static int get_link_status_r(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & stat1 & (stat2 >> 12)) & 1; - if (*link_ok == 0) - return (0); + stat0 &= 1; + stat1 &= 1; + stat2 = (stat2 >> 12) & 1; + if (stat0 & stat1 & stat2) + *link_state = PHY_LINK_UP; + else if (stat0 == 1 && stat1 == 0 && stat2 == 1) + *link_state = PHY_LINK_PARTIAL; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -1345,10 +1351,8 @@ static int ael2005_intr_handler(struct c return ret; ret |= cause; - if (!ret) { - (void) ael2005_reset(phy, 0); + if (!ret) ret |= cphy_cause_link_change; - } return ret; } @@ -2156,10 +2160,10 @@ int t3_ael2020_phy_prep(pinfo_t *pinfo, /* * Get link status for a 10GBASE-X device. */ -static int get_link_status_x(struct cphy *phy, int *link_ok, int *speed, +static int get_link_status_x(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int stat0, stat1, stat2; int err = mdio_read(phy, MDIO_DEV_PMA_PMD, PMD_RSD, &stat0); @@ -2169,7 +2173,10 @@ static int get_link_status_x(struct cphy err = mdio_read(phy, MDIO_DEV_XGXS, XS_LN_STAT, &stat2); if (err) return err; - *link_ok = (stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1; + if ((stat0 & (stat1 >> 12) & (stat2 >> 12)) & 1) + *link_state = PHY_LINK_UP; + else + *link_state = PHY_LINK_DOWN; } if (speed) *speed = SPEED_10000; @@ -2230,10 +2237,10 @@ static int xaui_direct_reset(struct cphy return 0; } -static int xaui_direct_get_link_status(struct cphy *phy, int *link_ok, +static int xaui_direct_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { - if (link_ok) { + if (link_state) { unsigned int status; adapter_t *adapter = phy->adapter; @@ -2245,7 +2252,7 @@ static int xaui_direct_get_link_status(s XGM_REG(A_XGM_SERDES_STAT2, phy->addr)) | t3_read_reg(adapter, XGM_REG(A_XGM_SERDES_STAT3, phy->addr)); - *link_ok = !(status & F_LOWSIG0); + *link_state = status & F_LOWSIG0 ? PHY_LINK_DOWN : PHY_LINK_UP; } if (speed) *speed = SPEED_10000; Modified: stable/8/sys/dev/cxgb/common/cxgb_aq100x.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_aq100x.c Sun Jan 18 20:40:08 2015 (r277345) @@ -350,7 +350,7 @@ aq100x_set_speed_duplex(struct cphy *phy } static int -aq100x_get_link_status(struct cphy *phy, int *link_ok, int *speed, int *duplex, +aq100x_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { int err; @@ -440,8 +440,8 @@ aq100x_get_link_status(struct cphy *phy, link = 1; done: - if (link_ok) - *link_ok = link; + if (link_state) + *link_state = link ? PHY_LINK_UP : PHY_LINK_DOWN; return (0); } Modified: stable/8/sys/dev/cxgb/common/cxgb_common.h ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_common.h Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_common.h Sun Jan 18 20:40:08 2015 (r277345) @@ -543,6 +543,12 @@ enum { phy_modtype_unknown }; +enum { + PHY_LINK_DOWN = 0, + PHY_LINK_UP, + PHY_LINK_PARTIAL +}; + /* PHY operations */ struct cphy_ops { int (*reset)(struct cphy *phy, int wait); @@ -558,7 +564,7 @@ struct cphy_ops { int (*advertise)(struct cphy *phy, unsigned int advertise_map); int (*set_loopback)(struct cphy *phy, int mmd, int dir, int enable); int (*set_speed_duplex)(struct cphy *phy, int speed, int duplex); - int (*get_link_status)(struct cphy *phy, int *link_ok, int *speed, + int (*get_link_status)(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc); int (*power_down)(struct cphy *phy, int enable); }; @@ -567,6 +573,7 @@ struct cphy_ops { struct cphy { u8 addr; /* PHY address */ u8 modtype; /* PHY module type */ + u8 rst; unsigned int priv; /* scratch pad */ unsigned int caps; /* PHY capabilities */ adapter_t *adapter; /* associated adapter */ Modified: stable/8/sys/dev/cxgb/common/cxgb_mv88e1xxx.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_mv88e1xxx.c Sun Jan 18 20:40:08 2015 (r277345) @@ -185,7 +185,7 @@ static int mv88e1xxx_set_loopback(struct on ? BMCR_LOOPBACK : 0); } -static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_ok, +static int mv88e1xxx_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { u32 status; @@ -206,8 +206,9 @@ static int mv88e1xxx_get_link_status(str else sp = SPEED_1000; } - if (link_ok) - *link_ok = (status & V_PSSR_LINK) != 0; + if (link_state) + *link_state = status & V_PSSR_LINK ? PHY_LINK_UP : + PHY_LINK_DOWN; if (speed) *speed = sp; if (duplex) Modified: stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_t3_hw.c Sun Jan 18 20:40:08 2015 (r277345) @@ -1520,7 +1520,7 @@ static void t3_clear_faults(adapter_t *a */ void t3_link_changed(adapter_t *adapter, int port_id) { - int link_ok, speed, duplex, fc, link_fault; + int link_ok, speed, duplex, fc, link_fault, link_state; struct port_info *pi = adap2pinfo(adapter, port_id); struct cphy *phy = &pi->phy; struct cmac *mac = &pi->mac; @@ -1532,7 +1532,14 @@ void t3_link_changed(adapter_t *adapter, fc = lc->fc; link_fault = 0; - phy->ops->get_link_status(phy, &link_ok, &speed, &duplex, &fc); + phy->ops->get_link_status(phy, &link_state, &speed, &duplex, &fc); + link_ok = (link_state == PHY_LINK_UP); + if (link_state != PHY_LINK_PARTIAL) + phy->rst = 0; + else if (++phy->rst == 3) { + phy->ops->reset(phy, 0); + phy->rst = 0; + } if (link_ok == 0) pi->link_fault = LF_NO; Modified: stable/8/sys/dev/cxgb/common/cxgb_tn1010.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_tn1010.c Sun Jan 18 20:40:08 2015 (r277345) @@ -129,7 +129,7 @@ static int tn1010_advertise(struct cphy ADVERTISE_LOOP_TIMING); } -static int tn1010_get_link_status(struct cphy *phy, int *link_ok, +static int tn1010_get_link_status(struct cphy *phy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int status, lpa, adv; @@ -139,8 +139,9 @@ static int tn1010_get_link_status(struct if (err) return err; - if (link_ok) - *link_ok = (status & F_LINK_STAT) != 0; + if (link_state) + *link_state = status & F_LINK_STAT ? PHY_LINK_UP : + PHY_LINK_DOWN; if (G_ANEG_STAT(status) == ANEG_COMPLETE) { sp = (status & F_ANEG_SPEED_1G) ? SPEED_1000 : SPEED_10000; Modified: stable/8/sys/dev/cxgb/common/cxgb_vsc8211.c ============================================================================== --- stable/8/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/common/cxgb_vsc8211.c Sun Jan 18 20:40:08 2015 (r277345) @@ -129,7 +129,7 @@ static int vsc8211_autoneg_restart(struc BMCR_ANRESTART); } -static int vsc8211_get_link_status(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -141,7 +141,7 @@ static int vsc8211_get_link_status(struc if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -150,7 +150,8 @@ static int vsc8211_get_link_status(struc err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; @@ -201,7 +202,7 @@ static int vsc8211_get_link_status(struc return 0; } -static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_ok, +static int vsc8211_get_link_status_fiber(struct cphy *cphy, int *link_state, int *speed, int *duplex, int *fc) { unsigned int bmcr, status, lpa, adv; @@ -213,7 +214,7 @@ static int vsc8211_get_link_status_fiber if (err) return err; - if (link_ok) { + if (link_state) { /* * BMSR_LSTATUS is latch-low, so if it is 0 we need to read it * once more to get the current link state. @@ -222,7 +223,8 @@ static int vsc8211_get_link_status_fiber err = mdio_read(cphy, 0, MII_BMSR, &status); if (err) return err; - *link_ok = (status & BMSR_LSTATUS) != 0; + *link_state = status & BMSR_LSTATUS ? PHY_LINK_UP : + PHY_LINK_DOWN; } if (!(bmcr & BMCR_ANENABLE)) { dplx = (bmcr & BMCR_FULLDPLX) ? DUPLEX_FULL : DUPLEX_HALF; Modified: stable/8/sys/dev/cxgb/cxgb_main.c ============================================================================== --- stable/8/sys/dev/cxgb/cxgb_main.c Sun Jan 18 20:39:24 2015 (r277344) +++ stable/8/sys/dev/cxgb/cxgb_main.c Sun Jan 18 20:40:08 2015 (r277345) @@ -2293,7 +2293,8 @@ check_link_status(void *arg, int pending t3_link_changed(sc, pi->port_id); - if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ)) + if (pi->link_fault || !(pi->phy.caps & SUPPORTED_LINK_IRQ) || + pi->link_config.link_ok == 0) callout_reset(&pi->link_check_ch, hz, link_check_callout, pi); } From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:47:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E69F8DC; Sun, 18 Jan 2015 20:47:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A140CDD; Sun, 18 Jan 2015 20:47:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKlMiq042863; Sun, 18 Jan 2015 20:47:22 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKlMXO042862; Sun, 18 Jan 2015 20:47:22 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501182047.t0IKlMXO042862@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 18 Jan 2015 20:47:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277346 - head/sys/arm/broadcom/bcm2835 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:47:22 -0000 Author: ian Date: Sun Jan 18 20:47:21 2015 New Revision: 277346 URL: https://svnweb.freebsd.org/changeset/base/277346 Log: Save the command-and-flags value into the shadow register when it is written. This doesn't actually change any behavior, because it just allows a 16-bit read of the command register to return the correct value, and nothing actually does a 16-bit read of that register. Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Modified: head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 18 20:40:08 2015 (r277345) +++ head/sys/arm/broadcom/bcm2835/bcm2835_sdhci.c Sun Jan 18 20:47:21 2015 (r277346) @@ -399,8 +399,11 @@ bcm_sdhci_write_2(device_t dev, struct s val32 |= (val << (off & 3)*8); if (off == SDHCI_TRANSFER_MODE) sc->cmd_and_mode = val32; - else + else { WR4(sc, off & ~3, val32); + if (off == SDHCI_COMMAND_FLAGS) + sc->cmd_and_mode = val32; + } } static void From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 20:53:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6731DA9A; Sun, 18 Jan 2015 20:53:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 52BADD95; Sun, 18 Jan 2015 20:53:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IKrLne047020; Sun, 18 Jan 2015 20:53:21 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IKrLLi047019; Sun, 18 Jan 2015 20:53:21 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501182053.t0IKrLLi047019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 18 Jan 2015 20:53:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277347 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 20:53:21 -0000 Author: tuexen Date: Sun Jan 18 20:53:20 2015 New Revision: 277347 URL: https://svnweb.freebsd.org/changeset/base/277347 Log: Add protection code to free memory in case of processing an address which is neither IPv4 or IPv6. Reported by: Coverity CID: 749311 MFC after: 1 week Modified: head/sys/netinet/sctp_asconf.c Modified: head/sys/netinet/sctp_asconf.c ============================================================================== --- head/sys/netinet/sctp_asconf.c Sun Jan 18 20:47:21 2015 (r277346) +++ head/sys/netinet/sctp_asconf.c Sun Jan 18 20:53:20 2015 (r277347) @@ -3346,6 +3346,11 @@ sctp_asconf_send_nat_state_update(struct TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); break; #endif + default: + SCTPDBG(SCTP_DEBUG_ASCONF1, + "sctp_asconf_send_nat_state_update: unknown address family\n"); + SCTP_FREE(aa, SCTP_M_ASC_ADDR); + return; } SCTP_MALLOC(aa, struct sctp_asconf_addr *, sizeof(*aa), SCTP_M_ASC_ADDR); @@ -3379,6 +3384,11 @@ sctp_asconf_send_nat_state_update(struct TAILQ_INSERT_TAIL(&stcb->asoc.asconf_queue, aa, next); break; #endif + default: + SCTPDBG(SCTP_DEBUG_ASCONF1, + "sctp_asconf_send_nat_state_update: unknown address family\n"); + SCTP_FREE(aa, SCTP_M_ASC_ADDR); + return; } /* Now we must hunt the addresses and add all global addresses */ if (stcb->sctp_ep->sctp_flags & SCTP_PCB_FLAGS_BOUNDALL) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 21:16:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DBCAFF29; Sun, 18 Jan 2015 21:16:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C7702F66; Sun, 18 Jan 2015 21:16:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ILGNXl057981; Sun, 18 Jan 2015 21:16:23 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ILGNti057980; Sun, 18 Jan 2015 21:16:23 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501182116.t0ILGNti057980@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 18 Jan 2015 21:16:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277348 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 21:16:24 -0000 Author: tuexen Date: Sun Jan 18 21:16:22 2015 New Revision: 277348 URL: https://svnweb.freebsd.org/changeset/base/277348 Log: Remove an unnecessary check. Reported by: Coverity CID: 749576 MFC after: 1 week Modified: head/sys/netinet/sctp_input.c Modified: head/sys/netinet/sctp_input.c ============================================================================== --- head/sys/netinet/sctp_input.c Sun Jan 18 20:53:20 2015 (r277347) +++ head/sys/netinet/sctp_input.c Sun Jan 18 21:16:22 2015 (r277348) @@ -3108,7 +3108,6 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun uint32_t cwr_tsn; cwr_tsn = ntohl(cp->tsn); - override = cp->ch.chunk_flags & SCTP_CWR_REDUCE_OVERRIDE; TAILQ_FOREACH(chk, &stcb->asoc.control_send_queue, sctp_next) { if (chk->rec.chunk_id.id != SCTP_ECN_ECHO) { @@ -3124,10 +3123,8 @@ sctp_handle_ecn_cwr(struct sctp_cwr_chun stcb->asoc.ecn_echo_cnt_onq--; TAILQ_REMOVE(&stcb->asoc.control_send_queue, chk, sctp_next); - if (chk->data) { - sctp_m_freem(chk->data); - chk->data = NULL; - } + sctp_m_freem(chk->data); + chk->data = NULL; stcb->asoc.ctrl_queue_cnt--; sctp_free_a_chunk(stcb, chk, SCTP_SO_NOT_LOCKED); if (override == 0) { From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 21:18:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E390EC; Sun, 18 Jan 2015 21:18:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89ED3F75; Sun, 18 Jan 2015 21:18:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ILITXx058274; Sun, 18 Jan 2015 21:18:29 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ILITXa058273; Sun, 18 Jan 2015 21:18:29 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501182118.t0ILITXa058273@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sun, 18 Jan 2015 21:18:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277349 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 21:18:29 -0000 Author: pfg Date: Sun Jan 18 21:18:28 2015 New Revision: 277349 URL: https://svnweb.freebsd.org/changeset/base/277349 Log: ext2: fix for uninitialized pointer read. path.ep_bp was being used uninitialized in ext4_ext_find_extent(). CID: 1062344 MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_bmap.c Modified: head/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- head/sys/fs/ext2fs/ext2_bmap.c Sun Jan 18 21:16:22 2015 (r277348) +++ head/sys/fs/ext2fs/ext2_bmap.c Sun Jan 18 21:18:28 2015 (r277349) @@ -94,7 +94,7 @@ ext4_bmapext(struct vnode *vp, int32_t b struct inode *ip; struct m_ext2fs *fs; struct ext4_extent *ep; - struct ext4_extent_path path; + struct ext4_extent_path path = { .ep_bp = NULL }; daddr_t lbn; ip = VTOI(vp); From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 22:00:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2BE11C0A; Sun, 18 Jan 2015 22:00:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16FBA366; Sun, 18 Jan 2015 22:00:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0IM0d7D079239; Sun, 18 Jan 2015 22:00:39 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0IM0daZ079238; Sun, 18 Jan 2015 22:00:39 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501182200.t0IM0daZ079238@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Sun, 18 Jan 2015 22:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277350 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 22:00:40 -0000 Author: tuexen Date: Sun Jan 18 22:00:39 2015 New Revision: 277350 URL: https://svnweb.freebsd.org/changeset/base/277350 Log: Fix a bug which only shows up when an mbuf allocation failed. Therefore chances are low that we hit this. Reported by: Coverity CID: 1018886 MFC after: 1 week Modified: head/sys/netinet/sctp_output.c Modified: head/sys/netinet/sctp_output.c ============================================================================== --- head/sys/netinet/sctp_output.c Sun Jan 18 21:18:28 2015 (r277349) +++ head/sys/netinet/sctp_output.c Sun Jan 18 22:00:39 2015 (r277350) @@ -7420,7 +7420,7 @@ dont_do_it: SCTP_TCB_SEND_LOCK(stcb); send_lock_up = 1; } - if (chk->data == NULL) { + if (sp->data == NULL) { /* unsteal the data */ sp->data = chk->data; sp->tail_mbuf = chk->last_mbuf; From owner-svn-src-all@FreeBSD.ORG Sun Jan 18 23:15:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6AD2ACF; Sun, 18 Jan 2015 23:15:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87D6BCCE; Sun, 18 Jan 2015 23:15:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0INFoNf018505; Sun, 18 Jan 2015 23:15:50 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0INFoV3018504; Sun, 18 Jan 2015 23:15:50 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501182315.t0INFoV3018504@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sun, 18 Jan 2015 23:15:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277351 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 18 Jan 2015 23:15:50 -0000 Author: smh Date: Sun Jan 18 23:15:49 2015 New Revision: 277351 URL: https://svnweb.freebsd.org/changeset/base/277351 Log: Clean ZFS spa config before syncing A number of entries that can be present in the spa config shouldn't be saved to disk so add a method to ensure this is case. Without this if the last caller to vdev_config_generate requested stats then we can end up in the cache file. Also only skip a none writable pool in the cache file generation if its active. This prevents unavailable pools incorrectly getting removed from cache file. Tested by: delphij MFC after: 2 weeks Sponsored by: Multiplay Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c 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 Sun Jan 18 22:00:39 2015 (r277350) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c Sun Jan 18 23:15:49 2015 (r277351) @@ -140,6 +140,26 @@ out: kobj_close_file(file); } +static void +spa_config_clean(nvlist_t *nvl) +{ + nvlist_t **child; + nvlist_t *nvroot = NULL; + uint_t c, children; + + if (nvlist_lookup_nvlist_array(nvl, ZPOOL_CONFIG_CHILDREN, &child, + &children) == 0) { + for (c = 0; c < children; c++) + spa_config_clean(child[c]); + } + + if (nvlist_lookup_nvlist(nvl, ZPOOL_CONFIG_VDEV_TREE, &nvroot) == 0) + spa_config_clean(nvroot); + + nvlist_remove(nvl, ZPOOL_CONFIG_VDEV_STATS, DATA_TYPE_UINT64_ARRAY); + nvlist_remove(nvl, ZPOOL_CONFIG_SCAN_STATS, DATA_TYPE_UINT64_ARRAY); +} + static int spa_config_write(spa_config_dirent_t *dp, nvlist_t *nvl) { @@ -233,6 +253,7 @@ spa_config_sync(spa_t *target, boolean_t */ nvl = NULL; while ((spa = spa_next(spa)) != NULL) { + nvlist_t *nvroot = NULL; /* * Skip over our own pool if we're about to remove * ourselves from the spa namespace or any pool that @@ -241,7 +262,8 @@ spa_config_sync(spa_t *target, boolean_t * we don't allow them to be written to the cache file. */ if ((spa == target && removing) || - !spa_writeable(spa)) + (spa_state(spa) == POOL_STATE_ACTIVE && + !spa_writeable(spa))) continue; mutex_enter(&spa->spa_props_lock); @@ -260,6 +282,9 @@ spa_config_sync(spa_t *target, boolean_t VERIFY(nvlist_add_nvlist(nvl, spa->spa_name, spa->spa_config) == 0); mutex_exit(&spa->spa_props_lock); + + if (nvlist_lookup_nvlist(nvl, spa->spa_name, &nvroot) == 0) + spa_config_clean(nvroot); } error = spa_config_write(dp, nvl); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 00:33:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E3153EB; Mon, 19 Jan 2015 00:33:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 08DA15E6; Mon, 19 Jan 2015 00:33:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J0XXhF056606; Mon, 19 Jan 2015 00:33:33 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J0XXqZ056601; Mon, 19 Jan 2015 00:33:33 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201501190033.t0J0XXqZ056601@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Mon, 19 Jan 2015 00:33:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277352 - in head/usr.sbin: mountd rpc.lockd rpc.statd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 00:33:34 -0000 Author: rstone Date: Mon Jan 19 00:33:32 2015 New Revision: 277352 URL: https://svnweb.freebsd.org/changeset/base/277352 Log: When mountd is creating sockets, it iterates over all addresses specified in the "hosts" array and eventually looks up the network address with getaddrinfo(). At one point it checks for a numeric address and if it sees one, it sets a hint parameter to force getaddrinfo to interpret the host as a numeric address. However that hint is not cleared for subsequent iterations of the loop and if any hosts seen after this point are host names, getaddrinfo will fail on the name. The result of this bug is that you cannot pass a host name to the -h flag. Unfortunately, the first iteration will either process ::1 or 127.0.0.1, so the flag is set on the first iteration and all host names will fail to be processed. The same bug applies to rpc.lockd and rpc.statd, so fix them too. Differential Revision: https://reviews.freebsd.org/D1507 Reported by: Dylan Martin MFC after: 1 week Sponsored by: Sandvine Inc. Modified: head/usr.sbin/mountd/mountd.c head/usr.sbin/rpc.lockd/lockd.c head/usr.sbin/rpc.statd/statd.c Modified: head/usr.sbin/mountd/mountd.c ============================================================================== --- head/usr.sbin/mountd/mountd.c Sun Jan 18 23:15:49 2015 (r277351) +++ head/usr.sbin/mountd/mountd.c Mon Jan 19 00:33:32 2015 (r277352) @@ -627,7 +627,6 @@ create_service(struct netconfig *nconf) /* Get mountd's address on this transport */ memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; hints.ai_family = si.si_af; hints.ai_socktype = si.si_socktype; hints.ai_protocol = si.si_proto; @@ -644,6 +643,8 @@ create_service(struct netconfig *nconf) sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; + hints.ai_flags = AI_PASSIVE; + /* * XXX - using RPC library internal functions. */ Modified: head/usr.sbin/rpc.lockd/lockd.c ============================================================================== --- head/usr.sbin/rpc.lockd/lockd.c Sun Jan 18 23:15:49 2015 (r277351) +++ head/usr.sbin/rpc.lockd/lockd.c Mon Jan 19 00:33:32 2015 (r277352) @@ -518,7 +518,6 @@ create_service(struct netconfig *nconf) /* Get rpc.statd's address on this transport */ memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; hints.ai_family = si.si_af; hints.ai_socktype = si.si_socktype; hints.ai_protocol = si.si_proto; @@ -534,6 +533,7 @@ create_service(struct netconfig *nconf) out_of_mem(); sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; + hints.ai_flags = AI_PASSIVE; /* * XXX - using RPC library internal functions. Modified: head/usr.sbin/rpc.statd/statd.c ============================================================================== --- head/usr.sbin/rpc.statd/statd.c Sun Jan 18 23:15:49 2015 (r277351) +++ head/usr.sbin/rpc.statd/statd.c Mon Jan 19 00:33:32 2015 (r277352) @@ -343,7 +343,6 @@ create_service(struct netconfig *nconf) /* Get rpc.statd's address on this transport */ memset(&hints, 0, sizeof hints); - hints.ai_flags = AI_PASSIVE; hints.ai_family = si.si_af; hints.ai_socktype = si.si_socktype; hints.ai_protocol = si.si_proto; @@ -359,6 +358,7 @@ create_service(struct netconfig *nconf) out_of_mem(); sock_fd[sock_fdcnt++] = -1; /* Set invalid for now. */ mallocd_res = 0; + hints.ai_flags = AI_PASSIVE; /* * XXX - using RPC library internal functions. From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 02:22:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 36E5B17E; Mon, 19 Jan 2015 02:22:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1FA83FE8; Mon, 19 Jan 2015 02:22:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J2M55B008119; Mon, 19 Jan 2015 02:22:05 GMT (envelope-from marcel@FreeBSD.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J2M3gr008110; Mon, 19 Jan 2015 02:22:03 GMT (envelope-from marcel@FreeBSD.org) Message-Id: <201501190222.t0J2M3gr008110@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: marcel set sender to marcel@FreeBSD.org using -f From: Marcel Moolenaar Date: Mon, 19 Jan 2015 02:22:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277353 - in head: contrib/libxo contrib/libxo/bin contrib/libxo/doc contrib/libxo/libxo contrib/libxo/packaging contrib/libxo/tests/core contrib/libxo/tests/core/saved contrib/libxo/xo... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 02:22:05 -0000 Author: marcel Date: Mon Jan 19 02:22:03 2015 New Revision: 277353 URL: https://svnweb.freebsd.org/changeset/base/277353 Log: Upgrade libxo to 0.2.0. Obtained from: https://github.com/Juniper/libxo Requested by: Phil Shafer Revisions 276253 & 276273 were incorporated into 0.2.0. Revision 276260 has been merged-in. Added: head/contrib/libxo/libxo/xo_error.3 (contents, props changed) head/contrib/libxo/packaging/libxo.rb.base.in (contents, props changed) head/contrib/libxo/tests/core/saved/test_08.H.err head/contrib/libxo/tests/core/saved/test_08.H.out head/contrib/libxo/tests/core/saved/test_08.HIPx.err head/contrib/libxo/tests/core/saved/test_08.HIPx.out head/contrib/libxo/tests/core/saved/test_08.HP.err head/contrib/libxo/tests/core/saved/test_08.HP.out head/contrib/libxo/tests/core/saved/test_08.J.err head/contrib/libxo/tests/core/saved/test_08.J.out head/contrib/libxo/tests/core/saved/test_08.JP.err head/contrib/libxo/tests/core/saved/test_08.JP.out head/contrib/libxo/tests/core/saved/test_08.T.err head/contrib/libxo/tests/core/saved/test_08.T.out head/contrib/libxo/tests/core/saved/test_08.X.err head/contrib/libxo/tests/core/saved/test_08.X.out head/contrib/libxo/tests/core/saved/test_08.XP.err head/contrib/libxo/tests/core/saved/test_08.XP.out head/contrib/libxo/tests/core/saved/test_09.H.err head/contrib/libxo/tests/core/saved/test_09.H.out head/contrib/libxo/tests/core/saved/test_09.HIPx.err head/contrib/libxo/tests/core/saved/test_09.HIPx.out head/contrib/libxo/tests/core/saved/test_09.HP.err head/contrib/libxo/tests/core/saved/test_09.HP.out head/contrib/libxo/tests/core/saved/test_09.J.err head/contrib/libxo/tests/core/saved/test_09.J.out head/contrib/libxo/tests/core/saved/test_09.JP.err head/contrib/libxo/tests/core/saved/test_09.JP.out head/contrib/libxo/tests/core/saved/test_09.T.err head/contrib/libxo/tests/core/saved/test_09.T.out head/contrib/libxo/tests/core/saved/test_09.X.err head/contrib/libxo/tests/core/saved/test_09.X.out head/contrib/libxo/tests/core/saved/test_09.XP.err head/contrib/libxo/tests/core/saved/test_09.XP.out head/contrib/libxo/tests/core/test_08.c (contents, props changed) head/contrib/libxo/tests/core/test_09.c (contents, props changed) Modified: head/contrib/libxo/Makefile.am head/contrib/libxo/bin/Zaliases head/contrib/libxo/configure.ac head/contrib/libxo/doc/libxo.txt head/contrib/libxo/libxo/libxo.3 head/contrib/libxo/libxo/libxo.c head/contrib/libxo/libxo/xo.h head/contrib/libxo/libxo/xo_attr.3 head/contrib/libxo/libxo/xo_create.3 head/contrib/libxo/libxo/xo_emit.3 head/contrib/libxo/libxo/xo_err.3 head/contrib/libxo/libxo/xo_finish.3 head/contrib/libxo/libxo/xo_flush.3 head/contrib/libxo/libxo/xo_format.5 head/contrib/libxo/libxo/xo_no_setlocale.3 head/contrib/libxo/libxo/xo_open_container.3 head/contrib/libxo/libxo/xo_open_list.3 head/contrib/libxo/libxo/xo_parse_args.3 head/contrib/libxo/libxo/xo_set_allocator.3 head/contrib/libxo/libxo/xo_set_flags.3 head/contrib/libxo/libxo/xo_set_info.3 head/contrib/libxo/libxo/xo_set_options.3 head/contrib/libxo/libxo/xo_set_style.3 head/contrib/libxo/libxo/xo_set_writer.3 head/contrib/libxo/libxo/xoconfig.h head/contrib/libxo/libxo/xoconfig.h.in head/contrib/libxo/libxo/xoversion.h head/contrib/libxo/tests/core/Makefile.am head/contrib/libxo/tests/core/saved/test_01.H.out head/contrib/libxo/tests/core/saved/test_01.HIPx.out head/contrib/libxo/tests/core/saved/test_01.HP.out head/contrib/libxo/tests/core/saved/test_01.J.out head/contrib/libxo/tests/core/saved/test_01.JP.out head/contrib/libxo/tests/core/saved/test_01.T.out head/contrib/libxo/tests/core/saved/test_01.X.out head/contrib/libxo/tests/core/saved/test_01.XP.out head/contrib/libxo/tests/core/saved/test_02.J.out head/contrib/libxo/tests/core/saved/test_02.JP.out head/contrib/libxo/tests/core/saved/test_07.J.out head/contrib/libxo/tests/core/saved/test_07.JP.out head/contrib/libxo/tests/core/test_01.c head/contrib/libxo/tests/core/test_07.c head/contrib/libxo/xo/xo.1 head/contrib/libxo/xo/xo.c head/contrib/libxo/xolint/Makefile.am head/contrib/libxo/xolint/xolint.1 head/lib/libxo/Makefile Modified: head/contrib/libxo/Makefile.am ============================================================================== --- head/contrib/libxo/Makefile.am Mon Jan 19 00:33:32 2015 (r277352) +++ head/contrib/libxo/Makefile.am Mon Jan 19 02:22:03 2015 (r277353) @@ -35,6 +35,7 @@ docs: DIST_FILES_DIR = ~/Dropbox/dist-files/ GH_PAGES_DIR = gh-pages/ +GH_PAGES_DIR_VER = gh-pages/${PACKAGE_VERSION} PACKAGE_FILE = ${PACKAGE_TARNAME}-${PACKAGE_VERSION}.tar.gz upload: dist upload-docs @@ -45,10 +46,14 @@ upload-docs: docs @echo "Uploading libxo-manual.html ... " @-[ -d ${GH_PAGES_DIR} ] \ && echo "Updating manual on gh-pages ..." \ + && mkdir -p ${GH_PAGES_DIR_VER} \ && cp doc/libxo-manual.html ${GH_PAGES_DIR} \ + && cp doc/libxo-manual.html ${GH_PAGES_DIR_VER} \ && (cd ${GH_PAGES_DIR} \ + && git add ${PACKAGE_VERSION} \ + && git add libxo-manual.html \ && git commit -m 'new docs' \ - libxo-manual.html \ + libxo-manual.html ${PACKAGE_VERSION} \ && git push origin gh-pages ) ; true pkgconfigdir=$(libdir)/pkgconfig @@ -66,7 +71,7 @@ UPDATE_PACKAGE_FILE = \ -e "s;__SHA256__;SHA256 (textproc/${PACKAGE_FILE}) = $$SHA256;" \ -e "s;__SIZE__;SIZE (textproc/${PACKAGE_FILE}) = $$SIZE;" -GH_PACKAGING_DIR = packaging/${PACKAGE_VERSION} +GH_PACKAGING_DIR = ${PACKAGE_VERSION}/packaging GH_PAGES_PACKAGE_DIR = ${GH_PAGES_DIR}/${GH_PACKAGING_DIR} packages: @@ -75,7 +80,6 @@ packages: && SHA1="`openssl sha1 ${PACKAGE_FILE} | awk '{print $$2}'`" \ && SHA256="`openssl sha256 ${PACKAGE_FILE} | awk '{print $$2}'`" \ && SIZE="`ls -l ${PACKAGE_FILE} | awk '{print $$5}'`" \ - && mkdir -p ${GH_PAGES_PACKAGE_DIR}/freebsd \ && echo "... ${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.rb ..." \ && sed ${UPDATE_PACKAGE_FILE} \ packaging/${PACKAGE_NAME}.rb.base \ @@ -83,20 +87,10 @@ packages: && echo "... ${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.spec ..." \ && cp packaging/${PACKAGE_NAME}.spec \ ${GH_PAGES_PACKAGE_DIR}/${PACKAGE_NAME}.spec \ - && echo "... ${GH_PAGES_PACKAGE_DIR}/freebsd ..." \ - && sed ${UPDATE_PACKAGE_FILE} \ - ${srcdir}/packaging/freebsd/distinfo.base \ - > ${GH_PAGES_PACKAGE_DIR}/freebsd/distinfo \ - && cp ${srcdir}/packaging/freebsd/pkg-descr \ - ${GH_PAGES_PACKAGE_DIR}/freebsd/pkg-descr \ - && cp ${srcdir}/packaging/freebsd/pkg-plist \ - ${GH_PAGES_PACKAGE_DIR}/freebsd/pkg-plist \ - && cp ${srcdir}/packaging/freebsd/pkg-plist \ - ${GH_PAGES_PACKAGE_DIR}/freebsd/pkg-plist \ - && cp packaging/freebsd/port-Makefile \ - ${GH_PAGES_PACKAGE_DIR}/freebsd/Makefile \ && (cd ${GH_PAGES_DIR} \ && git add ${GH_PACKAGING_DIR} \ + && git add ${GH_PACKAGING_DIR}/libxo.rb \ + ${GH_PACKAGING_DIR}/libxo.spec \ && git commit -m 'new packaging data' \ ${GH_PACKAGING_DIR} \ && git push origin gh-pages ) ; true Modified: head/contrib/libxo/bin/Zaliases ============================================================================== --- head/contrib/libxo/bin/Zaliases Mon Jan 19 00:33:32 2015 (r277352) +++ head/contrib/libxo/bin/Zaliases Mon Jan 19 02:22:03 2015 (r277353) @@ -1,5 +1,5 @@ set top_src=`pwd` -alias Zautoreconf "(cd $top_src ; autoreconf --install)" +alias Zautoreconf "(cd $top_src ; autoreconf)" set opts=' \ --with-libslax-prefix=/Users/phil/work/root \ Modified: head/contrib/libxo/configure.ac ============================================================================== --- head/contrib/libxo/configure.ac Mon Jan 19 00:33:32 2015 (r277352) +++ head/contrib/libxo/configure.ac Mon Jan 19 02:22:03 2015 (r277353) @@ -12,7 +12,7 @@ # AC_PREREQ(2.2) -AC_INIT([libxo], [0.1.6], [phil@juniper.net]) +AC_INIT([libxo], [0.2.0], [phil@juniper.net]) AM_INIT_AUTOMAKE([-Wall -Werror foreign -Wno-portability]) # Support silent build rules. Requires at least automake-1.11. @@ -57,8 +57,10 @@ AC_CHECK_FUNCS([getpass]) AC_CHECK_FUNCS([sysctlbyname]) AC_CHECK_FUNCS([flock]) AC_CHECK_FUNCS([asprintf]) +AC_CHECK_FUNCS([__flbf]) AC_CHECK_HEADERS([dlfcn.h]) +AC_CHECK_HEADERS([stdio_ext.h]) AC_CHECK_HEADERS([tzfile.h]) AC_CHECK_HEADERS([stdtime/tzfile.h]) AC_CHECK_FUNCS([dlfunc]) @@ -164,7 +166,6 @@ AC_ARG_ENABLE([libxo-options], AC_MSG_RESULT([$LIBXO_OPTS]) AM_CONDITIONAL([NO_LIBXO_OPTIONS], [test "$LIBXO_OPTS" != "yes"]) - case $host_os in darwin*) LIBTOOL=glibtool @@ -238,6 +239,7 @@ AC_CONFIG_FILES([ tests/core/Makefile tests/xo/Makefile packaging/libxo.spec + packaging/libxo.rb.base ]) AC_OUTPUT Modified: head/contrib/libxo/doc/libxo.txt ============================================================================== --- head/contrib/libxo/doc/libxo.txt Mon Jan 19 00:33:32 2015 (r277352) +++ head/contrib/libxo/doc/libxo.txt Mon Jan 19 02:22:03 2015 (r277353) @@ -12,14 +12,15 @@ libxo - A Library for Generating Text, XML, JSON, and HTML Output -You live in the present, but you want to live in the future. You'd -love a flying car, but need to get to work today. You want to support -features like XML, JSON, and HTML rendering to allow integration with -NETCONF, REST, and web browsers, but you need to make text output for -command line users. And you don't want multiple code paths that can't -help but get out of sync. None of this "if (xml) {... } else {...}" -logic. And ifdefs are right out. But you'd really, really like all -the fancy features that modern encoding formats can provide. +You want to prepare for the future, but you need to live in the +present. You'd love a flying car, but need to get to work today. You +want to support features like XML, JSON, and HTML rendering to allow +integration with NETCONF, REST, and web browsers, but you need to make +text output for command line users. And you don't want multiple code +paths that can't help but get out of sync. None of this "if (xml) +{... } else {...}" logic. And ifdefs are right out. But you'd +really, really like all the fancy features that modern encoding +formats can provide. libxo can help. The libxo library allows an application to generate text, XML, JSON, and HTML output using a common set of function calls. The application @@ -83,31 +84,37 @@ The latest release of libxo is available https://github.com/Juniper/libxo/releases -We are following the branching scheme from -^http://nvie.com/posts/a-successful-git-branching-model/^ -which means we will do development under the "develop" branch, and -release from the master. To clone a developer tree, run the following +We are following the branching scheme from +^http://nvie.com/posts/a-successful-git-branching-model/^ which means +we will do development under the "develop" branch, and release from +the "master" branch. To clone a developer tree, run the following command: git clone https://github.com/Juniper/libxo.git -b develop -We're using semantic release numbering. +We're using semantic release numbering, as defined in +^http://semver.org/spec/v2.0.0.html^. + +libxo is open source, distributed under the BSD license. It +is shipped as part of FreeBSD 11.0. * Overview Most unix commands emit text output aimed at humans. It is designed -to be parsed and understood by a user. Humans are gifted at extracted -details and pattern matching. Often programmers need to extract -information from this human-oriented output. Programmers use tools -like grep, awk, and regular expressions to ferret out the pieces of -information they need. Such solutions are fragile and require -updates when output contents change or evolve, requiring testing and -validation. +to be parsed and understood by a user. Humans are gifted at +extracting details and pattern matching in such output. Often +programmers need to extract information from this human-oriented +output. Programmers use tools like grep, awk, and regular expressions +to ferret out the pieces of information they need. Such solutions are +fragile and require maintenance when output contents change or evolve, +along with testing and validation. -Modern tool developers favors encoding schemes like XML and JSON, +Modern tool developers favor encoding schemes like XML and JSON, which allow trivial parsing and extraction of data. Such formats are simple, well understood, hierarchical, easily parsed, and often -integrate easier with common tools and environments. +integrate easier with common tools and environments. Changes to +content can be done in ways that do not break existing users of the +data, which can reduce maintenance costs and increase feature velocity. In addition, modern reality means that more output ends up in web browsers than in terminals, making HTML output valuable. @@ -278,7 +285,7 @@ content. The roles are listed below; on |---+--------------+-------------------------------------------------| | M | Name | Description | |---+--------------+-------------------------------------------------| -| D | decoration | Field is non-text (e.g. colon, comma) | +| D | decoration | Field is non-text (e.g., colon, comma) | | E | error | Field is an error message | | L | label | Field is text that prefixes a value | | N | note | Field is text that follows a value | @@ -321,7 +328,7 @@ the field descriptor, or a printf-style if preceded by a slash ("/"): xo_emit("{P: }{Lwc:Cost}{:cost/%u}\n", cost); - xo_emit("{P:/30s}{Lwc:Cost}{:cost/%u}\n", "", cost); + xo_emit("{P:/%30s}{Lwc:Cost}{:cost/%u}\n", "", cost); **** The Title Role ({T:}) @@ -333,6 +340,16 @@ if preceded by a slash ("/"): xo_emit("{T:Interface Statistics}\n"); xo_emit("{T:/%20.20s}{T:/%6.6s}\n", "Item Name", "Cost"); +Title fields have an extra convenience feature; if both content and +format are specified, instead of looking to the argument list for a +value, the content is used, allowing a mixture of format and content +within the field descriptor: + + xo_emit("{T:Name/%20s}{T:Count/%6s}\n"); + +Since the incoming argument is a string, the format must be "%s" or +something suitable. + **** The Units Role ({U:}) Units are the dimension by which values are measured, such as degrees, @@ -412,6 +429,7 @@ content emitted for some output styles: | d | display | Only emit field for display styles (text/HTML) | | e | encoding | Only emit for encoding styles (XML/JSON) | | k | key | Field is a key, suitable for XPath predicates | +| l | leaf-list | Field is a leaf-list | n | no-quotes | Do not quote the field when using JSON style | | q | quotes | Quote the field when using JSON style | | w | white space | A blank (" ") is appended after the label | @@ -433,7 +451,7 @@ The colon modifier appends a single colo Name:phil The colon modifier is only used for the TEXT and HTML output -styles. It is commonly combined with the space modifier ('{w:'). +styles. It is commonly combined with the space modifier ('{w:}'). It is purely a convenience feature. **** The Display Modifier ({d:}) @@ -485,6 +503,24 @@ Currently the key modifier is only used for the HTML output style when XOF_XPATH is set, but other uses are likely in the near future. +**** The Leaf-List Modifier ({l:}) + +The leaf-list modifier is used to distinguish lists where each +instance consists of only a single value. In XML, these are +rendered as single elements, where JSON renders them as arrays. + + EXAMPLE: + for (i = 0; i < num_users; i++) { + xo_emit("Member {l:user}\n", user[i].u_name); + } + XML: + phil + pallavi + JSON: + "user": [ "phil", "pallavi" ] + +The name of the field must match the name of the leaf list. + **** The No-Quotes Modifier ({n:}) The no-quotes modifier (and its twin, the 'quotes' modifier) affect @@ -522,7 +558,7 @@ The white space modifier appends a singl Name phil The white space modifier is only used for the TEXT and HTML output -styles. It is commonly combined with the colon modifier ('{c:'). +styles. It is commonly combined with the colon modifier ('{c:}'). It is purely a convenience feature. Note that the sense of the 'w' modifier is reversed for the units role @@ -530,14 +566,15 @@ Note that the sense of the 'w' modifier *** Field Formatting -The field format is similar to the format string for printf(3). It's -used varies based on the role of the field, but generally is used to +The field format is similar to the format string for printf(3). Its +use varies based on the role of the field, but generally is used to format the field's contents. -If not provided, the format string defaults to "%s". +If the format string is not provided for a value field, it defaults to +"%s". Note a field definition can contain zero or more printf-style -'directives', which are sequences that start with a '%' and end with a +'directives', which are sequences that start with a '%' and end with one of following characters: "diouxXDOUeEfFgGaAcCsSp". Each directive is matched by one of more arguments to the xo_emit function. @@ -557,7 +594,7 @@ argument. If the width in columns of th the minumum width, the value will be padded to reach the minimum. - a period followed by one or more digits indicating the maximum number of bytes which will be examined for a string argument, or the maximum -width for a non-string argument. When handling ASCII strings this is +width for a non-string argument. When handling ASCII strings this functions as the field width but for multi-byte characters, a single character may be composed of multiple bytes. xo_emit will never dereference memory beyond the given number of bytes. @@ -630,8 +667,8 @@ ASCII data, a normal 7-bit ASCII string Unicode values. '%hs' expects a 'char *' pointer to a multi-byte string encoded with the current locale, as given by the LC_CTYPE, LANG, or LC_ALL environment varibles. The first of this list of -variables is used and if none of the variables, the locale defaults to -"UTF-8". +variables is used and if none of the variables are set, the locale +defaults to "UTF-8". For example, a function is passed a locale-base name, a hat size, and a time value. The hat size is formatted in a UTF-8 (ASCII) @@ -676,10 +713,10 @@ columns. *** Characters Outside of Field Definitions -Characters in the format string are not part of a field definition are -copied to the output for the TEXT style, and are ignored for the JSON -and XML styles. For HTML, these characters are placed in a
with -class "text". +Characters in the format string that are not part of a field +definition are copied to the output for the TEXT style, and are +ignored for the JSON and XML styles. For HTML, these characters are +placed in a
with class "text". EXAMPLE: xo_emit("The hat is {:size/%s}.\n", size_val); @@ -854,7 +891,7 @@ container, a warning will be generated. *** Lists and Instances A list is set of one or more instances that appear under the same -parent. The instances contains details about a specific object. One +parent. The instances contain details about a specific object. One can think of instances as objects or records. A call is needed to open and close the list, while a distinct call is needed to open and close each instance of the list: @@ -874,8 +911,8 @@ generation of XML and JSON data. *** DTRT Mode -Some user may find tracking the names of open containers, lists, and -instances inconvenient. libxo offers "Do The Right Thing" mode, where +Some users may find tracking the names of open containers, lists, and +instances inconvenient. libxo offers a "Do The Right Thing" mode, where libxo will track the names of open containers, lists, and instances so the close function can be called without a name. To enable DTRT mode, turn on the XOF_DTRT flag prior to making any other libxo output. @@ -889,10 +926,42 @@ will close the open container, list, or ... xo_close_container_d(); +This also works for lists and instances: + + xo_open_list("item"); + for (...) { + xo_open_instance("item"); + xo_emit(...); + xo_close_instance_d(); + } + xo_close_list_d(); + Note that the XOF_WARN flag will also cause libxo to track open -containers, lists, and instances. A warning is generated with the +containers, lists, and instances. A warning is generated when the name given to the close function and the name recorded do not match. +*** Markers + +Markers are used to protect and restore the state of open constructs. +While a marker is open, no other open constructs can be closed. When +a marker is closed, all constructs open since the marker was opened +will be closed. + +Markers use names which are not user-visible, allowing the caller to +choose appropriate internal names. + +In this example, the code whiffles through a list of fish, calling a +function to emit details about each fish. The marker "fish-guts" is +used to ensure that any constructs opened by the function are closed +properly. + + for (i = 0; fish[i]; i++) { + xo_open_instance("fish"); + xo_open_marker("fish-guts"); + dump_fish_details(i); + xo_close_marker("fish-guts"); + } + ** Handles libxo uses "handles" to control its rendering functionality. The @@ -952,7 +1021,7 @@ be passed NULL to access the default han For the typical command that is generating output on standard output, there is no need to create an explicit handle, but they are available -when needed, e.g. for daemons that generate multiple streams of +when needed, e.g., for daemons that generate multiple streams of output. *** xo_create @@ -972,7 +1041,7 @@ See also ^styles^ and ^flags^. By default, libxo writes output to standard output. A convenience function is provided for situations when output should be written to -different file: +a different file: xo_handle_t *xo_create_to_file (FILE *fp, unsigned style, unsigned flags); @@ -987,10 +1056,13 @@ which can tailor how libxo writes data. recorded and passed back to the write function, allowing the function to acquire context information. The 'close' function can release this opaque data and any other resources as needed. +The flush function can flush buffered data associated with the opaque +object. void xo_set_writer (xo_handle_t *xop, void *opaque, xo_write_func_t write_func, xo_close_func_t close_func); + xo_flush_func_t flush_func); *** xo_set_style @@ -1068,7 +1140,7 @@ XML, JSON, and HTML output. Text output The XOF_WARN flag requests that warnings will trigger diagnostic output (on standard error) when the library notices errors during -operations, or with arguments to functions. Without warning enabled, +operations, or with arguments to functions. Without warnings enabled, such conditions are ignored. Warnings allow developers to debug their interaction with libxo. @@ -1178,6 +1250,13 @@ parameter passed to xo_attr_hv(). XML: 00:14 +xo_attr is placed on the next container, instance, leaf, or leaf list +that is emitted. + +Since attributes are only emitted in XML, their use should be limited +to meta-data and additional or redundant representations of data +already emitted in other form. + *** Flushing Output (xo_flush) libxo buffers data, both for performance and consistency, but also to @@ -1188,6 +1267,10 @@ xo_flush() call is used for this: void xo_flush (void); void xo_flush_h (xo_handle_t *xop); +Calling xo_flush also triggers the flush function associated with the +handle. For the default handle, this is equivalent to +"fflush(stdio);". + *** Finishing Output (xo_finish) When the program is ready to exit or close a handle, a call to @@ -1250,7 +1333,7 @@ styles. Calls must be made to open and instance of data in that list, calls must be make to open and close that instance. -The name given to all calls must be identical, and it is strong +The name given to all calls must be identical, and it is strongly suggested that the name be singular, not plural, as a matter of style and usage expectations. @@ -1314,6 +1397,16 @@ Following the call to xo_parse_args, the remaining arguments in a normal manner. See ^command-line-arguments^ for a description of valid arguments. +*** xo_set_program + +The xo_set_program function sets name of the program as reported by +functions like xo_failure, xo_warn, xo_err, etc. The program name is +initialized by xo_parse_args, but subsequent calls to xo_set_program +can override this value. + +Note that the value is not copied, so the memory passed to +xo_set_program (and xo_parse_args) must be maintained by the caller. + *** Field Information (xo_info_t) @info@ HTML data can include additional information in attributes that @@ -1353,7 +1446,7 @@ known to the application: ... xo_set_info(NULL, info, info_count); -Third, the emitting of info must be triggered with the XOF_INFO flag +Third, the emission of info must be triggered with the XOF_INFO flag using either the xo_set_flags() function or the "--libxo=info" command line argument. @@ -1405,6 +1498,10 @@ Complete HTML output can be generated wi % env LIBXO_OPTIONS=HXI my-app +Since environment variables are inherited, child processes will have +the same options, which may be undesirable, making the use of the +"--libxo" option is preferable in most situations. + *** Errors, Warnings, and Messages Many programs make use of the standard library functions err() and @@ -1435,6 +1532,20 @@ message associated with either "errno" o if (open(filename, O_RDONLY) < 0) xo_err(1, "cannot open file '%s'", filename); +*** xo_error + +The xo_error function can be used for generic errors that should be +reported over the handle, rather than to stderr. The xo_error +function behaves like xo_err for TEXT and HTML output styles, but puts +the error into XML or JSON elements: + + EXAMPLE:: + xo_error("Does not %s", "compute"); + XML:: + Does not compute + JSON:: + "error": { "message": "Does not compute" } + *** xo_no_setlocale libxo automatically initializes the locale based on setting of the @@ -1580,7 +1691,7 @@ and errors, warning, or informational me | -X | Extract samples from xolint, suitable for testing | |------------+---------------------------------------------------| -Output message contain the source filename and line number, the +The output message will contain the source filename and line number, the class of the message, the message, and, if -p is given, the line that contains the error: @@ -1627,6 +1738,88 @@ libxo is an effort to mix the best aspec FreeBSD in a seemless way, allowing commands to make printf-like output calls without needing to care how the output is rendered. +*** Did the complex semantics of format strings evolve over time? + +The history is both long and short: libxo's functionality is based +on what JUNOS does in a data modeling language called ODL (output +definition language). In JUNOS, all subcomponents generate XML, +which is feed to the CLI, where data from the ODL files tell is +how to render that XML into text. ODL might had a set of tags +like: + + tag docsis-state { + help "State of the DOCSIS interface"; + type string; + } + + tag docsis-mode { + help "DOCSIS mode (2.0/3.0) of the DOCSIS interface"; + type string; + } + + tag docsis-upstream-speed { + help "Operational upstream speed of the interface"; + type string; + } + + tag downstream-scanning { + help "Result of scanning in downstream direction"; + type string; + } + + tag ranging { + help "Result of ranging action"; + type string; + } + + tag signal-to-noise-ratio { + help "Signal to noise ratio for all channels"; + type string; + } + + tag power { + help "Operational power of the signal on all channels"; + type string; + } + + format docsis-status-format { + picture " + State : @, Mode: @, Upstream speed: @ + Downstream scanning: @, Ranging: @ + Signal to noise ratio: @ + Power: @ +"; + line { + field docsis-state; + field docsis-mode; + field docsis-upstream-speed; + field downstream-scanning; + field ranging; + field signal-to-noise-ratio; + field power; + } + } + +These tag definitions are compiled into field definitions +that are triggered when matching XML elements are seen. ODL +also supports other means of defining output. + +The roles and modifiers describe these details. + +In moving these ideas to bsd, two things had to happen: the +formatting had to happen at the source since BSD won't have +a JUNOS-like CLI to do the rendering, and we can't depend on +external data models like ODL, which was seen as too hard a +sell to the BSD community. + +The results were that the xo_emit strings are used to encode the +roles, modifiers, names, and formats. They are dense and a bit +cryptic, but not so unlike printf format strings that developers will +be lost. + +libxo is a new implementation of these ideas and is distinct from +the previous implementation in JUNOS. + *** What makes a good field name? To make useful, consistent field names, follow these guidelines: @@ -1660,7 +1853,7 @@ Nothing's worse than writing expressions } Find someone else who is expressing similar data and follow their -field's and hierarchy. Remember the quote is not "Consistency is the +fields and hierarchy. Remember the quote is not "Consistency is the hobgoblin of little minds", but "A foolish consistency is the hobgoblin of little minds". = Think about your users @@ -1670,7 +1863,7 @@ content with xo_attr() calls (^xo_attr^) (^e-modifier^) to make the data useful. = Don't use an arbitrary number postfix What does "errors2" mean? No one will know. "errors-after-restart" -would be a better choice. Think of you users, and think of the +would be a better choice. Think of your users, and think of the future. If you make "errors2", the next guy will happily make "errors3" and before you know it, someone will be asking what's the difference between errors37 and errors63. @@ -1689,7 +1882,7 @@ After using "xolint" to find errors in y "xolint -V" to spell check your field names and to detect different names for the same data. "dropped-short" and "dropped-too-short" are both reasonable names, but using them both will lead users to ask the -difference between the two fields. If there isn't a difference, +difference between the two fields. If there is no difference, use only one of the field names. If there is a difference, change the names to make that difference more obvious. Modified: head/contrib/libxo/libxo/libxo.3 ============================================================================== --- head/contrib/libxo/libxo/libxo.3 Mon Jan 19 00:33:32 2015 (r277352) +++ head/contrib/libxo/libxo/libxo.3 Mon Jan 19 02:22:03 2015 (r277353) @@ -7,7 +7,7 @@ .\" # LICENSE. .\" # Phil Shafer, July 2014 .\" -.Dd July, 2014 +.Dd December 8, 2014 .Dt LIBXO 3 .Os .Sh NAME @@ -19,58 +19,82 @@ .In libxo/xo.h .Sh DESCRIPTION The functions defined in -.Lb libxo +.Nm are used to generate a choice of .Em TEXT , .Em XML , .Em JSON , or .Em HTML -output. A common set of functions are used, with +output. +A common set of functions are used, with command line switches passed to the library to control the details of the output. .Pp -Most commands emit text output aimed at humans. It is designed -to be parsed and understood by a user. Humans are gifted at extracted -details and pattern matching. Often programmers need to extract -information from this human-oriented output. Programmers use tools -like grep, awk, and regular expressions to ferret out the pieces of -information they need. Such solutions are fragile and require +Most commands emit text output aimed at humans. +It is designed +to be parsed and understood by a user. +Humans are gifted at extracting +details and pattern matching. +Often programmers need to extract +information from this human-oriented output. +Programmers use tools +like +.Xr grep 1 , +.Xr awk 1 , +and regular expressions to ferret out the pieces of +information they need. +Such solutions are fragile and require updates when output contents change or evolve, requiring testing and validation. .Pp -Modern tool developers favors encoding schemes like XML and JSON, -which allow trivial parsing and extraction of data. Such formats are +Modern tool developers favor encoding schemes like XML and JSON, +which allow trivial parsing and extraction of data. +Such formats are simple, well understood, hierarchical, easily parsed, and often integrate easier with common tools and environments. .Pp In addition, modern reality means that more output ends up in web browsers than in terminals, making HTML output valuable. .Pp -.Em libxo +.Nm allows a single set of function calls in source code to generate -traditional text output, as well as XML and JSON formatted data. HTML +traditional text output, as well as XML and JSON formatted data. +HTML can also be generated; "
" elements surround the traditional text output, with attributes that detail how to render the data. .Pp -There are four encoding styles supported by libxo: TEXT, HTML, JSON, -and XML. JSON and XML are suitable for encoding data, while TEXT and -HTML are suited for display to the user. TEXT output can be display +There are four encoding styles supported by +.Nm : +TEXT, HTML, JSON, +and XML. +JSON and XML are suitable for encoding data, while TEXT and +HTML are suited for display to the user. +TEXT output can be display on a terminal session, allowing compatibility with traditional usage. HTML can be matched with a small CSS file to permit rendering in any -HTML5 browser. XML output is suitable for tools like XPath and -protocols like NETCONF. JSON output can be used for RESTful APIs. +HTML5 browser. +XML output is suitable for tools like XPath and +protocols like NETCONF. +JSON output can be used for RESTful APIs. .Pp The -.Em libxo +.Nm library allows an application to generate text, XML, JSON, -and HTML output using a common set of function calls. The application -decides at run time which output style should be produced. The +and HTML output using a common set of function calls. +The application +decides at run time which output style should be produced. +The application calls a function -.Fn xo_emit +.Xr xo_emit 3 to product output that is -described in a format string. A "field descriptor" tells libxo what -the field is and what it means. Each field descriptor is placed in +described in a format string. +A +.Dq field descriptor +tells +.Nm +what the field is and what it means. +Each field descriptor is placed in braces with a printf-like format string: .Bd -literal -offset indent xo_emit(" {:lines/%7ju} {:words/%7ju} " @@ -79,55 +103,199 @@ braces with a printf-like format string: .Ed .Pp Each field can have a role, with the 'value' role being the default, -and the role tells libxo how and when to render that field, as well as +and the role tells +.Nm +how and when to render that field, as well as a -.Xr printf 3 -like +.Xr printf 3 Ns -like format string. .Pp Output can then be generated in various style, using the "--libxo" option. .Sh DEFAULT HANDLE -Handles give an abstraction for libxo that encapsulates the state of a -stream of output. Handles have the data type "xo_handle_t" and are +Handles give an abstraction for +.Nm +that encapsulates the state of a +stream of output. +Handles have the data type "xo_handle_t" and are opaque to the caller. - +.Pp The library has a default handle that is automatically initialized. By default, this handle will send text style output to standard output. -The xo_set_style and xo_set_flags functions can be used to change this +The +.Xr xo_set_style 3 +and +.Xr xo_set_flags 3 +functions can be used to change this behavior. - -Many libxo functions take a handle as their first parameter; most that -do not use the default handle. Any function taking a handle can -be passed NULL to access the default handle. - +.Pp +Many +.Nm +functions take a handle as their first parameter; most that +do not use the default handle. +Any function taking a handle can +be passed +.Dv NULL +to access the default handle. +.Pp For the typical command that is generating output on standard output, there is no need to create an explicit handle, but they are available -when needed, e.g. for daemons that generate multiple streams of +when needed, e.g., for daemons that generate multiple streams of output. +.Sh FUNCTION OVERVIEW +The +.Nm +library includes the following functions: +.Bl -tag -width "xo_close_container_hd" +.It Sy "Function Description" +.It Fn xo_attr +.It Fn xo_attr_h +.It Fn xo_attr_hv +Allows the caller to emit XML attributes with the next open element. +.It Fn xo_create +.It Fn xo_create_to_file +Allow the caller to create a new handle. +Note that +.Nm +has a default handle that allows the caller to avoid use of an +explicitly created handle. +Only callers writing to files other than +.Dv stdout +would need to call +.Fn xo_create . +.It Fn xo_destroy +Frees any resources associated with the handle, including the handle +itself. +.It Fn xo_emit +.It Fn xo_emit_h +.It Fn xo_emit_hv +Emit formatted output. +The +.Fa fmt +string controls the conversion of the remaining arguments into +formatted output. +See +.Xr xo_format 5 +for details. +.It Fn xo_warn +.It Fn xo_warnx +.It Fn xo_warn_c +.It Fn xo_warn_hc +.It Fn xo_err +.It Fn xo_errc +.It Fn xo_errx +.It Fn xo_message +.It Fn xo_message_c +.It Fn xo_message_hc +.It Fn xo_message_hcv +These functions are meant to be compatible with their standard libc namesakes. +.It Fn xo_finish +.It Fn xo_finish_h +Flush output, close open construct, and complete any pending +operations. +.It Fn xo_flush +.It Fn xo_flush_h +Allow the caller to flush any pending output for a handle. +.It Fn xo_no_setlocale +Direct +.Nm +to avoid initializing the locale. +This function should be called before any other +.Nm +function is called. +.It Fn xo_open_container +.It Fn xo_open_container_h +.It Fn xo_open_container_hd +.It Fn xo_open_container_d +.It Fn xo_close_container +.It Fn xo_close_container_h +.It Fn xo_close_container_hd +.It Fn xo_close_container_d +Containers a singleton levels of hierarchy, typically used to organize +related content. +.It Fn xo_open_list_h +.It Fn xo_open_list +.It Fn xo_open_list_hd +.It Fn xo_open_list_d +.It Fn xo_open_instance_h +.It Fn xo_open_instance +.It Fn xo_open_instance_hd +.It Fn xo_open_instance_d +.It Fn xo_close_instance_h +.It Fn xo_close_instance +.It Fn xo_close_instance_hd +.It Fn xo_close_instance_d +.It Fn xo_close_list_h +.It Fn xo_close_list +.It Fn xo_close_list_hd +.It Fn xo_close_list_d +Lists are levels of hierarchy that can appear multiple times within +the same parent. +Two calls are needed to encapsulate them, one for +the list and one for each instance of that list. +Typically +.Fn xo_open_list +and +.Fn xo_close_list +are called outside a +for-loop, where +.Fn xo_open_instance +it called at the top of the loop, and +.Fn xo_close_instance +is called at the bottom of the loop. +.It Fn xo_parse_args +Inspects command line arguments for directions to +.Nm . +This function should be called before +.Va argv +is inspected by the application. +.It Fn xo_set_allocator +Instructs +.Nm +to use an alternative memory allocator and deallocator. +.It Fn xo_set_flags +.It Fn xo_clear_flags +Change the flags set for a handle. +.It Fn xo_set_info +Provides additional information about elements for use with HTML +rendering. +.It Fn xo_set_options +Changes formatting options used by handle. +.It Fn xo_set_style +.It Fn xo_set_style_name +Changes the output style used by a handle. +.It Fn xo_set_writer +Instructs +.Nm +to use an alternative set of low-level output functions. +.El .Sh ADDITIONAL DOCUMENTATION -.Pp Complete documentation can be found on github: .Bd -literal -offset indent http://juniper.github.io/libxo/libxo-manual.html .Ed .Pp -libxo lives on github as: +.Nm +lives on github as: .Bd -literal -offset indent https://github.com/Juniper/libxo .Ed .Pp -The latest release of libxo is available at: +The latest release of +.Nm +is available at: .Bd -literal -offset indent https://github.com/Juniper/libxo/releases .Ed .Sh SEE ALSO +.Xr xo 1 , +.Xr xolint 1 , .Xr xo_attr 3 , .Xr xo_create 3 , .Xr xo_emit 3 , .Xr xo_err 3 , .Xr xo_finish 3 , .Xr xo_flush 3 , -.Xr xo_format 5 , .Xr xo_no_setlocale 3 , .Xr xo_open_container 3 , .Xr xo_open_list 3 , @@ -138,12 +306,11 @@ https://github.com/Juniper/libxo/release .Xr xo_set_options 3 , .Xr xo_set_style 3 , .Xr xo_set_writer 3 , -.Xr xo 1 , -and -.Xr xolint 1 . +.Xr xo_format 5 .Sh HISTORY The -.Fa libxo -library was added in FreeBSD 11.0. +.Nm *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 03:30:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1A365A7A; Mon, 19 Jan 2015 03:30:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F042E8DC; Mon, 19 Jan 2015 03:30:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J3Uli7038381; Mon, 19 Jan 2015 03:30:47 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J3Ukww038374; Mon, 19 Jan 2015 03:30:46 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501190330.t0J3Ukww038374@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Mon, 19 Jan 2015 03:30:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277354 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 03:30:48 -0000 Author: pfg Date: Mon Jan 19 03:30:45 2015 New Revision: 277354 URL: https://svnweb.freebsd.org/changeset/base/277354 Log: ext2: Garbage-collect some unused variables Reported by: clang static analysis MFC after: 2 weeks Modified: head/sys/fs/ext2fs/ext2_bmap.c head/sys/fs/ext2fs/ext2_extents.c head/sys/fs/ext2fs/ext2_htree.c head/sys/fs/ext2fs/ext2_inode.c head/sys/fs/ext2fs/ext2_lookup.c head/sys/fs/ext2fs/ext2_vfsops.c head/sys/fs/ext2fs/ext2_vnops.c Modified: head/sys/fs/ext2fs/ext2_bmap.c ============================================================================== --- head/sys/fs/ext2fs/ext2_bmap.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_bmap.c Mon Jan 19 03:30:45 2015 (r277354) @@ -145,7 +145,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t struct buf *bp; struct ext2mount *ump; struct mount *mp; - struct vnode *devvp; struct indir a[NIADDR+1], *ap; daddr_t daddr; e2fs_lbn_t metalbn; @@ -156,7 +155,6 @@ ext2_bmaparray(struct vnode *vp, daddr_t ip = VTOI(vp); mp = vp->v_mount; ump = VFSTOEXT2(mp); - devvp = ump->um_devvp; bsize = EXT2_BLOCK_SIZE(ump->um_e2fs); Modified: head/sys/fs/ext2fs/ext2_extents.c ============================================================================== --- head/sys/fs/ext2fs/ext2_extents.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_extents.c Mon Jan 19 03:30:45 2015 (r277354) @@ -131,13 +131,11 @@ struct ext4_extent_path * ext4_ext_find_extent(struct m_ext2fs *fs, struct inode *ip, daddr_t lbn, struct ext4_extent_path *path) { - struct vnode *vp; struct ext4_extent_header *ehp; uint16_t i; int error, size; daddr_t nblk; - vp = ITOV(ip); ehp = (struct ext4_extent_header *)(char *)ip->i_db; if (ehp->eh_magic != EXT4_EXT_MAGIC) Modified: head/sys/fs/ext2fs/ext2_htree.c ============================================================================== --- head/sys/fs/ext2fs/ext2_htree.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_htree.c Mon Jan 19 03:30:45 2015 (r277354) @@ -395,7 +395,7 @@ ext2_htree_append_block(struct vnode *vp int error; cursize = roundup(dp->i_size, blksize); - newsize = roundup(dp->i_size, blksize) + blksize; + newsize = cursize + blksize; auio.uio_offset = cursize; auio.uio_resid = blksize; @@ -771,7 +771,7 @@ ext2_htree_add_entry(struct vnode *dvp, dst_node->h_fake_dirent.e2d_reclen = blksize; cursize = roundup(ip->i_size, blksize); - dirsize = roundup(ip->i_size, blksize) + blksize; + dirsize = cursize + blksize; blknum = dirsize / blksize - 1; error = ext2_htree_append_block(dvp, newidxblock, Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_inode.c Mon Jan 19 03:30:45 2015 (r277354) @@ -115,7 +115,6 @@ ext2_truncate(struct vnode *vp, off_t le struct inode *oip; int32_t bn, lbn, lastiblock[NIADDR], indir_lbn[NIADDR]; uint32_t oldblks[NDADDR + NIADDR], newblks[NDADDR + NIADDR]; - struct bufobj *bo; struct m_ext2fs *fs; struct buf *bp; int offset, size, level; @@ -124,7 +123,6 @@ ext2_truncate(struct vnode *vp, off_t le off_t osize; oip = VTOI(ovp); - bo = &ovp->v_bufobj; ASSERT_VOP_LOCKED(vp, "ext2_truncate"); Modified: head/sys/fs/ext2fs/ext2_lookup.c ============================================================================== --- head/sys/fs/ext2fs/ext2_lookup.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_lookup.c Mon Jan 19 03:30:45 2015 (r277354) @@ -343,7 +343,6 @@ restart: * we watch for a place to put the new file in * case it doesn't already exist. */ - ino = 0; i_diroff = dp->i_diroff; ss.slotstatus = FOUND; ss.slotfreespace = ss.slotsize = ss.slotneeded = 0; Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_vfsops.c Mon Jan 19 03:30:45 2015 (r277354) @@ -902,7 +902,6 @@ ext2_vget(struct mount *mp, ino_t ino, i struct ext2mount *ump; struct buf *bp; struct vnode *vp; - struct cdev *dev; struct thread *td; int i, error; int used_blocks; @@ -913,7 +912,6 @@ ext2_vget(struct mount *mp, ino_t ino, i return (error); ump = VFSTOEXT2(mp); - dev = ump->um_dev; ip = malloc(sizeof(struct inode), M_EXT2NODE, M_WAITOK | M_ZERO); /* Allocate a new vnode/inode. */ Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Mon Jan 19 02:22:03 2015 (r277353) +++ head/sys/fs/ext2fs/ext2_vnops.c Mon Jan 19 03:30:45 2015 (r277354) @@ -1223,7 +1223,6 @@ ext2_rmdir(struct vop_rmdir_args *ap) * the current directory and thus be * non-empty.) */ - error = 0; if (ip->i_nlink != 2 || !ext2_dirempty(ip, dp->i_number, cnp->cn_cred)) { error = ENOTEMPTY; goto out; @@ -1329,12 +1328,10 @@ ext2_strategy(struct vop_strategy_args * { struct buf *bp = ap->a_bp; struct vnode *vp = ap->a_vp; - struct inode *ip; struct bufobj *bo; daddr_t blkno; int error; - ip = VTOI(vp); if (vp->v_type == VBLK || vp->v_type == VCHR) panic("ext2_strategy: spec"); if (bp->b_blkno == bp->b_lblkno) { From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 04:56:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94F238C0; Mon, 19 Jan 2015 04:56:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81CD59C; Mon, 19 Jan 2015 04:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J4uIuB079620; Mon, 19 Jan 2015 04:56:18 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J4uIAs079619; Mon, 19 Jan 2015 04:56:18 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501190456.t0J4uIAs079619@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Mon, 19 Jan 2015 04:56:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277355 - head/share/mk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 04:56:18 -0000 Author: ian Date: Mon Jan 19 04:56:17 2015 New Revision: 277355 URL: https://svnweb.freebsd.org/changeset/base/277355 Log: For armv6 builds, add -mfloat-abi=softfp. This tells the compiler it can use floating point hardware instructions (because all armv6/7 systems we support have fp hardware), but it passes args using a soft-float compatible ABI. This should give noticible performance improvement (but not as much as using the armv6hf arch). Modified: head/share/mk/bsd.cpu.mk Modified: head/share/mk/bsd.cpu.mk ============================================================================== --- head/share/mk/bsd.cpu.mk Mon Jan 19 03:30:45 2015 (r277354) +++ head/share/mk/bsd.cpu.mk Mon Jan 19 04:56:17 2015 (r277355) @@ -251,6 +251,10 @@ MACHINE_CPU = v9 ultrasparc ultrasparc3 CFLAGS += -G0 .endif +.if ${MACHINE_ARCH} == "armv6" +_CPUCFLAGS += -mfloat-abi=softfp +.endif + # NB: COPTFLAGS is handled in /usr/src/sys/conf/kern.pre.mk .if !defined(NO_CPU_CFLAGS) From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 05:14:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18BC8B2A; Mon, 19 Jan 2015 05:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DC795215; Mon, 19 Jan 2015 05:14:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J5E7Ea088792; Mon, 19 Jan 2015 05:14:07 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J5E7rT088791; Mon, 19 Jan 2015 05:14:07 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501190514.t0J5E7rT088791@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 19 Jan 2015 05:14:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277356 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 05:14:08 -0000 Author: nwhitehorn Date: Mon Jan 19 05:14:07 2015 New Revision: 277356 URL: https://svnweb.freebsd.org/changeset/base/277356 Log: Provide a tunable (machdep.moea64_bpvo_pool_size) to set the bootstrap PVO pool size. The default errs on the exceedingly large side, so absent any intelligent automatic tuning, at least let the user set it to save RAM on memory-constrained systems. MFC after: 2 weeks Modified: head/sys/powerpc/aim/mmu_oea64.c Modified: head/sys/powerpc/aim/mmu_oea64.c ============================================================================== --- head/sys/powerpc/aim/mmu_oea64.c Mon Jan 19 04:56:17 2015 (r277355) +++ head/sys/powerpc/aim/mmu_oea64.c Mon Jan 19 05:14:07 2015 (r277356) @@ -221,9 +221,10 @@ struct pvo_head *moea64_pvo_table; /* p uma_zone_t moea64_upvo_zone; /* zone for pvo entries for unmanaged pages */ uma_zone_t moea64_mpvo_zone; /* zone for pvo entries for managed pages */ -#define BPVO_POOL_SIZE 327680 static struct pvo_entry *moea64_bpvo_pool; static int moea64_bpvo_pool_index = 0; +static int moea64_bpvo_pool_size = 327680; +TUNABLE_INT("machdep.moea64_bpvo_pool_size", &moea64_bpvo_pool_size); SYSCTL_INT(_machdep, OID_AUTO, moea64_allocated_bpvo_entries, CTLFLAG_RD, &moea64_bpvo_pool_index, 0, ""); @@ -647,7 +648,7 @@ moea64_setup_direct_map(mmu_t mmup, vm_o off = (vm_offset_t)(moea64_pvo_table); for (pa = off; pa < off + size; pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); - size = BPVO_POOL_SIZE*sizeof(struct pvo_entry); + size = moea64_bpvo_pool_size*sizeof(struct pvo_entry); off = (vm_offset_t)(moea64_bpvo_pool); for (pa = off; pa < off + size; pa += PAGE_SIZE) moea64_kenter(mmup, pa, pa); @@ -815,7 +816,7 @@ moea64_mid_bootstrap(mmu_t mmup, vm_offs * Initialise the unmanaged pvo pool. */ moea64_bpvo_pool = (struct pvo_entry *)moea64_bootstrap_alloc( - BPVO_POOL_SIZE*sizeof(struct pvo_entry), 0); + moea64_bpvo_pool_size*sizeof(struct pvo_entry), 0); moea64_bpvo_pool_index = 0; /* @@ -2282,10 +2283,10 @@ moea64_pvo_enter(mmu_t mmu, pmap_t pm, u * If we aren't overwriting a mapping, try to allocate. */ if (bootstrap) { - if (moea64_bpvo_pool_index >= BPVO_POOL_SIZE) { + if (moea64_bpvo_pool_index >= moea64_bpvo_pool_size) { panic("moea64_enter: bpvo pool exhausted, %d, %d, %zd", - moea64_bpvo_pool_index, BPVO_POOL_SIZE, - BPVO_POOL_SIZE * sizeof(struct pvo_entry)); + moea64_bpvo_pool_index, moea64_bpvo_pool_size, + moea64_bpvo_pool_size * sizeof(struct pvo_entry)); } pvo = &moea64_bpvo_pool[moea64_bpvo_pool_index]; moea64_bpvo_pool_index++; From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 06:10:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 11E452B0; Mon, 19 Jan 2015 06:10:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F213588E; Mon, 19 Jan 2015 06:10:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J6A1K9012756; Mon, 19 Jan 2015 06:10:01 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J6A1li012755; Mon, 19 Jan 2015 06:10:01 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501190610.t0J6A1li012755@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Jan 2015 06:10:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277357 - head/contrib/netbsd-tests/bin/expr X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:10:02 -0000 Author: ngie Date: Mon Jan 19 06:10:01 2015 New Revision: 277357 URL: https://svnweb.freebsd.org/changeset/base/277357 Log: Expect :overflow to fail with FreeBSD's expr as it doesn't have stringent overflow checks like NetBSD's expr does MFC after: 3 days PR: 196867 Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh Modified: head/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- head/contrib/netbsd-tests/bin/expr/t_expr.sh Mon Jan 19 05:14:07 2015 (r277356) +++ head/contrib/netbsd-tests/bin/expr/t_expr.sh Mon Jan 19 06:10:01 2015 (r277357) @@ -54,6 +54,9 @@ overflow_head() { atf_set "descr" "Test overflow cases" } overflow_body() { + # Begin FreeBSD + atf_expect_fail "FreeBSD's expr does not check overflow to the same degree NetBSD's expr does; see bug 196867 for more details" + # End FreeBSD test_expr '4611686018427387904 + 4611686018427387903' \ '9223372036854775807' test_expr '4611686018427387904 + 4611686018427387904' \ From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 06:13:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 48C4B528; Mon, 19 Jan 2015 06:13:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1AC9794C; Mon, 19 Jan 2015 06:13:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J6D8bC016606; Mon, 19 Jan 2015 06:13:08 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J6D87R016603; Mon, 19 Jan 2015 06:13:08 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501190613.t0J6D87R016603@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Jan 2015 06:13:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277358 - in head: bin/expr bin/expr/tests etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:13:09 -0000 Author: ngie Date: Mon Jan 19 06:13:07 2015 New Revision: 277358 URL: https://svnweb.freebsd.org/changeset/base/277358 Log: Integrate contrib/netbsd-tests/bin/expr into the build/kyua as bin/expr/tests MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Added: head/bin/expr/tests/ head/bin/expr/tests/Makefile (contents, props changed) Modified: head/bin/expr/Makefile head/etc/mtree/BSD.tests.dist Modified: head/bin/expr/Makefile ============================================================================== --- head/bin/expr/Makefile Mon Jan 19 06:10:01 2015 (r277357) +++ head/bin/expr/Makefile Mon Jan 19 06:13:07 2015 (r277358) @@ -1,9 +1,15 @@ # $FreeBSD$ +.include + PROG= expr SRCS= expr.y YFLAGS= NO_WMISSING_VARIABLE_DECLARATIONS= +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + .include Added: head/bin/expr/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/bin/expr/tests/Makefile Mon Jan 19 06:13:07 2015 (r277358) @@ -0,0 +1,16 @@ +# $FreeBSD$ + +OBJTOP= ${.OBJDIR}/../../.. +SRCTOP= ${.CURDIR}/../../.. +TESTSRC= ${SRCTOP}/contrib/netbsd-tests/bin/expr + +TESTSDIR= ${TESTSBASE}/bin/expr + +NETBSD_ATF_TESTS_SH= expr_test + +ATF_TESTS_SH_SED_expr_test+= -e 's/eval expr/eval expr --/g' +ATF_TESTS_SH_SED_expr_test+= -e 's/"expr: integer overflow or underflow occurred for operation.*"/"expr: overflow"/g' + +.include + +.include Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Mon Jan 19 06:10:01 2015 (r277357) +++ head/etc/mtree/BSD.tests.dist Mon Jan 19 06:13:07 2015 (r277358) @@ -12,6 +12,8 @@ .. date .. + expr + .. mv .. pax From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 06:51:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B0EFFBA1; Mon, 19 Jan 2015 06:51:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 919F4CD6; Mon, 19 Jan 2015 06:51:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J6p5jt032868; Mon, 19 Jan 2015 06:51:05 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J6p5TV032866; Mon, 19 Jan 2015 06:51:05 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501190651.t0J6p5TV032866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Mon, 19 Jan 2015 06:51:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277359 - head/lib/libvmmapi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:51:05 -0000 Author: neel Date: Mon Jan 19 06:51:04 2015 New Revision: 277359 URL: https://svnweb.freebsd.org/changeset/base/277359 Log: Fix a bug in libvmmapi 'vm_copy_setup()' where it would return success even if the 'gpa' was in the guest MMIO region. This would manifest as a segmentation fault in 'vm_map_copyin()' or 'vm_map_copyout()' because 'vm_map_gpa()' would return NULL for this 'gpa'. Fix this by calling 'vm_map_gpa()' in 'vm_copy_setup' and returning a failure if the 'gpa' cannot be mapped. This matches the behavior of 'vm_copy_setup()' in vmm.ko. MFC after: 1 week Modified: head/lib/libvmmapi/vmmapi.c head/lib/libvmmapi/vmmapi.h Modified: head/lib/libvmmapi/vmmapi.c ============================================================================== --- head/lib/libvmmapi/vmmapi.c Mon Jan 19 06:13:07 2015 (r277358) +++ head/lib/libvmmapi/vmmapi.c Mon Jan 19 06:51:04 2015 (r277359) @@ -987,6 +987,7 @@ int vm_copy_setup(struct vmctx *ctx, int vcpu, struct vm_guest_paging *paging, uint64_t gla, size_t len, int prot, struct iovec *iov, int iovcnt) { + void *va; uint64_t gpa; int error, fault, i, n, off; @@ -1006,7 +1007,11 @@ vm_copy_setup(struct vmctx *ctx, int vcp off = gpa & PAGE_MASK; n = min(len, PAGE_SIZE - off); - iov->iov_base = (void *)gpa; + va = vm_map_gpa(ctx, gpa, n); + if (va == NULL) + return (-1); + + iov->iov_base = va; iov->iov_len = n; iov++; iovcnt--; @@ -1018,19 +1023,24 @@ vm_copy_setup(struct vmctx *ctx, int vcp } void +vm_copy_teardown(struct vmctx *ctx, int vcpu, struct iovec *iov, int iovcnt) +{ + + return; +} + +void vm_copyin(struct vmctx *ctx, int vcpu, struct iovec *iov, void *vp, size_t len) { const char *src; char *dst; - uint64_t gpa; size_t n; dst = vp; while (len) { assert(iov->iov_len); - gpa = (uint64_t)iov->iov_base; n = min(len, iov->iov_len); - src = vm_map_gpa(ctx, gpa, n); + src = iov->iov_base; bcopy(src, dst, n); iov++; @@ -1045,15 +1055,13 @@ vm_copyout(struct vmctx *ctx, int vcpu, { const char *src; char *dst; - uint64_t gpa; size_t n; src = vp; while (len) { assert(iov->iov_len); - gpa = (uint64_t)iov->iov_base; n = min(len, iov->iov_len); - dst = vm_map_gpa(ctx, gpa, n); + dst = iov->iov_base; bcopy(src, dst, n); iov++; Modified: head/lib/libvmmapi/vmmapi.h ============================================================================== --- head/lib/libvmmapi/vmmapi.h Mon Jan 19 06:13:07 2015 (r277358) +++ head/lib/libvmmapi/vmmapi.h Mon Jan 19 06:51:04 2015 (r277359) @@ -137,6 +137,8 @@ void vm_copyin(struct vmctx *ctx, int vc void *host_dst, size_t len); void vm_copyout(struct vmctx *ctx, int vcpu, const void *host_src, struct iovec *guest_iov, size_t len); +void vm_copy_teardown(struct vmctx *ctx, int vcpu, struct iovec *iov, + int iovcnt); /* RTC */ int vm_rtc_write(struct vmctx *ctx, int offset, uint8_t value); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 06:53:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8D0AFCEA; Mon, 19 Jan 2015 06:53:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77D6ECE3; Mon, 19 Jan 2015 06:53:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J6rWBK034999; Mon, 19 Jan 2015 06:53:32 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J6rWZO034997; Mon, 19 Jan 2015 06:53:32 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501190653.t0J6rWZO034997@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Mon, 19 Jan 2015 06:53:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277360 - in head/sys/amd64: include vmm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:53:32 -0000 Author: neel Date: Mon Jan 19 06:53:31 2015 New Revision: 277360 URL: https://svnweb.freebsd.org/changeset/base/277360 Log: MOVS instruction emulation. These instructions are emitted by 'bus_space_read_region()' when accessing MMIO regions. Since MOVS can be used with a repeat prefix start decoding the REPZ and REPNZ prefixes. Also start decoding the segment override prefix since MOVS allows overriding the source operand segment register. Tested by: tychon MFC after: 1 week Modified: head/sys/amd64/include/vmm.h head/sys/amd64/vmm/vmm_instruction_emul.c Modified: head/sys/amd64/include/vmm.h ============================================================================== --- head/sys/amd64/include/vmm.h Mon Jan 19 06:51:04 2015 (r277359) +++ head/sys/amd64/include/vmm.h Mon Jan 19 06:53:31 2015 (r277360) @@ -446,8 +446,11 @@ struct vie { rex_x:1, rex_b:1, rex_present:1, + repz_present:1, /* REP/REPE/REPZ prefix */ + repnz_present:1, /* REPNE/REPNZ prefix */ opsize_override:1, /* Operand size override */ - addrsize_override:1; /* Address size override */ + addrsize_override:1, /* Address size override */ + segment_override:1; /* Segment override */ uint8_t mod:2, /* ModRM byte */ reg:4, @@ -463,6 +466,7 @@ struct vie { uint8_t scale; int base_register; /* VM_REG_GUEST_xyz */ int index_register; /* VM_REG_GUEST_xyz */ + int segment_register; /* VM_REG_GUEST_xyz */ int64_t displacement; /* optional addr displacement */ int64_t immediate; /* optional immediate operand */ Modified: head/sys/amd64/vmm/vmm_instruction_emul.c ============================================================================== --- head/sys/amd64/vmm/vmm_instruction_emul.c Mon Jan 19 06:51:04 2015 (r277359) +++ head/sys/amd64/vmm/vmm_instruction_emul.c Mon Jan 19 06:53:31 2015 (r277360) @@ -70,6 +70,7 @@ enum { VIE_OP_TYPE_PUSH, VIE_OP_TYPE_CMP, VIE_OP_TYPE_POP, + VIE_OP_TYPE_MOVS, VIE_OP_TYPE_LAST }; @@ -78,6 +79,7 @@ enum { #define VIE_OP_F_IMM8 (1 << 1) /* 8-bit immediate operand */ #define VIE_OP_F_MOFFSET (1 << 2) /* 16/32/64-bit immediate moffset */ #define VIE_OP_F_NO_MODRM (1 << 3) +#define VIE_OP_F_NO_GLA_VERIFICATION (1 << 4) static const struct vie_op two_byte_opcodes[256] = { [0xB6] = { @@ -133,6 +135,16 @@ static const struct vie_op one_byte_opco .op_type = VIE_OP_TYPE_MOV, .op_flags = VIE_OP_F_MOFFSET | VIE_OP_F_NO_MODRM, }, + [0xA4] = { + .op_byte = 0xA4, + .op_type = VIE_OP_TYPE_MOVS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION + }, + [0xA5] = { + .op_byte = 0xA5, + .op_type = VIE_OP_TYPE_MOVS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION + }, [0xC6] = { /* XXX Group 11 extended opcode - not just MOV */ .op_byte = 0xC6, @@ -559,6 +571,217 @@ emulate_movx(void *vm, int vcpuid, uint6 return (error); } +/* + * Helper function to calculate and validate a linear address. + * + * Returns 0 on success and 1 if an exception was injected into the guest. + */ +static int +get_gla(void *vm, int vcpuid, struct vie *vie, struct vm_guest_paging *paging, + int opsize, int addrsize, int prot, enum vm_reg_name seg, + enum vm_reg_name gpr, uint64_t *gla) +{ + struct seg_desc desc; + uint64_t cr0, val, rflags; + int error; + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_CR0, &cr0); + KASSERT(error == 0, ("%s: error %d getting cr0", __func__, error)); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); + KASSERT(error == 0, ("%s: error %d getting rflags", __func__, error)); + + error = vm_get_seg_desc(vm, vcpuid, seg, &desc); + KASSERT(error == 0, ("%s: error %d getting segment descriptor %d", + __func__, error, seg)); + + error = vie_read_register(vm, vcpuid, gpr, &val); + KASSERT(error == 0, ("%s: error %d getting register %d", __func__, + error, gpr)); + + if (vie_calculate_gla(paging->cpu_mode, seg, &desc, val, opsize, + addrsize, prot, gla)) { + if (seg == VM_REG_GUEST_SS) + vm_inject_ss(vm, vcpuid, 0); + else + vm_inject_gp(vm, vcpuid); + return (1); + } + + if (vie_canonical_check(paging->cpu_mode, *gla)) { + if (seg == VM_REG_GUEST_SS) + vm_inject_ss(vm, vcpuid, 0); + else + vm_inject_gp(vm, vcpuid); + return (1); + } + + if (vie_alignment_check(paging->cpl, opsize, cr0, rflags, *gla)) { + vm_inject_ac(vm, vcpuid, 0); + return (1); + } + + return (0); +} + +static int +emulate_movs(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, + struct vm_guest_paging *paging, mem_region_read_t memread, + mem_region_write_t memwrite, void *arg) +{ +#ifdef _KERNEL + struct vm_copyinfo copyinfo[2]; +#else + struct iovec copyinfo[2]; +#endif + uint64_t dstaddr, srcaddr, val; + uint64_t rcx, rdi, rsi, rflags; + int error, opsize, seg, repeat; + + opsize = (vie->op.op_byte == 0xA4) ? 1 : vie->opsize; + val = 0; + error = 0; + + /* + * XXX although the MOVS instruction is only supposed to be used with + * the "rep" prefix some guests like FreeBSD will use "repnz" instead. + * + * Empirically the "repnz" prefix has identical behavior to "rep" + * and the zero flag does not make a difference. + */ + repeat = vie->repz_present | vie->repnz_present; + + if (repeat) { + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RCX, &rcx); + KASSERT(!error, ("%s: error %d getting rcx", __func__, error)); + + /* + * The count register is %rcx, %ecx or %cx depending on the + * address size of the instruction. + */ + if ((rcx & vie_size2mask(vie->addrsize)) == 0) + return (0); + } + + /* + * Source Destination Comments + * -------------------------------------------- + * (1) memory memory n/a + * (2) memory mmio emulated + * (3) mmio memory emulated + * (4) mmio mmio not emulated + * + * At this point we don't have sufficient information to distinguish + * between (2), (3) and (4). We use 'vm_copy_setup()' to tease this + * out because it will succeed only when operating on regular memory. + * + * XXX the emulation doesn't properly handle the case where 'gpa' + * is straddling the boundary between the normal memory and MMIO. + */ + + seg = vie->segment_override ? vie->segment_register : VM_REG_GUEST_DS; + error = get_gla(vm, vcpuid, vie, paging, opsize, vie->addrsize, + PROT_READ, seg, VM_REG_GUEST_RSI, &srcaddr); + if (error) + goto done; + + error = vm_copy_setup(vm, vcpuid, paging, srcaddr, opsize, PROT_READ, + copyinfo, nitems(copyinfo)); + if (error == 0) { + /* + * case (2): read from system memory and write to mmio. + */ + vm_copyin(vm, vcpuid, copyinfo, &val, opsize); + vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); + error = memwrite(vm, vcpuid, gpa, val, opsize, arg); + goto done; + } else if (error > 0) { + /* + * Resume guest execution to handle fault. + */ + goto done; + } else { + /* + * 'vm_copy_setup()' is expected to fail for cases (3) and (4) + * if 'srcaddr' is in the mmio space. + */ + } + + error = get_gla(vm, vcpuid, vie, paging, opsize, vie->addrsize, + PROT_WRITE, VM_REG_GUEST_ES, VM_REG_GUEST_RDI, &dstaddr); + if (error) + goto done; + + error = vm_copy_setup(vm, vcpuid, paging, dstaddr, opsize, + PROT_WRITE, copyinfo, nitems(copyinfo)); + if (error == 0) { + /* + * case (3): read from MMIO and write to system memory. + * + * A MMIO read can have side-effects so we commit to it + * only after vm_copy_setup() is successful. If a page-fault + * needs to be injected into the guest then it will happen + * before the MMIO read is attempted. + */ + error = memread(vm, vcpuid, gpa, &val, opsize, arg); + if (error) + goto done; + + vm_copyout(vm, vcpuid, &val, copyinfo, opsize); + vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); + } else if (error > 0) { + /* + * Resume guest execution to handle fault. + */ + goto done; + } else { + goto done; + } + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RSI, &rsi); + KASSERT(error == 0, ("%s: error %d getting rsi", __func__, error)); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RDI, &rdi); + KASSERT(error == 0, ("%s: error %d getting rdi", __func__, error)); + + error = vie_read_register(vm, vcpuid, VM_REG_GUEST_RFLAGS, &rflags); + KASSERT(error == 0, ("%s: error %d getting rflags", __func__, error)); + + if (rflags & PSL_D) { + rsi -= opsize; + rdi -= opsize; + } else { + rsi += opsize; + rdi += opsize; + } + + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RSI, rsi, + vie->addrsize); + KASSERT(error == 0, ("%s: error %d updating rsi", __func__, error)); + + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RDI, rdi, + vie->addrsize); + KASSERT(error == 0, ("%s: error %d updating rdi", __func__, error)); + + if (repeat) { + rcx = rcx - 1; + error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RCX, + rcx, vie->addrsize); + KASSERT(!error, ("%s: error %d updating rcx", __func__, error)); + + /* + * Repeat the instruction if the count register is not zero. + */ + if ((rcx & vie_size2mask(vie->addrsize)) != 0) + vm_restart_instruction(vm, vcpuid); + } +done: + if (error < 0) + return (EFAULT); + else + return (0); +} + static int emulate_and(void *vm, int vcpuid, uint64_t gpa, struct vie *vie, mem_region_read_t memread, mem_region_write_t memwrite, void *arg) @@ -926,9 +1149,7 @@ emulate_stack_op(void *vm, int vcpuid, u error = memwrite(vm, vcpuid, mmio_gpa, val, size, arg); rsp += size; } -#ifdef _KERNEL vm_copy_teardown(vm, vcpuid, copyinfo, nitems(copyinfo)); -#endif if (error == 0) { error = vie_update_register(vm, vcpuid, VM_REG_GUEST_RSP, rsp, @@ -1012,6 +1233,10 @@ vmm_emulate_instruction(void *vm, int vc error = emulate_movx(vm, vcpuid, gpa, vie, memread, memwrite, memarg); break; + case VIE_OP_TYPE_MOVS: + error = emulate_movs(vm, vcpuid, gpa, vie, paging, memread, + memwrite, memarg); + break; case VIE_OP_TYPE_AND: error = emulate_and(vm, vcpuid, gpa, vie, memread, memwrite, memarg); @@ -1193,6 +1418,7 @@ vie_init(struct vie *vie, const char *in vie->base_register = VM_REG_LAST; vie->index_register = VM_REG_LAST; + vie->segment_register = VM_REG_LAST; if (inst_length) { bcopy(inst_bytes, vie->inst, inst_length); @@ -1458,6 +1684,35 @@ vie_advance(struct vie *vie) vie->num_processed++; } +static bool +segment_override(uint8_t x, int *seg) +{ + + switch (x) { + case 0x2E: + *seg = VM_REG_GUEST_CS; + break; + case 0x36: + *seg = VM_REG_GUEST_SS; + break; + case 0x3E: + *seg = VM_REG_GUEST_DS; + break; + case 0x26: + *seg = VM_REG_GUEST_ES; + break; + case 0x64: + *seg = VM_REG_GUEST_FS; + break; + case 0x65: + *seg = VM_REG_GUEST_GS; + break; + default: + return (false); + } + return (true); +} + static int decode_prefixes(struct vie *vie, enum vm_cpu_mode cpu_mode, int cs_d) { @@ -1471,6 +1726,12 @@ decode_prefixes(struct vie *vie, enum vm vie->opsize_override = 1; else if (x == 0x67) vie->addrsize_override = 1; + else if (x == 0xF3) + vie->repz_present = 1; + else if (x == 0xF2) + vie->repnz_present = 1; + else if (segment_override(x, &vie->segment_register)) + vie->segment_override = 1; else break; @@ -1923,8 +2184,10 @@ vmm_decode_instruction(struct vm *vm, in if (verify_inst_length(vie)) return (-1); - if (verify_gla(vm, cpuid, gla, vie)) - return (-1); + if ((vie->op.op_flags & VIE_OP_F_NO_GLA_VERIFICATION) == 0) { + if (verify_gla(vm, cpuid, gla, vie)) + return (-1); + } vie->decoded = 1; /* success */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 06:57:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 392EFE80; Mon, 19 Jan 2015 06:57:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2379FD0F; Mon, 19 Jan 2015 06:57:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J6vqLC035623; Mon, 19 Jan 2015 06:57:52 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J6vpBG035622; Mon, 19 Jan 2015 06:57:51 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190657.t0J6vpBG035622@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 06:57:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277361 - stable/10/contrib/ofed/management/opensm/osmtest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:57:52 -0000 Author: hselasky Date: Mon Jan 19 06:57:51 2015 New Revision: 277361 URL: https://svnweb.freebsd.org/changeset/base/277361 Log: MFC r277212: Fix compilation for 32-bit architectures. PR: 196580 Sponsored by: Mellanox Technologies Modified: stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c Mon Jan 19 06:53:31 2015 (r277360) +++ stable/10/contrib/ofed/management/opensm/osmtest/osmtest.c Mon Jan 19 06:57:51 2015 (r277361) @@ -2655,7 +2655,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_PR_RMPP_THR) { @@ -2683,7 +2683,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " Path Record queries CA to CA (rmpp)\n\ttook %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2701,7 +2701,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2733,7 +2733,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_RMPP_THR) { @@ -2772,7 +2772,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " large mixed queries (rmpp) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2785,7 +2785,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2819,7 +2819,7 @@ static ib_api_status_t osmtest_stress_sm OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", - start_tv.tv_sec, (long)start_tv.tv_usec); + (long)start_tv.tv_sec, (long)start_tv.tv_usec); while ((num_queries < STRESS_SMALL_RMPP_THR) && (num_timeouts < 100)) { delta_recs = 0; @@ -2848,7 +2848,7 @@ static ib_api_status_t osmtest_stress_sm end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " port_info queries (single mad) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2859,7 +2859,7 @@ static ib_api_status_t osmtest_stress_sm Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 06:59:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4C250C7; Mon, 19 Jan 2015 06:59:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 36D7FD25; Mon, 19 Jan 2015 06:59:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J6xf8P035939; Mon, 19 Jan 2015 06:59:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J6xfIe035938; Mon, 19 Jan 2015 06:59:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190659.t0J6xfIe035938@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 06:59:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277362 - stable/9/contrib/ofed/management/opensm/osmtest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 06:59:41 -0000 Author: hselasky Date: Mon Jan 19 06:59:40 2015 New Revision: 277362 URL: https://svnweb.freebsd.org/changeset/base/277362 Log: MFC 277212: Fix compilation for 32-bit architectures. PR: 196580 Sponsored by: Mellanox Technologies Modified: stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c Directory Properties: stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c ============================================================================== --- stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c Mon Jan 19 06:57:51 2015 (r277361) +++ stable/9/contrib/ofed/management/opensm/osmtest/osmtest.c Mon Jan 19 06:59:40 2015 (r277362) @@ -2655,7 +2655,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_PR_RMPP_THR) { @@ -2683,7 +2683,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " Path Record queries CA to CA (rmpp)\n\ttook %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2701,7 +2701,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2733,7 +2733,7 @@ static ib_api_status_t osmtest_stress_la OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); - printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", start_tv.tv_sec, + printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", (long)start_tv.tv_sec, (long)start_tv.tv_usec); while (num_queries < STRESS_LARGE_RMPP_THR) { @@ -2772,7 +2772,7 @@ static ib_api_status_t osmtest_stress_la end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " large mixed queries (rmpp) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2785,7 +2785,7 @@ static ib_api_status_t osmtest_stress_la Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; @@ -2819,7 +2819,7 @@ static ib_api_status_t osmtest_stress_sm OSM_LOG_ENTER(&p_osmt->log); gettimeofday(&start_tv, NULL); printf("-I- Start time is : %09ld:%06ld [sec:usec]\n", - start_tv.tv_sec, (long)start_tv.tv_usec); + (long)start_tv.tv_sec, (long)start_tv.tv_usec); while ((num_queries < STRESS_SMALL_RMPP_THR) && (num_timeouts < 100)) { delta_recs = 0; @@ -2848,7 +2848,7 @@ static ib_api_status_t osmtest_stress_sm end_tv.tv_usec); } printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); printf("-I- Querying %" PRId64 " port_info queries (single mad) took %04ld:%06ld [sec:usec]\n", num_queries, sec_diff, usec_diff); @@ -2859,7 +2859,7 @@ static ib_api_status_t osmtest_stress_sm Exit: gettimeofday(&end_tv, NULL); printf("-I- End time is : %09ld:%06ld [sec:usec]\n", - end_tv.tv_sec, (long)end_tv.tv_usec); + (long)end_tv.tv_sec, (long)end_tv.tv_usec); if (end_tv.tv_usec > start_tv.tv_usec) { sec_diff = end_tv.tv_sec - start_tv.tv_sec; usec_diff = end_tv.tv_usec - start_tv.tv_usec; From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:03:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F3882C2; Mon, 19 Jan 2015 07:03:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 70AF3DDC; Mon, 19 Jan 2015 07:03:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J73fOa040046; Mon, 19 Jan 2015 07:03:41 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J73fpm040044; Mon, 19 Jan 2015 07:03:41 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190703.t0J73fpm040044@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 07:03:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277363 - stable/9/sys/dev/usb X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:03:41 -0000 Author: hselasky Date: Mon Jan 19 07:03:40 2015 New Revision: 277363 URL: https://svnweb.freebsd.org/changeset/base/277363 Log: MFC r277044: Increase the maximum number of dynamic USB quirks. USB memory stick devices which don't support the synchronize cache SCSI command are likely to also not support the prevent-allow medium removal SCSI command. PR: 185747 Modified: stable/9/sys/dev/usb/usb_freebsd.h stable/9/sys/dev/usb/usb_msctest.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/usb_freebsd.h ============================================================================== --- stable/9/sys/dev/usb/usb_freebsd.h Mon Jan 19 06:59:40 2015 (r277362) +++ stable/9/sys/dev/usb/usb_freebsd.h Mon Jan 19 07:03:40 2015 (r277363) @@ -71,7 +71,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: stable/9/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/9/sys/dev/usb/usb_msctest.c Mon Jan 19 06:59:40 2015 (r277362) +++ stable/9/sys/dev/usb/usb_msctest.c Mon Jan 19 07:03:40 2015 (r277363) @@ -707,10 +707,11 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -737,10 +738,13 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache\n"); + "handle synchronize cache nor" + "prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; @@ -784,6 +788,7 @@ error: DPRINTF("Device did not respond, enabling all quirks\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY); /* Need to re-enumerate the device */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:06:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B460143F; Mon, 19 Jan 2015 07:06:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F490DFC; Mon, 19 Jan 2015 07:06:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J76Gg0040438; Mon, 19 Jan 2015 07:06:16 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J76F5e040429; Mon, 19 Jan 2015 07:06:15 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190706.t0J76F5e040429@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 07:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277364 - stable/10/sys/dev/usb X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:06:16 -0000 Author: hselasky Date: Mon Jan 19 07:06:15 2015 New Revision: 277364 URL: https://svnweb.freebsd.org/changeset/base/277364 Log: MFC r277044: Increase the maximum number of dynamic USB quirks. USB memory stick devices which don't support the synchronize cache SCSI command are likely to also not support the prevent-allow medium removal SCSI command. PR: 185747 Modified: stable/10/sys/dev/usb/usb_freebsd.h stable/10/sys/dev/usb/usb_freebsd_loader.h stable/10/sys/dev/usb/usb_msctest.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/usb_freebsd.h ============================================================================== --- stable/10/sys/dev/usb/usb_freebsd.h Mon Jan 19 07:03:40 2015 (r277363) +++ stable/10/sys/dev/usb/usb_freebsd.h Mon Jan 19 07:06:15 2015 (r277364) @@ -87,7 +87,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: stable/10/sys/dev/usb/usb_freebsd_loader.h ============================================================================== --- stable/10/sys/dev/usb/usb_freebsd_loader.h Mon Jan 19 07:03:40 2015 (r277363) +++ stable/10/sys/dev/usb/usb_freebsd_loader.h Mon Jan 19 07:06:15 2015 (r277364) @@ -82,7 +82,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: stable/10/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/10/sys/dev/usb/usb_msctest.c Mon Jan 19 07:03:40 2015 (r277363) +++ stable/10/sys/dev/usb/usb_msctest.c Mon Jan 19 07:06:15 2015 (r277364) @@ -711,10 +711,11 @@ retry_sync_cache: if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); - + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); } else { /* @@ -741,10 +742,13 @@ retry_sync_cache: goto retry_sync_cache; DPRINTF("Device most likely doesn't " - "handle synchronize cache\n"); + "handle synchronize cache nor" + "prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); } else { if (err != ERR_CSW_FAILED) goto error; @@ -788,6 +792,7 @@ error: DPRINTF("Device did not respond, enabling all quirks\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY); /* Need to re-enumerate the device */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:10:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55AD15BD; Mon, 19 Jan 2015 07:10:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41D36E17; Mon, 19 Jan 2015 07:10:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7A9i6042837; Mon, 19 Jan 2015 07:10:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7A9wx042836; Mon, 19 Jan 2015 07:10:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501190710.t0J7A9wx042836@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Jan 2015 07:10:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277365 - head/sys/fs/ext2fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:10:09 -0000 Author: ngie Date: Mon Jan 19 07:10:08 2015 New Revision: 277365 URL: https://svnweb.freebsd.org/changeset/base/277365 Log: Fix the build when INVARIANTS is defined by restoring `bo`'s definition in ext2_truncate(..) and by putting it under INVARIANTS ifdefs X-MFC with: r277354 MFC after: 2 weeks Modified: head/sys/fs/ext2fs/ext2_inode.c Modified: head/sys/fs/ext2fs/ext2_inode.c ============================================================================== --- head/sys/fs/ext2fs/ext2_inode.c Mon Jan 19 07:06:15 2015 (r277364) +++ head/sys/fs/ext2fs/ext2_inode.c Mon Jan 19 07:10:08 2015 (r277365) @@ -121,8 +121,14 @@ ext2_truncate(struct vnode *vp, off_t le e4fs_daddr_t count, nblocks, blocksreleased = 0; int error, i, allerror; off_t osize; +#ifdef INVARIANTS + struct bufobj *bo; +#endif oip = VTOI(ovp); +#ifdef INVARIANTS + bo = &ovp->v_bufobj; +#endif ASSERT_VOP_LOCKED(vp, "ext2_truncate"); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:16:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5752B900; Mon, 19 Jan 2015 07:16:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 382A8EEC; Mon, 19 Jan 2015 07:16:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7GOiO045341; Mon, 19 Jan 2015 07:16:24 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7GML8045334; Mon, 19 Jan 2015 07:16:22 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190716.t0J7GML8045334@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 07:16:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r277367 - in stable/8/sys/dev/usb: . quirk storage X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:16:24 -0000 Author: hselasky Date: Mon Jan 19 07:16:22 2015 New Revision: 277367 URL: https://svnweb.freebsd.org/changeset/base/277367 Log: MFC r239237, r242628 and r277044: - Add the UQ_MSC_NO_PREVENT_ALLOW quirk to handle devices that do not support the 'PREVENT/ALLOW MEDIUM REMOVAL' SCSI command. - Improve auto-quirks detection for certain Kingston memory sticks. - Increase the maximum number of dynamic USB quirks. USB memory stick devices which don't support the synchronize cache SCSI command are likely to also not support the prevent-allow medium removal SCSI command. Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c stable/8/sys/dev/usb/quirk/usb_quirk.h stable/8/sys/dev/usb/storage/umass.c stable/8/sys/dev/usb/usb_freebsd.h stable/8/sys/dev/usb/usb_msctest.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/dev/ (props changed) stable/8/sys/dev/usb/ (props changed) Modified: stable/8/sys/dev/usb/quirk/usb_quirk.c ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.c Mon Jan 19 07:14:36 2015 (r277366) +++ stable/8/sys/dev/usb/quirk/usb_quirk.c Mon Jan 19 07:16:22 2015 (r277367) @@ -397,6 +397,7 @@ static struct usb_quirk_entry usb_quirks UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_NO_GETMAXLUN), USB_QUIRK(SONY, PORTABLE_HDD_V2, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB, UQ_MSC_FORCE_PROTO_SCSI), + USB_QUIRK(STMICRO, ST72682, 0x0000, 0xffff, UQ_MSC_NO_PREVENT_ALLOW), USB_QUIRK(SUPERTOP, IDE, 0x0000, 0xffff, UQ_MSC_IGNORE_RESIDUE, UQ_MSC_NO_SYNC_CACHE), USB_QUIRK(SUPERTOP, FLASHDRIVE, 0x0000, 0xffff, UQ_MSC_NO_TEST_UNIT_READY, @@ -523,6 +524,7 @@ static const char *usb_quirk_str[USB_QUI [UQ_MSC_NO_GETMAXLUN] = "UQ_MSC_NO_GETMAXLUN", [UQ_MSC_NO_INQUIRY] = "UQ_MSC_NO_INQUIRY", [UQ_MSC_NO_INQUIRY_EVPD] = "UQ_MSC_NO_INQUIRY_EVPD", + [UQ_MSC_NO_PREVENT_ALLOW] = "UQ_MSC_NO_PREVENT_ALLOW", [UQ_MSC_NO_SYNC_CACHE] = "UQ_MSC_NO_SYNC_CACHE", [UQ_MSC_SHUTTLE_INIT] = "UQ_MSC_SHUTTLE_INIT", [UQ_MSC_ALT_IFACE_1] = "UQ_MSC_ALT_IFACE_1", Modified: stable/8/sys/dev/usb/quirk/usb_quirk.h ============================================================================== --- stable/8/sys/dev/usb/quirk/usb_quirk.h Mon Jan 19 07:14:36 2015 (r277366) +++ stable/8/sys/dev/usb/quirk/usb_quirk.h Mon Jan 19 07:16:22 2015 (r277367) @@ -75,6 +75,7 @@ enum { UQ_MSC_NO_GETMAXLUN, /* does not support get max LUN */ UQ_MSC_NO_INQUIRY, /* fake generic inq response */ UQ_MSC_NO_INQUIRY_EVPD, /* does not support inq EVPD */ + UQ_MSC_NO_PREVENT_ALLOW, /* does not support medium removal */ UQ_MSC_NO_SYNC_CACHE, /* does not support sync cache */ UQ_MSC_SHUTTLE_INIT, /* requires Shuttle init sequence */ UQ_MSC_ALT_IFACE_1, /* switch to alternate interface 1 */ Modified: stable/8/sys/dev/usb/storage/umass.c ============================================================================== --- stable/8/sys/dev/usb/storage/umass.c Mon Jan 19 07:14:36 2015 (r277366) +++ stable/8/sys/dev/usb/storage/umass.c Mon Jan 19 07:16:22 2015 (r277367) @@ -371,6 +371,8 @@ typedef uint8_t (umass_transform_t)(stru * result. */ #define NO_SYNCHRONIZE_CACHE 0x4000 + /* Device does not support 'PREVENT/ALLOW MEDIUM REMOVAL'. */ +#define NO_PREVENT_ALLOW 0x8000 struct umass_softc { @@ -841,6 +843,8 @@ umass_probe_proto(device_t dev, struct u quirks |= NO_INQUIRY; if (usb_test_quirk(uaa, UQ_MSC_NO_INQUIRY_EVPD)) quirks |= NO_INQUIRY_EVPD; + if (usb_test_quirk(uaa, UQ_MSC_NO_PREVENT_ALLOW)) + quirks |= NO_PREVENT_ALLOW; if (usb_test_quirk(uaa, UQ_MSC_NO_SYNC_CACHE)) quirks |= NO_SYNCHRONIZE_CACHE; if (usb_test_quirk(uaa, UQ_MSC_SHUTTLE_INIT)) @@ -2376,6 +2380,13 @@ umass_cam_action(struct cam_sim *sim, un if (sc->sc_quirks & FORCE_SHORT_INQUIRY) { ccb->csio.dxfer_len = SHORT_INQUIRY_LENGTH; } + } else if (sc->sc_transfer.cmd_data[0] == PREVENT_ALLOW) { + if (sc->sc_quirks & NO_PREVENT_ALLOW) { + ccb->csio.scsi_status = SCSI_STATUS_OK; + ccb->ccb_h.status = CAM_REQ_CMP; + xpt_done(ccb); + goto done; + } } else if (sc->sc_transfer.cmd_data[0] == SYNCHRONIZE_CACHE) { if (sc->sc_quirks & NO_SYNCHRONIZE_CACHE) { ccb->csio.scsi_status = SCSI_STATUS_OK; Modified: stable/8/sys/dev/usb/usb_freebsd.h ============================================================================== --- stable/8/sys/dev/usb/usb_freebsd.h Mon Jan 19 07:14:36 2015 (r277366) +++ stable/8/sys/dev/usb/usb_freebsd.h Mon Jan 19 07:16:22 2015 (r277367) @@ -63,7 +63,7 @@ #define USB_EP0_BUFSIZE 1024 /* bytes */ #define USB_CS_RESET_LIMIT 20 /* failures = 20 * 50 ms = 1sec */ -#define USB_MAX_AUTO_QUIRK 4 /* maximum number of dynamic quirks */ +#define USB_MAX_AUTO_QUIRK 8 /* maximum number of dynamic quirks */ typedef uint32_t usb_timeout_t; /* milliseconds */ typedef uint32_t usb_frlength_t; /* bytes */ Modified: stable/8/sys/dev/usb/usb_msctest.c ============================================================================== --- stable/8/sys/dev/usb/usb_msctest.c Mon Jan 19 07:14:36 2015 (r277366) +++ stable/8/sys/dev/usb/usb_msctest.c Mon Jan 19 07:16:22 2015 (r277367) @@ -104,6 +104,8 @@ static uint8_t scsi_sync_cache[] = { 0x3 0x00, 0x00, 0x00, 0x00 }; static uint8_t scsi_request_sense[] = { 0x03, 0x00, 0x00, 0x00, 0x12, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; +static uint8_t scsi_read_capacity[] = { 0x25, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00 }; #define BULK_SIZE 64 /* dummy */ #define ERR_CSW_FAILED -1 @@ -648,7 +650,7 @@ usb_msc_auto_quirk(struct usb_device *ud } is_no_direct = 1; - for (timeout = 4; timeout; timeout--) { + for (timeout = 4; timeout != 0; timeout--) { err = bbb_command_start(sc, DIR_IN, 0, sc->buffer, SCSI_INQ_LEN, &scsi_inquiry, sizeof(scsi_inquiry), USB_MS_HZ); @@ -677,7 +679,9 @@ usb_msc_auto_quirk(struct usb_device *ud if (err != ERR_CSW_FAILED) goto error; } + timeout = 1; +retry_sync_cache: err = bbb_command_start(sc, DIR_IN, 0, NULL, 0, &scsi_sync_cache, sizeof(scsi_sync_cache), USB_MS_HZ); @@ -687,9 +691,49 @@ usb_msc_auto_quirk(struct usb_device *ud if (err != ERR_CSW_FAILED) goto error; - DPRINTF("Device doesn't handle synchronize cache\n"); + DPRINTF("Device doesn't handle synchronize cache " + "and prevent allow medium removal\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); + } else { + + /* + * Certain Kingston memory sticks fail the first + * read capacity after a synchronize cache command + * has been issued. Disable the synchronize cache + * command for such devices. + */ + + err = bbb_command_start(sc, DIR_IN, 0, sc->buffer, 8, + &scsi_read_capacity, sizeof(scsi_read_capacity), + USB_MS_HZ); + + if (err != 0) { + if (err != ERR_CSW_FAILED) + goto error; + + err = bbb_command_start(sc, DIR_IN, 0, sc->buffer, 8, + &scsi_read_capacity, sizeof(scsi_read_capacity), + USB_MS_HZ); + + if (err == 0) { + if (timeout--) + goto retry_sync_cache; + + DPRINTF("Device most likely doesn't " + "handle synchronize cache nor" + "prevent allow medium removal\n"); + + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, + UQ_MSC_NO_PREVENT_ALLOW); + } else { + if (err != ERR_CSW_FAILED) + goto error; + } + } } /* clear sense status of any failed commands on the device */ @@ -728,6 +772,7 @@ error: DPRINTF("Device did not respond, enabling all quirks\n"); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_SYNC_CACHE); + usbd_add_dynamic_quirk(udev, UQ_MSC_NO_PREVENT_ALLOW); usbd_add_dynamic_quirk(udev, UQ_MSC_NO_TEST_UNIT_READY); /* Need to re-enumerate the device */ From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:19:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6B9A1A49; Mon, 19 Jan 2015 07:19:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E5EEEFF; Mon, 19 Jan 2015 07:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7J0ss045697; Mon, 19 Jan 2015 07:19:00 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7J09w045696; Mon, 19 Jan 2015 07:19:00 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190719.t0J7J09w045696@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 07:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277368 - stable/10/sys/dev/usb/controller X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:19:00 -0000 Author: hselasky Date: Mon Jan 19 07:18:59 2015 New Revision: 277368 URL: https://svnweb.freebsd.org/changeset/base/277368 Log: MFC r276798: Fix handling of an error case when the MUSB driver is operating in USB device side mode. Modified: stable/10/sys/dev/usb/controller/musb_otg.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/controller/musb_otg.c ============================================================================== --- stable/10/sys/dev/usb/controller/musb_otg.c Mon Jan 19 07:16:22 2015 (r277367) +++ stable/10/sys/dev/usb/controller/musb_otg.c Mon Jan 19 07:18:59 2015 (r277368) @@ -401,7 +401,7 @@ musbotg_dev_ctrl_setup_rx(struct musbotg /* do not stall at this point */ td->did_stall = 1; /* wait for interrupt */ - DPRINTFN(0, "CSR0 DATAEND\n"); + DPRINTFN(1, "CSR0 DATAEND\n"); goto not_complete; } @@ -423,32 +423,37 @@ musbotg_dev_ctrl_setup_rx(struct musbotg sc->sc_ep0_busy = 0; } if (sc->sc_ep0_busy) { - DPRINTFN(0, "EP0 BUSY\n"); + DPRINTFN(1, "EP0 BUSY\n"); goto not_complete; } if (!(csr & MUSB2_MASK_CSR0L_RXPKTRDY)) { goto not_complete; } - /* clear did stall flag */ - td->did_stall = 0; /* get the packet byte count */ count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); /* verify data length */ if (count != td->remainder) { - DPRINTFN(0, "Invalid SETUP packet " + DPRINTFN(1, "Invalid SETUP packet " "length, %d bytes\n", count); MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + /* don't clear stall */ + td->did_stall = 1; goto not_complete; } if (count != sizeof(req)) { - DPRINTFN(0, "Unsupported SETUP packet " + DPRINTFN(1, "Unsupported SETUP packet " "length, %d bytes\n", count); MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + /* don't clear stall */ + td->did_stall = 1; goto not_complete; } + /* clear did stall flag */ + td->did_stall = 0; + /* receive data */ bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, MUSB2_REG_EPFIFO(0), (void *)&req, sizeof(req)); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:19:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55998B7F; Mon, 19 Jan 2015 07:19:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40C75F07; Mon, 19 Jan 2015 07:19:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7JvRx045875; Mon, 19 Jan 2015 07:19:57 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7JvWq045874; Mon, 19 Jan 2015 07:19:57 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501190719.t0J7JvWq045874@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Jan 2015 07:19:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277369 - stable/10/contrib/ofed/management/opensm/osmtest X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:19:57 -0000 Author: ngie Date: Mon Jan 19 07:19:56 2015 New Revision: 277369 URL: https://svnweb.freebsd.org/changeset/base/277369 Log: MFC r277272: r277272 (by ngie): Don't call abort on usage errors; print out the usage message instead PR: 196793 Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/ofed/management/opensm/osmtest/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/management/opensm/osmtest/main.c ============================================================================== --- stable/10/contrib/ofed/management/opensm/osmtest/main.c Mon Jan 19 07:18:59 2015 (r277368) +++ stable/10/contrib/ofed/management/opensm/osmtest/main.c Mon Jan 19 07:19:56 2015 (r277369) @@ -565,8 +565,9 @@ int main(int argc, char *argv[]) printf("Done with args\n"); break; - default: /* something wrong */ - abort(); + default: + show_usage(); + return 1; } } From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:20:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E758CAF; Mon, 19 Jan 2015 07:20:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2074EF9A; Mon, 19 Jan 2015 07:20:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7KKjv046067; Mon, 19 Jan 2015 07:20:20 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7KK8x046066; Mon, 19 Jan 2015 07:20:20 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190720.t0J7KK8x046066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 07:20:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277370 - stable/9/sys/dev/usb/controller X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:20:21 -0000 Author: hselasky Date: Mon Jan 19 07:20:20 2015 New Revision: 277370 URL: https://svnweb.freebsd.org/changeset/base/277370 Log: MFC r276798: Fix handling of an error case when the MUSB driver is operating in USB device side mode. Modified: stable/9/sys/dev/usb/controller/musb_otg.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/controller/musb_otg.c ============================================================================== --- stable/9/sys/dev/usb/controller/musb_otg.c Mon Jan 19 07:19:56 2015 (r277369) +++ stable/9/sys/dev/usb/controller/musb_otg.c Mon Jan 19 07:20:20 2015 (r277370) @@ -396,7 +396,7 @@ musbotg_dev_ctrl_setup_rx(struct musbotg /* do not stall at this point */ td->did_stall = 1; /* wait for interrupt */ - DPRINTFN(0, "CSR0 DATAEND\n"); + DPRINTFN(1, "CSR0 DATAEND\n"); goto not_complete; } @@ -418,32 +418,37 @@ musbotg_dev_ctrl_setup_rx(struct musbotg sc->sc_ep0_busy = 0; } if (sc->sc_ep0_busy) { - DPRINTFN(0, "EP0 BUSY\n"); + DPRINTFN(1, "EP0 BUSY\n"); goto not_complete; } if (!(csr & MUSB2_MASK_CSR0L_RXPKTRDY)) { goto not_complete; } - /* clear did stall flag */ - td->did_stall = 0; /* get the packet byte count */ count = MUSB2_READ_2(sc, MUSB2_REG_RXCOUNT); /* verify data length */ if (count != td->remainder) { - DPRINTFN(0, "Invalid SETUP packet " + DPRINTFN(1, "Invalid SETUP packet " "length, %d bytes\n", count); MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + /* don't clear stall */ + td->did_stall = 1; goto not_complete; } if (count != sizeof(req)) { - DPRINTFN(0, "Unsupported SETUP packet " + DPRINTFN(1, "Unsupported SETUP packet " "length, %d bytes\n", count); MUSB2_WRITE_1(sc, MUSB2_REG_TXCSRL, MUSB2_MASK_CSR0L_RXPKTRDY_CLR); + /* don't clear stall */ + td->did_stall = 1; goto not_complete; } + /* clear did stall flag */ + td->did_stall = 0; + /* receive data */ bus_space_read_multi_1(sc->sc_io_tag, sc->sc_io_hdl, MUSB2_REG_EPFIFO(0), (void *)&req, sizeof(req)); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:24:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56A01E50; Mon, 19 Jan 2015 07:24:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41CFBFC2; Mon, 19 Jan 2015 07:24:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7OJ2o050010; Mon, 19 Jan 2015 07:24:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7OJfl050009; Mon, 19 Jan 2015 07:24:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501190724.t0J7OJfl050009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Jan 2015 07:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277371 - stable/10/contrib/ofed/usr.lib/libibcm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:24:19 -0000 Author: ngie Date: Mon Jan 19 07:24:18 2015 New Revision: 277371 URL: https://svnweb.freebsd.org/changeset/base/277371 Log: MFC r276804: r276804 (by ngie): Fix 'make depend' before infiniband headers have been installed to build host by removing space between -I and the header directory Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/ofed/usr.lib/libibcm/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/usr.lib/libibcm/Makefile ============================================================================== --- stable/10/contrib/ofed/usr.lib/libibcm/Makefile Mon Jan 19 07:20:20 2015 (r277370) +++ stable/10/contrib/ofed/usr.lib/libibcm/Makefile Mon Jan 19 07:24:18 2015 (r277371) @@ -15,7 +15,7 @@ SHLIB_MAJOR= 1 NO_PROFILE= SRCS= cm.c -CFLAGS+= -I ${IBCMDIR}/include +CFLAGS+= -I${IBCMDIR}/include MAN= VERSION_MAP= ${IBSRCDIR}/libibcm.map From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:29:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D401FA6; Mon, 19 Jan 2015 07:29:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0906BFDF; Mon, 19 Jan 2015 07:29:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7T7ao050635; Mon, 19 Jan 2015 07:29:07 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7T73O050634; Mon, 19 Jan 2015 07:29:07 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501190729.t0J7T73O050634@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 07:29:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277372 - head/sys/cam/scsi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:29:08 -0000 Author: hselasky Date: Mon Jan 19 07:29:07 2015 New Revision: 277372 URL: https://svnweb.freebsd.org/changeset/base/277372 Log: Minor refactoring of code block. MFC after: 1 day Modified: head/sys/cam/scsi/scsi_da.c Modified: head/sys/cam/scsi/scsi_da.c ============================================================================== --- head/sys/cam/scsi/scsi_da.c Mon Jan 19 07:24:18 2015 (r277371) +++ head/sys/cam/scsi/scsi_da.c Mon Jan 19 07:29:07 2015 (r277372) @@ -3101,11 +3101,10 @@ dadone(struct cam_periph *periph, union * give them an 'illegal' value we'll avoid that * here. */ - if (block_size == 0 && maxsector == 0) { - block_size = 512; - maxsector = -1; - } else if (block_size == 0) { + if (block_size == 0) { block_size = 512; + if (maxsector == 0) + maxsector = -1; } if (block_size >= MAXPHYS) { xpt_print(periph->path, From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 07:29:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A81F5150; Mon, 19 Jan 2015 07:29:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 930FDFE4; Mon, 19 Jan 2015 07:29:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0J7TTU5050721; Mon, 19 Jan 2015 07:29:29 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0J7TTZJ050718; Mon, 19 Jan 2015 07:29:29 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501190729.t0J7TTZJ050718@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Mon, 19 Jan 2015 07:29:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277373 - in stable/10/contrib/ofed: usr.bin usr.lib X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 07:29:29 -0000 Author: ngie Date: Mon Jan 19 07:29:28 2015 New Revision: 277373 URL: https://svnweb.freebsd.org/changeset/base/277373 Log: MFC r276805: X-MFC note: the svn:mergeinfo for this MFC was accidentally committed via r277371 r276805 (by ngie): Build contrib/ofed/usr.{bin,lib} in parallel Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/ofed/usr.bin/Makefile stable/10/contrib/ofed/usr.lib/Makefile Modified: stable/10/contrib/ofed/usr.bin/Makefile ============================================================================== --- stable/10/contrib/ofed/usr.bin/Makefile Mon Jan 19 07:29:07 2015 (r277372) +++ stable/10/contrib/ofed/usr.bin/Makefile Mon Jan 19 07:29:28 2015 (r277373) @@ -8,4 +8,6 @@ SUBDIR= ibaddr ibnetdiscover ibping ibpo SUBDIR+= osmtest .endif +SUBDIR_PARALLEL= + .include Modified: stable/10/contrib/ofed/usr.lib/Makefile ============================================================================== --- stable/10/contrib/ofed/usr.lib/Makefile Mon Jan 19 07:29:07 2015 (r277372) +++ stable/10/contrib/ofed/usr.lib/Makefile Mon Jan 19 07:29:28 2015 (r277373) @@ -1,6 +1,6 @@ -.include - SUBDIR= libibcommon libibmad libibumad libibverbs libmlx4 libmthca \ libopensm libosmcomp libosmvendor libibcm librdmacm libsdp +SUBDIR_PARALLEL= + .include From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 10:52:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4ECE846C; Mon, 19 Jan 2015 10:52:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39CED952; Mon, 19 Jan 2015 10:52:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JAqvEk048470; Mon, 19 Jan 2015 10:52:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JAqtbE048459; Mon, 19 Jan 2015 10:52:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501191052.t0JAqtbE048459@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jan 2015 10:52:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277374 - in stable/10/sys: amd64/amd64 amd64/include i386/i386 i386/include x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 10:52:57 -0000 Author: kib Date: Mon Jan 19 10:52:55 2015 New Revision: 277374 URL: https://svnweb.freebsd.org/changeset/base/277374 Log: MFC r277047: For x86, read MAXPHYADDR into variable cpu_maxphyaddr. Modified: stable/10/sys/amd64/amd64/initcpu.c stable/10/sys/amd64/include/md_var.h stable/10/sys/i386/i386/initcpu.c stable/10/sys/i386/include/md_var.h stable/10/sys/x86/x86/identcpu.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/initcpu.c ============================================================================== --- stable/10/sys/amd64/amd64/initcpu.c Mon Jan 19 07:29:28 2015 (r277373) +++ stable/10/sys/amd64/amd64/initcpu.c Mon Jan 19 10:52:55 2015 (r277374) @@ -78,6 +78,7 @@ u_int cpu_max_ext_state_size; u_int cpu_mon_mwait_flags; /* MONITOR/MWAIT flags (CPUID.05H.ECX) */ u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ +u_int cpu_maxphyaddr; /* Max phys addr width in bits */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: stable/10/sys/amd64/include/md_var.h ============================================================================== --- stable/10/sys/amd64/include/md_var.h Mon Jan 19 07:29:28 2015 (r277373) +++ stable/10/sys/amd64/include/md_var.h Mon Jan 19 10:52:55 2015 (r277374) @@ -61,6 +61,7 @@ extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_maxphyaddr; extern char ctx_switch_xsave[]; extern char kstack[]; extern char sigcode[]; Modified: stable/10/sys/i386/i386/initcpu.c ============================================================================== --- stable/10/sys/i386/i386/initcpu.c Mon Jan 19 07:29:28 2015 (r277373) +++ stable/10/sys/i386/i386/initcpu.c Mon Jan 19 10:52:55 2015 (r277374) @@ -107,6 +107,7 @@ u_int cpu_mon_mwait_flags; /* MONITOR/MW u_int cpu_mon_min_size; /* MONITOR minimum range size, bytes */ u_int cpu_mon_max_size; /* MONITOR minimum range size, bytes */ u_int cyrix_did; /* Device ID of Cyrix CPU */ +u_int cpu_maxphyaddr; /* Max phys addr width in bits */ SYSCTL_UINT(_hw, OID_AUTO, via_feature_rng, CTLFLAG_RD, &via_feature_rng, 0, "VIA RNG feature available in CPU"); Modified: stable/10/sys/i386/include/md_var.h ============================================================================== --- stable/10/sys/i386/include/md_var.h Mon Jan 19 07:29:28 2015 (r277373) +++ stable/10/sys/i386/include/md_var.h Mon Jan 19 10:52:55 2015 (r277374) @@ -61,6 +61,7 @@ extern u_int cpu_vendor_id; extern u_int cpu_mon_mwait_flags; extern u_int cpu_mon_min_size; extern u_int cpu_mon_max_size; +extern u_int cpu_maxphyaddr; extern u_int cyrix_did; #if defined(I586_CPU) && !defined(NO_F00F_HACK) extern int has_f00f_bug; Modified: stable/10/sys/x86/x86/identcpu.c ============================================================================== --- stable/10/sys/x86/x86/identcpu.c Mon Jan 19 07:29:28 2015 (r277373) +++ stable/10/sys/x86/x86/identcpu.c Mon Jan 19 10:52:55 2015 (r277374) @@ -1289,7 +1289,10 @@ identify_cpu(void) } if (cpu_exthigh >= 0x80000008) { do_cpuid(0x80000008, regs); + cpu_maxphyaddr = regs[0] & 0xff; cpu_procinfo2 = regs[2]; + } else { + cpu_maxphyaddr = (cpu_feature & CPUID_PAE) != 0 ? 36 : 32; } #ifdef __i386__ From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 10:57:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BDD965EE; Mon, 19 Jan 2015 10:57:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A988B97F; Mon, 19 Jan 2015 10:57:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JAv1FS049083; Mon, 19 Jan 2015 10:57:01 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JAv1Q9049082; Mon, 19 Jan 2015 10:57:01 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501191057.t0JAv1Q9049082@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 19 Jan 2015 10:57:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277375 - stable/10/usr.sbin/makefs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 10:57:01 -0000 Author: brueffer Date: Mon Jan 19 10:57:00 2015 New Revision: 277375 URL: https://svnweb.freebsd.org/changeset/base/277375 Log: MFH: r277085 Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf. The error has been reported to and fixed in the NetBSD upstream version as well. PR: 196598 Submitted by: Dan McGregor Modified: stable/10/usr.sbin/makefs/ffs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/makefs/ffs.c ============================================================================== --- stable/10/usr.sbin/makefs/ffs.c Mon Jan 19 10:52:55 2015 (r277374) +++ stable/10/usr.sbin/makefs/ffs.c Mon Jan 19 10:57:00 2015 (r277375) @@ -191,7 +191,7 @@ ffs_parse_opts(const char *option, fsinf "bytes per inode" }, { "minfree", &ffs_opts->minfree, 0, 99, "minfree" }, - { "maxbpf", &ffs_opts->maxbpg, 1, INT_MAX, + { "maxbpg", &ffs_opts->maxbpg, 1, INT_MAX, "max blocks per file in a cg" }, { "avgfilesize", &ffs_opts->avgfilesize,1, INT_MAX, "expected average file size" }, From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 10:58:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F942795; Mon, 19 Jan 2015 10:58:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2B95D997; Mon, 19 Jan 2015 10:58:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JAwrsF049364; Mon, 19 Jan 2015 10:58:53 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JAwrew049363; Mon, 19 Jan 2015 10:58:53 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201501191058.t0JAwrew049363@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Mon, 19 Jan 2015 10:58:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277376 - stable/9/usr.sbin/makefs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 10:58:53 -0000 Author: brueffer Date: Mon Jan 19 10:58:52 2015 New Revision: 277376 URL: https://svnweb.freebsd.org/changeset/base/277376 Log: MFH: r277085 Fix a typo in the FFS maxbpg option, it was erroneously spelled maxbpf. The error has been reported to and fixed in the NetBSD upstream version as well. PR: 196598 Submitted by: Dan McGregor Modified: stable/9/usr.sbin/makefs/ffs.c Directory Properties: stable/9/usr.sbin/makefs/ (props changed) Modified: stable/9/usr.sbin/makefs/ffs.c ============================================================================== --- stable/9/usr.sbin/makefs/ffs.c Mon Jan 19 10:57:00 2015 (r277375) +++ stable/9/usr.sbin/makefs/ffs.c Mon Jan 19 10:58:52 2015 (r277376) @@ -191,7 +191,7 @@ ffs_parse_opts(const char *option, fsinf "bytes per inode" }, { "minfree", &ffs_opts->minfree, 0, 99, "minfree" }, - { "maxbpf", &ffs_opts->maxbpg, 1, INT_MAX, + { "maxbpg", &ffs_opts->maxbpg, 1, INT_MAX, "max blocks per file in a cg" }, { "avgfilesize", &ffs_opts->avgfilesize,1, INT_MAX, "expected average file size" }, From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 11:02:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D9009DC; Mon, 19 Jan 2015 11:02:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED7BBA6D; Mon, 19 Jan 2015 11:02:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JB2NUS053424; Mon, 19 Jan 2015 11:02:23 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JB2NV3053423; Mon, 19 Jan 2015 11:02:23 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501191102.t0JB2NV3053423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jan 2015 11:02:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277377 - stable/10/sys/amd64/amd64 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 11:02:24 -0000 Author: kib Date: Mon Jan 19 11:02:23 2015 New Revision: 277377 URL: https://svnweb.freebsd.org/changeset/base/277377 Log: MFC r277051: Fix several issues with /dev/mem and /dev/kmem devices on amd64. Modified: stable/10/sys/amd64/amd64/mem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mem.c ============================================================================== --- stable/10/sys/amd64/amd64/mem.c Mon Jan 19 10:58:52 2015 (r277376) +++ stable/10/sys/amd64/amd64/mem.c Mon Jan 19 11:02:23 2015 (r277377) @@ -58,6 +58,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -77,13 +78,15 @@ int memrw(struct cdev *dev, struct uio *uio, int flags) { struct iovec *iov; - u_long c, v, vd; - int error, o, sflags; - vm_offset_t addr, eaddr; + void *p; + ssize_t orig_resid; + u_long v, vd; + u_int c; + int error, sflags; error = 0; - c = 0; sflags = curthread_pflags_set(TDP_DEVMEMIO); + orig_resid = uio->uio_resid; while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { @@ -93,63 +96,68 @@ memrw(struct cdev *dev, struct uio *uio, panic("memrw"); continue; } - if (dev2unit(dev) == CDEV_MINOR_MEM) { - v = uio->uio_offset; -kmemphys: - o = v & PAGE_MASK; - c = min(uio->uio_resid, (u_int)(PAGE_SIZE - o)); - vd = PHYS_TO_DMAP(v); - if (vd < DMAP_MIN_ADDRESS || - (vd > DMAP_MIN_ADDRESS + dmaplimit && - vd <= DMAP_MAX_ADDRESS) || - (pmap_kextract(vd) == 0 && (v & PG_FRAME) != 0)) { - error = EFAULT; - goto ret; - } - error = uiomove((void *)vd, (int)c, uio); - continue; - } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { - v = uio->uio_offset; + v = uio->uio_offset; + c = ulmin(iov->iov_len, PAGE_SIZE - (u_int)(v & PAGE_MASK)); - if (v >= DMAP_MIN_ADDRESS && v < DMAP_MAX_ADDRESS) { - v = DMAP_TO_PHYS(v); - goto kmemphys; + switch (dev2unit(dev)) { + case CDEV_MINOR_KMEM: + /* + * Since c is clamped to be less or equal than + * PAGE_SIZE, the uiomove() call does not + * access past the end of the direct map. + */ + if (v >= DMAP_MIN_ADDRESS && + v < DMAP_MIN_ADDRESS + dmaplimit) { + error = uiomove((void *)v, c, uio); + break; } - c = iov->iov_len; + if (!kernacc((void *)v, c, uio->uio_rw == UIO_READ ? + VM_PROT_READ : VM_PROT_WRITE)) { + error = EFAULT; + break; + } /* - * Make sure that all of the pages are currently - * resident so that we don't create any zero-fill - * pages. + * If the extracted address is not accessible + * through the direct map, then we make a + * private (uncached) mapping because we can't + * depend on the existing kernel mapping + * remaining valid until the completion of + * uiomove(). + * + * XXX We cannot provide access to the + * physical page 0 mapped into KVA. */ - addr = trunc_page(v); - eaddr = round_page(v + c); - - if (addr < VM_MIN_KERNEL_ADDRESS) { + v = pmap_extract(kernel_pmap, v); + if (v == 0) { error = EFAULT; - goto ret; + break; } - for (; addr < eaddr; addr += PAGE_SIZE) { - if (pmap_extract(kernel_pmap, addr) == 0) { - error = EFAULT; - goto ret; - } + /* FALLTHROUGH */ + case CDEV_MINOR_MEM: + if (v < dmaplimit) { + vd = PHYS_TO_DMAP(v); + error = uiomove((void *)vd, c, uio); + break; } - if (!kernacc((caddr_t)(long)v, c, - uio->uio_rw == UIO_READ ? - VM_PROT_READ : VM_PROT_WRITE)) { + if (v >= (1ULL << cpu_maxphyaddr)) { error = EFAULT; - goto ret; + break; } - - error = uiomove((caddr_t)(long)v, (int)c, uio); - continue; + p = pmap_mapdev(v, PAGE_SIZE); + error = uiomove(p, c, uio); + pmap_unmapdev((vm_offset_t)p, PAGE_SIZE); + break; } - /* else panic! */ } -ret: curthread_pflags_restore(sflags); + /* + * Don't return error if any byte was written. Read and write + * can return error only if no i/o was performed. + */ + if (uio->uio_resid != orig_resid) + error = 0; return (error); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 11:06:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31499BEE; Mon, 19 Jan 2015 11:06:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DAACA99; Mon, 19 Jan 2015 11:06:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JB6uOD054008; Mon, 19 Jan 2015 11:06:56 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JB6u4L054007; Mon, 19 Jan 2015 11:06:56 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501191106.t0JB6u4L054007@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 19 Jan 2015 11:06:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277378 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 11:06:57 -0000 Author: andrew Date: Mon Jan 19 11:06:56 2015 New Revision: 277378 URL: https://svnweb.freebsd.org/changeset/base/277378 Log: Make the clock-frequency property optional as it may not be present on FDT systems. Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ofw/ofw_cpu.c Modified: head/sys/dev/ofw/ofw_cpu.c ============================================================================== --- head/sys/dev/ofw/ofw_cpu.c Mon Jan 19 11:02:23 2015 (r277377) +++ head/sys/dev/ofw/ofw_cpu.c Mon Jan 19 11:06:56 2015 (r277378) @@ -1,7 +1,11 @@ /*- * Copyright (C) 2009 Nathan Whitehorn + * Copyright (C) 2015 The FreeBSD Foundation * All rights reserved. * + * Portions of this software were developed by Andrew Turner + * under sponsorship from the FreeBSD Foundation. + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -193,10 +197,11 @@ ofw_cpu_attach(device_t dev) } sc->sc_cpu_pcpu = pcpu_find(cell); if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { - device_printf(dev, "missing 'clock-frequency' property\n"); - return (ENXIO); - } - sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */ + if (bootverbose) + device_printf(dev, + "missing 'clock-frequency' property\n"); + } else + sc->sc_nominal_mhz = cell / 1000000; /* convert to MHz */ bus_generic_probe(dev); return (bus_generic_attach(dev)); @@ -214,8 +219,11 @@ ofw_cpu_read_ivar(device_t dev, device_t *result = (uintptr_t)sc->sc_cpu_pcpu; return (0); case CPU_IVAR_NOMINAL_MHZ: - *result = (uintptr_t)sc->sc_nominal_mhz; - return (0); + if (sc->sc_nominal_mhz > 0) { + *result = (uintptr_t)sc->sc_nominal_mhz; + return (0); + } + break; } return (ENOENT); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 11:07:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EFF3D31; Mon, 19 Jan 2015 11:07:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A546AA8; Mon, 19 Jan 2015 11:07:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JB7VRx054154; Mon, 19 Jan 2015 11:07:31 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JB7TF0054144; Mon, 19 Jan 2015 11:07:29 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501191107.t0JB7TF0054144@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jan 2015 11:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277379 - in stable/10/sys: amd64/amd64 kern sys vm X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 11:07:31 -0000 Author: kib Date: Mon Jan 19 11:07:29 2015 New Revision: 277379 URL: https://svnweb.freebsd.org/changeset/base/277379 Log: MFC r277055: Revert r263475: TDP_DEVMEMIO no longer needed. Modified: stable/10/sys/amd64/amd64/mem.c stable/10/sys/amd64/amd64/trap.c stable/10/sys/kern/subr_trap.c stable/10/sys/sys/proc.h stable/10/sys/vm/vm_fault.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/amd64/amd64/mem.c ============================================================================== --- stable/10/sys/amd64/amd64/mem.c Mon Jan 19 11:06:56 2015 (r277378) +++ stable/10/sys/amd64/amd64/mem.c Mon Jan 19 11:07:29 2015 (r277379) @@ -82,10 +82,9 @@ memrw(struct cdev *dev, struct uio *uio, ssize_t orig_resid; u_long v, vd; u_int c; - int error, sflags; + int error; error = 0; - sflags = curthread_pflags_set(TDP_DEVMEMIO); orig_resid = uio->uio_resid; while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; @@ -151,7 +150,6 @@ memrw(struct cdev *dev, struct uio *uio, break; } } - curthread_pflags_restore(sflags); /* * Don't return error if any byte was written. Read and write * can return error only if no i/o was performed. Modified: stable/10/sys/amd64/amd64/trap.c ============================================================================== --- stable/10/sys/amd64/amd64/trap.c Mon Jan 19 11:06:56 2015 (r277378) +++ stable/10/sys/amd64/amd64/trap.c Mon Jan 19 11:07:29 2015 (r277379) @@ -772,12 +772,6 @@ nogo: frame->tf_rip = (long)curpcb->pcb_onfault; return (0); } - if ((td->td_pflags & TDP_DEVMEMIO) != 0) { - KASSERT(curpcb->pcb_onfault != NULL, - ("/dev/mem without pcb_onfault")); - frame->tf_rip = (long)curpcb->pcb_onfault; - return (0); - } trap_fatal(frame, eva); return (-1); } Modified: stable/10/sys/kern/subr_trap.c ============================================================================== --- stable/10/sys/kern/subr_trap.c Mon Jan 19 11:06:56 2015 (r277378) +++ stable/10/sys/kern/subr_trap.c Mon Jan 19 11:07:29 2015 (r277379) @@ -155,8 +155,6 @@ userret(struct thread *td, struct trapfr ("userret: Returning with %d locks held", td->td_locks)); KASSERT((td->td_pflags & TDP_NOFAULTING) == 0, ("userret: Returning with pagefaults disabled")); - KASSERT((td->td_pflags & TDP_DEVMEMIO) == 0, - ("userret: Returning with /dev/mem i/o leaked")); KASSERT(td->td_no_sleeping == 0, ("userret: Returning with sleep disabled")); KASSERT(td->td_pinned == 0 || (td->td_pflags & TDP_CALLCHAIN) != 0, Modified: stable/10/sys/sys/proc.h ============================================================================== --- stable/10/sys/sys/proc.h Mon Jan 19 11:06:56 2015 (r277378) +++ stable/10/sys/sys/proc.h Mon Jan 19 11:07:29 2015 (r277379) @@ -424,7 +424,7 @@ do { \ #define TDP_RESETSPUR 0x04000000 /* Reset spurious page fault history. */ #define TDP_NERRNO 0x08000000 /* Last errno is already in td_errno */ #define TDP_UIOHELD 0x10000000 /* Current uio has pages held in td_ma */ -#define TDP_DEVMEMIO 0x20000000 /* Accessing memory for /dev/mem */ +#define TDP_UNUSED29 0x20000000 /* --available-- */ #define TDP_EXECVMSPC 0x40000000 /* Execve destroyed old vmspace */ /* Modified: stable/10/sys/vm/vm_fault.c ============================================================================== --- stable/10/sys/vm/vm_fault.c Mon Jan 19 11:06:56 2015 (r277378) +++ stable/10/sys/vm/vm_fault.c Mon Jan 19 11:07:29 2015 (r277379) @@ -334,10 +334,6 @@ RetryFault:; map_generation = fs.map->timestamp; if (fs.entry->eflags & MAP_ENTRY_NOFAULT) { - if ((curthread->td_pflags & TDP_DEVMEMIO) != 0) { - vm_map_unlock_read(fs.map); - return (KERN_FAILURE); - } panic("vm_fault: fault on nofault entry, addr: %lx", (u_long)vaddr); } From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 11:52:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 980CB4FC; Mon, 19 Jan 2015 11:52:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8485FF17; Mon, 19 Jan 2015 11:52:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JBq9Kf076612; Mon, 19 Jan 2015 11:52:09 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JBq9rt076611; Mon, 19 Jan 2015 11:52:09 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501191152.t0JBq9rt076611@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Mon, 19 Jan 2015 11:52:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277380 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 11:52:09 -0000 Author: tuexen Date: Mon Jan 19 11:52:08 2015 New Revision: 277380 URL: https://svnweb.freebsd.org/changeset/base/277380 Log: Code cleanup. Reported by: Coverity CID: 749578 MFC after: 1 week Modified: head/sys/netinet/sctp_timer.c Modified: head/sys/netinet/sctp_timer.c ============================================================================== --- head/sys/netinet/sctp_timer.c Mon Jan 19 11:07:29 2015 (r277379) +++ head/sys/netinet/sctp_timer.c Mon Jan 19 11:52:08 2015 (r277380) @@ -337,7 +337,7 @@ sctp_find_alternate_net(struct sctp_tcb return (NULL); } } - do { + for (;;) { alt = TAILQ_NEXT(mnet, sctp_next); if (alt == NULL) { once++; @@ -356,7 +356,6 @@ sctp_find_alternate_net(struct sctp_tcb } alt->src_addr_selected = 0; } - /* sa_ignore NO_NULL_CHK */ if (((alt->dest_state & SCTP_ADDR_REACHABLE) == SCTP_ADDR_REACHABLE) && (alt->ro.ro_rt != NULL) && (!(alt->dest_state & SCTP_ADDR_UNCONFIRMED))) { @@ -364,14 +363,14 @@ sctp_find_alternate_net(struct sctp_tcb break; } mnet = alt; - } while (alt != NULL); + } if (alt == NULL) { /* Case where NO insv network exists (dormant state) */ /* we rotate destinations */ once = 0; mnet = net; - do { + for (;;) { if (mnet == NULL) { return (TAILQ_FIRST(&stcb->asoc.nets)); } @@ -382,15 +381,17 @@ sctp_find_alternate_net(struct sctp_tcb break; } alt = TAILQ_FIRST(&stcb->asoc.nets); + if (alt == NULL) { + break; + } } - /* sa_ignore NO_NULL_CHK */ if ((!(alt->dest_state & SCTP_ADDR_UNCONFIRMED)) && (alt != net)) { /* Found an alternate address */ break; } mnet = alt; - } while (alt != NULL); + } } if (alt == NULL) { return (net); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 15:52:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E1B437A; Mon, 19 Jan 2015 15:52:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A708F3B; Mon, 19 Jan 2015 15:52:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JFqXvp093692; Mon, 19 Jan 2015 15:52:33 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JFqXhj093691; Mon, 19 Jan 2015 15:52:33 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501191552.t0JFqXhj093691@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Mon, 19 Jan 2015 15:52:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277385 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 15:52:33 -0000 Author: mav Date: Mon Jan 19 15:52:32 2015 New Revision: 277385 URL: https://svnweb.freebsd.org/changeset/base/277385 Log: Remove extra mtx_unlock(). Submitted by: Dmitry Luhtionov MFC after: 1 week Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Mon Jan 19 15:35:19 2015 (r277384) +++ head/sys/cam/cam_xpt.c Mon Jan 19 15:52:32 2015 (r277385) @@ -893,7 +893,6 @@ xpt_init(void *dummy) if ((status = xpt_create_path(&path, NULL, CAM_XPT_PATH_ID, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD)) != CAM_REQ_CMP) { - mtx_unlock(&xsoftc.xpt_lock); printf("xpt_init: xpt_create_path failed with status %#x," " failing attach\n", status); return (EINVAL); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 17:00:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A2CC4EB; Mon, 19 Jan 2015 17:00:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3564B9AC; Mon, 19 Jan 2015 17:00:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JH0s0Q028279; Mon, 19 Jan 2015 17:00:54 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JH0slk028278; Mon, 19 Jan 2015 17:00:54 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201501191700.t0JH0slk028278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Mon, 19 Jan 2015 17:00:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277388 - stable/10/sys/dev/virtio/network X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 17:00:54 -0000 Author: bryanv Date: Mon Jan 19 17:00:53 2015 New Revision: 277388 URL: https://svnweb.freebsd.org/changeset/base/277388 Log: MFC r276489: Use the appropriate IPv4 or IPv6 TSO HW assist flag Modified: stable/10/sys/dev/virtio/network/if_vtnet.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jan 19 16:33:58 2015 (r277387) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jan 19 17:00:53 2015 (r277388) @@ -3016,9 +3016,9 @@ vtnet_reinit(struct vtnet_softc *sc) if (ifp->if_capenable & IFCAP_TXCSUM_IPV6) ifp->if_hwassist |= VTNET_CSUM_OFFLOAD_IPV6; if (ifp->if_capenable & IFCAP_TSO4) - ifp->if_hwassist |= CSUM_TSO; + ifp->if_hwassist |= CSUM_IP_TSO; if (ifp->if_capenable & IFCAP_TSO6) - ifp->if_hwassist |= CSUM_TSO; /* No CSUM_TSO_IPV6. */ + ifp->if_hwassist |= CSUM_IP6_TSO; if (sc->vtnet_flags & VTNET_FLAG_CTRL_VQ) vtnet_init_rx_filters(sc); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 17:02:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5581E650; Mon, 19 Jan 2015 17:02:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26DB89C5; Mon, 19 Jan 2015 17:02:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JH2VKs029649; Mon, 19 Jan 2015 17:02:31 GMT (envelope-from bryanv@FreeBSD.org) Received: (from bryanv@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JH2URT029644; Mon, 19 Jan 2015 17:02:30 GMT (envelope-from bryanv@FreeBSD.org) Message-Id: <201501191702.t0JH2URT029644@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bryanv set sender to bryanv@FreeBSD.org using -f From: Bryan Venteicher Date: Mon, 19 Jan 2015 17:02:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277389 - stable/10/sys/dev/virtio/network X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 17:02:31 -0000 Author: bryanv Date: Mon Jan 19 17:02:30 2015 New Revision: 277389 URL: https://svnweb.freebsd.org/changeset/base/277389 Log: MFC r276491: Add softc flag for when the indirect descriptor feature was negotiated Modified: stable/10/sys/dev/virtio/network/if_vtnet.c stable/10/sys/dev/virtio/network/if_vtnetvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/virtio/network/if_vtnet.c ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jan 19 17:00:53 2015 (r277388) +++ stable/10/sys/dev/virtio/network/if_vtnet.c Mon Jan 19 17:02:30 2015 (r277389) @@ -597,6 +597,8 @@ vtnet_setup_features(struct vtnet_softc vtnet_negotiate_features(sc); + if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC)) + sc->vtnet_flags |= VTNET_FLAG_INDIRECT; if (virtio_with_feature(dev, VIRTIO_RING_F_EVENT_IDX)) sc->vtnet_flags |= VTNET_FLAG_EVENT_IDX; @@ -3663,7 +3665,7 @@ vtnet_set_tx_intr_threshold(struct vtnet * Without indirect descriptors, leave enough room for the most * segments we handle. */ - if (virtio_with_feature(dev, VIRTIO_RING_F_INDIRECT_DESC) == 0 && + if ((sc->vtnet_flags & VTNET_FLAG_INDIRECT) == 0 && thresh < sc->vtnet_tx_nsegs) thresh = sc->vtnet_tx_nsegs; Modified: stable/10/sys/dev/virtio/network/if_vtnetvar.h ============================================================================== --- stable/10/sys/dev/virtio/network/if_vtnetvar.h Mon Jan 19 17:00:53 2015 (r277388) +++ stable/10/sys/dev/virtio/network/if_vtnetvar.h Mon Jan 19 17:02:30 2015 (r277389) @@ -140,7 +140,8 @@ struct vtnet_softc { #define VTNET_FLAG_MRG_RXBUFS 0x0080 #define VTNET_FLAG_LRO_NOMRG 0x0100 #define VTNET_FLAG_MULTIQ 0x0200 -#define VTNET_FLAG_EVENT_IDX 0x0400 +#define VTNET_FLAG_INDIRECT 0x0400 +#define VTNET_FLAG_EVENT_IDX 0x0800 int vtnet_link_active; int vtnet_hdr_size; From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 17:24:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12EC4ED5; Mon, 19 Jan 2015 17:24:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F31EFC44; Mon, 19 Jan 2015 17:24:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JHOrsL039326; Mon, 19 Jan 2015 17:24:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JHOrro039324; Mon, 19 Jan 2015 17:24:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501191724.t0JHOrro039324@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jan 2015 17:24:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277390 - head/sys/fs/devfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 17:24:54 -0000 Author: kib Date: Mon Jan 19 17:24:52 2015 New Revision: 277390 URL: https://svnweb.freebsd.org/changeset/base/277390 Log: Ignore devfs directory entries for devices either being destroyed or delisted. The check is racy. Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_vnops.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Mon Jan 19 17:02:30 2015 (r277389) +++ head/sys/fs/devfs/devfs_devs.c Mon Jan 19 17:24:52 2015 (r277390) @@ -192,6 +192,16 @@ devfs_find(struct devfs_dirent *dd, cons continue; if (type != 0 && type != de->de_dirent->d_type) continue; + + /* + * The race with finding non-active name is not + * completely closed by the check, but it is similar + * to the devfs_allocv() in making it unlikely enough. + */ + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; + if (bcmp(name, de->de_dirent->d_name, namelen) != 0) continue; break; Modified: head/sys/fs/devfs/devfs_vnops.c ============================================================================== --- head/sys/fs/devfs/devfs_vnops.c Mon Jan 19 17:02:30 2015 (r277389) +++ head/sys/fs/devfs/devfs_vnops.c Mon Jan 19 17:24:52 2015 (r277390) @@ -1045,6 +1045,9 @@ devfs_mknod(struct vop_mknod_args *ap) TAILQ_FOREACH(de, &dd->de_dlist, de_list) { if (cnp->cn_namelen != de->de_dirent->d_namlen) continue; + if (de->de_dirent->d_type == DT_CHR && + (de->de_cdp->cdp_flags & CDP_ACTIVE) == 0) + continue; if (bcmp(cnp->cn_nameptr, de->de_dirent->d_name, de->de_dirent->d_namlen) != 0) continue; From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 17:36:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7F56403; Mon, 19 Jan 2015 17:36:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B4377D79; Mon, 19 Jan 2015 17:36:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JHar0Q044491; Mon, 19 Jan 2015 17:36:53 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JHarYf044488; Mon, 19 Jan 2015 17:36:53 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501191736.t0JHarYf044488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 19 Jan 2015 17:36:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277391 - in head/sys: fs/devfs kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 17:36:54 -0000 Author: kib Date: Mon Jan 19 17:36:52 2015 New Revision: 277391 URL: https://svnweb.freebsd.org/changeset/base/277391 Log: Stop enforcing additional reference on all cdevs, which was introduced in r277199. Acquire the neccessary reference in delist_dev_locked() and inform destroy_devl() about it using CDP_UNREF_DTR flag. Fix some style nits, add asserts. Discussed with: hselasky Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/devfs/devfs_devs.c head/sys/fs/devfs/devfs_int.h head/sys/kern/kern_conf.c Modified: head/sys/fs/devfs/devfs_devs.c ============================================================================== --- head/sys/fs/devfs/devfs_devs.c Mon Jan 19 17:24:52 2015 (r277390) +++ head/sys/fs/devfs/devfs_devs.c Mon Jan 19 17:36:52 2015 (r277391) @@ -137,12 +137,6 @@ devfs_alloc(int flags) vfs_timestamp(&ts); cdev->si_atime = cdev->si_mtime = cdev->si_ctime = ts; cdev->si_cred = NULL; - /* - * Avoid race with dev_rel() by setting the initial - * reference count to 1. This last reference is taken - * by the destroy_dev() function. - */ - cdev->si_refcount = 1; return (cdev); } Modified: head/sys/fs/devfs/devfs_int.h ============================================================================== --- head/sys/fs/devfs/devfs_int.h Mon Jan 19 17:24:52 2015 (r277390) +++ head/sys/fs/devfs/devfs_int.h Mon Jan 19 17:36:52 2015 (r277391) @@ -56,6 +56,7 @@ struct cdev_priv { u_int cdp_flags; #define CDP_ACTIVE (1 << 0) #define CDP_SCHED_DTR (1 << 1) +#define CDP_UNREF_DTR (1 << 2) u_int cdp_inuse; u_int cdp_maxdirent; Modified: head/sys/kern/kern_conf.c ============================================================================== --- head/sys/kern/kern_conf.c Mon Jan 19 17:24:52 2015 (r277390) +++ head/sys/kern/kern_conf.c Mon Jan 19 17:36:52 2015 (r277391) @@ -116,6 +116,8 @@ dev_free_devlocked(struct cdev *cdev) mtx_assert(&devmtx, MA_OWNED); cdp = cdev2priv(cdev); + KASSERT((cdp->cdp_flags & CDP_UNREF_DTR) == 0, + ("destroy_dev() was not called after delist_dev(%p)", cdev)); TAILQ_INSERT_HEAD(&cdevp_free_list, cdp, cdp_list); } @@ -1035,6 +1037,7 @@ destroy_devl(struct cdev *dev) { struct cdevsw *csw; struct cdev_privdata *p; + struct cdev_priv *cdp; mtx_assert(&devmtx, MA_OWNED); KASSERT(dev->si_flags & SI_NAMED, @@ -1043,7 +1046,18 @@ destroy_devl(struct cdev *dev) ("WARNING: Driver mistake: destroy_dev on eternal %d\n", dev2unit(dev))); - devfs_destroy(dev); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) == 0) { + /* + * Avoid race with dev_rel(), e.g. from the populate + * loop. If CDP_UNREF_DTR flag is set, the reference + * to be dropped at the end of destroy_devl() was + * already taken by delist_dev_locked(). + */ + dev_refl(dev); + + devfs_destroy(dev); + } /* Remove name marking */ dev->si_flags &= ~SI_NAMED; @@ -1103,19 +1117,27 @@ destroy_devl(struct cdev *dev) } } dev->si_flags &= ~SI_ALIAS; - dev->si_refcount--; /* Avoid race with dev_rel() */ + cdp->cdp_flags &= ~CDP_UNREF_DTR; + dev->si_refcount--; - if (dev->si_refcount > 0) { + if (dev->si_refcount > 0) LIST_INSERT_HEAD(&dead_cdevsw.d_devs, dev, si_list); - } else { + else dev_free_devlocked(dev); - } } static void delist_dev_locked(struct cdev *dev) { + struct cdev_priv *cdp; struct cdev *child; + + mtx_assert(&devmtx, MA_OWNED); + cdp = cdev2priv(dev); + if ((cdp->cdp_flags & CDP_UNREF_DTR) != 0) + return; + cdp->cdp_flags |= CDP_UNREF_DTR; + dev_refl(dev); devfs_destroy(dev); LIST_FOREACH(child, &dev->si_children, si_siblings) delist_dev_locked(child); @@ -1124,6 +1146,7 @@ delist_dev_locked(struct cdev *dev) void delist_dev(struct cdev *dev) { + dev_lock(); delist_dev_locked(dev); dev_unlock(); From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 17:58:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE763C35; Mon, 19 Jan 2015 17:58:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C1572F9A; Mon, 19 Jan 2015 17:58:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JHw2ex054657; Mon, 19 Jan 2015 17:58:02 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JHw2bG054654; Mon, 19 Jan 2015 17:58:02 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501191758.t0JHw2bG054654@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Mon, 19 Jan 2015 17:58:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277392 - in head/sys/powerpc: aim powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 17:58:03 -0000 Author: nwhitehorn Date: Mon Jan 19 17:58:01 2015 New Revision: 277392 URL: https://svnweb.freebsd.org/changeset/base/277392 Log: Add some initial infrastructure for relocating the kernel in place. MFC after: 2 months Differential revision: D1554 Modified: head/sys/powerpc/aim/locore64.S head/sys/powerpc/powerpc/elf64_machdep.c Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Mon Jan 19 17:36:52 2015 (r277391) +++ head/sys/powerpc/aim/locore64.S Mon Jan 19 17:58:01 2015 (r277392) @@ -121,13 +121,33 @@ ASENTRY_NOPROF(__start) .align 3 0: nop bl 1f - .llong __tocbase + 0x8000 + .llong __tocbase + 0x8000 - . 1: mflr %r2 - ld %r2,0(%r2) + ld %r1,0(%r2) + add %r2,%r1,%r2 /* Set up the stack pointer */ ld %r1,TOC_REF(tmpstk)(%r2) - addi %r1,%r1,TMPSTKSZ-48 + addi %r1,%r1,TMPSTKSZ-96 + + /* Relocate kernel */ + std %r3,48(%r1) + std %r4,56(%r1) + std %r5,64(%r1) + std %r6,72(%r1) + bl 1f + .llong _DYNAMIC-. +1: mflr %r3 + ld %r4,0(%r3) + add %r3,%r4,%r3 + ld %r4,-0x8000(%r2) /* First TOC entry is TOC base */ + subf %r4,%r4,%r2 /* Subtract from real TOC base to get base */ + bl elf_reloc_self + nop + ld %r3,48(%r1) + ld %r4,56(%r1) + ld %r5,64(%r1) + ld %r6,72(%r1) /* Switch to 64-bit mode */ mfmsr %r9 Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Mon Jan 19 17:36:52 2015 (r277391) +++ head/sys/powerpc/powerpc/elf64_machdep.c Mon Jan 19 17:58:01 2015 (r277392) @@ -119,6 +119,8 @@ SYSINIT(oelf64, SI_SUB_EXEC, SI_ORDER_AN (sysinit_cfunc_t) elf64_insert_brand_entry, &freebsd_brand_oinfo); +void elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase); + void elf64_dump_thread(struct thread *td, void *dst, size_t *off) { @@ -198,6 +200,37 @@ elf_reloc_internal(linker_file_t lf, Elf return(0); } +void +elf_reloc_self(Elf_Dyn *dynp, Elf_Addr relocbase) +{ + Elf_Rela *rela = 0, *relalim; + Elf_Addr relasz = 0; + Elf_Addr *where; + + /* + * Extract the rela/relasz values from the dynamic section + */ + for (; dynp->d_tag != DT_NULL; dynp++) { + switch (dynp->d_tag) { + case DT_RELA: + rela = (Elf_Rela *)(relocbase+dynp->d_un.d_ptr); + break; + case DT_RELASZ: + relasz = dynp->d_un.d_val; + break; + } + } + + /* + * Relocate these values + */ + relalim = (Elf_Rela *)((caddr_t)rela + relasz); + for (; rela < relalim; rela++) { + where = (Elf_Addr *)(relocbase + rela->r_offset); + *where = (Elf_Addr)(relocbase + rela->r_addend); + } +} + int elf_reloc(linker_file_t lf, Elf_Addr relocbase, const void *data, int type, elf_lookup_fn lookup) From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 20:39:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A33A34F8; Mon, 19 Jan 2015 20:39:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8E76B650; Mon, 19 Jan 2015 20:39:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JKdpCx033582; Mon, 19 Jan 2015 20:39:51 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JKdnYG033571; Mon, 19 Jan 2015 20:39:49 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501192039.t0JKdnYG033571@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 20:39:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277396 - head/sys/ofed/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 20:39:51 -0000 Author: hselasky Date: Mon Jan 19 20:39:48 2015 New Revision: 277396 URL: https://svnweb.freebsd.org/changeset/base/277396 Log: Add more functions to the Linux kernel compatibility layer. Add some missing includes which are needed when the header files are not included in a particular order. MFC after: 1 month Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/linux/bitops.h head/sys/ofed/include/linux/cache.h head/sys/ofed/include/linux/dma-mapping.h head/sys/ofed/include/linux/etherdevice.h head/sys/ofed/include/linux/gfp.h head/sys/ofed/include/linux/io.h head/sys/ofed/include/linux/kernel.h head/sys/ofed/include/linux/ktime.h head/sys/ofed/include/linux/slab.h Modified: head/sys/ofed/include/linux/bitops.h ============================================================================== --- head/sys/ofed/include/linux/bitops.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/bitops.h Mon Jan 19 20:39:48 2015 (r277396) @@ -288,9 +288,15 @@ bitmap_empty(unsigned long *addr, int si #define NBLONG (NBBY * sizeof(long)) +#define __set_bit(i, a) \ + atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) + #define set_bit(i, a) \ atomic_set_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) +#define __clear_bit(i, a) \ + atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) + #define clear_bit(i, a) \ atomic_clear_long(&((volatile long *)(a))[(i)/NBLONG], 1UL << ((i) % NBLONG)) Modified: head/sys/ofed/include/linux/cache.h ============================================================================== --- head/sys/ofed/include/linux/cache.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/cache.h Mon Jan 19 20:39:48 2015 (r277396) @@ -30,8 +30,7 @@ #ifndef _LINUX_CACHE_H_ #define _LINUX_CACHE_H_ - #define cache_line_size() CACHE_LINE_SIZE - +#define L1_CACHE_BYTES CACHE_LINE_SIZE #endif /* _LINUX_CACHE_H_ */ Modified: head/sys/ofed/include/linux/dma-mapping.h ============================================================================== --- head/sys/ofed/include/linux/dma-mapping.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/dma-mapping.h Mon Jan 19 20:39:48 2015 (r277396) @@ -139,6 +139,14 @@ dma_alloc_coherent(struct device *dev, s *dma_handle = 0; return (mem); } + +static inline void * +dma_zalloc_coherent(struct device *dev, size_t size, dma_addr_t *dma_handle, + gfp_t flag) +{ + + return (dma_alloc_coherent(dev, size, dma_handle, flag | __GFP_ZERO)); +} static inline void dma_free_coherent(struct device *dev, size_t size, void *cpu_addr, Modified: head/sys/ofed/include/linux/etherdevice.h ============================================================================== --- head/sys/ofed/include/linux/etherdevice.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/etherdevice.h Mon Jan 19 20:39:48 2015 (r277396) @@ -89,6 +89,9 @@ static inline bool is_valid_ether_addr(c return !is_multicast_ether_addr(addr) && !is_zero_ether_addr(addr); } - +static inline void ether_addr_copy(u8 *dst, const u8 *src) +{ + memcpy(dst, src, 6); +} #endif /* _LINUX_ETHERDEVICE */ Modified: head/sys/ofed/include/linux/gfp.h ============================================================================== --- head/sys/ofed/include/linux/gfp.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/gfp.h Mon Jan 19 20:39:48 2015 (r277396) @@ -30,6 +30,8 @@ #ifndef _LINUX_GFP_H_ #define _LINUX_GFP_H_ +#include +#include #include #include Modified: head/sys/ofed/include/linux/io.h ============================================================================== --- head/sys/ofed/include/linux/io.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/io.h Mon Jan 19 20:39:48 2015 (r277396) @@ -31,6 +31,7 @@ #define _LINUX_IO_H_ #include +#include static inline uint32_t __raw_readl(const volatile void *addr) @@ -89,6 +90,20 @@ writew(uint16_t b, void *addr) *(volatile uint16_t *)addr = b; } +#undef ioread32be +static inline uint32_t +ioread32be(const volatile void *addr) +{ + return be32toh(*(const volatile uint32_t *)addr); +} + +#undef iowrite32be +static inline void +iowrite32be(uint32_t v, volatile void *addr) +{ + *(volatile uint32_t *)addr = htobe32(v); +} + void *_ioremap_attr(vm_paddr_t phys_addr, unsigned long size, int attr); #define ioremap_nocache(addr, size) \ _ioremap_attr((addr), (size), VM_MEMATTR_UNCACHEABLE) Modified: head/sys/ofed/include/linux/kernel.h ============================================================================== --- head/sys/ofed/include/linux/kernel.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/kernel.h Mon Jan 19 20:39:48 2015 (r277396) @@ -29,6 +29,8 @@ #ifndef _LINUX_KERNEL_H_ #define _LINUX_KERNEL_H_ +#include +#include #include #include #include @@ -57,6 +59,8 @@ #define KERN_INFO "<6>" #define KERN_DEBUG "<7>" +#define BUILD_BUG_ON(x) CTASSERT(x) + #define BUG() panic("BUG") #define BUG_ON(condition) do { if (condition) BUG(); } while(0) #define WARN_ON BUG_ON @@ -84,6 +88,7 @@ #endif #define udelay(t) DELAY(t) +#define usleep_range(min,max) DELAY(min) #ifndef pr_fmt #define pr_fmt(fmt) fmt Modified: head/sys/ofed/include/linux/ktime.h ============================================================================== --- head/sys/ofed/include/linux/ktime.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/ktime.h Mon Jan 19 20:39:48 2015 (r277396) @@ -288,4 +288,13 @@ static inline s64 ktime_to_ns(const ktim #endif /* !((BITS_PER_LONG == 64) || defined(CONFIG_KTIME_SCALAR)) */ +static inline s64 ktime_get_ns(void) +{ + struct timespec ts; + ktime_t kt; + ktime_get_ts(&ts); + kt = timespec_to_ktime(ts); + return (ktime_to_ns(kt)); +} + #endif /* _LINUX_KTIME_H */ Modified: head/sys/ofed/include/linux/slab.h ============================================================================== --- head/sys/ofed/include/linux/slab.h Mon Jan 19 18:42:10 2015 (r277395) +++ head/sys/ofed/include/linux/slab.h Mon Jan 19 20:39:48 2015 (r277396) @@ -40,6 +40,7 @@ MALLOC_DECLARE(M_KMALLOC); #define kmalloc(size, flags) malloc((size), M_KMALLOC, (flags)) +#define kvmalloc(size) kmalloc((size), 0) #define kzalloc(size, flags) kmalloc((size), (flags) | M_ZERO) #define kzalloc_node(size, flags, node) kzalloc(size, flags) #define kfree(ptr) free(__DECONST(void *, (ptr)), M_KMALLOC) @@ -47,6 +48,7 @@ MALLOC_DECLARE(M_KMALLOC); #define kcalloc(n, size, flags) kmalloc((n) * (size), flags | M_ZERO) #define vzalloc(size) kzalloc(size, GFP_KERNEL | __GFP_NOWARN) #define vfree(arg) kfree(arg) +#define kvfree(arg) kfree(arg) #define vmalloc(size) kmalloc(size, GFP_KERNEL) #define vmalloc_node(size, node) kmalloc(size, GFP_KERNEL) From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 21:53:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46CAEEF; Mon, 19 Jan 2015 21:53:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 278A1E9F; Mon, 19 Jan 2015 21:53:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0JLr46u071679; Mon, 19 Jan 2015 21:53:04 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0JLr1Vq071668; Mon, 19 Jan 2015 21:53:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501192153.t0JLr1Vq071668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 19 Jan 2015 21:53:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277402 - in head/sys: contrib/rdma/krping dev/cxgb/ulp/iw_cxgb dev/cxgbe/iw_cxgbe ofed/drivers/infiniband/core ofed/drivers/infiniband/hw/mlx4 ofed/drivers/infiniband/hw/mthca ofed/dri... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 21:53:04 -0000 Author: hselasky Date: Mon Jan 19 21:53:00 2015 New Revision: 277402 URL: https://svnweb.freebsd.org/changeset/base/277402 Log: Add missing linuxapi module dependencies and always use the FreeBSD "MODULE_VERSION" macro definition. Remove the redefinition of the "MODULE_VERSION" macro from the Linux kernel compatibility API. MFC after: 1 month Reported by: np@ Sponsored by: Mellanox Technologies Modified: head/sys/contrib/rdma/krping/krping.c head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c head/sys/dev/cxgbe/iw_cxgbe/device.c head/sys/ofed/drivers/infiniband/core/device.c head/sys/ofed/drivers/infiniband/hw/mlx4/main.c head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c head/sys/ofed/drivers/net/mlx4/en_main.c head/sys/ofed/drivers/net/mlx4/main.c head/sys/ofed/include/linux/module.h Modified: head/sys/contrib/rdma/krping/krping.c ============================================================================== --- head/sys/contrib/rdma/krping/krping.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/contrib/rdma/krping/krping.c Mon Jan 19 21:53:00 2015 (r277402) @@ -60,6 +60,8 @@ extern int krping_debug; MODULE_AUTHOR("Steve Wise"); MODULE_DESCRIPTION("RDMA ping client/server"); MODULE_LICENSE("Dual BSD/GPL"); +MODULE_VERSION(krping, 1); +MODULE_DEPEND(krping, linuxapi, 1, 1, 1); static __inline uint64_t get_cycles(void) Modified: head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c ============================================================================== --- head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/dev/cxgb/ulp/iw_cxgb/iw_cxgb.c Mon Jan 19 21:53:00 2015 (r277402) @@ -251,9 +251,6 @@ iwch_mod_unload(void) } #endif /* TCP_OFFLOAD */ -#undef MODULE_VERSION -#include - static int iwch_modevent(module_t mod, int cmd, void *arg) { @@ -299,3 +296,5 @@ MODULE_DEPEND(t3_tom, cxgbc, 1, 1, 1); MODULE_DEPEND(iw_cxgb, toecore, 1, 1, 1); MODULE_DEPEND(iw_cxgb, t3_tom, 1, 1, 1); MODULE_DEPEND(iw_cxgb, ibcore, 1, 1, 1); +MODULE_DEPEND(iw_cxgb, linuxapi, 1, 1, 1); + Modified: head/sys/dev/cxgbe/iw_cxgbe/device.c ============================================================================== --- head/sys/dev/cxgbe/iw_cxgbe/device.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/dev/cxgbe/iw_cxgbe/device.c Mon Jan 19 21:53:00 2015 (r277402) @@ -321,8 +321,6 @@ c4iw_mod_unload(void) } #endif -#undef MODULE_VERSION -#include /* * t4_tom won't load on kernels without TCP_OFFLOAD and this module's dependency @@ -366,4 +364,5 @@ MODULE_VERSION(iw_cxgbe, 1); MODULE_DEPEND(iw_cxgbe, t4nex, 1, 1, 1); MODULE_DEPEND(iw_cxgbe, t4_tom, 1, 1, 1); MODULE_DEPEND(iw_cxgbe, ibcore, 1, 1, 1); +MODULE_DEPEND(iw_cxgbe, linuxapi, 1, 1, 1); DECLARE_MODULE(iw_cxgbe, c4iw_mod_data, SI_SUB_EXEC, SI_ORDER_ANY); Modified: head/sys/ofed/drivers/infiniband/core/device.c ============================================================================== --- head/sys/ofed/drivers/infiniband/core/device.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/drivers/infiniband/core/device.c Mon Jan 19 21:53:00 2015 (r277402) @@ -754,8 +754,6 @@ static void __exit ib_core_cleanup(void) module_init(ib_core_init); module_exit(ib_core_cleanup); -#undef MODULE_VERSION -#include static int ibcore_evhand(module_t mod, int event, void *arg) { Modified: head/sys/ofed/drivers/infiniband/hw/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/drivers/infiniband/hw/mlx4/main.c Mon Jan 19 21:53:00 2015 (r277402) @@ -67,7 +67,9 @@ MODULE_AUTHOR("Roland Dreier"); MODULE_DESCRIPTION("Mellanox ConnectX HCA InfiniBand driver"); MODULE_LICENSE("Dual BSD/GPL"); +#ifdef __linux__ MODULE_VERSION(DRV_VERSION); +#endif int mlx4_ib_sm_guid_assign = 1; @@ -2404,8 +2406,6 @@ static void __exit mlx4_ib_cleanup(void) module_init_order(mlx4_ib_init, SI_ORDER_MIDDLE); module_exit(mlx4_ib_cleanup); -#undef MODULE_VERSION -#include static int mlx4ib_evhand(module_t mod, int event, void *arg) { Modified: head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/drivers/infiniband/hw/mthca/mthca_main.c Mon Jan 19 21:53:00 2015 (r277402) @@ -47,7 +47,9 @@ MODULE_AUTHOR("Roland Dreier"); MODULE_DESCRIPTION("Mellanox InfiniBand HCA low-level driver"); MODULE_LICENSE("Dual BSD/GPL"); -MODULE_VERSION(DRV_VERSION); +MODULE_VERSION(mthca, 1); +MODULE_DEPEND(mthca, linuxapi, 1, 1, 1); +MODULE_DEPEND(mthca, ibcore, 1, 1, 1); #ifdef CONFIG_INFINIBAND_MTHCA_DEBUG Modified: head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c ============================================================================== --- head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c Mon Jan 19 21:53:00 2015 (r277402) @@ -1527,8 +1527,6 @@ ipoib_resolvemulti(struct ifnet *ifp, st module_init(ipoib_init_module); module_exit(ipoib_cleanup_module); -#undef MODULE_VERSION -#include static int ipoib_evhand(module_t mod, int event, void *arg) { Modified: head/sys/ofed/drivers/net/mlx4/en_main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/en_main.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/drivers/net/mlx4/en_main.c Mon Jan 19 21:53:00 2015 (r277402) @@ -45,7 +45,9 @@ MODULE_AUTHOR("Liran Liss, Yevgeny Petrilin"); MODULE_DESCRIPTION("Mellanox ConnectX HCA Ethernet driver"); MODULE_LICENSE("Dual BSD/GPL"); +#ifdef __linux__ MODULE_VERSION(DRV_VERSION " ("DRV_RELDATE")"); +#endif static const char mlx4_en_version[] = DRV_NAME ": Mellanox ConnectX HCA Ethernet driver v" @@ -336,8 +338,6 @@ static void __exit mlx4_en_cleanup(void) module_init(mlx4_en_init); module_exit(mlx4_en_cleanup); -#undef MODULE_VERSION -#include static int mlxen_evhand(module_t mod, int event, void *arg) { Modified: head/sys/ofed/drivers/net/mlx4/main.c ============================================================================== --- head/sys/ofed/drivers/net/mlx4/main.c Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/drivers/net/mlx4/main.c Mon Jan 19 21:53:00 2015 (r277402) @@ -34,10 +34,6 @@ */ #include -/* - * kmod.h must be included before module.h since it includes (indirectly) sys/module.h - * To use the FBSD macro sys/module.h should define MODULE_VERSION before linux/module does. -*/ #include #include #include @@ -3783,7 +3779,6 @@ static void __exit mlx4_cleanup(void) module_init_order(mlx4_init, SI_ORDER_MIDDLE); module_exit(mlx4_cleanup); -#include static int mlx4_evhand(module_t mod, int event, void *arg) { Modified: head/sys/ofed/include/linux/module.h ============================================================================== --- head/sys/ofed/include/linux/module.h Mon Jan 19 21:47:18 2015 (r277401) +++ head/sys/ofed/include/linux/module.h Mon Jan 19 21:53:00 2015 (r277402) @@ -29,6 +29,10 @@ #ifndef _LINUX_MODULE_H_ #define _LINUX_MODULE_H_ +#include +#include +#include + #include #include #include @@ -39,10 +43,6 @@ #define MODULE_DESCRIPTION(name) #define MODULE_LICENSE(name) -#ifndef MODULE_VERSION -#define MODULE_VERSION(name) -#endif - #define THIS_MODULE ((struct module *)0) #define EXPORT_SYMBOL(name) From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 21:59:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 776DE3AA; Mon, 19 Jan 2015 21:59:58 +0000 (UTC) Received: from mail-we0-x22e.google.com (mail-we0-x22e.google.com [IPv6:2a00:1450:400c:c03::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DF78EEE0; Mon, 19 Jan 2015 21:59:57 +0000 (UTC) Received: by mail-we0-f174.google.com with SMTP id x3so282872wes.5; Mon, 19 Jan 2015 13:59:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=OqGUK+HaG2oSiUFc1f6pby1kFA+zeJ4rgWObrk7OoY8=; b=RPQLeANiZNJ0YB96QTiWQ0fb3LLE3Mnr6ohIOkeq5ekGBSZvTob6fdGwy47xNWCsej UEM9DcDSFuFuVK2RgdU4eYstbDZ2fkl+7SlrQ6e5YwSMEB70thSknIXnKPtyWmJqCijH pRtjpUUEbt3f1Es8dS5u3V4uGV0KfacW6CIFT2+BqJbKq5WxLzPhvC9uwrflub4eG33j 6+ZN1vb2nV2g+qgSYdWwg4JksLiiNiRT5y5Ry2dIfJkvHWgehawginaB7YBnvQDJYBMf iu/RPgem0Ye5/ra2pJ5d4U3ZOmKQFNU5ktUQBHZ37vrkP3st7P5q78paGNuUW8pbnwVp OgVg== MIME-Version: 1.0 X-Received: by 10.194.24.103 with SMTP id t7mr38037495wjf.15.1421704796249; Mon, 19 Jan 2015 13:59:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 19 Jan 2015 13:59:56 -0800 (PST) In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Mon, 19 Jan 2015 13:59:56 -0800 X-Google-Sender-Auth: LPq4w2lIoMTlWqYEnMnswLzFcmI Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 21:59:58 -0000 Hi, Would you please check what the results of this are with CPU specific callwheels? I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on ixgbe) and with this setup, the per-CPU TCP callwheel stuff is enabled. But all the callwheels are now back on clock(0) and so is the lock contention. :( Thanks, -adrian On 15 January 2015 at 07:32, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 > > Log: > Major callout subsystem cleanup and rewrite: > - Close a migration race where callout_reset() failed to set the > CALLOUT_ACTIVE flag. > - Callout callback functions are now allowed to be protected by > spinlocks. > - Switching the callout CPU number cannot always be done on a > per-callout basis. See the updated timeout(9) manual page for more > information. > - The timeout(9) manual page has been updated to reflect how all the > functions inside the callout API are working. The manual page has > been made function oriented to make it easier to deduce how each of > the functions making up the callout API are working without having > to first read the whole manual page. Group all functions into a > handful of sections which should give a quick top-level overview > when the different functions should be used. > - The CALLOUT_SHAREDLOCK flag and its functionality has been removed > to reduce the complexity in the callout code and to avoid problems > about atomically stopping callouts via callout_stop(). If someone > needs it, it can be re-added. From my quick grep there are no > CALLOUT_SHAREDLOCK clients in the kernel. > - A new callout API function named "callout_drain_async()" has been > added. See the updated timeout(9) manual page for a complete > description. > - Update the callout clients in the "kern/" folder to use the callout > API properly, like cv_timedwait(). Previously there was some custom > sleepqueue code in the callout subsystem, which has been removed, > because we now allow callouts to be protected by spinlocks. This > allows us to tear down the callout like done with regular mutexes, > and a "td_slpmutex" has been added to "struct thread" to atomically > teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and > "SWT_SLEEPQTIMO" states can now be completely removed. Currently > they are marked as available and will be cleaned up in a follow up > commit. > - Bump the __FreeBSD_version to indicate kernel modules need > recompilation. > - There has been several reports that this patch "seems to squash a > serious bug leading to a callout timeout and panic". > > Kernel build testing: all architectures were built > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D1438 > Sponsored by: Mellanox Technologies > Reviewed by: jhb, adrian, sbruno and emaste > > Modified: > head/share/man/man9/Makefile > head/share/man/man9/timeout.9 > head/sys/kern/init_main.c > head/sys/kern/kern_condvar.c > head/sys/kern/kern_lock.c > head/sys/kern/kern_switch.c > head/sys/kern/kern_synch.c > head/sys/kern/kern_thread.c > head/sys/kern/kern_timeout.c > head/sys/kern/subr_sleepqueue.c > head/sys/ofed/include/linux/completion.h > head/sys/sys/_callout.h > head/sys/sys/callout.h > head/sys/sys/param.h > head/sys/sys/proc.h > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Thu Jan 15 14:47:48 2015 (r277212) > +++ head/share/man/man9/Makefile Thu Jan 15 15:32:30 2015 (r277213) > @@ -1570,6 +1570,7 @@ MLINKS+=timeout.9 callout.9 \ > timeout.9 callout_active.9 \ > timeout.9 callout_deactivate.9 \ > timeout.9 callout_drain.9 \ > + timeout.9 callout_drain_async.9 \ > timeout.9 callout_handle_init.9 \ > timeout.9 callout_init.9 \ > timeout.9 callout_init_mtx.9 \ > > Modified: head/share/man/man9/timeout.9 > ============================================================================== > --- head/share/man/man9/timeout.9 Thu Jan 15 14:47:48 2015 (r277212) > +++ head/share/man/man9/timeout.9 Thu Jan 15 15:32:30 2015 (r277213) > @@ -29,13 +29,14 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 8, 2014 > +.Dd January 14, 2015 > .Dt TIMEOUT 9 > .Os > .Sh NAME > .Nm callout_active , > .Nm callout_deactivate , > .Nm callout_drain , > +.Nm callout_drain_async , > .Nm callout_handle_init , > .Nm callout_init , > .Nm callout_init_mtx , > @@ -63,279 +64,232 @@ > .In sys/systm.h > .Bd -literal > typedef void timeout_t (void *); > +typedef void callout_func_t (void *); > .Ed > -.Ft int > -.Fn callout_active "struct callout *c" > -.Ft void > -.Fn callout_deactivate "struct callout *c" > -.Ft int > -.Fn callout_drain "struct callout *c" > -.Ft void > -.Fn callout_handle_init "struct callout_handle *handle" > -.Bd -literal > -struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); > -.Ed > -.Ft void > -.Fn callout_init "struct callout *c" "int mpsafe" > -.Ft void > -.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" > -.Ft void > -.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" > -.Ft void > -.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" > -.Ft int > -.Fn callout_pending "struct callout *c" > -.Ft int > -.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" > -.Ft int > -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ > -"void *arg" > -.Ft int > -.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ > -"void *arg" "int cpu" > -.Ft int > -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" > -.Ft int > -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" > -.Ft int > -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" > -.Ft int > -.Fn callout_schedule "struct callout *c" "int ticks" > -.Ft int > -.Fn callout_schedule_curcpu "struct callout *c" "int ticks" > -.Ft int > -.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" > -.Ft int > -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "int flags" > -.Ft int > -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "int flags" > -.Ft int > -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "int cpu" "int flags" > -.Ft int > -.Fn callout_stop "struct callout *c" > -.Ft struct callout_handle > -.Fn timeout "timeout_t *func" "void *arg" "int ticks" > -.Ft void > -.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" > .Sh DESCRIPTION > The > .Nm callout > API is used to schedule a call to an arbitrary function at a specific > -time in the future. > -Consumers of this API are required to allocate a callout structure > +time in the future in a single-shot fashion. > +Consumers of this API are required to allocate a > .Pq struct callout > -for each pending function invocation. > -This structure stores state about the pending function invocation including > -the function to be called and the time at which the function should be invoked. > -Pending function calls can be cancelled or rescheduled to a different time. > -In addition, > -a callout structure may be reused to schedule a new function call after a > -scheduled call is completed. > -.Pp > -Callouts only provide a single-shot mode. > -If a consumer requires a periodic timer, > -it must explicitly reschedule each function call. > -This is normally done by rescheduling the subsequent call within the called > -function. > +structure for each pending function invocation. > +The > +.Pq struct callout > +structure stores the full state about any pending function call and > +should be drained by a call to > +.Fn callout_drain > +or > +.Fn callout_drain_async > +before freeing. > +.Sh INITIALISATION > +.Ft void > +.Fn callout_handle_init "struct callout_handle *handle" > +This function is deprecated and is used to prepare a > +.Pq struct callout_handle > +structure before it can be used the first time. > +If this function is called on a pending timeout, the pending timeout > +cannot be cancelled and the > +.Fn untimeout > +function will return as if there was no timeout pending. > .Pp > -Callout functions must not sleep. > -They may not acquire sleepable locks, > -wait on condition variables, > -perform blocking allocation requests, > -or invoke any other action that might sleep. > +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" > +This macro is deprecated and can be used instead of > +.Fn callout_handle_init > +to assign the default state to the > +.Pq struct callout_handle > +structure when declaring static timeouts. > .Pp > -Each callout structure must be initialized by > -.Fn callout_init , > -.Fn callout_init_mtx , > -.Fn callout_init_rm , > -or > -.Fn callout_init_rw > -before it is passed to any of the other callout functions. > -The > -.Fn callout_init > -function initializes a callout structure in > -.Fa c > -that is not associated with a specific lock. > +.Ft void > +.Fn callout_init "struct callout *c" "int mpsafe" > +This function prepares a > +.Pq struct callout > +structure before it can be used. > +This function should not be used when the callout is pending a timeout. > If the > .Fa mpsafe > -argument is zero, > -the callout structure is not considered to be > -.Dq multi-processor safe ; > -and the Giant lock will be acquired before calling the callout function > -and released when the callout function returns. > +argument is non-zero, the callback function will be running unlocked. > +Else the Giant mutex will be locked before calling the callback function. > .Pp > +.Ft void > +.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" > +This function prepares a > +.Pq struct callout > +structure before it can be used. > +This function should not be used when the callout is pending a timeout. > The > -.Fn callout_init_mtx , > -.Fn callout_init_rm , > -and > -.Fn callout_init_rw > -functions initialize a callout structure in > -.Fa c > -that is associated with a specific lock. > -The lock is specified by the > -.Fa mtx , > -.Fa rm , > -or > -.Fa rw > -parameter. > -The associated lock must be held while stopping or rescheduling the > -callout. > -The callout subsystem acquires the associated lock before calling the > -callout function and releases it after the function returns. > -If the callout was cancelled while the callout subsystem waited for the > -associated lock, > -the callout function is not called, > -and the associated lock is released. > -This ensures that stopping or rescheduling the callout will abort any > -previously scheduled invocation. > -.Pp > -Only regular mutexes may be used with > -.Fn callout_init_mtx ; > -spin mutexes are not supported. > -A sleepable read-mostly lock > -.Po > -one initialized with the > -.Dv RM_SLEEPABLE > -flag > -.Pc > -may not be used with > -.Fn callout_init_rm . > -Similarly, other sleepable lock types such as > -.Xr sx 9 > -and > -.Xr lockmgr 9 > -cannot be used with callouts because sleeping is not permitted in > -the callout subsystem. > -.Pp > -These > +.Fa mtx > +argument should be non-zero and should specify a pointer to a valid > +spinlock type of mutex or a valid regular non-sleepable mutex which > +the callback subsystem should lock before calling the callback > +function. > +Valid > .Fa flags > -may be specified for > -.Fn callout_init_mtx , > -.Fn callout_init_rm , > -or > -.Fn callout_init_rw : > +are: > .Bl -tag -width ".Dv CALLOUT_RETURNUNLOCKED" > .It Dv CALLOUT_RETURNUNLOCKED > -The callout function will release the associated lock itself, > -so the callout subsystem should not attempt to unlock it > -after the callout function returns. > -.It Dv CALLOUT_SHAREDLOCK > -The lock is only acquired in read mode when running the callout handler. > -This flag is ignored by > -.Fn callout_init_mtx . > +It is assumed that the callout function has released the specified > +mutex before returning. > +Else the callout subsystem will release the specified mutex after the > +callout function has returned. > .El > .Pp > -The function > -.Fn callout_stop > -cancels a callout > -.Fa c > -if it is currently pending. > -If the callout is pending, then > -.Fn callout_stop > -returns a non-zero value. > -If the callout is not set, > -has already been serviced, > -or is currently being serviced, > -then zero will be returned. > -If the callout has an associated lock, > -then that lock must be held when this function is called. > -.Pp > -The function > -.Fn callout_drain > -is identical to > -.Fn callout_stop > -except that it will wait for the callout > -.Fa c > -to complete if it is already in progress. > -This function MUST NOT be called while holding any > -locks on which the callout might block, or deadlock will result. > -Note that if the callout subsystem has already begun processing this > -callout, then the callout function may be invoked before > -.Fn callout_drain > -returns. > -However, the callout subsystem does guarantee that the callout will be > -fully stopped before > -.Fn callout_drain > -returns. > -.Pp > -The > -.Fn callout_reset > -and > -.Fn callout_schedule > -function families schedule a future function invocation for callout > -.Fa c . > -If > -.Fa c > -already has a pending callout, > -it is cancelled before the new invocation is scheduled. > -These functions return a non-zero value if a pending callout was cancelled > -and zero if there was no pending callout. > -If the callout has an associated lock, > -then that lock must be held when any of these functions are called. > +.Ft void > +.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" > +This function is the same like the > +.Fn callout_init_mtx > +function except it accepts a read-mostly type of lock. > +The read-mostly lock must not be initialised with the > +.Dv RM_SLEEPABLE > +flag. > .Pp > -The time at which the callout function will be invoked is determined by > -either the > -.Fa ticks > -argument or the > -.Fa sbt , > -.Fa pr , > -and > -.Fa flags > -arguments. > -When > -.Fa ticks > -is used, > -the callout is scheduled to execute after > +.Ft void > +.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" > +This function is the same like the > +.Fn callout_init_mtx > +function except it accepts a reader-writer type of lock. > +.Sh SCHEDULING CALLOUTS > +.Ft struct callout_handle > +.Fn timeout "timeout_t *func" "void *arg" "int ticks" > +This function is deprecated and schedules a call to the function given by the argument > +.Fa func > +to take place after > .Fa ticks Ns No /hz > seconds. > Non-positive values of > .Fa ticks > are silently converted to the value > .Sq 1 . > -.Pp > The > -.Fa sbt , > -.Fa pr , > -and > -.Fa flags > -arguments provide more control over the scheduled time including > -support for higher resolution times, > -specifying the precision of the scheduled time, > -and setting an absolute deadline instead of a relative timeout. > -The callout is scheduled to execute in a time window which begins at > -the time specified in > +.Fa func > +argument should be a valid pointer to a function that takes a single > +.Fa void * > +argument. > +Upon invocation, the > +.Fa func > +function will receive > +.Fa arg > +as its only argument. > +The Giant lock is locked when the > +.Fa arg > +function is invoked and should not be unlocked by this function. > +The returned value from > +.Fn timeout > +is a > +.Ft struct callout_handle > +structure which can be used in conjunction with the > +.Fn untimeout > +function to request that a scheduled timeout be cancelled. > +As handles are recycled by the system, it is possible, although unlikely, > +that a handle from one invocation of > +.Fn timeout > +may match the handle of another invocation of > +.Fn timeout > +if both calls used the same function pointer and argument, and the first > +timeout is expired or canceled before the second call. > +Please ensure that the function and argument pointers are unique when using this function. > +.Pp > +.Ft int > +.Fn callout_reset "struct callout *c" "int ticks" "callout_func_t *func" "void *arg" > +This function is used to schedule or re-schedule a callout. > +This function at first stops the callout given by the > +.Fa c > +argument, if any. > +Then it will start the callout given by the > +.Fa c > +argument. > +The relative time until the timeout callback happens is given by the > +.Fa ticks > +argument. > +The number of ticks in a second is defined by > +.Dv hz > +and can vary from system to system. > +This function returns a non-zero value if the given callout was pending and > +the callback function was prevented from being called. > +Else a value of zero is returned. > +If a lock is associated with the callout given by the > +.Fa c > +argument and it is exclusivly locked when this function is called this > +function will always ensure that previous callback function, if any, > +is never reached. > +In other words the callout will be atomically restarted. > +Else there is no such guarantee. > +The callback function is given by the > +.Fa func > +argument and its function argument is given by the > +.Fa arg > +argument. > +.Pp > +.Ft int > +.Fn callout_reset_curcpu "struct callout *c" "int ticks" "callout_func_t *func" \ > +"void *arg" > +This function works the same like the > +.Fn callout_reset > +function except the callback function given by the > +.Fa func > +argument will be executed on the same CPU which called this function. > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > +.Fa func > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_reset_on "struct callout *c" "int ticks" "callout_func_t *func" \ > +"void *arg" "int cpu" > +This function works the same like the > +.Fn callout_reset > +function except the callback function given by the > +.Fa func > +argument will be executed on the CPU given by the > +.Fa cpu > +argument. > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > +.Fa func > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" > +This function works the same like the > +.Fn callout_reset > +function except the relative or absolute time after which the timeout > +callback should happen is given by the > .Fa sbt > -and extends for the amount of time specified in > -.Fa pr . > -If > +argument and extends for the amount of time specified in the > +.Fa pr > +argument. > +This function is used when you need high precision timeouts. > +If the > .Fa sbt > -specifies a time in the past, > +argument specifies a time in the past, > the window is adjusted to start at the current time. > A non-zero value for > .Fa pr > allows the callout subsystem to coalesce callouts scheduled close to each > other into fewer timer interrupts, > reducing processing overhead and power consumption. > -These > +The > .Fa flags > -may be specified to adjust the interpretation of > +argument may be non-zero to adjust the interpretation of the > .Fa sbt > -and > -.Fa pr : > +and the > +.Fa pr > +arguments: > .Bl -tag -width ".Dv C_DIRECT_EXEC" > .It Dv C_ABSOLUTE > Handle the > .Fa sbt > argument as an absolute time since boot. > -By default, > +By default, the > .Fa sbt > -is treated as a relative amount of time, > +argument is treated like a relative amount of time, > similar to > .Fa ticks . > .It Dv C_DIRECT_EXEC > @@ -347,7 +301,7 @@ Callout functions run in this context ma > and should be as small as possible because they run with absolute priority. > .It Fn C_PREL > Specifies relative event time precision as binary logarithm of time interval > -divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. > +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4 and so on. > Note that the larger of > .Fa pr > or this value is used as the length of the time window. > @@ -360,65 +314,215 @@ Align the timeouts to > calls if possible. > .El > .Pp > -The > -.Fn callout_reset > -functions accept a > +.Ft int > +.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt > +function except the callback function given by the > .Fa func > -argument which identifies the function to be called when the time expires. > -It must be a pointer to a function that takes a single > -.Fa void * > +argument will be executed on the same CPU which called this function. > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > +.Fa func > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "callout_func_t *func" "void *arg" "int cpu" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt > +function except the callback function given by the > +.Fa func > +argument will be executed on the CPU given by the > +.Fa cpu > argument. > -Upon invocation, > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > .Fa func > -will receive > -.Fa arg > -as its only argument. > -The > -.Fn callout_schedule > -functions reuse the > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_schedule "struct callout *c" "int ticks" > +This function works the same like the > +.Fn callout_reset > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_curcpu "struct callout *c" "int ticks" > +This function works the same like the > +.Fn callout_reset_curcpu > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" > +This function works the same like the > +.Fn callout_reset_on > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt_curcpu > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "int cpu" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt_on > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Sh CHECKING THE STATE OF CALLOUTS > +.Ft int > +.Fn callout_pending "struct callout *c" > +This function returns non-zero if the callout pointed to by the > +.Fa c > +argument is pending for callback. > +Else this function returns zero. > +This function returns zero when inside the callout function if the > +callout is not re-scheduled. > +.Pp > +.Ft int > +.Fn callout_active "struct callout *c" > +This function is deprecated and returns non-zero if the callout > +pointed to by the > +.Fa c > +argument was scheduled in the past. > +Else this function returns zero. > +This function also returns zero after the > +.Fn callout_deactivate > +or the > +.Fn callout_stop > +or the > +.Fn callout_drain > +or the > +.Fn callout_drain_async > +function is called on the same callout as given by the > +.Fa c > +argument. > +.Pp > +.Ft void > +.Fn callout_deactivate "struct callout *c" > +This function is deprecated and ensures that subsequent calls to the > +.Fn callout_activate > +function returns zero until the callout is scheduled again. > +.Sh STOPPING CALLOUTS > +.Ft void > +.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" > +This function is deprecated and cancels the timeout associated with the > +.Fa handle > +argument using the function pointed to by the > .Fa func > -and > +argument and having the > .Fa arg > -arguments from the previous callout. > -Note that one of the > -.Fn callout_reset > -functions must always be called to initialize > +arguments to validate the handle. > +If the handle does not correspond to a timeout with > +the function > .Fa func > -and > +taking the argument > .Fa arg > -before one of the > -.Fn callout_schedule > -functions can be used. > +no action is taken. The > +.Fa handle > +must be initialised by a previous call to > +.Fn timeout , > +.Fn callout_handle_init > +or assigned the value of > +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" > +before being passed to > +.Fn untimeout . > +The behavior of calling > +.Fn untimeout > +with an uninitialised handle > +is undefined. > .Pp > -The callout subsystem provides a softclock thread for each CPU in the system. > -Callouts are assigned to a single CPU and are executed by the softclock thread > -for that CPU. > -Initially, > -callouts are assigned to CPU 0. > -The > -.Fn callout_reset_on , > -.Fn callout_reset_sbt_on , > -.Fn callout_schedule_on > -and > -.Fn callout_schedule_sbt_on > -functions assign the callout to CPU > -.Fa cpu . > -The > -.Fn callout_reset_curcpu , > -.Fn callout_reset_sbt_curpu , > -.Fn callout_schedule_curcpu > -and > -.Fn callout_schedule_sbt_curcpu > -functions assign the callout to the current CPU. > -The > -.Fn callout_reset , > -.Fn callout_reset_sbt , > -.Fn callout_schedule > -and > -.Fn callout_schedule_sbt > -functions schedule the callout to execute in the softclock thread of the CPU > -to which it is currently assigned. > +.Ft int > +.Fn callout_stop "struct callout *c" > +This function is used to stop a timeout function invocation associated with the callout pointed to by the > +.Fa c > +argument, in a non-blocking fashion. > +This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialised. > +This function returns a non-zero value if the given callout was pending and > +the callback function was prevented from being called. > +Else a value of zero is returned. > +If a lock is associated with the callout given by the > +.Fa c > +argument and it is exclusivly locked when this function is called, the > +.Fn callout_stop > +function will always ensure that the callback function is never reached. > +In other words the callout will be atomically stopped. > +Else there is no such guarantee. > +.Sh DRAINING CALLOUTS > +.Ft int > +.Fn callout_drain "struct callout *c" > +This function works the same like the > +.Fn callout_stop > +function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the > +.Fa c > +argument inside the callout subsystem before it returns. > +Also this function ensures that the lock, if any, associated with the > +callout is no longer being used. > +When this function returns, it is safe to free the callout structure pointed to by the > +.Fa c > +argument. > .Pp > +.Ft int > +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" > +This function is non-blocking and works the same like the > +.Fn callout_stop > +function except if it returns non-zero it means the callback function pointed to by the > +.Fa fn > +argument will be called back with the > +.Fa arg > +argument when all references to the callout pointed to by the > +.Fa c > +argument are gone. > +If this function returns zero, it is safe to free the callout structure pointed to by the > +.Fa c > +argument right away. > +.Sh CALLOUT FUNCTION RESTRICTIONS > +Callout functions must not sleep. > +They may not acquire sleepable locks, wait on condition variables, > +perform blocking allocation requests, or invoke any other action that > +might sleep. > +.Sh CALLOUT SUBSYSTEM INTERNALS > +The callout subsystem has its own set of spinlocks to protect its internal state. > +The callout subsystem provides a softclock thread for each CPU in the > +system. > +Callouts are assigned to a single CPU and are executed by the > +softclock thread for that CPU. > +Initially, callouts are assigned to CPU 0. > Softclock threads are not pinned to their respective CPUs by default. > The softclock thread for CPU 0 can be pinned to CPU 0 by setting the > .Va kern.pin_default_swi > @@ -427,50 +531,7 @@ Softclock threads for CPUs other than ze > respective CPUs by setting the > .Va kern.pin_pcpu_swi > loader tunable to a non-zero value. > -.Pp > -The macros > -.Fn callout_pending , > -.Fn callout_active > -and > -.Fn callout_deactivate > -provide access to the current state of the callout. > -The > -.Fn callout_pending > -macro checks whether a callout is > -.Em pending ; > -a callout is considered > -.Em pending > -when a timeout has been set but the time has not yet arrived. > -Note that once the timeout time arrives and the callout subsystem > -starts to process this callout, > -.Fn callout_pending > -will return > -.Dv FALSE > -even though the callout function may not have finished > -.Pq or even begun > -executing. > -The > -.Fn callout_active > -macro checks whether a callout is marked as > -.Em active , > -and the > -.Fn callout_deactivate > -macro clears the callout's > -.Em active > -flag. > -The callout subsystem marks a callout as > -.Em active > -when a timeout is set and it clears the > -.Em active > -flag in > -.Fn callout_stop > -and > -.Fn callout_drain , > -but it > -.Em does not > -clear it when a callout expires normally via the execution of the > -callout function. > -.Ss "Avoiding Race Conditions" > +.Sh "AVOIDING RACE CONDITIONS" > The callout subsystem invokes callout functions from its own thread > context. > Without some kind of synchronization, > @@ -487,7 +548,7 @@ synchronization concerns. > The first approach is preferred as it is the simplest: > .Bl -enum -offset indent > .It > -Callouts can be associated with a specific lock when they are initialized > +Callouts can be associated with a specific lock when they are initialised > by > .Fn callout_init_mtx , > .Fn callout_init_rm , > @@ -508,7 +569,7 @@ or > .Fn callout_schedule > functions to provide this safety. > .Pp > -A callout initialized via > +A callout initialised via > .Fn callout_init > with > .Fa mpsafe > @@ -531,9 +592,8 @@ function families > .Pc > indicates whether or not the callout was removed. > If it is known that the callout was set and the callout function has > -not yet executed, then a return value of > -.Dv FALSE > -indicates that the callout function is about to be called. > +not yet executed, then a return value of zero indicates that the > +callout function is about to be called. > For example: > .Bd -literal -offset indent > if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { > @@ -589,16 +649,14 @@ The callout function should first check > .Em pending > flag and return without action if > .Fn callout_pending > -returns > -.Dv TRUE . > +returns non-zero. > This indicates that the callout was rescheduled using > .Fn callout_reset > just before the callout function was invoked. > If > .Fn callout_active > -returns > -.Dv FALSE > -then the callout function should also return without action. > +returns zero then the callout function should also return without > +action. > This indicates that the callout has been stopped. > Finally, the callout function should call > .Fn callout_deactivate > @@ -668,129 +726,13 @@ a callout should always be drained prior > or releasing the storage for the callout structure. > .Sh LEGACY API > .Bf Sy > -The functions below are a legacy API that will be removed in a future release. > -New code should not use these routines. > -.Ef > -.Pp > -The function > -.Fn timeout > -schedules a call to the function given by the argument > -.Fa func > -to take place after > -.Fa ticks Ns No /hz > -seconds. > -Non-positive values of > -.Fa ticks > -are silently converted to the value > -.Sq 1 . > -.Fa func > -should be a pointer to a function that takes a > -.Fa void * > -argument. > -Upon invocation, > -.Fa func > -will receive > -.Fa arg > -as its only argument. > -The return value from > +The > .Fn timeout > -is a > -.Ft struct callout_handle > -which can be used in conjunction with the > -.Fn untimeout > -function to request that a scheduled timeout be canceled. > -.Pp > -The function > -.Fn callout_handle_init > -can be used to initialize a handle to a state which will cause > -any calls to > -.Fn untimeout > -with that handle to return with no side > -effects. > -.Pp > -Assigning a callout handle the value of > -.Fn CALLOUT_HANDLE_INITIALIZER > -performs the same function as > -.Fn callout_handle_init > -and is provided for use on statically declared or global callout handles. > -.Pp > -The function > -.Fn untimeout > -cancels the timeout associated with > -.Fa handle > -using the > -.Fa func > and > -.Fa arg > -arguments to validate the handle. > -If the handle does not correspond to a timeout with > -the function > -.Fa func > -taking the argument > -.Fa arg > -no action is taken. > -.Fa handle > -must be initialized by a previous call to > -.Fn timeout , > -.Fn callout_handle_init , > -or assigned the value of > -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" > -before being passed to > -.Fn untimeout . > -The behavior of calling > .Fn untimeout > -with an uninitialized handle > -is undefined. > -.Pp > -As handles are recycled by the system, it is possible (although unlikely) > -that a handle from one invocation of > -.Fn timeout > -may match the handle of another invocation of > -.Fn timeout > -if both calls used the same function pointer and argument, and the first > -timeout is expired or canceled before the second call. > -The timeout facility offers O(1) running time for > -.Fn timeout > -and > -.Fn untimeout . > -Timeouts are executed from > -.Fn softclock > -with the > -.Va Giant > -lock held. > -Thus they are protected from re-entrancy. > -.Sh RETURN VALUES > -The > -.Fn callout_active > -macro returns the state of a callout's > -.Em active > -flag. > -.Pp > -The > -.Fn callout_pending > -macro returns the state of a callout's > -.Em pending > -flag. > -.Pp > -The > -.Fn callout_reset > -and > -.Fn callout_schedule > -function families return non-zero if the callout was pending before the new > -function invocation was scheduled. > -.Pp > -The > -.Fn callout_stop > -and > -.Fn callout_drain > -functions return non-zero if the callout was still pending when it was > -called or zero otherwise. > -The > -.Fn timeout > -function returns a > -.Ft struct callout_handle > -that can be passed to > -.Fn untimeout . > +functions are a legacy API that will be removed in a future release. > +New code should not use these routines. > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > From owner-svn-src-all@FreeBSD.ORG Mon Jan 19 22:22:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0910480D; Mon, 19 Jan 2015 22:22:36 +0000 (UTC) Received: from mail-wi0-x229.google.com (mail-wi0-x229.google.com [IPv6:2a00:1450:400c:c05::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6386A1F0; Mon, 19 Jan 2015 22:22:35 +0000 (UTC) Received: by mail-wi0-f169.google.com with SMTP id bs8so19717787wib.0; Mon, 19 Jan 2015 14:22:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=45UDXa6DzCoX4I9C/z34AOPh4UEKLoHjNm1oU9VtQGM=; b=wg/e16sp2imSStKET/v7qXUwBM1wyvtWeuBXBFQxKhHEAUcXmV3C2l7oHIgESiAbje j8qjrjbPl5sZeX6EI/kd9rg7tWS5tEh3nSbQzTbZjYoxCuDhMWum20J+Jt3HvhXn4tLn 3VG2EG2tIgGxmA35UhCE4l/2ncvT+pstuBrO2ck1G8HH+0kkAc8BQQ7Mhjg9/oyj2BAU KfFZA37JV8cyIk8/lZUvi5rnKxr1VXkKZWAXBwr9U6jVERq4t5UnhRzO+vOkRTnsBho6 O4YiGhUq3O6BcbRkpGOWDLYOBzMTy4T2TyO8/OD+cPFzUUleLGZLqE/E5uJ2FXVBBKpA YypQ== MIME-Version: 1.0 X-Received: by 10.180.80.163 with SMTP id s3mr39162973wix.59.1421706153864; Mon, 19 Jan 2015 14:22:33 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 19 Jan 2015 14:22:33 -0800 (PST) In-Reply-To: References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Mon, 19 Jan 2015 14:22:33 -0800 X-Google-Sender-Auth: kfLwCYfQ6429D8Z_TFTJ6h51Zg0 Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Jan 2015 22:22:36 -0000 Yeah, it looks like you set c_cpu to timeout_cpu in _callout_init_locked(), but then you only handle the case of the CPU being changed in certain circumstances. You aren't handling the CPU being initialised when the callout is first added. And, callout_restart_async() calls callout_lock(), which calls CC_LOCK() on the callout CPU, which initially is zero. Then, it never seems to be 'moved' into the correct CPU, even though it's being called with a CPU id. So, if I am reading this all correctly, you aren't really handling multi CPU callwheels at all. ;) In my instance, I'm seeing quite a lot of lock contention between the userland threads, the network RX threads and the clock thread, all contending on a single callout wheel being used for TCP timers. One of the early goals for fixing up the RSS stuff in -HEAD was to make per-CPU (Well, per-RSS-bucket really) TCP timers not contend with the NIC RX processing path, and now it does. :( -adrian On 19 January 2015 at 13:59, Adrian Chadd wrote: > Hi, > > Would you please check what the results of this are with CPU specific > callwheels? > > I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on > ixgbe) and with this setup, the per-CPU TCP callwheel stuff is > enabled. But all the callwheels are now back on clock(0) and so is the > lock contention. :( > > Thanks, > > > > -adrian > > > On 15 January 2015 at 07:32, Hans Petter Selasky wrote: >> Author: hselasky >> Date: Thu Jan 15 15:32:30 2015 >> New Revision: 277213 >> URL: https://svnweb.freebsd.org/changeset/base/277213 >> >> Log: >> Major callout subsystem cleanup and rewrite: >> - Close a migration race where callout_reset() failed to set the >> CALLOUT_ACTIVE flag. >> - Callout callback functions are now allowed to be protected by >> spinlocks. >> - Switching the callout CPU number cannot always be done on a >> per-callout basis. See the updated timeout(9) manual page for more >> information. >> - The timeout(9) manual page has been updated to reflect how all the >> functions inside the callout API are working. The manual page has >> been made function oriented to make it easier to deduce how each of >> the functions making up the callout API are working without having >> to first read the whole manual page. Group all functions into a >> handful of sections which should give a quick top-level overview >> when the different functions should be used. >> - The CALLOUT_SHAREDLOCK flag and its functionality has been removed >> to reduce the complexity in the callout code and to avoid problems >> about atomically stopping callouts via callout_stop(). If someone >> needs it, it can be re-added. From my quick grep there are no >> CALLOUT_SHAREDLOCK clients in the kernel. >> - A new callout API function named "callout_drain_async()" has been >> added. See the updated timeout(9) manual page for a complete >> description. >> - Update the callout clients in the "kern/" folder to use the callout >> API properly, like cv_timedwait(). Previously there was some custom >> sleepqueue code in the callout subsystem, which has been removed, >> because we now allow callouts to be protected by spinlocks. This >> allows us to tear down the callout like done with regular mutexes, >> and a "td_slpmutex" has been added to "struct thread" to atomically >> teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and >> "SWT_SLEEPQTIMO" states can now be completely removed. Currently >> they are marked as available and will be cleaned up in a follow up >> commit. >> - Bump the __FreeBSD_version to indicate kernel modules need >> recompilation. >> - There has been several reports that this patch "seems to squash a >> serious bug leading to a callout timeout and panic". >> >> Kernel build testing: all architectures were built >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D1438 >> Sponsored by: Mellanox Technologies >> Reviewed by: jhb, adrian, sbruno and emaste >> >> Modified: >> head/share/man/man9/Makefile >> head/share/man/man9/timeout.9 >> head/sys/kern/init_main.c >> head/sys/kern/kern_condvar.c >> head/sys/kern/kern_lock.c >> head/sys/kern/kern_switch.c >> head/sys/kern/kern_synch.c >> head/sys/kern/kern_thread.c >> head/sys/kern/kern_timeout.c >> head/sys/kern/subr_sleepqueue.c >> head/sys/ofed/include/linux/completion.h >> head/sys/sys/_callout.h >> head/sys/sys/callout.h >> head/sys/sys/param.h >> head/sys/sys/proc.h >> >> Modified: head/share/man/man9/Makefile >> ============================================================================== >> --- head/share/man/man9/Makefile Thu Jan 15 14:47:48 2015 (r277212) >> +++ head/share/man/man9/Makefile Thu Jan 15 15:32:30 2015 (r277213) >> @@ -1570,6 +1570,7 @@ MLINKS+=timeout.9 callout.9 \ >> timeout.9 callout_active.9 \ >> timeout.9 callout_deactivate.9 \ >> timeout.9 callout_drain.9 \ >> + timeout.9 callout_drain_async.9 \ >> timeout.9 callout_handle_init.9 \ >> timeout.9 callout_init.9 \ >> timeout.9 callout_init_mtx.9 \ >> >> Modified: head/share/man/man9/timeout.9 >> ============================================================================== >> --- head/share/man/man9/timeout.9 Thu Jan 15 14:47:48 2015 (r277212) >> +++ head/share/man/man9/timeout.9 Thu Jan 15 15:32:30 2015 (r277213) >> @@ -29,13 +29,14 @@ >> .\" >> .\" $FreeBSD$ >> .\" >> -.Dd October 8, 2014 >> +.Dd January 14, 2015 >> .Dt TIMEOUT 9 >> .Os >> .Sh NAME >> .Nm callout_active , >> .Nm callout_deactivate , >> .Nm callout_drain , >> +.Nm callout_drain_async , >> .Nm callout_handle_init , >> .Nm callout_init , >> .Nm callout_init_mtx , >> @@ -63,279 +64,232 @@ >> .In sys/systm.h >> .Bd -literal >> typedef void timeout_t (void *); >> +typedef void callout_func_t (void *); >> .Ed >> -.Ft int >> -.Fn callout_active "struct callout *c" >> -.Ft void >> -.Fn callout_deactivate "struct callout *c" >> -.Ft int >> -.Fn callout_drain "struct callout *c" >> -.Ft void >> -.Fn callout_handle_init "struct callout_handle *handle" >> -.Bd -literal >> -struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); >> -.Ed >> -.Ft void >> -.Fn callout_init "struct callout *c" "int mpsafe" >> -.Ft void >> -.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" >> -.Ft void >> -.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" >> -.Ft void >> -.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" >> -.Ft int >> -.Fn callout_pending "struct callout *c" >> -.Ft int >> -.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" >> -.Ft int >> -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ >> -"void *arg" >> -.Ft int >> -.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ >> -"void *arg" "int cpu" >> -.Ft int >> -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ >> -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" >> -.Ft int >> -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ >> -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" >> -.Ft int >> -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ >> -"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" >> -.Ft int >> -.Fn callout_schedule "struct callout *c" "int ticks" >> -.Ft int >> -.Fn callout_schedule_curcpu "struct callout *c" "int ticks" >> -.Ft int >> -.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" >> -.Ft int >> -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ >> -"sbintime_t pr" "int flags" >> -.Ft int >> -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ >> -"sbintime_t pr" "int flags" >> -.Ft int >> -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ >> -"sbintime_t pr" "int cpu" "int flags" >> -.Ft int >> -.Fn callout_stop "struct callout *c" >> -.Ft struct callout_handle >> -.Fn timeout "timeout_t *func" "void *arg" "int ticks" >> -.Ft void >> -.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" >> .Sh DESCRIPTION >> The >> .Nm callout >> API is used to schedule a call to an arbitrary function at a specific >> -time in the future. >> -Consumers of this API are required to allocate a callout structure >> +time in the future in a single-shot fashion. >> +Consumers of this API are required to allocate a >> .Pq struct callout >> -for each pending function invocation. >> -This structure stores state about the pending function invocation including >> -the function to be called and the time at which the function should be invoked. >> -Pending function calls can be cancelled or rescheduled to a different time. >> -In addition, >> -a callout structure may be reused to schedule a new function call after a >> -scheduled call is completed. >> -.Pp >> -Callouts only provide a single-shot mode. >> -If a consumer requires a periodic timer, >> -it must explicitly reschedule each function call. >> -This is normally done by rescheduling the subsequent call within the called >> -function. >> +structure for each pending function invocation. >> +The >> +.Pq struct callout >> +structure stores the full state about any pending function call and >> +should be drained by a call to >> +.Fn callout_drain >> +or >> +.Fn callout_drain_async >> +before freeing. >> +.Sh INITIALISATION >> +.Ft void >> +.Fn callout_handle_init "struct callout_handle *handle" >> +This function is deprecated and is used to prepare a >> +.Pq struct callout_handle >> +structure before it can be used the first time. >> +If this function is called on a pending timeout, the pending timeout >> +cannot be cancelled and the >> +.Fn untimeout >> +function will return as if there was no timeout pending. >> .Pp >> -Callout functions must not sleep. >> -They may not acquire sleepable locks, >> -wait on condition variables, >> -perform blocking allocation requests, >> -or invoke any other action that might sleep. >> +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" >> +This macro is deprecated and can be used instead of >> +.Fn callout_handle_init >> +to assign the default state to the >> +.Pq struct callout_handle >> +structure when declaring static timeouts. >> .Pp >> -Each callout structure must be initialized by >> -.Fn callout_init , >> -.Fn callout_init_mtx , >> -.Fn callout_init_rm , >> -or >> -.Fn callout_init_rw >> -before it is passed to any of the other callout functions. >> -The >> -.Fn callout_init >> -function initializes a callout structure in >> -.Fa c >> -that is not associated with a specific lock. >> +.Ft void >> +.Fn callout_init "struct callout *c" "int mpsafe" >> +This function prepares a >> +.Pq struct callout >> +structure before it can be used. >> +This function should not be used when the callout is pending a timeout. >> If the >> .Fa mpsafe >> -argument is zero, >> -the callout structure is not considered to be >> -.Dq multi-processor safe ; >> -and the Giant lock will be acquired before calling the callout function >> -and released when the callout function returns. >> +argument is non-zero, the callback function will be running unlocked. >> +Else the Giant mutex will be locked before calling the callback function. >> .Pp >> +.Ft void >> +.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" >> +This function prepares a >> +.Pq struct callout >> +structure before it can be used. >> +This function should not be used when the callout is pending a timeout. >> The >> -.Fn callout_init_mtx , >> -.Fn callout_init_rm , >> -and >> -.Fn callout_init_rw >> -functions initialize a callout structure in >> -.Fa c >> -that is associated with a specific lock. >> -The lock is specified by the >> -.Fa mtx , >> -.Fa rm , >> -or >> -.Fa rw >> -parameter. >> -The associated lock must be held while stopping or rescheduling the >> -callout. >> -The callout subsystem acquires the associated lock before calling the >> -callout function and releases it after the function returns. >> -If the callout was cancelled while the callout subsystem waited for the >> -associated lock, >> -the callout function is not called, >> -and the associated lock is released. >> -This ensures that stopping or rescheduling the callout will abort any >> -previously scheduled invocation. >> -.Pp >> -Only regular mutexes may be used with >> -.Fn callout_init_mtx ; >> -spin mutexes are not supported. >> -A sleepable read-mostly lock >> -.Po >> -one initialized with the >> -.Dv RM_SLEEPABLE >> -flag >> -.Pc >> -may not be used with >> -.Fn callout_init_rm . >> -Similarly, other sleepable lock types such as >> -.Xr sx 9 >> -and >> -.Xr lockmgr 9 >> -cannot be used with callouts because sleeping is not permitted in >> -the callout subsystem. >> -.Pp >> -These >> +.Fa mtx >> +argument should be non-zero and should specify a pointer to a valid >> +spinlock type of mutex or a valid regular non-sleepable mutex which >> +the callback subsystem should lock before calling the callback >> +function. >> +Valid >> .Fa flags >> -may be specified for >> -.Fn callout_init_mtx , >> -.Fn callout_init_rm , >> -or >> -.Fn callout_init_rw : >> +are: >> .Bl -tag -width ".Dv CALLOUT_RETURNUNLOCKED" >> .It Dv CALLOUT_RETURNUNLOCKED >> -The callout function will release the associated lock itself, >> -so the callout subsystem should not attempt to unlock it >> -after the callout function returns. >> -.It Dv CALLOUT_SHAREDLOCK >> -The lock is only acquired in read mode when running the callout handler. >> -This flag is ignored by >> -.Fn callout_init_mtx . >> +It is assumed that the callout function has released the specified >> +mutex before returning. >> +Else the callout subsystem will release the specified mutex after the >> +callout function has returned. >> .El >> .Pp >> -The function >> -.Fn callout_stop >> -cancels a callout >> -.Fa c >> -if it is currently pending. >> -If the callout is pending, then >> -.Fn callout_stop >> -returns a non-zero value. >> -If the callout is not set, >> -has already been serviced, >> -or is currently being serviced, >> -then zero will be returned. >> -If the callout has an associated lock, >> -then that lock must be held when this function is called. >> -.Pp >> -The function >> -.Fn callout_drain >> -is identical to >> -.Fn callout_stop >> -except that it will wait for the callout >> -.Fa c >> -to complete if it is already in progress. >> -This function MUST NOT be called while holding any >> -locks on which the callout might block, or deadlock will result. >> -Note that if the callout subsystem has already begun processing this >> -callout, then the callout function may be invoked before >> -.Fn callout_drain >> -returns. >> -However, the callout subsystem does guarantee that the callout will be >> -fully stopped before >> -.Fn callout_drain >> -returns. >> -.Pp >> -The >> -.Fn callout_reset >> -and >> -.Fn callout_schedule >> -function families schedule a future function invocation for callout >> -.Fa c . >> -If >> -.Fa c >> -already has a pending callout, >> -it is cancelled before the new invocation is scheduled. >> -These functions return a non-zero value if a pending callout was cancelled >> -and zero if there was no pending callout. >> -If the callout has an associated lock, >> -then that lock must be held when any of these functions are called. >> +.Ft void >> +.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" >> +This function is the same like the >> +.Fn callout_init_mtx >> +function except it accepts a read-mostly type of lock. >> +The read-mostly lock must not be initialised with the >> +.Dv RM_SLEEPABLE >> +flag. >> .Pp >> -The time at which the callout function will be invoked is determined by >> -either the >> -.Fa ticks >> -argument or the >> -.Fa sbt , >> -.Fa pr , >> -and >> -.Fa flags >> -arguments. >> -When >> -.Fa ticks >> -is used, >> -the callout is scheduled to execute after >> +.Ft void >> +.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" >> +This function is the same like the >> +.Fn callout_init_mtx >> +function except it accepts a reader-writer type of lock. >> +.Sh SCHEDULING CALLOUTS >> +.Ft struct callout_handle >> +.Fn timeout "timeout_t *func" "void *arg" "int ticks" >> +This function is deprecated and schedules a call to the function given by the argument >> +.Fa func >> +to take place after >> .Fa ticks Ns No /hz >> seconds. >> Non-positive values of >> .Fa ticks >> are silently converted to the value >> .Sq 1 . >> -.Pp >> The >> -.Fa sbt , >> -.Fa pr , >> -and >> -.Fa flags >> -arguments provide more control over the scheduled time including >> -support for higher resolution times, >> -specifying the precision of the scheduled time, >> -and setting an absolute deadline instead of a relative timeout. >> -The callout is scheduled to execute in a time window which begins at >> -the time specified in >> +.Fa func >> +argument should be a valid pointer to a function that takes a single >> +.Fa void * >> +argument. >> +Upon invocation, the >> +.Fa func >> +function will receive >> +.Fa arg >> +as its only argument. >> +The Giant lock is locked when the >> +.Fa arg >> +function is invoked and should not be unlocked by this function. >> +The returned value from >> +.Fn timeout >> +is a >> +.Ft struct callout_handle >> +structure which can be used in conjunction with the >> +.Fn untimeout >> +function to request that a scheduled timeout be cancelled. >> +As handles are recycled by the system, it is possible, although unlikely, >> +that a handle from one invocation of >> +.Fn timeout >> +may match the handle of another invocation of >> +.Fn timeout >> +if both calls used the same function pointer and argument, and the first >> +timeout is expired or canceled before the second call. >> +Please ensure that the function and argument pointers are unique when using this function. >> +.Pp >> +.Ft int >> +.Fn callout_reset "struct callout *c" "int ticks" "callout_func_t *func" "void *arg" >> +This function is used to schedule or re-schedule a callout. >> +This function at first stops the callout given by the >> +.Fa c >> +argument, if any. >> +Then it will start the callout given by the >> +.Fa c >> +argument. >> +The relative time until the timeout callback happens is given by the >> +.Fa ticks >> +argument. >> +The number of ticks in a second is defined by >> +.Dv hz >> +and can vary from system to system. >> +This function returns a non-zero value if the given callout was pending and >> +the callback function was prevented from being called. >> +Else a value of zero is returned. >> +If a lock is associated with the callout given by the >> +.Fa c >> +argument and it is exclusivly locked when this function is called this >> +function will always ensure that previous callback function, if any, >> +is never reached. >> +In other words the callout will be atomically restarted. >> +Else there is no such guarantee. >> +The callback function is given by the >> +.Fa func >> +argument and its function argument is given by the >> +.Fa arg >> +argument. >> +.Pp >> +.Ft int >> +.Fn callout_reset_curcpu "struct callout *c" "int ticks" "callout_func_t *func" \ >> +"void *arg" >> +This function works the same like the >> +.Fn callout_reset >> +function except the callback function given by the >> +.Fa func >> +argument will be executed on the same CPU which called this function. >> +A change in the CPU selection can happen if the callout has a lock >> +associated with it and is locked when this function is called. >> +A change in the CPU selection cannot happen if this function is >> +re-scheduled inside a callout function. >> +Else the callback function given by the >> +.Fa func >> +argument will be executed on the same CPU like previously done. >> +.Pp >> +.Ft int >> +.Fn callout_reset_on "struct callout *c" "int ticks" "callout_func_t *func" \ >> +"void *arg" "int cpu" >> +This function works the same like the >> +.Fn callout_reset >> +function except the callback function given by the >> +.Fa func >> +argument will be executed on the CPU given by the >> +.Fa cpu >> +argument. >> +A change in the CPU selection can happen if the callout has a lock >> +associated with it and is locked when this function is called. >> +A change in the CPU selection cannot happen if this function is >> +re-scheduled inside a callout function. >> +Else the callback function given by the >> +.Fa func >> +argument will be executed on the same CPU like previously done. >> +.Pp >> +.Ft int >> +.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ >> +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" >> +This function works the same like the >> +.Fn callout_reset >> +function except the relative or absolute time after which the timeout >> +callback should happen is given by the >> .Fa sbt >> -and extends for the amount of time specified in >> -.Fa pr . >> -If >> +argument and extends for the amount of time specified in the >> +.Fa pr >> +argument. >> +This function is used when you need high precision timeouts. >> +If the >> .Fa sbt >> -specifies a time in the past, >> +argument specifies a time in the past, >> the window is adjusted to start at the current time. >> A non-zero value for >> .Fa pr >> allows the callout subsystem to coalesce callouts scheduled close to each >> other into fewer timer interrupts, >> reducing processing overhead and power consumption. >> -These >> +The >> .Fa flags >> -may be specified to adjust the interpretation of >> +argument may be non-zero to adjust the interpretation of the >> .Fa sbt >> -and >> -.Fa pr : >> +and the >> +.Fa pr >> +arguments: >> .Bl -tag -width ".Dv C_DIRECT_EXEC" >> .It Dv C_ABSOLUTE >> Handle the >> .Fa sbt >> argument as an absolute time since boot. >> -By default, >> +By default, the >> .Fa sbt >> -is treated as a relative amount of time, >> +argument is treated like a relative amount of time, >> similar to >> .Fa ticks . >> .It Dv C_DIRECT_EXEC >> @@ -347,7 +301,7 @@ Callout functions run in this context ma >> and should be as small as possible because they run with absolute priority. >> .It Fn C_PREL >> Specifies relative event time precision as binary logarithm of time interval >> -divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. >> +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4 and so on. >> Note that the larger of >> .Fa pr >> or this value is used as the length of the time window. >> @@ -360,65 +314,215 @@ Align the timeouts to >> calls if possible. >> .El >> .Pp >> -The >> -.Fn callout_reset >> -functions accept a >> +.Ft int >> +.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ >> +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" >> +This function works the same like the >> +.Fn callout_reset_sbt >> +function except the callback function given by the >> .Fa func >> -argument which identifies the function to be called when the time expires. >> -It must be a pointer to a function that takes a single >> -.Fa void * >> +argument will be executed on the same CPU which called this function. >> +A change in the CPU selection can happen if the callout has a lock >> +associated with it and is locked when this function is called. >> +A change in the CPU selection cannot happen if this function is >> +re-scheduled inside a callout function. >> +Else the callback function given by the >> +.Fa func >> +argument will be executed on the same CPU like previously done. >> +.Pp >> +.Ft int >> +.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ >> +"sbintime_t pr" "callout_func_t *func" "void *arg" "int cpu" "int flags" >> +This function works the same like the >> +.Fn callout_reset_sbt >> +function except the callback function given by the >> +.Fa func >> +argument will be executed on the CPU given by the >> +.Fa cpu >> argument. >> -Upon invocation, >> +A change in the CPU selection can happen if the callout has a lock >> +associated with it and is locked when this function is called. >> +A change in the CPU selection cannot happen if this function is >> +re-scheduled inside a callout function. >> +Else the callback function given by the >> .Fa func >> -will receive >> -.Fa arg >> -as its only argument. >> -The >> -.Fn callout_schedule >> -functions reuse the >> +argument will be executed on the same CPU like previously done. >> +.Pp >> +.Ft int >> +.Fn callout_schedule "struct callout *c" "int ticks" >> +This function works the same like the >> +.Fn callout_reset >> +function except it re-uses the callback function and the callback argument >> +already stored in the >> +.Pq struct callout >> +structure. >> +.Pp >> +.Ft int >> +.Fn callout_schedule_curcpu "struct callout *c" "int ticks" >> +This function works the same like the >> +.Fn callout_reset_curcpu >> +function except it re-uses the callback function and the callback argument >> +already stored in the >> +.Pq struct callout >> +structure. >> +.Pp >> +.Ft int >> +.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" >> +This function works the same like the >> +.Fn callout_reset_on >> +function except it re-uses the callback function and the callback argument >> +already stored in the >> +.Pq struct callout >> +structure. >> +.Pp >> +.Ft int >> +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ >> +"sbintime_t pr" "int flags" >> +This function works the same like the >> +.Fn callout_reset_sbt >> +function except it re-uses the callback function and the callback argument >> +already stored in the >> +.Pq struct callout >> +structure. >> +.Pp >> +.Ft int >> +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ >> +"sbintime_t pr" "int flags" >> +This function works the same like the >> +.Fn callout_reset_sbt_curcpu >> +function except it re-uses the callback function and the callback argument >> +already stored in the >> +.Pq struct callout >> +structure. >> +.Pp >> +.Ft int >> +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ >> +"sbintime_t pr" "int cpu" "int flags" >> +This function works the same like the >> +.Fn callout_reset_sbt_on >> +function except it re-uses the callback function and the callback argument >> +already stored in the >> +.Pq struct callout >> +structure. >> +.Sh CHECKING THE STATE OF CALLOUTS >> +.Ft int >> +.Fn callout_pending "struct callout *c" >> +This function returns non-zero if the callout pointed to by the >> +.Fa c >> +argument is pending for callback. >> +Else this function returns zero. >> +This function returns zero when inside the callout function if the >> +callout is not re-scheduled. >> +.Pp >> +.Ft int >> +.Fn callout_active "struct callout *c" >> +This function is deprecated and returns non-zero if the callout >> +pointed to by the >> +.Fa c >> +argument was scheduled in the past. >> +Else this function returns zero. >> +This function also returns zero after the >> +.Fn callout_deactivate >> +or the >> +.Fn callout_stop >> +or the >> +.Fn callout_drain >> +or the >> +.Fn callout_drain_async >> +function is called on the same callout as given by the >> +.Fa c >> +argument. >> +.Pp >> +.Ft void >> +.Fn callout_deactivate "struct callout *c" >> +This function is deprecated and ensures that subsequent calls to the >> +.Fn callout_activate >> +function returns zero until the callout is scheduled again. >> +.Sh STOPPING CALLOUTS >> +.Ft void >> +.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" >> +This function is deprecated and cancels the timeout associated with the >> +.Fa handle >> +argument using the function pointed to by the >> .Fa func >> -and >> +argument and having the >> .Fa arg >> -arguments from the previous callout. >> -Note that one of the >> -.Fn callout_reset >> -functions must always be called to initialize >> +arguments to validate the handle. >> +If the handle does not correspond to a timeout with >> +the function >> .Fa func >> -and >> +taking the argument >> .Fa arg >> -before one of the >> -.Fn callout_schedule >> -functions can be used. >> +no action is taken. The >> +.Fa handle >> +must be initialised by a previous call to >> +.Fn timeout , >> +.Fn callout_handle_init >> +or assigned the value of >> +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" >> +before being passed to >> +.Fn untimeout . >> +The behavior of calling >> +.Fn untimeout >> +with an uninitialised handle >> +is undefined. >> .Pp >> -The callout subsystem provides a softclock thread for each CPU in the system. >> -Callouts are assigned to a single CPU and are executed by the softclock thread >> -for that CPU. >> -Initially, >> -callouts are assigned to CPU 0. >> -The >> -.Fn callout_reset_on , >> -.Fn callout_reset_sbt_on , >> -.Fn callout_schedule_on >> -and >> -.Fn callout_schedule_sbt_on >> -functions assign the callout to CPU >> -.Fa cpu . >> -The >> -.Fn callout_reset_curcpu , >> -.Fn callout_reset_sbt_curpu , >> -.Fn callout_schedule_curcpu >> -and >> -.Fn callout_schedule_sbt_curcpu >> -functions assign the callout to the current CPU. >> -The >> -.Fn callout_reset , >> -.Fn callout_reset_sbt , >> -.Fn callout_schedule >> -and >> -.Fn callout_schedule_sbt >> -functions schedule the callout to execute in the softclock thread of the CPU >> -to which it is currently assigned. >> +.Ft int >> +.Fn callout_stop "struct callout *c" >> +This function is used to stop a timeout function invocation associated with the callout pointed to by the >> +.Fa c >> +argument, in a non-blocking fashion. >> +This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialised. >> +This function returns a non-zero value if the given callout was pending and >> +the callback function was prevented from being called. >> +Else a value of zero is returned. >> +If a lock is associated with the callout given by the >> +.Fa c >> +argument and it is exclusivly locked when this function is called, the >> +.Fn callout_stop >> +function will always ensure that the callback function is never reached. >> +In other words the callout will be atomically stopped. >> +Else there is no such guarantee. >> +.Sh DRAINING CALLOUTS >> +.Ft int >> +.Fn callout_drain "struct callout *c" >> +This function works the same like the >> +.Fn callout_stop >> +function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the >> +.Fa c >> +argument inside the callout subsystem before it returns. >> +Also this function ensures that the lock, if any, associated with the >> +callout is no longer being used. >> +When this function returns, it is safe to free the callout structure pointed to by the >> +.Fa c >> +argument. >> .Pp >> +.Ft int >> +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" >> +This function is non-blocking and works the same like the >> +.Fn callout_stop >> +function except if it returns non-zero it means the callback function pointed to by the >> +.Fa fn >> +argument will be called back with the >> +.Fa arg >> +argument when all references to the callout pointed to by the >> +.Fa c >> +argument are gone. >> +If this function returns zero, it is safe to free the callout structure pointed to by the >> +.Fa c >> +argument right away. >> +.Sh CALLOUT FUNCTION RESTRICTIONS >> +Callout functions must not sleep. >> +They may not acquire sleepable locks, wait on condition variables, >> +perform blocking allocation requests, or invoke any other action that >> +might sleep. >> +.Sh CALLOUT SUBSYSTEM INTERNALS >> +The callout subsystem has its own set of spinlocks to protect its internal state. >> +The callout subsystem provides a softclock thread for each CPU in the >> +system. >> +Callouts are assigned to a single CPU and are executed by the >> +softclock thread for that CPU. >> +Initially, callouts are assigned to CPU 0. >> Softclock threads are not pinned to their respective CPUs by default. >> The softclock thread for CPU 0 can be pinned to CPU 0 by setting the >> .Va kern.pin_default_swi >> @@ -427,50 +531,7 @@ Softclock threads for CPUs other than ze >> respective CPUs by setting the >> .Va kern.pin_pcpu_swi >> loader tunable to a non-zero value. >> -.Pp >> -The macros >> -.Fn callout_pending , >> -.Fn callout_active >> -and >> -.Fn callout_deactivate >> -provide access to the current state of the callout. >> -The >> -.Fn callout_pending >> -macro checks whether a callout is >> -.Em pending ; >> -a callout is considered >> -.Em pending >> -when a timeout has been set but the time has not yet arrived. >> -Note that once the timeout time arrives and the callout subsystem >> -starts to process this callout, >> -.Fn callout_pending >> -will return >> -.Dv FALSE >> -even though the callout function may not have finished >> -.Pq or even begun >> -executing. >> -The >> -.Fn callout_active >> -macro checks whether a callout is marked as >> -.Em active , >> -and the >> -.Fn callout_deactivate >> -macro clears the callout's >> -.Em active >> -flag. >> -The callout subsystem marks a callout as >> -.Em active >> -when a timeout is set and it clears the >> -.Em active >> -flag in >> -.Fn callout_stop >> -and >> -.Fn callout_drain , >> -but it >> -.Em does not >> -clear it when a callout expires normally via the execution of the >> -callout function. >> -.Ss "Avoiding Race Conditions" >> +.Sh "AVOIDING RACE CONDITIONS" >> The callout subsystem invokes callout functions from its own thread >> context. >> Without some kind of synchronization, >> @@ -487,7 +548,7 @@ synchronization concerns. >> The first approach is preferred as it is the simplest: >> .Bl -enum -offset indent >> .It >> -Callouts can be associated with a specific lock when they are initialized >> +Callouts can be associated with a specific lock when they are initialised >> by >> .Fn callout_init_mtx , >> .Fn callout_init_rm , >> @@ -508,7 +569,7 @@ or >> .Fn callout_schedule >> functions to provide this safety. >> .Pp >> -A callout initialized via >> +A callout initialised via >> .Fn callout_init >> with >> .Fa mpsafe >> @@ -531,9 +592,8 @@ function families >> .Pc >> indicates whether or not the callout was removed. >> If it is known that the callout was set and the callout function has >> -not yet executed, then a return value of >> -.Dv FALSE >> -indicates that the callout function is about to be called. >> +not yet executed, then a return value of zero indicates that the >> +callout function is about to be called. >> For example: >> .Bd -literal -offset indent >> if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { >> @@ -589,16 +649,14 @@ The callout function should first check >> .Em pending >> flag and return without action if >> .Fn callout_pending >> -returns >> -.Dv TRUE . >> +returns non-zero. >> This indicates that the callout was rescheduled using >> .Fn callout_reset >> just before the callout function was invoked. >> If >> .Fn callout_active >> -returns >> -.Dv FALSE >> -then the callout function should also return without action. >> +returns zero then the callout function should also return without >> +action. >> This indicates that the callout has been stopped. >> Finally, the callout function should call >> .Fn callout_deactivate >> @@ -668,129 +726,13 @@ a callout should always be drained prior >> or releasing the storage for the callout structure. >> .Sh LEGACY API >> .Bf Sy >> -The functions below are a legacy API that will be removed in a future release. >> -New code should not use these routines. >> -.Ef >> -.Pp >> -The function >> -.Fn timeout >> -schedules a call to the function given by the argument >> -.Fa func >> -to take place after >> -.Fa ticks Ns No /hz >> -seconds. >> -Non-positive values of >> -.Fa ticks >> -are silently converted to the value >> -.Sq 1 . >> -.Fa func >> -should be a pointer to a function that takes a >> -.Fa void * >> -argument. >> -Upon invocation, >> -.Fa func >> -will receive >> -.Fa arg >> -as its only argument. >> -The return value from >> +The >> .Fn timeout >> -is a >> -.Ft struct callout_handle >> -which can be used in conjunction with the >> -.Fn untimeout >> -function to request that a scheduled timeout be canceled. >> -.Pp >> -The function >> -.Fn callout_handle_init >> -can be used to initialize a handle to a state which will cause >> -any calls to >> -.Fn untimeout >> -with that handle to return with no side >> -effects. >> -.Pp >> -Assigning a callout handle the value of >> -.Fn CALLOUT_HANDLE_INITIALIZER >> -performs the same function as >> -.Fn callout_handle_init >> -and is provided for use on statically declared or global callout handles. >> -.Pp >> -The function >> -.Fn untimeout >> -cancels the timeout associated with >> -.Fa handle >> -using the >> -.Fa func >> and >> -.Fa arg >> -arguments to validate the handle. >> -If the handle does not correspond to a timeout with >> -the function >> -.Fa func >> -taking the argument >> -.Fa arg >> -no action is taken. >> -.Fa handle >> -must be initialized by a previous call to >> -.Fn timeout , >> -.Fn callout_handle_init , >> -or assigned the value of >> -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" >> -before being passed to >> -.Fn untimeout . >> -The behavior of calling >> .Fn untimeout >> -with an uninitialized handle >> -is undefined. >> -.Pp >> -As handles are recycled by the system, it is possible (although unlikely) >> -that a handle from one invocation of >> -.Fn timeout >> -may match the handle of another invocation of >> -.Fn timeout >> -if both calls used the same function pointer and argument, and the first >> -timeout is expired or canceled before the second call. >> -The timeout facility offers O(1) running time for >> -.Fn timeout >> -and >> -.Fn untimeout . >> -Timeouts are executed from >> -.Fn softclock >> -with the >> -.Va Giant >> -lock held. >> -Thus they are protected from re-entrancy. >> -.Sh RETURN VALUES >> -The >> -.Fn callout_active >> -macro returns the state of a callout's >> -.Em active >> -flag. >> -.Pp >> -The >> -.Fn callout_pending >> -macro returns the state of a callout's >> -.Em pending >> -flag. >> -.Pp >> -The >> -.Fn callout_reset >> -and >> -.Fn callout_schedule >> -function families return non-zero if the callout was pending before the new >> -function invocation was scheduled. >> -.Pp >> -The >> -.Fn callout_stop >> -and >> -.Fn callout_drain >> -functions return non-zero if the callout was still pending when it was >> -called or zero otherwise. >> -The >> -.Fn timeout >> -function returns a >> -.Ft struct callout_handle >> -that can be passed to >> -.Fn untimeout . >> +functions are a legacy API that will be removed in a future release. >> +New code should not use these routines. >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 02:24:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 253D943F; Tue, 20 Jan 2015 02:24:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1083ED40; Tue, 20 Jan 2015 02:24:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K2O8fM000386; Tue, 20 Jan 2015 02:24:08 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K2O8C0000384; Tue, 20 Jan 2015 02:24:08 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501200224.t0K2O8C0000384@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Tue, 20 Jan 2015 02:24:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277405 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 02:24:09 -0000 Author: gonzo Date: Tue Jan 20 02:24:08 2015 New Revision: 277405 URL: https://svnweb.freebsd.org/changeset/base/277405 Log: Properly clear IRQ status in order to fix "Spurious IRQ" message from AINT. This register is not documented in TRM but that's what linux driver does Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Mon Jan 19 22:18:00 2015 (r277404) +++ head/sys/arm/ti/am335x/am335x_lcd.c Tue Jan 20 02:24:08 2015 (r277405) @@ -150,6 +150,7 @@ __FBSDID("$FreeBSD$"); #define IRQ_SYNC_LOST (1 << 2) #define IRQ_RASTER_DONE (1 << 1) #define IRQ_FRAME_DONE (1 << 0) +#define LCD_END_OF_INT_IND 0x68 #define LCD_CLKC_ENABLE 0x6C #define CLKC_ENABLE_DMA (1 << 2) #define CLKC_ENABLE_LDID (1 << 1) @@ -397,6 +398,8 @@ am335x_lcd_intr(void *arg) if (reg & IRQ_ACB) { /* TODO: Handle ACB */ } + + LCD_WRITE4(sc, LCD_END_OF_INT_IND, 0); } static int From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 03:54:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8C5ADE; Tue, 20 Jan 2015 03:54:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 899349CC; Tue, 20 Jan 2015 03:54:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K3sWYA043258; Tue, 20 Jan 2015 03:54:32 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K3sVNJ043252; Tue, 20 Jan 2015 03:54:31 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501200354.t0K3sVNJ043252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Tue, 20 Jan 2015 03:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277406 - in head/sys: kern sys x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 03:54:32 -0000 Author: neel Date: Tue Jan 20 03:54:30 2015 New Revision: 277406 URL: https://svnweb.freebsd.org/changeset/base/277406 Log: Update the vdso timehands only via tc_windup(). Prior to this change CLOCK_MONOTONIC could go backwards when the timecounter hardware was changed via 'sysctl kern.timecounter.hardware'. This happened because the vdso timehands update was missing the special treatment in tc_windup() when changing timecounters. Reviewed by: kib Modified: head/sys/kern/kern_tc.c head/sys/kern/subr_dummy_vdso_tc.c head/sys/sys/vdso.h head/sys/x86/x86/tsc.c Modified: head/sys/kern/kern_tc.c ============================================================================== --- head/sys/kern/kern_tc.c Tue Jan 20 02:24:08 2015 (r277405) +++ head/sys/kern/kern_tc.c Tue Jan 20 03:54:30 2015 (r277406) @@ -1424,7 +1424,15 @@ sysctl_kern_timecounter_hardware(SYSCTL_ (void)newtc->tc_get_timecount(newtc); timecounter = newtc; - timekeep_push_vdso(); + + /* + * The vdso timehands update is deferred until the next + * 'tc_windup()'. + * + * This is prudent given that 'timekeep_push_vdso()' does not + * use any locking and that it can be called in hard interrupt + * context via 'tc_windup()'. + */ return (0); } return (EINVAL); @@ -1982,7 +1990,6 @@ sysctl_fast_gettime(SYSCTL_HANDLER_ARGS) if (error != 0) return (error); vdso_th_enable = old_vdso_th_enable; - timekeep_push_vdso(); return (0); } SYSCTL_PROC(_kern_timecounter, OID_AUTO, fast_gettime, @@ -2002,7 +2009,7 @@ tc_fill_vdso_timehands(struct vdso_timeh vdso_th->th_counter_mask = th->th_counter->tc_counter_mask; vdso_th->th_offset = th->th_offset; vdso_th->th_boottime = boottimebin; - enabled = cpu_fill_vdso_timehands(vdso_th); + enabled = cpu_fill_vdso_timehands(vdso_th, th->th_counter); if (!vdso_th_enable) enabled = 0; return (enabled); @@ -2024,7 +2031,7 @@ tc_fill_vdso_timehands32(struct vdso_tim *(uint64_t *)&vdso_th32->th_offset.frac[0] = th->th_offset.frac; vdso_th32->th_boottime.sec = boottimebin.sec; *(uint64_t *)&vdso_th32->th_boottime.frac[0] = boottimebin.frac; - enabled = cpu_fill_vdso_timehands32(vdso_th32); + enabled = cpu_fill_vdso_timehands32(vdso_th32, th->th_counter); if (!vdso_th_enable) enabled = 0; return (enabled); Modified: head/sys/kern/subr_dummy_vdso_tc.c ============================================================================== --- head/sys/kern/subr_dummy_vdso_tc.c Tue Jan 20 02:24:08 2015 (r277405) +++ head/sys/kern/subr_dummy_vdso_tc.c Tue Jan 20 03:54:30 2015 (r277406) @@ -33,7 +33,7 @@ __FBSDID("$FreeBSD$"); #include uint32_t -cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th) +cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th, struct timecounter *tc) { return (0); @@ -41,7 +41,8 @@ cpu_fill_vdso_timehands(struct vdso_time #ifdef COMPAT_FREEBSD32 uint32_t -cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32) +cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32, + struct timecounter *tc) { return (0); Modified: head/sys/sys/vdso.h ============================================================================== --- head/sys/sys/vdso.h Tue Jan 20 02:24:08 2015 (r277405) +++ head/sys/sys/vdso.h Tue Jan 20 03:54:30 2015 (r277406) @@ -69,6 +69,8 @@ int __vdso_gettimekeep(struct vdso_timek #ifdef _KERNEL +struct timecounter; + void timekeep_push_vdso(void); uint32_t tc_fill_vdso_timehands(struct vdso_timehands *vdso_th); @@ -81,7 +83,8 @@ uint32_t tc_fill_vdso_timehands(struct v * global sysctl enable override is handled by machine-independed code * after cpu_fill_vdso_timehands() call is made. */ -uint32_t cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th); +uint32_t cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th, + struct timecounter *tc); #define VDSO_TH_NUM 4 @@ -110,7 +113,8 @@ struct vdso_timekeep32 { }; uint32_t tc_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32); -uint32_t cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32); +uint32_t cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32, + struct timecounter *tc); #endif #endif Modified: head/sys/x86/x86/tsc.c ============================================================================== --- head/sys/x86/x86/tsc.c Tue Jan 20 02:24:08 2015 (r277405) +++ head/sys/x86/x86/tsc.c Tue Jan 20 03:54:30 2015 (r277406) @@ -720,21 +720,22 @@ tsc_get_timecount_low_mfence(struct time } uint32_t -cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th) +cpu_fill_vdso_timehands(struct vdso_timehands *vdso_th, struct timecounter *tc) { - vdso_th->th_x86_shift = (int)(intptr_t)timecounter->tc_priv; + vdso_th->th_x86_shift = (int)(intptr_t)tc->tc_priv; bzero(vdso_th->th_res, sizeof(vdso_th->th_res)); - return (timecounter == &tsc_timecounter); + return (tc == &tsc_timecounter); } #ifdef COMPAT_FREEBSD32 uint32_t -cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32) +cpu_fill_vdso_timehands32(struct vdso_timehands32 *vdso_th32, + struct timecounter *tc) { - vdso_th32->th_x86_shift = (int)(intptr_t)timecounter->tc_priv; + vdso_th32->th_x86_shift = (int)(intptr_t)tc->tc_priv; bzero(vdso_th32->th_res, sizeof(vdso_th32->th_res)); - return (timecounter == &tsc_timecounter); + return (tc == &tsc_timecounter); } #endif From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 04:29:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CE9C76BD; Tue, 20 Jan 2015 04:29:39 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89B35CA6; Tue, 20 Jan 2015 04:29:39 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 681741FE023; Tue, 20 Jan 2015 05:29:35 +0100 (CET) Message-ID: <54BDD9E1.6090505@selasky.org> Date: Tue, 20 Jan 2015 05:30:25 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 04:29:39 -0000 On 01/19/15 22:59, Adrian Chadd wrote: > Hi, > > Would you please check what the results of this are with CPU specific > callwheels? > > I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on > ixgbe) and with this setup, the per-CPU TCP callwheel stuff is > enabled. But all the callwheels are now back on clock(0) and so is the > lock contention. :( > > Thanks, > Hi, Like stated in the manual page, callout_reset_curcpu/on() does not work with MPSAFE callouts any more! You need to use callout_init_{mtx,rm,rw} and remove the custom locking inside the callback in the TCP stack to get it working like before! Thank you! --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 04:30:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5C647831; Tue, 20 Jan 2015 04:30:41 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A2C1D5A; Tue, 20 Jan 2015 04:30:41 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 443FB1FE023; Tue, 20 Jan 2015 05:30:38 +0100 (CET) Message-ID: <54BDDA21.2060100@selasky.org> Date: Tue, 20 Jan 2015 05:31:29 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 04:30:41 -0000 On 01/19/15 23:22, Adrian Chadd wrote: > In my instance, I'm seeing quite a lot of lock contention between the > userland threads, the network RX threads and the clock thread, all > contending on a single callout wheel being used for TCP timers. One of > the early goals for fixing up the RSS stuff in -HEAD was to make > per-CPU (Well, per-RSS-bucket really) TCP timers not contend with the > NIC RX processing path, and now it does.:( man 9 callout --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:00:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2039E3; Tue, 20 Jan 2015 05:00:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CDDEFF5D; Tue, 20 Jan 2015 05:00:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K50dZc072564; Tue, 20 Jan 2015 05:00:39 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K50doD072563; Tue, 20 Jan 2015 05:00:39 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501200500.t0K50doD072563@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Jan 2015 05:00:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277407 - stable/10/sys/cam/scsi X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:00:40 -0000 Author: hselasky Date: Tue Jan 20 05:00:38 2015 New Revision: 277407 URL: https://svnweb.freebsd.org/changeset/base/277407 Log: MFC r276825 and r277372: Allow a block size of zero to mean 512 bytes, which is the most common block size for USB disks. This fixes support for "Action Cam SJ4000". Modified: stable/10/sys/cam/scsi/scsi_da.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/10/sys/cam/scsi/scsi_da.c Tue Jan 20 03:54:30 2015 (r277406) +++ stable/10/sys/cam/scsi/scsi_da.c Tue Jan 20 05:00:38 2015 (r277407) @@ -3098,11 +3098,12 @@ dadone(struct cam_periph *periph, union * give them an 'illegal' value we'll avoid that * here. */ - if (block_size == 0 && maxsector == 0) { + if (block_size == 0) { block_size = 512; - maxsector = -1; + if (maxsector == 0) + maxsector = -1; } - if (block_size >= MAXPHYS || block_size == 0) { + if (block_size >= MAXPHYS) { xpt_print(periph->path, "unsupportable block size %ju\n", (uintmax_t) block_size); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:02:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6165A227; Tue, 20 Jan 2015 05:02:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4D4481000; Tue, 20 Jan 2015 05:02:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K52abj076311; Tue, 20 Jan 2015 05:02:36 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K52a2B076310; Tue, 20 Jan 2015 05:02:36 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501200502.t0K52a2B076310@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Jan 2015 05:02:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277408 - stable/9/sys/cam/scsi X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:02:36 -0000 Author: hselasky Date: Tue Jan 20 05:02:35 2015 New Revision: 277408 URL: https://svnweb.freebsd.org/changeset/base/277408 Log: MFC r276825 and r277372: Allow a block size of zero to mean 512 bytes, which is the most common block size for USB disks. This fixes support for "Action Cam SJ4000". Modified: stable/9/sys/cam/scsi/scsi_da.c Directory Properties: stable/9/sys/ (props changed) Modified: stable/9/sys/cam/scsi/scsi_da.c ============================================================================== --- stable/9/sys/cam/scsi/scsi_da.c Tue Jan 20 05:00:38 2015 (r277407) +++ stable/9/sys/cam/scsi/scsi_da.c Tue Jan 20 05:02:35 2015 (r277408) @@ -3089,11 +3089,12 @@ dadone(struct cam_periph *periph, union * give them an 'illegal' value we'll avoid that * here. */ - if (block_size == 0 && maxsector == 0) { + if (block_size == 0) { block_size = 512; - maxsector = -1; + if (maxsector == 0) + maxsector = -1; } - if (block_size >= MAXPHYS || block_size == 0) { + if (block_size >= MAXPHYS) { xpt_print(periph->path, "unsupportable block size %ju\n", (uintmax_t) block_size); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:04:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A646367; Tue, 20 Jan 2015 05:04:33 +0000 (UTC) Received: from mail-wi0-x22f.google.com (mail-wi0-x22f.google.com [IPv6:2a00:1450:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 395A474; Tue, 20 Jan 2015 05:04:33 +0000 (UTC) Received: by mail-wi0-f175.google.com with SMTP id fb4so13799553wid.2; Mon, 19 Jan 2015 21:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=czhgGz5403SzAbh15qquXvwwHMNt+DZ4MsP/p3I5GVw=; b=viGf661lOmJF3EE6ilaJAeSpDoaFlcWjtlIzCNdeTC1V6TDQONtnCJ0c53mwzjlHTZ d15L1QQLv+2zJhELtGLk+cjo0B/L1mGcgVkip/Ttdm9Uh7acGLfUyZpf7aankVN2MaQU bewEa2jzKTiw8AH4uVKdn9G85Le6yvEDJ4dSSxeXyVplu/UcvjvLnXpsOQUkqheMklYn bifTRXL8RTiqylJiAgn3/5IaraynGHE8C5HzpO99lOASV5lIFLvcbakgdlCkrH3Sfc9y zZLp7lqpcI3Jb+s0/oG52iYgFkqzFPh3UNT/QfYLN0bEPjbh4qjtlovn14r9dARqAcOg AIbg== MIME-Version: 1.0 X-Received: by 10.180.7.198 with SMTP id l6mr42846795wia.26.1421730271618; Mon, 19 Jan 2015 21:04:31 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 19 Jan 2015 21:04:31 -0800 (PST) In-Reply-To: <54BDD9E1.6090505@selasky.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> Date: Mon, 19 Jan 2015 21:04:31 -0800 X-Google-Sender-Auth: No8D9uoRNMe-hDm43Ka3ACuKFV0 Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:04:33 -0000 On 19 January 2015 at 20:30, Hans Petter Selasky wrote: > On 01/19/15 22:59, Adrian Chadd wrote: >> >> Hi, >> >> Would you please check what the results of this are with CPU specific >> callwheels? >> >> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on >> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is >> enabled. But all the callwheels are now back on clock(0) and so is the >> lock contention. :( >> >> Thanks, >> > > Hi, > > Like stated in the manual page, callout_reset_curcpu/on() does not work with > MPSAFE callouts any more! Hm! How many places in the kernel did you leave like this? :P I mean, I'm glad to have stuff be forced to be cleaned up, but you didn't even leave a KASSERT or a debug warning that something unsupported is being done. I'm sure I'm not going to be the first person to be caught out like this. > You need to use callout_init_{mtx,rm,rw} and remove the custom locking > inside the callback in the TCP stack to get it working like before! Would you please give me a hand with this? I've sunk a lot of (unpaid, personal) spare time into getting the RSS stuff into shape and now a lot of it just plainly doesn't do anything. :( -adrian From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:12:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B278F7A7; Tue, 20 Jan 2015 05:12:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 941A81E1; Tue, 20 Jan 2015 05:12:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K5CVZZ081103; Tue, 20 Jan 2015 05:12:31 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K5CVKD081102; Tue, 20 Jan 2015 05:12:31 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501200512.t0K5CVKD081102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Jan 2015 05:12:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277409 - stable/10/sys/dev/usb/serial X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:12:31 -0000 Author: hselasky Date: Tue Jan 20 05:12:30 2015 New Revision: 277409 URL: https://svnweb.freebsd.org/changeset/base/277409 Log: MFC r276892: Add support for USB device side mode to the USB modem driver. Modified: stable/10/sys/dev/usb/serial/umodem.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/10/sys/dev/usb/serial/umodem.c Tue Jan 20 05:02:35 2015 (r277408) +++ stable/10/sys/dev/usb/serial/umodem.c Tue Jan 20 05:12:30 2015 (r277409) @@ -98,6 +98,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "usbdevs.h" +#include "usb_if.h" #include @@ -116,11 +117,14 @@ SYSCTL_INT(_hw_usb_umodem, OID_AUTO, deb &umodem_debug, 0, "Debug level"); #endif -static const STRUCT_USB_HOST_ID umodem_devs[] = { +static const STRUCT_USB_DUAL_ID umodem_dual_devs[] = { /* Generic Modem class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, +}; + +static const STRUCT_USB_HOST_ID umodem_host_devs[] = { /* Huawei Modem class match */ {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), @@ -142,6 +146,7 @@ static const STRUCT_USB_HOST_ID umodem_d enum { UMODEM_BULK_WR, UMODEM_BULK_RD, + UMODEM_INTR_WR, UMODEM_INTR_RD, UMODEM_N_TRANSFER, }; @@ -166,14 +171,19 @@ struct umodem_softc { uint8_t sc_cm_over_data; uint8_t sc_cm_cap; /* CM capabilities */ uint8_t sc_acm_cap; /* ACM capabilities */ + uint8_t sc_line_coding[32]; /* used in USB device mode */ + uint8_t sc_abstract_state[32]; /* used in USB device mode */ }; static device_probe_t umodem_probe; static device_attach_t umodem_attach; static device_detach_t umodem_detach; +static usb_handle_request_t umodem_handle_request; + static void umodem_free_softc(struct umodem_softc *); -static usb_callback_t umodem_intr_callback; +static usb_callback_t umodem_intr_read_callback; +static usb_callback_t umodem_intr_write_callback; static usb_callback_t umodem_write_callback; static usb_callback_t umodem_read_callback; @@ -204,31 +214,45 @@ static const struct usb_config umodem_co [UMODEM_BULK_WR] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_OUT, + .direction = UE_DIR_TX, .if_index = 0, .bufsize = UMODEM_BUF_SIZE, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = &umodem_write_callback, + .usb_mode = USB_MODE_DUAL, }, [UMODEM_BULK_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 0, .bufsize = UMODEM_BUF_SIZE, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &umodem_read_callback, + .usb_mode = USB_MODE_DUAL, + }, + + [UMODEM_INTR_WR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_TX, + .if_index = 1, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &umodem_intr_write_callback, + .usb_mode = USB_MODE_DEVICE, }, [UMODEM_INTR_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 1, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, .bufsize = 0, /* use wMaxPacketSize */ - .callback = &umodem_intr_callback, + .callback = &umodem_intr_read_callback, + .usb_mode = USB_MODE_HOST, }, }; @@ -249,6 +273,10 @@ static const struct ucom_callback umodem }; static device_method_t umodem_methods[] = { + /* USB interface */ + DEVMETHOD(usb_handle_request, umodem_handle_request), + + /* Device interface */ DEVMETHOD(device_probe, umodem_probe), DEVMETHOD(device_attach, umodem_attach), DEVMETHOD(device_detach, umodem_detach), @@ -276,13 +304,14 @@ umodem_probe(device_t dev) DPRINTFN(11, "\n"); - if (uaa->usb_mode != USB_MODE_HOST) - return (ENXIO); - - error = usbd_lookup_id_by_uaa(umodem_devs, sizeof(umodem_devs), uaa); - if (error) - return (error); - + error = usbd_lookup_id_by_uaa(umodem_host_devs, + sizeof(umodem_host_devs), uaa); + if (error) { + error = usbd_lookup_id_by_uaa(umodem_dual_devs, + sizeof(umodem_dual_devs), uaa); + if (error) + return (error); + } return (BUS_PROBE_GENERIC); } @@ -397,18 +426,22 @@ umodem_attach(device_t dev) umodem_config, UMODEM_N_TRANSFER, sc, &sc->sc_mtx); if (error) { + device_printf(dev, "Can't setup transfer\n"); goto detach; } - /* clear stall at first run */ - mtx_lock(&sc->sc_mtx); - usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_WR]); - usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]); - mtx_unlock(&sc->sc_mtx); + /* clear stall at first run, if USB host mode */ + if (uaa->usb_mode == USB_MODE_HOST) { + mtx_lock(&sc->sc_mtx); + usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_WR]); + usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]); + mtx_unlock(&sc->sc_mtx); + } error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &umodem_callback, &sc->sc_mtx); if (error) { + device_printf(dev, "Can't attach com\n"); goto detach; } ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); @@ -479,6 +512,7 @@ umodem_start_write(struct ucom_softc *uc { struct umodem_softc *sc = ucom->sc_parent; + usbd_transfer_start(sc->sc_xfer[UMODEM_INTR_WR]); usbd_transfer_start(sc->sc_xfer[UMODEM_BULK_WR]); } @@ -487,6 +521,7 @@ umodem_stop_write(struct ucom_softc *uco { struct umodem_softc *sc = ucom->sc_parent; + usbd_transfer_stop(sc->sc_xfer[UMODEM_INTR_WR]); usbd_transfer_stop(sc->sc_xfer[UMODEM_BULK_WR]); } @@ -681,7 +716,34 @@ umodem_cfg_set_break(struct ucom_softc * } static void -umodem_intr_callback(struct usb_xfer *xfer, usb_error_t error) +umodem_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + int actlen; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + + DPRINTF("Transferred %d bytes\n", actlen); + + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + break; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* start clear stall */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + break; + } +} + +static void +umodem_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) { struct usb_cdc_notification pkt; struct umodem_softc *sc = usbd_xfer_softc(xfer); @@ -903,3 +965,56 @@ umodem_poll(struct ucom_softc *ucom) struct umodem_softc *sc = ucom->sc_parent; usbd_transfer_poll(sc->sc_xfer, UMODEM_N_TRANSFER); } + +static int +umodem_handle_request(device_t dev, + const void *preq, void **pptr, uint16_t *plen, + uint16_t offset, uint8_t *pstate) +{ + struct umodem_softc *sc = device_get_softc(dev); + const struct usb_device_request *req = preq; + uint8_t is_complete = *pstate; + + DPRINTF("sc=%p\n", sc); + + if (!is_complete) { + if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->bRequest == UCDC_SET_LINE_CODING) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->wValue[0] == 0x00) && + (req->wValue[1] == 0x00)) { + if (offset == 0) { + *plen = sizeof(sc->sc_line_coding); + *pptr = &sc->sc_line_coding; + } else { + *plen = 0; + } + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SET_COMM_FEATURE)) { + if (offset == 0) { + *plen = sizeof(sc->sc_abstract_state); + *pptr = &sc->sc_abstract_state; + } else { + *plen = 0; + } + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SET_CONTROL_LINE_STATE)) { + *plen = 0; + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SEND_BREAK)) { + *plen = 0; + return (0); + } + } + return (ENXIO); /* use builtin handler */ +} From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:14:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DD5D939; Tue, 20 Jan 2015 05:14:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40A121F5; Tue, 20 Jan 2015 05:14:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K5E8xF081366; Tue, 20 Jan 2015 05:14:08 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K5E81V081365; Tue, 20 Jan 2015 05:14:08 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501200514.t0K5E81V081365@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Jan 2015 05:14:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277410 - stable/9/sys/dev/usb/serial X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:14:08 -0000 Author: hselasky Date: Tue Jan 20 05:14:07 2015 New Revision: 277410 URL: https://svnweb.freebsd.org/changeset/base/277410 Log: MFC r276892: Add support for USB device side mode to the USB modem driver. Modified: stable/9/sys/dev/usb/serial/umodem.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) Modified: stable/9/sys/dev/usb/serial/umodem.c ============================================================================== --- stable/9/sys/dev/usb/serial/umodem.c Tue Jan 20 05:12:30 2015 (r277409) +++ stable/9/sys/dev/usb/serial/umodem.c Tue Jan 20 05:14:07 2015 (r277410) @@ -98,6 +98,7 @@ __FBSDID("$FreeBSD$"); #include #include #include "usbdevs.h" +#include "usb_if.h" #include @@ -116,11 +117,14 @@ SYSCTL_INT(_hw_usb_umodem, OID_AUTO, deb &umodem_debug, 0, "Debug level"); #endif -static const STRUCT_USB_HOST_ID umodem_devs[] = { +static const STRUCT_USB_DUAL_ID umodem_dual_devs[] = { /* Generic Modem class match */ {USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), USB_IFACE_PROTOCOL(UIPROTO_CDC_AT)}, +}; + +static const STRUCT_USB_HOST_ID umodem_host_devs[] = { /* Huawei Modem class match */ {USB_VENDOR(USB_VENDOR_HUAWEI),USB_IFACE_CLASS(UICLASS_CDC), USB_IFACE_SUBCLASS(UISUBCLASS_ABSTRACT_CONTROL_MODEL), @@ -142,6 +146,7 @@ static const STRUCT_USB_HOST_ID umodem_d enum { UMODEM_BULK_WR, UMODEM_BULK_RD, + UMODEM_INTR_WR, UMODEM_INTR_RD, UMODEM_N_TRANSFER, }; @@ -166,14 +171,19 @@ struct umodem_softc { uint8_t sc_cm_over_data; uint8_t sc_cm_cap; /* CM capabilities */ uint8_t sc_acm_cap; /* ACM capabilities */ + uint8_t sc_line_coding[32]; /* used in USB device mode */ + uint8_t sc_abstract_state[32]; /* used in USB device mode */ }; static device_probe_t umodem_probe; static device_attach_t umodem_attach; static device_detach_t umodem_detach; +static usb_handle_request_t umodem_handle_request; + static void umodem_free_softc(struct umodem_softc *); -static usb_callback_t umodem_intr_callback; +static usb_callback_t umodem_intr_read_callback; +static usb_callback_t umodem_intr_write_callback; static usb_callback_t umodem_write_callback; static usb_callback_t umodem_read_callback; @@ -204,31 +214,45 @@ static const struct usb_config umodem_co [UMODEM_BULK_WR] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_OUT, + .direction = UE_DIR_TX, .if_index = 0, .bufsize = UMODEM_BUF_SIZE, .flags = {.pipe_bof = 1,.force_short_xfer = 1,}, .callback = &umodem_write_callback, + .usb_mode = USB_MODE_DUAL, }, [UMODEM_BULK_RD] = { .type = UE_BULK, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 0, .bufsize = UMODEM_BUF_SIZE, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, .callback = &umodem_read_callback, + .usb_mode = USB_MODE_DUAL, + }, + + [UMODEM_INTR_WR] = { + .type = UE_INTERRUPT, + .endpoint = UE_ADDR_ANY, + .direction = UE_DIR_TX, + .if_index = 1, + .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, + .bufsize = 0, /* use wMaxPacketSize */ + .callback = &umodem_intr_write_callback, + .usb_mode = USB_MODE_DEVICE, }, [UMODEM_INTR_RD] = { .type = UE_INTERRUPT, .endpoint = UE_ADDR_ANY, - .direction = UE_DIR_IN, + .direction = UE_DIR_RX, .if_index = 1, .flags = {.pipe_bof = 1,.short_xfer_ok = 1,.no_pipe_ok = 1,}, .bufsize = 0, /* use wMaxPacketSize */ - .callback = &umodem_intr_callback, + .callback = &umodem_intr_read_callback, + .usb_mode = USB_MODE_HOST, }, }; @@ -249,6 +273,10 @@ static const struct ucom_callback umodem }; static device_method_t umodem_methods[] = { + /* USB interface */ + DEVMETHOD(usb_handle_request, umodem_handle_request), + + /* Device interface */ DEVMETHOD(device_probe, umodem_probe), DEVMETHOD(device_attach, umodem_attach), DEVMETHOD(device_detach, umodem_detach), @@ -276,13 +304,14 @@ umodem_probe(device_t dev) DPRINTFN(11, "\n"); - if (uaa->usb_mode != USB_MODE_HOST) - return (ENXIO); - - error = usbd_lookup_id_by_uaa(umodem_devs, sizeof(umodem_devs), uaa); - if (error) - return (error); - + error = usbd_lookup_id_by_uaa(umodem_host_devs, + sizeof(umodem_host_devs), uaa); + if (error) { + error = usbd_lookup_id_by_uaa(umodem_dual_devs, + sizeof(umodem_dual_devs), uaa); + if (error) + return (error); + } return (BUS_PROBE_GENERIC); } @@ -397,18 +426,22 @@ umodem_attach(device_t dev) umodem_config, UMODEM_N_TRANSFER, sc, &sc->sc_mtx); if (error) { + device_printf(dev, "Can't setup transfer\n"); goto detach; } - /* clear stall at first run */ - mtx_lock(&sc->sc_mtx); - usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_WR]); - usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]); - mtx_unlock(&sc->sc_mtx); + /* clear stall at first run, if USB host mode */ + if (uaa->usb_mode == USB_MODE_HOST) { + mtx_lock(&sc->sc_mtx); + usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_WR]); + usbd_xfer_set_stall(sc->sc_xfer[UMODEM_BULK_RD]); + mtx_unlock(&sc->sc_mtx); + } error = ucom_attach(&sc->sc_super_ucom, &sc->sc_ucom, 1, sc, &umodem_callback, &sc->sc_mtx); if (error) { + device_printf(dev, "Can't attach com\n"); goto detach; } ucom_set_pnpinfo_usb(&sc->sc_super_ucom, dev); @@ -479,6 +512,7 @@ umodem_start_write(struct ucom_softc *uc { struct umodem_softc *sc = ucom->sc_parent; + usbd_transfer_start(sc->sc_xfer[UMODEM_INTR_WR]); usbd_transfer_start(sc->sc_xfer[UMODEM_BULK_WR]); } @@ -487,6 +521,7 @@ umodem_stop_write(struct ucom_softc *uco { struct umodem_softc *sc = ucom->sc_parent; + usbd_transfer_stop(sc->sc_xfer[UMODEM_INTR_WR]); usbd_transfer_stop(sc->sc_xfer[UMODEM_BULK_WR]); } @@ -681,7 +716,34 @@ umodem_cfg_set_break(struct ucom_softc * } static void -umodem_intr_callback(struct usb_xfer *xfer, usb_error_t error) +umodem_intr_write_callback(struct usb_xfer *xfer, usb_error_t error) +{ + int actlen; + + usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); + + switch (USB_GET_STATE(xfer)) { + case USB_ST_TRANSFERRED: + + DPRINTF("Transferred %d bytes\n", actlen); + + /* FALLTHROUGH */ + case USB_ST_SETUP: +tr_setup: + break; + + default: /* Error */ + if (error != USB_ERR_CANCELLED) { + /* start clear stall */ + usbd_xfer_set_stall(xfer); + goto tr_setup; + } + break; + } +} + +static void +umodem_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) { struct usb_cdc_notification pkt; struct umodem_softc *sc = usbd_xfer_softc(xfer); @@ -903,3 +965,56 @@ umodem_poll(struct ucom_softc *ucom) struct umodem_softc *sc = ucom->sc_parent; usbd_transfer_poll(sc->sc_xfer, UMODEM_N_TRANSFER); } + +static int +umodem_handle_request(device_t dev, + const void *preq, void **pptr, uint16_t *plen, + uint16_t offset, uint8_t *pstate) +{ + struct umodem_softc *sc = device_get_softc(dev); + const struct usb_device_request *req = preq; + uint8_t is_complete = *pstate; + + DPRINTF("sc=%p\n", sc); + + if (!is_complete) { + if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->bRequest == UCDC_SET_LINE_CODING) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->wValue[0] == 0x00) && + (req->wValue[1] == 0x00)) { + if (offset == 0) { + *plen = sizeof(sc->sc_line_coding); + *pptr = &sc->sc_line_coding; + } else { + *plen = 0; + } + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SET_COMM_FEATURE)) { + if (offset == 0) { + *plen = sizeof(sc->sc_abstract_state); + *pptr = &sc->sc_abstract_state; + } else { + *plen = 0; + } + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SET_CONTROL_LINE_STATE)) { + *plen = 0; + return (0); + } else if ((req->bmRequestType == UT_WRITE_CLASS_INTERFACE) && + (req->wIndex[0] == sc->sc_ctrl_iface_no) && + (req->wIndex[1] == 0x00) && + (req->bRequest == UCDC_SEND_BREAK)) { + *plen = 0; + return (0); + } + } + return (ENXIO); /* use builtin handler */ +} From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:19:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 381C2B92; Tue, 20 Jan 2015 05:19:27 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E705522E; Tue, 20 Jan 2015 05:19:26 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 77D501FE023; Tue, 20 Jan 2015 06:19:24 +0100 (CET) Message-ID: <54BDE58F.3070909@selasky.org> Date: Tue, 20 Jan 2015 06:20:15 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:19:27 -0000 On 01/20/15 06:04, Adrian Chadd wrote: > On 19 January 2015 at 20:30, Hans Petter Selasky wrote: >> On 01/19/15 22:59, Adrian Chadd wrote: >>> >>> Hi, >>> >>> Would you please check what the results of this are with CPU specific >>> callwheels? >>> >>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on >>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is >>> enabled. But all the callwheels are now back on clock(0) and so is the >>> lock contention. :( >>> >>> Thanks, >>> >> >> Hi, >> >> Like stated in the manual page, callout_reset_curcpu/on() does not work with >> MPSAFE callouts any more! > > Hm! > Hi Adrian, > How many places in the kernel did you leave like this? :P :-) > > I mean, I'm glad to have stuff be forced to be cleaned up, but you > didn't even leave a KASSERT or a debug warning that something > unsupported is being done. I'm sure I'm not going to be the first > person to be caught out like this. MPSAFE is still valid and fully useable and can be used with callout_reset_curcpu/on(), but the callout CPU will remain at zero. There is no need for a KASSERT() yet. > >> You need to use callout_init_{mtx,rm,rw} and remove the custom locking >> inside the callback in the TCP stack to get it working like before! > > Would you please give me a hand with this? I've sunk a lot of (unpaid, > personal) spare time into getting the RSS stuff into shape and now a > lot of it just plainly doesn't do anything. :( I'll send you a patch in an hours time from now for 11-current. This should be fairly trivial and then you can test and review it! --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:22:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ADE01CE4; Tue, 20 Jan 2015 05:22:44 +0000 (UTC) Received: from mail-wi0-x233.google.com (mail-wi0-x233.google.com [IPv6:2a00:1450:400c:c05::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 520F2304; Tue, 20 Jan 2015 05:22:44 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id l15so11247798wiw.0; Mon, 19 Jan 2015 21:22:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=EqLmoYzCG7hgRy3y1Rdnst7MlwIYzBzeZB/yf18XSz8=; b=DOBg0I0F2cnuZ1shIyPVWgo9rrySXqSm1H9WRUyDNMTN9olyYqjREfi/B+xEMqSiZg g+wjCf1TuEquepJx5rQpPL4WNtAuNgV/LKjJKvrSc4RdQk3RoXJX78wuBErP2Ccahsjq 7hsX8FUwP745U8lOGbBFE8FztB0QRWW6Ou9QJZn7UFu5ftsMUmdPrV3mo4doTMDmREo0 S/K3BYvcvJA515XxCLP9fnyo24piV2/V5n0GbhlA24vKWXRF6q5XEeHa/0yZD7F5xnyk oKuKBMhsj5eC82iz4YHNaHiO45uiUYBwzB2Jlt/RoSrdCrCtDwL2tjJfFgj8WZykNax8 0bPA== MIME-Version: 1.0 X-Received: by 10.194.108.9 with SMTP id hg9mr66751006wjb.68.1421731362795; Mon, 19 Jan 2015 21:22:42 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.216.41.136 with HTTP; Mon, 19 Jan 2015 21:22:42 -0800 (PST) In-Reply-To: <54BDE58F.3070909@selasky.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <54BDE58F.3070909@selasky.org> Date: Mon, 19 Jan 2015 21:22:42 -0800 X-Google-Sender-Auth: t5EneEEpnWlTRAvgbYf0SIPqb8Y Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:22:44 -0000 On 19 January 2015 at 21:20, Hans Petter Selasky wrote: > On 01/20/15 06:04, Adrian Chadd wrote: >> >> On 19 January 2015 at 20:30, Hans Petter Selasky wrote: >>> >>> On 01/19/15 22:59, Adrian Chadd wrote: >>>> >>>> >>>> Hi, >>>> >>>> Would you please check what the results of this are with CPU specific >>>> callwheels? >>>> >>>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on >>>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is >>>> enabled. But all the callwheels are now back on clock(0) and so is the >>>> lock contention. :( >>>> >>>> Thanks, >>>> >>> >>> Hi, >>> >>> Like stated in the manual page, callout_reset_curcpu/on() does not work >>> with >>> MPSAFE callouts any more! >> >> >> Hm! >> > > Hi Adrian, > >> How many places in the kernel did you leave like this? :P > > > :-) > >> >> I mean, I'm glad to have stuff be forced to be cleaned up, but you >> didn't even leave a KASSERT or a debug warning that something >> unsupported is being done. I'm sure I'm not going to be the first >> person to be caught out like this. > > > MPSAFE is still valid and fully useable and can be used with > callout_reset_curcpu/on(), but the callout CPU will remain at zero. > There is no need for a KASSERT() yet. Right, but people won't know that their callout won't be scheduled on the CPU they've asked for and there's no way to get notified of that. So something debug-y may be useful, even to make it easy to track down situations where sometimes it succeeds and sometimes it fails (because well, there's lots of places in the kernel where locking is .. suboptimal.) >> >>> You need to use callout_init_{mtx,rm,rw} and remove the custom locking >>> inside the callback in the TCP stack to get it working like before! >> >> >> Would you please give me a hand with this? I've sunk a lot of (unpaid, >> personal) spare time into getting the RSS stuff into shape and now a >> lot of it just plainly doesn't do anything. :( > > > I'll send you a patch in an hours time from now for 11-current. This should > be fairly trivial and then you can test and review it! Sweet, thanks. I'l test it, but anything that changes the locking to TCP is going to need a more thorough review. The "there be dragons" disclaimer is appropriate. :) -adrian From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:28:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29705E76; Tue, 20 Jan 2015 05:28:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F155A328; Tue, 20 Jan 2015 05:28:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K5S39J086700; Tue, 20 Jan 2015 05:28:03 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K5S3kJ086699; Tue, 20 Jan 2015 05:28:03 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501200528.t0K5S3kJ086699@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 20 Jan 2015 05:28:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277411 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:28:04 -0000 Author: nwhitehorn Date: Tue Jan 20 05:28:03 2015 New Revision: 277411 URL: https://svnweb.freebsd.org/changeset/base/277411 Log: Zero BSS explicitly if not started by loader(8). Add a check for the magic values that ePAPR-compliant loaders (like skiboot) put in the register loader uses for the metadata pointer to avoid confusing them. Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Tue Jan 20 05:14:07 2015 (r277410) +++ head/sys/powerpc/aim/machdep.c Tue Jan 20 05:28:03 2015 (r277411) @@ -224,6 +224,10 @@ cpu_startup(void *dummy) } extern vm_offset_t __startkernel, __endkernel; +extern unsigned char __bss_start[]; +extern unsigned char __sbss_start[]; +extern unsigned char __sbss_end[]; +extern unsigned char _end[]; #ifndef __powerpc64__ /* Bits for running on 64-bit systems in 32-bit mode. */ @@ -272,9 +276,6 @@ powerpc_init(vm_offset_t fdt, vm_offset_ trap_offset = 0; cacheline_warn = 0; - /* Store boot environment state */ - OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); - /* First guess at start/end kernel positions */ startkernel = __startkernel; endkernel = __endkernel; @@ -289,6 +290,10 @@ powerpc_init(vm_offset_t fdt, vm_offset_ mdp = NULL; #endif + /* Check for ePAPR loader, which puts a magic value into r6 */ + if (mdp == (void *)0x65504150) + mdp = NULL; + /* * Parse metadata if present and fetch parameters. Must be done * before console is inited so cninit gets the right value of @@ -308,8 +313,14 @@ powerpc_init(vm_offset_t fdt, vm_offset_ db_fetch_ksymtab(ksym_start, ksym_end); #endif } + } else { + bzero(__sbss_start, __sbss_end - __sbss_start); + bzero(__bss_start, _end - __bss_start); } + /* Store boot environment state */ + OF_initial_setup((void *)fdt, NULL, (int (*)(void *))ofentry); + /* * Init params/tunables that can be overridden by the loader */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 05:44:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 03BE81C2; Tue, 20 Jan 2015 05:44:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E3D306C5; Tue, 20 Jan 2015 05:44:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K5iLpl095580; Tue, 20 Jan 2015 05:44:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K5iLdf095579; Tue, 20 Jan 2015 05:44:21 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501200544.t0K5iLdf095579@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 20 Jan 2015 05:44:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277412 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 05:44:22 -0000 Author: nwhitehorn Date: Tue Jan 20 05:44:21 2015 New Revision: 277412 URL: https://svnweb.freebsd.org/changeset/base/277412 Log: Remove space in the FDT reservation map from the available memory regions in ofw_mem_regions(). This function is actually MI and should move to dev/ofw at some point in the near future so that ARM and MIPS can use the same code. Modified: head/sys/powerpc/ofw/ofw_machdep.c Modified: head/sys/powerpc/ofw/ofw_machdep.c ============================================================================== --- head/sys/powerpc/ofw/ofw_machdep.c Tue Jan 20 05:28:03 2015 (r277411) +++ head/sys/powerpc/ofw/ofw_machdep.c Tue Jan 20 05:44:21 2015 (r277412) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include @@ -211,12 +212,89 @@ parse_ofw_memory(phandle_t node, const c return (sz); } +static int +excise_fdt_reserved(struct mem_region *avail, int asz) +{ + struct { + uint64_t address; + uint64_t size; + } fdtmap[16]; + ssize_t fdtmapsize; + phandle_t chosen; + int i, j, k; + + chosen = OF_finddevice("/chosen"); + fdtmapsize = OF_getprop(chosen, "fdtmemreserv", fdtmap, sizeof(fdtmap)); + + for (j = 0; j < fdtmapsize/sizeof(fdtmap[0]); j++) { + fdtmap[j].address = be64toh(fdtmap[j].address); + fdtmap[j].size = be64toh(fdtmap[j].size); + } + + for (i = 0; i < asz; i++) { + for (j = 0; j < fdtmapsize/sizeof(fdtmap[0]); j++) { + /* + * Case 1: Exclusion region encloses complete + * available entry. Drop it and move on. + */ + if (fdtmap[j].address <= avail[i].mr_start && + fdtmap[j].address + fdtmap[j].size >= + avail[i].mr_start + avail[i].mr_size) { + for (k = i+1; k < asz; k++) + avail[k-1] = avail[k]; + asz--; + i--; /* Repeat some entries */ + continue; + } + + /* + * Case 2: Exclusion region starts in available entry. + * Trim it to where the entry begins and append + * a new available entry with the region after + * the excluded region, if any. + */ + if (fdtmap[j].address >= avail[i].mr_start && + fdtmap[j].address < avail[i].mr_start + + avail[i].mr_size) { + if (fdtmap[j].address + fdtmap[j].size < + avail[i].mr_start + avail[i].mr_size) { + avail[asz].mr_start = + roundup2(fdtmap[j].address + + fdtmap[j].size, PAGE_SIZE); + avail[asz].mr_size = avail[i].mr_start + + avail[i].mr_size - + avail[asz].mr_start; + asz++; + } + + avail[i].mr_size = + rounddown2(fdtmap[j].address, PAGE_MASK) - + avail[i].mr_start; + } + + /* + * Case 3: Exclusion region ends in available entry. + * Move start point to where the exclusion zone ends. + * The case of a contained exclusion zone has already + * been caught in case 2. + */ + if (fdtmap[j].address + fdtmap[j].size >= + avail[i].mr_start && fdtmap[j].address + + fdtmap[j].size < avail[i].mr_start + + avail[i].mr_size) { + avail[i].mr_start = + roundup2(fdtmap[j].address + fdtmap[j].size, PAGE_MASK); + } + } + } + + return (asz); +} + /* * This is called during powerpc_init, before the system is really initialized. * It shall provide the total and the available regions of RAM. - * Both lists must have a zero-size entry as terminator. - * The available regions need not take the kernel into account, but needs - * to provide space for two additional entry beyond the terminating one. + * The available regions need not take the kernel into account. */ void ofw_mem_regions(struct mem_region *memp, int *memsz, @@ -236,7 +314,8 @@ ofw_mem_regions(struct mem_region *memp, phandle = OF_peer(phandle)) { if (OF_getprop(phandle, "name", name, sizeof(name)) <= 0) continue; - if (strncmp(name, "memory", sizeof(name)) != 0) + if (strncmp(name, "memory", sizeof(name)) != 0 && + strncmp(name, "memory@", strlen("memory@")) != 0) continue; res = parse_ofw_memory(phandle, "reg", &memp[msz]); @@ -249,6 +328,10 @@ ofw_mem_regions(struct mem_region *memp, asz += res/sizeof(struct mem_region); } + phandle = OF_finddevice("/chosen"); + if (OF_hasprop(phandle, "fdtmemreserv")) + asz = excise_fdt_reserved(availp, asz); + *memsz = msz; *availsz = asz; } From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 07:27:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D228E19B; Tue, 20 Jan 2015 07:27:27 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F183DD; Tue, 20 Jan 2015 07:27:27 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6078A1FE023; Tue, 20 Jan 2015 08:27:25 +0100 (CET) Message-ID: <54BE0390.40601@selasky.org> Date: Tue, 20 Jan 2015 08:28:16 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <54BDE58F.3070909@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 07:27:27 -0000 Hi, Have a look here: https://reviews.freebsd.org/D1563 Give me a hand and test and review this patch properly! --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 07:34:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6976457B; Tue, 20 Jan 2015 07:34:15 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 263E81C5; Tue, 20 Jan 2015 07:34:15 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 411AB1FE023; Tue, 20 Jan 2015 08:34:13 +0100 (CET) Message-ID: <54BE0528.2050503@selasky.org> Date: Tue, 20 Jan 2015 08:35:04 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <54BDE58F.3070909@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 07:34:15 -0000 On 01/20/15 06:22, Adrian Chadd wrote: > Sweet, thanks. I'l test it, but anything that changes the locking to > TCP is going to need a more thorough review. The "there be dragons" > disclaimer is appropriate.:) No changes in locking - simply some minor code reordering. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 07:51:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 009CF77A; Tue, 20 Jan 2015 07:51:32 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 64933380; Tue, 20 Jan 2015 07:51:32 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0K7pR1u081002 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 09:51:27 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0K7pR1u081002 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0K7pQ2G081001; Tue, 20 Jan 2015 09:51:26 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Jan 2015 09:51:26 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150120075126.GA42409@kib.kiev.ua> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BDD9E1.6090505@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 07:51:33 -0000 On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky wrote: > On 01/19/15 22:59, Adrian Chadd wrote: > > Hi, > > > > Would you please check what the results of this are with CPU specific > > callwheels? > > > > I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on > > ixgbe) and with this setup, the per-CPU TCP callwheel stuff is > > enabled. But all the callwheels are now back on clock(0) and so is the > > lock contention. :( > > > > Thanks, > > > > Hi, > > Like stated in the manual page, callout_reset_curcpu/on() does not work > with MPSAFE callouts any more! I.e. you 'fixed' some undeterminate bugs in callout migration by not doing migration at all anymore. > > You need to use callout_init_{mtx,rm,rw} and remove the custom locking > inside the callback in the TCP stack to get it working like before! No, you need to do this, if you think that whole callout KPI must be rototiled. It is up to the person who modifies the KPI, to ensure that existing code is not broken. As I understand, currently we are back to the one-cpu callouts. Do other people consider this situation acceptable ? From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 07:57:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE7AAA4F; Tue, 20 Jan 2015 07:57:46 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 790DF3D9; Tue, 20 Jan 2015 07:57:45 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 92B601FE023; Tue, 20 Jan 2015 08:57:43 +0100 (CET) Message-ID: <54BE0AAA.4050104@selasky.org> Date: Tue, 20 Jan 2015 08:58:34 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> In-Reply-To: <20150120075126.GA42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 07:57:46 -0000 On 01/20/15 08:51, Konstantin Belousov wrote: > On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky wrote: >> On 01/19/15 22:59, Adrian Chadd wrote: >>> Hi, >>> >>> Would you please check what the results of this are with CPU specific >>> callwheels? >>> >>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on >>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is >>> enabled. But all the callwheels are now back on clock(0) and so is the >>> lock contention. :( >>> >>> Thanks, >>> >> >> Hi, >> >> Like stated in the manual page, callout_reset_curcpu/on() does not work >> with MPSAFE callouts any more! > I.e. you 'fixed' some undeterminate bugs in callout migration by not > doing migration at all anymore. > >> >> You need to use callout_init_{mtx,rm,rw} and remove the custom locking >> inside the callback in the TCP stack to get it working like before! > > No, you need to do this, if you think that whole callout KPI must be > rototiled. It is up to the person who modifies the KPI, to ensure that > existing code is not broken. > > As I understand, currently we are back to the one-cpu callouts. > Do other people consider this situation acceptable ? > Hi Konstantin, Please read the callout 9 manual page first. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 09:01:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 08EFEADE; Tue, 20 Jan 2015 09:01:06 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C4D0C0D; Tue, 20 Jan 2015 09:01:05 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0K90xjc096301 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 11:00:59 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0K90xjc096301 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0K90v8T096290; Tue, 20 Jan 2015 11:00:57 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Jan 2015 11:00:57 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150120090057.GD42409@kib.kiev.ua> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BE0AAA.4050104@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 09:01:06 -0000 On Tue, Jan 20, 2015 at 08:58:34AM +0100, Hans Petter Selasky wrote: > On 01/20/15 08:51, Konstantin Belousov wrote: > > On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky wrote: > >> On 01/19/15 22:59, Adrian Chadd wrote: > >>> Hi, > >>> > >>> Would you please check what the results of this are with CPU specific > >>> callwheels? > >>> > >>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on > >>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is > >>> enabled. But all the callwheels are now back on clock(0) and so is the > >>> lock contention. :( > >>> > >>> Thanks, > >>> > >> > >> Hi, > >> > >> Like stated in the manual page, callout_reset_curcpu/on() does not work > >> with MPSAFE callouts any more! > > I.e. you 'fixed' some undeterminate bugs in callout migration by not > > doing migration at all anymore. > > > >> > >> You need to use callout_init_{mtx,rm,rw} and remove the custom locking > >> inside the callback in the TCP stack to get it working like before! > > > > No, you need to do this, if you think that whole callout KPI must be > > rototiled. It is up to the person who modifies the KPI, to ensure that > > existing code is not broken. > > > > As I understand, currently we are back to the one-cpu callouts. > > Do other people consider this situation acceptable ? > > > > Hi Konstantin, > > Please read the callout 9 manual page first. Assume I read it. How this changes any of my points above ? """ A change in the CPU selection cannot happen if this function is re-scheduled inside a callout function. Else the callback function given by the func argument will be executed on the same CPU like previously done. """ You cannot do this without fixing consumers. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 09:07:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CEA69CC4; Tue, 20 Jan 2015 09:07:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD293CE8; Tue, 20 Jan 2015 09:07:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0K97ViZ088132; Tue, 20 Jan 2015 09:07:31 GMT (envelope-from ganbold@FreeBSD.org) Received: (from ganbold@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0K97TNV088122; Tue, 20 Jan 2015 09:07:29 GMT (envelope-from ganbold@FreeBSD.org) Message-Id: <201501200907.t0K97TNV088122@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ganbold set sender to ganbold@FreeBSD.org using -f From: Ganbold Tsagaankhuu Date: Tue, 20 Jan 2015 09:07:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277413 - in head/sys: arm/conf arm/rockchip boot/fdt/dts/arm dev/mmc/host X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 09:07:32 -0000 Author: ganbold Date: Tue Jan 20 09:07:28 2015 New Revision: 277413 URL: https://svnweb.freebsd.org/changeset/base/277413 Log: Enable Synopsys DesignWare Mobile Storage Host Controller driver on Rockchip boards. It currently supports PIO mode and dma mode needs external dma controller to be used. Submitted by: jmcneill Approved by: stas (mentor) Modified: head/sys/arm/conf/RK3188 head/sys/arm/rockchip/files.rk30xx head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts head/sys/boot/fdt/dts/arm/rk3188-radxa.dts head/sys/boot/fdt/dts/arm/rk3188.dtsi head/sys/dev/mmc/host/dwmmc.c head/sys/dev/mmc/host/dwmmc.h Modified: head/sys/arm/conf/RK3188 ============================================================================== --- head/sys/arm/conf/RK3188 Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/arm/conf/RK3188 Tue Jan 20 09:07:28 2015 (r277413) @@ -76,8 +76,9 @@ options DIAGNOSTIC options ROOTDEVNAME=\"ufs:/dev/da0s2\" # MMC/SD/SDIO Card slot support -#device mmc # mmc/sd bus -#device mmcsd # mmc/sd flash cards +device mmc # mmc/sd bus +device mmcsd # mmc/sd flash cards +device dwmmc # Console and misc device uart Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/arm/rockchip/files.rk30xx Tue Jan 20 09:07:28 2015 (r277413) @@ -19,3 +19,5 @@ arm/rockchip/rk30xx_grf.c standard arm/rockchip/rk30xx_wdog.c standard arm/rockchip/rk30xx_gpio.c optional gpio arm/rockchip/rk30xx_mp.c optional smp + +dev/mmc/host/dwmmc.c optional dwmmc Modified: head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/boot/fdt/dts/arm/rk3188-radxa-lite.dts Tue Jan 20 09:07:28 2015 (r277413) @@ -48,6 +48,10 @@ status = "okay"; }; + mmc@10214000 { + status = "okay"; + }; + }; chosen { Modified: head/sys/boot/fdt/dts/arm/rk3188-radxa.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rk3188-radxa.dts Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/boot/fdt/dts/arm/rk3188-radxa.dts Tue Jan 20 09:07:28 2015 (r277413) @@ -48,6 +48,10 @@ status = "okay"; }; + mmc@10214000 { + status = "okay"; + }; + }; chosen { Modified: head/sys/boot/fdt/dts/arm/rk3188.dtsi ============================================================================== --- head/sys/boot/fdt/dts/arm/rk3188.dtsi Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/boot/fdt/dts/arm/rk3188.dtsi Tue Jan 20 09:07:28 2015 (r277413) @@ -231,22 +231,26 @@ }; mmc@10214000 { - compatible = "rockchip,rk30xx-mmc"; + compatible = "rockchip,rk2928-dw-mshc"; reg = <0x10214000 0x1000>; interrupts = <55>; #address-cells = <1>; #size-cells = <0>; - clock-frequency = <24000000>; /* TODO: verify freq */ + bus-frequency = <48000000>; /* TODO: verify freq */ + fifo-depth = <0x40>; + num-slots = <1>; status = "disabled"; }; mmc@10218000 { - compatible = "rockchip,rk30xx-mmc"; + compatible = "rockchip,rk2928-dw-mshc"; reg = <0x10218000 0x1000>; interrupts = <56>; #address-cells = <1>; #size-cells = <0>; - clock-frequency = <24000000>; /* TODO: verify freq */ + bus-frequency = <48000000>; /* TODO: verify freq */ + fifo-depth = <0x40>; + num-slots = <1>; status = "disabled"; }; }; Modified: head/sys/dev/mmc/host/dwmmc.c ============================================================================== --- head/sys/dev/mmc/host/dwmmc.c Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/dev/mmc/host/dwmmc.c Tue Jan 20 09:07:28 2015 (r277413) @@ -129,6 +129,8 @@ struct dwmmc_softc { uint32_t flags; uint32_t hwtype; uint32_t use_auto_stop; + uint32_t use_pio; + uint32_t pwren_inverted; bus_dma_tag_t desc_tag; bus_dmamap_t desc_map; @@ -152,6 +154,8 @@ static void dwmmc_next_operation(struct static int dwmmc_setup_bus(struct dwmmc_softc *, int); static int dma_done(struct dwmmc_softc *, struct mmc_command *); static int dma_stop(struct dwmmc_softc *); +static void pio_read(struct dwmmc_softc *, struct mmc_command *); +static void pio_write(struct dwmmc_softc *, struct mmc_command *); static struct resource_spec dwmmc_spec[] = { { SYS_RES_MEMORY, 0, RF_ACTIVE }, @@ -163,6 +167,7 @@ enum { HWTYPE_NONE, HWTYPE_ALTERA, HWTYPE_EXYNOS, + HWTYPE_ROCKCHIP, }; #define HWTYPE_MASK (0x0000ffff) @@ -171,6 +176,7 @@ enum { static struct ofw_compat_data compat_data[] = { {"altr,socfpga-dw-mshc", HWTYPE_ALTERA}, {"samsung,exynos5420-dw-mshc", HWTYPE_EXYNOS}, + {"rockchip,rk2928-dw-mshc", HWTYPE_ROCKCHIP}, {NULL, HWTYPE_NONE}, }; @@ -395,8 +401,10 @@ dwmmc_intr(void *arg) dprintf("data err 0x%08x cmd 0x%08x\n", reg, cmd->opcode); cmd->error = MMC_ERR_FAILED; - dma_done(sc, cmd); - dma_stop(sc); + if (!sc->use_pio) { + dma_done(sc, cmd); + dma_stop(sc); + } } if (reg & SDMMC_INTMASK_CMD_DONE) { @@ -421,15 +429,24 @@ dwmmc_intr(void *arg) } } - /* Now handle DMA interrupts */ - reg = READ4(sc, SDMMC_IDSTS); - if (reg) { - dprintf("dma intr 0x%08x\n", reg); - if (reg & (SDMMC_IDINTEN_TI | SDMMC_IDINTEN_RI)) { - WRITE4(sc, SDMMC_IDSTS, (SDMMC_IDINTEN_TI | - SDMMC_IDINTEN_RI)); - WRITE4(sc, SDMMC_IDSTS, SDMMC_IDINTEN_NI); - dma_done(sc, cmd); + if (sc->use_pio) { + if (reg & (SDMMC_INTMASK_RXDR|SDMMC_INTMASK_DTO)) { + pio_read(sc, cmd); + } + if (reg & (SDMMC_INTMASK_TXDR|SDMMC_INTMASK_DTO)) { + pio_write(sc, cmd); + } + } else { + /* Now handle DMA interrupts */ + reg = READ4(sc, SDMMC_IDSTS); + if (reg) { + dprintf("dma intr 0x%08x\n", reg); + if (reg & (SDMMC_IDINTEN_TI | SDMMC_IDINTEN_RI)) { + WRITE4(sc, SDMMC_IDSTS, (SDMMC_IDINTEN_TI | + SDMMC_IDINTEN_RI)); + WRITE4(sc, SDMMC_IDSTS, SDMMC_IDINTEN_NI); + dma_done(sc, cmd); + } } } @@ -560,17 +577,29 @@ dwmmc_attach(device_t dev) device_printf(dev, "Hardware version ID is %04x\n", READ4(sc, SDMMC_VERID) & 0xffff); - WRITE4(sc, EMMCP_MPSBEGIN0, 0); - WRITE4(sc, EMMCP_SEND0, 0); - WRITE4(sc, EMMCP_CTRL0, (MPSCTRL_SECURE_READ_BIT | - MPSCTRL_SECURE_WRITE_BIT | - MPSCTRL_NON_SECURE_READ_BIT | - MPSCTRL_NON_SECURE_WRITE_BIT | - MPSCTRL_VALID)); + sc->use_pio = 0; + sc->pwren_inverted = 0; + + if ((sc->hwtype & HWTYPE_MASK) == HWTYPE_ROCKCHIP) { + sc->use_pio = 1; + sc->pwren_inverted = 1; + } else { + WRITE4(sc, EMMCP_MPSBEGIN0, 0); + WRITE4(sc, EMMCP_SEND0, 0); + WRITE4(sc, EMMCP_CTRL0, (MPSCTRL_SECURE_READ_BIT | + MPSCTRL_SECURE_WRITE_BIT | + MPSCTRL_NON_SECURE_READ_BIT | + MPSCTRL_NON_SECURE_WRITE_BIT | + MPSCTRL_VALID)); + } /* XXX: we support operation for slot index 0 only */ slot = 0; - WRITE4(sc, SDMMC_PWREN, (1 << slot)); + if (sc->pwren_inverted) { + WRITE4(sc, SDMMC_PWREN, (0 << slot)); + } else { + WRITE4(sc, SDMMC_PWREN, (1 << slot)); + } /* Reset all */ if (dwmmc_ctrl_reset(sc, (SDMMC_CTRL_RESET | @@ -580,17 +609,19 @@ dwmmc_attach(device_t dev) dwmmc_setup_bus(sc, sc->host.f_min); - if (dma_setup(sc)) - return (ENXIO); - - /* Install desc base */ - WRITE4(sc, SDMMC_DBADDR, sc->desc_ring_paddr); - - /* Enable DMA interrupts */ - WRITE4(sc, SDMMC_IDSTS, SDMMC_IDINTEN_MASK); - WRITE4(sc, SDMMC_IDINTEN, (SDMMC_IDINTEN_NI | - SDMMC_IDINTEN_RI | - SDMMC_IDINTEN_TI)); + if (!sc->use_pio) { + if (dma_setup(sc)) + return (ENXIO); + + /* Install desc base */ + WRITE4(sc, SDMMC_DBADDR, sc->desc_ring_paddr); + + /* Enable DMA interrupts */ + WRITE4(sc, SDMMC_IDSTS, SDMMC_IDINTEN_MASK); + WRITE4(sc, SDMMC_IDINTEN, (SDMMC_IDINTEN_NI | + SDMMC_IDINTEN_RI | + SDMMC_IDINTEN_TI)); + } /* Clear and disable interrups for a while */ WRITE4(sc, SDMMC_RINTSTS, 0xffffffff); @@ -797,6 +828,79 @@ dma_prepare(struct dwmmc_softc *sc, stru return (0); } +static int +pio_prepare(struct dwmmc_softc *sc, struct mmc_command *cmd) +{ + struct mmc_data *data; + int reg; + + data = cmd->data; + data->xfer_len = 0; + + reg = (DEF_MSIZE << SDMMC_FIFOTH_MSIZE_S); + reg |= ((sc->fifo_depth / 2) - 1) << SDMMC_FIFOTH_RXWMARK_S; + reg |= (sc->fifo_depth / 2) << SDMMC_FIFOTH_TXWMARK_S; + + WRITE4(sc, SDMMC_FIFOTH, reg); + wmb(); + + return (0); +} + +static void +pio_read(struct dwmmc_softc *sc, struct mmc_command *cmd) +{ + struct mmc_data *data; + uint32_t *p, status; + + if (cmd == NULL || cmd->data == NULL) + return; + + data = cmd->data; + if ((data->flags & MMC_DATA_READ) == 0) + return; + + KASSERT((data->xfer_len & 3) == 0, ("xfer_len not aligned")); + p = (uint32_t *)data->data + (data->xfer_len >> 2); + + while (data->xfer_len < data->len) { + status = READ4(sc, SDMMC_STATUS); + if (status & SDMMC_STATUS_FIFO_EMPTY) + break; + *p++ = READ4(sc, SDMMC_DATA); + data->xfer_len += 4; + } + + WRITE4(sc, SDMMC_RINTSTS, SDMMC_INTMASK_RXDR); +} + +static void +pio_write(struct dwmmc_softc *sc, struct mmc_command *cmd) +{ + struct mmc_data *data; + uint32_t *p, status; + + if (cmd == NULL || cmd->data == NULL) + return; + + data = cmd->data; + if ((data->flags & MMC_DATA_WRITE) == 0) + return; + + KASSERT((data->xfer_len & 3) == 0, ("xfer_len not aligned")); + p = (uint32_t *)data->data + (data->xfer_len >> 2); + + while (data->xfer_len < data->len) { + status = READ4(sc, SDMMC_STATUS); + if (status & SDMMC_STATUS_FIFO_FULL) + break; + WRITE4(sc, SDMMC_DATA, *p++); + data->xfer_len += 4; + } + + WRITE4(sc, SDMMC_RINTSTS, SDMMC_INTMASK_TXDR); +} + static void dwmmc_start_cmd(struct dwmmc_softc *sc, struct mmc_command *cmd) { @@ -807,6 +911,9 @@ dwmmc_start_cmd(struct dwmmc_softc *sc, sc->curcmd = cmd; data = cmd->data; + if ((sc->hwtype & HWTYPE_MASK) == HWTYPE_ROCKCHIP) + dwmmc_setup_bus(sc, sc->host.ios.clock); + /* XXX Upper layers don't always set this */ cmd->mrq = sc->req; @@ -861,7 +968,11 @@ dwmmc_start_cmd(struct dwmmc_softc *sc, data->len : MMC_SECTOR_SIZE; WRITE4(sc, SDMMC_BLKSIZ, blksz); - dma_prepare(sc, cmd); + if (sc->use_pio) { + pio_prepare(sc, cmd); + } else { + dma_prepare(sc, cmd); + } wmb(); } Modified: head/sys/dev/mmc/host/dwmmc.h ============================================================================== --- head/sys/dev/mmc/host/dwmmc.h Tue Jan 20 05:44:21 2015 (r277412) +++ head/sys/dev/mmc/host/dwmmc.h Tue Jan 20 09:07:28 2015 (r277413) @@ -91,6 +91,8 @@ #define SDMMC_RINTSTS 0x44 /* Raw Interrupt Status Register */ #define SDMMC_STATUS 0x48 /* Status Register */ #define SDMMC_STATUS_DATA_BUSY (1 << 9) /* card_data[0] */ +#define SDMMC_STATUS_FIFO_FULL (1 << 3) /* FIFO full */ +#define SDMMC_STATUS_FIFO_EMPTY (1 << 2) /* FIFO empty */ #define SDMMC_FIFOTH 0x4C /* FIFO Threshold Watermark Register */ #define SDMMC_FIFOTH_MSIZE_S 28 /* Burst size of multiple transaction */ #define SDMMC_FIFOTH_RXWMARK_S 16 /* FIFO threshold watermark level */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 09:37:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B73741FA; Tue, 20 Jan 2015 09:37:05 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E6BEFD9; Tue, 20 Jan 2015 09:37:04 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 494321FE023; Tue, 20 Jan 2015 10:37:01 +0100 (CET) Message-ID: <54BE21F0.6010602@selasky.org> Date: Tue, 20 Jan 2015 10:37:52 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> In-Reply-To: <20150120090057.GD42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 09:37:05 -0000 On 01/20/15 10:00, Konstantin Belousov wrote: > On Tue, Jan 20, 2015 at 08:58:34AM +0100, Hans Petter Selasky wrote: >> On 01/20/15 08:51, Konstantin Belousov wrote: >>> On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky wrote: >>>> On 01/19/15 22:59, Adrian Chadd wrote: >>>>> Hi, >>>>> >>>>> Would you please check what the results of this are with CPU specific >>>>> callwheels? >>>>> >>>>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on >>>>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is >>>>> enabled. But all the callwheels are now back on clock(0) and so is the >>>>> lock contention. :( >>>>> >>>>> Thanks, >>>>> >>>> >>>> Hi, >>>> >>>> Like stated in the manual page, callout_reset_curcpu/on() does not work >>>> with MPSAFE callouts any more! >>> I.e. you 'fixed' some undeterminate bugs in callout migration by not >>> doing migration at all anymore. >>> >>>> >>>> You need to use callout_init_{mtx,rm,rw} and remove the custom locking >>>> inside the callback in the TCP stack to get it working like before! >>> >>> No, you need to do this, if you think that whole callout KPI must be >>> rototiled. It is up to the person who modifies the KPI, to ensure that >>> existing code is not broken. Hi, It is not very hard to update existing callout clients and you can do it too, if you need the extra bits of performance. Are there more API's than the TCP stack which you think needs an update and are performance critical? >>> >>> As I understand, currently we are back to the one-cpu callouts. >>> Do other people consider this situation acceptable ? For the TCP stack - yes, but not for other clients like cv_timedwait() and such. If you think you have a better way to solve the callout problems, please tell me! In order for a callout to change its CPU you need a lock to protect which CPU the callout is on. Instead of introducing a third lock in the callout path, which will be a congestion point, to protect against changing the CPU number, I decided that we will use the client's mutex and the MPSAFE implies the client doesn't have any mutex. So it won't work with callout clients which use the CALLOUT_MPSAFE flag. Honestly CALLOUT_MPSAFE should not be used, because it leads to extra complexity in the clients catching the race when tearing down the callouts and any pending callbacks. >> >> Please read the callout 9 manual page first. > > Assume I read it. How this changes any of my points above ? > """ > A change in the CPU selection cannot happen if this function is > re-scheduled inside a callout function. Else the callback function given > by the func argument will be executed on the same CPU like previously > done. > """ > You cannot do this without fixing consumers. > The code simply needs an update. It is not broken in any ways - right? If it is not broken, fixing it is not that urgent. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 11:10:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5F987E1; Tue, 20 Jan 2015 11:10:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87648D07; Tue, 20 Jan 2015 11:10:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KBAQtZ047011; Tue, 20 Jan 2015 11:10:26 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KBAPaY047005; Tue, 20 Jan 2015 11:10:25 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501201110.t0KBAPaY047005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 20 Jan 2015 11:10:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277414 - in head/sys/mips: include mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 11:10:26 -0000 Author: br Date: Tue Jan 20 11:10:25 2015 New Revision: 277414 URL: https://svnweb.freebsd.org/changeset/base/277414 Log: Add 128-byte cache flushing routines. Leave CNMIPS untouched as these functions depends on config2 register. Modified: head/sys/mips/include/cache_mipsNN.h head/sys/mips/mips/cache.c head/sys/mips/mips/cache_mipsNN.c Modified: head/sys/mips/include/cache_mipsNN.h ============================================================================== --- head/sys/mips/include/cache_mipsNN.h Tue Jan 20 09:07:28 2015 (r277413) +++ head/sys/mips/include/cache_mipsNN.h Tue Jan 20 11:10:25 2015 (r277414) @@ -57,7 +57,6 @@ void mipsNN_pdcache_inv_range_16(vm_offs void mipsNN_pdcache_inv_range_32(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_16(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_32(vm_offset_t, vm_size_t); -#ifdef CPU_CNMIPS void mipsNN_icache_sync_all_128(void); void mipsNN_icache_sync_range_128(vm_offset_t, vm_size_t); void mipsNN_icache_sync_range_index_128(vm_offset_t, vm_size_t); @@ -66,7 +65,6 @@ void mipsNN_pdcache_wbinv_range_128(vm_o void mipsNN_pdcache_wbinv_range_index_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_inv_range_128(vm_offset_t, vm_size_t); void mipsNN_pdcache_wb_range_128(vm_offset_t, vm_size_t); -#endif void mipsNN_sdcache_wbinv_all_32(void); void mipsNN_sdcache_wbinv_range_32(vm_offset_t, vm_size_t); void mipsNN_sdcache_wbinv_range_index_32(vm_offset_t, vm_size_t); Modified: head/sys/mips/mips/cache.c ============================================================================== --- head/sys/mips/mips/cache.c Tue Jan 20 09:07:28 2015 (r277413) +++ head/sys/mips/mips/cache.c Tue Jan 20 11:10:25 2015 (r277414) @@ -104,7 +104,6 @@ mips_config_cache(struct mips_cpuinfo * mips_cache_ops.mco_icache_sync_range_index = mipsNN_icache_sync_range_index_32; break; -#ifdef CPU_CNMIPS case 128: mips_cache_ops.mco_icache_sync_all = mipsNN_icache_sync_all_128; mips_cache_ops.mco_icache_sync_range = @@ -112,7 +111,6 @@ mips_config_cache(struct mips_cpuinfo * mips_cache_ops.mco_icache_sync_range_index = mipsNN_icache_sync_range_index_128; break; -#endif #ifdef MIPS_DISABLE_L1_CACHE case 0: @@ -172,7 +170,6 @@ mips_config_cache(struct mips_cpuinfo * mipsNN_pdcache_wb_range_32; #endif break; -#ifdef CPU_CNMIPS case 128: mips_cache_ops.mco_pdcache_wbinv_all = mips_cache_ops.mco_intern_pdcache_wbinv_all = @@ -188,7 +185,6 @@ mips_config_cache(struct mips_cpuinfo * mips_cache_ops.mco_intern_pdcache_wb_range = mipsNN_pdcache_wb_range_128; break; -#endif #ifdef MIPS_DISABLE_L1_CACHE case 0: mips_cache_ops.mco_pdcache_wbinv_all = Modified: head/sys/mips/mips/cache_mipsNN.c ============================================================================== --- head/sys/mips/mips/cache_mipsNN.c Tue Jan 20 09:07:28 2015 (r277413) +++ head/sys/mips/mips/cache_mipsNN.c Tue Jan 20 11:10:25 2015 (r277414) @@ -647,6 +647,225 @@ mipsNN_pdcache_wb_range_128(vm_offset_t SYNC; } +#else + +void +mipsNN_icache_sync_all_128(void) +{ + vm_offset_t va, eva; + + va = MIPS_PHYS_TO_KSEG0(0); + eva = va + picache_size; + + /* + * Since we're hitting the whole thing, we don't have to + * worry about the N different "ways". + */ + + mips_intern_dcache_wbinv_all(); + + while (va < eva) { + cache_r4k_op_32lines_128(va, CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); + va += (32 * 128); + } + + SYNC; +} + +void +mipsNN_icache_sync_range_128(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line128(va + size); + va = trunc_line128(va); + + mips_intern_dcache_wb_range(va, (eva - va)); + + while ((eva - va) >= (32 * 128)) { + cache_r4k_op_32lines_128(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); + va += (32 * 128); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_I|CACHEOP_R4K_HIT_INV); + va += 128; + } + + SYNC; +} + +void +mipsNN_icache_sync_range_index_128(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva, tmpva; + int i, stride, loopcount; + + /* + * Since we're doing Index ops, we expect to not be able + * to access the address we've been given. So, get the + * bits that determine the cache index, and make a KSEG0 + * address out of them. + */ + va = MIPS_PHYS_TO_KSEG0(va & picache_way_mask); + + eva = round_line128(va + size); + va = trunc_line128(va); + + /* + * GCC generates better code in the loops if we reference local + * copies of these global variables. + */ + stride = picache_stride; + loopcount = picache_loopcount; + + mips_intern_dcache_wbinv_range_index(va, (eva - va)); + + while ((eva - va) >= (32 * 128)) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_r4k_op_32lines_128(tmpva, + CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); + va += 32 * 128; + } + + while (va < eva) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_op_r4k_line(tmpva, + CACHE_R4K_I|CACHEOP_R4K_INDEX_INV); + va += 128; + } +} + +void +mipsNN_pdcache_wbinv_all_128(void) +{ + vm_offset_t va, eva; + + va = MIPS_PHYS_TO_KSEG0(0); + eva = va + pdcache_size; + + /* + * Since we're hitting the whole thing, we don't have to + * worry about the N different "ways". + */ + + while (va < eva) { + cache_r4k_op_32lines_128(va, + CACHE_R4K_D|CACHEOP_R4K_INDEX_WB_INV); + va += (32 * 128); + } + + SYNC; +} + + +void +mipsNN_pdcache_wbinv_range_128(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line128(va + size); + va = trunc_line128(va); + + while ((eva - va) >= (32 * 128)) { + cache_r4k_op_32lines_128(va, + CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); + va += (32 * 128); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB_INV); + va += 128; + } + + SYNC; +} + +void +mipsNN_pdcache_wbinv_range_index_128(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva, tmpva; + int i, stride, loopcount; + + /* + * Since we're doing Index ops, we expect to not be able + * to access the address we've been given. So, get the + * bits that determine the cache index, and make a KSEG0 + * address out of them. + */ + va = MIPS_PHYS_TO_KSEG0(va & pdcache_way_mask); + + eva = round_line128(va + size); + va = trunc_line128(va); + + /* + * GCC generates better code in the loops if we reference local + * copies of these global variables. + */ + stride = pdcache_stride; + loopcount = pdcache_loopcount; + + while ((eva - va) >= (32 * 128)) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_r4k_op_32lines_128(tmpva, + CACHE_R4K_D|CACHEOP_R4K_INDEX_WB_INV); + va += 32 * 128; + } + + while (va < eva) { + tmpva = va; + for (i = 0; i < loopcount; i++, tmpva += stride) + cache_op_r4k_line(tmpva, + CACHE_R4K_D|CACHEOP_R4K_INDEX_WB_INV); + va += 128; + } +} + +void +mipsNN_pdcache_inv_range_128(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line128(va + size); + va = trunc_line128(va); + + while ((eva - va) >= (32 * 128)) { + cache_r4k_op_32lines_128(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); + va += (32 * 128); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_INV); + va += 128; + } + + SYNC; +} + +void +mipsNN_pdcache_wb_range_128(vm_offset_t va, vm_size_t size) +{ + vm_offset_t eva; + + eva = round_line128(va + size); + va = trunc_line128(va); + + while ((eva - va) >= (32 * 128)) { + cache_r4k_op_32lines_128(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); + va += (32 * 128); + } + + while (va < eva) { + cache_op_r4k_line(va, CACHE_R4K_D|CACHEOP_R4K_HIT_WB); + va += 128; + } + + SYNC; +} + #endif void From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 11:11:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6F33F948; Tue, 20 Jan 2015 11:11:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5AFFADAD; Tue, 20 Jan 2015 11:11:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KBBXDJ048046; Tue, 20 Jan 2015 11:11:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KBBXU6048027; Tue, 20 Jan 2015 11:11:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501201111.t0KBBXU6048027@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 20 Jan 2015 11:11:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277415 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 11:11:33 -0000 Author: andrew Date: Tue Jan 20 11:11:32 2015 New Revision: 277415 URL: https://svnweb.freebsd.org/changeset/base/277415 Log: Add the User and PL1 read only and reqd write thread ID registers. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/include/cpu-v6.h Modified: head/sys/arm/include/cpu-v6.h ============================================================================== --- head/sys/arm/include/cpu-v6.h Tue Jan 20 11:10:25 2015 (r277414) +++ head/sys/arm/include/cpu-v6.h Tue Jan 20 11:11:32 2015 (r277415) @@ -179,6 +179,13 @@ _WF1(cp15_pminten_set, CP15_PMINTENSET(% _WF1(cp15_pminten_clr, CP15_PMINTENCLR(%0)) #endif +_RF0(cp15_tpidrurw_get, CP15_TPIDRURW(%0)) +_WF1(cp15_tpidrurw_set, CP15_TPIDRURW(%0)) +_RF0(cp15_tpidruro_get, CP15_TPIDRURO(%0)) +_WF1(cp15_tpidruro_set, CP15_TPIDRURO(%0)) +_RF0(cp15_tpidrpwr_get, CP15_TPIDRPRW(%0)) +_WF1(cp15_tpidrpwr_set, CP15_TPIDRPRW(%0)) + #undef _FX #undef _RF0 #undef _WF0 From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 11:32:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E56A9CDC; Tue, 20 Jan 2015 11:32:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D19ECFC6; Tue, 20 Jan 2015 11:32:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KBWnGk057712; Tue, 20 Jan 2015 11:32:49 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KBWnbW057711; Tue, 20 Jan 2015 11:32:49 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501201132.t0KBWnbW057711@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 20 Jan 2015 11:32:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277416 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 11:32:50 -0000 Author: andrew Date: Tue Jan 20 11:32:48 2015 New Revision: 277416 URL: https://svnweb.freebsd.org/changeset/base/277416 Log: Remove the SMP code from locore-v4. These will never use the SMP code as there is no multi-core hardware prior to ARMv6. Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/locore-v4.S Modified: head/sys/arm/arm/locore-v4.S ============================================================================== --- head/sys/arm/arm/locore-v4.S Tue Jan 20 11:11:32 2015 (r277415) +++ head/sys/arm/arm/locore-v4.S Tue Jan 20 11:32:48 2015 (r277416) @@ -218,9 +218,6 @@ Lunmapped: bl build_pagetables #endif -#if defined(SMP) - orr r0, r0, #2 /* Set TTB shared memory flag */ -#endif mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ @@ -338,9 +335,6 @@ translate_va_to_pa: build_pagetables: /* Set the required page attributed */ ldr r4, =(L1_TYPE_S|L1_S_C|L1_S_AP(AP_KRW)) -#if defined(SMP) - orr r4, #(L1_SHARED) -#endif orr r1, r4 /* Move the virtual address to the correct bit location */ @@ -394,92 +388,6 @@ pagetable: .Lcpufuncs: .word _C_LABEL(cpufuncs) -#if defined(SMP) - -.Lmpvirt_done: - .word mpvirt_done -VA_TO_PA_POINTER(Lstartup_pagetable_secondary, temp_pagetable) - -ASENTRY_NP(mpentry) - - /* Make sure interrupts are disabled. */ - mrs r7, cpsr - orr r7, r7, #(PSR_I | PSR_F) - msr cpsr_c, r7 - - /* Disable MMU. It should be disabled already, but make sure. */ - mrc p15, 0, r2, c1, c0, 0 - bic r2, r2, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ - CPU_CONTROL_WBUF_ENABLE) - bic r2, r2, #(CPU_CONTROL_IC_ENABLE) - bic r2, r2, #(CPU_CONTROL_BPRD_ENABLE) - mcr p15, 0, r2, c1, c0, 0 - nop - nop - nop - CPWAIT(r0) - -#if ARM_MMU_V6 - bl armv6_idcache_inv_all /* Modifies r0 only */ -#elif ARM_MMU_V7 - bl armv7_idcache_inv_all /* Modifies r0-r3, ip */ -#endif - - /* Load the page table physical address */ - adr r0, Lstartup_pagetable_secondary - bl translate_va_to_pa - /* Load the address the secondary page table */ - ldr r0, [r0] - - orr r0, r0, #2 /* Set TTB shared memory flag */ - mcr p15, 0, r0, c2, c0, 0 /* Set TTB */ - mcr p15, 0, r0, c8, c7, 0 /* Flush TLB */ - - mov r0, #0 - mcr p15, 0, r0, c13, c0, 1 /* Set ASID to 0 */ - - /* 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 */ - mrc p15, 0, r0, c1, c0, 0 - orr r0, r0, #CPU_CONTROL_V6_EXTPAGE - orr r0, r0, #CPU_CONTROL_AF_ENABLE - orr r0, r0, #(CPU_CONTROL_MMU_ENABLE | CPU_CONTROL_DC_ENABLE |\ - CPU_CONTROL_WBUF_ENABLE) - orr r0, r0, #(CPU_CONTROL_IC_ENABLE) - orr r0, r0, #(CPU_CONTROL_BPRD_ENABLE) - mcr p15, 0, r0, c1, c0, 0 - nop - nop - nop - CPWAIT(r0) - - adr r1, .Lstart - ldmia r1, {r1, r2, sp} /* Set initial stack and */ - mrc p15, 0, r0, c0, c0, 5 - and r0, r0, #15 - mov r1, #2048 - mul r2, r1, r0 - sub sp, sp, r2 - str r1, [sp] - ldr pc, .Lmpvirt_done - -mpvirt_done: - - mov fp, #0 /* trace back starts here */ - bl _C_LABEL(init_secondary) /* Off we go */ - - adr r0, .Lmpreturned - b _C_LABEL(panic) - /* NOTREACHED */ - -.Lmpreturned: - .asciz "init_secondary() returned" - .align 2 -END(mpentry) -#endif - ENTRY_NP(cpu_halt) mrs r2, cpsr bic r2, r2, #(PSR_MODE) From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 11:43:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8EDB5ED3; Tue, 20 Jan 2015 11:43:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A96B112; Tue, 20 Jan 2015 11:43:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KBhH7R062378; Tue, 20 Jan 2015 11:43:17 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KBhHKN062377; Tue, 20 Jan 2015 11:43:17 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501201143.t0KBhHKN062377@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 20 Jan 2015 11:43:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277417 - head/sys/dev/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 11:43:17 -0000 Author: hselasky Date: Tue Jan 20 11:43:16 2015 New Revision: 277417 URL: https://svnweb.freebsd.org/changeset/base/277417 Log: Fix returned data for the USB_GET_DEV_PORT_PATH IOCTL in particular the value returned in the "udp_port_level" field. Reported by: Uffe Jakobsen MFC after: 1 week Modified: head/sys/dev/usb/usb_generic.c Modified: head/sys/dev/usb/usb_generic.c ============================================================================== --- head/sys/dev/usb/usb_generic.c Tue Jan 20 11:32:48 2015 (r277416) +++ head/sys/dev/usb/usb_generic.c Tue Jan 20 11:43:16 2015 (r277417) @@ -1849,14 +1849,13 @@ ugen_get_port_path(struct usb_fifo *f, s if (nlevel > USB_DEVICE_PORT_PATH_MAX) goto error; + /* store total level of ports */ + dpp->udp_port_level = nlevel; + /* store port index array */ next = udev; while (next->parent_hub != NULL) { - nlevel--; - - dpp->udp_port_no[nlevel] = next->port_no; - dpp->udp_port_level = nlevel; - + dpp->udp_port_no[--nlevel] = next->port_no; next = next->parent_hub; } return (0); /* success */ From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 12:28:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 615E61A3; Tue, 20 Jan 2015 12:28:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 32F1B804; Tue, 20 Jan 2015 12:28:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KCSPC8082944; Tue, 20 Jan 2015 12:28:25 GMT (envelope-from royger@FreeBSD.org) Received: (from royger@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KCSOPR082941; Tue, 20 Jan 2015 12:28:24 GMT (envelope-from royger@FreeBSD.org) Message-Id: <201501201228.t0KCSOPR082941@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: royger set sender to royger@FreeBSD.org using -f From: Roger Pau Monné Date: Tue, 20 Jan 2015 12:28:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277418 - in head/sys: boot/i386/libi386 x86/xen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 12:28:25 -0000 Author: royger Date: Tue Jan 20 12:28:24 2015 New Revision: 277418 URL: https://svnweb.freebsd.org/changeset/base/277418 Log: loader: fix the size of MODINFOMD_MODULEP The data in MODINFOMD_MODULEP is packed by the loader as a 4 byte type, but the amd64 kernel expects a vm_paddr_t, which is of size 8 bytes. Fix this by saving it as 8 bytes in the loader and retrieving it using the proper type in the kernel. Sponsored by: Citrix Systems R&D Modified: head/sys/boot/i386/libi386/bootinfo64.c head/sys/x86/xen/pv.c Modified: head/sys/boot/i386/libi386/bootinfo64.c ============================================================================== --- head/sys/boot/i386/libi386/bootinfo64.c Tue Jan 20 11:43:16 2015 (r277417) +++ head/sys/boot/i386/libi386/bootinfo64.c Tue Jan 20 12:28:24 2015 (r277418) @@ -185,6 +185,7 @@ bi_load64(char *args, vm_offset_t addr, struct file_metadata *md; u_int64_t kernend; u_int64_t envp; + u_int64_t module; vm_offset_t size; char *rootdevname; int howto; @@ -222,7 +223,7 @@ bi_load64(char *args, vm_offset_t addr, addr = roundup(addr, PAGE_SIZE); /* place the metadata before anything */ - *modulep = addr; + module = *modulep = addr; kfp = file_findfile(NULL, "elf kernel"); if (kfp == NULL) @@ -233,7 +234,7 @@ bi_load64(char *args, vm_offset_t addr, file_addmetadata(kfp, MODINFOMD_HOWTO, sizeof howto, &howto); file_addmetadata(kfp, MODINFOMD_ENVP, sizeof envp, &envp); file_addmetadata(kfp, MODINFOMD_KERNEND, sizeof kernend, &kernend); - file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof modulep, modulep); + file_addmetadata(kfp, MODINFOMD_MODULEP, sizeof module, &module); if (add_smap != 0) bios_addsmapdata(kfp); Modified: head/sys/x86/xen/pv.c ============================================================================== --- head/sys/x86/xen/pv.c Tue Jan 20 11:43:16 2015 (r277417) +++ head/sys/x86/xen/pv.c Tue Jan 20 12:28:24 2015 (r277418) @@ -402,7 +402,7 @@ xen_pv_parse_preload_data(u_int64_t modu * then calculating the offset with mod_start, * which contains the relocated modulep address. */ - metadata = MD_FETCH(kmdp, MODINFOMD_MODULEP, int); + metadata = MD_FETCH(kmdp, MODINFOMD_MODULEP, vm_paddr_t); off = HYPERVISOR_start_info->mod_start - metadata; preload_bootstrap_relocate(off); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 13:09:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31B26CE7; Tue, 20 Jan 2015 13:09:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D9DEC24; Tue, 20 Jan 2015 13:09:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KD9CsC002764; Tue, 20 Jan 2015 13:09:12 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KD9Cid002762; Tue, 20 Jan 2015 13:09:12 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501201309.t0KD9Cid002762@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Tue, 20 Jan 2015 13:09:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277419 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 13:09:13 -0000 Author: mav Date: Tue Jan 20 13:09:12 2015 New Revision: 277419 URL: https://svnweb.freebsd.org/changeset/base/277419 Log: Allow skipping dmu_buf_will_dirty() call in dsl_dir_transfer_space(). dsl_dir_transfer_space() is mostly called after dsl_dir_diduse_space(), which already calls dmu_buf_will_dirty() for the same dbuf and tx, so its duplicate call in those cases will change nothing, only spend time. Skipping this call by four times reduces time spent in dbuf_write_done() and descendants, updating dataset statistics with several congested lock acquisitions. When rewriting 8K zvol blocks at 1GB/s rate, this reduces CPU time spent inside dbuf_write_done(), according to profiling, from 45% of 683K samples to 18% of 422K. MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jan 20 12:28:24 2015 (r277418) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Tue Jan 20 13:09:12 2015 (r277419) @@ -136,7 +136,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, compressed, uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, used - delta, - DD_USED_REFRSRV, DD_USED_HEAD, tx); + DD_USED_REFRSRV, DD_USED_HEAD, NULL); } int @@ -179,7 +179,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, -compressed, -uncompressed, tx); dsl_dir_transfer_space(ds->ds_dir, -used - delta, - DD_USED_REFRSRV, DD_USED_HEAD, tx); + DD_USED_REFRSRV, DD_USED_HEAD, NULL); } else { dprintf_bp(bp, "putting on dead list: %s", ""); if (async) { @@ -2837,7 +2837,7 @@ dsl_dataset_clone_swap_sync_impl(dsl_dat origin_head->ds_dir->dd_origin_txg, UINT64_MAX, &odl_used, &odl_comp, &odl_uncomp); dsl_dir_transfer_space(origin_head->ds_dir, cdl_used - odl_used, - DD_USED_HEAD, DD_USED_SNAP, tx); + DD_USED_HEAD, DD_USED_SNAP, NULL); } /* swap ds_*_bytes */ Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Jan 20 12:28:24 2015 (r277418) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c Tue Jan 20 13:09:12 2015 (r277419) @@ -1389,7 +1389,7 @@ dsl_dir_diduse_space(dsl_dir_t *dd, dd_u accounted_delta, compressed, uncompressed, tx); dsl_dir_transfer_space(dd->dd_parent, used - accounted_delta, - DD_USED_CHILD_RSRV, DD_USED_CHILD, tx); + DD_USED_CHILD_RSRV, DD_USED_CHILD, NULL); } } @@ -1397,7 +1397,7 @@ void dsl_dir_transfer_space(dsl_dir_t *dd, int64_t delta, dd_used_t oldtype, dd_used_t newtype, dmu_tx_t *tx) { - ASSERT(dmu_tx_is_syncing(tx)); + ASSERT(tx == NULL || dmu_tx_is_syncing(tx)); ASSERT(oldtype < DD_USED_NUM); ASSERT(newtype < DD_USED_NUM); @@ -1405,7 +1405,8 @@ dsl_dir_transfer_space(dsl_dir_t *dd, in !(dsl_dir_phys(dd)->dd_flags & DD_FLAG_USED_BREAKDOWN)) return; - dmu_buf_will_dirty(dd->dd_dbuf, tx); + if (tx != NULL) + dmu_buf_will_dirty(dd->dd_dbuf, tx); mutex_enter(&dd->dd_lock); ASSERT(delta > 0 ? dsl_dir_phys(dd)->dd_used_breakdown[oldtype] >= delta : From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 14:23:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A693D276; Tue, 20 Jan 2015 14:23:00 +0000 (UTC) Received: from mail-qg0-x233.google.com (mail-qg0-x233.google.com [IPv6:2607:f8b0:400d:c04::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3D375B; Tue, 20 Jan 2015 14:23:00 +0000 (UTC) Received: by mail-qg0-f51.google.com with SMTP id z107so8026204qgd.10; Tue, 20 Jan 2015 06:22:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=lfr3EybwKOYWDbx+x7IcH1zlf3Dcy+kRKgbQhGwerME=; b=UUcOLAY9MhHeWjOxMoZ/ucf/PxVv1w+Yo+4jqh+qdV7B30Nd6wEurNVVJGF4GYSBLb HsRTslhc8ogTfKwbYVtgaZSv9bQRUtX0ubS9JNUjF2VEha6EaErZnRgqj/6Cszjq2Q00 qme1KZBCVcVbKjo2bh0rXsZXKKIqmbhEOtewQID9RvtKQxrkKHAtzfyNt0sWJ2wbrAal Jkrb5SGpBg9H+HHfB3ePFLTkVFl2aDZcjDB2yjbEuKjQjTLE5ymSytBgeo9x/Kxcl1mw gyCgxMPO3vQS+S/Nc+PajtJKsTgXKv9TWLtVH7/VFl1ETAdplJ9GjhwMGKmp6kWsxn/o AGwg== X-Received: by 10.140.37.39 with SMTP id q36mr43991733qgq.89.1421763779603; Tue, 20 Jan 2015 06:22:59 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.38.100 with HTTP; Tue, 20 Jan 2015 06:22:38 -0800 (PST) In-Reply-To: <54B80CB6.5030102@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54B7E287.80406@FreeBSD.org> <54B7E566.8050601@selasky.org> <20150115171430.GO15484@FreeBSD.org> <20150115171539.GP15484@FreeBSD.org> <54B80CB6.5030102@FreeBSD.org> From: Ed Maste Date: Tue, 20 Jan 2015 09:22:38 -0500 X-Google-Sender-Auth: 8TQitBMbn65T3dShiwazSdjQNfw Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys To: John Baldwin Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Sean Bruno , Gleb Smirnoff , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 14:23:00 -0000 On 15 January 2015 at 13:53, John Baldwin wrote: > > I think it's been a > clear practice with all other changes reviewed in phabric to date that > the committer only lists people in 'Reviewed by' who actually signed off > on the patch, not just the list of people asked to review it. This point is worth repeating. Phabricator is an add-on tool to aid in pre-commit review, but is not a required part of our process and doesn't change the meaning of commit message metadata fields. "Reviewed by" in a commit message means exactly what it always has: that those listed have reasonably carefully reviewed the change and are willing to put their name on it. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 14:26:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 249803EC; Tue, 20 Jan 2015 14:26:03 +0000 (UTC) Received: from mail-qc0-x22c.google.com (mail-qc0-x22c.google.com [IPv6:2607:f8b0:400d:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CD4AD782; Tue, 20 Jan 2015 14:26:02 +0000 (UTC) Received: by mail-qc0-f172.google.com with SMTP id i8so22246190qcq.3; Tue, 20 Jan 2015 06:26:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=Cel6iHVTbRcb5Uc6EL1LpsV0yjIEhxeCED8AR6Nzlp8=; b=nRk6AgMjcltXJEKAlYVYjESSrJv8T9p20zf7oemY9t6bkCU2BMMCY0NjuEUXsu82PM HNDQ2l7MDD6ovnGOeEbZzyh6IAZIS1Xf5XG42QMWn/ySdNtccxG5G14OCQYhKx57tvET 8Ay1kIEr8DYGtiq4G+FPAjh7hFO8OHXft7wapSGGuo1fDXkWvXADYgIxbso/ocEWQLc6 /nN49CEHOmca/IQ4hbJvocNcpvgJwVOQRqpwb6N4BHTJZNQo93VdNRZTVRTfzeGCYZ81 TnsVWQWYXePcv7FSpmsLPQbJ6gRiLcrlfIusnh/JObwvOW8eAiYCx4/1R9v9GRovgz57 yJNg== X-Received: by 10.224.45.195 with SMTP id g3mr58155148qaf.59.1421763961913; Tue, 20 Jan 2015 06:26:01 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.38.100 with HTTP; Tue, 20 Jan 2015 06:25:41 -0800 (PST) In-Reply-To: <54BE21F0.6010602@selasky.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> From: Ed Maste Date: Tue, 20 Jan 2015 09:25:41 -0500 X-Google-Sender-Auth: mUzyHe_VsvSQbwSj-yWJpvq-ySU Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 14:26:03 -0000 On 20 January 2015 at 04:37, Hans Petter Selasky wrote: > > It is not very hard to update existing callout clients and you can do it > too, if you need the extra bits of performance. Hi Hans Petter, The issue here is that the onus is on the one changing a KPI to support its consumers through the transition. This doesn't necessarily mean doing all of the work. But the KPI changes, and techniques for adapting to them, need to be communicated very well in advance of the change arriving. I appreciate that you have a patch for TCP in review now - but having Adrian encounter a huge TCP performance regression is an unfortunate way to discover this issue. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 15:01:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 482D9B60; Tue, 20 Jan 2015 15:01:36 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C44CABA2; Tue, 20 Jan 2015 15:01:35 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0KF1Tax077303 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 17:01:29 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0KF1Tax077303 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0KF1TMR077302; Tue, 20 Jan 2015 17:01:29 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Jan 2015 17:01:29 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150120150129.GF42409@kib.kiev.ua> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BE21F0.6010602@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 15:01:36 -0000 On Tue, Jan 20, 2015 at 10:37:52AM +0100, Hans Petter Selasky wrote: > On 01/20/15 10:00, Konstantin Belousov wrote: > > On Tue, Jan 20, 2015 at 08:58:34AM +0100, Hans Petter Selasky wrote: > >> On 01/20/15 08:51, Konstantin Belousov wrote: > >>> On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky wrote: > >>>> On 01/19/15 22:59, Adrian Chadd wrote: > >>>>> Hi, > >>>>> > >>>>> Would you please check what the results of this are with CPU specific > >>>>> callwheels? > >>>>> > >>>>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on > >>>>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is > >>>>> enabled. But all the callwheels are now back on clock(0) and so is the > >>>>> lock contention. :( > >>>>> > >>>>> Thanks, > >>>>> > >>>> > >>>> Hi, > >>>> > >>>> Like stated in the manual page, callout_reset_curcpu/on() does not work > >>>> with MPSAFE callouts any more! > >>> I.e. you 'fixed' some undeterminate bugs in callout migration by not > >>> doing migration at all anymore. > >>> > >>>> > >>>> You need to use callout_init_{mtx,rm,rw} and remove the custom locking > >>>> inside the callback in the TCP stack to get it working like before! > >>> > >>> No, you need to do this, if you think that whole callout KPI must be > >>> rototiled. It is up to the person who modifies the KPI, to ensure that > >>> existing code is not broken. > > Hi, > > It is not very hard to update existing callout clients and you can do it > too, if you need the extra bits of performance. I want to avoid regressions, and avoid breaking other' people work. > > Are there more API's than the TCP stack which you think needs an update > and are performance critical? I did not performed any analysis. More, I naturally expect that such analysis and demonstration that there is no regression, is the duty of the person who proposes the change. > > >>> > >>> As I understand, currently we are back to the one-cpu callouts. > >>> Do other people consider this situation acceptable ? > > For the TCP stack - yes, but not for other clients like cv_timedwait() > and such. > > If you think you have a better way to solve the callout problems, please > tell me! In order for a callout to change its CPU you need a lock to > protect which CPU the callout is on. Instead of introducing a third lock > in the callout path, which will be a congestion point, to protect > against changing the CPU number, I decided that we will use the client's > mutex and the MPSAFE implies the client doesn't have any mutex. So it > won't work with callout clients which use the CALLOUT_MPSAFE flag. > Honestly CALLOUT_MPSAFE should not be used, because it leads to extra > complexity in the clients catching the race when tearing down the > callouts and any pending callbacks. This is your opinion. I did fixed some bugs in the callout migration code, and I am not sure that requiring rototiling of almost all KPI consumers (and leaving unconverted consumers to pre-cpu state) is the only possible solution. But again, since it is you who brought the change into the tree, it is your duty to present a valid proof why this is the only possible way to solve bugs (which bugs ?). > > >> > >> Please read the callout 9 manual page first. > > > > Assume I read it. How this changes any of my points above ? > > """ > > A change in the CPU selection cannot happen if this function is > > re-scheduled inside a callout function. Else the callback function given > > by the func argument will be executed on the same CPU like previously > > done. > > """ > > You cannot do this without fixing consumers. > > > > The code simply needs an update. It is not broken in any ways - right? > If it is not broken, fixing it is not that urgent. Isn't it obvious ? If callouts no longer migrate to non-BSP, this is the regression. I am sorry for you attitude. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 15:45:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D31174CE; Tue, 20 Jan 2015 15:45:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B43A18E; Tue, 20 Jan 2015 15:45:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KFjAiW078043; Tue, 20 Jan 2015 15:45:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KFjAkc078042; Tue, 20 Jan 2015 15:45:10 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501201545.t0KFjAkc078042@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 20 Jan 2015 15:45:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277420 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 15:45:11 -0000 Author: br Date: Tue Jan 20 15:45:09 2015 New Revision: 277420 URL: https://svnweb.freebsd.org/changeset/base/277420 Log: o Do notify USB host each time we receive 'set packet filter' request. This makes Mac OS X happy when it returns back from suspending. o Switch notify state after data is transferred, but not before. o Consider there is also Super Speed mode. o Do not set stall bit on any pipes in device mode as Mac OS X seems don't support it. In collaboration with: hselasky@ Modified: head/sys/dev/usb/net/if_cdce.c Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Tue Jan 20 13:09:12 2015 (r277419) +++ head/sys/dev/usb/net/if_cdce.c Tue Jan 20 15:45:09 2015 (r277420) @@ -857,9 +857,12 @@ tr_setup: if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - goto tr_setup; + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + } else { + goto tr_setup; + } } break; } @@ -1024,10 +1027,12 @@ cdce_bulk_read_callback(struct usb_xfer if (error != USB_ERR_CANCELLED) { tr_stall: - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - usbd_xfer_set_frames(xfer, 0); - usbd_transfer_submit(xfer); + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + usbd_xfer_set_frames(xfer, 0); + usbd_transfer_submit(xfer); + } break; } @@ -1040,6 +1045,7 @@ tr_stall: static void cdce_intr_read_callback(struct usb_xfer *xfer, usb_error_t error) { + struct cdce_softc *sc = usbd_xfer_softc(xfer); int actlen; usbd_xfer_status(xfer, &actlen, NULL, NULL, NULL); @@ -1061,8 +1067,10 @@ tr_setup: default: /* Error */ if (error != USB_ERR_CANCELLED) { /* start clear stall */ - usbd_xfer_set_stall(xfer); - goto tr_setup; + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) + usbd_xfer_set_stall(xfer); + else + goto tr_setup; } break; } @@ -1084,6 +1092,17 @@ cdce_intr_write_callback(struct usb_xfer DPRINTF("Transferred %d bytes\n", actlen); + switch (sc->sc_notify_state) { + case (CDCE_NOTIFY_NETWORK_CONNECTION): + sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; + break; + case (CDCE_NOTIFY_SPEED_CHANGE): + sc->sc_notify_state = CDCE_NOTIFY_DONE; + break; + default: + break; + } + /* FALLTHROUGH */ case USB_ST_SETUP: tr_setup: @@ -1105,7 +1124,6 @@ tr_setup: usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); usbd_xfer_set_frames(xfer, 1); usbd_transfer_submit(xfer); - sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; } else if (sc->sc_notify_state == CDCE_NOTIFY_SPEED_CHANGE) { req.bmRequestType = UCDC_NOTIFICATION; @@ -1116,7 +1134,7 @@ tr_setup: USETW(req.wLength, 8); /* Peak theoretical bulk trasfer rate in bits/s */ - if (usbd_get_speed(sc->sc_ue.ue_udev) == USB_SPEED_HIGH) + if (usbd_get_speed(sc->sc_ue.ue_udev) != USB_SPEED_FULL) speed = (13 * 512 * 8 * 1000 * 8); else speed = (19 * 64 * 1 * 1000 * 8); @@ -1129,15 +1147,17 @@ tr_setup: usbd_xfer_set_frame_len(xfer, 0, sizeof(req)); usbd_xfer_set_frames(xfer, 1); usbd_transfer_submit(xfer); - sc->sc_notify_state = CDCE_NOTIFY_DONE; } break; default: /* Error */ if (error != USB_ERR_CANCELLED) { - /* start clear stall */ - usbd_xfer_set_stall(xfer); - goto tr_setup; + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { + /* start clear stall */ + usbd_xfer_set_stall(xfer); + } else { + goto tr_setup; + } } break; } @@ -1145,9 +1165,30 @@ tr_setup: static int cdce_handle_request(device_t dev, - const void *req, void **pptr, uint16_t *plen, + const void *preq, void **pptr, uint16_t *plen, uint16_t offset, uint8_t *pstate) { + struct cdce_softc *sc = device_get_softc(dev); + const struct usb_device_request *req = preq; + uint8_t is_complete = *pstate; + + /* + * When Mac OS X resumes after suspending it expects + * to be notified again after this request. + */ + if (req->bmRequestType == UT_WRITE_CLASS_INTERFACE && \ + req->bRequest == UCDC_NCM_SET_ETHERNET_PACKET_FILTER) { + + if (is_complete == 1) { + mtx_lock(&sc->sc_mtx); + sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; + usbd_transfer_start(sc->sc_xfer[CDCE_INTR_TX]); + mtx_unlock(&sc->sc_mtx); + } + + return (0); + } + return (ENXIO); /* use builtin handler */ } @@ -1363,10 +1404,12 @@ cdce_ncm_bulk_write_callback(struct usb_ if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); if (error != USB_ERR_CANCELLED) { - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - usbd_xfer_set_frames(xfer, 0); - usbd_transfer_submit(xfer); + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + usbd_xfer_set_frames(xfer, 0); + usbd_transfer_submit(xfer); + } } break; } @@ -1524,10 +1567,12 @@ tr_setup: if (error != USB_ERR_CANCELLED) { tr_stall: - /* try to clear stall first */ - usbd_xfer_set_stall(xfer); - usbd_xfer_set_frames(xfer, 0); - usbd_transfer_submit(xfer); + if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { + /* try to clear stall first */ + usbd_xfer_set_stall(xfer); + usbd_xfer_set_frames(xfer, 0); + usbd_transfer_submit(xfer); + } } break; } From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 16:15:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9A3A2F00; Tue, 20 Jan 2015 16:15:44 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B54A657; Tue, 20 Jan 2015 16:15:44 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id rd18so8668480iec.7; Tue, 20 Jan 2015 08:15:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=xYGnGAFcRA4ktvpmrbqFLTzHK721ReOACainDZZE1Po=; b=LOEHENLydM0TzBo9d5DuDADDV2FEgXTuJj33vibNTrWl5dDaYcV7AlIipNFq5Tcykp Ch755qFYqPzS0ItSQx7F76NYdBanjsQO3PIoKLGMfdsgswS2IJMSMFutRiev63oAgEju fJKLmm2Nsk5uEF7HDBwcr9dj5Y/I5b56R4coJBwqUBCcZqcvzyODYzwA7Q0MJwBeWa8b JkGZsJnUesDyZqpkmbDLPzawHqk0Isq5WQ2ef1UxdqGLFbvkumtWMemrXkW8YUePFJVe oNi79tt7DEoIP9T6807Jl7UoRoScc7YT08unQ+bLP8C6yWstJK9wTNn+HKUBFyXoPJ53 +vTg== MIME-Version: 1.0 X-Received: by 10.50.66.171 with SMTP id g11mr27491766igt.49.1421770543726; Tue, 20 Jan 2015 08:15:43 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Tue, 20 Jan 2015 08:15:43 -0800 (PST) In-Reply-To: References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> Date: Tue, 20 Jan 2015 08:15:43 -0800 X-Google-Sender-Auth: bZMODHJ8mWDEhNVY-glu9_jdLBE Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Ed Maste Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , Konstantin Belousov , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 16:15:44 -0000 On 20 January 2015 at 06:25, Ed Maste wrote: > On 20 January 2015 at 04:37, Hans Petter Selasky wrote: >> >> It is not very hard to update existing callout clients and you can do it >> too, if you need the extra bits of performance. > > Hi Hans Petter, > > The issue here is that the onus is on the one changing a KPI to > support its consumers through the transition. This doesn't necessarily > mean doing all of the work. But the KPI changes, and techniques for > adapting to them, need to be communicated very well in advance of the > change arriving. > > I appreciate that you have a patch for TCP in review now - but having > Adrian encounter a huge TCP performance regression is an unfortunate > way to discover this issue. I'm +1 on the "think it's the right, clean solution for the callout stuff" as I've done this stuff in userland a few times and it gets hairy very quickly when you try to support multiple ways to schedule, cancel and migrate events from arbitrary CPUs. I'm -1 on the rapid change without fixing other consumers, but I'm definitely +1 on the quick help from Hans on it. The TCP patch will need some closer review by people who have recently worked on the TCP stack and locking. I'll try to get the Verisign developers looped in as they touched this stuff recently. I do think we could do with a debugging print for now to catch situations which need migrating. The callout API doesn't tell you that it did or didn't migrate an event to another CPU and it could make for some performance unpredictability. -a From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 16:22:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0CA0622E; Tue, 20 Jan 2015 16:22:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED01079C; Tue, 20 Jan 2015 16:21:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KGLxPa096725; Tue, 20 Jan 2015 16:21:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KGLx26096724; Tue, 20 Jan 2015 16:21:59 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501201621.t0KGLx26096724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Tue, 20 Jan 2015 16:21:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277421 - head/sys/powerpc/powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 16:22:00 -0000 Author: nwhitehorn Date: Tue Jan 20 16:21:59 2015 New Revision: 277421 URL: https://svnweb.freebsd.org/changeset/base/277421 Log: There does not seem to be any reason to acquire GIANT here. Follow amd64 in removing it. MFC after: 1 month Modified: head/sys/powerpc/powerpc/mem.c Modified: head/sys/powerpc/powerpc/mem.c ============================================================================== --- head/sys/powerpc/powerpc/mem.c Tue Jan 20 15:45:09 2015 (r277420) +++ head/sys/powerpc/powerpc/mem.c Tue Jan 20 16:21:59 2015 (r277421) @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, cnt = 0; error = 0; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; if (iov->iov_len == 0) { From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 16:30:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2B2B6A0; Tue, 20 Jan 2015 16:30:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF780837; Tue, 20 Jan 2015 16:30:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KGU3bs097971; Tue, 20 Jan 2015 16:30:03 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KGU31c097969; Tue, 20 Jan 2015 16:30:03 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501201630.t0KGU31c097969@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 20 Jan 2015 16:30:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277422 - head/sys/dev/usb/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 16:30:04 -0000 Author: br Date: Tue Jan 20 16:30:02 2015 New Revision: 277422 URL: https://svnweb.freebsd.org/changeset/base/277422 Log: o Restore 'goto tr_setup;' when operating in host mode mistakenly removed in r277414. o Remove extra parentheses around cases. Modified: head/sys/dev/usb/net/if_cdce.c Modified: head/sys/dev/usb/net/if_cdce.c ============================================================================== --- head/sys/dev/usb/net/if_cdce.c Tue Jan 20 16:21:59 2015 (r277421) +++ head/sys/dev/usb/net/if_cdce.c Tue Jan 20 16:30:02 2015 (r277422) @@ -860,9 +860,8 @@ tr_setup: if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { /* try to clear stall first */ usbd_xfer_set_stall(xfer); - } else { - goto tr_setup; } + goto tr_setup; } break; } @@ -1069,8 +1068,7 @@ tr_setup: /* start clear stall */ if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) usbd_xfer_set_stall(xfer); - else - goto tr_setup; + goto tr_setup; } break; } @@ -1093,10 +1091,10 @@ cdce_intr_write_callback(struct usb_xfer DPRINTF("Transferred %d bytes\n", actlen); switch (sc->sc_notify_state) { - case (CDCE_NOTIFY_NETWORK_CONNECTION): + case CDCE_NOTIFY_NETWORK_CONNECTION: sc->sc_notify_state = CDCE_NOTIFY_SPEED_CHANGE; break; - case (CDCE_NOTIFY_SPEED_CHANGE): + case CDCE_NOTIFY_SPEED_CHANGE: sc->sc_notify_state = CDCE_NOTIFY_DONE; break; default: @@ -1155,9 +1153,8 @@ tr_setup: if (usbd_get_mode(sc->sc_ue.ue_udev) == USB_MODE_HOST) { /* start clear stall */ usbd_xfer_set_stall(xfer); - } else { - goto tr_setup; } + goto tr_setup; } break; } From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 17:00:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE902E9B; Tue, 20 Jan 2015 17:00:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA9AEB78; Tue, 20 Jan 2015 17:00:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KH0TOo012517; Tue, 20 Jan 2015 17:00:29 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KH0TiR012516; Tue, 20 Jan 2015 17:00:29 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201501201700.t0KH0TiR012516@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Tue, 20 Jan 2015 17:00:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277423 - head/contrib/llvm/tools/clang/lib/Driver X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 17:00:29 -0000 Author: sbruno Date: Tue Jan 20 17:00:28 2015 New Revision: 277423 URL: https://svnweb.freebsd.org/changeset/base/277423 Log: Allow clang to be built for mips/mips64 backend types by adding our mips triple ids This only allows testing and does not change the defaults for mips/mips64. They still build/use gcc by default. Differential Revision: https://reviews.freebsd.org/D1190 Reviewed by: dim Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Jan 20 16:30:02 2015 (r277422) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Tue Jan 20 17:00:28 2015 (r277423) @@ -6587,6 +6587,17 @@ void freebsd::Link::ConstructJob(Compila CmdArgs.push_back("elf32ppc_fbsd"); } + if (Arg *A = Args.getLastArg(options::OPT_G)) { + if (ToolChain.getArch() == llvm::Triple::mips || + ToolChain.getArch() == llvm::Triple::mipsel || + ToolChain.getArch() == llvm::Triple::mips64 || + ToolChain.getArch() == llvm::Triple::mips64el) { + StringRef v = A->getValue(); + CmdArgs.push_back(Args.MakeArgString("-G" + v)); + A->claim(); + } + } + if (Output.isFilename()) { CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 19:02:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3BCD65F3; Tue, 20 Jan 2015 19:02:45 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11333BCE; Tue, 20 Jan 2015 19:02:45 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id F3C1DB990; Tue, 20 Jan 2015 14:02:43 -0500 (EST) From: John Baldwin To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Date: Tue, 20 Jan 2015 11:07:53 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> In-Reply-To: <54BE21F0.6010602@selasky.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="windows-1252" Content-Transfer-Encoding: 7bit Message-Id: <201501201107.53553.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Jan 2015 14:02:44 -0500 (EST) Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 19:02:45 -0000 On Tuesday, January 20, 2015 4:37:52 am Hans Petter Selasky wrote: > On 01/20/15 10:00, Konstantin Belousov wrote: > > On Tue, Jan 20, 2015 at 08:58:34AM +0100, Hans Petter Selasky wrote: > >> On 01/20/15 08:51, Konstantin Belousov wrote: > >>> On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky wrote: > >>>> On 01/19/15 22:59, Adrian Chadd wrote: > >>>>> Hi, > >>>>> > >>>>> Would you please check what the results of this are with CPU specific > >>>>> callwheels? > >>>>> > >>>>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled (on > >>>>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is > >>>>> enabled. But all the callwheels are now back on clock(0) and so is the > >>>>> lock contention. :( > >>>>> > >>>>> Thanks, > >>>>> > >>>> > >>>> Hi, > >>>> > >>>> Like stated in the manual page, callout_reset_curcpu/on() does not work > >>>> with MPSAFE callouts any more! > >>> I.e. you 'fixed' some undeterminate bugs in callout migration by not > >>> doing migration at all anymore. > >>> > >>>> > >>>> You need to use callout_init_{mtx,rm,rw} and remove the custom locking > >>>> inside the callback in the TCP stack to get it working like before! > >>> > >>> No, you need to do this, if you think that whole callout KPI must be > >>> rototiled. It is up to the person who modifies the KPI, to ensure that > >>> existing code is not broken. > > Hi, > > It is not very hard to update existing callout clients and you can do it > too, if you need the extra bits of performance. > > Are there more API's than the TCP stack which you think needs an update > and are performance critical? > > >>> > >>> As I understand, currently we are back to the one-cpu callouts. > >>> Do other people consider this situation acceptable ? > > For the TCP stack - yes, but not for other clients like cv_timedwait() > and such. > > If you think you have a better way to solve the callout problems, please > tell me! In order for a callout to change its CPU you need a lock to > protect which CPU the callout is on. Instead of introducing a third lock > in the callout path, which will be a congestion point, to protect > against changing the CPU number, I decided that we will use the client's > mutex and the MPSAFE implies the client doesn't have any mutex. So it > won't work with callout clients which use the CALLOUT_MPSAFE flag. > Honestly CALLOUT_MPSAFE should not be used, because it leads to extra > complexity in the clients catching the race when tearing down the > callouts and any pending callbacks. > > >> > >> Please read the callout 9 manual page first. > > > > Assume I read it. How this changes any of my points above ? > > """ > > A change in the CPU selection cannot happen if this function is > > re-scheduled inside a callout function. Else the callback function given > > by the func argument will be executed on the same CPU like previously > > done. > > """ > > You cannot do this without fixing consumers. > > > > The code simply needs an update. It is not broken in any ways - right? > If it is not broken, fixing it is not that urgent. This is not at all acceptable. TCP callouts were the largest potential user of multi-cpu callouts and you've just broken them. Your proposed change to handle inp locks is not necessarily correct either since dropping the inp lock inside a callout introduces new races (now callout_stop doesn't have quite the same semantics as it does for other callout_init_*()). Given this, it seems that your fix just mostly disabled multi-CPU callouts, so it is not at all clear that you've actually fixed anything. :( -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 19:08:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74D31A5E; Tue, 20 Jan 2015 19:08:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46FC2C2D; Tue, 20 Jan 2015 19:08:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KJ8u9C072965; Tue, 20 Jan 2015 19:08:56 GMT (envelope-from tuexen@FreeBSD.org) Received: (from tuexen@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KJ8ulY072964; Tue, 20 Jan 2015 19:08:56 GMT (envelope-from tuexen@FreeBSD.org) Message-Id: <201501201908.t0KJ8ulY072964@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: tuexen set sender to tuexen@FreeBSD.org using -f From: Michael Tuexen Date: Tue, 20 Jan 2015 19:08:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277424 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 19:08:56 -0000 Author: tuexen Date: Tue Jan 20 19:08:55 2015 New Revision: 277424 URL: https://svnweb.freebsd.org/changeset/base/277424 Log: Remove comparisons which are not necessary. Reported by: Coverity CID: 1237826, 1237844, 1237847 MFC after: 1 week Modified: head/sys/netinet/sctp_sysctl.c Modified: head/sys/netinet/sctp_sysctl.c ============================================================================== --- head/sys/netinet/sctp_sysctl.c Tue Jan 20 17:00:28 2015 (r277423) +++ head/sys/netinet/sctp_sysctl.c Tue Jan 20 19:08:55 2015 (r277424) @@ -569,8 +569,12 @@ sctp_sysctl_handle_udp_tunneling(SYSCTL_ error = sysctl_handle_int(oidp, &new, 0, req); if ((error == 0) && (req->newptr != NULL)) { +#if (SCTPCTL_UDP_TUNNELING_PORT_MIN == 0) + if (new > SCTPCTL_UDP_TUNNELING_PORT_MAX) { +#else if ((new < SCTPCTL_UDP_TUNNELING_PORT_MIN) || (new > SCTPCTL_UDP_TUNNELING_PORT_MAX)) { +#endif error = EINVAL; } else { SCTP_INP_INFO_WLOCK(); @@ -598,9 +602,14 @@ sctp_sysctl_handle_auth(SYSCTL_HANDLER_A error = sysctl_handle_int(oidp, &new, 0, req); if ((error == 0) && (req->newptr != NULL)) { +#if (SCTPCTL_AUTH_ENABLE_MIN == 0) + if ((new > SCTPCTL_AUTH_ENABLE_MAX) || + ((new == 0) && (SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1))) { +#else if ((new < SCTPCTL_AUTH_ENABLE_MIN) || (new > SCTPCTL_AUTH_ENABLE_MAX) || ((new == 0) && (SCTP_BASE_SYSCTL(sctp_asconf_enable) == 1))) { +#endif error = EINVAL; } else { SCTP_BASE_SYSCTL(sctp_auth_enable) = new; @@ -619,9 +628,14 @@ sctp_sysctl_handle_asconf(SYSCTL_HANDLER error = sysctl_handle_int(oidp, &new, 0, req); if ((error == 0) && (req->newptr != NULL)) { +#if (SCTPCTL_ASCONF_ENABLE_MIN == 0) + if ((new > SCTPCTL_ASCONF_ENABLE_MAX) || + ((new == 1) && (SCTP_BASE_SYSCTL(sctp_auth_enable) == 0))) { +#else if ((new < SCTPCTL_ASCONF_ENABLE_MIN) || (new > SCTPCTL_ASCONF_ENABLE_MAX) || ((new == 1) && (SCTP_BASE_SYSCTL(sctp_auth_enable) == 0))) { +#endif error = EINVAL; } else { SCTP_BASE_SYSCTL(sctp_asconf_enable) = new; From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 19:14:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED4BED5F; Tue, 20 Jan 2015 19:14:43 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F5D2D08; Tue, 20 Jan 2015 19:14:43 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0KJEc14042390 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 21:14:38 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0KJEc14042390 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0KJEcbi042389; Tue, 20 Jan 2015 21:14:38 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 20 Jan 2015 21:14:38 +0200 From: Konstantin Belousov To: Nathan Whitehorn Subject: Re: svn commit: r277421 - head/sys/powerpc/powerpc Message-ID: <20150120191438.GL42409@kib.kiev.ua> References: <201501201621.t0KGLx26096724@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501201621.t0KGLx26096724@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 19:14:44 -0000 On Tue, Jan 20, 2015 at 04:21:59PM +0000, Nathan Whitehorn wrote: > Author: nwhitehorn > Date: Tue Jan 20 16:21:59 2015 > New Revision: 277421 > URL: https://svnweb.freebsd.org/changeset/base/277421 > > Log: > There does not seem to be any reason to acquire GIANT here. Follow amd64 > in removing it. > > MFC after: 1 month > > Modified: > head/sys/powerpc/powerpc/mem.c > > Modified: head/sys/powerpc/powerpc/mem.c > ============================================================================== > --- head/sys/powerpc/powerpc/mem.c Tue Jan 20 15:45:09 2015 (r277420) > +++ head/sys/powerpc/powerpc/mem.c Tue Jan 20 16:21:59 2015 (r277421) > @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, > cnt = 0; > error = 0; > > - GIANT_REQUIRED; > - This is not an acquisition, to be pedantic. Really, it is cdevsw which has D_NEEDGIANT flag which acquires Giant. After architectures get rid of GIANT_REQUIRED, flag can be removed. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:04:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CCBCC950; Tue, 20 Jan 2015 20:04:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD6A02E6; Tue, 20 Jan 2015 20:04:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KK4qUA000908; Tue, 20 Jan 2015 20:04:52 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KK4qVE000907; Tue, 20 Jan 2015 20:04:52 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202004.t0KK4qVE000907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:04:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277425 - vendor-sys/illumos/dist/uts/common/fs/zfs X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:04:53 -0000 Author: delphij Date: Tue Jan 20 20:04:51 2015 New Revision: 277425 URL: https://svnweb.freebsd.org/changeset/base/277425 Log: 5376 arc_kmem_reap_now() should not result in clearing arc_no_grow Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Steven Hartland Reviewed by: Richard Elling Approved by: Dan McDonald Author: Matthew Ahrens illumos/illumos-gate@2ec99e3e987d8aa273f1e9ba2b983557d058198c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 19:08:55 2015 (r277424) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:04:51 2015 (r277425) @@ -149,13 +149,7 @@ static kmutex_t arc_reclaim_thr_lock; static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ static uint8_t arc_thread_exit; -#define ARC_REDUCE_DNLC_PERCENT 3 -uint_t arc_reduce_dnlc_percent = ARC_REDUCE_DNLC_PERCENT; - -typedef enum arc_reclaim_strategy { - ARC_RECLAIM_AGGR, /* Aggressive reclaim strategy */ - ARC_RECLAIM_CONS /* Conservative reclaim strategy */ -} arc_reclaim_strategy_t; +uint_t arc_reduce_dnlc_percent = 3; /* * The number of iterations through arc_evict_*() before we @@ -170,7 +164,19 @@ static int arc_grow_retry = 60; static int arc_p_min_shift = 4; /* log2(fraction of arc to reclaim) */ -static int arc_shrink_shift = 5; +static int arc_shrink_shift = 7; + +/* + * log2(fraction of ARC which must be free to allow growing). + * I.e. If there is less than arc_c >> arc_no_grow_shift free memory, + * when reading a new block into the ARC, we will evict an equal-sized block + * from the ARC. + * + * This must be less than arc_shrink_shift, so that when we shrink the ARC, + * we will still not allow it to grow. + */ +int arc_no_grow_shift = 5; + /* * minimum lifespan of a prefetch block in clock ticks @@ -2194,16 +2200,10 @@ arc_flush(spa_t *spa) } void -arc_shrink(void) +arc_shrink(int64_t to_free) { if (arc_c > arc_c_min) { - uint64_t to_free; -#ifdef _KERNEL - to_free = MAX(arc_c >> arc_shrink_shift, ptob(needfree)); -#else - to_free = arc_c >> arc_shrink_shift; -#endif if (arc_c > arc_c_min + to_free) atomic_add_64(&arc_c, -to_free); else @@ -2222,25 +2222,49 @@ arc_shrink(void) arc_adjust(); } +typedef enum free_memory_reason_t { + FMR_UNKNOWN, + FMR_NEEDFREE, + FMR_LOTSFREE, + FMR_SWAPFS_MINFREE, + FMR_PAGES_PP_MAXIMUM, + FMR_HEAP_ARENA, + FMR_ZIO_ARENA, +} free_memory_reason_t; + +int64_t last_free_memory; +free_memory_reason_t last_free_reason; + /* - * Determine if the system is under memory pressure and is asking - * to reclaim memory. A return value of 1 indicates that the system - * is under memory pressure and that the arc should adjust accordingly. + * Additional reserve of pages for pp_reserve. */ -static int -arc_reclaim_needed(void) -{ - uint64_t extra; +int64_t arc_pages_pp_reserve = 64; -#ifdef _KERNEL +/* + * Additional reserve of pages for swapfs. + */ +int64_t arc_swapfs_reserve = 64; - if (needfree) - return (1); +/* + * Return the amount of memory that can be consumed before reclaim will be + * needed. Positive if there is sufficient free memory, negative indicates + * the amount of memory that needs to be freed up. + */ +static int64_t +arc_available_memory(void) +{ + int64_t lowest = INT64_MAX; + int64_t n; + free_memory_reason_t r = FMR_UNKNOWN; - /* - * take 'desfree' extra pages, so we reclaim sooner, rather than later - */ - extra = desfree; +#ifdef _KERNEL + if (needfree > 0) { + n = PAGESIZE * (-needfree); + if (n < lowest) { + lowest = n; + r = FMR_NEEDFREE; + } + } /* * check that we're out of range of the pageout scanner. It starts to @@ -2249,8 +2273,11 @@ arc_reclaim_needed(void) * number of needed free pages. We add extra pages here to make sure * the scanner doesn't start up while we're freeing memory. */ - if (freemem < lotsfree + needfree + extra) - return (1); + n = PAGESIZE * (freemem - lotsfree - needfree - desfree); + if (n < lowest) { + lowest = n; + r = FMR_LOTSFREE; + } /* * check to make sure that swapfs has enough space so that anon @@ -2259,8 +2286,13 @@ arc_reclaim_needed(void) * swap pages. We also add a bit of extra here just to prevent * circumstances from getting really dire. */ - if (availrmem < swapfs_minfree + swapfs_reserve + extra) - return (1); + n = PAGESIZE * (availrmem - swapfs_minfree - swapfs_reserve - + desfree - arc_swapfs_reserve); + if (n < lowest) { + lowest = n; + r = FMR_SWAPFS_MINFREE; + } + /* * Check that we have enough availrmem that memory locking (e.g., via @@ -2269,8 +2301,12 @@ arc_reclaim_needed(void) * drops below pages_pp_maximum, page locking mechanisms such as * page_pp_lock() will fail.) */ - if (availrmem <= pages_pp_maximum) - return (1); + n = PAGESIZE * (availrmem - pages_pp_maximum - + arc_pages_pp_reserve); + if (n < lowest) { + lowest = n; + r = FMR_PAGES_PP_MAXIMUM; + } #if defined(__i386) /* @@ -2284,9 +2320,12 @@ arc_reclaim_needed(void) * heap is allocated. (Or, in the calculation, if less than 1/4th is * free) */ - if (vmem_size(heap_arena, VMEM_FREE) < - (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC) >> 2)) - return (1); + n = vmem_size(heap_arena, VMEM_FREE) - + (vmem_size(heap_arena, VMEM_FREE | VMEM_ALLOC) >> 2); + if (n < lowest) { + lowest = n; + r = FMR_HEAP_ARENA; + } #endif /* @@ -2298,19 +2337,40 @@ arc_reclaim_needed(void) * to aggressively evict memory from the arc in order to avoid * memory fragmentation issues. */ - if (zio_arena != NULL && - vmem_size(zio_arena, VMEM_FREE) < - (vmem_size(zio_arena, VMEM_ALLOC) >> 4)) - return (1); + if (zio_arena != NULL) { + n = vmem_size(zio_arena, VMEM_FREE) - + (vmem_size(zio_arena, VMEM_ALLOC) >> 4); + if (n < lowest) { + lowest = n; + r = FMR_ZIO_ARENA; + } + } #else + /* Every 100 calls, free a small amount */ if (spa_get_random(100) == 0) - return (1); + lowest = -1024; #endif - return (0); + + last_free_memory = lowest; + last_free_reason = r; + + return (lowest); +} + + +/* + * Determine if the system is under memory pressure and is asking + * to reclaim memory. A return value of TRUE indicates that the system + * is under memory pressure and that the arc should adjust accordingly. + */ +static boolean_t +arc_reclaim_needed(void) +{ + return (arc_available_memory() < 0); } static void -arc_kmem_reap_now(arc_reclaim_strategy_t strat) +arc_kmem_reap_now(void) { size_t i; kmem_cache_t *prev_cache = NULL; @@ -2335,13 +2395,6 @@ arc_kmem_reap_now(arc_reclaim_strategy_t #endif #endif - /* - * An aggressive reclamation will shrink the cache size as well as - * reap free buffers from the arc kmem caches. - */ - if (strat == ARC_RECLAIM_AGGR) - arc_shrink(); - for (i = 0; i < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT; i++) { if (zio_buf_cache[i] != prev_cache) { prev_cache = zio_buf_cache[i]; @@ -2356,47 +2409,57 @@ arc_kmem_reap_now(arc_reclaim_strategy_t kmem_cache_reap_now(hdr_cache); kmem_cache_reap_now(range_seg_cache); - /* - * Ask the vmem areana to reclaim unused memory from its - * quantum caches. - */ - if (zio_arena != NULL && strat == ARC_RECLAIM_AGGR) + if (zio_arena != NULL) { + /* + * Ask the vmem arena to reclaim unused memory from its + * quantum caches. + */ vmem_qcache_reap(zio_arena); + } } static void arc_reclaim_thread(void) { clock_t growtime = 0; - arc_reclaim_strategy_t last_reclaim = ARC_RECLAIM_CONS; callb_cpr_t cpr; CALLB_CPR_INIT(&cpr, &arc_reclaim_thr_lock, callb_generic_cpr, FTAG); mutex_enter(&arc_reclaim_thr_lock); while (arc_thread_exit == 0) { - if (arc_reclaim_needed()) { + int64_t free_memory = arc_available_memory(); + if (free_memory < 0) { - if (arc_no_grow) { - if (last_reclaim == ARC_RECLAIM_CONS) { - last_reclaim = ARC_RECLAIM_AGGR; - } else { - last_reclaim = ARC_RECLAIM_CONS; - } - } else { - arc_no_grow = TRUE; - last_reclaim = ARC_RECLAIM_AGGR; - membar_producer(); - } + arc_no_grow = B_TRUE; + arc_warm = B_TRUE; - /* reset the growth delay for every reclaim */ + /* + * Wait at least zfs_grow_retry (default 60) seconds + * before considering growing. + */ growtime = ddi_get_lbolt() + (arc_grow_retry * hz); - arc_kmem_reap_now(last_reclaim); - arc_warm = B_TRUE; + arc_kmem_reap_now(); - } else if (arc_no_grow && ddi_get_lbolt() >= growtime) { - arc_no_grow = FALSE; + /* + * If we are still low on memory, shrink the ARC + * so that we have arc_shrink_min free space. + */ + free_memory = arc_available_memory(); + + int64_t to_free = + (arc_c >> arc_shrink_shift) - free_memory; + if (to_free > 0) { +#ifdef _KERNEL + to_free = MAX(to_free, ptob(needfree)); +#endif + arc_shrink(to_free); + } + } else if (free_memory < arc_c >> arc_no_grow_shift) { + arc_no_grow = B_TRUE; + } else if (ddi_get_lbolt() >= growtime) { + arc_no_grow = B_FALSE; } arc_adjust(); @@ -3739,6 +3802,15 @@ arc_tempreserve_space(uint64_t reserve, void arc_init(void) { + /* + * allmem is "all memory that we could possibly use". + */ +#ifdef _KERNEL + uint64_t allmem = ptob(physmem - swapfs_minfree); +#else + uint64_t allmem = (physmem * PAGESIZE) / 2; +#endif + mutex_init(&arc_reclaim_thr_lock, NULL, MUTEX_DEFAULT, NULL); cv_init(&arc_reclaim_thr_cv, NULL, CV_DEFAULT, NULL); @@ -3746,7 +3818,7 @@ arc_init(void) arc_min_prefetch_lifespan = 1 * hz; /* Start out with 1/8 of all memory */ - arc_c = physmem * PAGESIZE / 8; + arc_c = allmem / 8; #ifdef _KERNEL /* @@ -3758,21 +3830,21 @@ arc_init(void) #endif /* set min cache to 1/32 of all memory, or 64MB, whichever is more */ - arc_c_min = MAX(arc_c / 4, 64<<20); + arc_c_min = MAX(allmem / 32, 64 << 20); /* set max to 3/4 of all memory, or all but 1GB, whichever is more */ - if (arc_c * 8 >= 1<<30) - arc_c_max = (arc_c * 8) - (1<<30); + if (allmem >= 1 << 30) + arc_c_max = allmem - (1 << 30); else arc_c_max = arc_c_min; - arc_c_max = MAX(arc_c * 6, arc_c_max); + arc_c_max = MAX(allmem * 3 / 4, arc_c_max); /* * Allow the tunables to override our calculations if they are * reasonable (ie. over 64MB) */ - if (zfs_arc_max > 64<<20 && zfs_arc_max < physmem * PAGESIZE) + if (zfs_arc_max > 64 << 20 && zfs_arc_max < allmem) arc_c_max = zfs_arc_max; - if (zfs_arc_min > 64<<20 && zfs_arc_min <= arc_c_max) + if (zfs_arc_min > 64 << 20 && zfs_arc_min <= arc_c_max) arc_c_min = zfs_arc_min; arc_c = arc_c_max; @@ -3800,6 +3872,12 @@ arc_init(void) if (zfs_arc_shrink_shift > 0) arc_shrink_shift = zfs_arc_shrink_shift; + /* + * Ensure that arc_no_grow_shift is less than arc_shrink_shift. + */ + if (arc_no_grow_shift >= arc_shrink_shift) + arc_no_grow_shift = arc_shrink_shift - 1; + if (zfs_arc_p_min_shift > 0) arc_p_min_shift = zfs_arc_p_min_shift; From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:08:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12BFAACC; Tue, 20 Jan 2015 20:08:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D702A31B; Tue, 20 Jan 2015 20:08:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KK8oUo001465; Tue, 20 Jan 2015 20:08:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KK8oal001464; Tue, 20 Jan 2015 20:08:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202008.t0KK8oal001464@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:08:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277426 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:08:51 -0000 Author: delphij Date: Tue Jan 20 20:08:50 2015 New Revision: 277426 URL: https://svnweb.freebsd.org/changeset/base/277426 Log: 5408 managing ZFS cache devices requires lots of RAM Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Don Brady Reviewed by: Josef 'Jeff' Sipek Approved by: Garrett D'Amore Author: Chris Williamson illumos/illumos-gate@89c86e32293a30cdd7af530c38b2073fee01411c Modified: vendor/illumos/dist/cmd/ztest/ztest.c Changes in other areas also in this revision: Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Modified: vendor/illumos/dist/cmd/ztest/ztest.c ============================================================================== --- vendor/illumos/dist/cmd/ztest/ztest.c Tue Jan 20 20:04:51 2015 (r277425) +++ vendor/illumos/dist/cmd/ztest/ztest.c Tue Jan 20 20:08:50 2015 (r277426) @@ -3905,7 +3905,7 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *z * assign an arcbuf to a dbuf. */ for (j = 0; j < s; j++) { - if (i != 5) { + if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) { bigbuf_arcbufs[j] = dmu_request_arcbuf(bonus_db, chunksize); } else { @@ -3929,7 +3929,8 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *z umem_free(packbuf, packsize); umem_free(bigbuf, bigsize); for (j = 0; j < s; j++) { - if (i != 5) { + if (i != 5 || + chunksize < (SPA_MINBLOCKSIZE * 2)) { dmu_return_arcbuf(bigbuf_arcbufs[j]); } else { dmu_return_arcbuf( @@ -3973,7 +3974,7 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *z } for (off = bigoff, j = 0; j < s; j++, off += chunksize) { dmu_buf_t *dbt; - if (i != 5) { + if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) { bcopy((caddr_t)bigbuf + (off - bigoff), bigbuf_arcbufs[j]->b_data, chunksize); } else { @@ -3990,7 +3991,7 @@ ztest_dmu_read_write_zcopy(ztest_ds_t *z VERIFY(dmu_buf_hold(os, bigobj, off, FTAG, &dbt, DMU_READ_NO_PREFETCH) == 0); } - if (i != 5) { + if (i != 5 || chunksize < (SPA_MINBLOCKSIZE * 2)) { dmu_assign_arcbuf(bonus_db, off, bigbuf_arcbufs[j], tx); } else { From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:08:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7998CACD; Tue, 20 Jan 2015 20:08:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63EE931C; Tue, 20 Jan 2015 20:08:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KK8p77001473; Tue, 20 Jan 2015 20:08:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KK8p9n001471; Tue, 20 Jan 2015 20:08:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202008.t0KK8p9n001471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:08:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277426 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/cmd/ztest X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:08:51 -0000 Author: delphij Date: Tue Jan 20 20:08:50 2015 New Revision: 277426 URL: https://svnweb.freebsd.org/changeset/base/277426 Log: 5408 managing ZFS cache devices requires lots of RAM Reviewed by: Christopher Siden Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Don Brady Reviewed by: Josef 'Jeff' Sipek Approved by: Garrett D'Amore Author: Chris Williamson illumos/illumos-gate@89c86e32293a30cdd7af530c38b2073fee01411c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Changes in other areas also in this revision: Modified: vendor/illumos/dist/cmd/ztest/ztest.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:04:51 2015 (r277425) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:08:50 2015 (r277426) @@ -111,7 +111,7 @@ * Note that the majority of the performance stats are manipulated * with atomic operations. * - * The L2ARC uses the l2arc_buflist_mtx global mutex for the following: + * The L2ARC uses the l2ad_mtx on each vdev for the following: * * - L2ARC buflist creation * - L2ARC buflist eviction @@ -314,6 +314,7 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_writes_hdr_miss; kstat_named_t arcstat_l2_evict_lock_retry; kstat_named_t arcstat_l2_evict_reading; + kstat_named_t arcstat_l2_evict_l1cached; kstat_named_t arcstat_l2_free_on_write; kstat_named_t arcstat_l2_abort_lowmem; kstat_named_t arcstat_l2_cksum_bad; @@ -381,6 +382,7 @@ static arc_stats_t arc_stats = { { "l2_writes_hdr_miss", KSTAT_DATA_UINT64 }, { "l2_evict_lock_retry", KSTAT_DATA_UINT64 }, { "l2_evict_reading", KSTAT_DATA_UINT64 }, + { "l2_evict_l1cached", KSTAT_DATA_UINT64 }, { "l2_free_on_write", KSTAT_DATA_UINT64 }, { "l2_abort_lowmem", KSTAT_DATA_UINT64 }, { "l2_cksum_bad", KSTAT_DATA_UINT64 }, @@ -472,8 +474,6 @@ static int arc_no_grow; /* Don't try to static uint64_t arc_tempreserve; static uint64_t arc_loaned_bytes; -typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; - typedef struct arc_callback arc_callback_t; struct arc_callback { @@ -494,29 +494,53 @@ struct arc_write_callback { arc_buf_t *awcb_buf; }; -struct arc_buf_hdr { - /* protected by hash lock */ - dva_t b_dva; - uint64_t b_birth; - uint64_t b_cksum0; - +/* + * ARC buffers are separated into multiple structs as a memory saving measure: + * - Common fields struct, always defined, and embedded within it: + * - L2-only fields, always allocated but undefined when not in L2ARC + * - L1-only fields, only allocated when in L1ARC + * + * Buffer in L1 Buffer only in L2 + * +------------------------+ +------------------------+ + * | arc_buf_hdr_t | | arc_buf_hdr_t | + * | | | | + * | | | | + * | | | | + * +------------------------+ +------------------------+ + * | l2arc_buf_hdr_t | | l2arc_buf_hdr_t | + * | (undefined if L1-only) | | | + * +------------------------+ +------------------------+ + * | l1arc_buf_hdr_t | + * | | + * | | + * | | + * | | + * +------------------------+ + * + * Because it's possible for the L2ARC to become extremely large, we can wind + * up eating a lot of memory in L2ARC buffer headers, so the size of a header + * is minimized by only allocating the fields necessary for an L1-cached buffer + * when a header is actually in the L1 cache. The sub-headers (l1arc_buf_hdr and + * l2arc_buf_hdr) are embedded rather than allocated separately to save a couple + * words in pointers. arc_hdr_realloc() is used to switch a header between + * these two allocation states. + */ +typedef struct l1arc_buf_hdr { kmutex_t b_freeze_lock; - zio_cksum_t *b_freeze_cksum; +#ifdef ZFS_DEBUG + /* + * used for debugging wtih kmem_flags - by allocating and freeing + * b_thawed when the buffer is thawed, we get a record of the stack + * trace that thawed it. + */ void *b_thawed; +#endif - arc_buf_hdr_t *b_hash_next; arc_buf_t *b_buf; - arc_flags_t b_flags; uint32_t b_datacnt; - - arc_callback_t *b_acb; + /* for waiting on writes to complete */ kcondvar_t b_cv; - /* immutable */ - arc_buf_contents_t b_type; - uint64_t b_size; - uint64_t b_spa; - /* protected by arc state mutex */ arc_state_t *b_state; list_node_t b_arc_node; @@ -527,8 +551,46 @@ struct arc_buf_hdr { /* self protecting */ refcount_t b_refcnt; - l2arc_buf_hdr_t *b_l2hdr; + arc_callback_t *b_acb; + /* temporary buffer holder for in-flight compressed data */ + void *b_tmp_cdata; +} l1arc_buf_hdr_t; + +typedef struct l2arc_dev l2arc_dev_t; + +typedef struct l2arc_buf_hdr { + /* protected by arc_buf_hdr mutex */ + l2arc_dev_t *b_dev; /* L2ARC device */ + uint64_t b_daddr; /* disk address, offset byte */ + /* real alloc'd buffer size depending on b_compress applied */ + int32_t b_asize; + list_node_t b_l2node; +} l2arc_buf_hdr_t; + +struct arc_buf_hdr { + /* protected by hash lock */ + dva_t b_dva; + uint64_t b_birth; + /* + * Even though this checksum is only set/verified when a buffer is in + * the L1 cache, it needs to be in the set of common fields because it + * must be preserved from the time before a buffer is written out to + * L2ARC until after it is read back in. + */ + zio_cksum_t *b_freeze_cksum; + + arc_buf_hdr_t *b_hash_next; + arc_flags_t b_flags; + + /* immutable */ + int32_t b_size; + uint64_t b_spa; + + /* L2ARC fields. Undefined when not in L2ARC. */ + l2arc_buf_hdr_t b_l2hdr; + /* L1ARC fields. Undefined when in l2arc_only state */ + l1arc_buf_hdr_t b_l1hdr; }; static arc_buf_t *arc_eviction_list; @@ -545,22 +607,38 @@ static arc_buf_hdr_t arc_eviction_hdr; #define HDR_PREFETCH(hdr) ((hdr)->b_flags & ARC_FLAG_PREFETCH) #define HDR_FREED_IN_READ(hdr) ((hdr)->b_flags & ARC_FLAG_FREED_IN_READ) #define HDR_BUF_AVAILABLE(hdr) ((hdr)->b_flags & ARC_FLAG_BUF_AVAILABLE) -#define HDR_FREE_IN_PROGRESS(hdr) \ - ((hdr)->b_flags & ARC_FLAG_FREE_IN_PROGRESS) + #define HDR_L2CACHE(hdr) ((hdr)->b_flags & ARC_FLAG_L2CACHE) +#define HDR_L2COMPRESS(hdr) ((hdr)->b_flags & ARC_FLAG_L2COMPRESS) #define HDR_L2_READING(hdr) \ - ((hdr)->b_flags & ARC_FLAG_IO_IN_PROGRESS && \ - (hdr)->b_l2hdr != NULL) + (((hdr)->b_flags & ARC_FLAG_IO_IN_PROGRESS) && \ + ((hdr)->b_flags & ARC_FLAG_HAS_L2HDR)) #define HDR_L2_WRITING(hdr) ((hdr)->b_flags & ARC_FLAG_L2_WRITING) #define HDR_L2_EVICTED(hdr) ((hdr)->b_flags & ARC_FLAG_L2_EVICTED) #define HDR_L2_WRITE_HEAD(hdr) ((hdr)->b_flags & ARC_FLAG_L2_WRITE_HEAD) +#define HDR_ISTYPE_METADATA(hdr) \ + ((hdr)->b_flags & ARC_FLAG_BUFC_METADATA) +#define HDR_ISTYPE_DATA(hdr) (!HDR_ISTYPE_METADATA(hdr)) + +#define HDR_HAS_L1HDR(hdr) ((hdr)->b_flags & ARC_FLAG_HAS_L1HDR) +#define HDR_HAS_L2HDR(hdr) ((hdr)->b_flags & ARC_FLAG_HAS_L2HDR) + +/* For storing compression mode in b_flags */ +#define HDR_COMPRESS_OFFSET 24 +#define HDR_COMPRESS_NBITS 7 + +#define HDR_GET_COMPRESS(hdr) ((enum zio_compress)BF32_GET(hdr->b_flags, \ + HDR_COMPRESS_OFFSET, HDR_COMPRESS_NBITS)) +#define HDR_SET_COMPRESS(hdr, cmp) BF32_SET(hdr->b_flags, \ + HDR_COMPRESS_OFFSET, HDR_COMPRESS_NBITS, (cmp)) + /* * Other sizes */ -#define HDR_SIZE ((int64_t)sizeof (arc_buf_hdr_t)) -#define L2HDR_SIZE ((int64_t)sizeof (l2arc_buf_hdr_t)) +#define HDR_FULL_SIZE ((int64_t)sizeof (arc_buf_hdr_t)) +#define HDR_L2ONLY_SIZE ((int64_t)offsetof(arc_buf_hdr_t, b_l1hdr)) /* * Hash table routines @@ -624,7 +702,7 @@ boolean_t l2arc_norw = B_TRUE; /* no r /* * L2ARC Internals */ -typedef struct l2arc_dev { +struct l2arc_dev { vdev_t *l2ad_vdev; /* vdev */ spa_t *l2ad_spa; /* spa */ uint64_t l2ad_hand; /* next write location */ @@ -633,15 +711,15 @@ typedef struct l2arc_dev { uint64_t l2ad_evict; /* last addr eviction reached */ boolean_t l2ad_first; /* first sweep through */ boolean_t l2ad_writing; /* currently writing */ - list_t *l2ad_buflist; /* buffer list */ + kmutex_t l2ad_mtx; /* lock for buffer list */ + list_t l2ad_buflist; /* buffer list */ list_node_t l2ad_node; /* device list node */ -} l2arc_dev_t; +}; static list_t L2ARC_dev_list; /* device list */ static list_t *l2arc_dev_list; /* device list pointer */ static kmutex_t l2arc_dev_mtx; /* device list mutex */ static l2arc_dev_t *l2arc_dev_last; /* last device used */ -static kmutex_t l2arc_buflist_mtx; /* mutex for all buflists */ static list_t L2ARC_free_on_write; /* free after write buf list */ static list_t *l2arc_free_on_write; /* free after write list ptr */ static kmutex_t l2arc_free_on_write_mtx; /* mutex for list */ @@ -661,18 +739,6 @@ typedef struct l2arc_write_callback { arc_buf_hdr_t *l2wcb_head; /* head of write buflist */ } l2arc_write_callback_t; -struct l2arc_buf_hdr { - /* protected by arc_buf_hdr mutex */ - l2arc_dev_t *b_dev; /* L2ARC device */ - uint64_t b_daddr; /* disk address, offset byte */ - /* compression applied to buffer data */ - enum zio_compress b_compress; - /* real alloc'd buffer size depending on b_compress applied */ - int b_asize; - /* temporary buffer holder for in-flight compressed data */ - void *b_tmp_cdata; -}; - typedef struct l2arc_data_free { /* protected by l2arc_free_on_write_mtx */ void *l2df_data; @@ -691,12 +757,13 @@ static int arc_evict_needed(arc_buf_cont static void arc_evict_ghost(arc_state_t *, uint64_t, int64_t); static void arc_buf_watch(arc_buf_t *); +static arc_buf_contents_t arc_buf_type(arc_buf_hdr_t *); +static uint32_t arc_bufc_to_flags(arc_buf_contents_t); + static boolean_t l2arc_write_eligible(uint64_t, arc_buf_hdr_t *); static void l2arc_read_done(zio_t *); -static void l2arc_hdr_stat_add(void); -static void l2arc_hdr_stat_remove(void); -static boolean_t l2arc_compress_buf(l2arc_buf_hdr_t *); +static boolean_t l2arc_compress_buf(arc_buf_hdr_t *); static void l2arc_decompress_zio(zio_t *, arc_buf_hdr_t *, enum zio_compress); static void l2arc_release_cdata_buf(arc_buf_hdr_t *); @@ -719,8 +786,7 @@ buf_hash(uint64_t spa, const dva_t *dva, #define BUF_EMPTY(buf) \ ((buf)->b_dva.dva_word[0] == 0 && \ - (buf)->b_dva.dva_word[1] == 0 && \ - (buf)->b_cksum0 == 0) + (buf)->b_dva.dva_word[1] == 0) #define BUF_EQUAL(spa, dva, birth, buf) \ ((buf)->b_dva.dva_word[0] == (dva)->dva_word[0]) && \ @@ -733,7 +799,6 @@ buf_discard_identity(arc_buf_hdr_t *hdr) hdr->b_dva.dva_word[0] = 0; hdr->b_dva.dva_word[1] = 0; hdr->b_birth = 0; - hdr->b_cksum0 = 0; } static arc_buf_hdr_t * @@ -763,6 +828,7 @@ buf_hash_find(uint64_t spa, const blkptr * equal to elem in the hash table, then the already existing element * will be returned and the new element will not be inserted. * Otherwise returns NULL. + * If lockp == NULL, the caller is assumed to already hold the hash lock. */ static arc_buf_hdr_t * buf_hash_insert(arc_buf_hdr_t *hdr, kmutex_t **lockp) @@ -775,8 +841,14 @@ buf_hash_insert(arc_buf_hdr_t *hdr, kmut ASSERT(!DVA_IS_EMPTY(&hdr->b_dva)); ASSERT(hdr->b_birth != 0); ASSERT(!HDR_IN_HASH_TABLE(hdr)); - *lockp = hash_lock; - mutex_enter(hash_lock); + + if (lockp != NULL) { + *lockp = hash_lock; + mutex_enter(hash_lock); + } else { + ASSERT(MUTEX_HELD(hash_lock)); + } + for (fhdr = buf_hash_table.ht_table[idx], i = 0; fhdr != NULL; fhdr = fhdr->b_hash_next, i++) { if (BUF_EQUAL(hdr->b_spa, &hdr->b_dva, hdr->b_birth, fhdr)) @@ -831,7 +903,8 @@ buf_hash_remove(arc_buf_hdr_t *hdr) /* * Global data structures and functions for the buf kmem cache. */ -static kmem_cache_t *hdr_cache; +static kmem_cache_t *hdr_full_cache; +static kmem_cache_t *hdr_l2only_cache; static kmem_cache_t *buf_cache; static void @@ -843,7 +916,8 @@ buf_fini(void) (buf_hash_table.ht_mask + 1) * sizeof (void *)); for (i = 0; i < BUF_LOCKS; i++) mutex_destroy(&buf_hash_table.ht_locks[i].ht_lock); - kmem_cache_destroy(hdr_cache); + kmem_cache_destroy(hdr_full_cache); + kmem_cache_destroy(hdr_l2only_cache); kmem_cache_destroy(buf_cache); } @@ -853,15 +927,27 @@ buf_fini(void) */ /* ARGSUSED */ static int -hdr_cons(void *vbuf, void *unused, int kmflag) +hdr_full_cons(void *vbuf, void *unused, int kmflag) +{ + arc_buf_hdr_t *hdr = vbuf; + + bzero(hdr, HDR_FULL_SIZE); + cv_init(&hdr->b_l1hdr.b_cv, NULL, CV_DEFAULT, NULL); + refcount_create(&hdr->b_l1hdr.b_refcnt); + mutex_init(&hdr->b_l1hdr.b_freeze_lock, NULL, MUTEX_DEFAULT, NULL); + arc_space_consume(HDR_FULL_SIZE, ARC_SPACE_HDRS); + + return (0); +} + +/* ARGSUSED */ +static int +hdr_l2only_cons(void *vbuf, void *unused, int kmflag) { arc_buf_hdr_t *hdr = vbuf; - bzero(hdr, sizeof (arc_buf_hdr_t)); - refcount_create(&hdr->b_refcnt); - cv_init(&hdr->b_cv, NULL, CV_DEFAULT, NULL); - mutex_init(&hdr->b_freeze_lock, NULL, MUTEX_DEFAULT, NULL); - arc_space_consume(sizeof (arc_buf_hdr_t), ARC_SPACE_HDRS); + bzero(hdr, HDR_L2ONLY_SIZE); + arc_space_consume(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS); return (0); } @@ -885,15 +971,25 @@ buf_cons(void *vbuf, void *unused, int k */ /* ARGSUSED */ static void -hdr_dest(void *vbuf, void *unused) +hdr_full_dest(void *vbuf, void *unused) { arc_buf_hdr_t *hdr = vbuf; ASSERT(BUF_EMPTY(hdr)); - refcount_destroy(&hdr->b_refcnt); - cv_destroy(&hdr->b_cv); - mutex_destroy(&hdr->b_freeze_lock); - arc_space_return(sizeof (arc_buf_hdr_t), ARC_SPACE_HDRS); + cv_destroy(&hdr->b_l1hdr.b_cv); + refcount_destroy(&hdr->b_l1hdr.b_refcnt); + mutex_destroy(&hdr->b_l1hdr.b_freeze_lock); + arc_space_return(HDR_FULL_SIZE, ARC_SPACE_HDRS); +} + +/* ARGSUSED */ +static void +hdr_l2only_dest(void *vbuf, void *unused) +{ + arc_buf_hdr_t *hdr = vbuf; + + ASSERT(BUF_EMPTY(hdr)); + arc_space_return(HDR_L2ONLY_SIZE, ARC_SPACE_L2HDRS); } /* ARGSUSED */ @@ -947,8 +1043,11 @@ retry: goto retry; } - hdr_cache = kmem_cache_create("arc_buf_hdr_t", sizeof (arc_buf_hdr_t), - 0, hdr_cons, hdr_dest, hdr_recl, NULL, NULL, 0); + hdr_full_cache = kmem_cache_create("arc_buf_hdr_t_full", HDR_FULL_SIZE, + 0, hdr_full_cons, hdr_full_dest, hdr_recl, NULL, NULL, 0); + hdr_l2only_cache = kmem_cache_create("arc_buf_hdr_t_l2only", + HDR_L2ONLY_SIZE, 0, hdr_l2only_cons, hdr_l2only_dest, hdr_recl, + NULL, NULL, 0); buf_cache = kmem_cache_create("arc_buf_t", sizeof (arc_buf_t), 0, buf_cons, buf_dest, NULL, NULL, NULL, 0); @@ -962,6 +1061,81 @@ retry: } } +/* + * Transition between the two allocation states for the arc_buf_hdr struct. + * The arc_buf_hdr struct can be allocated with (hdr_full_cache) or without + * (hdr_l2only_cache) the fields necessary for the L1 cache - the smaller + * version is used when a cache buffer is only in the L2ARC in order to reduce + * memory usage. + */ +static arc_buf_hdr_t * +arc_hdr_realloc(arc_buf_hdr_t *hdr, kmem_cache_t *old, kmem_cache_t *new) +{ + ASSERT(HDR_HAS_L2HDR(hdr)); + + arc_buf_hdr_t *nhdr; + l2arc_dev_t *dev = hdr->b_l2hdr.b_dev; + + ASSERT((old == hdr_full_cache && new == hdr_l2only_cache) || + (old == hdr_l2only_cache && new == hdr_full_cache)); + + nhdr = kmem_cache_alloc(new, KM_PUSHPAGE); + + ASSERT(MUTEX_HELD(HDR_LOCK(hdr))); + buf_hash_remove(hdr); + + bcopy(hdr, nhdr, HDR_L2ONLY_SIZE); + if (new == hdr_full_cache) { + nhdr->b_flags |= ARC_FLAG_HAS_L1HDR; + /* + * arc_access and arc_change_state need to be aware that a + * header has just come out of L2ARC, so we set its state to + * l2c_only even though it's about to change. + */ + nhdr->b_l1hdr.b_state = arc_l2c_only; + } else { + ASSERT(hdr->b_l1hdr.b_buf == NULL); + ASSERT0(hdr->b_l1hdr.b_datacnt); + ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); + /* + * We might be removing the L1hdr of a buffer which was just + * written out to L2ARC. If such a buffer is compressed then we + * need to free its b_tmp_cdata before destroying the header. + */ + if (hdr->b_l1hdr.b_tmp_cdata != NULL && + HDR_GET_COMPRESS(hdr) != ZIO_COMPRESS_OFF) + l2arc_release_cdata_buf(hdr); + nhdr->b_flags &= ~ARC_FLAG_HAS_L1HDR; + } + /* + * The header has been reallocated so we need to re-insert it into any + * lists it was on. + */ + (void) buf_hash_insert(nhdr, NULL); + + ASSERT(list_link_active(&hdr->b_l2hdr.b_l2node)); + + mutex_enter(&dev->l2ad_mtx); + + /* + * We must place the realloc'ed header back into the list at + * the same spot. Otherwise, if it's placed earlier in the list, + * l2arc_write_buffers() could find it during the function's + * write phase, and try to write it out to the l2arc. + */ + list_insert_after(&dev->l2ad_buflist, hdr, nhdr); + list_remove(&dev->l2ad_buflist, hdr); + + mutex_exit(&dev->l2ad_mtx); + + buf_discard_identity(hdr); + hdr->b_freeze_cksum = NULL; + kmem_cache_free(old, hdr); + + return (nhdr); +} + + #define ARC_MINTIME (hz>>4) /* 62 ms */ static void @@ -972,16 +1146,15 @@ arc_cksum_verify(arc_buf_t *buf) if (!(zfs_flags & ZFS_DEBUG_MODIFY)) return; - mutex_enter(&buf->b_hdr->b_freeze_lock); - if (buf->b_hdr->b_freeze_cksum == NULL || - (buf->b_hdr->b_flags & ARC_FLAG_IO_ERROR)) { - mutex_exit(&buf->b_hdr->b_freeze_lock); + mutex_enter(&buf->b_hdr->b_l1hdr.b_freeze_lock); + if (buf->b_hdr->b_freeze_cksum == NULL || HDR_IO_ERROR(buf->b_hdr)) { + mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); return; } fletcher_2_native(buf->b_data, buf->b_hdr->b_size, &zc); if (!ZIO_CHECKSUM_EQUAL(*buf->b_hdr->b_freeze_cksum, zc)) panic("buffer modified while frozen!"); - mutex_exit(&buf->b_hdr->b_freeze_lock); + mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); } static int @@ -990,10 +1163,10 @@ arc_cksum_equal(arc_buf_t *buf) zio_cksum_t zc; int equal; - mutex_enter(&buf->b_hdr->b_freeze_lock); + mutex_enter(&buf->b_hdr->b_l1hdr.b_freeze_lock); fletcher_2_native(buf->b_data, buf->b_hdr->b_size, &zc); equal = ZIO_CHECKSUM_EQUAL(*buf->b_hdr->b_freeze_cksum, zc); - mutex_exit(&buf->b_hdr->b_freeze_lock); + mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); return (equal); } @@ -1004,15 +1177,15 @@ arc_cksum_compute(arc_buf_t *buf, boolea if (!force && !(zfs_flags & ZFS_DEBUG_MODIFY)) return; - mutex_enter(&buf->b_hdr->b_freeze_lock); + mutex_enter(&buf->b_hdr->b_l1hdr.b_freeze_lock); if (buf->b_hdr->b_freeze_cksum != NULL) { - mutex_exit(&buf->b_hdr->b_freeze_lock); + mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); return; } buf->b_hdr->b_freeze_cksum = kmem_alloc(sizeof (zio_cksum_t), KM_SLEEP); fletcher_2_native(buf->b_data, buf->b_hdr->b_size, buf->b_hdr->b_freeze_cksum); - mutex_exit(&buf->b_hdr->b_freeze_lock); + mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); arc_buf_watch(buf); } @@ -1059,30 +1232,58 @@ arc_buf_watch(arc_buf_t *buf) #endif } +static arc_buf_contents_t +arc_buf_type(arc_buf_hdr_t *hdr) +{ + if (HDR_ISTYPE_METADATA(hdr)) { + return (ARC_BUFC_METADATA); + } else { + return (ARC_BUFC_DATA); + } +} + +static uint32_t +arc_bufc_to_flags(arc_buf_contents_t type) +{ + switch (type) { + case ARC_BUFC_DATA: + /* metadata field is 0 if buffer contains normal data */ + return (0); + case ARC_BUFC_METADATA: + return (ARC_FLAG_BUFC_METADATA); + default: + break; + } + panic("undefined ARC buffer type!"); + return ((uint32_t)-1); +} + void arc_buf_thaw(arc_buf_t *buf) { if (zfs_flags & ZFS_DEBUG_MODIFY) { - if (buf->b_hdr->b_state != arc_anon) + if (buf->b_hdr->b_l1hdr.b_state != arc_anon) panic("modifying non-anon buffer!"); - if (buf->b_hdr->b_flags & ARC_FLAG_IO_IN_PROGRESS) + if (HDR_IO_IN_PROGRESS(buf->b_hdr)) panic("modifying buffer while i/o in progress!"); arc_cksum_verify(buf); } - mutex_enter(&buf->b_hdr->b_freeze_lock); + mutex_enter(&buf->b_hdr->b_l1hdr.b_freeze_lock); if (buf->b_hdr->b_freeze_cksum != NULL) { kmem_free(buf->b_hdr->b_freeze_cksum, sizeof (zio_cksum_t)); buf->b_hdr->b_freeze_cksum = NULL; } +#ifdef ZFS_DEBUG if (zfs_flags & ZFS_DEBUG_MODIFY) { - if (buf->b_hdr->b_thawed) - kmem_free(buf->b_hdr->b_thawed, 1); - buf->b_hdr->b_thawed = kmem_alloc(1, KM_SLEEP); + if (buf->b_hdr->b_l1hdr.b_thawed != NULL) + kmem_free(buf->b_hdr->b_l1hdr.b_thawed, 1); + buf->b_hdr->b_l1hdr.b_thawed = kmem_alloc(1, KM_SLEEP); } +#endif - mutex_exit(&buf->b_hdr->b_freeze_lock); + mutex_exit(&buf->b_hdr->b_l1hdr.b_freeze_lock); arc_buf_unwatch(buf); } @@ -1099,7 +1300,7 @@ arc_buf_freeze(arc_buf_t *buf) mutex_enter(hash_lock); ASSERT(buf->b_hdr->b_freeze_cksum != NULL || - buf->b_hdr->b_state == arc_anon); + buf->b_hdr->b_l1hdr.b_state == arc_anon); arc_cksum_compute(buf, B_FALSE); mutex_exit(hash_lock); @@ -1108,30 +1309,34 @@ arc_buf_freeze(arc_buf_t *buf) static void add_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, void *tag) { + ASSERT(HDR_HAS_L1HDR(hdr)); ASSERT(MUTEX_HELD(hash_lock)); + arc_state_t *state = hdr->b_l1hdr.b_state; + + if ((refcount_add(&hdr->b_l1hdr.b_refcnt, tag) == 1) && + (state != arc_anon)) { + /* We don't use the L2-only state list. */ + if (state != arc_l2c_only) { + uint64_t delta = hdr->b_size * hdr->b_l1hdr.b_datacnt; + list_t *list = &state->arcs_list[arc_buf_type(hdr)]; + uint64_t *size = &state->arcs_lsize[arc_buf_type(hdr)]; - if ((refcount_add(&hdr->b_refcnt, tag) == 1) && - (hdr->b_state != arc_anon)) { - uint64_t delta = hdr->b_size * hdr->b_datacnt; - list_t *list = &hdr->b_state->arcs_list[hdr->b_type]; - uint64_t *size = &hdr->b_state->arcs_lsize[hdr->b_type]; - - ASSERT(!MUTEX_HELD(&hdr->b_state->arcs_mtx)); - mutex_enter(&hdr->b_state->arcs_mtx); - ASSERT(list_link_active(&hdr->b_arc_node)); - list_remove(list, hdr); - if (GHOST_STATE(hdr->b_state)) { - ASSERT0(hdr->b_datacnt); - ASSERT3P(hdr->b_buf, ==, NULL); - delta = hdr->b_size; - } - ASSERT(delta > 0); - ASSERT3U(*size, >=, delta); - atomic_add_64(size, -delta); - mutex_exit(&hdr->b_state->arcs_mtx); + ASSERT(!MUTEX_HELD(&state->arcs_mtx)); + mutex_enter(&state->arcs_mtx); + ASSERT(list_link_active(&hdr->b_l1hdr.b_arc_node)); + list_remove(list, hdr); + if (GHOST_STATE(state)) { + ASSERT0(hdr->b_l1hdr.b_datacnt); + ASSERT3P(hdr->b_l1hdr.b_buf, ==, NULL); + delta = hdr->b_size; + } + ASSERT(delta > 0); + ASSERT3U(*size, >=, delta); + atomic_add_64(size, -delta); + mutex_exit(&state->arcs_mtx); + } /* remove the prefetch flag if we get a reference */ - if (hdr->b_flags & ARC_FLAG_PREFETCH) - hdr->b_flags &= ~ARC_FLAG_PREFETCH; + hdr->b_flags &= ~ARC_FLAG_PREFETCH; } } @@ -1139,21 +1344,27 @@ static int remove_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, void *tag) { int cnt; - arc_state_t *state = hdr->b_state; + arc_state_t *state = hdr->b_l1hdr.b_state; + ASSERT(HDR_HAS_L1HDR(hdr)); ASSERT(state == arc_anon || MUTEX_HELD(hash_lock)); ASSERT(!GHOST_STATE(state)); - if (((cnt = refcount_remove(&hdr->b_refcnt, tag)) == 0) && + /* + * arc_l2c_only counts as a ghost state so we don't need to explicitly + * check to prevent usage of the arc_l2c_only list. + */ + if (((cnt = refcount_remove(&hdr->b_l1hdr.b_refcnt, tag)) == 0) && (state != arc_anon)) { - uint64_t *size = &state->arcs_lsize[hdr->b_type]; + uint64_t *size = &state->arcs_lsize[arc_buf_type(hdr)]; ASSERT(!MUTEX_HELD(&state->arcs_mtx)); mutex_enter(&state->arcs_mtx); - ASSERT(!list_link_active(&hdr->b_arc_node)); - list_insert_head(&state->arcs_list[hdr->b_type], hdr); - ASSERT(hdr->b_datacnt > 0); - atomic_add_64(size, hdr->b_size * hdr->b_datacnt); + ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); + list_insert_head(&state->arcs_list[arc_buf_type(hdr)], hdr); + ASSERT(hdr->b_l1hdr.b_datacnt > 0); + atomic_add_64(size, hdr->b_size * + hdr->b_l1hdr.b_datacnt); mutex_exit(&state->arcs_mtx); } return (cnt); @@ -1167,40 +1378,60 @@ static void arc_change_state(arc_state_t *new_state, arc_buf_hdr_t *hdr, kmutex_t *hash_lock) { - arc_state_t *old_state = hdr->b_state; - int64_t refcnt = refcount_count(&hdr->b_refcnt); + arc_state_t *old_state; + int64_t refcnt; + uint32_t datacnt; uint64_t from_delta, to_delta; + arc_buf_contents_t buftype = arc_buf_type(hdr); + + /* + * We almost always have an L1 hdr here, since we call arc_hdr_realloc() + * in arc_read() when bringing a buffer out of the L2ARC. However, the + * L1 hdr doesn't always exist when we change state to arc_anon before + * destroying a header, in which case reallocating to add the L1 hdr is + * pointless. + */ + if (HDR_HAS_L1HDR(hdr)) { + old_state = hdr->b_l1hdr.b_state; + refcnt = refcount_count(&hdr->b_l1hdr.b_refcnt); + datacnt = hdr->b_l1hdr.b_datacnt; + } else { + old_state = arc_l2c_only; + refcnt = 0; + datacnt = 0; + } ASSERT(MUTEX_HELD(hash_lock)); ASSERT3P(new_state, !=, old_state); - ASSERT(refcnt == 0 || hdr->b_datacnt > 0); - ASSERT(hdr->b_datacnt == 0 || !GHOST_STATE(new_state)); - ASSERT(hdr->b_datacnt <= 1 || old_state != arc_anon); + ASSERT(refcnt == 0 || datacnt > 0); + ASSERT(!GHOST_STATE(new_state) || datacnt == 0); + ASSERT(old_state != arc_anon || datacnt <= 1); - from_delta = to_delta = hdr->b_datacnt * hdr->b_size; + from_delta = to_delta = datacnt * hdr->b_size; /* * If this buffer is evictable, transfer it from the * old state list to the new state list. */ if (refcnt == 0) { - if (old_state != arc_anon) { + if (old_state != arc_anon && old_state != arc_l2c_only) { int use_mutex = !MUTEX_HELD(&old_state->arcs_mtx); - uint64_t *size = &old_state->arcs_lsize[hdr->b_type]; + uint64_t *size = &old_state->arcs_lsize[buftype]; if (use_mutex) mutex_enter(&old_state->arcs_mtx); - ASSERT(list_link_active(&hdr->b_arc_node)); - list_remove(&old_state->arcs_list[hdr->b_type], hdr); + ASSERT(HDR_HAS_L1HDR(hdr)); + ASSERT(list_link_active(&hdr->b_l1hdr.b_arc_node)); + list_remove(&old_state->arcs_list[buftype], hdr); /* * If prefetching out of the ghost cache, * we will have a non-zero datacnt. */ - if (GHOST_STATE(old_state) && hdr->b_datacnt == 0) { + if (GHOST_STATE(old_state) && datacnt == 0) { /* ghost elements have a ghost size */ - ASSERT(hdr->b_buf == NULL); + ASSERT(hdr->b_l1hdr.b_buf == NULL); from_delta = hdr->b_size; } ASSERT3U(*size, >=, from_delta); @@ -1209,20 +1440,26 @@ arc_change_state(arc_state_t *new_state, if (use_mutex) mutex_exit(&old_state->arcs_mtx); } - if (new_state != arc_anon) { + if (new_state != arc_anon && new_state != arc_l2c_only) { int use_mutex = !MUTEX_HELD(&new_state->arcs_mtx); - uint64_t *size = &new_state->arcs_lsize[hdr->b_type]; + uint64_t *size = &new_state->arcs_lsize[buftype]; + /* + * An L1 header always exists here, since if we're + * moving to some L1-cached state (i.e. not l2c_only or + * anonymous), we realloc the header to add an L1hdr + * beforehand. + */ + ASSERT(HDR_HAS_L1HDR(hdr)); if (use_mutex) mutex_enter(&new_state->arcs_mtx); - list_insert_head(&new_state->arcs_list[hdr->b_type], - hdr); + list_insert_head(&new_state->arcs_list[buftype], hdr); /* ghost elements have a ghost size */ if (GHOST_STATE(new_state)) { - ASSERT(hdr->b_datacnt == 0); - ASSERT(hdr->b_buf == NULL); + ASSERT0(datacnt); + ASSERT(hdr->b_l1hdr.b_buf == NULL); to_delta = hdr->b_size; } atomic_add_64(size, to_delta); @@ -1236,20 +1473,22 @@ arc_change_state(arc_state_t *new_state, if (new_state == arc_anon && HDR_IN_HASH_TABLE(hdr)) buf_hash_remove(hdr); - /* adjust state sizes */ - if (to_delta) + /* adjust state sizes (ignore arc_l2c_only) */ + if (to_delta && new_state != arc_l2c_only) atomic_add_64(&new_state->arcs_size, to_delta); - if (from_delta) { + if (from_delta && old_state != arc_l2c_only) { ASSERT3U(old_state->arcs_size, >=, from_delta); atomic_add_64(&old_state->arcs_size, -from_delta); } - hdr->b_state = new_state; + if (HDR_HAS_L1HDR(hdr)) + hdr->b_l1hdr.b_state = new_state; - /* adjust l2arc hdr stats */ - if (new_state == arc_l2c_only) - l2arc_hdr_stat_add(); - else if (old_state == arc_l2c_only) - l2arc_hdr_stat_remove(); + /* + * L2 headers should never be on the L2 state list since they don't + * have L1 headers allocated. + */ + ASSERT(list_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && + list_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); } void @@ -1305,31 +1544,36 @@ arc_space_return(uint64_t space, arc_spa } arc_buf_t * -arc_buf_alloc(spa_t *spa, int size, void *tag, arc_buf_contents_t type) +arc_buf_alloc(spa_t *spa, int32_t size, void *tag, arc_buf_contents_t type) { arc_buf_hdr_t *hdr; arc_buf_t *buf; ASSERT3U(size, >, 0); - hdr = kmem_cache_alloc(hdr_cache, KM_PUSHPAGE); + hdr = kmem_cache_alloc(hdr_full_cache, KM_PUSHPAGE); ASSERT(BUF_EMPTY(hdr)); + ASSERT3P(hdr->b_freeze_cksum, ==, NULL); hdr->b_size = size; - hdr->b_type = type; hdr->b_spa = spa_load_guid(spa); - hdr->b_state = arc_anon; - hdr->b_arc_access = 0; + buf = kmem_cache_alloc(buf_cache, KM_PUSHPAGE); buf->b_hdr = hdr; buf->b_data = NULL; buf->b_efunc = NULL; buf->b_private = NULL; buf->b_next = NULL; - hdr->b_buf = buf; + + hdr->b_flags = arc_bufc_to_flags(type); + hdr->b_flags |= ARC_FLAG_HAS_L1HDR; + + hdr->b_l1hdr.b_buf = buf; + hdr->b_l1hdr.b_state = arc_anon; + hdr->b_l1hdr.b_arc_access = 0; + hdr->b_l1hdr.b_datacnt = 1; + arc_get_data_buf(buf); - hdr->b_datacnt = 1; - hdr->b_flags = 0; - ASSERT(refcount_is_zero(&hdr->b_refcnt)); - (void) refcount_add(&hdr->b_refcnt, tag); + ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt)); + (void) refcount_add(&hdr->b_l1hdr.b_refcnt, tag); return (buf); } @@ -1362,8 +1606,9 @@ arc_return_buf(arc_buf_t *buf, void *tag arc_buf_hdr_t *hdr = buf->b_hdr; ASSERT(buf->b_data != NULL); - (void) refcount_add(&hdr->b_refcnt, tag); - (void) refcount_remove(&hdr->b_refcnt, arc_onloan_tag); + ASSERT(HDR_HAS_L1HDR(hdr)); + (void) refcount_add(&hdr->b_l1hdr.b_refcnt, tag); + (void) refcount_remove(&hdr->b_l1hdr.b_refcnt, arc_onloan_tag); atomic_add_64(&arc_loaned_bytes, -hdr->b_size); } @@ -1372,12 +1617,12 @@ arc_return_buf(arc_buf_t *buf, void *tag void arc_loan_inuse_buf(arc_buf_t *buf, void *tag) { - arc_buf_hdr_t *hdr; + arc_buf_hdr_t *hdr = buf->b_hdr; ASSERT(buf->b_data != NULL); - hdr = buf->b_hdr; - (void) refcount_add(&hdr->b_refcnt, arc_onloan_tag); - (void) refcount_remove(&hdr->b_refcnt, tag); + ASSERT(HDR_HAS_L1HDR(hdr)); + (void) refcount_add(&hdr->b_l1hdr.b_refcnt, arc_onloan_tag); + (void) refcount_remove(&hdr->b_l1hdr.b_refcnt, tag); buf->b_efunc = NULL; buf->b_private = NULL; @@ -1391,15 +1636,16 @@ arc_buf_clone(arc_buf_t *from) arc_buf_hdr_t *hdr = from->b_hdr; uint64_t size = hdr->b_size; - ASSERT(hdr->b_state != arc_anon); + ASSERT(HDR_HAS_L1HDR(hdr)); + ASSERT(hdr->b_l1hdr.b_state != arc_anon); buf = kmem_cache_alloc(buf_cache, KM_PUSHPAGE); buf->b_hdr = hdr; buf->b_data = NULL; buf->b_efunc = NULL; buf->b_private = NULL; - buf->b_next = hdr->b_buf; - hdr->b_buf = buf; + buf->b_next = hdr->b_l1hdr.b_buf; + hdr->b_l1hdr.b_buf = buf; arc_get_data_buf(buf); bcopy(from->b_data, buf->b_data, size); @@ -1409,11 +1655,11 @@ arc_buf_clone(arc_buf_t *from) * then track the size and number of duplicates. These stats will be * updated as duplicate buffers are created and destroyed. */ - if (hdr->b_type == ARC_BUFC_DATA) { + if (HDR_ISTYPE_DATA(hdr)) { ARCSTAT_BUMP(arcstat_duplicate_buffers); ARCSTAT_INCR(arcstat_duplicate_buffers_size, size); } - hdr->b_datacnt += 1; + hdr->b_l1hdr.b_datacnt += 1; return (buf); } @@ -1436,17 +1682,20 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta hash_lock = HDR_LOCK(buf->b_hdr); mutex_enter(hash_lock); hdr = buf->b_hdr; + ASSERT(HDR_HAS_L1HDR(hdr)); ASSERT3P(hash_lock, ==, HDR_LOCK(hdr)); mutex_exit(&buf->b_evict_lock); - ASSERT(hdr->b_state == arc_mru || hdr->b_state == arc_mfu); + ASSERT(hdr->b_l1hdr.b_state == arc_mru || + hdr->b_l1hdr.b_state == arc_mfu); + add_reference(hdr, hash_lock, tag); DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); arc_access(hdr, hash_lock); mutex_exit(hash_lock); ARCSTAT_BUMP(arcstat_hits); - ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_FLAG_PREFETCH), - demand, prefetch, hdr->b_type != ARC_BUFC_METADATA, + ARCSTAT_CONDSTAT(!HDR_PREFETCH(hdr), + demand, prefetch, !HDR_ISTYPE_METADATA(hdr), data, metadata, hits); } @@ -1484,10 +1733,10 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ arc_buf_t **bufp; /* free up data associated with the buf */ - if (buf->b_data) { - arc_state_t *state = buf->b_hdr->b_state; + if (buf->b_data != NULL) { + arc_state_t *state = buf->b_hdr->b_l1hdr.b_state; uint64_t size = buf->b_hdr->b_size; - arc_buf_contents_t type = buf->b_hdr->b_type; + arc_buf_contents_t type = arc_buf_type(buf->b_hdr); arc_cksum_verify(buf); arc_buf_unwatch(buf); @@ -1503,11 +1752,12 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ atomic_add_64(&arc_size, -size); } } - if (list_link_active(&buf->b_hdr->b_arc_node)) { + if (list_link_active(&buf->b_hdr->b_l1hdr.b_arc_node)) { uint64_t *cnt = &state->arcs_lsize[type]; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:10:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D7BCBDB9; Tue, 20 Jan 2015 20:10:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B8D10338; Tue, 20 Jan 2015 20:10:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKA4nA001754; Tue, 20 Jan 2015 20:10:04 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKA4tw001752; Tue, 20 Jan 2015 20:10:04 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202010.t0KKA4tw001752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:10:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277427 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:10:05 -0000 Author: delphij Date: Tue Jan 20 20:10:03 2015 New Revision: 277427 URL: https://svnweb.freebsd.org/changeset/base/277427 Log: 5445 Add more visibility via arcstats; specifically arc_state_t stats and differentiate between "data" and "metadata" Reviewed by: Basil Crow Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Bayard Bell Approved by: Robert Mustacchi Author: Prakash Surya illumos/illumos-gate@4076b1bf41cfd9f968a33ed54a7ae76d9e996fe8 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:08:50 2015 (r277426) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:10:03 2015 (r277427) @@ -299,9 +299,137 @@ typedef struct arc_stats { kstat_named_t arcstat_c_min; kstat_named_t arcstat_c_max; kstat_named_t arcstat_size; + /* + * Number of bytes consumed by internal ARC structures necessary + * for tracking purposes; these structures are not actually + * backed by ARC buffers. This includes arc_buf_hdr_t structures + * (allocated via arc_buf_hdr_t_full and arc_buf_hdr_t_l2only + * caches), and arc_buf_t structures (allocated via arc_buf_t + * cache). + */ kstat_named_t arcstat_hdr_size; + /* + * Number of bytes consumed by ARC buffers of type equal to + * ARC_BUFC_DATA. This is generally consumed by buffers backing + * on disk user data (e.g. plain file contents). + */ kstat_named_t arcstat_data_size; + /* + * Number of bytes consumed by ARC buffers of type equal to + * ARC_BUFC_METADATA. This is generally consumed by buffers + * backing on disk data that is used for internal ZFS + * structures (e.g. ZAP, dnode, indirect blocks, etc). + */ + kstat_named_t arcstat_metadata_size; + /* + * Number of bytes consumed by various buffers and structures + * not actually backed with ARC buffers. This includes bonus + * buffers (allocated directly via zio_buf_* functions), + * dmu_buf_impl_t structures (allocated via dmu_buf_impl_t + * cache), and dnode_t structures (allocated via dnode_t cache). + */ kstat_named_t arcstat_other_size; + /* + * Total number of bytes consumed by ARC buffers residing in the + * arc_anon state. This includes *all* buffers in the arc_anon + * state; e.g. data, metadata, evictable, and unevictable buffers + * are all included in this value. + */ + kstat_named_t arcstat_anon_size; + /* + * Number of bytes consumed by ARC buffers that meet the + * following criteria: backing buffers of type ARC_BUFC_DATA, + * residing in the arc_anon state, and are eligible for eviction + * (e.g. have no outstanding holds on the buffer). + */ + kstat_named_t arcstat_anon_evictable_data; + /* + * Number of bytes consumed by ARC buffers that meet the + * following criteria: backing buffers of type ARC_BUFC_METADATA, + * residing in the arc_anon state, and are eligible for eviction + * (e.g. have no outstanding holds on the buffer). + */ + kstat_named_t arcstat_anon_evictable_metadata; + /* + * Total number of bytes consumed by ARC buffers residing in the + * arc_mru state. This includes *all* buffers in the arc_mru + * state; e.g. data, metadata, evictable, and unevictable buffers + * are all included in this value. + */ + kstat_named_t arcstat_mru_size; + /* + * Number of bytes consumed by ARC buffers that meet the + * following criteria: backing buffers of type ARC_BUFC_DATA, + * residing in the arc_mru state, and are eligible for eviction + * (e.g. have no outstanding holds on the buffer). + */ + kstat_named_t arcstat_mru_evictable_data; + /* + * Number of bytes consumed by ARC buffers that meet the + * following criteria: backing buffers of type ARC_BUFC_METADATA, + * residing in the arc_mru state, and are eligible for eviction + * (e.g. have no outstanding holds on the buffer). + */ + kstat_named_t arcstat_mru_evictable_metadata; + /* + * Total number of bytes that *would have been* consumed by ARC + * buffers in the arc_mru_ghost state. The key thing to note + * here, is the fact that this size doesn't actually indicate + * RAM consumption. The ghost lists only consist of headers and + * don't actually have ARC buffers linked off of these headers. + * Thus, *if* the headers had associated ARC buffers, these + * buffers *would have* consumed this number of bytes. + */ + kstat_named_t arcstat_mru_ghost_size; + /* + * Number of bytes that *would have been* consumed by ARC + * buffers that are eligible for eviction, of type + * ARC_BUFC_DATA, and linked off the arc_mru_ghost state. + */ + kstat_named_t arcstat_mru_ghost_evictable_data; + /* + * Number of bytes that *would have been* consumed by ARC + * buffers that are eligible for eviction, of type + * ARC_BUFC_METADATA, and linked off the arc_mru_ghost state. + */ + kstat_named_t arcstat_mru_ghost_evictable_metadata; + /* + * Total number of bytes consumed by ARC buffers residing in the + * arc_mfu state. This includes *all* buffers in the arc_mfu + * state; e.g. data, metadata, evictable, and unevictable buffers + * are all included in this value. + */ + kstat_named_t arcstat_mfu_size; + /* + * Number of bytes consumed by ARC buffers that are eligible for + * eviction, of type ARC_BUFC_DATA, and reside in the arc_mfu + * state. + */ + kstat_named_t arcstat_mfu_evictable_data; + /* + * Number of bytes consumed by ARC buffers that are eligible for + * eviction, of type ARC_BUFC_METADATA, and reside in the + * arc_mfu state. + */ + kstat_named_t arcstat_mfu_evictable_metadata; + /* + * Total number of bytes that *would have been* consumed by ARC + * buffers in the arc_mfu_ghost state. See the comment above + * arcstat_mru_ghost_size for more details. + */ + kstat_named_t arcstat_mfu_ghost_size; + /* + * Number of bytes that *would have been* consumed by ARC + * buffers that are eligible for eviction, of type + * ARC_BUFC_DATA, and linked off the arc_mfu_ghost state. + */ + kstat_named_t arcstat_mfu_ghost_evictable_data; + /* + * Number of bytes that *would have been* consumed by ARC + * buffers that are eligible for eviction, of type + * ARC_BUFC_METADATA, and linked off the arc_mru_ghost state. + */ + kstat_named_t arcstat_mfu_ghost_evictable_metadata; kstat_named_t arcstat_l2_hits; kstat_named_t arcstat_l2_misses; kstat_named_t arcstat_l2_feeds; @@ -369,7 +497,23 @@ static arc_stats_t arc_stats = { { "size", KSTAT_DATA_UINT64 }, { "hdr_size", KSTAT_DATA_UINT64 }, { "data_size", KSTAT_DATA_UINT64 }, + { "metadata_size", KSTAT_DATA_UINT64 }, { "other_size", KSTAT_DATA_UINT64 }, + { "anon_size", KSTAT_DATA_UINT64 }, + { "anon_evictable_data", KSTAT_DATA_UINT64 }, + { "anon_evictable_metadata", KSTAT_DATA_UINT64 }, + { "mru_size", KSTAT_DATA_UINT64 }, + { "mru_evictable_data", KSTAT_DATA_UINT64 }, + { "mru_evictable_metadata", KSTAT_DATA_UINT64 }, + { "mru_ghost_size", KSTAT_DATA_UINT64 }, + { "mru_ghost_evictable_data", KSTAT_DATA_UINT64 }, + { "mru_ghost_evictable_metadata", KSTAT_DATA_UINT64 }, + { "mfu_size", KSTAT_DATA_UINT64 }, + { "mfu_evictable_data", KSTAT_DATA_UINT64 }, + { "mfu_evictable_metadata", KSTAT_DATA_UINT64 }, + { "mfu_ghost_size", KSTAT_DATA_UINT64 }, + { "mfu_ghost_evictable_data", KSTAT_DATA_UINT64 }, + { "mfu_ghost_evictable_metadata", KSTAT_DATA_UINT64 }, { "l2_hits", KSTAT_DATA_UINT64 }, { "l2_misses", KSTAT_DATA_UINT64 }, { "l2_feeds", KSTAT_DATA_UINT64 }, @@ -1500,6 +1644,9 @@ arc_space_consume(uint64_t space, arc_sp case ARC_SPACE_DATA: ARCSTAT_INCR(arcstat_data_size, space); break; + case ARC_SPACE_META: + ARCSTAT_INCR(arcstat_metadata_size, space); + break; case ARC_SPACE_OTHER: ARCSTAT_INCR(arcstat_other_size, space); break; @@ -1511,7 +1658,9 @@ arc_space_consume(uint64_t space, arc_sp break; } - ARCSTAT_INCR(arcstat_meta_used, space); + if (type != ARC_SPACE_DATA) + ARCSTAT_INCR(arcstat_meta_used, space); + atomic_add_64(&arc_size, space); } @@ -1524,6 +1673,9 @@ arc_space_return(uint64_t space, arc_spa case ARC_SPACE_DATA: ARCSTAT_INCR(arcstat_data_size, -space); break; + case ARC_SPACE_META: + ARCSTAT_INCR(arcstat_metadata_size, -space); + break; case ARC_SPACE_OTHER: ARCSTAT_INCR(arcstat_other_size, -space); break; @@ -1535,10 +1687,13 @@ arc_space_return(uint64_t space, arc_spa break; } - ASSERT(arc_meta_used >= space); - if (arc_meta_max < arc_meta_used) - arc_meta_max = arc_meta_used; - ARCSTAT_INCR(arcstat_meta_used, -space); + if (type != ARC_SPACE_DATA) { + ASSERT(arc_meta_used >= space); + if (arc_meta_max < arc_meta_used) + arc_meta_max = arc_meta_used; + ARCSTAT_INCR(arcstat_meta_used, -space); + } + ASSERT(arc_size >= space); atomic_add_64(&arc_size, -space); } @@ -1744,12 +1899,11 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ if (!recycle) { if (type == ARC_BUFC_METADATA) { arc_buf_data_free(buf, zio_buf_free); - arc_space_return(size, ARC_SPACE_DATA); + arc_space_return(size, ARC_SPACE_META); } else { ASSERT(type == ARC_BUFC_DATA); arc_buf_data_free(buf, zio_data_buf_free); - ARCSTAT_INCR(arcstat_data_size, -size); - atomic_add_64(&arc_size, -size); + arc_space_return(size, ARC_SPACE_DATA); } } if (list_link_active(&buf->b_hdr->b_l1hdr.b_arc_node)) { @@ -2742,6 +2896,20 @@ arc_reclaim_thread(void) if (arc_eviction_list != NULL) arc_do_user_evicts(); + /* + * This is necessary in order for the mdb ::arc dcmd to + * show up to date information. Since the ::arc command + * does not call the kstat's update function, without + * this call, the command may show stale stats for the + * anon, mru, mru_ghost, mfu, and mfu_ghost lists. Even + * with this change, the data might be up to 1 second + * out of date; but that should suffice. The arc_state_t + * structures can be queried directly if more accurate + * information is needed. + */ + if (arc_ksp != NULL) + arc_ksp->ks_update(arc_ksp, KSTAT_READ); + /* block until needed, or one second, whichever is shorter */ CALLB_CPR_SAFE_BEGIN(&cpr); (void) cv_timedwait(&arc_reclaim_thr_cv, @@ -2878,12 +3046,11 @@ arc_get_data_buf(arc_buf_t *buf) if (!arc_evict_needed(type)) { if (type == ARC_BUFC_METADATA) { buf->b_data = zio_buf_alloc(size); - arc_space_consume(size, ARC_SPACE_DATA); + arc_space_consume(size, ARC_SPACE_META); } else { ASSERT(type == ARC_BUFC_DATA); buf->b_data = zio_data_buf_alloc(size); - ARCSTAT_INCR(arcstat_data_size, size); - atomic_add_64(&arc_size, size); + arc_space_consume(size, ARC_SPACE_DATA); } goto out; } @@ -2910,12 +3077,11 @@ arc_get_data_buf(arc_buf_t *buf) if ((buf->b_data = arc_evict(state, NULL, size, TRUE, type)) == NULL) { if (type == ARC_BUFC_METADATA) { buf->b_data = zio_buf_alloc(size); - arc_space_consume(size, ARC_SPACE_DATA); + arc_space_consume(size, ARC_SPACE_META); } else { ASSERT(type == ARC_BUFC_DATA); buf->b_data = zio_data_buf_alloc(size); - ARCSTAT_INCR(arcstat_data_size, size); - atomic_add_64(&arc_size, size); + arc_space_consume(size, ARC_SPACE_DATA); } ARCSTAT_BUMP(arcstat_recycle_miss); } @@ -4115,6 +4281,48 @@ arc_tempreserve_space(uint64_t reserve, return (0); } +static void +arc_kstat_update_state(arc_state_t *state, kstat_named_t *size, + kstat_named_t *evict_data, kstat_named_t *evict_metadata) +{ + size->value.ui64 = state->arcs_size; + evict_data->value.ui64 = state->arcs_lsize[ARC_BUFC_DATA]; + evict_metadata->value.ui64 = state->arcs_lsize[ARC_BUFC_METADATA]; +} + +static int +arc_kstat_update(kstat_t *ksp, int rw) +{ + arc_stats_t *as = ksp->ks_data; + + if (rw == KSTAT_WRITE) { + return (EACCES); + } else { + arc_kstat_update_state(arc_anon, + &as->arcstat_anon_size, + &as->arcstat_anon_evictable_data, + &as->arcstat_anon_evictable_metadata); + arc_kstat_update_state(arc_mru, + &as->arcstat_mru_size, + &as->arcstat_mru_evictable_data, + &as->arcstat_mru_evictable_metadata); + arc_kstat_update_state(arc_mru_ghost, + &as->arcstat_mru_ghost_size, + &as->arcstat_mru_ghost_evictable_data, + &as->arcstat_mru_ghost_evictable_metadata); + arc_kstat_update_state(arc_mfu, + &as->arcstat_mfu_size, + &as->arcstat_mfu_evictable_data, + &as->arcstat_mfu_evictable_metadata); + arc_kstat_update_state(arc_mfu_ghost, + &as->arcstat_mfu_ghost_size, + &as->arcstat_mfu_ghost_evictable_data, + &as->arcstat_mfu_ghost_evictable_metadata); + } + + return (0); +} + void arc_init(void) { @@ -4261,6 +4469,7 @@ arc_init(void) if (arc_ksp != NULL) { arc_ksp->ks_data = &arc_stats; + arc_ksp->ks_update = arc_kstat_update; kstat_install(arc_ksp); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Tue Jan 20 20:08:50 2015 (r277426) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h Tue Jan 20 20:10:03 2015 (r277427) @@ -115,6 +115,7 @@ typedef enum arc_buf_contents { */ typedef enum arc_space_type { ARC_SPACE_DATA, + ARC_SPACE_META, ARC_SPACE_HDRS, ARC_SPACE_L2HDRS, ARC_SPACE_OTHER, From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:11:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E5CC6F26; Tue, 20 Jan 2015 20:11:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF8FB3F0; Tue, 20 Jan 2015 20:11:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKBWAt004788; Tue, 20 Jan 2015 20:11:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKBULc004776; Tue, 20 Jan 2015 20:11:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202011.t0KKBULc004776@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277428 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:11:33 -0000 Author: delphij Date: Tue Jan 20 20:11:30 2015 New Revision: 277428 URL: https://svnweb.freebsd.org/changeset/base/277428 Log: 5056 ZFS deadlock on db_mtx and dn_holds Reviewed by: Will Andrews Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Dan McDonald Author: Justin Gibbs illumos/illumos-gate@bc9014e6a81272073b9854d9f65dd59e18d18c35 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deadlist.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_deleg.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_destroy.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dir.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_prop.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_scan.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_userhold.c vendor-sys/illumos/dist/uts/common/fs/zfs/sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa.c vendor-sys/illumos/dist/uts/common/fs/zfs/spa_misc.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dbuf.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dmu_objset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dataset.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dsl_dir.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/sa.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/sa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/spa_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zap_leaf.h vendor-sys/illumos/dist/uts/common/fs/zfs/zap.c vendor-sys/illumos/dist/uts/common/fs/zfs/zap_micro.c vendor-sys/illumos/dist/uts/common/fs/zfs/zfs_sa.c vendor-sys/illumos/dist/uts/common/fs/zfs/zil.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dbuf.c Tue Jan 20 20:11:30 2015 (r277428) @@ -24,6 +24,7 @@ * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ #include @@ -54,10 +55,16 @@ static void dbuf_destroy(dmu_buf_impl_t static boolean_t dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_t *tx); static void dbuf_write(dbuf_dirty_record_t *dr, arc_buf_t *data, dmu_tx_t *tx); +#ifndef __lint +extern inline void dmu_buf_init_user(dmu_buf_user_t *dbu, + dmu_buf_evict_func_t *evict_func, dmu_buf_t **clear_on_evict_dbufp); +#endif /* ! __lint */ + /* * Global data structures and functions for the dbuf cache. */ static kmem_cache_t *dbuf_cache; +static taskq_t *dbu_evict_taskq; /* ARGSUSED */ static int @@ -215,17 +222,72 @@ dbuf_hash_remove(dmu_buf_impl_t *db) static arc_evict_func_t dbuf_do_evict; +typedef enum { + DBVU_EVICTING, + DBVU_NOT_EVICTING +} dbvu_verify_type_t; + +static void +dbuf_verify_user(dmu_buf_impl_t *db, dbvu_verify_type_t verify_type) +{ +#ifdef ZFS_DEBUG + int64_t holds; + + if (db->db_user == NULL) + return; + + /* Only data blocks support the attachment of user data. */ + ASSERT(db->db_level == 0); + + /* Clients must resolve a dbuf before attaching user data. */ + ASSERT(db->db.db_data != NULL); + ASSERT3U(db->db_state, ==, DB_CACHED); + + holds = refcount_count(&db->db_holds); + if (verify_type == DBVU_EVICTING) { + /* + * Immediate eviction occurs when holds == dirtycnt. + * For normal eviction buffers, holds is zero on + * eviction, except when dbuf_fix_old_data() calls + * dbuf_clear_data(). However, the hold count can grow + * during eviction even though db_mtx is held (see + * dmu_bonus_hold() for an example), so we can only + * test the generic invariant that holds >= dirtycnt. + */ + ASSERT3U(holds, >=, db->db_dirtycnt); + } else { + if (db->db_immediate_evict == TRUE) + ASSERT3U(holds, >=, db->db_dirtycnt); + else + ASSERT3U(holds, >, 0); + } +#endif +} + static void dbuf_evict_user(dmu_buf_impl_t *db) { + dmu_buf_user_t *dbu = db->db_user; + ASSERT(MUTEX_HELD(&db->db_mtx)); - if (db->db_level != 0 || db->db_evict_func == NULL) + if (dbu == NULL) return; - db->db_evict_func(&db->db, db->db_user_ptr); - db->db_user_ptr = NULL; - db->db_evict_func = NULL; + dbuf_verify_user(db, DBVU_EVICTING); + db->db_user = NULL; + +#ifdef ZFS_DEBUG + if (dbu->dbu_clear_on_evict_dbufp != NULL) + *dbu->dbu_clear_on_evict_dbufp = NULL; +#endif + + /* + * Invoke the callback from a taskq to avoid lock order reversals + * and limit stack depth. + */ + taskq_dispatch_ent(dbu_evict_taskq, dbu->dbu_evict_func, dbu, 0, + &dbu->dbu_tqent); } boolean_t @@ -286,6 +348,12 @@ retry: for (i = 0; i < DBUF_MUTEXES; i++) mutex_init(&h->hash_mutexes[i], NULL, MUTEX_DEFAULT, NULL); + + /* + * All entries are queued via taskq_dispatch_ent(), so min/maxalloc + * configuration is not required. + */ + dbu_evict_taskq = taskq_create("dbu_evict", 1, minclsyspri, 0, 0, 0); } void @@ -298,6 +366,7 @@ dbuf_fini(void) mutex_destroy(&h->hash_mutexes[i]); kmem_free(h->hash_table, (h->hash_table_mask + 1) * sizeof (void *)); kmem_cache_destroy(dbuf_cache); + taskq_destroy(dbu_evict_taskq); } /* @@ -415,21 +484,27 @@ dbuf_verify(dmu_buf_impl_t *db) #endif static void +dbuf_clear_data(dmu_buf_impl_t *db) +{ + ASSERT(MUTEX_HELD(&db->db_mtx)); + dbuf_evict_user(db); + db->db_buf = NULL; + db->db.db_data = NULL; + if (db->db_state != DB_NOFILL) + db->db_state = DB_UNCACHED; +} + +static void dbuf_set_data(dmu_buf_impl_t *db, arc_buf_t *buf) { ASSERT(MUTEX_HELD(&db->db_mtx)); + ASSERT(buf != NULL); + db->db_buf = buf; - if (buf != NULL) { - ASSERT(buf->b_data != NULL); - db->db.db_data = buf->b_data; - if (!arc_released(buf)) - arc_set_callback(buf, dbuf_do_evict, db); - } else { - dbuf_evict_user(db); - db->db.db_data = NULL; - if (db->db_state != DB_NOFILL) - db->db_state = DB_UNCACHED; - } + ASSERT(buf->b_data != NULL); + db->db.db_data = buf->b_data; + if (!arc_released(buf)) + arc_set_callback(buf, dbuf_do_evict, db); } /* @@ -451,7 +526,7 @@ dbuf_loan_arcbuf(dmu_buf_impl_t *db) } else { abuf = db->db_buf; arc_loan_inuse_buf(abuf, db); - dbuf_set_data(db, NULL); + dbuf_clear_data(db); mutex_exit(&db->db_mtx); } return (abuf); @@ -687,7 +762,7 @@ dbuf_noread(dmu_buf_impl_t *db) dbuf_set_data(db, arc_buf_alloc(spa, db->db.db_size, db, type)); db->db_state = DB_FILL; } else if (db->db_state == DB_NOFILL) { - dbuf_set_data(db, NULL); + dbuf_clear_data(db); } else { ASSERT3U(db->db_state, ==, DB_CACHED); } @@ -743,7 +818,7 @@ dbuf_fix_old_data(dmu_buf_impl_t *db, ui dr->dt.dl.dr_data = arc_buf_alloc(spa, size, db, type); bcopy(db->db.db_data, dr->dt.dl.dr_data->b_data, size); } else { - dbuf_set_data(db, NULL); + dbuf_clear_data(db); } } @@ -794,7 +869,8 @@ void dbuf_free_range(dnode_t *dn, uint64_t start_blkid, uint64_t end_blkid, dmu_tx_t *tx) { - dmu_buf_impl_t *db, *db_next, db_search; + dmu_buf_impl_t db_search; + dmu_buf_impl_t *db, *db_next; uint64_t txg = tx->tx_txg; avl_index_t where; @@ -1370,7 +1446,7 @@ dbuf_undirty(dmu_buf_impl_t *db, dmu_tx_ arc_buf_t *buf = db->db_buf; ASSERT(db->db_state == DB_NOFILL || arc_released(buf)); - dbuf_set_data(db, NULL); + dbuf_clear_data(db); VERIFY(arc_buf_remove_ref(buf, db)); dbuf_evict(db); return (B_TRUE); @@ -1710,8 +1786,7 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db_parent = parent; db->db_blkptr = blkptr; - db->db_user_ptr = NULL; - db->db_evict_func = NULL; + db->db_user = NULL; db->db_immediate_evict = 0; db->db_freed_in_flight = 0; @@ -2114,7 +2189,7 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, /* * This dbuf has anonymous data associated with it. */ - dbuf_set_data(db, NULL); + dbuf_clear_data(db); VERIFY(arc_buf_remove_ref(buf, db)); dbuf_evict(db); } else { @@ -2147,7 +2222,8 @@ dbuf_rele_and_unlock(dmu_buf_impl_t *db, } else { dbuf_clear(db); } - } else if (arc_buf_eviction_needed(db->db_buf)) { + } else if (db->db_objset->os_evicting || + arc_buf_eviction_needed(db->db_buf)) { dbuf_clear(db); } else { mutex_exit(&db->db_mtx); @@ -2166,51 +2242,57 @@ dbuf_refcount(dmu_buf_impl_t *db) } void * -dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, - dmu_buf_evict_func_t *evict_func) +dmu_buf_replace_user(dmu_buf_t *db_fake, dmu_buf_user_t *old_user, + dmu_buf_user_t *new_user) { - return (dmu_buf_update_user(db_fake, NULL, user_ptr, evict_func)); + dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; + + mutex_enter(&db->db_mtx); + dbuf_verify_user(db, DBVU_NOT_EVICTING); + if (db->db_user == old_user) + db->db_user = new_user; + else + old_user = db->db_user; + dbuf_verify_user(db, DBVU_NOT_EVICTING); + mutex_exit(&db->db_mtx); + + return (old_user); } void * -dmu_buf_set_user_ie(dmu_buf_t *db_fake, void *user_ptr, - dmu_buf_evict_func_t *evict_func) +dmu_buf_set_user(dmu_buf_t *db_fake, dmu_buf_user_t *user) { - dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; - - db->db_immediate_evict = TRUE; - return (dmu_buf_update_user(db_fake, NULL, user_ptr, evict_func)); + return (dmu_buf_replace_user(db_fake, NULL, user)); } void * -dmu_buf_update_user(dmu_buf_t *db_fake, void *old_user_ptr, void *user_ptr, - dmu_buf_evict_func_t *evict_func) +dmu_buf_set_user_ie(dmu_buf_t *db_fake, dmu_buf_user_t *user) { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; - ASSERT(db->db_level == 0); - - ASSERT((user_ptr == NULL) == (evict_func == NULL)); - - mutex_enter(&db->db_mtx); - if (db->db_user_ptr == old_user_ptr) { - db->db_user_ptr = user_ptr; - db->db_evict_func = evict_func; - } else { - old_user_ptr = db->db_user_ptr; - } + db->db_immediate_evict = TRUE; + return (dmu_buf_set_user(db_fake, user)); +} - mutex_exit(&db->db_mtx); - return (old_user_ptr); +void * +dmu_buf_remove_user(dmu_buf_t *db_fake, dmu_buf_user_t *user) +{ + return (dmu_buf_replace_user(db_fake, user, NULL)); } void * dmu_buf_get_user(dmu_buf_t *db_fake) { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; - ASSERT(!refcount_is_zero(&db->db_holds)); - return (db->db_user_ptr); + dbuf_verify_user(db, DBVU_NOT_EVICTING); + return (db->db_user); +} + +void +dmu_buf_user_evict_wait() +{ + taskq_wait(dbu_evict_taskq); } boolean_t Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_objset.c Tue Jan 20 20:11:30 2015 (r277428) @@ -23,6 +23,7 @@ * Copyright (c) 2012, 2014 by Delphix. All rights reserved. * Copyright (c) 2013 by Saso Kiselkov. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -355,7 +356,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat zfs_prop_to_name(ZFS_PROP_SECONDARYCACHE), secondary_cache_changed_cb, os); } - if (!dsl_dataset_is_snapshot(ds)) { + if (!ds->ds_is_snapshot) { if (err == 0) { err = dsl_prop_register(ds, zfs_prop_to_name(ZFS_PROP_CHECKSUM), @@ -417,7 +418,7 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat os->os_secondary_cache = ZFS_CACHE_ALL; } - if (ds == NULL || !dsl_dataset_is_snapshot(ds)) + if (ds == NULL || !ds->ds_is_snapshot) os->os_zil_header = os->os_phys->os_zil_header; os->os_zil = zil_alloc(os, &os->os_zil_header); @@ -436,16 +437,13 @@ dmu_objset_open_impl(spa_t *spa, dsl_dat mutex_init(&os->os_obj_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&os->os_user_ptr_lock, NULL, MUTEX_DEFAULT, NULL); - DMU_META_DNODE(os) = dnode_special_open(os, - &os->os_phys->os_meta_dnode, DMU_META_DNODE_OBJECT, - &os->os_meta_dnode); + dnode_special_open(os, &os->os_phys->os_meta_dnode, + DMU_META_DNODE_OBJECT, &os->os_meta_dnode); if (arc_buf_size(os->os_phys_buf) >= sizeof (objset_phys_t)) { - DMU_USERUSED_DNODE(os) = dnode_special_open(os, - &os->os_phys->os_userused_dnode, DMU_USERUSED_OBJECT, - &os->os_userused_dnode); - DMU_GROUPUSED_DNODE(os) = dnode_special_open(os, - &os->os_phys->os_groupused_dnode, DMU_GROUPUSED_OBJECT, - &os->os_groupused_dnode); + dnode_special_open(os, &os->os_phys->os_userused_dnode, + DMU_USERUSED_OBJECT, &os->os_userused_dnode); + dnode_special_open(os, &os->os_phys->os_groupused_dnode, + DMU_GROUPUSED_OBJECT, &os->os_groupused_dnode); } *osp = os; @@ -533,7 +531,7 @@ dmu_objset_own(const char *name, dmu_obj } else if (type != DMU_OST_ANY && type != (*osp)->os_phys->os_type) { dsl_dataset_disown(ds, tag); return (SET_ERROR(EINVAL)); - } else if (!readonly && dsl_dataset_is_snapshot(ds)) { + } else if (!readonly && ds->ds_is_snapshot) { dsl_dataset_disown(ds, tag); return (SET_ERROR(EROFS)); } @@ -589,41 +587,53 @@ dmu_objset_disown(objset_t *os, void *ta void dmu_objset_evict_dbufs(objset_t *os) { + dnode_t dn_marker; dnode_t *dn; mutex_enter(&os->os_lock); - - /* process the mdn last, since the other dnodes have holds on it */ - list_remove(&os->os_dnodes, DMU_META_DNODE(os)); - list_insert_tail(&os->os_dnodes, DMU_META_DNODE(os)); - - /* - * Find the first dnode with holds. We have to do this dance - * because dnode_add_ref() only works if you already have a - * hold. If there are no holds then it has no dbufs so OK to - * skip. - */ - for (dn = list_head(&os->os_dnodes); - dn && !dnode_add_ref(dn, FTAG); - dn = list_next(&os->os_dnodes, dn)) - continue; - - while (dn) { - dnode_t *next_dn = dn; - - do { - next_dn = list_next(&os->os_dnodes, next_dn); - } while (next_dn && !dnode_add_ref(next_dn, FTAG)); - - mutex_exit(&os->os_lock); - dnode_evict_dbufs(dn); - dnode_rele(dn, FTAG); - mutex_enter(&os->os_lock); - dn = next_dn; + dn = list_head(&os->os_dnodes); + while (dn != NULL) { + /* + * Skip dnodes without holds. We have to do this dance + * because dnode_add_ref() only works if there is already a + * hold. If the dnode has no holds, then it has no dbufs. + */ + if (dnode_add_ref(dn, FTAG)) { + list_insert_after(&os->os_dnodes, dn, &dn_marker); + mutex_exit(&os->os_lock); + + dnode_evict_dbufs(dn); + dnode_rele(dn, FTAG); + + mutex_enter(&os->os_lock); + dn = list_next(&os->os_dnodes, &dn_marker); + list_remove(&os->os_dnodes, &dn_marker); + } else { + dn = list_next(&os->os_dnodes, dn); + } } mutex_exit(&os->os_lock); + + if (DMU_USERUSED_DNODE(os) != NULL) { + dnode_evict_dbufs(DMU_GROUPUSED_DNODE(os)); + dnode_evict_dbufs(DMU_USERUSED_DNODE(os)); + } + dnode_evict_dbufs(DMU_META_DNODE(os)); } +/* + * Objset eviction processing is split into into two pieces. + * The first marks the objset as evicting, evicts any dbufs that + * have a refcount of zero, and then queues up the objset for the + * second phase of eviction. Once os->os_dnodes has been cleared by + * dnode_buf_pageout()->dnode_destroy(), the second phase is executed. + * The second phase closes the special dnodes, dequeues the objset from + * the list of those undergoing eviction, and finally frees the objset. + * + * NOTE: Due to asynchronous eviction processing (invocation of + * dnode_buf_pageout()), it is possible for the meta dnode for the + * objset to have no holds even though os->os_dnodes is not empty. + */ void dmu_objset_evict(objset_t *os) { @@ -633,7 +643,7 @@ dmu_objset_evict(objset_t *os) ASSERT(!dmu_objset_is_dirty(os, t)); if (ds) { - if (!dsl_dataset_is_snapshot(ds)) { + if (!ds->ds_is_snapshot) { VERIFY0(dsl_prop_unregister(ds, zfs_prop_to_name(ZFS_PROP_CHECKSUM), checksum_changed_cb, os)); @@ -670,8 +680,24 @@ dmu_objset_evict(objset_t *os) if (os->os_sa) sa_tear_down(os); + os->os_evicting = B_TRUE; dmu_objset_evict_dbufs(os); + mutex_enter(&os->os_lock); + spa_evicting_os_register(os->os_spa, os); + if (list_is_empty(&os->os_dnodes)) { + mutex_exit(&os->os_lock); + dmu_objset_evict_done(os); + } else { + mutex_exit(&os->os_lock); + } +} + +void +dmu_objset_evict_done(objset_t *os) +{ + ASSERT3P(list_head(&os->os_dnodes), ==, NULL); + dnode_special_close(&os->os_meta_dnode); if (DMU_USERUSED_DNODE(os)) { dnode_special_close(&os->os_userused_dnode); @@ -679,8 +705,6 @@ dmu_objset_evict(objset_t *os) } zil_free(os->os_zil); - ASSERT3P(list_head(&os->os_dnodes), ==, NULL); - VERIFY(arc_buf_remove_ref(os->os_phys_buf, &os->os_phys_buf)); /* @@ -695,6 +719,7 @@ dmu_objset_evict(objset_t *os) mutex_destroy(&os->os_lock); mutex_destroy(&os->os_obj_lock); mutex_destroy(&os->os_user_ptr_lock); + spa_evicting_os_deregister(os->os_spa, os); kmem_free(os, sizeof (objset_t)); } @@ -903,7 +928,7 @@ dmu_objset_clone_check(void *arg, dmu_tx } /* You can only clone snapshots, not the head datasets. */ - if (!dsl_dataset_is_snapshot(origin)) { + if (!origin->ds_is_snapshot) { dsl_dataset_rele(origin, FTAG); return (SET_ERROR(EINVAL)); } @@ -1467,7 +1492,7 @@ int dmu_objset_is_snapshot(objset_t *os) { if (os->os_dsl_dataset != NULL) - return (dsl_dataset_is_snapshot(os->os_dsl_dataset)); + return (os->os_dsl_dataset->ds_is_snapshot); else return (B_FALSE); } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_send.c Tue Jan 20 20:11:30 2015 (r277428) @@ -611,7 +611,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, fromtxg = fromzb->zbm_creation_txg; } dsl_dataset_name(ds, drr->drr_u.drr_begin.drr_toname); - if (!dsl_dataset_is_snapshot(ds)) { + if (!ds->ds_is_snapshot) { (void) strlcat(drr->drr_u.drr_begin.drr_toname, "@--head--", sizeof (drr->drr_u.drr_begin.drr_toname)); } @@ -818,7 +818,7 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl ASSERT(dsl_pool_config_held(dp)); /* tosnap must be a snapshot */ - if (!dsl_dataset_is_snapshot(ds)) + if (!ds->ds_is_snapshot) return (SET_ERROR(EINVAL)); /* @@ -1065,7 +1065,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t dsl_dataset_rele(ds, FTAG); return (error); } - if (!dsl_dataset_is_snapshot(origin)) { + if (!origin->ds_is_snapshot) { dsl_dataset_rele(origin, FTAG); dsl_dataset_rele(ds, FTAG); return (SET_ERROR(EINVAL)); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dmu_traverse.c Tue Jan 20 20:11:30 2015 (r277428) @@ -532,7 +532,7 @@ traverse_impl(spa_t *spa, dsl_dataset_t cv_init(&pd.pd_cv, NULL, CV_DEFAULT, NULL); /* See comment on ZIL traversal in dsl_scan_visitds. */ - if (ds != NULL && !dsl_dataset_is_snapshot(ds) && !BP_IS_HOLE(rootbp)) { + if (ds != NULL && !ds->ds_is_snapshot && !BP_IS_HOLE(rootbp)) { arc_flags_t flags = ARC_FLAG_WAIT; objset_phys_t *osp; arc_buf_t *buf; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Tue Jan 20 20:11:30 2015 (r277428) @@ -21,6 +21,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ #include @@ -402,8 +403,9 @@ static dnode_t * dnode_create(objset_t *os, dnode_phys_t *dnp, dmu_buf_impl_t *db, uint64_t object, dnode_handle_t *dnh) { - dnode_t *dn = kmem_cache_alloc(dnode_cache, KM_SLEEP); + dnode_t *dn; + dn = kmem_cache_alloc(dnode_cache, KM_SLEEP); ASSERT(!POINTER_IS_VALID(dn->dn_objset)); dn->dn_moved = 0; @@ -440,13 +442,31 @@ dnode_create(objset_t *os, dnode_phys_t ASSERT(DMU_OT_IS_VALID(dn->dn_phys->dn_type)); mutex_enter(&os->os_lock); - list_insert_head(&os->os_dnodes, dn); + if (dnh->dnh_dnode != NULL) { + /* Lost the allocation race. */ + mutex_exit(&os->os_lock); + kmem_cache_free(dnode_cache, dn); + return (dnh->dnh_dnode); + } + + /* + * Exclude special dnodes from os_dnodes so an empty os_dnodes + * signifies that the special dnodes have no references from + * their children (the entries in os_dnodes). This allows + * dnode_destroy() to easily determine if the last child has + * been removed and then complete eviction of the objset. + */ + if (!DMU_OBJECT_IS_SPECIAL(object)) + list_insert_head(&os->os_dnodes, dn); membar_producer(); + /* - * Everything else must be valid before assigning dn_objset makes the - * dnode eligible for dnode_move(). + * Everything else must be valid before assigning dn_objset + * makes the dnode eligible for dnode_move(). */ dn->dn_objset = os; + + dnh->dnh_dnode = dn; mutex_exit(&os->os_lock); arc_space_consume(sizeof (dnode_t), ARC_SPACE_OTHER); @@ -460,12 +480,18 @@ static void dnode_destroy(dnode_t *dn) { objset_t *os = dn->dn_objset; + boolean_t complete_os_eviction = B_FALSE; ASSERT((dn->dn_id_flags & DN_ID_NEW_EXIST) == 0); mutex_enter(&os->os_lock); POINTER_INVALIDATE(&dn->dn_objset); - list_remove(&os->os_dnodes, dn); + if (!DMU_OBJECT_IS_SPECIAL(dn->dn_object)) { + list_remove(&os->os_dnodes, dn); + complete_os_eviction = + list_is_empty(&os->os_dnodes) && + list_link_active(&os->os_evicting_node); + } mutex_exit(&os->os_lock); /* the dnode can no longer move, so we can release the handle */ @@ -500,6 +526,9 @@ dnode_destroy(dnode_t *dn) dmu_zfetch_rele(&dn->dn_zfetch); kmem_cache_free(dnode_cache, dn); arc_space_return(sizeof (dnode_t), ARC_SPACE_OTHER); + + if (complete_os_eviction) + dmu_objset_evict_done(os); } void @@ -966,33 +995,32 @@ dnode_special_close(dnode_handle_t *dnh) */ while (refcount_count(&dn->dn_holds) > 0) delay(1); + ASSERT(dn->dn_dbuf == NULL || + dmu_buf_get_user(&dn->dn_dbuf->db) == NULL); zrl_add(&dnh->dnh_zrlock); dnode_destroy(dn); /* implicit zrl_remove() */ zrl_destroy(&dnh->dnh_zrlock); dnh->dnh_dnode = NULL; } -dnode_t * +void dnode_special_open(objset_t *os, dnode_phys_t *dnp, uint64_t object, dnode_handle_t *dnh) { - dnode_t *dn = dnode_create(os, dnp, NULL, object, dnh); - dnh->dnh_dnode = dn; + dnode_t *dn; + + dn = dnode_create(os, dnp, NULL, object, dnh); zrl_init(&dnh->dnh_zrlock); DNODE_VERIFY(dn); - return (dn); } static void -dnode_buf_pageout(dmu_buf_t *db, void *arg) +dnode_buf_pageout(void *dbu) { - dnode_children_t *children_dnodes = arg; + dnode_children_t *children_dnodes = dbu; int i; - int epb = db->db_size >> DNODE_SHIFT; - ASSERT(epb == children_dnodes->dnc_count); - - for (i = 0; i < epb; i++) { + for (i = 0; i < children_dnodes->dnc_count; i++) { dnode_handle_t *dnh = &children_dnodes->dnc_children[i]; dnode_t *dn; @@ -1022,7 +1050,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *a dnh->dnh_dnode = NULL; } kmem_free(children_dnodes, sizeof (dnode_children_t) + - epb * sizeof (dnode_handle_t)); + children_dnodes->dnc_count * sizeof (dnode_handle_t)); } /* @@ -1106,16 +1134,17 @@ dnode_hold_impl(objset_t *os, uint64_t o if (children_dnodes == NULL) { int i; dnode_children_t *winner; - children_dnodes = kmem_alloc(sizeof (dnode_children_t) + + children_dnodes = kmem_zalloc(sizeof (dnode_children_t) + epb * sizeof (dnode_handle_t), KM_SLEEP); children_dnodes->dnc_count = epb; dnh = &children_dnodes->dnc_children[0]; for (i = 0; i < epb; i++) { zrl_init(&dnh[i].dnh_zrlock); - dnh[i].dnh_dnode = NULL; } - if (winner = dmu_buf_set_user(&db->db, children_dnodes, - dnode_buf_pageout)) { + dmu_buf_init_user(&children_dnodes->dnc_dbu, + dnode_buf_pageout, NULL); + winner = dmu_buf_set_user(&db->db, &children_dnodes->dnc_dbu); + if (winner != NULL) { for (i = 0; i < epb; i++) { zrl_destroy(&dnh[i].dnh_zrlock); @@ -1130,17 +1159,11 @@ dnode_hold_impl(objset_t *os, uint64_t o dnh = &children_dnodes->dnc_children[idx]; zrl_add(&dnh->dnh_zrlock); - if ((dn = dnh->dnh_dnode) == NULL) { + dn = dnh->dnh_dnode; + if (dn == NULL) { dnode_phys_t *phys = (dnode_phys_t *)db->db.db_data+idx; - dnode_t *winner; dn = dnode_create(os, phys, db, object, dnh); - winner = atomic_cas_ptr(&dnh->dnh_dnode, NULL, dn); - if (winner != NULL) { - zrl_add(&dnh->dnh_zrlock); - dnode_destroy(dn); /* implicit zrl_remove() */ - dn = winner; - } } mutex_enter(&dn->dn_mtx); @@ -1154,10 +1177,10 @@ dnode_hold_impl(objset_t *os, uint64_t o dbuf_rele(db, FTAG); return (type == DMU_OT_NONE ? ENOENT : EEXIST); } - mutex_exit(&dn->dn_mtx); - if (refcount_add(&dn->dn_holds, tag) == 1) dbuf_add_ref(db, dnh); + mutex_exit(&dn->dn_mtx); + /* Now we can rely on the hold to prevent the dnode from moving. */ zrl_remove(&dnh->dnh_zrlock); Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode_sync.c Tue Jan 20 20:11:30 2015 (r277428) @@ -22,6 +22,7 @@ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2012, 2014 by Delphix. All rights reserved. + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ #include @@ -396,49 +397,37 @@ dnode_sync_free_range(void *arg, uint64_ void dnode_evict_dbufs(dnode_t *dn) { - int progress; - int pass = 0; + dmu_buf_impl_t db_marker; + dmu_buf_impl_t *db, *db_next; + + mutex_enter(&dn->dn_dbufs_mtx); + for (db = avl_first(&dn->dn_dbufs); db != NULL; db = db_next) { - do { - dmu_buf_impl_t *db, *db_next; - int evicting = FALSE; - - progress = FALSE; - mutex_enter(&dn->dn_dbufs_mtx); - for (db = avl_first(&dn->dn_dbufs); db != NULL; db = db_next) { - db_next = AVL_NEXT(&dn->dn_dbufs, db); #ifdef DEBUG - DB_DNODE_ENTER(db); - ASSERT3P(DB_DNODE(db), ==, dn); - DB_DNODE_EXIT(db); + DB_DNODE_ENTER(db); + ASSERT3P(DB_DNODE(db), ==, dn); + DB_DNODE_EXIT(db); #endif /* DEBUG */ - mutex_enter(&db->db_mtx); - if (db->db_state == DB_EVICTING) { - progress = TRUE; - evicting = TRUE; - mutex_exit(&db->db_mtx); - } else if (refcount_is_zero(&db->db_holds)) { - progress = TRUE; - dbuf_clear(db); /* exits db_mtx for us */ - } else { - mutex_exit(&db->db_mtx); - } + mutex_enter(&db->db_mtx); + if (db->db_state != DB_EVICTING && + refcount_is_zero(&db->db_holds)) { + db_marker.db_level = db->db_level; + db_marker.db_blkid = db->db_blkid; + db_marker.db_state = DB_SEARCH; + avl_insert_here(&dn->dn_dbufs, &db_marker, db, + AVL_BEFORE); + + dbuf_clear(db); + db_next = AVL_NEXT(&dn->dn_dbufs, &db_marker); + avl_remove(&dn->dn_dbufs, &db_marker); + } else { + mutex_exit(&db->db_mtx); + db_next = AVL_NEXT(&dn->dn_dbufs, db); } - /* - * NB: we need to drop dn_dbufs_mtx between passes so - * that any DB_EVICTING dbufs can make progress. - * Ideally, we would have some cv we could wait on, but - * since we don't, just wait a bit to give the other - * thread a chance to run. - */ - mutex_exit(&dn->dn_dbufs_mtx); - if (evicting) - delay(1); - pass++; - ASSERT(pass < 100); /* sanity check */ - } while (progress); + } + mutex_exit(&dn->dn_dbufs_mtx); rw_enter(&dn->dn_struct_rwlock, RW_WRITER); if (dn->dn_bonus && refcount_is_zero(&dn->dn_bonus->db_holds)) { @@ -497,7 +486,6 @@ dnode_sync_free(dnode_t *dn, dmu_tx_t *t dnode_undirty_dbufs(&dn->dn_dirty_records[txgoff]); dnode_evict_dbufs(dn); ASSERT(avl_is_empty(&dn->dn_dbufs)); - ASSERT3P(dn->dn_bonus, ==, NULL); /* * XXX - It would be nice to assert this, but we may still Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_bookmark.c Tue Jan 20 20:11:30 2015 (r277428) @@ -120,7 +120,7 @@ dsl_bookmark_create_check_impl(dsl_datas int error; zfs_bookmark_phys_t bmark_phys; - if (!dsl_dataset_is_snapshot(snapds)) + if (!snapds->ds_is_snapshot) return (SET_ERROR(EINVAL)); error = dsl_bookmark_hold_ds(dp, bookmark_name, Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Tue Jan 20 20:10:03 2015 (r277427) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_dataset.c Tue Jan 20 20:11:30 2015 (r277428) @@ -23,6 +23,7 @@ * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2014, Joyent, Inc. All rights reserved. * Copyright (c) 2014 RackTop Systems. + * Copyright (c) 2014 Spectra Logic Corporation, All rights reserved. */ #include @@ -71,7 +72,6 @@ int zfs_max_recordsize = 1 * 1024 * 1024 #define DS_REF_MAX (1ULL << 62) extern inline dsl_dataset_phys_t *dsl_dataset_phys(dsl_dataset_t *ds); -extern inline boolean_t dsl_dataset_is_snapshot(dsl_dataset_t *ds); /* * Figure out how much of this delta should be propogated to the dsl_dir @@ -155,7 +155,7 @@ dsl_dataset_block_kill(dsl_dataset_t *ds } ASSERT3P(tx->tx_pool, ==, ds->ds_dir->dd_pool); - ASSERT(!dsl_dataset_is_snapshot(ds)); + ASSERT(!ds->ds_is_snapshot); dmu_buf_will_dirty(ds->ds_dbuf, tx); if (bp->blk_birth > dsl_dataset_phys(ds)->ds_prev_snap_txg) { @@ -253,14 +253,15 @@ dsl_dataset_block_freeable(dsl_dataset_t return (B_TRUE); } -/* ARGSUSED */ static void -dsl_dataset_evict(dmu_buf_t *db, void *dsv) +dsl_dataset_evict(void *dbu) { - dsl_dataset_t *ds = dsv; + dsl_dataset_t *ds = dbu; ASSERT(ds->ds_owner == NULL); + ds->ds_dbuf = NULL; + unique_remove(ds->ds_fsid_guid); if (ds->ds_objset != NULL) @@ -272,10 +273,10 @@ dsl_dataset_evict(dmu_buf_t *db, void *d } bplist_destroy(&ds->ds_pending_deadlist); - if (dsl_dataset_phys(ds)->ds_deadlist_obj != 0) + if (ds->ds_deadlist.dl_os != NULL) dsl_deadlist_close(&ds->ds_deadlist); if (ds->ds_dir) - dsl_dir_rele(ds->ds_dir, ds); + dsl_dir_async_rele(ds->ds_dir, ds); ASSERT(!list_link_active(&ds->ds_synced_link)); @@ -389,6 +390,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_SLEEP); ds->ds_dbuf = dbuf; ds->ds_object = dsobj; + ds->ds_is_snapshot = dsl_dataset_phys(ds)->ds_num_children != 0; mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); @@ -427,7 +429,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin return (err); } - if (!dsl_dataset_is_snapshot(ds)) { + if (!ds->ds_is_snapshot) { ds->ds_snapname[0] = '\0'; if (dsl_dataset_phys(ds)->ds_prev_snap_obj != 0) { err = dsl_dataset_hold_obj(dp, @@ -454,7 +456,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } } - if (err == 0 && !dsl_dataset_is_snapshot(ds)) { + if (err == 0 && !ds->ds_is_snapshot) { err = dsl_prop_get_int_ds(ds, zfs_prop_to_name(ZFS_PROP_REFRESERVATION), &ds->ds_reserved); @@ -467,8 +469,11 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds->ds_reserved = ds->ds_quota = 0; } - if (err != 0 || (winner = dmu_buf_set_user_ie(dbuf, ds, - dsl_dataset_evict)) != NULL) { + dmu_buf_init_user(&ds->ds_dbu, dsl_dataset_evict, &ds->ds_dbuf); + if (err == 0) + winner = dmu_buf_set_user_ie(dbuf, &ds->ds_dbu); + + if (err != 0 || winner != NULL) { bplist_destroy(&ds->ds_pending_deadlist); dsl_deadlist_close(&ds->ds_deadlist); if (ds->ds_prev) @@ -848,7 +853,7 @@ dsl_dataset_recalc_head_uniq(dsl_dataset uint64_t mrs_used; uint64_t dlused, dlcomp, dluncomp; - ASSERT(!dsl_dataset_is_snapshot(ds)); + ASSERT(!ds->ds_is_snapshot); if (dsl_dataset_phys(ds)->ds_prev_snap_obj != 0) mrs_used = dsl_dataset_phys(ds->ds_prev)->ds_referenced_bytes; @@ -1591,7 +1596,7 @@ dsl_dataset_stats(dsl_dataset_t *ds, nvl dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_LOGICALREFERENCED, dsl_dataset_phys(ds)->ds_uncompressed_bytes); - if (dsl_dataset_is_snapshot(ds)) { + if (ds->ds_is_snapshot) { dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_COMPRESSRATIO, ratio); dsl_prop_nvlist_add_uint64(nv, ZFS_PROP_USED, dsl_dataset_phys(ds)->ds_unique_bytes); @@ -1659,7 +1664,7 @@ dsl_dataset_fast_stat(dsl_dataset_t *ds, dsl_dataset_phys(ds)->ds_flags & DS_FLAG_INCONSISTENT; stat->dds_guid = dsl_dataset_phys(ds)->ds_guid; stat->dds_origin[0] = '\0'; - if (dsl_dataset_is_snapshot(ds)) { + if (ds->ds_is_snapshot) { stat->dds_is_snapshot = B_TRUE; stat->dds_num_clones = dsl_dataset_phys(ds)->ds_num_children - 1; @@ -1919,7 +1924,7 @@ dsl_dataset_rollback_check(void *arg, dm return (error); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:13:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C183147; Tue, 20 Jan 2015 20:13:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 675795F0; Tue, 20 Jan 2015 20:13:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKDlJw005714; Tue, 20 Jan 2015 20:13:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKDke4005712; Tue, 20 Jan 2015 20:13:46 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202013.t0KKDke4005712@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277429 - in vendor/illumos/dist: cmd/zfs man/man1m X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:13:47 -0000 Author: delphij Date: Tue Jan 20 20:13:46 2015 New Revision: 277429 URL: https://svnweb.freebsd.org/changeset/base/277429 Log: 5410 Document -S option to zfs inherit 5412 Mention -S option when zfs inherit fails on quota Reviewed by: Matthew Ahrens Approved by: Richard Lowe Author: Paul B. Henson illumos/illumos-gate@5ff8cfa92ec8ea0f8593ad21aa2a04829b0ef5ea Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c vendor/illumos/dist/man/man1m/zfs.1m Modified: vendor/illumos/dist/cmd/zfs/zfs_main.c ============================================================================== --- vendor/illumos/dist/cmd/zfs/zfs_main.c Tue Jan 20 20:11:30 2015 (r277428) +++ vendor/illumos/dist/cmd/zfs/zfs_main.c Tue Jan 20 20:13:46 2015 (r277429) @@ -1890,9 +1890,13 @@ zfs_do_inherit(int argc, char **argv) if (prop == ZFS_PROP_QUOTA || prop == ZFS_PROP_RESERVATION || prop == ZFS_PROP_REFQUOTA || - prop == ZFS_PROP_REFRESERVATION) + prop == ZFS_PROP_REFRESERVATION) { (void) fprintf(stderr, gettext("use 'zfs set " "%s=none' to clear\n"), propname); + (void) fprintf(stderr, gettext("use 'zfs " + "inherit -S %s' to revert to received " + "value\n"), propname); + } return (1); } if (received && (prop == ZFS_PROP_VOLSIZE || Modified: vendor/illumos/dist/man/man1m/zfs.1m ============================================================================== --- vendor/illumos/dist/man/man1m/zfs.1m Tue Jan 20 20:11:30 2015 (r277428) +++ vendor/illumos/dist/man/man1m/zfs.1m Tue Jan 20 20:13:46 2015 (r277429) @@ -119,7 +119,7 @@ zfs \- configures ZFS file systems .LP .nf -\fBzfs\fR \fBinherit\fR [\fB-r\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR... +\fBzfs\fR \fBinherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume|snapshot\fR... .fi .LP @@ -2419,7 +2419,7 @@ property, the following columns are disp property Property name value Property value source Property source. Can either be local, default, - temporary, inherited, or none (-). + temporary, inherited, received, or none (-). .fi .in -2 .sp @@ -2484,8 +2484,8 @@ is the default value. .RS 4n A comma-separated list of sources to display. Those properties coming from a source other than those in this list are ignored. Each source must be one of -the following: \fBlocal,default,inherited,temporary,none\fR. The default value -is all sources. +the following: \fBlocal,default,inherited,received,temporary,none\fR. The +default value is all sources. .RE .sp @@ -2503,15 +2503,16 @@ Display numbers in parsable (exact) valu .sp .ne 2 .na -\fB\fBzfs inherit\fR [\fB-r\fR] \fIproperty\fR +\fB\fBzfs inherit\fR [\fB-rS\fR] \fIproperty\fR \fIfilesystem\fR|\fIvolume\fR|\fIsnapshot\fR...\fR .ad .sp .6 .RS 4n -Clears the specified property, causing it to be inherited from an ancestor. If -no ancestor has the property set, then the default value is used. See the -"Properties" section for a listing of default values, and details on which -properties can be inherited. +Clears the specified property, causing it to be inherited from an ancestor, +restored to default if no ancestor has the property set, or with the \fB-S\fR +option reverted to the received value if one exists. See the "Properties" +section for a listing of default values, and details on which properties can be +inherited. .sp .ne 2 .na @@ -2521,6 +2522,16 @@ properties can be inherited. .RS 4n Recursively inherit the given property for all children. .RE +.sp +.ne 2 +.na +\fB\fB-S\fR\fR +.ad +.sp .6 +.RS 4n +Revert the property to the received value if one exists; otherwise operate as +if the \fB-S\fR option was not specified. +.RE .RE @@ -3896,6 +3907,17 @@ inherit the \fBchecksum\fR property from .fi .in -2 .sp +.LP +The following command causes \fBpool/home/bob\fR to revert to the received +value for the \fBquota\fR property if it exists. + +.sp +.in +2 +.nf +# \fBzfs inherit -S quota pool/home/bob +.fi +.in -2 +.sp .LP \fBExample 12 \fRRemotely Replicating ZFS Data From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:14:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BB77E2FE; Tue, 20 Jan 2015 20:14:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9ED6E611; Tue, 20 Jan 2015 20:14:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKEpAE005918; Tue, 20 Jan 2015 20:14:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKEoRH005914; Tue, 20 Jan 2015 20:14:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202014.t0KKEoRH005914@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:14:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277430 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:14:51 -0000 Author: delphij Date: Tue Jan 20 20:14:50 2015 New Revision: 277430 URL: https://svnweb.freebsd.org/changeset/base/277430 Log: 5313 Allow I/Os to be aggregated across ZIO priority classes Reviewed by: Andriy Gapon Reviewed by: Will Andrews Reviewed by: Matt Ahrens Reviewed by: George Wilson Approved by: Robert Mustacchi Author: Justin T. Gibbs illumos/illumos-gate@fe319232d24f4ae183730a5a24a09423d8ab4429 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h Tue Jan 20 20:13:46 2015 (r277429) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/vdev_impl.h Tue Jan 20 20:14:50 2015 (r277430) @@ -113,6 +113,8 @@ struct vdev_queue { vdev_t *vq_vdev; vdev_queue_class_t vq_class[ZIO_PRIORITY_NUM_QUEUEABLE]; avl_tree_t vq_active_tree; + avl_tree_t vq_read_offset_tree; + avl_tree_t vq_write_offset_tree; uint64_t vq_last_offset; hrtime_t vq_io_complete_ts; /* time last i/o completed */ kmutex_t vq_lock; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h Tue Jan 20 20:13:46 2015 (r277429) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/zio.h Tue Jan 20 20:14:50 2015 (r277430) @@ -419,6 +419,7 @@ struct zio { uint64_t io_offset; hrtime_t io_timestamp; avl_node_t io_queue_node; + avl_node_t io_offset_node; /* Internal pipeline state */ enum zio_flag io_flags; Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c Tue Jan 20 20:13:46 2015 (r277429) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_queue.c Tue Jan 20 20:14:50 2015 (r277430) @@ -185,6 +185,22 @@ vdev_queue_offset_compare(const void *x1 return (0); } +static inline avl_tree_t * +vdev_queue_class_tree(vdev_queue_t *vq, zio_priority_t p) +{ + return (&vq->vq_class[p].vqc_queued_tree); +} + +static inline avl_tree_t * +vdev_queue_type_tree(vdev_queue_t *vq, zio_type_t t) +{ + ASSERT(t == ZIO_TYPE_READ || t == ZIO_TYPE_WRITE); + if (t == ZIO_TYPE_READ) + return (&vq->vq_read_offset_tree); + else + return (&vq->vq_write_offset_tree); +} + int vdev_queue_timestamp_compare(const void *x1, const void *x2) { @@ -214,19 +230,27 @@ vdev_queue_init(vdev_t *vd) avl_create(&vq->vq_active_tree, vdev_queue_offset_compare, sizeof (zio_t), offsetof(struct zio, io_queue_node)); + avl_create(vdev_queue_type_tree(vq, ZIO_TYPE_READ), + vdev_queue_offset_compare, sizeof (zio_t), + offsetof(struct zio, io_offset_node)); + avl_create(vdev_queue_type_tree(vq, ZIO_TYPE_WRITE), + vdev_queue_offset_compare, sizeof (zio_t), + offsetof(struct zio, io_offset_node)); for (zio_priority_t p = 0; p < ZIO_PRIORITY_NUM_QUEUEABLE; p++) { + int (*compfn) (const void *, const void *); + /* - * The synchronous i/o queues are FIFO rather than LBA ordered. - * This provides more consistent latency for these i/os, and - * they tend to not be tightly clustered anyway so there is - * little to no throughput loss. + * The synchronous i/o queues are dispatched in FIFO rather + * than LBA order. This provides more consistent latency for + * these i/os. */ - boolean_t fifo = (p == ZIO_PRIORITY_SYNC_READ || - p == ZIO_PRIORITY_SYNC_WRITE); - avl_create(&vq->vq_class[p].vqc_queued_tree, - fifo ? vdev_queue_timestamp_compare : - vdev_queue_offset_compare, + if (p == ZIO_PRIORITY_SYNC_READ || p == ZIO_PRIORITY_SYNC_WRITE) + compfn = vdev_queue_timestamp_compare; + else + compfn = vdev_queue_offset_compare; + + avl_create(vdev_queue_class_tree(vq, p), compfn, sizeof (zio_t), offsetof(struct zio, io_queue_node)); } } @@ -237,8 +261,10 @@ vdev_queue_fini(vdev_t *vd) vdev_queue_t *vq = &vd->vdev_queue; for (zio_priority_t p = 0; p < ZIO_PRIORITY_NUM_QUEUEABLE; p++) - avl_destroy(&vq->vq_class[p].vqc_queued_tree); + avl_destroy(vdev_queue_class_tree(vq, p)); avl_destroy(&vq->vq_active_tree); + avl_destroy(vdev_queue_type_tree(vq, ZIO_TYPE_READ)); + avl_destroy(vdev_queue_type_tree(vq, ZIO_TYPE_WRITE)); mutex_destroy(&vq->vq_lock); } @@ -248,7 +274,8 @@ vdev_queue_io_add(vdev_queue_t *vq, zio_ { spa_t *spa = zio->io_spa; ASSERT3U(zio->io_priority, <, ZIO_PRIORITY_NUM_QUEUEABLE); - avl_add(&vq->vq_class[zio->io_priority].vqc_queued_tree, zio); + avl_add(vdev_queue_class_tree(vq, zio->io_priority), zio); + avl_add(vdev_queue_type_tree(vq, zio->io_type), zio); mutex_enter(&spa->spa_iokstat_lock); spa->spa_queue_stats[zio->io_priority].spa_queued++; @@ -262,7 +289,8 @@ vdev_queue_io_remove(vdev_queue_t *vq, z { spa_t *spa = zio->io_spa; ASSERT3U(zio->io_priority, <, ZIO_PRIORITY_NUM_QUEUEABLE); - avl_remove(&vq->vq_class[zio->io_priority].vqc_queued_tree, zio); + avl_remove(vdev_queue_class_tree(vq, zio->io_priority), zio); + avl_remove(vdev_queue_type_tree(vq, zio->io_type), zio); mutex_enter(&spa->spa_iokstat_lock); ASSERT3U(spa->spa_queue_stats[zio->io_priority].spa_queued, >, 0); @@ -423,7 +451,7 @@ vdev_queue_class_to_issue(vdev_queue_t * /* find a queue that has not reached its minimum # outstanding i/os */ for (p = 0; p < ZIO_PRIORITY_NUM_QUEUEABLE; p++) { - if (avl_numnodes(&vq->vq_class[p].vqc_queued_tree) > 0 && + if (avl_numnodes(vdev_queue_class_tree(vq, p)) > 0 && vq->vq_class[p].vqc_active < vdev_queue_class_min_active(p)) return (p); @@ -434,7 +462,7 @@ vdev_queue_class_to_issue(vdev_queue_t * * maximum # outstanding i/os. */ for (p = 0; p < ZIO_PRIORITY_NUM_QUEUEABLE; p++) { - if (avl_numnodes(&vq->vq_class[p].vqc_queued_tree) > 0 && + if (avl_numnodes(vdev_queue_class_tree(vq, p)) > 0 && vq->vq_class[p].vqc_active < vdev_queue_class_max_active(spa, p)) return (p); @@ -460,22 +488,12 @@ vdev_queue_aggregate(vdev_queue_t *vq, z uint64_t maxgap = 0; uint64_t size; boolean_t stretch = B_FALSE; - vdev_queue_class_t *vqc = &vq->vq_class[zio->io_priority]; - avl_tree_t *t = &vqc->vqc_queued_tree; + avl_tree_t *t = vdev_queue_type_tree(vq, zio->io_type); enum zio_flag flags = zio->io_flags & ZIO_FLAG_AGG_INHERIT; if (zio->io_flags & ZIO_FLAG_DONT_AGGREGATE) return (NULL); - /* - * The synchronous i/o queues are not sorted by LBA, so we can't - * find adjacent i/os. These i/os tend to not be tightly clustered, - * or too large to aggregate, so this has little impact on performance. - */ - if (zio->io_priority == ZIO_PRIORITY_SYNC_READ || - zio->io_priority == ZIO_PRIORITY_SYNC_WRITE) - return (NULL); - first = last = zio; if (zio->io_type == ZIO_TYPE_READ) @@ -607,7 +625,7 @@ vdev_queue_io_to_issue(vdev_queue_t *vq) zio_t *zio, *aio; zio_priority_t p; avl_index_t idx; - vdev_queue_class_t *vqc; + avl_tree_t *tree; zio_t search; again: @@ -626,13 +644,13 @@ again: * * For FIFO queues (sync), issue the i/o with the lowest timestamp. */ - vqc = &vq->vq_class[p]; + tree = vdev_queue_class_tree(vq, p); search.io_timestamp = 0; search.io_offset = vq->vq_last_offset + 1; - VERIFY3P(avl_find(&vqc->vqc_queued_tree, &search, &idx), ==, NULL); - zio = avl_nearest(&vqc->vqc_queued_tree, idx, AVL_AFTER); + VERIFY3P(avl_find(tree, &search, &idx), ==, NULL); + zio = avl_nearest(tree, idx, AVL_AFTER); if (zio == NULL) - zio = avl_first(&vqc->vqc_queued_tree); + zio = avl_first(tree); ASSERT3U(zio->io_priority, ==, p); aio = vdev_queue_aggregate(vq, zio); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:17:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 59B124DA; Tue, 20 Jan 2015 20:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 442F563F; Tue, 20 Jan 2015 20:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKHU5E006338; Tue, 20 Jan 2015 20:17:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKHUie006337; Tue, 20 Jan 2015 20:17:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202017.t0KKHUie006337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277431 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzpool/common/sys X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:17:30 -0000 Author: delphij Date: Tue Jan 20 20:17:29 2015 New Revision: 277431 URL: https://svnweb.freebsd.org/changeset/base/277431 Log: 5497 lock contention on arcs_mtx Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Approved by: Dan McDonald Author: Prakash Surya illumos/illumos-gate@244781f10dcd82684fd8163c016540667842f203 Modified: vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Changes in other areas also in this revision: Added: vendor-sys/illumos/dist/uts/common/fs/zfs/multilist.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/sys/multilist.h (contents, props changed) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c Modified: vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Tue Jan 20 20:14:50 2015 (r277430) +++ vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Tue Jan 20 20:17:29 2015 (r277431) @@ -505,6 +505,7 @@ extern void delay(clock_t ticks); } while (0); #define max_ncpus 64 +#define boot_ncpus (sysconf(_SC_NPROCESSORS_ONLN)) #define minclsyspri 60 #define maxclsyspri 99 From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:17:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB3014DB; Tue, 20 Jan 2015 20:17:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4877640; Tue, 20 Jan 2015 20:17:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKHUbE006346; Tue, 20 Jan 2015 20:17:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKHUpH006344; Tue, 20 Jan 2015 20:17:30 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202017.t0KKHUpH006344@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:17:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277431 - vendor-sys/illumos/dist/uts/common/fs/zfs vendor-sys/illumos/dist/uts/common/fs/zfs/sys vendor/illumos/dist/lib/libzpool/common/sys X-SVN-Group: vendor-sys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:17:31 -0000 Author: delphij Date: Tue Jan 20 20:17:29 2015 New Revision: 277431 URL: https://svnweb.freebsd.org/changeset/base/277431 Log: 5497 lock contention on arcs_mtx Reviewed by: George Wilson Reviewed by: Matthew Ahrens Reviewed by: Richard Elling Approved by: Dan McDonald Author: Prakash Surya illumos/illumos-gate@244781f10dcd82684fd8163c016540667842f203 Added: vendor-sys/illumos/dist/uts/common/fs/zfs/multilist.c (contents, props changed) vendor-sys/illumos/dist/uts/common/fs/zfs/sys/multilist.h (contents, props changed) Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c vendor-sys/illumos/dist/uts/common/fs/zfs/dsl_pool.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/arc.h vendor-sys/illumos/dist/uts/common/fs/zfs/zio_inject.c Changes in other areas also in this revision: Modified: vendor/illumos/dist/lib/libzpool/common/sys/zfs_context.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:14:50 2015 (r277430) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/arc.c Tue Jan 20 20:17:29 2015 (r277431) @@ -129,6 +129,7 @@ #include #include #include +#include #ifdef _KERNEL #include #include @@ -145,21 +146,39 @@ boolean_t arc_watch = B_FALSE; int arc_procfd; #endif -static kmutex_t arc_reclaim_thr_lock; -static kcondvar_t arc_reclaim_thr_cv; /* used to signal reclaim thr */ -static uint8_t arc_thread_exit; +static kmutex_t arc_reclaim_lock; +static kcondvar_t arc_reclaim_thread_cv; +static boolean_t arc_reclaim_thread_exit; +static kcondvar_t arc_reclaim_waiters_cv; + +static kmutex_t arc_user_evicts_lock; +static kcondvar_t arc_user_evicts_cv; +static boolean_t arc_user_evicts_thread_exit; uint_t arc_reduce_dnlc_percent = 3; /* - * The number of iterations through arc_evict_*() before we - * drop & reacquire the lock. + * The number of headers to evict in arc_evict_state_impl() before + * dropping the sublist lock and evicting from another sublist. A lower + * value means we're more likely to evict the "correct" header (i.e. the + * oldest header in the arc state), but comes with higher overhead + * (i.e. more invocations of arc_evict_state_impl()). */ -int arc_evict_iterations = 100; +int zfs_arc_evict_batch_limit = 10; + +/* + * The number of sublists used for each of the arc state lists. If this + * is not set to a suitable value by the user, it will be configured to + * the number of CPUs on the system in arc_init(). + */ +int zfs_arc_num_sublists_per_state = 0; /* number of seconds before growing cache again */ static int arc_grow_retry = 60; +/* shift of arc_c for calculating overflow limit in arc_get_data_buf */ +int zfs_arc_overflow_shift = 8; + /* shift of arc_c for calculating both min and max arc_p */ static int arc_p_min_shift = 4; @@ -242,10 +261,19 @@ int zfs_arc_average_blocksize = 8 * 1024 */ typedef struct arc_state { - list_t arcs_list[ARC_BUFC_NUMTYPES]; /* list of evictable buffers */ - uint64_t arcs_lsize[ARC_BUFC_NUMTYPES]; /* amount of evictable data */ - uint64_t arcs_size; /* total amount of data in this state */ - kmutex_t arcs_mtx; + /* + * list of evictable buffers + */ + multilist_t arcs_list[ARC_BUFC_NUMTYPES]; + /* + * total amount of evictable data in this state + */ + uint64_t arcs_lsize[ARC_BUFC_NUMTYPES]; + /* + * total amount of data in this state; this includes: evictable, + * non-evictable, ARC_BUFC_DATA, and ARC_BUFC_METADATA. + */ + uint64_t arcs_size; } arc_state_t; /* The 6 states: */ @@ -272,7 +300,6 @@ typedef struct arc_stats { kstat_named_t arcstat_mfu_hits; kstat_named_t arcstat_mfu_ghost_hits; kstat_named_t arcstat_deleted; - kstat_named_t arcstat_recycle_miss; /* * Number of buffers that could not be evicted because the hash lock * was held by another thread. The lock may not necessarily be held @@ -286,9 +313,15 @@ typedef struct arc_stats { * not from the spa we're trying to evict from. */ kstat_named_t arcstat_evict_skip; + /* + * Number of times arc_evict_state() was unable to evict enough + * buffers to reach it's target amount. + */ + kstat_named_t arcstat_evict_not_enough; kstat_named_t arcstat_evict_l2_cached; kstat_named_t arcstat_evict_l2_eligible; kstat_named_t arcstat_evict_l2_ineligible; + kstat_named_t arcstat_evict_l2_skip; kstat_named_t arcstat_hash_elements; kstat_named_t arcstat_hash_elements_max; kstat_named_t arcstat_hash_collisions; @@ -439,11 +472,12 @@ typedef struct arc_stats { kstat_named_t arcstat_l2_writes_sent; kstat_named_t arcstat_l2_writes_done; kstat_named_t arcstat_l2_writes_error; - kstat_named_t arcstat_l2_writes_hdr_miss; + kstat_named_t arcstat_l2_writes_lock_retry; kstat_named_t arcstat_l2_evict_lock_retry; kstat_named_t arcstat_l2_evict_reading; kstat_named_t arcstat_l2_evict_l1cached; kstat_named_t arcstat_l2_free_on_write; + kstat_named_t arcstat_l2_cdata_free_on_write; kstat_named_t arcstat_l2_abort_lowmem; kstat_named_t arcstat_l2_cksum_bad; kstat_named_t arcstat_l2_io_error; @@ -479,12 +513,13 @@ static arc_stats_t arc_stats = { { "mfu_hits", KSTAT_DATA_UINT64 }, { "mfu_ghost_hits", KSTAT_DATA_UINT64 }, { "deleted", KSTAT_DATA_UINT64 }, - { "recycle_miss", KSTAT_DATA_UINT64 }, { "mutex_miss", KSTAT_DATA_UINT64 }, { "evict_skip", KSTAT_DATA_UINT64 }, + { "evict_not_enough", KSTAT_DATA_UINT64 }, { "evict_l2_cached", KSTAT_DATA_UINT64 }, { "evict_l2_eligible", KSTAT_DATA_UINT64 }, { "evict_l2_ineligible", KSTAT_DATA_UINT64 }, + { "evict_l2_skip", KSTAT_DATA_UINT64 }, { "hash_elements", KSTAT_DATA_UINT64 }, { "hash_elements_max", KSTAT_DATA_UINT64 }, { "hash_collisions", KSTAT_DATA_UINT64 }, @@ -523,11 +558,12 @@ static arc_stats_t arc_stats = { { "l2_writes_sent", KSTAT_DATA_UINT64 }, { "l2_writes_done", KSTAT_DATA_UINT64 }, { "l2_writes_error", KSTAT_DATA_UINT64 }, - { "l2_writes_hdr_miss", KSTAT_DATA_UINT64 }, + { "l2_writes_lock_retry", KSTAT_DATA_UINT64 }, { "l2_evict_lock_retry", KSTAT_DATA_UINT64 }, { "l2_evict_reading", KSTAT_DATA_UINT64 }, { "l2_evict_l1cached", KSTAT_DATA_UINT64 }, { "l2_free_on_write", KSTAT_DATA_UINT64 }, + { "l2_cdata_free_on_write", KSTAT_DATA_UINT64 }, { "l2_abort_lowmem", KSTAT_DATA_UINT64 }, { "l2_cksum_bad", KSTAT_DATA_UINT64 }, { "l2_io_error", KSTAT_DATA_UINT64 }, @@ -687,7 +723,7 @@ typedef struct l1arc_buf_hdr { /* protected by arc state mutex */ arc_state_t *b_state; - list_node_t b_arc_node; + multilist_node_t b_arc_node; /* updated atomically */ clock_t b_arc_access; @@ -738,7 +774,6 @@ struct arc_buf_hdr { }; static arc_buf_t *arc_eviction_list; -static kmutex_t arc_eviction_mtx; static arc_buf_hdr_t arc_eviction_hdr; #define GHOST_STATE(state) \ @@ -897,8 +932,7 @@ static uint8_t l2arc_thread_exit; static void arc_get_data_buf(arc_buf_t *); static void arc_access(arc_buf_hdr_t *, kmutex_t *); -static int arc_evict_needed(arc_buf_contents_t); -static void arc_evict_ghost(arc_state_t *, uint64_t, int64_t); +static boolean_t arc_is_overflowing(); static void arc_buf_watch(arc_buf_t *); static arc_buf_contents_t arc_buf_type(arc_buf_hdr_t *); @@ -1079,6 +1113,7 @@ hdr_full_cons(void *vbuf, void *unused, cv_init(&hdr->b_l1hdr.b_cv, NULL, CV_DEFAULT, NULL); refcount_create(&hdr->b_l1hdr.b_refcnt); mutex_init(&hdr->b_l1hdr.b_freeze_lock, NULL, MUTEX_DEFAULT, NULL); + multilist_link_init(&hdr->b_l1hdr.b_arc_node); arc_space_consume(HDR_FULL_SIZE, ARC_SPACE_HDRS); return (0); @@ -1123,6 +1158,7 @@ hdr_full_dest(void *vbuf, void *unused) cv_destroy(&hdr->b_l1hdr.b_cv); refcount_destroy(&hdr->b_l1hdr.b_refcnt); mutex_destroy(&hdr->b_l1hdr.b_freeze_lock); + ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); arc_space_return(HDR_FULL_SIZE, ARC_SPACE_HDRS); } @@ -1159,7 +1195,7 @@ hdr_recl(void *unused) * which is after we do arc_fini(). */ if (!arc_dead) - cv_signal(&arc_reclaim_thr_cv); + cv_signal(&arc_reclaim_thread_cv); } static void @@ -1237,18 +1273,31 @@ arc_hdr_realloc(arc_buf_hdr_t *hdr, kmem * l2c_only even though it's about to change. */ nhdr->b_l1hdr.b_state = arc_l2c_only; + + /* Verify previous threads set to NULL before freeing */ + ASSERT3P(nhdr->b_l1hdr.b_tmp_cdata, ==, NULL); } else { ASSERT(hdr->b_l1hdr.b_buf == NULL); ASSERT0(hdr->b_l1hdr.b_datacnt); - ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); + /* - * We might be removing the L1hdr of a buffer which was just - * written out to L2ARC. If such a buffer is compressed then we - * need to free its b_tmp_cdata before destroying the header. - */ - if (hdr->b_l1hdr.b_tmp_cdata != NULL && - HDR_GET_COMPRESS(hdr) != ZIO_COMPRESS_OFF) - l2arc_release_cdata_buf(hdr); + * If we've reached here, We must have been called from + * arc_evict_hdr(), as such we should have already been + * removed from any ghost list we were previously on + * (which protects us from racing with arc_evict_state), + * thus no locking is needed during this check. + */ + ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); + + /* + * A buffer must not be moved into the arc_l2c_only + * state if it's not finished being written out to the + * l2arc device. Otherwise, the b_l1hdr.b_tmp_cdata field + * might try to be accessed, even though it was removed. + */ + VERIFY(!HDR_L2_WRITING(hdr)); + VERIFY3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL); + nhdr->b_flags &= ~ARC_FLAG_HAS_L1HDR; } /* @@ -1461,14 +1510,13 @@ add_reference(arc_buf_hdr_t *hdr, kmutex (state != arc_anon)) { /* We don't use the L2-only state list. */ if (state != arc_l2c_only) { + arc_buf_contents_t type = arc_buf_type(hdr); uint64_t delta = hdr->b_size * hdr->b_l1hdr.b_datacnt; - list_t *list = &state->arcs_list[arc_buf_type(hdr)]; - uint64_t *size = &state->arcs_lsize[arc_buf_type(hdr)]; + multilist_t *list = &state->arcs_list[type]; + uint64_t *size = &state->arcs_lsize[type]; + + multilist_remove(list, hdr); - ASSERT(!MUTEX_HELD(&state->arcs_mtx)); - mutex_enter(&state->arcs_mtx); - ASSERT(list_link_active(&hdr->b_l1hdr.b_arc_node)); - list_remove(list, hdr); if (GHOST_STATE(state)) { ASSERT0(hdr->b_l1hdr.b_datacnt); ASSERT3P(hdr->b_l1hdr.b_buf, ==, NULL); @@ -1477,7 +1525,6 @@ add_reference(arc_buf_hdr_t *hdr, kmutex ASSERT(delta > 0); ASSERT3U(*size, >=, delta); atomic_add_64(size, -delta); - mutex_exit(&state->arcs_mtx); } /* remove the prefetch flag if we get a reference */ hdr->b_flags &= ~ARC_FLAG_PREFETCH; @@ -1500,22 +1547,21 @@ remove_reference(arc_buf_hdr_t *hdr, kmu */ if (((cnt = refcount_remove(&hdr->b_l1hdr.b_refcnt, tag)) == 0) && (state != arc_anon)) { - uint64_t *size = &state->arcs_lsize[arc_buf_type(hdr)]; + arc_buf_contents_t type = arc_buf_type(hdr); + multilist_t *list = &state->arcs_list[type]; + uint64_t *size = &state->arcs_lsize[type]; + + multilist_insert(list, hdr); - ASSERT(!MUTEX_HELD(&state->arcs_mtx)); - mutex_enter(&state->arcs_mtx); - ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); - list_insert_head(&state->arcs_list[arc_buf_type(hdr)], hdr); ASSERT(hdr->b_l1hdr.b_datacnt > 0); atomic_add_64(size, hdr->b_size * hdr->b_l1hdr.b_datacnt); - mutex_exit(&state->arcs_mtx); } return (cnt); } /* - * Move the supplied buffer to the indicated state. The mutex + * Move the supplied buffer to the indicated state. The hash lock * for the buffer must be held by the caller. */ static void @@ -1559,15 +1605,10 @@ arc_change_state(arc_state_t *new_state, */ if (refcnt == 0) { if (old_state != arc_anon && old_state != arc_l2c_only) { - int use_mutex = !MUTEX_HELD(&old_state->arcs_mtx); uint64_t *size = &old_state->arcs_lsize[buftype]; - if (use_mutex) - mutex_enter(&old_state->arcs_mtx); - ASSERT(HDR_HAS_L1HDR(hdr)); - ASSERT(list_link_active(&hdr->b_l1hdr.b_arc_node)); - list_remove(&old_state->arcs_list[buftype], hdr); + multilist_remove(&old_state->arcs_list[buftype], hdr); /* * If prefetching out of the ghost cache, @@ -1580,12 +1621,8 @@ arc_change_state(arc_state_t *new_state, } ASSERT3U(*size, >=, from_delta); atomic_add_64(size, -from_delta); - - if (use_mutex) - mutex_exit(&old_state->arcs_mtx); } if (new_state != arc_anon && new_state != arc_l2c_only) { - int use_mutex = !MUTEX_HELD(&new_state->arcs_mtx); uint64_t *size = &new_state->arcs_lsize[buftype]; /* @@ -1595,10 +1632,7 @@ arc_change_state(arc_state_t *new_state, * beforehand. */ ASSERT(HDR_HAS_L1HDR(hdr)); - if (use_mutex) - mutex_enter(&new_state->arcs_mtx); - - list_insert_head(&new_state->arcs_list[buftype], hdr); + multilist_insert(&new_state->arcs_list[buftype], hdr); /* ghost elements have a ghost size */ if (GHOST_STATE(new_state)) { @@ -1607,9 +1641,6 @@ arc_change_state(arc_state_t *new_state, to_delta = hdr->b_size; } atomic_add_64(size, to_delta); - - if (use_mutex) - mutex_exit(&new_state->arcs_mtx); } } @@ -1631,8 +1662,8 @@ arc_change_state(arc_state_t *new_state, * L2 headers should never be on the L2 state list since they don't * have L1 headers allocated. */ - ASSERT(list_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && - list_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); + ASSERT(multilist_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_DATA]) && + multilist_is_empty(&arc_l2c_only->arcs_list[ARC_BUFC_METADATA])); } void @@ -1725,6 +1756,7 @@ arc_buf_alloc(spa_t *spa, int32_t size, hdr->b_l1hdr.b_state = arc_anon; hdr->b_l1hdr.b_arc_access = 0; hdr->b_l1hdr.b_datacnt = 1; + hdr->b_l1hdr.b_tmp_cdata = NULL; arc_get_data_buf(buf); ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt)); @@ -1854,6 +1886,21 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta data, metadata, hits); } +static void +arc_buf_free_on_write(void *data, size_t size, + void (*free_func)(void *, size_t)) +{ + l2arc_data_free_t *df; + + df = kmem_alloc(sizeof (*df), KM_SLEEP); + df->l2df_data = data; + df->l2df_size = size; + df->l2df_func = free_func; + mutex_enter(&l2arc_free_on_write_mtx); + list_insert_head(l2arc_free_on_write, df); + mutex_exit(&l2arc_free_on_write_mtx); +} + /* * Free the arc data buffer. If it is an l2arc write in progress, * the buffer is placed on l2arc_free_on_write to be freed later. @@ -1864,26 +1911,74 @@ arc_buf_data_free(arc_buf_t *buf, void ( arc_buf_hdr_t *hdr = buf->b_hdr; if (HDR_L2_WRITING(hdr)) { - l2arc_data_free_t *df; - df = kmem_alloc(sizeof (l2arc_data_free_t), KM_SLEEP); - df->l2df_data = buf->b_data; - df->l2df_size = hdr->b_size; - df->l2df_func = free_func; - mutex_enter(&l2arc_free_on_write_mtx); - list_insert_head(l2arc_free_on_write, df); - mutex_exit(&l2arc_free_on_write_mtx); + arc_buf_free_on_write(buf->b_data, hdr->b_size, free_func); ARCSTAT_BUMP(arcstat_l2_free_on_write); } else { free_func(buf->b_data, hdr->b_size); } } +static void +arc_buf_l2_cdata_free(arc_buf_hdr_t *hdr) +{ + ASSERT(HDR_HAS_L2HDR(hdr)); + ASSERT(MUTEX_HELD(&hdr->b_l2hdr.b_dev->l2ad_mtx)); + + /* + * The b_tmp_cdata field is linked off of the b_l1hdr, so if + * that doesn't exist, the header is in the arc_l2c_only state, + * and there isn't anything to free (it's already been freed). + */ + if (!HDR_HAS_L1HDR(hdr)) + return; + + /* + * The header isn't being written to the l2arc device, thus it + * shouldn't have a b_tmp_cdata to free. + */ + if (!HDR_L2_WRITING(hdr)) { + ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL); + return; + } + + /* + * The header does not have compression enabled. This can be due + * to the buffer not being compressible, or because we're + * freeing the buffer before the second phase of + * l2arc_write_buffer() has started (which does the compression + * step). In either case, b_tmp_cdata does not point to a + * separately compressed buffer, so there's nothing to free (it + * points to the same buffer as the arc_buf_t's b_data field). + */ + if (HDR_GET_COMPRESS(hdr) == ZIO_COMPRESS_OFF) { + hdr->b_l1hdr.b_tmp_cdata = NULL; + return; + } + + /* + * There's nothing to free since the buffer was all zero's and + * compressed to a zero length buffer. + */ + if (HDR_GET_COMPRESS(hdr) == ZIO_COMPRESS_EMPTY) { + ASSERT3P(hdr->b_l1hdr.b_tmp_cdata, ==, NULL); + return; + } + + ASSERT(L2ARC_IS_VALID_COMPRESS(HDR_GET_COMPRESS(hdr))); + + arc_buf_free_on_write(hdr->b_l1hdr.b_tmp_cdata, + hdr->b_size, zio_data_buf_free); + + ARCSTAT_BUMP(arcstat_l2_cdata_free_on_write); + hdr->b_l1hdr.b_tmp_cdata = NULL; +} + /* * Free up buf->b_data and if 'remove' is set, then pull the * arc_buf_t off of the the arc_buf_hdr_t's list and free it. */ static void -arc_buf_destroy(arc_buf_t *buf, boolean_t recycle, boolean_t remove) +arc_buf_destroy(arc_buf_t *buf, boolean_t remove) { arc_buf_t **bufp; @@ -1896,17 +1991,17 @@ arc_buf_destroy(arc_buf_t *buf, boolean_ arc_cksum_verify(buf); arc_buf_unwatch(buf); - if (!recycle) { - if (type == ARC_BUFC_METADATA) { - arc_buf_data_free(buf, zio_buf_free); - arc_space_return(size, ARC_SPACE_META); - } else { - ASSERT(type == ARC_BUFC_DATA); - arc_buf_data_free(buf, zio_data_buf_free); - arc_space_return(size, ARC_SPACE_DATA); - } + if (type == ARC_BUFC_METADATA) { + arc_buf_data_free(buf, zio_buf_free); + arc_space_return(size, ARC_SPACE_META); + } else { + ASSERT(type == ARC_BUFC_DATA); + arc_buf_data_free(buf, zio_data_buf_free); + arc_space_return(size, ARC_SPACE_DATA); } - if (list_link_active(&buf->b_hdr->b_l1hdr.b_arc_node)) { + + /* protected by hash lock, if in the hash table */ + if (multilist_link_active(&buf->b_hdr->b_l1hdr.b_arc_node)) { uint64_t *cnt = &state->arcs_lsize[type]; ASSERT(refcount_is_zero( @@ -1974,6 +2069,12 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) list_remove(&l2hdr->b_dev->l2ad_buflist, hdr); + /* + * We don't want to leak the b_tmp_cdata buffer that was + * allocated in l2arc_write_buffers() + */ + arc_buf_l2_cdata_free(hdr); + ARCSTAT_INCR(arcstat_l2_size, -hdr->b_size); ARCSTAT_INCR(arcstat_l2_asize, -l2hdr->b_asize); @@ -1996,20 +2097,19 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) arc_buf_t *buf = hdr->b_l1hdr.b_buf; if (buf->b_efunc != NULL) { - mutex_enter(&arc_eviction_mtx); + mutex_enter(&arc_user_evicts_lock); mutex_enter(&buf->b_evict_lock); ASSERT(buf->b_hdr != NULL); - arc_buf_destroy(hdr->b_l1hdr.b_buf, FALSE, - FALSE); + arc_buf_destroy(hdr->b_l1hdr.b_buf, FALSE); hdr->b_l1hdr.b_buf = buf->b_next; buf->b_hdr = &arc_eviction_hdr; buf->b_next = arc_eviction_list; arc_eviction_list = buf; mutex_exit(&buf->b_evict_lock); - mutex_exit(&arc_eviction_mtx); + cv_signal(&arc_user_evicts_cv); + mutex_exit(&arc_user_evicts_lock); } else { - arc_buf_destroy(hdr->b_l1hdr.b_buf, FALSE, - TRUE); + arc_buf_destroy(hdr->b_l1hdr.b_buf, TRUE); } } #ifdef ZFS_DEBUG @@ -2022,7 +2122,7 @@ arc_hdr_destroy(arc_buf_hdr_t *hdr) ASSERT3P(hdr->b_hash_next, ==, NULL); if (HDR_HAS_L1HDR(hdr)) { - ASSERT(!list_link_active(&hdr->b_l1hdr.b_arc_node)); + ASSERT(!multilist_link_active(&hdr->b_l1hdr.b_arc_node)); ASSERT3P(hdr->b_l1hdr.b_acb, ==, NULL); kmem_cache_free(hdr_full_cache, hdr); } else { @@ -2048,7 +2148,7 @@ arc_buf_free(arc_buf_t *buf, void *tag) (void) remove_reference(hdr, hash_lock, tag); if (hdr->b_l1hdr.b_datacnt > 1) { - arc_buf_destroy(buf, FALSE, TRUE); + arc_buf_destroy(buf, TRUE); } else { ASSERT(buf == hdr->b_l1hdr.b_buf); ASSERT(buf->b_efunc == NULL); @@ -2062,16 +2162,16 @@ arc_buf_free(arc_buf_t *buf, void *tag) * this buffer unless the write completes before we finish * decrementing the reference count. */ - mutex_enter(&arc_eviction_mtx); + mutex_enter(&arc_user_evicts_lock); (void) remove_reference(hdr, NULL, tag); ASSERT(refcount_is_zero(&hdr->b_l1hdr.b_refcnt)); destroy_hdr = !HDR_IO_IN_PROGRESS(hdr); - mutex_exit(&arc_eviction_mtx); + mutex_exit(&arc_user_evicts_lock); if (destroy_hdr) arc_hdr_destroy(hdr); } else { if (remove_reference(hdr, NULL, tag) > 0) - arc_buf_destroy(buf, FALSE, TRUE); + arc_buf_destroy(buf, TRUE); else arc_hdr_destroy(hdr); } @@ -2100,7 +2200,7 @@ arc_buf_remove_ref(arc_buf_t *buf, void* (void) remove_reference(hdr, hash_lock, tag); if (hdr->b_l1hdr.b_datacnt > 1) { if (no_callback) - arc_buf_destroy(buf, FALSE, TRUE); + arc_buf_destroy(buf, TRUE); } else if (no_callback) { ASSERT(hdr->b_l1hdr.b_buf == buf && buf->b_next == NULL); ASSERT(buf->b_efunc == NULL); @@ -2161,418 +2261,675 @@ arc_buf_eviction_needed(arc_buf_t *buf) } /* - * Evict buffers from list until we've removed the specified number of - * bytes. Move the removed buffers to the appropriate evict state. - * If the recycle flag is set, then attempt to "recycle" a buffer: - * - look for a buffer to evict that is `bytes' long. - * - return the data block from this buffer rather than freeing it. - * This flag is used by callers that are trying to make space for a - * new buffer in a full arc cache. + * Evict the arc_buf_hdr that is provided as a parameter. The resultant + * state of the header is dependent on it's state prior to entering this + * function. The following transitions are possible: * - * This function makes a "best effort". It skips over any buffers - * it can't get a hash_lock on, and so may not catch all candidates. - * It may also return without evicting as much space as requested. + * - arc_mru -> arc_mru_ghost + * - arc_mfu -> arc_mfu_ghost + * - arc_mru_ghost -> arc_l2c_only + * - arc_mru_ghost -> deleted + * - arc_mfu_ghost -> arc_l2c_only + * - arc_mfu_ghost -> deleted */ -static void * -arc_evict(arc_state_t *state, uint64_t spa, int64_t bytes, boolean_t recycle, - arc_buf_contents_t type) +static int64_t +arc_evict_hdr(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) { - arc_state_t *evicted_state; - uint64_t bytes_evicted = 0, skipped = 0, missed = 0; - arc_buf_hdr_t *hdr, *hdr_prev = NULL; - kmutex_t *hash_lock; - boolean_t have_lock; - void *stolen = NULL; - arc_buf_hdr_t marker = { 0 }; - int count = 0; - - ASSERT(state == arc_mru || state == arc_mfu); + arc_state_t *evicted_state, *state; + int64_t bytes_evicted = 0; - evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; + ASSERT(MUTEX_HELD(hash_lock)); + ASSERT(HDR_HAS_L1HDR(hdr)); - /* - * The ghost list lock must be acquired first in order to prevent - * a 3 party deadlock: - * - * - arc_evict_ghost acquires arc_*_ghost->arcs_mtx, followed by - * l2ad_mtx in arc_hdr_realloc - * - l2arc_write_buffers acquires l2ad_mtx, followed by arc_*->arcs_mtx - * - arc_evict acquires arc_*_ghost->arcs_mtx, followed by - * arc_*_ghost->arcs_mtx and forms a deadlock cycle. - * - * This situation is avoided by acquiring the ghost list lock first. - */ - mutex_enter(&evicted_state->arcs_mtx); - mutex_enter(&state->arcs_mtx); + state = hdr->b_l1hdr.b_state; + if (GHOST_STATE(state)) { + ASSERT(!HDR_IO_IN_PROGRESS(hdr)); + ASSERT(hdr->b_l1hdr.b_buf == NULL); - /* - * Decide which "type" (data vs metadata) to recycle from. - * - * If we are over the metadata limit, recycle from metadata. - * If we are under the metadata minimum, recycle from data. - * Otherwise, recycle from whichever type has the oldest (least - * recently accessed) header. - */ - if (recycle) { - arc_buf_hdr_t *data_hdr = - list_tail(&state->arcs_list[ARC_BUFC_DATA]); - arc_buf_hdr_t *metadata_hdr = - list_tail(&state->arcs_list[ARC_BUFC_METADATA]); - arc_buf_contents_t realtype; - - if (data_hdr == NULL) { - realtype = ARC_BUFC_METADATA; - } else if (metadata_hdr == NULL) { - realtype = ARC_BUFC_DATA; - } else if (arc_meta_used >= arc_meta_limit) { - realtype = ARC_BUFC_METADATA; - } else if (arc_meta_used <= arc_meta_min) { - realtype = ARC_BUFC_DATA; - } else if (HDR_HAS_L1HDR(data_hdr) && - HDR_HAS_L1HDR(metadata_hdr) && - data_hdr->b_l1hdr.b_arc_access < - metadata_hdr->b_l1hdr.b_arc_access) { - realtype = ARC_BUFC_DATA; - } else { - realtype = ARC_BUFC_METADATA; + /* + * l2arc_write_buffers() relies on a header's L1 portion + * (i.e. it's b_tmp_cdata field) during it's write phase. + * Thus, we cannot push a header onto the arc_l2c_only + * state (removing it's L1 piece) until the header is + * done being written to the l2arc. + */ + if (HDR_HAS_L2HDR(hdr) && HDR_L2_WRITING(hdr)) { + ARCSTAT_BUMP(arcstat_evict_l2_skip); + return (bytes_evicted); } - if (realtype != type) { + + ARCSTAT_BUMP(arcstat_deleted); + bytes_evicted += hdr->b_size; + + DTRACE_PROBE1(arc__delete, arc_buf_hdr_t *, hdr); + + if (HDR_HAS_L2HDR(hdr)) { /* - * If we want to evict from a different list, - * we can not recycle, because DATA vs METADATA - * buffers are segregated into different kmem - * caches (and vmem arenas). + * This buffer is cached on the 2nd Level ARC; + * don't destroy the header. */ - type = realtype; - recycle = B_FALSE; + arc_change_state(arc_l2c_only, hdr, hash_lock); + /* + * dropping from L1+L2 cached to L2-only, + * realloc to remove the L1 header. + */ + hdr = arc_hdr_realloc(hdr, hdr_full_cache, + hdr_l2only_cache); + } else { + arc_change_state(arc_anon, hdr, hash_lock); + arc_hdr_destroy(hdr); } + return (bytes_evicted); } - list_t *list = &state->arcs_list[type]; + ASSERT(state == arc_mru || state == arc_mfu); + evicted_state = (state == arc_mru) ? arc_mru_ghost : arc_mfu_ghost; - for (hdr = list_tail(list); hdr; hdr = hdr_prev) { - hdr_prev = list_prev(list, hdr); - /* prefetch buffers have a minimum lifespan */ - if (HDR_IO_IN_PROGRESS(hdr) || - (spa && hdr->b_spa != spa) || - ((hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT)) && - ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < - arc_min_prefetch_lifespan)) { - skipped++; - continue; + /* prefetch buffers have a minimum lifespan */ + if (HDR_IO_IN_PROGRESS(hdr) || + ((hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT)) && + ddi_get_lbolt() - hdr->b_l1hdr.b_arc_access < + arc_min_prefetch_lifespan)) { + ARCSTAT_BUMP(arcstat_evict_skip); + return (bytes_evicted); + } + + ASSERT0(refcount_count(&hdr->b_l1hdr.b_refcnt)); + ASSERT3U(hdr->b_l1hdr.b_datacnt, >, 0); + while (hdr->b_l1hdr.b_buf) { + arc_buf_t *buf = hdr->b_l1hdr.b_buf; + if (!mutex_tryenter(&buf->b_evict_lock)) { + ARCSTAT_BUMP(arcstat_mutex_miss); + break; } - /* "lookahead" for better eviction candidate */ - if (recycle && hdr->b_size != bytes && - hdr_prev && hdr_prev->b_size == bytes) - continue; + if (buf->b_data != NULL) + bytes_evicted += hdr->b_size; + if (buf->b_efunc != NULL) { + mutex_enter(&arc_user_evicts_lock); + arc_buf_destroy(buf, FALSE); + hdr->b_l1hdr.b_buf = buf->b_next; + buf->b_hdr = &arc_eviction_hdr; + buf->b_next = arc_eviction_list; + arc_eviction_list = buf; + cv_signal(&arc_user_evicts_cv); + mutex_exit(&arc_user_evicts_lock); + mutex_exit(&buf->b_evict_lock); + } else { + mutex_exit(&buf->b_evict_lock); + arc_buf_destroy(buf, TRUE); + } + } - /* ignore markers */ - if (hdr->b_spa == 0) - continue; + if (HDR_HAS_L2HDR(hdr)) { + ARCSTAT_INCR(arcstat_evict_l2_cached, hdr->b_size); + } else { + if (l2arc_write_eligible(hdr->b_spa, hdr)) + ARCSTAT_INCR(arcstat_evict_l2_eligible, hdr->b_size); + else + ARCSTAT_INCR(arcstat_evict_l2_ineligible, hdr->b_size); + } + + if (hdr->b_l1hdr.b_datacnt == 0) { + arc_change_state(evicted_state, hdr, hash_lock); + ASSERT(HDR_IN_HASH_TABLE(hdr)); + hdr->b_flags |= ARC_FLAG_IN_HASH_TABLE; + hdr->b_flags &= ~ARC_FLAG_BUF_AVAILABLE; + DTRACE_PROBE1(arc__evict, arc_buf_hdr_t *, hdr); + } + + return (bytes_evicted); +} + +static uint64_t +arc_evict_state_impl(multilist_t *ml, int idx, arc_buf_hdr_t *marker, + uint64_t spa, int64_t bytes) +{ + multilist_sublist_t *mls; + uint64_t bytes_evicted = 0; + arc_buf_hdr_t *hdr; + kmutex_t *hash_lock; + int evict_count = 0; + + ASSERT3P(marker, !=, NULL); + IMPLY(bytes < 0, bytes == ARC_EVICT_ALL); + + mls = multilist_sublist_lock(ml, idx); + + for (hdr = multilist_sublist_prev(mls, marker); hdr != NULL; + hdr = multilist_sublist_prev(mls, marker)) { + if ((bytes != ARC_EVICT_ALL && bytes_evicted >= bytes) || + (evict_count >= zfs_arc_evict_batch_limit)) + break; /* - * It may take a long time to evict all the bufs requested. - * To avoid blocking all arc activity, periodically drop - * the arcs_mtx and give other threads a chance to run - * before reacquiring the lock. - * - * If we are looking for a buffer to recycle, we are in - * the hot code path, so don't sleep. + * To keep our iteration location, move the marker + * forward. Since we're not holding hdr's hash lock, we + * must be very careful and not remove 'hdr' from the + * sublist. Otherwise, other consumers might mistake the + * 'hdr' as not being on a sublist when they call the + * multilist_link_active() function (they all rely on + * the hash lock protecting concurrent insertions and + * removals). multilist_sublist_move_forward() was + * specifically implemented to ensure this is the case + * (only 'marker' will be removed and re-inserted). + */ + multilist_sublist_move_forward(mls, marker); + + /* + * The only case where the b_spa field should ever be + * zero, is the marker headers inserted by + * arc_evict_state(). It's possible for multiple threads + * to be calling arc_evict_state() concurrently (e.g. + * dsl_pool_close() and zio_inject_fault()), so we must + * skip any markers we see from these other threads. */ - if (!recycle && count++ > arc_evict_iterations) { - list_insert_after(list, hdr, &marker); - mutex_exit(&state->arcs_mtx); - mutex_exit(&evicted_state->arcs_mtx); - kpreempt(KPREEMPT_SYNC); - mutex_enter(&evicted_state->arcs_mtx); - mutex_enter(&state->arcs_mtx); - hdr_prev = list_prev(list, &marker); - list_remove(list, &marker); - count = 0; + if (hdr->b_spa == 0) + continue; + + /* we're only interested in evicting buffers of a certain spa */ + if (spa != 0 && hdr->b_spa != spa) { + ARCSTAT_BUMP(arcstat_evict_skip); continue; } hash_lock = HDR_LOCK(hdr); - have_lock = MUTEX_HELD(hash_lock); - if (have_lock || mutex_tryenter(hash_lock)) { - ASSERT0(refcount_count(&hdr->b_l1hdr.b_refcnt)); - ASSERT3U(hdr->b_l1hdr.b_datacnt, >, 0); - while (hdr->b_l1hdr.b_buf) { - arc_buf_t *buf = hdr->b_l1hdr.b_buf; - if (!mutex_tryenter(&buf->b_evict_lock)) { - missed += 1; - break; - } - if (buf->b_data != NULL) { - bytes_evicted += hdr->b_size; - if (recycle && - arc_buf_type(hdr) == type && - hdr->b_size == bytes && - !HDR_L2_WRITING(hdr)) { - stolen = buf->b_data; - recycle = FALSE; - } - } - if (buf->b_efunc != NULL) { - mutex_enter(&arc_eviction_mtx); - arc_buf_destroy(buf, - buf->b_data == stolen, FALSE); - hdr->b_l1hdr.b_buf = buf->b_next; - buf->b_hdr = &arc_eviction_hdr; - buf->b_next = arc_eviction_list; - arc_eviction_list = buf; - mutex_exit(&arc_eviction_mtx); - mutex_exit(&buf->b_evict_lock); - } else { - mutex_exit(&buf->b_evict_lock); - arc_buf_destroy(buf, - buf->b_data == stolen, TRUE); - } - } - if (HDR_HAS_L2HDR(hdr)) { - ARCSTAT_INCR(arcstat_evict_l2_cached, - hdr->b_size); - } else { - if (l2arc_write_eligible(hdr->b_spa, hdr)) { - ARCSTAT_INCR(arcstat_evict_l2_eligible, - hdr->b_size); - } else { - ARCSTAT_INCR( - arcstat_evict_l2_ineligible, - hdr->b_size); - } - } + /* + * We aren't calling this function from any code path + * that would already be holding a hash lock, so we're + * asserting on this assumption to be defensive in case + * this ever changes. Without this check, it would be + * possible to incorrectly increment arcstat_mutex_miss + * below (e.g. if the code changed such that we called + * this function with a hash lock held). + */ + ASSERT(!MUTEX_HELD(hash_lock)); - if (hdr->b_l1hdr.b_datacnt == 0) { - arc_change_state(evicted_state, hdr, hash_lock); - ASSERT(HDR_IN_HASH_TABLE(hdr)); - hdr->b_flags |= ARC_FLAG_IN_HASH_TABLE; - hdr->b_flags &= ~ARC_FLAG_BUF_AVAILABLE; - DTRACE_PROBE1(arc__evict, arc_buf_hdr_t *, hdr); - } - if (!have_lock) - mutex_exit(hash_lock); - if (bytes >= 0 && bytes_evicted >= bytes) - break; + if (mutex_tryenter(hash_lock)) { + uint64_t evicted = arc_evict_hdr(hdr, hash_lock); + mutex_exit(hash_lock); + + bytes_evicted += evicted; + + /* + * If evicted is zero, arc_evict_hdr() must have + * decided to skip this header, don't increment + * evict_count in this case. + */ + if (evicted != 0) + evict_count++; + + /* + * If arc_size isn't overflowing, signal any + * threads that might happen to be waiting. + * + * For each header evicted, we wake up a single + * thread. If we used cv_broadcast, we could + * wake up "too many" threads causing arc_size + * to significantly overflow arc_c; since + * arc_get_data_buf() doesn't check for overflow + * when it's woken up (it doesn't because it's + * possible for the ARC to be overflowing while + * full of un-evictable buffers, and the + * function should proceed in this case). + * + * If threads are left sleeping, due to not + * using cv_broadcast, they will be woken up + * just before arc_reclaim_thread() sleeps. + */ + mutex_enter(&arc_reclaim_lock); + if (!arc_is_overflowing()) + cv_signal(&arc_reclaim_waiters_cv); + mutex_exit(&arc_reclaim_lock); } else { - missed += 1; + ARCSTAT_BUMP(arcstat_mutex_miss); } } - mutex_exit(&state->arcs_mtx); - mutex_exit(&evicted_state->arcs_mtx); + multilist_sublist_unlock(mls); - if (bytes_evicted < bytes) - dprintf("only evicted %lld bytes from %x", - (longlong_t)bytes_evicted, state); + return (bytes_evicted); +} - if (skipped) - ARCSTAT_INCR(arcstat_evict_skip, skipped); +/* *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:19:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EFB5183F; Tue, 20 Jan 2015 20:19:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D07D1659; Tue, 20 Jan 2015 20:19:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKJ0oZ006730; Tue, 20 Jan 2015 20:19:00 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKJ0kf006727; Tue, 20 Jan 2015 20:19:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202019.t0KKJ0kf006727@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:19:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277432 - vendor/illumos/dist/lib/libzfs/common X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:19:01 -0000 Author: delphij Date: Tue Jan 20 20:18:59 2015 New Revision: 277432 URL: https://svnweb.freebsd.org/changeset/base/277432 Log: 5518 Memory leaks in libzfs import implementation Reviewed by: Dan Fields Reviewed by: Matthew Ahrens Reviewed by: Serghei Samsi Approved by: Dan McDonald Author: Marcel Telka illumos/illumos-gate@078266a5aafa880521ea55488ef3d676f35e908e Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_import.c vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_import.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Tue Jan 20 20:17:29 2015 (r277431) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_import.c Tue Jan 20 20:18:59 2015 (r277432) @@ -18,10 +18,11 @@ * * CDDL HEADER END */ + /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ /* @@ -196,8 +197,10 @@ fix_paths(nvlist_t *nv, name_entry_t *na if ((devid = get_devid(best->ne_name)) == NULL) { (void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID); } else { - if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) + if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) { + devid_str_free(devid); return (-1); + } devid_str_free(devid); } @@ -663,8 +666,10 @@ get_configs(libzfs_handle_t *hdl, pool_l nvlist_add_uint64(holey, ZPOOL_CONFIG_ID, c) != 0 || nvlist_add_uint64(holey, - ZPOOL_CONFIG_GUID, 0ULL) != 0) + ZPOOL_CONFIG_GUID, 0ULL) != 0) { + nvlist_free(holey); goto nomem; + } child[c] = holey; } } @@ -1103,8 +1108,10 @@ zpool_clear_label(int fd) for (l = 0; l < VDEV_LABELS; l++) { if (pwrite64(fd, label, sizeof (vdev_label_t), - label_offset(size, l)) != sizeof (vdev_label_t)) + label_offset(size, l)) != sizeof (vdev_label_t)) { + free(label); return (-1); + } } free(label); @@ -1122,7 +1129,6 @@ static nvlist_t * zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg) { int i, dirs = iarg->paths; - DIR *dirp = NULL; struct dirent64 *dp; char path[MAXPATHLEN]; char *end, **dir = iarg->path; @@ -1152,6 +1158,8 @@ zpool_find_import_impl(libzfs_handle_t * tpool_t *t; char *rdsk; int dfd; + boolean_t config_failed = B_FALSE; + DIR *dirp; /* use realpath to normalize the path */ if (realpath(dir[i], path) == 0) { @@ -1176,6 +1184,8 @@ zpool_find_import_impl(libzfs_handle_t * if ((dfd = open64(rdsk, O_RDONLY)) < 0 || (dirp = fdopendir(dfd)) == NULL) { + if (dfd >= 0) + (void) close(dfd); zfs_error_aux(hdl, strerror(errno)); (void) zfs_error_fmt(hdl, EZFS_BADPATH, dgettext(TEXT_DOMAIN, "cannot open '%s'"), @@ -1223,7 +1233,7 @@ zpool_find_import_impl(libzfs_handle_t * cookie = NULL; while ((slice = avl_destroy_nodes(&slice_cache, &cookie)) != NULL) { - if (slice->rn_config != NULL) { + if (slice->rn_config != NULL && !config_failed) { nvlist_t *config = slice->rn_config; boolean_t matched = B_TRUE; @@ -1244,13 +1254,16 @@ zpool_find_import_impl(libzfs_handle_t * } if (!matched) { nvlist_free(config); - config = NULL; - continue; + } else { + /* + * use the non-raw path for the config + */ + (void) strlcpy(end, slice->rn_name, + pathleft); + if (add_config(hdl, &pools, path, + config) != 0) + config_failed = B_TRUE; } - /* use the non-raw path for the config */ - (void) strlcpy(end, slice->rn_name, pathleft); - if (add_config(hdl, &pools, path, config) != 0) - goto error; } free(slice->rn_name); free(slice); @@ -1258,7 +1271,9 @@ zpool_find_import_impl(libzfs_handle_t * avl_destroy(&slice_cache); (void) closedir(dirp); - dirp = NULL; + + if (config_failed) + goto error; } ret = get_configs(hdl, &pools, iarg->can_be_active); @@ -1281,14 +1296,10 @@ error: for (ne = pools.names; ne != NULL; ne = nenext) { nenext = ne->ne_next; - if (ne->ne_name) - free(ne->ne_name); + free(ne->ne_name); free(ne); } - if (dirp) - (void) closedir(dirp); - return (ret); } @@ -1646,9 +1657,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_SPARES; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; @@ -1662,9 +1673,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_L2CACHE; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; Modified: vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c ============================================================================== --- vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Tue Jan 20 20:17:29 2015 (r277431) +++ vendor/illumos/dist/lib/libzfs/common/libzfs_pool.c Tue Jan 20 20:18:59 2015 (r277432) @@ -20,8 +20,8 @@ */ /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1682,7 +1682,7 @@ zpool_import_props(libzfs_handle_t *hdl, thename = origname; } - if (props) { + if (props != NULL) { uint64_t version; prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE }; @@ -1690,12 +1690,13 @@ zpool_import_props(libzfs_handle_t *hdl, &version) == 0); if ((props = zpool_valid_proplist(hdl, origname, - props, version, flags, errbuf)) == NULL) { + props, version, flags, errbuf)) == NULL) return (-1); - } else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { + if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { nvlist_free(props); return (-1); } + nvlist_free(props); } (void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name)); @@ -1704,11 +1705,11 @@ zpool_import_props(libzfs_handle_t *hdl, &zc.zc_guid) == 0); if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } @@ -1724,6 +1725,9 @@ zpool_import_props(libzfs_handle_t *hdl, error = errno; (void) zcmd_read_dst_nvlist(hdl, &zc, &nv); + + zcmd_free_nvlists(&zc); + zpool_get_rewind_policy(config, &policy); if (error) { @@ -1829,9 +1833,6 @@ zpool_import_props(libzfs_handle_t *hdl, return (0); } - zcmd_free_nvlists(&zc); - nvlist_free(props); - return (ret); } @@ -3281,8 +3282,10 @@ devid_to_path(char *devid_str) if (ret != 0) return (NULL); - if ((path = strdup(list[0].devname)) == NULL) - return (NULL); + /* + * In a case the strdup() fails, we will just return NULL below. + */ + path = strdup(list[0].devname); devid_free_nmlist(list); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:33:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86472DB6; Tue, 20 Jan 2015 20:33:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5C0BE898; Tue, 20 Jan 2015 20:33:33 +0000 (UTC) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 28E1CB94A; Tue, 20 Jan 2015 15:33:32 -0500 (EST) From: John Baldwin To: Konstantin Belousov Subject: Re: svn commit: r277421 - head/sys/powerpc/powerpc Date: Tue, 20 Jan 2015 15:26:39 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.4-CBSD-20140415; KDE/4.5.5; amd64; ; ) References: <201501201621.t0KGLx26096724@svn.freebsd.org> <20150120191438.GL42409@kib.kiev.ua> In-Reply-To: <20150120191438.GL42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201501201526.39169.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Tue, 20 Jan 2015 15:33:32 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Nathan Whitehorn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:33:33 -0000 On Tuesday, January 20, 2015 2:14:38 pm Konstantin Belousov wrote: > This is not an acquisition, to be pedantic. Really, it is cdevsw which > has D_NEEDGIANT flag which acquires Giant. After architectures get > rid of GIANT_REQUIRED, flag can be removed. We could #ifdef the flag, but only if it is a meaningful difference for a real world use case. -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:36:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 75FA3F17; Tue, 20 Jan 2015 20:36:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 570F78AC; Tue, 20 Jan 2015 20:36:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKabqL016054; Tue, 20 Jan 2015 20:36:37 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKaati016052; Tue, 20 Jan 2015 20:36:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501202036.t0KKaati016052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 20 Jan 2015 20:36:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277433 - head/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:36:37 -0000 Author: delphij Date: Tue Jan 20 20:36:36 2015 New Revision: 277433 URL: https://svnweb.freebsd.org/changeset/base/277433 Log: MFV r277432: Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation MFC after: 2 weeks Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Directory Properties: head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Jan 20 20:18:59 2015 (r277432) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c Tue Jan 20 20:36:36 2015 (r277433) @@ -18,10 +18,11 @@ * * CDDL HEADER END */ + /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. * Copyright (c) 2013 by Delphix. All rights reserved. - * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ /* @@ -198,8 +199,10 @@ fix_paths(nvlist_t *nv, name_entry_t *na if ((devid = get_devid(best->ne_name)) == NULL) { (void) nvlist_remove_all(nv, ZPOOL_CONFIG_DEVID); } else { - if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) + if (nvlist_add_string(nv, ZPOOL_CONFIG_DEVID, devid) != 0) { + devid_str_free(devid); return (-1); + } devid_str_free(devid); } @@ -665,8 +668,10 @@ get_configs(libzfs_handle_t *hdl, pool_l nvlist_add_uint64(holey, ZPOOL_CONFIG_ID, c) != 0 || nvlist_add_uint64(holey, - ZPOOL_CONFIG_GUID, 0ULL) != 0) + ZPOOL_CONFIG_GUID, 0ULL) != 0) { + nvlist_free(holey); goto nomem; + } child[c] = holey; } } @@ -1118,8 +1123,10 @@ zpool_clear_label(int fd) for (l = 0; l < VDEV_LABELS; l++) { if (pwrite64(fd, label, sizeof (vdev_label_t), - label_offset(size, l)) != sizeof (vdev_label_t)) + label_offset(size, l)) != sizeof (vdev_label_t)) { + free(label); return (-1); + } } free(label); @@ -1137,7 +1144,6 @@ static nvlist_t * zpool_find_import_impl(libzfs_handle_t *hdl, importargs_t *iarg) { int i, dirs = iarg->paths; - DIR *dirp = NULL; struct dirent64 *dp; char path[MAXPATHLEN]; char *end, **dir = iarg->path; @@ -1167,6 +1173,8 @@ zpool_find_import_impl(libzfs_handle_t * tpool_t *t; char *rdsk; int dfd; + boolean_t config_failed = B_FALSE; + DIR *dirp; /* use realpath to normalize the path */ if (realpath(dir[i], path) == 0) { @@ -1191,6 +1199,8 @@ zpool_find_import_impl(libzfs_handle_t * if ((dfd = open64(rdsk, O_RDONLY)) < 0 || (dirp = fdopendir(dfd)) == NULL) { + if (dfd >= 0) + (void) close(dfd); zfs_error_aux(hdl, strerror(errno)); (void) zfs_error_fmt(hdl, EZFS_BADPATH, dgettext(TEXT_DOMAIN, "cannot open '%s'"), @@ -1272,7 +1282,7 @@ skipdir: cookie = NULL; while ((slice = avl_destroy_nodes(&slice_cache, &cookie)) != NULL) { - if (slice->rn_config != NULL) { + if (slice->rn_config != NULL && !config_failed) { nvlist_t *config = slice->rn_config; boolean_t matched = B_TRUE; @@ -1293,13 +1303,16 @@ skipdir: } if (!matched) { nvlist_free(config); - config = NULL; - continue; + } else { + /* + * use the non-raw path for the config + */ + (void) strlcpy(end, slice->rn_name, + pathleft); + if (add_config(hdl, &pools, path, + config) != 0) + config_failed = B_TRUE; } - /* use the non-raw path for the config */ - (void) strlcpy(end, slice->rn_name, pathleft); - if (add_config(hdl, &pools, path, config) != 0) - goto error; } free(slice->rn_name); free(slice); @@ -1307,7 +1320,9 @@ skipdir: avl_destroy(&slice_cache); (void) closedir(dirp); - dirp = NULL; + + if (config_failed) + goto error; } ret = get_configs(hdl, &pools, iarg->can_be_active); @@ -1330,14 +1345,10 @@ error: for (ne = pools.names; ne != NULL; ne = nenext) { nenext = ne->ne_next; - if (ne->ne_name) - free(ne->ne_name); + free(ne->ne_name); free(ne); } - if (dirp) - (void) closedir(dirp); - return (ret); } @@ -1695,9 +1706,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_SPARES; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; @@ -1711,9 +1722,9 @@ zpool_in_use(libzfs_handle_t *hdl, int f cb.cb_type = ZPOOL_CONFIG_L2CACHE; if (zpool_iter(hdl, find_aux, &cb) == 1) { name = (char *)zpool_get_name(cb.cb_zhp); - ret = TRUE; + ret = B_TRUE; } else { - ret = FALSE; + ret = B_FALSE; } break; Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Tue Jan 20 20:18:59 2015 (r277432) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c Tue Jan 20 20:36:36 2015 (r277433) @@ -20,8 +20,8 @@ */ /* + * Copyright 2015 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright 2011 Nexenta Systems, Inc. All rights reserved. * Copyright (c) 2011, 2014 by Delphix. All rights reserved. * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ @@ -1715,7 +1715,7 @@ zpool_import_props(libzfs_handle_t *hdl, thename = origname; } - if (props) { + if (props != NULL) { uint64_t version; prop_flags_t flags = { .create = B_FALSE, .import = B_TRUE }; @@ -1723,12 +1723,13 @@ zpool_import_props(libzfs_handle_t *hdl, &version) == 0); if ((props = zpool_valid_proplist(hdl, origname, - props, version, flags, errbuf)) == NULL) { + props, version, flags, errbuf)) == NULL) return (-1); - } else if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { + if (zcmd_write_src_nvlist(hdl, &zc, props) != 0) { nvlist_free(props); return (-1); } + nvlist_free(props); } (void) strlcpy(zc.zc_name, thename, sizeof (zc.zc_name)); @@ -1737,11 +1738,11 @@ zpool_import_props(libzfs_handle_t *hdl, &zc.zc_guid) == 0); if (zcmd_write_conf_nvlist(hdl, &zc, config) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } if (zcmd_alloc_dst_nvlist(hdl, &zc, zc.zc_nvlist_conf_size * 2) != 0) { - nvlist_free(props); + zcmd_free_nvlists(&zc); return (-1); } @@ -1757,6 +1758,9 @@ zpool_import_props(libzfs_handle_t *hdl, error = errno; (void) zcmd_read_dst_nvlist(hdl, &zc, &nv); + + zcmd_free_nvlists(&zc); + zpool_get_rewind_policy(config, &policy); if (error) { @@ -1862,9 +1866,6 @@ zpool_import_props(libzfs_handle_t *hdl, return (0); } - zcmd_free_nvlists(&zc); - nvlist_free(props); - return (ret); } @@ -3332,8 +3333,10 @@ devid_to_path(char *devid_str) if (ret != 0) return (NULL); - if ((path = strdup(list[0].devname)) == NULL) - return (NULL); + /* + * In a case the strdup() fails, we will just return NULL below. + */ + path = strdup(list[0].devname); devid_free_nmlist(list); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:39:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 341971AB; Tue, 20 Jan 2015 20:39:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 14AC38D0; Tue, 20 Jan 2015 20:39:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKdUPI016459; Tue, 20 Jan 2015 20:39:30 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKdUt9016455; Tue, 20 Jan 2015 20:39:30 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501202039.t0KKdUt9016455@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Jan 2015 20:39:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277434 - in stable/10: contrib/file/doc sbin/mount usr.sbin usr.sbin/fstyp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:39:31 -0000 Author: trasz Date: Tue Jan 20 20:39:29 2015 New Revision: 277434 URL: https://svnweb.freebsd.org/changeset/base/277434 Log: MFC r275680: Add fstyp(8). This utility, named after its SVR4 counterpart, detects filesystems. It differs from file(1) in that it gives machine-parseable output, it outputs filesystem labels, doesn't get confused by other formats metadata, and runs in Capsicum sandbox. Differential Revision: https://reviews.freebsd.org/D1255 Relnotes: yes Sponsored by: The FreeBSD Foundation Added: stable/10/usr.sbin/fstyp/ - copied from r275680, head/usr.sbin/fstyp/ Modified: stable/10/contrib/file/doc/file.man stable/10/sbin/mount/mount.8 stable/10/usr.sbin/Makefile stable/10/usr.sbin/fstyp/fstyp.c Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/doc/file.man ============================================================================== --- stable/10/contrib/file/doc/file.man Tue Jan 20 20:36:36 2015 (r277433) +++ stable/10/contrib/file/doc/file.man Tue Jan 20 20:39:29 2015 (r277434) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.110 2014/11/28 02:46:39 christos Exp $ -.Dd November 27, 2014 +.\" $File: file.man,v 1.106 2014/03/07 23:11:51 christos Exp $ +.Dd December 3, 2014 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -395,6 +395,7 @@ options. .Xr hexdump 1 , .Xr od 1 , .Xr strings 1 , +.Xr fstyp 8 .Sh STANDARDS CONFORMANCE This program is believed to exceed the System V Interface Definition of FILE(CMD), as near as one can determine from the vague language Modified: stable/10/sbin/mount/mount.8 ============================================================================== --- stable/10/sbin/mount/mount.8 Tue Jan 20 20:36:36 2015 (r277433) +++ stable/10/sbin/mount/mount.8 Tue Jan 20 20:39:29 2015 (r277434) @@ -28,7 +28,7 @@ .\" @(#)mount.8 8.8 (Berkeley) 6/16/94 .\" $FreeBSD$ .\" -.Dd November 22, 2014 +.Dd December 3, 2014 .Dt MOUNT 8 .Os .Sh NAME @@ -549,6 +549,7 @@ support for a particular file system mig .Xr fstab 5 , .Xr procfs 5 , .Xr automount 8 , +.Xr fstyp 8 , .Xr kldload 8 , .Xr mount_cd9660 8 , .Xr mount_msdosfs 8 , Modified: stable/10/usr.sbin/Makefile ============================================================================== --- stable/10/usr.sbin/Makefile Tue Jan 20 20:36:36 2015 (r277433) +++ stable/10/usr.sbin/Makefile Tue Jan 20 20:39:29 2015 (r277434) @@ -30,6 +30,7 @@ SUBDIR= adduser \ extattr \ extattrctl \ fifolog \ + fstyp \ fwcontrol \ getfmac \ getpmac \ Modified: stable/10/usr.sbin/fstyp/fstyp.c ============================================================================== --- head/usr.sbin/fstyp/fstyp.c Wed Dec 10 14:14:16 2014 (r275680) +++ stable/10/usr.sbin/fstyp/fstyp.c Tue Jan 20 20:39:29 2015 (r277434) @@ -31,7 +31,7 @@ #include __FBSDID("$FreeBSD$"); -#include +#include #include #include #include From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:41:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 88B663F9; Tue, 20 Jan 2015 20:41:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73EC997C; Tue, 20 Jan 2015 20:41:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKfX6W019510; Tue, 20 Jan 2015 20:41:33 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKfXWu019508; Tue, 20 Jan 2015 20:41:33 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501202041.t0KKfXWu019508@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Jan 2015 20:41:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277435 - stable/10/usr.sbin/fstyp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:41:33 -0000 Author: trasz Date: Tue Jan 20 20:41:32 2015 New Revision: 277435 URL: https://svnweb.freebsd.org/changeset/base/277435 Log: MFC r276703: Remove leftovers. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/fstyp/cd9660.c stable/10/usr.sbin/fstyp/ntfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/fstyp/cd9660.c ============================================================================== --- stable/10/usr.sbin/fstyp/cd9660.c Tue Jan 20 20:39:29 2015 (r277434) +++ stable/10/usr.sbin/fstyp/cd9660.c Tue Jan 20 20:41:32 2015 (r277435) @@ -37,8 +37,6 @@ __FBSDID("$FreeBSD$"); #include "fstyp.h" -#define G_LABEL_ISO9660_DIR "iso9660" - #define ISO9660_MAGIC "\x01" "CD001" "\x01\x00" #define ISO9660_OFFSET 0x8000 #define VOLUME_LEN 32 Modified: stable/10/usr.sbin/fstyp/ntfs.c ============================================================================== --- stable/10/usr.sbin/fstyp/ntfs.c Tue Jan 20 20:39:29 2015 (r277434) +++ stable/10/usr.sbin/fstyp/ntfs.c Tue Jan 20 20:41:32 2015 (r277435) @@ -42,8 +42,6 @@ __FBSDID("$FreeBSD$"); #define NTFS_FILEMAGIC ((uint32_t)(0x454C4946)) #define NTFS_VOLUMEINO 3 -#define G_LABEL_NTFS_DIR "ntfs" - struct ntfs_attr { uint32_t a_type; uint32_t reclen; From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:42:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D14D654F; Tue, 20 Jan 2015 20:42:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCB6898F; Tue, 20 Jan 2015 20:42:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKguos020655; Tue, 20 Jan 2015 20:42:56 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKguFS020653; Tue, 20 Jan 2015 20:42:56 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501202042.t0KKguFS020653@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Jan 2015 20:42:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277436 - stable/10/usr.sbin/fstyp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:42:56 -0000 Author: trasz Date: Tue Jan 20 20:42:55 2015 New Revision: 277436 URL: https://svnweb.freebsd.org/changeset/base/277436 Log: MFC r276704: Fix memory leaks. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/fstyp/ext2fs.c stable/10/usr.sbin/fstyp/ntfs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/fstyp/ext2fs.c ============================================================================== --- stable/10/usr.sbin/fstyp/ext2fs.c Tue Jan 20 20:41:32 2015 (r277435) +++ stable/10/usr.sbin/fstyp/ext2fs.c Tue Jan 20 20:42:55 2015 (r277436) @@ -85,6 +85,7 @@ fstyp_ext2fs(FILE *fp, char *label, size } strlcpy(label, s_volume_name, size); + free(fs); return (0); } Modified: stable/10/usr.sbin/fstyp/ntfs.c ============================================================================== --- stable/10/usr.sbin/fstyp/ntfs.c Tue Jan 20 20:41:32 2015 (r277435) +++ stable/10/usr.sbin/fstyp/ntfs.c Tue Jan 20 20:42:55 2015 (r277436) @@ -108,7 +108,7 @@ fstyp_ntfs(FILE *fp, char *label, size_t bf = (struct ntfs_bootfile *)read_buf(fp, 0, 512); if (bf == NULL || strncmp(bf->bf_sysid, "NTFS ", 8) != 0) - return (1); + goto fail; mftrecsz = bf->bf_mftrecsz; recsize = (mftrecsz > 0) ? (mftrecsz * bf->bf_bps * bf->bf_spc) : (1 << -mftrecsz); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 20:44:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 76B86732; Tue, 20 Jan 2015 20:44:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 61E5F9A6; Tue, 20 Jan 2015 20:44:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KKiHK5020906; Tue, 20 Jan 2015 20:44:17 GMT (envelope-from trasz@FreeBSD.org) Received: (from trasz@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KKiHjB020905; Tue, 20 Jan 2015 20:44:17 GMT (envelope-from trasz@FreeBSD.org) Message-Id: <201501202044.t0KKiHjB020905@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: trasz set sender to trasz@FreeBSD.org using -f From: Edward Tomasz Napierala Date: Tue, 20 Jan 2015 20:44:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277437 - stable/10/usr.sbin/fstyp X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 20:44:17 -0000 Author: trasz Date: Tue Jan 20 20:44:16 2015 New Revision: 277437 URL: https://svnweb.freebsd.org/changeset/base/277437 Log: MFC r277128: Fix detection of ext2/ext3 filesystems that lack labels. Sponsored by: The FreeBSD Foundation Modified: stable/10/usr.sbin/fstyp/ext2fs.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/fstyp/ext2fs.c ============================================================================== --- stable/10/usr.sbin/fstyp/ext2fs.c Tue Jan 20 20:42:55 2015 (r277436) +++ stable/10/usr.sbin/fstyp/ext2fs.c Tue Jan 20 20:44:16 2015 (r277437) @@ -78,12 +78,6 @@ fstyp_ext2fs(FILE *fp, char *label, size if (s_volume_name[0] == '/') s_volume_name += 1; - /* Check for volume label */ - if (s_volume_name[0] == '\0') { - free(fs); - return (1); - } - strlcpy(label, s_volume_name, size); free(fs); From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:02:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 80A0DF07; Tue, 20 Jan 2015 21:02:42 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 54DB3BA4; Tue, 20 Jan 2015 21:02:42 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t0KL2ft6067905 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 20 Jan 2015 13:02:41 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t0KL2fUB067904; Tue, 20 Jan 2015 13:02:41 -0800 (PST) (envelope-from jmg) Date: Tue, 20 Jan 2015 13:02:41 -0800 From: John-Mark Gurney To: Nathan Whitehorn Subject: Re: svn commit: r277254 - head/sys/powerpc/conf Message-ID: <20150120210241.GT1949@funkthat.com> References: <201501161741.t0GHfMH2088828@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501161741.t0GHfMH2088828@svn.freebsd.org> X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Tue, 20 Jan 2015 13:02:41 -0800 (PST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:02:42 -0000 Nathan Whitehorn wrote this message on Fri, Jan 16, 2015 at 17:41 +0000: > Author: nwhitehorn > Date: Fri Jan 16 17:41:21 2015 > New Revision: 277254 > URL: https://svnweb.freebsd.org/changeset/base/277254 > > Log: > Make netbooting work again by disabling BOOTP_NFSV3. Investigate why this > causes bad RPC errors later. Ahh, thanks! :) That's probably what I was seeing at the hack-a-thon.. -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:11:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6993036B; Tue, 20 Jan 2015 21:11:43 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 58534C8D; Tue, 20 Jan 2015 21:11:40 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0KLBbEx074355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 00:11:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0KLBb9F074354; Wed, 21 Jan 2015 00:11:37 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 21 Jan 2015 00:11:37 +0300 From: Gleb Smirnoff To: Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150120211137.GY15484@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150120075126.GA42409@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:11:43 -0000 On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin Belousov wrote: K> > Like stated in the manual page, callout_reset_curcpu/on() does not work K> > with MPSAFE callouts any more! K> I.e. you 'fixed' some undeterminate bugs in callout migration by not K> doing migration at all anymore. K> K> > K> > You need to use callout_init_{mtx,rm,rw} and remove the custom locking K> > inside the callback in the TCP stack to get it working like before! K> K> No, you need to do this, if you think that whole callout KPI must be K> rototiled. It is up to the person who modifies the KPI, to ensure that K> existing code is not broken. K> K> As I understand, currently we are back to the one-cpu callouts. K> Do other people consider this situation acceptable ? I think this isn't acceptable. The commit to a complex subsystem lacked a review from persons involved in the system before. The commit to subsystem broke consumers of the subsystem and this was even done not accidentially, but due to Hans not caring about it. As for me this is enough to request a backout, and let the change back in only after proper review. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:14:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E1FC55B6; Tue, 20 Jan 2015 21:14:19 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C2A5BCB4; Tue, 20 Jan 2015 21:14:18 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0KLEGbM074370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 00:14:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0KLEGwI074369; Wed, 21 Jan 2015 00:14:16 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 21 Jan 2015 00:14:16 +0300 From: Gleb Smirnoff To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150120211416.GZ15484@FreeBSD.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BE21F0.6010602@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:14:20 -0000 Hans, On Tue, Jan 20, 2015 at 10:37:52AM +0100, Hans Petter Selasky wrote: H> It is not very hard to update existing callout clients and you can do it H> too, if you need the extra bits of performance. If it is not very hard, then you should have done that as part of your change. H> Are there more API's than the TCP stack which you think needs an update H> and are performance critical? This is the question that you should have invetigated yourself before pushing the change in. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:15:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 629A26FE; Tue, 20 Jan 2015 21:15:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3499BCC1; Tue, 20 Jan 2015 21:15:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KLFYIX036131; Tue, 20 Jan 2015 21:15:34 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KLFYZ2036130; Tue, 20 Jan 2015 21:15:34 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501202115.t0KLFYZ2036130@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Tue, 20 Jan 2015 21:15:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277440 - head/sys/cam X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:15:34 -0000 Author: will Date: Tue Jan 20 21:15:33 2015 New Revision: 277440 URL: https://svnweb.freebsd.org/changeset/base/277440 Log: Restore the CAM XPT peripheral generation counter, and export it via sysctl. Define it as an atomic uint32_t. These increments happen infrequently enough for the atomic overhead to be a problem, and since they're now independent atomics, they won't contend with xpt_lock_buses(). This counter is useful as a means of cheaply identifying whether any changes have been made to the CAM peripheral list. Userland programs have no guarantee that the counter won't change on them while being returned or while processing the information, so they must be written accordingly. Discussed with: ken, mav (in general) MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/cam/cam_xpt.c Modified: head/sys/cam/cam_xpt.c ============================================================================== --- head/sys/cam/cam_xpt.c Tue Jan 20 21:09:39 2015 (r277439) +++ head/sys/cam/cam_xpt.c Tue Jan 20 21:15:33 2015 (r277440) @@ -93,6 +93,8 @@ struct xpt_task { }; struct xpt_softc { + uint32_t xpt_generation; + /* number of high powered commands that can go through right now */ struct mtx xpt_highpower_lock; STAILQ_HEAD(highpowerlist, cam_ed) highpowerq; @@ -151,6 +153,8 @@ static struct xpt_softc xsoftc; SYSCTL_INT(_kern_cam, OID_AUTO, boot_delay, CTLFLAG_RDTUN, &xsoftc.boot_delay, 0, "Bus registration wait time"); +SYSCTL_UINT(_kern_cam, OID_AUTO, xpt_generation, CTLFLAG_RD, + &xsoftc.xpt_generation, 0, "CAM peripheral generation count"); struct cam_doneq { struct mtx_padalign cam_doneq_mtx; @@ -976,6 +980,7 @@ xpt_add_periph(struct cam_periph *periph device->generation++; SLIST_INSERT_HEAD(&device->periphs, periph, periph_links); mtx_unlock(&device->target->bus->eb_mtx); + atomic_add_32(&xsoftc.xpt_generation, 1); } return (status); @@ -992,6 +997,7 @@ xpt_remove_periph(struct cam_periph *per device->generation++; SLIST_REMOVE(&device->periphs, periph, cam_periph, periph_links); mtx_unlock(&device->target->bus->eb_mtx); + atomic_add_32(&xsoftc.xpt_generation, 1); } } From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:42:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5765EDFD; Tue, 20 Jan 2015 21:42:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 38999FB7; Tue, 20 Jan 2015 21:42:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KLgiqP050304; Tue, 20 Jan 2015 21:42:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KLgf3r050291; Tue, 20 Jan 2015 21:42:41 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501202142.t0KLgf3r050291@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 20 Jan 2015 21:42:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277441 - in stable/10: etc/mtree lib/libc lib/libc/tests lib/libc/tests/gen tools/regression/lib/libc/gen X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:42:44 -0000 Author: ngie Date: Tue Jan 20 21:42:40 2015 New Revision: 277441 URL: https://svnweb.freebsd.org/changeset/base/277441 Log: MFC r274075,r274581,r274582,r274595: r274075 (by ngie): Add reachover Makefiles for contrib/netbsd-tests/lib/libc; this adds approximately 500 new testcases Various TODOs have been sprinkled around the Makefiles for items that even need to be ported (missing features), testcases have issues with building/linking, or issues at runtime. A variant of this code has been tested extensively on amd64 and i386 10-STABLE/11-CURRENT for several months without issue. It builds on other architectures, but the code will remain off until I have prove it works on virtual hardware or real hardware on other architectures In collaboration with: pho, Casey Peel Sponsored by: EMC / Isilon Storage Division r274581 (by ngie): Convert tools/regression/lib/libc/gen/test-arc4random into an ATF testcase and rename as lib/libc/gen/arc4random_test Sponsored by: EMC / Isilon Storage Division r274582 (by ngie): Remove test-arc4random from this Makefile so others can continue to use this as-is for the time being r274595 (by ngie): Convert tools/regression/lib/libc/stdio/test-fpclassify into an ATF testcase and Rename as lib/libc/stdio/fpclassify2_test Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/Makefile.amd64 - copied unchanged from r274075, head/lib/libc/Makefile.amd64 stable/10/lib/libc/Makefile.i386 - copied unchanged from r274075, head/lib/libc/Makefile.i386 stable/10/lib/libc/tests/ - copied from r274075, head/lib/libc/tests/ stable/10/lib/libc/tests/gen/arc4random_test.c - copied unchanged from r274581, head/lib/libc/tests/gen/arc4random_test.c stable/10/lib/libc/tests/gen/fpclassify2_test.c - copied unchanged from r274595, head/lib/libc/tests/gen/fpclassify2_test.c Deleted: stable/10/tools/regression/lib/libc/gen/test-arc4random.c stable/10/tools/regression/lib/libc/gen/test-fpclassify.c Modified: stable/10/etc/mtree/BSD.tests.dist stable/10/lib/libc/Makefile stable/10/lib/libc/tests/Makefile stable/10/lib/libc/tests/gen/Makefile stable/10/tools/regression/lib/libc/gen/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Tue Jan 20 21:15:33 2015 (r277440) +++ stable/10/etc/mtree/BSD.tests.dist Tue Jan 20 21:42:40 2015 (r277441) @@ -87,6 +87,56 @@ test-programs .. .. + libc + c063 + .. + db + .. + gen + execve + .. + posix_spawn + .. + .. + hash + data + .. + .. + inet + .. + locale + .. + net + getaddrinfo + data + .. + .. + .. + regex + data + .. + .. + ssp + .. + stdio + .. + stdlib + .. + string + .. + sys + .. + time + .. + tls + dso + .. + .. + termios + .. + ttyio + .. + .. libcrypt .. libmp Modified: stable/10/lib/libc/Makefile ============================================================================== --- stable/10/lib/libc/Makefile Tue Jan 20 21:15:33 2015 (r277440) +++ stable/10/lib/libc/Makefile Tue Jan 20 21:42:40 2015 (r277441) @@ -160,6 +160,8 @@ libkern.${LIBC_ARCH}:: ${KMSRCS} CFLAGS+=-DSYSCALL_COMPAT .endif +.include + .include # Disable warnings in contributed sources. Copied: stable/10/lib/libc/Makefile.amd64 (from r274075, head/lib/libc/Makefile.amd64) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/Makefile.amd64 Tue Jan 20 21:42:40 2015 (r277441, copy of r274075, head/lib/libc/Makefile.amd64) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Copied: stable/10/lib/libc/Makefile.i386 (from r274075, head/lib/libc/Makefile.i386) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/Makefile.i386 Tue Jan 20 21:42:40 2015 (r277441, copy of r274075, head/lib/libc/Makefile.i386) @@ -0,0 +1,6 @@ +# $FreeBSD$ + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + Modified: stable/10/lib/libc/tests/Makefile ============================================================================== --- head/lib/libc/tests/Makefile Tue Nov 4 00:56:25 2014 (r274075) +++ stable/10/lib/libc/tests/Makefile Tue Jan 20 21:42:40 2015 (r277441) @@ -1,6 +1,6 @@ # $FreeBSD$ -.include +.include TESTSDIR= ${TESTSBASE}/lib/libc Modified: stable/10/lib/libc/tests/gen/Makefile ============================================================================== --- head/lib/libc/tests/gen/Makefile Tue Nov 4 00:56:25 2014 (r274075) +++ stable/10/lib/libc/tests/gen/Makefile Tue Jan 20 21:42:40 2015 (r277441) @@ -4,6 +4,9 @@ TESTSDIR= ${TESTSBASE}/lib/libc/gen +ATF_TESTS_C= arc4random_test +ATF_TESTS_C+= fpclassify2_test + # TODO: t_closefrom, t_cpuset, t_fmtcheck, t_randomid, t_sleep # TODO: t_siginfo (fixes require further inspection) # TODO: t_sethostname_test (consistently screws up the hostname) Copied: stable/10/lib/libc/tests/gen/arc4random_test.c (from r274581, head/lib/libc/tests/gen/arc4random_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/arc4random_test.c Tue Jan 20 21:42:40 2015 (r277441, copy of r274581, head/lib/libc/tests/gen/arc4random_test.c) @@ -0,0 +1,92 @@ +/*- + * Copyright (c) 2011 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include + +/* + * BUFSIZE is the number of bytes of rc4 output to compare. The probability + * that this test fails spuriously is 2**(-BUFSIZE * 8). + */ +#define BUFSIZE 8 + +/* + * Test whether arc4random_buf() returns the same sequence of bytes in both + * parent and child processes. (Hint: It shouldn't.) + */ +ATF_TC_WITHOUT_HEAD(test_arc4random); +ATF_TC_BODY(test_arc4random, tc) +{ + struct shared_page { + char parentbuf[BUFSIZE]; + char childbuf[BUFSIZE]; + } *page; + pid_t pid; + char c; + + printf("1..1\n"); + + page = mmap(NULL, sizeof(struct shared_page), PROT_READ | PROT_WRITE, + MAP_ANON | MAP_SHARED, -1, 0); + if (page == MAP_FAILED) { + printf("fail 1 - mmap\n"); + exit(1); + } + + arc4random_buf(&c, 1); + + pid = fork(); + ATF_REQUIRE(0 <= pid); + if (pid == 0) { + /* child */ + arc4random_buf(page->childbuf, BUFSIZE); + exit(0); + } else { + /* parent */ + int status; + arc4random_buf(page->parentbuf, BUFSIZE); + wait(&status); + } + ATF_CHECK_MSG(memcmp(page->parentbuf, page->childbuf, BUFSIZE) != 0, + "sequences are the same"); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_arc4random); + + return (atf_no_error()); +} Copied: stable/10/lib/libc/tests/gen/fpclassify2_test.c (from r274595, head/lib/libc/tests/gen/fpclassify2_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/gen/fpclassify2_test.c Tue Jan 20 21:42:40 2015 (r277441, copy of r274595, head/lib/libc/tests/gen/fpclassify2_test.c) @@ -0,0 +1,72 @@ +/*- + * Copyright (c) 2003 Mike Barcroft + * 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$ + */ + +#include +#include +#include +#include + +ATF_TC_WITHOUT_HEAD(test_fpclassify); +ATF_TC_BODY(test_fpclassify, tc) +{ + + ATF_CHECK(fpclassify((float)0) == FP_ZERO); + ATF_CHECK(fpclassify((float)-0.0) == FP_ZERO); + ATF_CHECK(fpclassify((float)1) == FP_NORMAL); + ATF_CHECK(fpclassify((float)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((float)HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((float)HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify(NAN) == FP_NAN); + + ATF_CHECK(fpclassify((double)0) == FP_ZERO); + ATF_CHECK(fpclassify((double)-0) == FP_ZERO); + ATF_CHECK(fpclassify((double)1) == FP_NORMAL); + ATF_CHECK(fpclassify((double)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((double)HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((double)HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify((double)NAN) == FP_NAN); + + ATF_CHECK(fpclassify((long double)0) == FP_ZERO); + ATF_CHECK(fpclassify((long double)-0.0) == FP_ZERO); + ATF_CHECK(fpclassify((long double)1) == FP_NORMAL); + ATF_CHECK(fpclassify((long double)1000) == FP_NORMAL); + ATF_CHECK(fpclassify(HUGE_VALL) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)HUGE_VALF) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)HUGE_VAL) == FP_INFINITE); + ATF_CHECK(fpclassify((long double)NAN) == FP_NAN); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_fpclassify); + + return (atf_no_error()); +} Modified: stable/10/tools/regression/lib/libc/gen/Makefile ============================================================================== --- stable/10/tools/regression/lib/libc/gen/Makefile Tue Jan 20 21:15:33 2015 (r277440) +++ stable/10/tools/regression/lib/libc/gen/Makefile Tue Jan 20 21:42:40 2015 (r277441) @@ -1,7 +1,7 @@ # $FreeBSD$ -TESTS= test-arc4random test-fmtcheck test-fmtmsg test-fnmatch \ - test-fpclassify test-ftw test-popen test-posix_spawn test-wordexp +TESTS= test-fmtcheck test-fmtmsg test-fnmatch \ + test-ftw test-popen test-posix_spawn test-wordexp .PHONY: tests tests: ${TESTS} From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:46:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E3E4A2; Tue, 20 Jan 2015 21:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 39D5AFE5; Tue, 20 Jan 2015 21:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KLk5VV050868; Tue, 20 Jan 2015 21:46:05 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KLk54e050867; Tue, 20 Jan 2015 21:46:05 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501202146.t0KLk54e050867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 20 Jan 2015 21:46:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277442 - stable/10/lib/libc/tests/hash X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:46:05 -0000 Author: ngie Date: Tue Jan 20 21:46:04 2015 New Revision: 277442 URL: https://svnweb.freebsd.org/changeset/base/277442 Log: MFC r276318: r276318 (by ngie): Build/install lib/libc/tests/hash/t_sha2 if MK_OPENSSL == yes Reported by: Beeblebrox Modified: stable/10/lib/libc/tests/hash/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/hash/Makefile ============================================================================== --- stable/10/lib/libc/tests/hash/Makefile Tue Jan 20 21:42:40 2015 (r277441) +++ stable/10/lib/libc/tests/hash/Makefile Tue Jan 20 21:46:04 2015 (r277442) @@ -1,8 +1,14 @@ # $FreeBSD$ +.include + TESTSDIR= ${TESTSBASE}/lib/libc/hash -NETBSD_ATF_TESTS_C= sha2_test +NETBSD_ATF_TESTS_C= + +.if ${MK_OPENSSL} != "no" +NETBSD_ATF_TESTS_C+= sha2_test +.endif NETBSD_ATF_TESTS_SH= hash_test From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:48:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 66B122F7; Tue, 20 Jan 2015 21:48:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 478F977; Tue, 20 Jan 2015 21:48:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KLmi8j051415; Tue, 20 Jan 2015 21:48:44 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KLmhrr051410; Tue, 20 Jan 2015 21:48:43 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501202148.t0KLmhrr051410@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 20 Jan 2015 21:48:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277443 - in stable/10: contrib/netbsd-tests/lib/libc/c063 lib/libc/tests/c063 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:48:44 -0000 Author: ngie Date: Tue Jan 20 21:48:42 2015 New Revision: 277443 URL: https://svnweb.freebsd.org/changeset/base/277443 Log: MFC r276590: r276590 (by jilles): Link lib/libc/c063 tests to the build. Some files lack required #include . The #ifdef is per ngie's request; the includes are clearly necessary for struct stat. The faccessat test fails because it tries to use AT_SYMLINK_NOFOLLOW with faccessat(), which is not specified by POSIX.1-2008. Differential Revision: https://reviews.freebsd.org/D1411 Reviewed by: ngie Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c stable/10/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c stable/10/lib/libc/tests/c063/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Tue Jan 20 21:46:04 2015 (r277442) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_faccessat.c Tue Jan 20 21:48:42 2015 (r277443) @@ -165,6 +165,9 @@ ATF_TC_BODY(faccessat_fdlink, tc) ATF_REQUIRE(faccessat(dfd, BASELINK, F_OK, 0) == -1); ATF_REQUIRE(errno == ENOENT); +#ifdef __FreeBSD__ + atf_tc_expect_fail("Depends on non-standard behavior not mentioned in POSIX.1-2008"); +#endif ATF_REQUIRE(faccessat(dfd, BASELINK, F_OK, AT_SYMLINK_NOFOLLOW) == 0); ATF_REQUIRE(close(dfd) == 0); Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Tue Jan 20 21:46:04 2015 (r277442) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchmodat.c Tue Jan 20 21:48:42 2015 (r277443) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_fchmodat.c,v 1.2 201 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/fchmodat" Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Tue Jan 20 21:46:04 2015 (r277442) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_fchownat.c Tue Jan 20 21:48:42 2015 (r277443) @@ -41,6 +41,9 @@ __RCSID("$NetBSD: t_fchownat.c,v 1.3 201 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/fchownat" Modified: stable/10/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c ============================================================================== --- stable/10/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Tue Jan 20 21:46:04 2015 (r277442) +++ stable/10/contrib/netbsd-tests/lib/libc/c063/t_fstatat.c Tue Jan 20 21:48:42 2015 (r277443) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_fstatat.c,v 1.2 2013 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #define DIR "dir" #define FILE "dir/fstatat" Modified: stable/10/lib/libc/tests/c063/Makefile ============================================================================== --- stable/10/lib/libc/tests/c063/Makefile Tue Jan 20 21:46:04 2015 (r277442) +++ stable/10/lib/libc/tests/c063/Makefile Tue Jan 20 21:48:42 2015 (r277443) @@ -4,21 +4,23 @@ TESTSDIR= ${TESTSBASE}/lib/libc/c063 #TODO: t_o_search, t_utimensat -NETBSD_ATF_TESTS_C= t_faccessat -NETBSD_ATF_TESTS_C+= t_fchmodat -NETBSD_ATF_TESTS_C+= t_fchownat -NETBSD_ATF_TESTS_C+= t_fexecve -NETBSD_ATF_TESTS_C+= t_fstatat -NETBSD_ATF_TESTS_C+= t_linkat -NETBSD_ATF_TESTS_C+= t_mkdirat -NETBSD_ATF_TESTS_C+= t_mkfifoat -NETBSD_ATF_TESTS_C+= t_mknodat -NETBSD_ATF_TESTS_C+= t_openat -NETBSD_ATF_TESTS_C+= t_readlinkat -NETBSD_ATF_TESTS_C+= t_renameat -NETBSD_ATF_TESTS_C+= t_symlinkat -NETBSD_ATF_TESTS_C+= t_unlinkat +NETBSD_ATF_TESTS_C= faccessat +NETBSD_ATF_TESTS_C+= fchmodat +NETBSD_ATF_TESTS_C+= fchownat +NETBSD_ATF_TESTS_C+= fexecve +NETBSD_ATF_TESTS_C+= fstatat +NETBSD_ATF_TESTS_C+= linkat +NETBSD_ATF_TESTS_C+= mkdirat +NETBSD_ATF_TESTS_C+= mkfifoat +NETBSD_ATF_TESTS_C+= mknodat +NETBSD_ATF_TESTS_C+= openat +NETBSD_ATF_TESTS_C+= readlinkat +NETBSD_ATF_TESTS_C+= renameat +NETBSD_ATF_TESTS_C+= symlinkat +NETBSD_ATF_TESTS_C+= unlinkat CFLAGS+= -D_INCOMPLETE_XOPEN_C063 +.include "../Makefile.netbsd-tests" + .include From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:49:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 205FC467; Tue, 20 Jan 2015 21:49:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C40C90; Tue, 20 Jan 2015 21:49:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KLnoSA051627; Tue, 20 Jan 2015 21:49:50 GMT (envelope-from jbeich@FreeBSD.org) Received: (from jbeich@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KLnoWx051626; Tue, 20 Jan 2015 21:49:50 GMT (envelope-from jbeich@FreeBSD.org) Message-Id: <201501202149.t0KLnoWx051626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jbeich set sender to jbeich@FreeBSD.org using -f From: Jan Beich Date: Tue, 20 Jan 2015 21:49:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277444 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:49:51 -0000 Author: jbeich (ports committer) Date: Tue Jan 20 21:49:50 2015 New Revision: 277444 URL: https://svnweb.freebsd.org/changeset/base/277444 Log: - Add jbeich as a ports committer - List bapt and flo as his mentors Differential Revision: https://reviews.freebsd.org/D1562 Approved by: flo (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Tue Jan 20 21:48:42 2015 (r277443) +++ head/share/misc/committers-ports.dot Tue Jan 20 21:49:50 2015 (r277444) @@ -116,6 +116,7 @@ itetcu [label="Ion-Mihai Tetcu\nitetcu@F jacula [label="Giuseppe Pilichi\njacula@FreeBSD.org\n2010/04/05"] jadawin [label="Philippe Audeoud\njadawin@FreeBSD.org\n2008/03/02"] jase [label="Jase Thew\njase@FreeBSD.org\n2012/05/30"] +jbeich [label="Jan Beich\njbeich@FreeBSD.org\n2015/01/19"] jgh [label="Jason Helfman\njgh@FreeBSD.org\n2011/12/16"] jhale [label="Jason E. Hale\njhale@FreeBSD.org\n2012/09/10"] jkim [label="Jung-uk Kim\njkim@FreeBSD.org\n2007/09/12"] @@ -267,6 +268,7 @@ bapt -> bdrewery bapt -> bofh bapt -> eadler bapt -> grembo +bapt -> jbeich bapt -> jlaffaye bapt -> marius bapt -> marino @@ -350,6 +352,7 @@ fjoe -> osa flo -> bar flo -> jase +flo -> jbeich flo -> grembo flz -> garga From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 21:59:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 86BAF7EC; Tue, 20 Jan 2015 21:59:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 66ABB1C9; Tue, 20 Jan 2015 21:59:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KLxoGY056502; Tue, 20 Jan 2015 21:59:50 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KLxnJF056498; Tue, 20 Jan 2015 21:59:49 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501202159.t0KLxnJF056498@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 20 Jan 2015 21:59:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277446 - in stable/10: lib/libc/tests/stdio tools/regression/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 21:59:50 -0000 Author: ngie Date: Tue Jan 20 21:59:48 2015 New Revision: 277446 URL: https://svnweb.freebsd.org/changeset/base/277446 Log: MFC r267004,r274592: r267004 (by gahr): - Use strlen instead of hardcoding a number - Terminate a sentence with a period Approved by: cognet r274592 (by ngie): Convert tools/regression/lib/libc/stdio/test-fmemopen into an ATF testcase and rename as lib/libc/stdio/fmemopen2_test Sponsored by: EMC / Isilon Storage Division Added: stable/10/lib/libc/tests/stdio/fmemopen2_test.c - copied unchanged from r274592, head/lib/libc/tests/stdio/fmemopen2_test.c Deleted: stable/10/tools/regression/lib/libc/stdio/test-fmemopen.c Modified: stable/10/lib/libc/tests/stdio/Makefile stable/10/tools/regression/lib/libc/stdio/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/tests/stdio/Makefile ============================================================================== --- stable/10/lib/libc/tests/stdio/Makefile Tue Jan 20 21:58:49 2015 (r277445) +++ stable/10/lib/libc/tests/stdio/Makefile Tue Jan 20 21:59:48 2015 (r277446) @@ -2,6 +2,8 @@ TESTSDIR= ${TESTSBASE}/lib/libc/stdio +ATF_TESTS_C= fmemopen2_test + NETBSD_ATF_TESTS_C= clearerr_test NETBSD_ATF_TESTS_C+= fflush_test NETBSD_ATF_TESTS_C+= fmemopen_test Copied: stable/10/lib/libc/tests/stdio/fmemopen2_test.c (from r274592, head/lib/libc/tests/stdio/fmemopen2_test.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/lib/libc/tests/stdio/fmemopen2_test.c Tue Jan 20 21:59:48 2015 (r277446, copy of r274592, head/lib/libc/tests/stdio/fmemopen2_test.c) @@ -0,0 +1,300 @@ +/*- +Copyright (C) 2013 Pietro Cerutti + +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 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 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. +*/ + +/* + * Test basic FILE * functions (fread, fwrite, fseek, fclose) against + * a FILE * retrieved using fmemopen() + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +ATF_TC_WITHOUT_HEAD(test_preexisting); +ATF_TC_BODY(test_preexisting, tc) +{ + /* + * Use a pre-existing buffer. + */ + + char buf[512]; + char buf2[512]; + char str[] = "Test writing some stuff"; + char str2[] = "AAAAAAAAA"; + char str3[] = "AAAA writing some stuff"; + FILE *fp; + size_t nofw, nofr; + int rc; + + /* Open a FILE * using fmemopen. */ + fp = fmemopen(buf, sizeof(buf), "w"); + ATF_REQUIRE(fp != NULL); + + /* Write to the buffer. */ + nofw = fwrite(str, 1, sizeof(str), fp); + ATF_REQUIRE(nofw == sizeof(str)); + + /* Close the FILE *. */ + rc = fclose(fp); + ATF_REQUIRE(rc == 0); + + /* Re-open the FILE * to read back the data. */ + fp = fmemopen(buf, sizeof(buf), "r"); + ATF_REQUIRE(fp != NULL); + + /* Read from the buffer. */ + bzero(buf2, sizeof(buf2)); + nofr = fread(buf2, 1, sizeof(buf2), fp); + ATF_REQUIRE(nofr == sizeof(buf2)); + + /* + * Since a write on a FILE * retrieved by fmemopen + * will add a '\0' (if there's space), we can check + * the strings for equality. + */ + ATF_REQUIRE(strcmp(str, buf2) == 0); + + /* Close the FILE *. */ + rc = fclose(fp); + ATF_REQUIRE(rc == 0); + + /* Now open a FILE * on the first 4 bytes of the string. */ + fp = fmemopen(str, 4, "w"); + ATF_REQUIRE(fp != NULL); + + /* + * Try to write more bytes than we shoud, we'll get a short count (4). + */ + nofw = fwrite(str2, 1, sizeof(str2), fp); + ATF_REQUIRE(nofw == 4); + + /* Close the FILE *. */ + rc = fclose(fp); + + /* Check that the string was not modified after the first 4 bytes. */ + ATF_REQUIRE(strcmp(str, str3) == 0); +} + +ATF_TC_WITHOUT_HEAD(test_autoalloc); +ATF_TC_BODY(test_autoalloc, tc) +{ + /* + * Let fmemopen allocate the buffer. + */ + + char str[] = "A quick test"; + FILE *fp; + long pos; + size_t nofw, nofr, i; + int rc; + + /* Open a FILE * using fmemopen. */ + fp = fmemopen(NULL, 512, "w+"); + ATF_REQUIRE(fp != NULL); + + /* fill the buffer */ + for (i = 0; i < 512; i++) { + nofw = fwrite("a", 1, 1, fp); + ATF_REQUIRE(nofw == 1); + } + + /* Get the current position into the stream. */ + pos = ftell(fp); + ATF_REQUIRE(pos == 512); + + /* + * Try to write past the end, we should get a short object count (0) + */ + nofw = fwrite("a", 1, 1, fp); + ATF_REQUIRE(nofw == 0); + + /* Close the FILE *. */ + rc = fclose(fp); + ATF_REQUIRE(rc == 0); + + /* Open a FILE * using a wrong mode */ + fp = fmemopen(NULL, 512, "r"); + ATF_REQUIRE(fp == NULL); + + fp = fmemopen(NULL, 512, "w"); + ATF_REQUIRE(fp == NULL); +} + +ATF_TC_WITHOUT_HEAD(test_data_length); +ATF_TC_BODY(test_data_length, tc) +{ + /* + * Here we test that a read operation doesn't go past the end of the + * data actually written, and that a SEEK_END seeks from the end of the + * data, not of the whole buffer. + */ + FILE *fp; + char buf[512] = {'\0'}; + char str[] = "Test data length. "; + char str2[] = "Do we have two sentences?"; + char str3[sizeof(str) + sizeof(str2) -1]; + long pos; + size_t nofw, nofr; + int rc; + + /* Open a FILE * for updating our buffer. */ + fp = fmemopen(buf, sizeof(buf), "w+"); + ATF_REQUIRE(fp != NULL); + + /* Write our string into the buffer. */ + nofw = fwrite(str, 1, sizeof(str), fp); + ATF_REQUIRE(nofw == sizeof(str)); + + /* + * Now seek to the end and check that ftell + * gives us sizeof(str). + */ + rc = fseek(fp, 0, SEEK_END); + ATF_REQUIRE(rc == 0); + pos = ftell(fp); + ATF_REQUIRE(pos == sizeof(str)); + + /* Close the FILE *. */ + rc = fclose(fp); + ATF_REQUIRE(rc == 0); + + /* Reopen the buffer for appending. */ + fp = fmemopen(buf, sizeof(buf), "a+"); + ATF_REQUIRE(fp != NULL); + + /* We should now be writing after the first string. */ + nofw = fwrite(str2, 1, sizeof(str2), fp); + ATF_REQUIRE(nofw == sizeof(str2)); + + /* Rewind the FILE *. */ + rc = fseek(fp, 0, SEEK_SET); + ATF_REQUIRE(rc == 0); + + /* Make sure we're at the beginning. */ + pos = ftell(fp); + ATF_REQUIRE(pos == 0); + + /* Read the whole buffer. */ + nofr = fread(str3, 1, sizeof(buf), fp); + ATF_REQUIRE(nofr == sizeof(str3)); + + /* Make sure the two strings are there. */ + ATF_REQUIRE(strncmp(str3, str, sizeof(str) - 1) == 0); + ATF_REQUIRE(strncmp(str3 + sizeof(str) - 1, str2, sizeof(str2)) == 0); + + /* Close the FILE *. */ + rc = fclose(fp); + ATF_REQUIRE(rc == 0); +} + +ATF_TC_WITHOUT_HEAD(test_binary); +ATF_TC_BODY(test_binary, tc) +{ + /* + * Make sure that NULL bytes are never appended when opening a buffer + * in binary mode. + */ + + FILE *fp; + char buf[20]; + char str[] = "Test"; + size_t nofw; + int rc, i; + + /* Pre-fill the buffer. */ + memset(buf, 'A', sizeof(buf)); + + /* Open a FILE * in binary mode. */ + fp = fmemopen(buf, sizeof(buf), "w+b"); + ATF_REQUIRE(fp != NULL); + + /* Write some data into it. */ + nofw = fwrite(str, 1, strlen(str), fp); + ATF_REQUIRE(nofw == strlen(str)); + + /* Make sure that the buffer doesn't contain any NULL bytes. */ + for (i = 0; i < sizeof(buf); i++) + ATF_REQUIRE(buf[i] != '\0'); + + /* Close the FILE *. */ + rc = fclose(fp); + ATF_REQUIRE(rc == 0); +} + +ATF_TC_WITHOUT_HEAD(test_append_binary_pos); +ATF_TC_BODY(test_append_binary_pos, tc) +{ + /* + * For compatibility with other implementations (glibc), we set the + * position to 0 when opening an automatically allocated binary stream + * for appending. + */ + + FILE *fp; + + fp = fmemopen(NULL, 16, "ab+"); + ATF_REQUIRE(ftell(fp) == 0L); + fclose(fp); + + /* + * Make sure that a pre-allocated buffer behaves correctly. + */ + char buf[] = "Hello"; + fp = fmemopen(buf, sizeof(buf), "ab+"); + ATF_REQUIRE(ftell(fp) == strlen(buf)); + fclose(fp); +} + +ATF_TC_WITHOUT_HEAD(test_size_0); +ATF_TC_BODY(test_size_0, tc) +{ + /* + * POSIX mandates that we return EINVAL if size is 0. + */ + + FILE *fp; + + fp = fmemopen(NULL, 0, "r+"); + ATF_REQUIRE(fp == NULL); + ATF_REQUIRE(errno == EINVAL); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, test_autoalloc); + ATF_TP_ADD_TC(tp, test_preexisting); + ATF_TP_ADD_TC(tp, test_data_length); + ATF_TP_ADD_TC(tp, test_binary); + ATF_TP_ADD_TC(tp, test_append_binary_pos); + ATF_TP_ADD_TC(tp, test_size_0); + + return (atf_no_error()); +} Modified: stable/10/tools/regression/lib/libc/stdio/Makefile ============================================================================== --- stable/10/tools/regression/lib/libc/stdio/Makefile Tue Jan 20 21:58:49 2015 (r277445) +++ stable/10/tools/regression/lib/libc/stdio/Makefile Tue Jan 20 21:59:48 2015 (r277446) @@ -1,8 +1,16 @@ # $FreeBSD$ -TESTS= test-fmemopen test-getdelim test-mkostemp test-open_memstream \ - test-open_wmemstream test-perror test-print-positional test-printbasic \ - test-printfloat test-scanfloat +TESTS= test-fopen \ + test-getdelim \ + test-mkostemp \ + test-open_memstream \ + test-open_wmemstream \ + test-perror \ + test-print-positional \ + test-printbasic \ + test-printfloat \ + test-scanfloat + CFLAGS+= -lm .PHONY: tests From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:27:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8891022A; Tue, 20 Jan 2015 22:27:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 73E0F6EA; Tue, 20 Jan 2015 22:27:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KMRkYp071459; Tue, 20 Jan 2015 22:27:46 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KMRkt5071458; Tue, 20 Jan 2015 22:27:46 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501202227.t0KMRkt5071458@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Tue, 20 Jan 2015 22:27:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277448 - head/sys/cddl/compat/opensolaris/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:27:46 -0000 Author: will Date: Tue Jan 20 22:27:45 2015 New Revision: 277448 URL: https://svnweb.freebsd.org/changeset/base/277448 Log: Remove unused strdup() #define. Modified: head/sys/cddl/compat/opensolaris/sys/sunddi.h Modified: head/sys/cddl/compat/opensolaris/sys/sunddi.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/sunddi.h Tue Jan 20 22:15:36 2015 (r277447) +++ head/sys/cddl/compat/opensolaris/sys/sunddi.h Tue Jan 20 22:27:45 2015 (r277448) @@ -35,7 +35,6 @@ #include #include -#define strdup(ptr) strdup((ptr), M_SOLARIS) #define ddi_driver_major(zfs_dip) (0) #define ddi_copyin(from, to, size, flag) \ (copyin((from), (to), (size)), 0) From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:29:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB8E4382; Tue, 20 Jan 2015 22:29:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C722A758; Tue, 20 Jan 2015 22:29:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KMTRfe071740; Tue, 20 Jan 2015 22:29:27 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KMTReZ071739; Tue, 20 Jan 2015 22:29:27 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501202229.t0KMTReZ071739@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Tue, 20 Jan 2015 22:29:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277449 - head/sys/cddl/compat/opensolaris/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:29:28 -0000 Author: will Date: Tue Jan 20 22:29:27 2015 New Revision: 277449 URL: https://svnweb.freebsd.org/changeset/base/277449 Log: NSEC_TO_TICK(usec) -> NSEC_TO_TICK(nsec) Modified: head/sys/cddl/compat/opensolaris/sys/time.h Modified: head/sys/cddl/compat/opensolaris/sys/time.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/time.h Tue Jan 20 22:27:45 2015 (r277448) +++ head/sys/cddl/compat/opensolaris/sys/time.h Tue Jan 20 22:29:27 2015 (r277449) @@ -51,7 +51,7 @@ typedef longlong_t hrtime_t; #endif #define SEC_TO_TICK(sec) ((sec) * hz) -#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz)) +#define NSEC_TO_TICK(nsec) ((nsec) / (NANOSEC / hz)) #ifdef _KERNEL static __inline hrtime_t From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:29:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6D4184C3; Tue, 20 Jan 2015 22:29:39 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1A6DB75D; Tue, 20 Jan 2015 22:29:38 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 25EAB1FE023; Tue, 20 Jan 2015 23:29:30 +0100 (CET) Message-ID: <54BED6FB.8060401@selasky.org> Date: Tue, 20 Jan 2015 23:30:19 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> In-Reply-To: <20150120211137.GY15484@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Jason Wolfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:29:39 -0000 On 01/20/15 22:11, Gleb Smirnoff wrote: > On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin Belousov wrote: > K> > Like stated in the manual page, callout_reset_curcpu/on() does not work > K> > with MPSAFE callouts any more! > K> I.e. you 'fixed' some undeterminate bugs in callout migration by not > K> doing migration at all anymore. > K> > K> > > K> > You need to use callout_init_{mtx,rm,rw} and remove the custom locking > K> > inside the callback in the TCP stack to get it working like before! > K> > K> No, you need to do this, if you think that whole callout KPI must be > K> rototiled. It is up to the person who modifies the KPI, to ensure that > K> existing code is not broken. > K> > K> As I understand, currently we are back to the one-cpu callouts. > K> Do other people consider this situation acceptable ? > > I think this isn't acceptable. The commit to a complex subsystem > lacked a review from persons involved in the system before. The > commit to subsystem broke consumers of the subsystem and this > was even done not accidentially, but due to Hans not caring about > it. > > As for me this is enough to request a backout, and let the change > back in only after proper review. > Hi Gleb, Backing out my callout API patch means we will for sure re-introduce an unknown callout spinlock hang, as noted to me by several people. What do you think about that? Maybe "Jason Wolfe" CC'ed can add to 10-stable w/o my patches: int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t precision, void (*ftn)(void *), void *arg, int cpu, int flags) { sbintime_t to_sbt, pr; struct callout_cpu *cc; int cancelled, direct; + cpu = timeout_cpu; /* XXX test code XXX */ cancelled = 0; And see if he observes a callout spinlock hang or not on his test setup. The patch above should force all callouts to the same thread basically. Then we could maybe see if single threading the callouts has anything to do with solving the spinlock hang. The "rewritten" callout API still has all the features and capabilities the old one had, when used as described in "man 9 callout". At the present moment I'm not technically convinced a backout is correct. Gleb: I think we would see far better results with high speed internet links using TCP if we could extend the LRO (large receive offload) code to accumulate more than 64KBytes worth of data per call to the TCP stack instead of complaining about some callouts ending up on the same thread! Actually I have a patch for that. --HPS From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:31:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7059652; Tue, 20 Jan 2015 22:31:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B23CC805; Tue, 20 Jan 2015 22:31:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KMVRXe075053; Tue, 20 Jan 2015 22:31:27 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KMVRUg075052; Tue, 20 Jan 2015 22:31:27 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501202231.t0KMVRUg075052@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Tue, 20 Jan 2015 22:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277450 - head/sys/cddl/contrib/opensolaris/uts/common/fs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:31:27 -0000 Author: will Date: Tue Jan 20 22:31:26 2015 New Revision: 277450 URL: https://svnweb.freebsd.org/changeset/base/277450 Log: Use the "zfs_gfs" tag for GFS vnodes to make them easier to identify. MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Tue Jan 20 22:29:27 2015 (r277449) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/gfs.c Tue Jan 20 22:31:26 2015 (r277450) @@ -489,7 +489,7 @@ gfs_file_create(size_t size, vnode_t *pv * Allocate vnode and internal data structure */ fp = kmem_zalloc(size, KM_SLEEP); - error = getnewvnode("zfs", vfsp, ops, &vp); + error = getnewvnode("zfs_gfs", vfsp, ops, &vp); ASSERT(error == 0); vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); vp->v_data = (caddr_t)fp; From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:39:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EEB52C06; Tue, 20 Jan 2015 22:39:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DA98D858; Tue, 20 Jan 2015 22:39:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KMdALg077110; Tue, 20 Jan 2015 22:39:10 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KMdAmT077109; Tue, 20 Jan 2015 22:39:10 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501202239.t0KMdAmT077109@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Tue, 20 Jan 2015 22:39:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277452 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:39:11 -0000 Author: will Date: Tue Jan 20 22:39:10 2015 New Revision: 277452 URL: https://svnweb.freebsd.org/changeset/base/277452 Log: Fix arc__shrink DTrace probe's to_free argument. Remove the unnecessary #ifdef _KERNEL, which did not differ in the true or false cases. Actually set the value of to_free before using it. MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 20 22:33:27 2015 (r277451) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Tue Jan 20 22:39:10 2015 (r277452) @@ -2540,13 +2540,9 @@ arc_shrink(void) if (arc_c > arc_c_min) { uint64_t to_free; + to_free = arc_c >> arc_shrink_shift; DTRACE_PROBE4(arc__shrink, uint64_t, arc_c, uint64_t, arc_c_min, uint64_t, arc_p, uint64_t, to_free); -#ifdef _KERNEL - to_free = arc_c >> arc_shrink_shift; -#else - to_free = arc_c >> arc_shrink_shift; -#endif if (arc_c > arc_c_min + to_free) atomic_add_64(&arc_c, -to_free); else From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:43:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E889DAD; Tue, 20 Jan 2015 22:43:27 +0000 (UTC) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BFC3B918; Tue, 20 Jan 2015 22:43:26 +0000 (UTC) Received: by mail-yk0-f173.google.com with SMTP id 142so2899349ykq.4; Tue, 20 Jan 2015 14:43:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=w1mGmvnti1vdI4eGWpqluVvcfh+oid55ZzhC/D8s3yM=; b=AIciQCv2rjFhO8Xs0lOwSuOz7TBOyB0JNQ2zLv590yp+0pfQyb/1TBSmWtESs4x1B8 XuN9+mmYc1pRbY/nAfovGbA8Qp7aP+5kFxUWxm/HDM2vWUdhZZ0dxESqLNyYhf4xKt/t fO5IOB55ZmcuZKoh+LZR9YaUp9SRjFYaa2iWjx68jSWsMcwb3HKp5OVZDmnTYmsVMcNe RYi6clQ0fCI9k0qL9perLruC/OTo5Pswl3K+x8nwUPKeD08nkBrVLNeWUPRcFlMghLIA a24W6/izD2gwoACEr/E138fLCXWVm1EOx5o3STpgChyqq7IYsCyUck/2h+ymy04xHykp 0tsg== MIME-Version: 1.0 X-Received: by 10.236.40.116 with SMTP id e80mr21942262yhb.186.1421793805896; Tue, 20 Jan 2015 14:43:25 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Tue, 20 Jan 2015 14:43:25 -0800 (PST) In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Date: Tue, 20 Jan 2015 14:43:25 -0800 X-Google-Sender-Auth: nK1zISttqpPlp6lZRXNBMFraSnk Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:43:27 -0000 Please back this out now. It was a substantial interface change without review. This should not be up for debate. I hope the others have the fortitude to insist upon this. -K On Thu, Jan 15, 2015 at 7:32 AM, Hans Petter Selasky wrote: > Author: hselasky > Date: Thu Jan 15 15:32:30 2015 > New Revision: 277213 > URL: https://svnweb.freebsd.org/changeset/base/277213 > > Log: > Major callout subsystem cleanup and rewrite: > - Close a migration race where callout_reset() failed to set the > CALLOUT_ACTIVE flag. > - Callout callback functions are now allowed to be protected by > spinlocks. > - Switching the callout CPU number cannot always be done on a > per-callout basis. See the updated timeout(9) manual page for more > information. > - The timeout(9) manual page has been updated to reflect how all the > functions inside the callout API are working. The manual page has > been made function oriented to make it easier to deduce how each of > the functions making up the callout API are working without having > to first read the whole manual page. Group all functions into a > handful of sections which should give a quick top-level overview > when the different functions should be used. > - The CALLOUT_SHAREDLOCK flag and its functionality has been removed > to reduce the complexity in the callout code and to avoid problems > about atomically stopping callouts via callout_stop(). If someone > needs it, it can be re-added. From my quick grep there are no > CALLOUT_SHAREDLOCK clients in the kernel. > - A new callout API function named "callout_drain_async()" has been > added. See the updated timeout(9) manual page for a complete > description. > - Update the callout clients in the "kern/" folder to use the callout > API properly, like cv_timedwait(). Previously there was some custom > sleepqueue code in the callout subsystem, which has been removed, > because we now allow callouts to be protected by spinlocks. This > allows us to tear down the callout like done with regular mutexes, > and a "td_slpmutex" has been added to "struct thread" to atomically > teardown the "td_slpcallout". Further the "TDF_TIMOFAIL" and > "SWT_SLEEPQTIMO" states can now be completely removed. Currently > they are marked as available and will be cleaned up in a follow up > commit. > - Bump the __FreeBSD_version to indicate kernel modules need > recompilation. > - There has been several reports that this patch "seems to squash a > serious bug leading to a callout timeout and panic". > > Kernel build testing: all architectures were built > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D1438 > Sponsored by: Mellanox Technologies > Reviewed by: jhb, adrian, sbruno and emaste > > Modified: > head/share/man/man9/Makefile > head/share/man/man9/timeout.9 > head/sys/kern/init_main.c > head/sys/kern/kern_condvar.c > head/sys/kern/kern_lock.c > head/sys/kern/kern_switch.c > head/sys/kern/kern_synch.c > head/sys/kern/kern_thread.c > head/sys/kern/kern_timeout.c > head/sys/kern/subr_sleepqueue.c > head/sys/ofed/include/linux/completion.h > head/sys/sys/_callout.h > head/sys/sys/callout.h > head/sys/sys/param.h > head/sys/sys/proc.h > > Modified: head/share/man/man9/Makefile > ============================================================================== > --- head/share/man/man9/Makefile Thu Jan 15 14:47:48 2015 (r277212) > +++ head/share/man/man9/Makefile Thu Jan 15 15:32:30 2015 (r277213) > @@ -1570,6 +1570,7 @@ MLINKS+=timeout.9 callout.9 \ > timeout.9 callout_active.9 \ > timeout.9 callout_deactivate.9 \ > timeout.9 callout_drain.9 \ > + timeout.9 callout_drain_async.9 \ > timeout.9 callout_handle_init.9 \ > timeout.9 callout_init.9 \ > timeout.9 callout_init_mtx.9 \ > > Modified: head/share/man/man9/timeout.9 > ============================================================================== > --- head/share/man/man9/timeout.9 Thu Jan 15 14:47:48 2015 (r277212) > +++ head/share/man/man9/timeout.9 Thu Jan 15 15:32:30 2015 (r277213) > @@ -29,13 +29,14 @@ > .\" > .\" $FreeBSD$ > .\" > -.Dd October 8, 2014 > +.Dd January 14, 2015 > .Dt TIMEOUT 9 > .Os > .Sh NAME > .Nm callout_active , > .Nm callout_deactivate , > .Nm callout_drain , > +.Nm callout_drain_async , > .Nm callout_handle_init , > .Nm callout_init , > .Nm callout_init_mtx , > @@ -63,279 +64,232 @@ > .In sys/systm.h > .Bd -literal > typedef void timeout_t (void *); > +typedef void callout_func_t (void *); > .Ed > -.Ft int > -.Fn callout_active "struct callout *c" > -.Ft void > -.Fn callout_deactivate "struct callout *c" > -.Ft int > -.Fn callout_drain "struct callout *c" > -.Ft void > -.Fn callout_handle_init "struct callout_handle *handle" > -.Bd -literal > -struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); > -.Ed > -.Ft void > -.Fn callout_init "struct callout *c" "int mpsafe" > -.Ft void > -.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" > -.Ft void > -.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" > -.Ft void > -.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" > -.Ft int > -.Fn callout_pending "struct callout *c" > -.Ft int > -.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" > -.Ft int > -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ > -"void *arg" > -.Ft int > -.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ > -"void *arg" "int cpu" > -.Ft int > -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" > -.Ft int > -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" > -.Ft int > -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" > -.Ft int > -.Fn callout_schedule "struct callout *c" "int ticks" > -.Ft int > -.Fn callout_schedule_curcpu "struct callout *c" "int ticks" > -.Ft int > -.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" > -.Ft int > -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "int flags" > -.Ft int > -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "int flags" > -.Ft int > -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ > -"sbintime_t pr" "int cpu" "int flags" > -.Ft int > -.Fn callout_stop "struct callout *c" > -.Ft struct callout_handle > -.Fn timeout "timeout_t *func" "void *arg" "int ticks" > -.Ft void > -.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" > .Sh DESCRIPTION > The > .Nm callout > API is used to schedule a call to an arbitrary function at a specific > -time in the future. > -Consumers of this API are required to allocate a callout structure > +time in the future in a single-shot fashion. > +Consumers of this API are required to allocate a > .Pq struct callout > -for each pending function invocation. > -This structure stores state about the pending function invocation including > -the function to be called and the time at which the function should be invoked. > -Pending function calls can be cancelled or rescheduled to a different time. > -In addition, > -a callout structure may be reused to schedule a new function call after a > -scheduled call is completed. > -.Pp > -Callouts only provide a single-shot mode. > -If a consumer requires a periodic timer, > -it must explicitly reschedule each function call. > -This is normally done by rescheduling the subsequent call within the called > -function. > +structure for each pending function invocation. > +The > +.Pq struct callout > +structure stores the full state about any pending function call and > +should be drained by a call to > +.Fn callout_drain > +or > +.Fn callout_drain_async > +before freeing. > +.Sh INITIALISATION > +.Ft void > +.Fn callout_handle_init "struct callout_handle *handle" > +This function is deprecated and is used to prepare a > +.Pq struct callout_handle > +structure before it can be used the first time. > +If this function is called on a pending timeout, the pending timeout > +cannot be cancelled and the > +.Fn untimeout > +function will return as if there was no timeout pending. > .Pp > -Callout functions must not sleep. > -They may not acquire sleepable locks, > -wait on condition variables, > -perform blocking allocation requests, > -or invoke any other action that might sleep. > +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" > +This macro is deprecated and can be used instead of > +.Fn callout_handle_init > +to assign the default state to the > +.Pq struct callout_handle > +structure when declaring static timeouts. > .Pp > -Each callout structure must be initialized by > -.Fn callout_init , > -.Fn callout_init_mtx , > -.Fn callout_init_rm , > -or > -.Fn callout_init_rw > -before it is passed to any of the other callout functions. > -The > -.Fn callout_init > -function initializes a callout structure in > -.Fa c > -that is not associated with a specific lock. > +.Ft void > +.Fn callout_init "struct callout *c" "int mpsafe" > +This function prepares a > +.Pq struct callout > +structure before it can be used. > +This function should not be used when the callout is pending a timeout. > If the > .Fa mpsafe > -argument is zero, > -the callout structure is not considered to be > -.Dq multi-processor safe ; > -and the Giant lock will be acquired before calling the callout function > -and released when the callout function returns. > +argument is non-zero, the callback function will be running unlocked. > +Else the Giant mutex will be locked before calling the callback function. > .Pp > +.Ft void > +.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" > +This function prepares a > +.Pq struct callout > +structure before it can be used. > +This function should not be used when the callout is pending a timeout. > The > -.Fn callout_init_mtx , > -.Fn callout_init_rm , > -and > -.Fn callout_init_rw > -functions initialize a callout structure in > -.Fa c > -that is associated with a specific lock. > -The lock is specified by the > -.Fa mtx , > -.Fa rm , > -or > -.Fa rw > -parameter. > -The associated lock must be held while stopping or rescheduling the > -callout. > -The callout subsystem acquires the associated lock before calling the > -callout function and releases it after the function returns. > -If the callout was cancelled while the callout subsystem waited for the > -associated lock, > -the callout function is not called, > -and the associated lock is released. > -This ensures that stopping or rescheduling the callout will abort any > -previously scheduled invocation. > -.Pp > -Only regular mutexes may be used with > -.Fn callout_init_mtx ; > -spin mutexes are not supported. > -A sleepable read-mostly lock > -.Po > -one initialized with the > -.Dv RM_SLEEPABLE > -flag > -.Pc > -may not be used with > -.Fn callout_init_rm . > -Similarly, other sleepable lock types such as > -.Xr sx 9 > -and > -.Xr lockmgr 9 > -cannot be used with callouts because sleeping is not permitted in > -the callout subsystem. > -.Pp > -These > +.Fa mtx > +argument should be non-zero and should specify a pointer to a valid > +spinlock type of mutex or a valid regular non-sleepable mutex which > +the callback subsystem should lock before calling the callback > +function. > +Valid > .Fa flags > -may be specified for > -.Fn callout_init_mtx , > -.Fn callout_init_rm , > -or > -.Fn callout_init_rw : > +are: > .Bl -tag -width ".Dv CALLOUT_RETURNUNLOCKED" > .It Dv CALLOUT_RETURNUNLOCKED > -The callout function will release the associated lock itself, > -so the callout subsystem should not attempt to unlock it > -after the callout function returns. > -.It Dv CALLOUT_SHAREDLOCK > -The lock is only acquired in read mode when running the callout handler. > -This flag is ignored by > -.Fn callout_init_mtx . > +It is assumed that the callout function has released the specified > +mutex before returning. > +Else the callout subsystem will release the specified mutex after the > +callout function has returned. > .El > .Pp > -The function > -.Fn callout_stop > -cancels a callout > -.Fa c > -if it is currently pending. > -If the callout is pending, then > -.Fn callout_stop > -returns a non-zero value. > -If the callout is not set, > -has already been serviced, > -or is currently being serviced, > -then zero will be returned. > -If the callout has an associated lock, > -then that lock must be held when this function is called. > -.Pp > -The function > -.Fn callout_drain > -is identical to > -.Fn callout_stop > -except that it will wait for the callout > -.Fa c > -to complete if it is already in progress. > -This function MUST NOT be called while holding any > -locks on which the callout might block, or deadlock will result. > -Note that if the callout subsystem has already begun processing this > -callout, then the callout function may be invoked before > -.Fn callout_drain > -returns. > -However, the callout subsystem does guarantee that the callout will be > -fully stopped before > -.Fn callout_drain > -returns. > -.Pp > -The > -.Fn callout_reset > -and > -.Fn callout_schedule > -function families schedule a future function invocation for callout > -.Fa c . > -If > -.Fa c > -already has a pending callout, > -it is cancelled before the new invocation is scheduled. > -These functions return a non-zero value if a pending callout was cancelled > -and zero if there was no pending callout. > -If the callout has an associated lock, > -then that lock must be held when any of these functions are called. > +.Ft void > +.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" > +This function is the same like the > +.Fn callout_init_mtx > +function except it accepts a read-mostly type of lock. > +The read-mostly lock must not be initialised with the > +.Dv RM_SLEEPABLE > +flag. > .Pp > -The time at which the callout function will be invoked is determined by > -either the > -.Fa ticks > -argument or the > -.Fa sbt , > -.Fa pr , > -and > -.Fa flags > -arguments. > -When > -.Fa ticks > -is used, > -the callout is scheduled to execute after > +.Ft void > +.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" > +This function is the same like the > +.Fn callout_init_mtx > +function except it accepts a reader-writer type of lock. > +.Sh SCHEDULING CALLOUTS > +.Ft struct callout_handle > +.Fn timeout "timeout_t *func" "void *arg" "int ticks" > +This function is deprecated and schedules a call to the function given by the argument > +.Fa func > +to take place after > .Fa ticks Ns No /hz > seconds. > Non-positive values of > .Fa ticks > are silently converted to the value > .Sq 1 . > -.Pp > The > -.Fa sbt , > -.Fa pr , > -and > -.Fa flags > -arguments provide more control over the scheduled time including > -support for higher resolution times, > -specifying the precision of the scheduled time, > -and setting an absolute deadline instead of a relative timeout. > -The callout is scheduled to execute in a time window which begins at > -the time specified in > +.Fa func > +argument should be a valid pointer to a function that takes a single > +.Fa void * > +argument. > +Upon invocation, the > +.Fa func > +function will receive > +.Fa arg > +as its only argument. > +The Giant lock is locked when the > +.Fa arg > +function is invoked and should not be unlocked by this function. > +The returned value from > +.Fn timeout > +is a > +.Ft struct callout_handle > +structure which can be used in conjunction with the > +.Fn untimeout > +function to request that a scheduled timeout be cancelled. > +As handles are recycled by the system, it is possible, although unlikely, > +that a handle from one invocation of > +.Fn timeout > +may match the handle of another invocation of > +.Fn timeout > +if both calls used the same function pointer and argument, and the first > +timeout is expired or canceled before the second call. > +Please ensure that the function and argument pointers are unique when using this function. > +.Pp > +.Ft int > +.Fn callout_reset "struct callout *c" "int ticks" "callout_func_t *func" "void *arg" > +This function is used to schedule or re-schedule a callout. > +This function at first stops the callout given by the > +.Fa c > +argument, if any. > +Then it will start the callout given by the > +.Fa c > +argument. > +The relative time until the timeout callback happens is given by the > +.Fa ticks > +argument. > +The number of ticks in a second is defined by > +.Dv hz > +and can vary from system to system. > +This function returns a non-zero value if the given callout was pending and > +the callback function was prevented from being called. > +Else a value of zero is returned. > +If a lock is associated with the callout given by the > +.Fa c > +argument and it is exclusivly locked when this function is called this > +function will always ensure that previous callback function, if any, > +is never reached. > +In other words the callout will be atomically restarted. > +Else there is no such guarantee. > +The callback function is given by the > +.Fa func > +argument and its function argument is given by the > +.Fa arg > +argument. > +.Pp > +.Ft int > +.Fn callout_reset_curcpu "struct callout *c" "int ticks" "callout_func_t *func" \ > +"void *arg" > +This function works the same like the > +.Fn callout_reset > +function except the callback function given by the > +.Fa func > +argument will be executed on the same CPU which called this function. > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > +.Fa func > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_reset_on "struct callout *c" "int ticks" "callout_func_t *func" \ > +"void *arg" "int cpu" > +This function works the same like the > +.Fn callout_reset > +function except the callback function given by the > +.Fa func > +argument will be executed on the CPU given by the > +.Fa cpu > +argument. > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > +.Fa func > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" > +This function works the same like the > +.Fn callout_reset > +function except the relative or absolute time after which the timeout > +callback should happen is given by the > .Fa sbt > -and extends for the amount of time specified in > -.Fa pr . > -If > +argument and extends for the amount of time specified in the > +.Fa pr > +argument. > +This function is used when you need high precision timeouts. > +If the > .Fa sbt > -specifies a time in the past, > +argument specifies a time in the past, > the window is adjusted to start at the current time. > A non-zero value for > .Fa pr > allows the callout subsystem to coalesce callouts scheduled close to each > other into fewer timer interrupts, > reducing processing overhead and power consumption. > -These > +The > .Fa flags > -may be specified to adjust the interpretation of > +argument may be non-zero to adjust the interpretation of the > .Fa sbt > -and > -.Fa pr : > +and the > +.Fa pr > +arguments: > .Bl -tag -width ".Dv C_DIRECT_EXEC" > .It Dv C_ABSOLUTE > Handle the > .Fa sbt > argument as an absolute time since boot. > -By default, > +By default, the > .Fa sbt > -is treated as a relative amount of time, > +argument is treated like a relative amount of time, > similar to > .Fa ticks . > .It Dv C_DIRECT_EXEC > @@ -347,7 +301,7 @@ Callout functions run in this context ma > and should be as small as possible because they run with absolute priority. > .It Fn C_PREL > Specifies relative event time precision as binary logarithm of time interval > -divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. > +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4 and so on. > Note that the larger of > .Fa pr > or this value is used as the length of the time window. > @@ -360,65 +314,215 @@ Align the timeouts to > calls if possible. > .El > .Pp > -The > -.Fn callout_reset > -functions accept a > +.Ft int > +.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt > +function except the callback function given by the > .Fa func > -argument which identifies the function to be called when the time expires. > -It must be a pointer to a function that takes a single > -.Fa void * > +argument will be executed on the same CPU which called this function. > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > +.Fa func > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "callout_func_t *func" "void *arg" "int cpu" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt > +function except the callback function given by the > +.Fa func > +argument will be executed on the CPU given by the > +.Fa cpu > argument. > -Upon invocation, > +A change in the CPU selection can happen if the callout has a lock > +associated with it and is locked when this function is called. > +A change in the CPU selection cannot happen if this function is > +re-scheduled inside a callout function. > +Else the callback function given by the > .Fa func > -will receive > -.Fa arg > -as its only argument. > -The > -.Fn callout_schedule > -functions reuse the > +argument will be executed on the same CPU like previously done. > +.Pp > +.Ft int > +.Fn callout_schedule "struct callout *c" "int ticks" > +This function works the same like the > +.Fn callout_reset > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_curcpu "struct callout *c" "int ticks" > +This function works the same like the > +.Fn callout_reset_curcpu > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" > +This function works the same like the > +.Fn callout_reset_on > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt_curcpu > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Pp > +.Ft int > +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ > +"sbintime_t pr" "int cpu" "int flags" > +This function works the same like the > +.Fn callout_reset_sbt_on > +function except it re-uses the callback function and the callback argument > +already stored in the > +.Pq struct callout > +structure. > +.Sh CHECKING THE STATE OF CALLOUTS > +.Ft int > +.Fn callout_pending "struct callout *c" > +This function returns non-zero if the callout pointed to by the > +.Fa c > +argument is pending for callback. > +Else this function returns zero. > +This function returns zero when inside the callout function if the > +callout is not re-scheduled. > +.Pp > +.Ft int > +.Fn callout_active "struct callout *c" > +This function is deprecated and returns non-zero if the callout > +pointed to by the > +.Fa c > +argument was scheduled in the past. > +Else this function returns zero. > +This function also returns zero after the > +.Fn callout_deactivate > +or the > +.Fn callout_stop > +or the > +.Fn callout_drain > +or the > +.Fn callout_drain_async > +function is called on the same callout as given by the > +.Fa c > +argument. > +.Pp > +.Ft void > +.Fn callout_deactivate "struct callout *c" > +This function is deprecated and ensures that subsequent calls to the > +.Fn callout_activate > +function returns zero until the callout is scheduled again. > +.Sh STOPPING CALLOUTS > +.Ft void > +.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" > +This function is deprecated and cancels the timeout associated with the > +.Fa handle > +argument using the function pointed to by the > .Fa func > -and > +argument and having the > .Fa arg > -arguments from the previous callout. > -Note that one of the > -.Fn callout_reset > -functions must always be called to initialize > +arguments to validate the handle. > +If the handle does not correspond to a timeout with > +the function > .Fa func > -and > +taking the argument > .Fa arg > -before one of the > -.Fn callout_schedule > -functions can be used. > +no action is taken. The > +.Fa handle > +must be initialised by a previous call to > +.Fn timeout , > +.Fn callout_handle_init > +or assigned the value of > +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" > +before being passed to > +.Fn untimeout . > +The behavior of calling > +.Fn untimeout > +with an uninitialised handle > +is undefined. > .Pp > -The callout subsystem provides a softclock thread for each CPU in the system. > -Callouts are assigned to a single CPU and are executed by the softclock thread > -for that CPU. > -Initially, > -callouts are assigned to CPU 0. > -The > -.Fn callout_reset_on , > -.Fn callout_reset_sbt_on , > -.Fn callout_schedule_on > -and > -.Fn callout_schedule_sbt_on > -functions assign the callout to CPU > -.Fa cpu . > -The > -.Fn callout_reset_curcpu , > -.Fn callout_reset_sbt_curpu , > -.Fn callout_schedule_curcpu > -and > -.Fn callout_schedule_sbt_curcpu > -functions assign the callout to the current CPU. > -The > -.Fn callout_reset , > -.Fn callout_reset_sbt , > -.Fn callout_schedule > -and > -.Fn callout_schedule_sbt > -functions schedule the callout to execute in the softclock thread of the CPU > -to which it is currently assigned. > +.Ft int > +.Fn callout_stop "struct callout *c" > +This function is used to stop a timeout function invocation associated with the callout pointed to by the > +.Fa c > +argument, in a non-blocking fashion. > +This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialised. > +This function returns a non-zero value if the given callout was pending and > +the callback function was prevented from being called. > +Else a value of zero is returned. > +If a lock is associated with the callout given by the > +.Fa c > +argument and it is exclusivly locked when this function is called, the > +.Fn callout_stop > +function will always ensure that the callback function is never reached. > +In other words the callout will be atomically stopped. > +Else there is no such guarantee. > +.Sh DRAINING CALLOUTS > +.Ft int > +.Fn callout_drain "struct callout *c" > +This function works the same like the > +.Fn callout_stop > +function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the > +.Fa c > +argument inside the callout subsystem before it returns. > +Also this function ensures that the lock, if any, associated with the > +callout is no longer being used. > +When this function returns, it is safe to free the callout structure pointed to by the > +.Fa c > +argument. > .Pp > +.Ft int > +.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" > +This function is non-blocking and works the same like the > +.Fn callout_stop > +function except if it returns non-zero it means the callback function pointed to by the > +.Fa fn > +argument will be called back with the > +.Fa arg > +argument when all references to the callout pointed to by the > +.Fa c > +argument are gone. > +If this function returns zero, it is safe to free the callout structure pointed to by the > +.Fa c > +argument right away. > +.Sh CALLOUT FUNCTION RESTRICTIONS > +Callout functions must not sleep. > +They may not acquire sleepable locks, wait on condition variables, > +perform blocking allocation requests, or invoke any other action that > +might sleep. > +.Sh CALLOUT SUBSYSTEM INTERNALS > +The callout subsystem has its own set of spinlocks to protect its internal state. > +The callout subsystem provides a softclock thread for each CPU in the > +system. > +Callouts are assigned to a single CPU and are executed by the > +softclock thread for that CPU. > +Initially, callouts are assigned to CPU 0. > Softclock threads are not pinned to their respective CPUs by default. > The softclock thread for CPU 0 can be pinned to CPU 0 by setting the > .Va kern.pin_default_swi > @@ -427,50 +531,7 @@ Softclock threads for CPUs other than ze > respective CPUs by setting the > .Va kern.pin_pcpu_swi > loader tunable to a non-zero value. > -.Pp > -The macros > -.Fn callout_pending , > -.Fn callout_active > -and > -.Fn callout_deactivate > -provide access to the current state of the callout. > -The > -.Fn callout_pending > -macro checks whether a callout is > -.Em pending ; > -a callout is considered > -.Em pending > -when a timeout has been set but the time has not yet arrived. > -Note that once the timeout time arrives and the callout subsystem > -starts to process this callout, > -.Fn callout_pending > -will return > -.Dv FALSE > -even though the callout function may not have finished > -.Pq or even begun > -executing. > -The > -.Fn callout_active > -macro checks whether a callout is marked as > -.Em active , > -and the > -.Fn callout_deactivate > -macro clears the callout's > -.Em active > -flag. > -The callout subsystem marks a callout as > -.Em active > -when a timeout is set and it clears the > -.Em active > -flag in > -.Fn callout_stop > -and > -.Fn callout_drain , > -but it > -.Em does not > -clear it when a callout expires normally via the execution of the > -callout function. > -.Ss "Avoiding Race Conditions" > +.Sh "AVOIDING RACE CONDITIONS" > The callout subsystem invokes callout functions from its own thread > context. > Without some kind of synchronization, > @@ -487,7 +548,7 @@ synchronization concerns. > The first approach is preferred as it is the simplest: > .Bl -enum -offset indent > .It > -Callouts can be associated with a specific lock when they are initialized > +Callouts can be associated with a specific lock when they are initialised > by > .Fn callout_init_mtx , > .Fn callout_init_rm , > @@ -508,7 +569,7 @@ or > .Fn callout_schedule > functions to provide this safety. > .Pp > -A callout initialized via > +A callout initialised via > .Fn callout_init > with > .Fa mpsafe > @@ -531,9 +592,8 @@ function families > .Pc > indicates whether or not the callout was removed. > If it is known that the callout was set and the callout function has > -not yet executed, then a return value of > -.Dv FALSE > -indicates that the callout function is about to be called. > +not yet executed, then a return value of zero indicates that the > +callout function is about to be called. > For example: > .Bd -literal -offset indent > if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { > @@ -589,16 +649,14 @@ The callout function should first check > .Em pending > flag and return without action if > .Fn callout_pending > -returns > -.Dv TRUE . > +returns non-zero. > This indicates that the callout was rescheduled using > .Fn callout_reset > just before the callout function was invoked. > If > .Fn callout_active > -returns > -.Dv FALSE > -then the callout function should also return without action. > +returns zero then the callout function should also return without > +action. > This indicates that the callout has been stopped. > Finally, the callout function should call > .Fn callout_deactivate > @@ -668,129 +726,13 @@ a callout should always be drained prior > or releasing the storage for the callout structure. > .Sh LEGACY API > .Bf Sy > -The functions below are a legacy API that will be removed in a future release. > -New code should not use these routines. > -.Ef > -.Pp > -The function > -.Fn timeout > -schedules a call to the function given by the argument > -.Fa func > -to take place after > -.Fa ticks Ns No /hz > -seconds. > -Non-positive values of > -.Fa ticks > -are silently converted to the value > -.Sq 1 . > -.Fa func > -should be a pointer to a function that takes a > -.Fa void * > -argument. > -Upon invocation, > -.Fa func > -will receive > -.Fa arg > -as its only argument. > -The return value from > +The > .Fn timeout > -is a > -.Ft struct callout_handle > -which can be used in conjunction with the > -.Fn untimeout > -function to request that a scheduled timeout be canceled. > -.Pp > -The function > -.Fn callout_handle_init > -can be used to initialize a handle to a state which will cause > -any calls to > -.Fn untimeout > -with that handle to return with no side > -effects. > -.Pp > -Assigning a callout handle the value of > -.Fn CALLOUT_HANDLE_INITIALIZER > -performs the same function as > -.Fn callout_handle_init > -and is provided for use on statically declared or global callout handles. > -.Pp > -The function > -.Fn untimeout > -cancels the timeout associated with > -.Fa handle > -using the > -.Fa func > and > -.Fa arg > -arguments to validate the handle. > -If the handle does not correspond to a timeout with > -the function > -.Fa func > -taking the argument > -.Fa arg > -no action is taken. > -.Fa handle > -must be initialized by a previous call to > -.Fn timeout , > -.Fn callout_handle_init , > -or assigned the value of > -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" > -before being passed to > -.Fn untimeout . > -The behavior of calling > .Fn untimeout > -with an uninitialized handle > -is undefined. > -.Pp > -As handles are recycled by the system, it is possible (although unlikely) > -that a handle from one invocation of > -.Fn timeout > -may match the handle of another invocation of > -.Fn timeout > -if both calls used the same function pointer and argument, and the first > -timeout is expired or canceled before the second call. > -The timeout facility offers O(1) running time for > -.Fn timeout > -and > -.Fn untimeout . > -Timeouts are executed from > -.Fn softclock > -with the > -.Va Giant > -lock held. > -Thus they are protected from re-entrancy. > -.Sh RETURN VALUES > -The > -.Fn callout_active > -macro returns the state of a callout's > -.Em active > -flag. > -.Pp > -The > -.Fn callout_pending > -macro returns the state of a callout's > -.Em pending > -flag. > -.Pp > -The > -.Fn callout_reset > -and > -.Fn callout_schedule > -function families return non-zero if the callout was pending before the new > -function invocation was scheduled. > -.Pp > -The > -.Fn callout_stop > -and > -.Fn callout_drain > -functions return non-zero if the callout was still pending when it was > -called or zero otherwise. > -The > -.Fn timeout > -function returns a > -.Ft struct callout_handle > -that can be passed to > -.Fn untimeout . > +functions are a legacy API that will be removed in a future release. > +New code should not use these routines. > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:51:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7483226; Tue, 20 Jan 2015 22:51:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99557A15; Tue, 20 Jan 2015 22:51:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KMpUcU083559; Tue, 20 Jan 2015 22:51:30 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KMpU6T083558; Tue, 20 Jan 2015 22:51:30 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501202251.t0KMpU6T083558@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 20 Jan 2015 22:51:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277453 - head/tools/regression/lib/libc/stdio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:51:30 -0000 Author: ngie Date: Tue Jan 20 22:51:29 2015 New Revision: 277453 URL: https://svnweb.freebsd.org/changeset/base/277453 Log: Garbage collect a prove test wrapper MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Deleted: head/tools/regression/lib/libc/stdio/test-fmemopen.t Modified: Directory Properties: head/ (props changed) From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 22:57:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D14A261B; Tue, 20 Jan 2015 22:57:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B122DA61; Tue, 20 Jan 2015 22:57:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KMv0RS086897; Tue, 20 Jan 2015 22:57:00 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KMv0Bi086894; Tue, 20 Jan 2015 22:57:00 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501202257.t0KMv0Bi086894@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Tue, 20 Jan 2015 22:57:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277454 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 22:57:00 -0000 Author: ian Date: Tue Jan 20 22:56:59 2015 New Revision: 277454 URL: https://svnweb.freebsd.org/changeset/base/277454 Log: Add inline implementations of arm bus_space_read/write_N(). Reviewed by: cognet Modified: head/sys/arm/arm/bus_space-v6.c head/sys/arm/include/bus.h Modified: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Tue Jan 20 22:51:29 2015 (r277453) +++ head/sys/arm/arm/bus_space-v6.c Tue Jan 20 22:56:59 2015 (r277454) @@ -65,10 +65,10 @@ static struct bus_space _base_tag = { generic_bs_barrier, /* read (single) */ - generic_bs_r_1, - generic_armv4_bs_r_2, - generic_bs_r_4, - NULL, + NULL, /* bs_r_1, Use inline code in bus.h */ + NULL, /* bs_r_2, Use inline code in bus.h */ + NULL, /* bs_r_4, Use inline code in bus.h */ + NULL, /* bs_r_8, Use inline code in bus.h */ /* read multiple */ generic_bs_rm_1, @@ -83,10 +83,10 @@ static struct bus_space _base_tag = { NULL, /* write (single) */ - generic_bs_w_1, - generic_armv4_bs_w_2, - generic_bs_w_4, - NULL, + NULL, /* bs_w_1, Use inline code in bus.h */ + NULL, /* bs_w_2, Use inline code in bus.h */ + NULL, /* bs_w_4, Use inline code in bus.h */ + NULL, /* bs_w_8, Use inline code in bus.h */ /* write multiple */ generic_bs_wm_1, @@ -119,10 +119,10 @@ static struct bus_space _base_tag = { NULL, /* read stream (single) */ - NULL, - NULL, - NULL, - NULL, + NULL, /* bs_r_1_s, Use inline code in bus.h */ + NULL, /* bs_r_2_s, Use inline code in bus.h */ + NULL, /* bs_r_4_s, Use inline code in bus.h */ + NULL, /* bs_r_8_s, Use inline code in bus.h */ /* read multiple stream */ NULL, @@ -137,10 +137,10 @@ static struct bus_space _base_tag = { NULL, /* write stream (single) */ - NULL, - NULL, - NULL, - NULL, + NULL, /* bs_w_1_s, Use inline code in bus.h */ + NULL, /* bs_w_2_s, Use inline code in bus.h */ + NULL, /* bs_w_4_s, Use inline code in bus.h */ + NULL, /* bs_w_8_s, Use inline code in bus.h */ /* write multiple stream */ NULL, Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Tue Jan 20 22:51:29 2015 (r277453) +++ head/sys/arm/include/bus.h Tue Jan 20 22:56:59 2015 (r277454) @@ -252,10 +252,6 @@ struct bus_space { #define __bs_c(a,b) __CONCAT(a,b) #define __bs_opname(op,size) __bs_c(__bs_c(__bs_c(bs_,op),_),size) -#define __bs_rs(sz, t, h, o) \ - (*(t)->__bs_opname(r,sz))((t)->bs_cookie, h, o) -#define __bs_ws(sz, t, h, o, v) \ - (*(t)->__bs_opname(w,sz))((t)->bs_cookie, h, o, v) #define __bs_nonsingle(type, sz, t, h, o, a, c) \ (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, a, c) #define __bs_set(type, sz, t, h, o, v, c) \ @@ -272,6 +268,28 @@ struct bus_space { (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) +#define __generate_inline_bs_rs(IFN, MBR, TYP) \ + static inline TYP \ + IFN(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o) \ + { \ + \ + if (__predict_true(t->MBR == NULL)) \ + return (*(volatile TYP *)(h + o)); \ + else \ + return (t->MBR(t->bs_cookie, h, o)); \ + } + +#define __generate_inline_bs_ws(IFN, MBR, TYP) \ + static inline void \ + IFN(bus_space_tag_t t, bus_space_handle_t h, bus_size_t o, TYP v)\ + { \ + \ + if (__predict_true(t->MBR == NULL)) \ + *(volatile TYP *)(h + o) = v; \ + else \ + t->MBR(t->bs_cookie, h, o, v); \ + } + /* * Mapping and unmapping operations. */ @@ -304,15 +322,15 @@ struct bus_space { /* * Bus read (single) operations. */ -#define bus_space_read_1(t, h, o) __bs_rs(1,(t),(h),(o)) -#define bus_space_read_2(t, h, o) __bs_rs(2,(t),(h),(o)) -#define bus_space_read_4(t, h, o) __bs_rs(4,(t),(h),(o)) -#define bus_space_read_8(t, h, o) __bs_rs(8,(t),(h),(o)) - -#define bus_space_read_stream_1(t, h, o) __bs_rs_s(1,(t), (h), (o)) -#define bus_space_read_stream_2(t, h, o) __bs_rs_s(2,(t), (h), (o)) -#define bus_space_read_stream_4(t, h, o) __bs_rs_s(4,(t), (h), (o)) -#define bus_space_read_stream_8(t, h, o) __bs_rs_s(8,8,(t),(h),(o)) +__generate_inline_bs_rs(bus_space_read_1, bs_r_1, uint8_t); +__generate_inline_bs_rs(bus_space_read_2, bs_r_2, uint16_t); +__generate_inline_bs_rs(bus_space_read_4, bs_r_4, uint32_t); +__generate_inline_bs_rs(bus_space_read_8, bs_r_8, uint64_t); + +__generate_inline_bs_rs(bus_space_read_stream_1, bs_r_1_s, uint8_t); +__generate_inline_bs_rs(bus_space_read_stream_2, bs_r_2_s, uint16_t); +__generate_inline_bs_rs(bus_space_read_stream_4, bs_r_4_s, uint32_t); +__generate_inline_bs_rs(bus_space_read_stream_8, bs_r_8_s, uint64_t); /* * Bus read multiple operations. @@ -361,15 +379,15 @@ struct bus_space { /* * Bus write (single) operations. */ -#define bus_space_write_1(t, h, o, v) __bs_ws(1,(t),(h),(o),(v)) -#define bus_space_write_2(t, h, o, v) __bs_ws(2,(t),(h),(o),(v)) -#define bus_space_write_4(t, h, o, v) __bs_ws(4,(t),(h),(o),(v)) -#define bus_space_write_8(t, h, o, v) __bs_ws(8,(t),(h),(o),(v)) - -#define bus_space_write_stream_1(t, h, o, v) __bs_ws_s(1,(t),(h),(o),(v)) -#define bus_space_write_stream_2(t, h, o, v) __bs_ws_s(2,(t),(h),(o),(v)) -#define bus_space_write_stream_4(t, h, o, v) __bs_ws_s(4,(t),(h),(o),(v)) -#define bus_space_write_stream_8(t, h, o, v) __bs_ws_s(8,(t),(h),(o),(v)) +__generate_inline_bs_ws(bus_space_write_1, bs_w_1, uint8_t); +__generate_inline_bs_ws(bus_space_write_2, bs_w_2, uint16_t); +__generate_inline_bs_ws(bus_space_write_4, bs_w_4, uint32_t); +__generate_inline_bs_ws(bus_space_write_8, bs_w_8, uint64_t); + +__generate_inline_bs_ws(bus_space_write_stream_1, bs_w_1_s, uint8_t); +__generate_inline_bs_ws(bus_space_write_stream_2, bs_w_2_s, uint16_t); +__generate_inline_bs_ws(bus_space_write_stream_4, bs_w_4_s, uint32_t); +__generate_inline_bs_ws(bus_space_write_stream_8, bs_w_8_s, uint64_t); /* From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:17:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5243332B for ; Tue, 20 Jan 2015 23:17:32 +0000 (UTC) Received: from nm37-vm6.bullet.mail.bf1.yahoo.com (nm37-vm6.bullet.mail.bf1.yahoo.com [72.30.238.206]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC5C7C77 for ; Tue, 20 Jan 2015 23:17:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421795448; bh=mU5lQbB3mOBJastnhmWRgVchHJ3+P1uqHUvz12jFf6s=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=rAyUyr2gfSz6cbHBgjRbrErXz3KF7Caj7RqIdpuxJoSgOmaZqHyrTn7Jf0ndSygXpJSEc+0m3KvaSfYcDoy/v3ICk8sn9rLkt/EkEAyx957uAAtLSSjte3CKoe8UG1ymApCVtrxQ1/tKpPkK9E0vyMahdflDzu7rdtLj2z6IpRL4NBXvEHOaOo+NihY5zfjlLFKmd+Aejw0m1WzD+q2TdXdmg5k7s7FgwB6lVYkyy2oBjD2rqd8wHTAvnJDaSmuVMw0KDlJYQdvjskT7ML70DnbnHz6Ur1fRlOBIGtzAt13xH3Ktlu0fYax97vaJen0gHpVxvPFMrSpA35KPaSDm7Q== Received: from [98.139.215.142] by nm37.bullet.mail.bf1.yahoo.com with NNFMP; 20 Jan 2015 23:10:48 -0000 Received: from [98.139.211.206] by tm13.bullet.mail.bf1.yahoo.com with NNFMP; 20 Jan 2015 23:10:48 -0000 Received: from [127.0.0.1] by smtp215.mail.bf1.yahoo.com with NNFMP; 20 Jan 2015 23:10:48 -0000 X-Yahoo-Newman-Id: 568883.3178.bm@smtp215.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: H8MP0D4VM1mqJSyFt3xNmTh2whd.nn1BM6W_4Gq8ZQ0CysM yA.gbdmxv3ZuZ7sFiYz.8cFsQ.tBCLAv1g6gAVx4vyzF1TmpLCxTejtcISNi Jh7Yi7f87vypaNWwIuY.FNDMoCxM2Bx0HrRxbISXWQKStOShoulQij.DbN5L L_6.OKn2O1o5p9fT5MvA9mxzWJNouvoDJ0IoD.LOEg9_ec6.okVNFZKtL728 zHNacJ4FvjHokbzX.0nNi5ooynVYZMxxQ5YMh9nxuxsU7HSCeHpTPSnmUA0x JZbskxlpgovrYCLK_R43EkLhdidU71xpKRQvJNi7R1v6OX7SB.8s7cpu5Z.1 TGZhacsEvfmPGlB.DusCtEiTVVAWcRvpkTbPQZQqV9wt4zlBcr1yQB6CXElQ 6IIaZyy2VJf8QS3W_VgWIlEddDzdZnDw_A3ijgtoHuTEBXtSpd5wHbr23_zk 1Upw13j3G64ijhIkewbMWtvpywBKCwaiO369GJkx5p_nk3CU5jnSAZGLIuiz k3N_hoFhvphS9ec01O_6s8IHb.3ic4EoTuBPBxRf_FF4p9GC3yVibmS12yc4 s7Lo_pp4SidgQ3pt.8liJ3Prczn4s3EJHbYF3oQQSIHcZgisJEQDs76Bk.Wl gS_zk499WJQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54BEE07A.3070207@FreeBSD.org> Date: Tue, 20 Jan 2015 18:10:50 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> In-Reply-To: <20150106203344.GB26068@ox> Content-Type: multipart/mixed; boundary="------------050000020104050008050000" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:17:32 -0000 This is a multi-part message in MIME format. --------------050000020104050008050000 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Hi; I got this patch from the OpenBSD-tech list[1]. Perhaps this fixes the gcc issue? Apparently it's required for mesa too. Pedro. [1] http://article.gmane.org/gmane.os.openbsd.tech/40604 On 01/06/15 15:33, Navdeep Parhar wrote: > On Tue, Jan 06, 2015 at 07:58:34PM +0100, Luigi Rizzo wrote: >> >> On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar wrote: >> >> Author: np >> Date: Wed Dec 31 23:19:16 2014 >> New Revision: 276485 >> URL: https://svnweb.freebsd.org/changeset/base/276485 >> >> Log: >> cxgbe(4): major tx rework. >> >> >> FYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) >> which prevent the kernel from compiling with our stock gcc >> and its standard kernel build flags (specifically -std=...). >> >> Adding the following in the kernel config >> >> makeoptions COPTFLAGS="-fms-extensions" >> >> seems to do the job >> >> I know it is unavoidable that we'll end up with gcc not working, >> but maybe we can still avoid unnamed unions. > There are two unresolved issues with mp_ring and I had to make the > driver amd64-only while I consider my options. > > - platforms where gcc is the default (and our version has problems with > unnamed unions). This is simple to fix but reduces the readability of > the code. But sure, if building head with gcc is popular then that > trumps readability. I wonder if adding -fms-extensions just to the > driver's build flags would be an acceptable compromise. > - platforms without the acq/rel versions of 64b cmpset. I think it > would be simple to add acq/rel variants to i386/pc98 and others that > already have 64b cmpset. The driver will be permanently unplugged from > whatever remains (only 32 bit powerpc I think). > > I'll try to sort all this out within the next couple of weeks. > > Regards, > Navdeep > >> cheers >> luigi >> >> >> >> a) Front load as much work as possible in if_transmit, before any driver >> lock or software queue has to get involved. >> >> b) Replace buf_ring with a brand new mp_ring (multiproducer ring). This >> is specifically for the tx multiqueue model where one of the if_transmit >> producer threads becomes the consumer and other producers carry on as >> usual. mp_ring is implemented as standalone code and it should be >> possible to use it in any driver with tx multiqueue. It also has: >> - the ability to enqueue/dequeue multiple items. This might become >> significant if packet batching is ever implemented. >> - an abdication mechanism to allow a thread to give up writing tx >> descriptors and have another if_transmit thread take over. A thread >> that's writing tx descriptors can end up doing so for an unbounded >> time period if a) there are other if_transmit threads continuously >> feeding the sofware queue, and b) the chip keeps up with whatever the >> thread is throwing at it. >> - accurate statistics about interesting events even when the stats come >> at the expense of additional branches/conditional code. >> >> The NIC txq lock is uncontested on the fast path at this point. I've >> left it there for synchronization with the control events (interface >> up/down, modload/unload). >> >> c) Add support for "type 1" coalescing work request in the normal NIC tx >> path. This work request is optimized for frames with a single item in >> the DMA gather list. These are very common when forwarding packets. >> Note that netmap tx in cxgbe already uses these "type 1" work requests. >> >> d) Do not request automatic cidx updates every 32 descriptors. Instead, >> request updates via bits in individual work requests (still every 32 >> descriptors approximately). Also, request an automatic final update >> when the queue idles after activity. This means NIC tx reclaim is still >> performed lazily but it will catch up quickly as soon as the queue >> idles. This seems to be the best middle ground and I'll probably do >> something similar for netmap tx as well. >> >> e) Implement a faster tx path for WRQs (used by TOE tx and control >> queues, _not_ by the normal NIC tx). Allow work requests to be written >> directly to the hardware descriptor ring if room is available. I will >> convert t4_tom and iw_cxgbe modules to this faster style gradually. >> >> MFC after: 2 months >> >> Added: >> head/sys/dev/cxgbe/t4_mp_ring.c (contents, props changed) >> head/sys/dev/cxgbe/t4_mp_ring.h (contents, props changed) >> Modified: >> head/sys/conf/files >> head/sys/dev/cxgbe/adapter.h >> head/sys/dev/cxgbe/t4_l2t.c >> head/sys/dev/cxgbe/t4_main.c >> head/sys/dev/cxgbe/t4_sge.c >> head/sys/modules/cxgbe/if_cxgbe/Makefile >> >> Modified: head/sys/conf/files >> =========================================================================== >> === >> --- head/sys/conf/files Wed Dec 31 22:52:43 2014 (r276484) >> +++ head/sys/conf/files Wed Dec 31 23:19:16 2014 (r276485) >> @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p >> compile-with "${NORMAL_C} -I$S/dev/cxgb" >> dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ >> compile-with "${NORMAL_C} -I$S/dev/cxgb" >> +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ >> + compile-with "${NORMAL_C} -I$S/dev/cxgbe" >> dev/cxgbe/t4_main.c optional cxgbe pci \ >> compile-with "${NORMAL_C} -I$S/dev/cxgbe" >> dev/cxgbe/t4_netmap.c optional cxgbe pci \ >> >> Modified: head/sys/dev/cxgbe/adapter.h >> =========================================================================== >> === >> --- head/sys/dev/cxgbe/adapter.h Wed Dec 31 22:52:43 2014 >> (r276484) >> +++ head/sys/dev/cxgbe/adapter.h Wed Dec 31 23:19:16 2014 >> (r276485) >> @@ -152,7 +152,8 @@ enum { >> CL_METADATA_SIZE = CACHE_LINE_SIZE, >> >> SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR size in >> desc */ >> - TX_SGL_SEGS = 36, >> + TX_SGL_SEGS = 39, >> + TX_SGL_SEGS_TSO = 38, >> TX_WR_FLITS = SGE_MAX_WR_LEN / 8 >> }; >> >> @@ -273,6 +274,7 @@ struct port_info { >> struct timeval last_refreshed; >> struct port_stats stats; >> u_int tnl_cong_drops; >> + u_int tx_parse_error; >> >> eventhandler_tag vlan_c; >> >> @@ -308,23 +310,9 @@ struct tx_desc { >> __be64 flit[8]; >> }; >> >> -struct tx_map { >> - struct mbuf *m; >> - bus_dmamap_t map; >> -}; >> - >> -/* DMA maps used for tx */ >> -struct tx_maps { >> - struct tx_map *maps; >> - uint32_t map_total; /* # of DMA maps */ >> - uint32_t map_pidx; /* next map to be used */ >> - uint32_t map_cidx; /* reclaimed up to this index */ >> - uint32_t map_avail; /* # of available maps */ >> -}; >> - >> struct tx_sdesc { >> + struct mbuf *m; /* m_nextpkt linked chain of frames */ >> uint8_t desc_used; /* # of hardware descriptors used by the WR >> */ >> - uint8_t credits; /* NIC txq: # of frames sent out in the WR >> */ >> }; >> >> >> @@ -378,16 +366,12 @@ struct sge_iq { >> enum { >> EQ_CTRL = 1, >> EQ_ETH = 2, >> -#ifdef TCP_OFFLOAD >> EQ_OFLD = 3, >> -#endif >> >> /* eq flags */ >> - EQ_TYPEMASK = 7, /* 3 lsbits hold the type */ >> - EQ_ALLOCATED = (1 << 3), /* firmware resources allocated */ >> - EQ_DOOMED = (1 << 4), /* about to be destroyed */ >> - EQ_CRFLUSHED = (1 << 5), /* expecting an update from SGE */ >> - EQ_STALLED = (1 << 6), /* out of hw descriptors or dmamaps >> */ >> + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the type (see >> above) */ >> + EQ_ALLOCATED = (1 << 2), /* firmware resources allocated */ >> + EQ_ENABLED = (1 << 3), /* open for business */ >> }; >> >> /* Listed in order of preference. Update t4_sysctls too if you change >> these */ >> @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB >> struct sge_eq { >> unsigned int flags; /* MUST be first */ >> unsigned int cntxt_id; /* SGE context id for the eq */ >> - bus_dma_tag_t desc_tag; >> - bus_dmamap_t desc_map; >> - char lockname[16]; >> struct mtx eq_lock; >> >> struct tx_desc *desc; /* KVA of descriptor ring */ >> - bus_addr_t ba; /* bus address of descriptor ring */ >> - struct sge_qstat *spg; /* status page, for convenience */ >> uint16_t doorbells; >> volatile uint32_t *udb; /* KVA of doorbell (lies within BAR2) */ >> u_int udb_qid; /* relative qid within the doorbell page */ >> - uint16_t cap; /* max # of desc, for convenience */ >> - uint16_t avail; /* available descriptors, for convenience * >> / >> - uint16_t qsize; /* size (# of entries) of the queue */ >> + uint16_t sidx; /* index of the entry with the status page >> */ >> uint16_t cidx; /* consumer idx (desc idx) */ >> uint16_t pidx; /* producer idx (desc idx) */ >> - uint16_t pending; /* # of descriptors used since last >> doorbell */ >> + uint16_t equeqidx; /* EQUEQ last requested at this pidx */ >> + uint16_t dbidx; /* pidx of the most recent doorbell */ >> uint16_t iqid; /* iq that gets egr_update for the eq */ >> uint8_t tx_chan; /* tx channel used by the eq */ >> - struct task tx_task; >> - struct callout tx_callout; >> + volatile u_int equiq; /* EQUIQ outstanding */ >> >> - /* stats */ >> - >> - uint32_t egr_update; /* # of SGE_EGR_UPDATE notifications for eq >> */ >> - uint32_t unstalled; /* recovered from stall */ >> + bus_dma_tag_t desc_tag; >> + bus_dmamap_t desc_map; >> + bus_addr_t ba; /* bus address of descriptor ring */ >> + char lockname[16]; >> }; >> >> struct sw_zone_info { >> @@ -499,18 +476,19 @@ struct sge_fl { >> struct cluster_layout cll_alt; /* alternate refill zone, layout */ >> }; >> >> +struct mp_ring; >> + >> /* txq: SGE egress queue + what's needed for Ethernet NIC */ >> struct sge_txq { >> struct sge_eq eq; /* MUST be first */ >> >> struct ifnet *ifp; /* the interface this txq belongs to */ >> - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ >> - struct buf_ring *br; /* tx buffer ring */ >> + struct mp_ring *r; /* tx software ring */ >> struct tx_sdesc *sdesc; /* KVA of software descriptor ring */ >> - struct mbuf *m; /* held up due to temporary resource >> shortage */ >> - >> - struct tx_maps txmaps; >> + struct sglist *gl; >> + __be32 cpl_ctrl0; /* for convenience */ >> >> + struct task tx_reclaim_task; >> /* stats for common events first */ >> >> uint64_t txcsum; /* # of times hardware assisted with >> checksum */ >> @@ -519,13 +497,12 @@ struct sge_txq { >> uint64_t imm_wrs; /* # of work requests with immediate data * >> / >> uint64_t sgl_wrs; /* # of work requests with direct SGL */ >> uint64_t txpkt_wrs; /* # of txpkt work requests (not coalesced) >> */ >> - uint64_t txpkts_wrs; /* # of coalesced tx work requests */ >> - uint64_t txpkts_pkts; /* # of frames in coalesced tx work >> requests */ >> + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work requests */ >> + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work requests */ >> + uint64_t txpkts0_pkts; /* # of frames in type0 coalesced tx WRs */ >> + uint64_t txpkts1_pkts; /* # of frames in type1 coalesced tx WRs */ >> >> /* stats for not-that-common events */ >> - >> - uint32_t no_dmamap; /* no DMA map to load the mbuf */ >> - uint32_t no_desc; /* out of hardware descriptors */ >> } __aligned(CACHE_LINE_SIZE); >> >> /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ >> @@ -574,7 +551,13 @@ struct wrqe { >> STAILQ_ENTRY(wrqe) link; >> struct sge_wrq *wrq; >> int wr_len; >> - uint64_t wr[] __aligned(16); >> + char wr[] __aligned(16); >> +}; >> + >> +struct wrq_cookie { >> + TAILQ_ENTRY(wrq_cookie) link; >> + int ndesc; >> + int pidx; >> }; >> >> /* >> @@ -585,17 +568,32 @@ struct sge_wrq { >> struct sge_eq eq; /* MUST be first */ >> >> struct adapter *adapter; >> + struct task wrq_tx_task; >> + >> + /* Tx desc reserved but WR not "committed" yet. */ >> + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) incomplete_wrs; >> >> - /* List of WRs held up due to lack of tx descriptors */ >> + /* List of WRs ready to go out as soon as descriptors are >> available. */ >> STAILQ_HEAD(, wrqe) wr_list; >> + u_int nwr_pending; >> + u_int ndesc_needed; >> >> /* stats for common events first */ >> >> - uint64_t tx_wrs; /* # of tx work requests */ >> + uint64_t tx_wrs_direct; /* # of WRs written directly to desc ring. >> */ >> + uint64_t tx_wrs_ss; /* # of WRs copied from scratch space. */ >> + uint64_t tx_wrs_copied; /* # of WRs queued and copied to desc ring. >> */ >> >> /* stats for not-that-common events */ >> >> - uint32_t no_desc; /* out of hardware descriptors */ >> + /* >> + * Scratch space for work requests that wrap around after reaching >> the >> + * status page, and some infomation about the last WR that used it. >> + */ >> + uint16_t ss_pidx; >> + uint16_t ss_len; >> + uint8_t ss[SGE_MAX_WR_LEN]; >> + >> } __aligned(CACHE_LINE_SIZE); >> >> >> @@ -744,7 +742,7 @@ struct adapter { >> struct sge sge; >> int lro_timeout; >> >> - struct taskqueue *tq[NCHAN]; /* taskqueues that flush data out * >> / >> + struct taskqueue *tq[NCHAN]; /* General purpose taskqueues */ >> struct port_info *port[MAX_NPORTS]; >> uint8_t chan_map[NCHAN]; >> >> @@ -978,12 +976,11 @@ static inline int >> tx_resume_threshold(struct sge_eq *eq) >> { >> >> - return (eq->qsize / 4); >> + /* not quite the same as qsize / 4, but this will do. */ >> + return (eq->sidx / 4); >> } >> >> /* t4_main.c */ >> -void t4_tx_task(void *, int); >> -void t4_tx_callout(void *); >> int t4_os_find_pci_capability(struct adapter *, int); >> int t4_os_pci_save_state(struct adapter *); >> int t4_os_pci_restore_state(struct adapter *); >> @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct adapt >> int t4_teardown_adapter_queues(struct adapter *); >> int t4_setup_port_queues(struct port_info *); >> int t4_teardown_port_queues(struct port_info *); >> -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); >> -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); >> void t4_intr_all(void *); >> void t4_intr(void *); >> void t4_intr_err(void *); >> void t4_intr_evt(void *); >> void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, struct wrqe *); >> -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); >> void t4_update_fl_bufsize(struct ifnet *); >> -int can_resume_tx(struct sge_eq *); >> +int parse_pkt(struct mbuf **); >> +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); >> +void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); >> >> /* t4_tracer.c */ >> struct t4_tracer; >> >> Modified: head/sys/dev/cxgbe/t4_l2t.c >> =========================================================================== >> === >> --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014 (r276484) >> +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014 (r276485) >> @@ -113,16 +113,15 @@ found: >> int >> t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) >> { >> - struct wrqe *wr; >> + struct wrq_cookie cookie; >> struct cpl_l2t_write_req *req; >> int idx = e->idx + sc->vres.l2t.start; >> >> mtx_assert(&e->lock, MA_OWNED); >> >> - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); >> - if (wr == NULL) >> + req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), 16), & >> cookie); >> + if (req == NULL) >> return (ENOMEM); >> - req = wrtod(wr); >> >> INIT_TP_WR(req, 0); >> OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, idx | >> @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct >> req->vlan = htons(e->vlan); >> memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); >> >> - t4_wrq_tx(sc, wr); >> + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); >> >> if (sync && e->state != L2T_STATE_SWITCHING) >> e->state = L2T_STATE_SYNC_WRITE; >> >> Modified: head/sys/dev/cxgbe/t4_main.c >> =========================================================================== >> === >> --- head/sys/dev/cxgbe/t4_main.c Wed Dec 31 22:52:43 2014 >> (r276484) >> +++ head/sys/dev/cxgbe/t4_main.c Wed Dec 31 23:19:16 2014 >> (r276485) >> @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); >> #include "common/t4_regs_values.h" >> #include "t4_ioctl.h" >> #include "t4_l2t.h" >> +#include "t4_mp_ring.h" >> >> /* T4 bus driver interface */ >> static int t4_probe(device_t); >> @@ -378,7 +379,8 @@ static void build_medialist(struct port_ >> static int cxgbe_init_synchronized(struct port_info *); >> static int cxgbe_uninit_synchronized(struct port_info *); >> static int setup_intr_handlers(struct adapter *); >> -static void quiesce_eq(struct adapter *, struct sge_eq *); >> +static void quiesce_txq(struct adapter *, struct sge_txq *); >> +static void quiesce_wrq(struct adapter *, struct sge_wrq *); >> static void quiesce_iq(struct adapter *, struct sge_iq *); >> static void quiesce_fl(struct adapter *, struct sge_fl *); >> static int t4_alloc_irq(struct adapter *, struct irq *, int rid, >> @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER >> static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); >> static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); >> #endif >> -static inline void txq_start(struct ifnet *, struct sge_txq *); >> static uint32_t fconf_to_mode(uint32_t); >> static uint32_t mode_to_fconf(uint32_t); >> static uint32_t fspec_to_fconf(struct t4_filter_specification *); >> @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, struct >> { >> struct port_info *pi = ifp->if_softc; >> struct adapter *sc = pi->adapter; >> - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; >> - struct buf_ring *br; >> + struct sge_txq *txq; >> + void *items[1]; >> int rc; >> >> M_ASSERTPKTHDR(m); >> + MPASS(m->m_nextpkt == NULL); /* not quite ready for this yet */ >> >> if (__predict_false(pi->link_cfg.link_ok == 0)) { >> m_freem(m); >> return (ENETDOWN); >> } >> >> - /* check if flowid is set */ >> - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >> - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >> rsrv_noflowq)) >> - + pi->rsrv_noflowq); >> - br = txq->br; >> - >> - if (TXQ_TRYLOCK(txq) == 0) { >> - struct sge_eq *eq = &txq->eq; >> - >> - /* >> - * It is possible that t4_eth_tx finishes up and releases >> the >> - * lock between the TRYLOCK above and the drbr_enqueue >> here. We >> - * need to make sure that this mbuf doesn't just sit there >> in >> - * the drbr. >> - */ >> - >> - rc = drbr_enqueue(ifp, br, m); >> - if (rc == 0 && callout_pending(&eq->tx_callout) == 0 && >> - !(eq->flags & EQ_DOOMED)) >> - callout_reset(&eq->tx_callout, 1, t4_tx_callout, >> eq); >> + rc = parse_pkt(&m); >> + if (__predict_false(rc != 0)) { >> + MPASS(m == NULL); /* was freed >> already */ >> + atomic_add_int(&pi->tx_parse_error, 1); /* rare, atomic is >> ok */ >> return (rc); >> } >> >> - /* >> - * txq->m is the mbuf that is held up due to a temporary shortage >> of >> - * resources and it should be put on the wire first. Then what's >> in >> - * drbr and finally the mbuf that was just passed in to us. >> - * >> - * Return code should indicate the fate of the mbuf that was passed >> in >> - * this time. >> - */ >> - >> - TXQ_LOCK_ASSERT_OWNED(txq); >> - if (drbr_needs_enqueue(ifp, br) || txq->m) { >> - >> - /* Queued for transmission. */ >> - >> - rc = drbr_enqueue(ifp, br, m); >> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >> - (void) t4_eth_tx(ifp, txq, m); >> - TXQ_UNLOCK(txq); >> - return (rc); >> - } >> + /* Select a txq. */ >> + txq = &sc->sge.txq[pi->first_txq]; >> + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >> + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >> rsrv_noflowq)) + >> + pi->rsrv_noflowq); >> >> - /* Direct transmission. */ >> - rc = t4_eth_tx(ifp, txq, m); >> - if (rc != 0 && txq->m) >> - rc = 0; /* held, will be transmitted soon (hopefully) */ >> + items[0] = m; >> + rc = mp_ring_enqueue(txq->r, items, 1, 4096); >> + if (__predict_false(rc != 0)) >> + m_freem(m); >> >> - TXQ_UNLOCK(txq); >> return (rc); >> } >> >> @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) >> struct port_info *pi = ifp->if_softc; >> struct sge_txq *txq; >> int i; >> - struct mbuf *m; >> >> /* queues do not exist if !PORT_INIT_DONE. */ >> if (pi->flags & PORT_INIT_DONE) { >> for_each_txq(pi, i, txq) { >> TXQ_LOCK(txq); >> - m_freem(txq->m); >> - txq->m = NULL; >> - while ((m = buf_ring_dequeue_sc(txq->br)) != NULL) >> - m_freem(m); >> + txq->eq.flags &= ~EQ_ENABLED; >> TXQ_UNLOCK(txq); >> + while (!mp_ring_is_idle(txq->r)) { >> + mp_ring_check_drainage(txq->r, 0); >> + pause("qflush", 1); >> + } >> } >> } >> if_qflush(ifp); >> @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift >> struct sge_txq *txq; >> >> for_each_txq(pi, i, txq) >> - drops += txq->br->br_drops; >> + drops += counter_u64_fetch(txq->r->drops); >> } >> >> return (drops); >> @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info >> { >> struct adapter *sc = pi->adapter; >> struct ifnet *ifp = pi->ifp; >> - int rc = 0; >> + int rc = 0, i; >> + struct sge_txq *txq; >> >> ASSERT_SYNCHRONIZED_OP(sc); >> >> @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info >> } >> >> /* >> + * Can't fail from this point onwards. Review >> cxgbe_uninit_synchronized >> + * if this changes. >> + */ >> + >> + for_each_txq(pi, i, txq) { >> + TXQ_LOCK(txq); >> + txq->eq.flags |= EQ_ENABLED; >> + TXQ_UNLOCK(txq); >> + } >> + >> + /* >> * The first iq of the first port to come up is used for tracing. >> */ >> if (sc->traceq < 0) { >> @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in >> { >> struct adapter *sc = pi->adapter; >> struct ifnet *ifp = pi->ifp; >> - int rc; >> + int rc, i; >> + struct sge_txq *txq; >> >> ASSERT_SYNCHRONIZED_OP(sc); >> >> @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in >> return (rc); >> } >> >> + for_each_txq(pi, i, txq) { >> + TXQ_LOCK(txq); >> + txq->eq.flags &= ~EQ_ENABLED; >> + TXQ_UNLOCK(txq); >> + } >> + >> clrbit(&sc->open_device_map, pi->port_id); >> PORT_LOCK(pi); >> ifp->if_drv_flags &= ~IFF_DRV_RUNNING; >> @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) >> >> if (pi->flags & PORT_INIT_DONE) { >> >> - /* Need to quiesce queues. XXX: ctrl queues? */ >> + /* Need to quiesce queues. */ >> + >> + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); >> >> for_each_txq(pi, i, txq) { >> - quiesce_eq(sc, &txq->eq); >> + quiesce_txq(sc, txq); >> } >> >> #ifdef TCP_OFFLOAD >> for_each_ofld_txq(pi, i, ofld_txq) { >> - quiesce_eq(sc, &ofld_txq->eq); >> + quiesce_wrq(sc, ofld_txq); >> } >> #endif >> >> @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) >> } >> >> static void >> -quiesce_eq(struct adapter *sc, struct sge_eq *eq) >> +quiesce_txq(struct adapter *sc, struct sge_txq *txq) >> { >> - EQ_LOCK(eq); >> - eq->flags |= EQ_DOOMED; >> + struct sge_eq *eq = &txq->eq; >> + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; >> >> - /* >> - * Wait for the response to a credit flush if one's >> - * pending. >> - */ >> - while (eq->flags & EQ_CRFLUSHED) >> - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); >> - EQ_UNLOCK(eq); >> + (void) sc; /* unused */ >> >> - callout_drain(&eq->tx_callout); /* XXX: iffy */ >> - pause("callout", 10); /* Still iffy */ >> +#ifdef INVARIANTS >> + TXQ_LOCK(txq); >> + MPASS((eq->flags & EQ_ENABLED) == 0); >> + TXQ_UNLOCK(txq); >> +#endif >> >> - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); >> + /* Wait for the mp_ring to empty. */ >> + while (!mp_ring_is_idle(txq->r)) { >> + mp_ring_check_drainage(txq->r, 0); >> + pause("rquiesce", 1); >> + } >> + >> + /* Then wait for the hardware to finish. */ >> + while (spg->cidx != htobe16(eq->pidx)) >> + pause("equiesce", 1); >> + >> + /* Finally, wait for the driver to reclaim all descriptors. */ >> + while (eq->cidx != eq->pidx) >> + pause("dquiesce", 1); >> +} >> + >> +static void >> +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) >> +{ >> + >> + /* XXXTX */ >> } >> >> static void >> @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) >> oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", CTLFLAG_RD, >> NULL, "port statistics"); >> children = SYSCTL_CHILDREN(oid); >> + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_parse_error", >> CTLFLAG_RD, >> + &pi->tx_parse_error, 0, >> + "# of tx packets with invalid length or # of segments"); >> >> #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ >> SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ >> @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) >> } >> #endif >> >> -static inline void >> -txq_start(struct ifnet *ifp, struct sge_txq *txq) >> -{ >> - struct buf_ring *br; >> - struct mbuf *m; >> - >> - TXQ_LOCK_ASSERT_OWNED(txq); >> - >> - br = txq->br; >> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >> - if (m) >> - t4_eth_tx(ifp, txq, m); >> -} >> - >> -void >> -t4_tx_callout(void *arg) >> -{ >> - struct sge_eq *eq = arg; >> - struct adapter *sc; >> - >> - if (EQ_TRYLOCK(eq) == 0) >> - goto reschedule; >> - >> - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { >> - EQ_UNLOCK(eq); >> -reschedule: >> - if (__predict_true(!(eq->flags && EQ_DOOMED))) >> - callout_schedule(&eq->tx_callout, 1); >> - return; >> - } >> - >> - EQ_LOCK_ASSERT_OWNED(eq); >> - >> - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { >> - >> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >> - struct sge_txq *txq = arg; >> - struct port_info *pi = txq->ifp->if_softc; >> - >> - sc = pi->adapter; >> - } else { >> - struct sge_wrq *wrq = arg; >> - >> - sc = wrq->adapter; >> - } >> - >> - taskqueue_enqueue(sc->tq[eq->tx_chan], &eq->tx_task); >> - } >> - >> - EQ_UNLOCK(eq); >> -} >> - >> -void >> -t4_tx_task(void *arg, int count) >> -{ >> - struct sge_eq *eq = arg; >> - >> - EQ_LOCK(eq); >> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >> - struct sge_txq *txq = arg; >> - txq_start(txq->ifp, txq); >> - } else { >> - struct sge_wrq *wrq = arg; >> - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); >> - } >> - EQ_UNLOCK(eq); >> -} >> - >> static uint32_t >> fconf_to_mode(uint32_t fconf) >> { >> @@ -7452,9 +7394,9 @@ static int >> set_filter_wr(struct adapter *sc, int fidx) >> { >> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >> - struct wrqe *wr; >> struct fw_filter_wr *fwr; >> unsigned int ftid; >> + struct wrq_cookie cookie; >> >> ASSERT_SYNCHRONIZED_OP(sc); >> >> @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, int fi >> >> ftid = sc->tids.ftid_base + fidx; >> >> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >> - if (wr == NULL) >> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), & >> cookie); >> + if (fwr == NULL) >> return (ENOMEM); >> - >> - fwr = wrtod(wr); >> - bzero(fwr, sizeof (*fwr)); >> + bzero(fwr, sizeof(*fwr)); >> >> fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); >> fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); >> @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi >> f->pending = 1; >> sc->tids.ftids_in_use++; >> >> - t4_wrq_tx(sc, wr); >> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >> return (0); >> } >> >> @@ -7555,22 +7495,21 @@ static int >> del_filter_wr(struct adapter *sc, int fidx) >> { >> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >> - struct wrqe *wr; >> struct fw_filter_wr *fwr; >> unsigned int ftid; >> + struct wrq_cookie cookie; >> >> ftid = sc->tids.ftid_base + fidx; >> >> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >> - if (wr == NULL) >> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), 16), & >> cookie); >> + if (fwr == NULL) >> return (ENOMEM); >> - fwr = wrtod(wr); >> bzero(fwr, sizeof (*fwr)); >> >> t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); >> >> f->pending = 1; >> - t4_wrq_tx(sc, wr); >> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >> return (0); >> } >> >> @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long >> >> /* MAC stats */ >> t4_clr_port_stats(sc, pi->tx_chan); >> + pi->tx_parse_error = 0; >> >> if (pi->flags & PORT_INIT_DONE) { >> struct sge_rxq *rxq; >> @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned long >> txq->imm_wrs = 0; >> txq->sgl_wrs = 0; >> txq->txpkt_wrs = 0; >> - txq->txpkts_wrs = 0; >> - txq->txpkts_pkts = 0; >> - txq->br->br_drops = 0; >> - txq->no_dmamap = 0; >> - txq->no_desc = 0; >> + txq->txpkts0_wrs = 0; >> + txq->txpkts1_wrs = 0; >> + txq->txpkts0_pkts = 0; >> + txq->txpkts1_pkts = 0; >> + mp_ring_reset_stats(txq->r); >> } >> >> #ifdef TCP_OFFLOAD >> /* nothing to clear for each ofld_rxq */ >> >> for_each_ofld_txq(pi, i, wrq) { >> - wrq->tx_wrs = 0; >> - wrq->no_desc = 0; >> + wrq->tx_wrs_direct = 0; >> + wrq->tx_wrs_copied = 0; >> } >> #endif >> wrq = &sc->sge.ctrlq[pi->port_id]; >> - wrq->tx_wrs = 0; >> - wrq->no_desc = 0; >> + wrq->tx_wrs_direct = 0; >> + wrq->tx_wrs_copied = 0; >> } >> break; >> } >> >> Added: head/sys/dev/cxgbe/t4_mp_ring.c >> =========================================================================== >> === >> --- /dev/null 00:00:00 1970 (empty, because file is newly added) >> +++ head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 >> (r276485) >> @@ -0,0 +1,364 @@ >> +/*- >> + * Copyright (c) 2014 Chelsio Communications, Inc. >> + * All rights reserved. >> + * Written by: Navdeep Parhar >> + * >> + * Redistribution and use in source and binary forms, with or without >> + * modification, are permitted provided that the following conditions >> + * are met: >> + * 1. Redistributions of source code must retain the above copyright >> + * notice, this list of conditions and the following disclaimer. >> + * 2. Redistributions in binary form must reproduce the above copyright >> + * notice, this list of conditions and the following disclaimer in the >> + * documentation and/or other materials provided with the distribution. >> + * >> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND >> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE >> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR >> PURPOSE >> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE >> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >> CONSEQUENTIAL >> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS >> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) >> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, >> STRICT >> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY >> WAY >> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF >> + * SUCH DAMAGE. >> + */ >> + >> +#include >> +__FBSDID("$FreeBSD$"); >> + >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> +#include >> + >> +#include "t4_mp_ring.h" >> + >> +union ring_state { >> + struct { >> + uint16_t pidx_head; >> + uint16_t pidx_tail; >> + uint16_t cidx; >> + uint16_t flags; >> + }; >> + uint64_t state; >> +}; >> + >> +enum { >> + IDLE = 0, /* consumer ran to completion, nothing more to do. >> */ >> + BUSY, /* consumer is running already, or will be shortly. >> */ >> + STALLED, /* consumer stopped due to lack of resources. */ >> + ABDICATED, /* consumer stopped even though there was work to >> be >> + done because it wants another thread to take >> over. */ >> +}; >> + >> +static inline uint16_t >> +space_available(struct mp_ring *r, union ring_state s) >> +{ >> + uint16_t x = r->size - 1; >> + >> + if (s.cidx == s.pidx_head) >> + return (x); >> + else if (s.cidx > s.pidx_head) >> + return (s.cidx - s.pidx_head - 1); >> + else >> + return (x - s.pidx_head + s.cidx); >> +} >> + >> +static inline uint16_t >> +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) >> +{ >> + int x = r->size - idx; >> + >> + MPASS(x > 0); >> + return (x > n ? idx + n : n - x); >> +} >> + >> +/* Consumer is about to update the ring's state to s */ >> +static inline uint16_t >> +state_to_flags(union ring_state s, int abdicate) >> +{ >> + >> + if (s.cidx == s.pidx_tail) >> + return (IDLE); >> + else if (abdicate && s.pidx_tail != s.pidx_head) >> + return (ABDICATED); >> + >> + return (BUSY); >> +} >> + >> +/* >> + * Caller passes in a state, with a guarantee that there is work to do and >> that >> + * all items up to the pidx_tail in the state are visible. >> + */ >> +static void >> +drain_ring(struct mp_ring *r, union ring_state os, uint16_t prev, int >> budget) >> +{ >> + union ring_state ns; >> + int n, pending, total; >> + uint16_t cidx = os.cidx; >> + uint16_t pidx = os.pidx_tail; >> + >> + MPASS(os.flags == BUSY); >> + MPASS(cidx != pidx); >> + >> + if (prev == IDLE) >> + counter_u64_add(r->starts, 1); >> + pending = 0; >> + total = 0; >> + >> + while (cidx != pidx) { >> + >> + /* Items from cidx to pidx are available for consumption. * >> / >> + n = r->drain(r, cidx, pidx); >> + if (n == 0) { >> + critical_enter(); >> + do { >> + os.state = ns.state = r->state; >> + ns.cidx = cidx; >> + ns.flags = STALLED; >> + } while (atomic_cmpset_64(&r->state, os.state, >> + ns.state) == 0); >> + critical_exit(); >> + if (prev != STALLED) >> + counter_u64_add(r->stalls, 1); >> + else if (total > 0) { >> + counter_u64_add(r->restarts, 1); >> + counter_u64_add(r->stalls, 1); >> + } >> + break; >> + } >> + cidx = increment_idx(r, cidx, n); >> + pending += n; >> + total += n; >> + >> + /* >> + * We update the cidx only if we've caught up with the >> pidx, the >> + * real cidx is getting too far ahead of the one visible to >> + * everyone else, or we have exceeded our budget. >> + */ >> + if (cidx != pidx && pending < 64 && total < budget) >> + continue; >> + critical_enter(); >> + do { >> + os.state = ns.state = r->state; >> + ns.cidx = cidx; >> + ns.flags = state_to_flags(ns, total >= budget); >> + } while (atomic_cmpset_acq_64(&r->state, os.state, >> ns.state) == 0); >> + critical_exit(); >> + >> + if (ns.flags == ABDICATED) >> + counter_u64_add(r->abdications, 1); >> + if (ns.flags != BUSY) { >> + /* Wrong loop exit if we're going to stall. */ >> + MPASS(ns.flags != STALLED); >> + if (prev == STALLED) { >> + MPASS(total > 0); >> + counter_u64_add(r->restarts, 1); >> + } >> + break; >> + } >> + >> + /* >> + * The acquire style atomic above guarantees visibility of >> items >> + * associated with any pidx change that we notice here. >> + */ >> + pidx = ns.pidx_tail; >> + pending = 0; >> + } >> +} >> + >> +int >> +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, ring_drain_t >> drain, >> + ring_can_drain_t can_drain, struct malloc_type *mt, int flags) >> +{ >> + struct mp_ring *r; >> + >> + /* All idx are 16b so size can be 65536 at most */ >> + if (pr == NULL || size < 2 || size > 65536 || drain == NULL || >> + can_drain == NULL) >> + return (EINVAL); >> + *pr = NULL; >> + flags &= M_NOWAIT | M_WAITOK; >> + MPASS(flags != 0); >> + >> + r = malloc(__offsetof(struct mp_ring, items[size]), mt, flags | >> M_ZERO); >> + if (r == NULL) >> + return (ENOMEM); >> + r->size = size; >> + r->cookie = cookie; >> + r->mt = mt; >> + r->drain = drain; >> + r->can_drain = can_drain; >> + r->enqueues = counter_u64_alloc(flags); >> + r->drops = counter_u64_alloc(flags); >> + r->starts = counter_u64_alloc(flags); >> + r->stalls = counter_u64_alloc(flags); >> + r->restarts = counter_u64_alloc(flags); >> + r->abdications = counter_u64_alloc(flags); >> + if (r->enqueues == NULL || r->drops == NULL || r->starts == NULL || >> + r->stalls == NULL || r->restarts == NULL || >> + r->abdications == NULL) { >> + mp_ring_free(r); >> + return (ENOMEM); >> + } >> + >> + *pr = r; >> + return (0); >> +} >> + >> +void >> + >> +mp_ring_free(struct mp_ring *r) >> +{ >> + >> + if (r == NULL) >> + return; >> + >> + if (r->enqueues != NULL) >> + counter_u64_free(r->enqueues); >> + if (r->drops != NULL) >> + counter_u64_free(r->drops); >> + if (r->starts != NULL) >> + counter_u64_free(r->starts); >> + if (r->stalls != NULL) >> + counter_u64_free(r->stalls); >> + if (r->restarts != NULL) >> + counter_u64_free(r->restarts); >> + if (r->abdications != NULL) >> + counter_u64_free(r->abdications); >> + >> + free(r, r->mt); >> +} >> + >> +/* >> + * Enqueue n items and maybe drain the ring for some time. >> + * >> + * Returns an errno. >> + */ >> +int >> +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int budget) >> +{ >> + union ring_state os, ns; >> + uint16_t pidx_start, pidx_stop; >> + int i; >> + >> + MPASS(items != NULL); >> + MPASS(n > 0); >> + >> >> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >> >> >> >> >> >> -- >> -----------------------------------------+------------------------------- >> Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. dell'Informazione >> http://www.iet.unipi.it/~luigi/ . Universita` di Pisa >> TEL +39-050-2211611 . via Diotisalvi 2 >> Mobile +39-338-6809875 . 56122 PISA (Italy) >> -----------------------------------------+------------------------------- --------------050000020104050008050000 Content-Type: text/x-patch; name="gcc-anonstructunions.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gcc-anonstructunions.diff" Index: contrib/gcc/c-decl.c =================================================================== --- contrib/gcc/c-decl.c (revision 277326) +++ contrib/gcc/c-decl.c (working copy) @@ -5970,7 +5970,7 @@ if (flag_ms_extensions) ok = true; else if (flag_iso) - ok = false; + ok = true; else if (TYPE_NAME (type) == NULL) ok = true; else --------------050000020104050008050000-- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:21:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 07806562; Tue, 20 Jan 2015 23:21:46 +0000 (UTC) Received: from mail-pd0-x231.google.com (mail-pd0-x231.google.com [IPv6:2607:f8b0:400e:c02::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C2305D44; Tue, 20 Jan 2015 23:21:45 +0000 (UTC) Received: by mail-pd0-f177.google.com with SMTP id y13so21001838pdi.8; Tue, 20 Jan 2015 15:21:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=s8M+h50cIBm56henotXYYLjyFKn9b0nfmS/mYvFR7Ak=; b=B9g1o2Og/1elue0AZUDS/rClJaBru+Pbd9gdN/GyKZ+fpHhPC056F9IpCWTIndA1W/ JPSgYMw6oTiCtS+BKc3qQPWPaBDvxGH6wMFPpn9eeSIeRlTLW44QGKc16g3Sy6trYZJA hkpUruQ6qKdHsqS6z+78Yh3iQlDQ2mqOCAuOq6X3+IGG4UNyLSWXekuJnhKQoaQB2h6m JkR68hzUsSSaU7Fnt8mwx+/J6s3MZtyzbx+e4hkZYluiovSzTR9KF6CmMh5K8jObfCg/ rbGDGnEXpEuZh4M7q31bp8YgCB7cNlvwtskuZBOx4VFaAVjY2EHr3s7jjZd6vOxaXf/m C2uw== X-Received: by 10.66.163.228 with SMTP id yl4mr31560751pab.51.1421796105245; Tue, 20 Jan 2015 15:21:45 -0800 (PST) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id cm10sm4249106pad.46.2015.01.20.15.21.42 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 15:21:43 -0800 (PST) Sender: Navdeep Parhar Message-ID: <54BEE305.6020905@FreeBSD.org> Date: Tue, 20 Jan 2015 15:21:41 -0800 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> In-Reply-To: <54BEE07A.3070207@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:21:46 -0000 The problem reported by Luigi has been fixed in r277225 already. Regards, Navdeep On 01/20/15 15:10, Pedro Giffuni wrote: > Hi; > > I got this patch from the OpenBSD-tech list[1]. > Perhaps this fixes the gcc issue? > > Apparently it's required for mesa too. > > Pedro. > > [1] http://article.gmane.org/gmane.os.openbsd.tech/40604 > > On 01/06/15 15:33, Navdeep Parhar wrote: >> On Tue, Jan 06, 2015 at 07:58:34PM +0100, Luigi Rizzo wrote: >>> >>> On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar wrote: >>> >>> Author: np >>> Date: Wed Dec 31 23:19:16 2014 >>> New Revision: 276485 >>> URL: https://svnweb.freebsd.org/changeset/base/276485 >>> >>> Log: >>> cxgbe(4): major tx rework. >>> >>> >>> FYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) >>> which prevent the kernel from compiling with our stock gcc >>> and its standard kernel build flags (specifically -std=...). >>> >>> Adding the following in the kernel config >>> >>> makeoptions COPTFLAGS="-fms-extensions" >>> >>> seems to do the job >>> >>> I know it is unavoidable that we'll end up with gcc not working, >>> but maybe we can still avoid unnamed unions. >> There are two unresolved issues with mp_ring and I had to make the >> driver amd64-only while I consider my options. >> >> - platforms where gcc is the default (and our version has problems with >> unnamed unions). This is simple to fix but reduces the readability of >> the code. But sure, if building head with gcc is popular then that >> trumps readability. I wonder if adding -fms-extensions just to the >> driver's build flags would be an acceptable compromise. >> - platforms without the acq/rel versions of 64b cmpset. I think it >> would be simple to add acq/rel variants to i386/pc98 and others that >> already have 64b cmpset. The driver will be permanently unplugged >> from >> whatever remains (only 32 bit powerpc I think). >> >> I'll try to sort all this out within the next couple of weeks. >> >> Regards, >> Navdeep >> >>> cheers >>> luigi >>> >>> >>> a) Front load as much work as possible in if_transmit, before >>> any driver >>> lock or software queue has to get involved. >>> >>> b) Replace buf_ring with a brand new mp_ring (multiproducer >>> ring). This >>> is specifically for the tx multiqueue model where one of the >>> if_transmit >>> producer threads becomes the consumer and other producers >>> carry on as >>> usual. mp_ring is implemented as standalone code and it >>> should be >>> possible to use it in any driver with tx multiqueue. It also >>> has: >>> - the ability to enqueue/dequeue multiple items. This might >>> become >>> significant if packet batching is ever implemented. >>> - an abdication mechanism to allow a thread to give up writing tx >>> descriptors and have another if_transmit thread take over. >>> A thread >>> that's writing tx descriptors can end up doing so for an >>> unbounded >>> time period if a) there are other if_transmit threads >>> continuously >>> feeding the sofware queue, and b) the chip keeps up with >>> whatever the >>> thread is throwing at it. >>> - accurate statistics about interesting events even when the >>> stats come >>> at the expense of additional branches/conditional code. >>> >>> The NIC txq lock is uncontested on the fast path at this >>> point. I've >>> left it there for synchronization with the control events >>> (interface >>> up/down, modload/unload). >>> >>> c) Add support for "type 1" coalescing work request in the >>> normal NIC tx >>> path. This work request is optimized for frames with a single >>> item in >>> the DMA gather list. These are very common when forwarding >>> packets. >>> Note that netmap tx in cxgbe already uses these "type 1" work >>> requests. >>> >>> d) Do not request automatic cidx updates every 32 >>> descriptors. Instead, >>> request updates via bits in individual work requests (still >>> every 32 >>> descriptors approximately). Also, request an automatic final >>> update >>> when the queue idles after activity. This means NIC tx >>> reclaim is still >>> performed lazily but it will catch up quickly as soon as the >>> queue >>> idles. This seems to be the best middle ground and I'll >>> probably do >>> something similar for netmap tx as well. >>> >>> e) Implement a faster tx path for WRQs (used by TOE tx and >>> control >>> queues, _not_ by the normal NIC tx). Allow work requests to >>> be written >>> directly to the hardware descriptor ring if room is >>> available. I will >>> convert t4_tom and iw_cxgbe modules to this faster style >>> gradually. >>> >>> MFC after: 2 months >>> >>> Added: >>> head/sys/dev/cxgbe/t4_mp_ring.c (contents, props changed) >>> head/sys/dev/cxgbe/t4_mp_ring.h (contents, props changed) >>> Modified: >>> head/sys/conf/files >>> head/sys/dev/cxgbe/adapter.h >>> head/sys/dev/cxgbe/t4_l2t.c >>> head/sys/dev/cxgbe/t4_main.c >>> head/sys/dev/cxgbe/t4_sge.c >>> head/sys/modules/cxgbe/if_cxgbe/Makefile >>> >>> Modified: head/sys/conf/files >>> >>> =========================================================================== >>> >>> === >>> --- head/sys/conf/files Wed Dec 31 22:52:43 2014 (r276484) >>> +++ head/sys/conf/files Wed Dec 31 23:19:16 2014 (r276485) >>> @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p >>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>> dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ >>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>> +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ >>> + compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>> dev/cxgbe/t4_main.c optional cxgbe pci \ >>> compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>> dev/cxgbe/t4_netmap.c optional cxgbe pci \ >>> >>> Modified: head/sys/dev/cxgbe/adapter.h >>> >>> =========================================================================== >>> >>> === >>> --- head/sys/dev/cxgbe/adapter.h Wed Dec 31 22:52:43 2014 >>> (r276484) >>> +++ head/sys/dev/cxgbe/adapter.h Wed Dec 31 23:19:16 2014 >>> (r276485) >>> @@ -152,7 +152,8 @@ enum { >>> CL_METADATA_SIZE = CACHE_LINE_SIZE, >>> >>> SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR >>> size in >>> desc */ >>> - TX_SGL_SEGS = 36, >>> + TX_SGL_SEGS = 39, >>> + TX_SGL_SEGS_TSO = 38, >>> TX_WR_FLITS = SGE_MAX_WR_LEN / 8 >>> }; >>> >>> @@ -273,6 +274,7 @@ struct port_info { >>> struct timeval last_refreshed; >>> struct port_stats stats; >>> u_int tnl_cong_drops; >>> + u_int tx_parse_error; >>> >>> eventhandler_tag vlan_c; >>> >>> @@ -308,23 +310,9 @@ struct tx_desc { >>> __be64 flit[8]; >>> }; >>> >>> -struct tx_map { >>> - struct mbuf *m; >>> - bus_dmamap_t map; >>> -}; >>> - >>> -/* DMA maps used for tx */ >>> -struct tx_maps { >>> - struct tx_map *maps; >>> - uint32_t map_total; /* # of DMA maps */ >>> - uint32_t map_pidx; /* next map to be used */ >>> - uint32_t map_cidx; /* reclaimed up to this index */ >>> - uint32_t map_avail; /* # of available maps */ >>> -}; >>> - >>> struct tx_sdesc { >>> + struct mbuf *m; /* m_nextpkt linked chain of >>> frames */ >>> uint8_t desc_used; /* # of hardware descriptors >>> used by the WR >>> */ >>> - uint8_t credits; /* NIC txq: # of frames sent out >>> in the WR >>> */ >>> }; >>> >>> >>> @@ -378,16 +366,12 @@ struct sge_iq { >>> enum { >>> EQ_CTRL = 1, >>> EQ_ETH = 2, >>> -#ifdef TCP_OFFLOAD >>> EQ_OFLD = 3, >>> -#endif >>> >>> /* eq flags */ >>> - EQ_TYPEMASK = 7, /* 3 lsbits hold the >>> type */ >>> - EQ_ALLOCATED = (1 << 3), /* firmware resources >>> allocated */ >>> - EQ_DOOMED = (1 << 4), /* about to be destroyed */ >>> - EQ_CRFLUSHED = (1 << 5), /* expecting an update >>> from SGE */ >>> - EQ_STALLED = (1 << 6), /* out of hw descriptors >>> or dmamaps >>> */ >>> + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the >>> type (see >>> above) */ >>> + EQ_ALLOCATED = (1 << 2), /* firmware resources >>> allocated */ >>> + EQ_ENABLED = (1 << 3), /* open for business */ >>> }; >>> >>> /* Listed in order of preference. Update t4_sysctls too if you >>> change >>> these */ >>> @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB >>> struct sge_eq { >>> unsigned int flags; /* MUST be first */ >>> unsigned int cntxt_id; /* SGE context id for the eq */ >>> - bus_dma_tag_t desc_tag; >>> - bus_dmamap_t desc_map; >>> - char lockname[16]; >>> struct mtx eq_lock; >>> >>> struct tx_desc *desc; /* KVA of descriptor ring */ >>> - bus_addr_t ba; /* bus address of descriptor >>> ring */ >>> - struct sge_qstat *spg; /* status page, for convenience */ >>> uint16_t doorbells; >>> volatile uint32_t *udb; /* KVA of doorbell (lies within >>> BAR2) */ >>> u_int udb_qid; /* relative qid within the >>> doorbell page */ >>> - uint16_t cap; /* max # of desc, for >>> convenience */ >>> - uint16_t avail; /* available descriptors, for >>> convenience * >>> / >>> - uint16_t qsize; /* size (# of entries) of the >>> queue */ >>> + uint16_t sidx; /* index of the entry with the >>> status page >>> */ >>> uint16_t cidx; /* consumer idx (desc idx) */ >>> uint16_t pidx; /* producer idx (desc idx) */ >>> - uint16_t pending; /* # of descriptors used since last >>> doorbell */ >>> + uint16_t equeqidx; /* EQUEQ last requested at this >>> pidx */ >>> + uint16_t dbidx; /* pidx of the most recent >>> doorbell */ >>> uint16_t iqid; /* iq that gets egr_update for >>> the eq */ >>> uint8_t tx_chan; /* tx channel used by the eq */ >>> - struct task tx_task; >>> - struct callout tx_callout; >>> + volatile u_int equiq; /* EQUIQ outstanding */ >>> >>> - /* stats */ >>> - >>> - uint32_t egr_update; /* # of SGE_EGR_UPDATE >>> notifications for eq >>> */ >>> - uint32_t unstalled; /* recovered from stall */ >>> + bus_dma_tag_t desc_tag; >>> + bus_dmamap_t desc_map; >>> + bus_addr_t ba; /* bus address of descriptor >>> ring */ >>> + char lockname[16]; >>> }; >>> >>> struct sw_zone_info { >>> @@ -499,18 +476,19 @@ struct sge_fl { >>> struct cluster_layout cll_alt; /* alternate refill >>> zone, layout */ >>> }; >>> >>> +struct mp_ring; >>> + >>> /* txq: SGE egress queue + what's needed for Ethernet NIC */ >>> struct sge_txq { >>> struct sge_eq eq; /* MUST be first */ >>> >>> struct ifnet *ifp; /* the interface this txq >>> belongs to */ >>> - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ >>> - struct buf_ring *br; /* tx buffer ring */ >>> + struct mp_ring *r; /* tx software ring */ >>> struct tx_sdesc *sdesc; /* KVA of software descriptor >>> ring */ >>> - struct mbuf *m; /* held up due to temporary >>> resource >>> shortage */ >>> - >>> - struct tx_maps txmaps; >>> + struct sglist *gl; >>> + __be32 cpl_ctrl0; /* for convenience */ >>> >>> + struct task tx_reclaim_task; >>> /* stats for common events first */ >>> >>> uint64_t txcsum; /* # of times hardware assisted >>> with >>> checksum */ >>> @@ -519,13 +497,12 @@ struct sge_txq { >>> uint64_t imm_wrs; /* # of work requests with >>> immediate data * >>> / >>> uint64_t sgl_wrs; /* # of work requests with >>> direct SGL */ >>> uint64_t txpkt_wrs; /* # of txpkt work requests (not >>> coalesced) >>> */ >>> - uint64_t txpkts_wrs; /* # of coalesced tx work >>> requests */ >>> - uint64_t txpkts_pkts; /* # of frames in coalesced tx work >>> requests */ >>> + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work >>> requests */ >>> + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work >>> requests */ >>> + uint64_t txpkts0_pkts; /* # of frames in type0 >>> coalesced tx WRs */ >>> + uint64_t txpkts1_pkts; /* # of frames in type1 >>> coalesced tx WRs */ >>> >>> /* stats for not-that-common events */ >>> - >>> - uint32_t no_dmamap; /* no DMA map to load the mbuf */ >>> - uint32_t no_desc; /* out of hardware descriptors */ >>> } __aligned(CACHE_LINE_SIZE); >>> >>> /* rxq: SGE ingress queue + SGE free list + miscellaneous items */ >>> @@ -574,7 +551,13 @@ struct wrqe { >>> STAILQ_ENTRY(wrqe) link; >>> struct sge_wrq *wrq; >>> int wr_len; >>> - uint64_t wr[] __aligned(16); >>> + char wr[] __aligned(16); >>> +}; >>> + >>> +struct wrq_cookie { >>> + TAILQ_ENTRY(wrq_cookie) link; >>> + int ndesc; >>> + int pidx; >>> }; >>> >>> /* >>> @@ -585,17 +568,32 @@ struct sge_wrq { >>> struct sge_eq eq; /* MUST be first */ >>> >>> struct adapter *adapter; >>> + struct task wrq_tx_task; >>> + >>> + /* Tx desc reserved but WR not "committed" yet. */ >>> + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) incomplete_wrs; >>> >>> - /* List of WRs held up due to lack of tx descriptors */ >>> + /* List of WRs ready to go out as soon as descriptors are >>> available. */ >>> STAILQ_HEAD(, wrqe) wr_list; >>> + u_int nwr_pending; >>> + u_int ndesc_needed; >>> >>> /* stats for common events first */ >>> >>> - uint64_t tx_wrs; /* # of tx work requests */ >>> + uint64_t tx_wrs_direct; /* # of WRs written directly to >>> desc ring. >>> */ >>> + uint64_t tx_wrs_ss; /* # of WRs copied from scratch >>> space. */ >>> + uint64_t tx_wrs_copied; /* # of WRs queued and copied to >>> desc ring. >>> */ >>> >>> /* stats for not-that-common events */ >>> >>> - uint32_t no_desc; /* out of hardware descriptors */ >>> + /* >>> + * Scratch space for work requests that wrap around >>> after reaching >>> the >>> + * status page, and some infomation about the last WR >>> that used it. >>> + */ >>> + uint16_t ss_pidx; >>> + uint16_t ss_len; >>> + uint8_t ss[SGE_MAX_WR_LEN]; >>> + >>> } __aligned(CACHE_LINE_SIZE); >>> >>> >>> @@ -744,7 +742,7 @@ struct adapter { >>> struct sge sge; >>> int lro_timeout; >>> >>> - struct taskqueue *tq[NCHAN]; /* taskqueues that flush >>> data out * >>> / >>> + struct taskqueue *tq[NCHAN]; /* General purpose >>> taskqueues */ >>> struct port_info *port[MAX_NPORTS]; >>> uint8_t chan_map[NCHAN]; >>> >>> @@ -978,12 +976,11 @@ static inline int >>> tx_resume_threshold(struct sge_eq *eq) >>> { >>> >>> - return (eq->qsize / 4); >>> + /* not quite the same as qsize / 4, but this will do. */ >>> + return (eq->sidx / 4); >>> } >>> >>> /* t4_main.c */ >>> -void t4_tx_task(void *, int); >>> -void t4_tx_callout(void *); >>> int t4_os_find_pci_capability(struct adapter *, int); >>> int t4_os_pci_save_state(struct adapter *); >>> int t4_os_pci_restore_state(struct adapter *); >>> @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct adapt >>> int t4_teardown_adapter_queues(struct adapter *); >>> int t4_setup_port_queues(struct port_info *); >>> int t4_teardown_port_queues(struct port_info *); >>> -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); >>> -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); >>> void t4_intr_all(void *); >>> void t4_intr(void *); >>> void t4_intr_err(void *); >>> void t4_intr_evt(void *); >>> void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, >>> struct wrqe *); >>> -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); >>> void t4_update_fl_bufsize(struct ifnet *); >>> -int can_resume_tx(struct sge_eq *); >>> +int parse_pkt(struct mbuf **); >>> +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); >>> +void commit_wrq_wr(struct sge_wrq *, void *, struct wrq_cookie *); >>> >>> /* t4_tracer.c */ >>> struct t4_tracer; >>> >>> Modified: head/sys/dev/cxgbe/t4_l2t.c >>> >>> =========================================================================== >>> >>> === >>> --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014 >>> (r276484) >>> +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014 >>> (r276485) >>> @@ -113,16 +113,15 @@ found: >>> int >>> t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) >>> { >>> - struct wrqe *wr; >>> + struct wrq_cookie cookie; >>> struct cpl_l2t_write_req *req; >>> int idx = e->idx + sc->vres.l2t.start; >>> >>> mtx_assert(&e->lock, MA_OWNED); >>> >>> - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); >>> - if (wr == NULL) >>> + req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), >>> 16), & >>> cookie); >>> + if (req == NULL) >>> return (ENOMEM); >>> - req = wrtod(wr); >>> >>> INIT_TP_WR(req, 0); >>> OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, >>> idx | >>> @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct >>> req->vlan = htons(e->vlan); >>> memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); >>> >>> - t4_wrq_tx(sc, wr); >>> + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); >>> >>> if (sync && e->state != L2T_STATE_SWITCHING) >>> e->state = L2T_STATE_SYNC_WRITE; >>> >>> Modified: head/sys/dev/cxgbe/t4_main.c >>> >>> =========================================================================== >>> >>> === >>> --- head/sys/dev/cxgbe/t4_main.c Wed Dec 31 22:52:43 2014 >>> (r276484) >>> +++ head/sys/dev/cxgbe/t4_main.c Wed Dec 31 23:19:16 2014 >>> (r276485) >>> @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); >>> #include "common/t4_regs_values.h" >>> #include "t4_ioctl.h" >>> #include "t4_l2t.h" >>> +#include "t4_mp_ring.h" >>> >>> /* T4 bus driver interface */ >>> static int t4_probe(device_t); >>> @@ -378,7 +379,8 @@ static void build_medialist(struct port_ >>> static int cxgbe_init_synchronized(struct port_info *); >>> static int cxgbe_uninit_synchronized(struct port_info *); >>> static int setup_intr_handlers(struct adapter *); >>> -static void quiesce_eq(struct adapter *, struct sge_eq *); >>> +static void quiesce_txq(struct adapter *, struct sge_txq *); >>> +static void quiesce_wrq(struct adapter *, struct sge_wrq *); >>> static void quiesce_iq(struct adapter *, struct sge_iq *); >>> static void quiesce_fl(struct adapter *, struct sge_fl *); >>> static int t4_alloc_irq(struct adapter *, struct irq *, int rid, >>> @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER >>> static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); >>> static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); >>> #endif >>> -static inline void txq_start(struct ifnet *, struct sge_txq *); >>> static uint32_t fconf_to_mode(uint32_t); >>> static uint32_t mode_to_fconf(uint32_t); >>> static uint32_t fspec_to_fconf(struct t4_filter_specification *); >>> @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, struct >>> { >>> struct port_info *pi = ifp->if_softc; >>> struct adapter *sc = pi->adapter; >>> - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; >>> - struct buf_ring *br; >>> + struct sge_txq *txq; >>> + void *items[1]; >>> int rc; >>> >>> M_ASSERTPKTHDR(m); >>> + MPASS(m->m_nextpkt == NULL); /* not quite ready for >>> this yet */ >>> >>> if (__predict_false(pi->link_cfg.link_ok == 0)) { >>> m_freem(m); >>> return (ENETDOWN); >>> } >>> >>> - /* check if flowid is set */ >>> - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>> - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>> rsrv_noflowq)) >>> - + pi->rsrv_noflowq); >>> - br = txq->br; >>> - >>> - if (TXQ_TRYLOCK(txq) == 0) { >>> - struct sge_eq *eq = &txq->eq; >>> - >>> - /* >>> - * It is possible that t4_eth_tx finishes up and >>> releases >>> the >>> - * lock between the TRYLOCK above and the >>> drbr_enqueue >>> here. We >>> - * need to make sure that this mbuf doesn't just >>> sit there >>> in >>> - * the drbr. >>> - */ >>> - >>> - rc = drbr_enqueue(ifp, br, m); >>> - if (rc == 0 && callout_pending(&eq->tx_callout) >>> == 0 && >>> - !(eq->flags & EQ_DOOMED)) >>> - callout_reset(&eq->tx_callout, 1, >>> t4_tx_callout, >>> eq); >>> + rc = parse_pkt(&m); >>> + if (__predict_false(rc != 0)) { >>> + MPASS(m == NULL); /* was >>> freed >>> already */ >>> + atomic_add_int(&pi->tx_parse_error, 1); /* rare, >>> atomic is >>> ok */ >>> return (rc); >>> } >>> >>> - /* >>> - * txq->m is the mbuf that is held up due to a temporary >>> shortage >>> of >>> - * resources and it should be put on the wire first. >>> Then what's >>> in >>> - * drbr and finally the mbuf that was just passed in to us. >>> - * >>> - * Return code should indicate the fate of the mbuf that >>> was passed >>> in >>> - * this time. >>> - */ >>> - >>> - TXQ_LOCK_ASSERT_OWNED(txq); >>> - if (drbr_needs_enqueue(ifp, br) || txq->m) { >>> - >>> - /* Queued for transmission. */ >>> - >>> - rc = drbr_enqueue(ifp, br, m); >>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>> - (void) t4_eth_tx(ifp, txq, m); >>> - TXQ_UNLOCK(txq); >>> - return (rc); >>> - } >>> + /* Select a txq. */ >>> + txq = &sc->sge.txq[pi->first_txq]; >>> + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>> + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>> rsrv_noflowq)) + >>> + pi->rsrv_noflowq); >>> >>> - /* Direct transmission. */ >>> - rc = t4_eth_tx(ifp, txq, m); >>> - if (rc != 0 && txq->m) >>> - rc = 0; /* held, will be transmitted soon >>> (hopefully) */ >>> + items[0] = m; >>> + rc = mp_ring_enqueue(txq->r, items, 1, 4096); >>> + if (__predict_false(rc != 0)) >>> + m_freem(m); >>> >>> - TXQ_UNLOCK(txq); >>> return (rc); >>> } >>> >>> @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) >>> struct port_info *pi = ifp->if_softc; >>> struct sge_txq *txq; >>> int i; >>> - struct mbuf *m; >>> >>> /* queues do not exist if !PORT_INIT_DONE. */ >>> if (pi->flags & PORT_INIT_DONE) { >>> for_each_txq(pi, i, txq) { >>> TXQ_LOCK(txq); >>> - m_freem(txq->m); >>> - txq->m = NULL; >>> - while ((m = >>> buf_ring_dequeue_sc(txq->br)) != NULL) >>> - m_freem(m); >>> + txq->eq.flags &= ~EQ_ENABLED; >>> TXQ_UNLOCK(txq); >>> + while (!mp_ring_is_idle(txq->r)) { >>> + mp_ring_check_drainage(txq->r, 0); >>> + pause("qflush", 1); >>> + } >>> } >>> } >>> if_qflush(ifp); >>> @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift >>> struct sge_txq *txq; >>> >>> for_each_txq(pi, i, txq) >>> - drops += txq->br->br_drops; >>> + drops += >>> counter_u64_fetch(txq->r->drops); >>> } >>> >>> return (drops); >>> @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info >>> { >>> struct adapter *sc = pi->adapter; >>> struct ifnet *ifp = pi->ifp; >>> - int rc = 0; >>> + int rc = 0, i; >>> + struct sge_txq *txq; >>> >>> ASSERT_SYNCHRONIZED_OP(sc); >>> >>> @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info >>> } >>> >>> /* >>> + * Can't fail from this point onwards. Review >>> cxgbe_uninit_synchronized >>> + * if this changes. >>> + */ >>> + >>> + for_each_txq(pi, i, txq) { >>> + TXQ_LOCK(txq); >>> + txq->eq.flags |= EQ_ENABLED; >>> + TXQ_UNLOCK(txq); >>> + } >>> + >>> + /* >>> * The first iq of the first port to come up is used for >>> tracing. >>> */ >>> if (sc->traceq < 0) { >>> @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in >>> { >>> struct adapter *sc = pi->adapter; >>> struct ifnet *ifp = pi->ifp; >>> - int rc; >>> + int rc, i; >>> + struct sge_txq *txq; >>> >>> ASSERT_SYNCHRONIZED_OP(sc); >>> >>> @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in >>> return (rc); >>> } >>> >>> + for_each_txq(pi, i, txq) { >>> + TXQ_LOCK(txq); >>> + txq->eq.flags &= ~EQ_ENABLED; >>> + TXQ_UNLOCK(txq); >>> + } >>> + >>> clrbit(&sc->open_device_map, pi->port_id); >>> PORT_LOCK(pi); >>> ifp->if_drv_flags &= ~IFF_DRV_RUNNING; >>> @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) >>> >>> if (pi->flags & PORT_INIT_DONE) { >>> >>> - /* Need to quiesce queues. XXX: ctrl queues? */ >>> + /* Need to quiesce queues. */ >>> + >>> + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); >>> >>> for_each_txq(pi, i, txq) { >>> - quiesce_eq(sc, &txq->eq); >>> + quiesce_txq(sc, txq); >>> } >>> >>> #ifdef TCP_OFFLOAD >>> for_each_ofld_txq(pi, i, ofld_txq) { >>> - quiesce_eq(sc, &ofld_txq->eq); >>> + quiesce_wrq(sc, ofld_txq); >>> } >>> #endif >>> >>> @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) >>> } >>> >>> static void >>> -quiesce_eq(struct adapter *sc, struct sge_eq *eq) >>> +quiesce_txq(struct adapter *sc, struct sge_txq *txq) >>> { >>> - EQ_LOCK(eq); >>> - eq->flags |= EQ_DOOMED; >>> + struct sge_eq *eq = &txq->eq; >>> + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; >>> >>> - /* >>> - * Wait for the response to a credit flush if one's >>> - * pending. >>> - */ >>> - while (eq->flags & EQ_CRFLUSHED) >>> - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); >>> - EQ_UNLOCK(eq); >>> + (void) sc; /* unused */ >>> >>> - callout_drain(&eq->tx_callout); /* XXX: iffy */ >>> - pause("callout", 10); /* Still iffy */ >>> +#ifdef INVARIANTS >>> + TXQ_LOCK(txq); >>> + MPASS((eq->flags & EQ_ENABLED) == 0); >>> + TXQ_UNLOCK(txq); >>> +#endif >>> >>> - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); >>> + /* Wait for the mp_ring to empty. */ >>> + while (!mp_ring_is_idle(txq->r)) { >>> + mp_ring_check_drainage(txq->r, 0); >>> + pause("rquiesce", 1); >>> + } >>> + >>> + /* Then wait for the hardware to finish. */ >>> + while (spg->cidx != htobe16(eq->pidx)) >>> + pause("equiesce", 1); >>> + >>> + /* Finally, wait for the driver to reclaim all >>> descriptors. */ >>> + while (eq->cidx != eq->pidx) >>> + pause("dquiesce", 1); >>> +} >>> + >>> +static void >>> +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) >>> +{ >>> + >>> + /* XXXTX */ >>> } >>> >>> static void >>> @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) >>> oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", >>> CTLFLAG_RD, >>> NULL, "port statistics"); >>> children = SYSCTL_CHILDREN(oid); >>> + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, "tx_parse_error", >>> CTLFLAG_RD, >>> + &pi->tx_parse_error, 0, >>> + "# of tx packets with invalid length or # of >>> segments"); >>> >>> #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ >>> SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ >>> @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) >>> } >>> #endif >>> >>> -static inline void >>> -txq_start(struct ifnet *ifp, struct sge_txq *txq) >>> -{ >>> - struct buf_ring *br; >>> - struct mbuf *m; >>> - >>> - TXQ_LOCK_ASSERT_OWNED(txq); >>> - >>> - br = txq->br; >>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>> - if (m) >>> - t4_eth_tx(ifp, txq, m); >>> -} >>> - >>> -void >>> -t4_tx_callout(void *arg) >>> -{ >>> - struct sge_eq *eq = arg; >>> - struct adapter *sc; >>> - >>> - if (EQ_TRYLOCK(eq) == 0) >>> - goto reschedule; >>> - >>> - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { >>> - EQ_UNLOCK(eq); >>> -reschedule: >>> - if (__predict_true(!(eq->flags && EQ_DOOMED))) >>> - callout_schedule(&eq->tx_callout, 1); >>> - return; >>> - } >>> - >>> - EQ_LOCK_ASSERT_OWNED(eq); >>> - >>> - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { >>> - >>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>> - struct sge_txq *txq = arg; >>> - struct port_info *pi = txq->ifp->if_softc; >>> - >>> - sc = pi->adapter; >>> - } else { >>> - struct sge_wrq *wrq = arg; >>> - >>> - sc = wrq->adapter; >>> - } >>> - >>> - taskqueue_enqueue(sc->tq[eq->tx_chan], >>> &eq->tx_task); >>> - } >>> - >>> - EQ_UNLOCK(eq); >>> -} >>> - >>> -void >>> -t4_tx_task(void *arg, int count) >>> -{ >>> - struct sge_eq *eq = arg; >>> - >>> - EQ_LOCK(eq); >>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>> - struct sge_txq *txq = arg; >>> - txq_start(txq->ifp, txq); >>> - } else { >>> - struct sge_wrq *wrq = arg; >>> - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); >>> - } >>> - EQ_UNLOCK(eq); >>> -} >>> - >>> static uint32_t >>> fconf_to_mode(uint32_t fconf) >>> { >>> @@ -7452,9 +7394,9 @@ static int >>> set_filter_wr(struct adapter *sc, int fidx) >>> { >>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>> - struct wrqe *wr; >>> struct fw_filter_wr *fwr; >>> unsigned int ftid; >>> + struct wrq_cookie cookie; >>> >>> ASSERT_SYNCHRONIZED_OP(sc); >>> >>> @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, int fi >>> >>> ftid = sc->tids.ftid_base + fidx; >>> >>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>> - if (wr == NULL) >>> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), >>> 16), & >>> cookie); >>> + if (fwr == NULL) >>> return (ENOMEM); >>> - >>> - fwr = wrtod(wr); >>> - bzero(fwr, sizeof (*fwr)); >>> + bzero(fwr, sizeof(*fwr)); >>> >>> fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); >>> fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); >>> @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi >>> f->pending = 1; >>> sc->tids.ftids_in_use++; >>> >>> - t4_wrq_tx(sc, wr); >>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>> return (0); >>> } >>> >>> @@ -7555,22 +7495,21 @@ static int >>> del_filter_wr(struct adapter *sc, int fidx) >>> { >>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>> - struct wrqe *wr; >>> struct fw_filter_wr *fwr; >>> unsigned int ftid; >>> + struct wrq_cookie cookie; >>> >>> ftid = sc->tids.ftid_base + fidx; >>> >>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>> - if (wr == NULL) >>> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), >>> 16), & >>> cookie); >>> + if (fwr == NULL) >>> return (ENOMEM); >>> - fwr = wrtod(wr); >>> bzero(fwr, sizeof (*fwr)); >>> >>> t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); >>> >>> f->pending = 1; >>> - t4_wrq_tx(sc, wr); >>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>> return (0); >>> } >>> >>> @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long >>> >>> /* MAC stats */ >>> t4_clr_port_stats(sc, pi->tx_chan); >>> + pi->tx_parse_error = 0; >>> >>> if (pi->flags & PORT_INIT_DONE) { >>> struct sge_rxq *rxq; >>> @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned long >>> txq->imm_wrs = 0; >>> txq->sgl_wrs = 0; >>> txq->txpkt_wrs = 0; >>> - txq->txpkts_wrs = 0; >>> - txq->txpkts_pkts = 0; >>> - txq->br->br_drops = 0; >>> - txq->no_dmamap = 0; >>> - txq->no_desc = 0; >>> + txq->txpkts0_wrs = 0; >>> + txq->txpkts1_wrs = 0; >>> + txq->txpkts0_pkts = 0; >>> + txq->txpkts1_pkts = 0; >>> + mp_ring_reset_stats(txq->r); >>> } >>> >>> #ifdef TCP_OFFLOAD >>> /* nothing to clear for each ofld_rxq */ >>> >>> for_each_ofld_txq(pi, i, wrq) { >>> - wrq->tx_wrs = 0; >>> - wrq->no_desc = 0; >>> + wrq->tx_wrs_direct = 0; >>> + wrq->tx_wrs_copied = 0; >>> } >>> #endif >>> wrq = &sc->sge.ctrlq[pi->port_id]; >>> - wrq->tx_wrs = 0; >>> - wrq->no_desc = 0; >>> + wrq->tx_wrs_direct = 0; >>> + wrq->tx_wrs_copied = 0; >>> } >>> break; >>> } >>> >>> Added: head/sys/dev/cxgbe/t4_mp_ring.c >>> >>> =========================================================================== >>> >>> === >>> --- /dev/null 00:00:00 1970 (empty, because file is newly >>> added) >>> +++ head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 >>> (r276485) >>> @@ -0,0 +1,364 @@ >>> +/*- >>> + * Copyright (c) 2014 Chelsio Communications, Inc. >>> + * All rights reserved. >>> + * Written by: Navdeep Parhar >>> + * >>> + * Redistribution and use in source and binary forms, with or >>> without >>> + * modification, are permitted provided that the following >>> conditions >>> + * are met: >>> + * 1. Redistributions of source code must retain the above >>> copyright >>> + * notice, this list of conditions and the following >>> disclaimer. >>> + * 2. Redistributions in binary form must reproduce the above >>> copyright >>> + * notice, this list of conditions and the following >>> disclaimer in the >>> + * documentation and/or other materials provided with the >>> distribution. >>> + * >>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS >>> ``AS IS'' AND >>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >>> LIMITED TO, THE >>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A >>> PARTICULAR >>> PURPOSE >>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR >>> CONTRIBUTORS BE LIABLE >>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >>> CONSEQUENTIAL >>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >>> SUBSTITUTE GOODS >>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >>> INTERRUPTION) >>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >>> CONTRACT, >>> STRICT >>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >>> ARISING IN ANY >>> WAY >>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >>> POSSIBILITY OF >>> + * SUCH DAMAGE. >>> + */ >>> + >>> +#include >>> +__FBSDID("$FreeBSD$"); >>> + >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> +#include >>> + >>> +#include "t4_mp_ring.h" >>> + >>> +union ring_state { >>> + struct { >>> + uint16_t pidx_head; >>> + uint16_t pidx_tail; >>> + uint16_t cidx; >>> + uint16_t flags; >>> + }; >>> + uint64_t state; >>> +}; >>> + >>> +enum { >>> + IDLE = 0, /* consumer ran to completion, nothing >>> more to do. >>> */ >>> + BUSY, /* consumer is running already, or will >>> be shortly. >>> */ >>> + STALLED, /* consumer stopped due to lack of >>> resources. */ >>> + ABDICATED, /* consumer stopped even though there >>> was work to >>> be >>> + done because it wants another thread >>> to take >>> over. */ >>> +}; >>> + >>> +static inline uint16_t >>> +space_available(struct mp_ring *r, union ring_state s) >>> +{ >>> + uint16_t x = r->size - 1; >>> + >>> + if (s.cidx == s.pidx_head) >>> + return (x); >>> + else if (s.cidx > s.pidx_head) >>> + return (s.cidx - s.pidx_head - 1); >>> + else >>> + return (x - s.pidx_head + s.cidx); >>> +} >>> + >>> +static inline uint16_t >>> +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) >>> +{ >>> + int x = r->size - idx; >>> + >>> + MPASS(x > 0); >>> + return (x > n ? idx + n : n - x); >>> +} >>> + >>> +/* Consumer is about to update the ring's state to s */ >>> +static inline uint16_t >>> +state_to_flags(union ring_state s, int abdicate) >>> +{ >>> + >>> + if (s.cidx == s.pidx_tail) >>> + return (IDLE); >>> + else if (abdicate && s.pidx_tail != s.pidx_head) >>> + return (ABDICATED); >>> + >>> + return (BUSY); >>> +} >>> + >>> +/* >>> + * Caller passes in a state, with a guarantee that there is >>> work to do and >>> that >>> + * all items up to the pidx_tail in the state are visible. >>> + */ >>> +static void >>> +drain_ring(struct mp_ring *r, union ring_state os, uint16_t >>> prev, int >>> budget) >>> +{ >>> + union ring_state ns; >>> + int n, pending, total; >>> + uint16_t cidx = os.cidx; >>> + uint16_t pidx = os.pidx_tail; >>> + >>> + MPASS(os.flags == BUSY); >>> + MPASS(cidx != pidx); >>> + >>> + if (prev == IDLE) >>> + counter_u64_add(r->starts, 1); >>> + pending = 0; >>> + total = 0; >>> + >>> + while (cidx != pidx) { >>> + >>> + /* Items from cidx to pidx are available for >>> consumption. * >>> / >>> + n = r->drain(r, cidx, pidx); >>> + if (n == 0) { >>> + critical_enter(); >>> + do { >>> + os.state = ns.state = r->state; >>> + ns.cidx = cidx; >>> + ns.flags = STALLED; >>> + } while (atomic_cmpset_64(&r->state, >>> os.state, >>> + ns.state) == 0); >>> + critical_exit(); >>> + if (prev != STALLED) >>> + counter_u64_add(r->stalls, 1); >>> + else if (total > 0) { >>> + counter_u64_add(r->restarts, 1); >>> + counter_u64_add(r->stalls, 1); >>> + } >>> + break; >>> + } >>> + cidx = increment_idx(r, cidx, n); >>> + pending += n; >>> + total += n; >>> + >>> + /* >>> + * We update the cidx only if we've caught up >>> with the >>> pidx, the >>> + * real cidx is getting too far ahead of the one >>> visible to >>> + * everyone else, or we have exceeded our budget. >>> + */ >>> + if (cidx != pidx && pending < 64 && total < budget) >>> + continue; >>> + critical_enter(); >>> + do { >>> + os.state = ns.state = r->state; >>> + ns.cidx = cidx; >>> + ns.flags = state_to_flags(ns, total >= >>> budget); >>> + } while (atomic_cmpset_acq_64(&r->state, os.state, >>> ns.state) == 0); >>> + critical_exit(); >>> + >>> + if (ns.flags == ABDICATED) >>> + counter_u64_add(r->abdications, 1); >>> + if (ns.flags != BUSY) { >>> + /* Wrong loop exit if we're going to >>> stall. */ >>> + MPASS(ns.flags != STALLED); >>> + if (prev == STALLED) { >>> + MPASS(total > 0); >>> + counter_u64_add(r->restarts, 1); >>> + } >>> + break; >>> + } >>> + >>> + /* >>> + * The acquire style atomic above guarantees >>> visibility of >>> items >>> + * associated with any pidx change that we >>> notice here. >>> + */ >>> + pidx = ns.pidx_tail; >>> + pending = 0; >>> + } >>> +} >>> + >>> +int >>> +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, >>> ring_drain_t >>> drain, >>> + ring_can_drain_t can_drain, struct malloc_type *mt, int flags) >>> +{ >>> + struct mp_ring *r; >>> + >>> + /* All idx are 16b so size can be 65536 at most */ >>> + if (pr == NULL || size < 2 || size > 65536 || drain == >>> NULL || >>> + can_drain == NULL) >>> + return (EINVAL); >>> + *pr = NULL; >>> + flags &= M_NOWAIT | M_WAITOK; >>> + MPASS(flags != 0); >>> + >>> + r = malloc(__offsetof(struct mp_ring, items[size]), mt, >>> flags | >>> M_ZERO); >>> + if (r == NULL) >>> + return (ENOMEM); >>> + r->size = size; >>> + r->cookie = cookie; >>> + r->mt = mt; >>> + r->drain = drain; >>> + r->can_drain = can_drain; >>> + r->enqueues = counter_u64_alloc(flags); >>> + r->drops = counter_u64_alloc(flags); >>> + r->starts = counter_u64_alloc(flags); >>> + r->stalls = counter_u64_alloc(flags); >>> + r->restarts = counter_u64_alloc(flags); >>> + r->abdications = counter_u64_alloc(flags); >>> + if (r->enqueues == NULL || r->drops == NULL || r->starts >>> == NULL || >>> + r->stalls == NULL || r->restarts == NULL || >>> + r->abdications == NULL) { >>> + mp_ring_free(r); >>> + return (ENOMEM); >>> + } >>> + >>> + *pr = r; >>> + return (0); >>> +} >>> + >>> +void >>> + >>> +mp_ring_free(struct mp_ring *r) >>> +{ >>> + >>> + if (r == NULL) >>> + return; >>> + >>> + if (r->enqueues != NULL) >>> + counter_u64_free(r->enqueues); >>> + if (r->drops != NULL) >>> + counter_u64_free(r->drops); >>> + if (r->starts != NULL) >>> + counter_u64_free(r->starts); >>> + if (r->stalls != NULL) >>> + counter_u64_free(r->stalls); >>> + if (r->restarts != NULL) >>> + counter_u64_free(r->restarts); >>> + if (r->abdications != NULL) >>> + counter_u64_free(r->abdications); >>> + >>> + free(r, r->mt); >>> +} >>> + >>> +/* >>> + * Enqueue n items and maybe drain the ring for some time. >>> + * >>> + * Returns an errno. >>> + */ >>> +int >>> +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int >>> budget) >>> +{ >>> + union ring_state os, ns; >>> + uint16_t pidx_start, pidx_stop; >>> + int i; >>> + >>> + MPASS(items != NULL); >>> + MPASS(n > 0); >>> + >>> >>> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>> >>> >>> >>> >>> >>> -- >>> -----------------------------------------+------------------------------- >>> >>> Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. >>> dell'Informazione >>> http://www.iet.unipi.it/~luigi/ . Universita` di Pisa >>> TEL +39-050-2211611 . via Diotisalvi 2 >>> Mobile +39-338-6809875 . 56122 PISA (Italy) >>> -----------------------------------------+------------------------------- >>> > From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:35:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBE14991; Tue, 20 Jan 2015 23:35:28 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92332E51; Tue, 20 Jan 2015 23:35:28 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id E899C192A3B; Tue, 20 Jan 2015 23:35:25 +0000 (UTC) Message-ID: <54BEE62D.2060703@ignoranthack.me> Date: Tue, 20 Jan 2015 15:35:09 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Hans Petter Selasky , Gleb Smirnoff , Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> In-Reply-To: <54BED6FB.8060401@selasky.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Jason Wolfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:35:28 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/20/15 14:30, Hans Petter Selasky wrote: > On 01/20/15 22:11, Gleb Smirnoff wrote: >> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin Belousov >> wrote: K> > Like stated in the manual page, >> callout_reset_curcpu/on() does not work K> > with MPSAFE callouts >> any more! K> I.e. you 'fixed' some undeterminate bugs in callout >> migration by not K> doing migration at all anymore. K> K> > K> > >> You need to use callout_init_{mtx,rm,rw} and remove the custom >> locking K> > inside the callback in the TCP stack to get it >> working like before! K> K> No, you need to do this, if you think >> that whole callout KPI must be K> rototiled. It is up to the >> person who modifies the KPI, to ensure that K> existing code is >> not broken. K> K> As I understand, currently we are back to the >> one-cpu callouts. K> Do other people consider this situation >> acceptable ? >> >> I think this isn't acceptable. The commit to a complex subsystem >> lacked a review from persons involved in the system before. The >> commit to subsystem broke consumers of the subsystem and this was >> even done not accidentially, but due to Hans not caring about >> it. >> >> As for me this is enough to request a backout, and let the >> change back in only after proper review. >> > > Hi Gleb, > > Backing out my callout API patch means we will for sure > re-introduce an unknown callout spinlock hang, as noted to me by > several people. What do you think about that? dram Maybe "Jason > Wolfe" CC'ed can add to 10-stable w/o my patches: > Jason picked up this patch for work and it resolved our instability issues that had remained unsolved for quite some time as reported to freebsd-net: https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html This had gone undiagnosed for some time (even with the gracious help of jhb in offline emails, thanks btw!). There's some diagnostics in that email thread that may be of value to you folks for determination of the validity of changing the callout API or at least understanding why we were involved in diagnostics. While I'd sure love to tune performance, the fact that our machines were basically going out to lunch without these changes, probably means that others were seeing it and didn't know what else to do. As much as I enjoy a good "break out the pitch forks and torches" email thread, this increased stability for us and is allowing us to upgrade from freebsd8 to freebsd10. Bear this in mind when you throw your voice in favor of reverting. > int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, > sbintime_t precision, void (*ftn)(void *), void *arg, int cpu, int > flags) { sbintime_t to_sbt, pr; struct callout_cpu *cc; int > cancelled, direct; > > + cpu = timeout_cpu; /* XXX test code XXX */ > > cancelled = 0; > Jason or I would have to run this in production, which would be problematic I fear. We never had a deterministic test case that would exhibit the reported failure. We merely "tested in production" and saw that panics ceased. We didn't note a dropoff in our traffic either, perhaps we are not as efficient as others in this corner case, but we were consistently seeing the spinlock hangs after a day or so of traffic. > And see if he observes a callout spinlock hang or not on his test > setup. The patch above should force all callouts to the same thread > basically. Then we could maybe see if single threading the callouts > has anything to do with solving the spinlock hang. > > The "rewritten" callout API still has all the features and > capabilities the old one had, when used as described in "man 9 > callout". > > At the present moment I'm not technically convinced a backout is > correct. Neither am I, to be honest. Just based on *results*. > > Gleb: I think we would see far better results with high speed > internet links using TCP if we could extend the LRO (large receive > offload) code to accumulate more than 64KBytes worth of data per > call to the TCP stack instead of complaining about some callouts > ending up on the same thread! Actually I have a patch for that. > > --HPS > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUvuYrXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kJTMIAMfh6ghV/AwQauY+a44q1hjJ WC7E3u69FK0opgSYg71kk6HckbyB+sTWND6HdXnpyrcMLXUt74zlB8c48wbUUV5+ EwKNYzGNNnDNhoc0WtPMect8e9Y1kBRvSGfHBdVrqATXfPOyZEa+i4lQAXpiFKIt nndqVrAH7bJM6143YDpnIg7vaR+8IQnC2ztSP4ogJzh03DZ7zVsg4BsoCPg50eVZ kr46cXcE+SP/TsQBsVNVwRJD5NFie6QJdLoTnwkd0XfQGJMIWivNgUcE4tIxqPIf nGQ0xMJCotpNLuPtzYzCIurSaDHdHmL6bjkhjTtBmWsMNfdGH8TKoih79GDxkTg= =Y3rd -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:39:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A2F8B0E; Tue, 20 Jan 2015 23:39:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 132D5E73; Tue, 20 Jan 2015 23:39:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KNdBUj007347; Tue, 20 Jan 2015 23:39:11 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KNd9J6007337; Tue, 20 Jan 2015 23:39:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501202339.t0KNd9J6007337@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Tue, 20 Jan 2015 23:39:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277457 - in stable/10: . etc etc/mtree tools/build/mk X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:39:11 -0000 Author: ngie Date: Tue Jan 20 23:39:08 2015 New Revision: 277457 URL: https://svnweb.freebsd.org/changeset/base/277457 Log: MFC r275907: r275907 (by ngie): Fix building/installing tests when TESTSBASE != /usr/tests The work in r258233 hardcoded the assumption that tests was the last component of the tests tree by pushing tests as an explicit prefix for the paths in BSD.tests.dist and /usr was the prefix for all tests, per BSD.usr.dist and all of the mtree calls used in Makefile.inc1. This assumption breaks if/when one provides a custom TESTSBASE "prefix", e.g. TESTSBASE=/mytests . One thing that r258233 did properly though was remove "/usr/tests" creation from BSD.usr.dist -- that should have not been there in the first place. That was an "oops" on my part for the work that was originally committed in r241823 Phabric: D1301 Reviewed by: imp Sponsored by: EMC / Isilon Storage Division Modified: stable/10/Makefile.inc1 stable/10/etc/Makefile stable/10/etc/mtree/BSD.include.dist stable/10/etc/mtree/BSD.tests.dist stable/10/etc/mtree/BSD.usr.dist stable/10/tools/build/mk/OptionalObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/Makefile.inc1 ============================================================================== --- stable/10/Makefile.inc1 Tue Jan 20 23:05:00 2015 (r277456) +++ stable/10/Makefile.inc1 Tue Jan 20 23:39:08 2015 (r277457) @@ -513,8 +513,9 @@ _worldtmp: -p ${WORLDTMP}/usr/lib >/dev/null .endif .if ${MK_TESTS} != "no" + mkdir -p ${WORLDTMP}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ - -p ${WORLDTMP}/usr >/dev/null + -p ${WORLDTMP}${TESTSBASE} >/dev/null .endif .for _mtree in ${LOCAL_MTREE} mtree -deU -f ${.CURDIR}/${_mtree} -p ${WORLDTMP} > /dev/null @@ -853,8 +854,9 @@ distributeworld installworld: _installch -p ${DESTDIR}/${DISTDIR}/${dist}/usr/lib >/dev/null .endif .if ${MK_TESTS} != "no" && ${dist} == "tests" + -mkdir -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ - -p ${DESTDIR}/${DISTDIR}/${dist}/usr >/dev/null + -p ${DESTDIR}/${DISTDIR}/${dist}${TESTSBASE} >/dev/null .endif .if defined(NO_ROOT) ${IMAKEENV} nmtree -C -f ${.CURDIR}/etc/mtree/BSD.root.dist | \ @@ -1997,8 +1999,9 @@ _xi-mtree: mtree -deU -f ${.CURDIR}/etc/mtree/BSD.include.dist \ -p ${XDDESTDIR}/usr/include >/dev/null .if ${MK_TESTS} != "no" + mkdir -p ${XDDESTDIR}${TESTSBASE} mtree -deU -f ${.CURDIR}/etc/mtree/BSD.tests.dist \ - -p ${XDDESTDIR}/usr >/dev/null + -p ${XDDESTDIR}${TESTSBASE} >/dev/null .endif .ORDER: xdev-build _xi-mtree _xi-cross-tools _xi-includes _xi-libraries _xi-links Modified: stable/10/etc/Makefile ============================================================================== --- stable/10/etc/Makefile Tue Jan 20 23:05:00 2015 (r277456) +++ stable/10/etc/Makefile Tue Jan 20 23:39:08 2015 (r277457) @@ -327,7 +327,7 @@ MTREES+= mtree/BSD.debug.dist /usr/lib MTREES+= mtree/BSD.groff.dist /usr .endif .if ${MK_TESTS} != "no" -MTREES+= mtree/BSD.tests.dist /usr +MTREES+= mtree/BSD.tests.dist ${TESTSBASE} .endif .if ${MK_SENDMAIL} != "no" MTREES+= mtree/BSD.sendmail.dist / @@ -343,6 +343,7 @@ distrib-dirs: ${MTREES:N/*} shift; \ d=${DESTDIR}$$1; \ shift; \ + test -d $$d || mkdir -p $$d; \ ${ECHO} ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} \ -f $$m -p $$d; \ ${MTREE_CMD} -deU ${MTREE_FOLLOWS_SYMLINKS} -f $$m -p $$d; \ @@ -356,6 +357,7 @@ distrib-dirs: ${MTREES:N/*} test "$$d" == "/" && d=""; \ d=${DISTBASE}$$d; \ shift; \ + test -d $$d || mkdir -p $$d; \ ${ECHO} "${MTREE_CMD:N-W} -C -f $$m -K uname,gname | " \ "sed s#^\.#.$$d# | ${METALOG.add}" ; \ ${MTREE_CMD:N-W} -C -f $$m -K uname,gname | sed s#^\.#.$$d# | \ Modified: stable/10/etc/mtree/BSD.include.dist ============================================================================== --- stable/10/etc/mtree/BSD.include.dist Tue Jan 20 23:05:00 2015 (r277456) +++ stable/10/etc/mtree/BSD.include.dist Tue Jan 20 23:39:08 2015 (r277457) @@ -9,6 +9,10 @@ .. arpa .. + atf-c + .. + atf-c++ + .. bsm .. bsnmp Modified: stable/10/etc/mtree/BSD.tests.dist ============================================================================== --- stable/10/etc/mtree/BSD.tests.dist Tue Jan 20 23:05:00 2015 (r277456) +++ stable/10/etc/mtree/BSD.tests.dist Tue Jan 20 23:39:08 2015 (r277457) @@ -5,394 +5,378 @@ /set type=dir uname=root gname=wheel mode=0755 . - include - atf-c + bin + chown .. - atf-c++ + date .. - .. - share - atf + mv .. - doc - atf - .. - pjdfstest - .. + pax .. - .. - tests - bin - date + pkill + .. + sh + builtins .. - mv + errors .. - pax + execution .. - pkill + expansion .. - sh - builtins - .. - errors - .. - execution - .. - expansion - .. - parameters - .. - parser - .. - set-e - .. + parameters .. - sleep + parser .. - test + set-e .. .. - cddl - lib - .. - sbin - .. - usr.bin - .. - usr.sbin - .. + sleep .. - etc + test .. - games + .. + cddl + lib .. - gnu - lib - .. - usr.bin - diff - .. - .. + sbin + .. + usr.bin + .. + usr.sbin .. + .. + etc + .. + games + .. + gnu lib - atf - libatf-c - detail - .. - .. - libatf-c++ - detail - .. - .. - test-programs - .. + .. + usr.bin + diff .. - libc - c063 - .. - db - .. - gen - execve - .. - posix_spawn - .. + .. + .. + lib + atf + libatf-c + detail .. - hash - data - .. + .. + libatf-c++ + detail .. - inet + .. + test-programs + .. + .. + libc + c063 + .. + db + .. + gen + execve .. - locale + posix_spawn .. - net - getaddrinfo - data - .. - .. + .. + hash + data .. - regex + .. + inet + .. + locale + .. + net + getaddrinfo data .. .. - ssp - .. - stdio - .. - stdlib - .. - string - .. - sys - .. - time - .. - tls - dso - .. - .. - termios - .. - ttyio + .. + regex + data .. .. - libcrypt + ssp + .. + stdio .. - libmp + stdlib .. - librt + string .. - libthr - dlopen + sys + .. + time + .. + tls + dso .. .. - libutil + termios + .. + ttyio + .. + .. + libcrypt + .. + libmp + .. + librt + .. + libthr + dlopen + .. + .. + libutil + .. + msun + .. + .. + libexec + atf + atf-check .. - msun + atf-sh .. .. + .. + sbin + dhclient + .. + devd + .. + growfs + .. + mdconfig + .. + .. + secure + lib + .. libexec - atf - atf-check + .. + usr.bin + .. + usr.sbin + .. + .. + share + examples + tests + atf .. - atf-sh + plain .. .. .. - sbin - dhclient + .. + sys + kern + .. + netinet + .. + pjdfstest + chflags .. - devd + chmod .. - growfs + chown .. - mdconfig + ftruncate .. - .. - secure - lib + granular .. - libexec + link .. - usr.bin + mkdir .. - usr.sbin + mkfifo .. - .. - share - examples - tests - atf - .. - plain - .. - .. + mknod .. - .. - sys - kern + open + .. + rename + .. + rmdir .. - netinet + symlink .. - pjdfstest - chflags + truncate + .. + unlink + .. + .. + .. + usr.bin + apply + .. + basename + .. + bmake + archives + fmt_44bsd .. - chmod + fmt_44bsd_mod .. - chown + fmt_oldbsd .. - ftruncate + .. + basic + t0 .. - granular + t1 .. - link + t2 .. - mkdir + t3 .. - mkfifo + .. + execution + ellipsis .. - mknod + empty .. - open + joberr .. - rename + plus .. - rmdir + .. + shell + builtin .. - symlink + meta .. - truncate + path .. - unlink + path_select .. - .. - .. - usr.bin - apply - .. - basename - .. - bmake - archives - fmt_44bsd - .. - fmt_44bsd_mod - .. - fmt_oldbsd - .. + replace .. + select + .. + .. + suffixes basic - t0 - .. - t1 - .. - t2 - .. - t3 - .. .. - execution - ellipsis - .. - empty - .. - joberr - .. - plus - .. + src_wild1 .. - shell - builtin - .. - meta - .. - path - .. - path_select - .. - replace - .. - select - .. + src_wild2 .. - suffixes - basic - .. - src_wild1 - .. - src_wild2 - .. + .. + syntax + directive-t0 .. - syntax - directive-t0 - .. - enl - .. - funny-targets - .. - semi - .. + enl .. - sysmk - t0 - 2 - 1 - .. - .. - mk - .. - .. - t1 - 2 - 1 - .. - .. - mk + funny-targets + .. + semi + .. + .. + sysmk + t0 + 2 + 1 .. .. - t2 - 2 - 1 - .. - .. - mk - .. + mk .. .. - variables - modifier_M + t1 + 2 + 1 + .. .. - modifier_t + mk .. - opt_V + .. + t2 + 2 + 1 + .. .. - t0 + mk .. .. .. - calendar - .. - cmp - .. - comm - .. - cut - .. - dirname - .. - file2c - .. - grep - .. - gzip - .. - join - .. - jot - .. - lastcomm - .. - m4 - .. - ncal - .. - opensm - .. - printf - .. - sed - regress.multitest.out + variables + modifier_M .. - .. - tr - .. - truncate - .. - uudecode - .. - uuencode - .. - xargs - .. - yacc - yacc + modifier_t + .. + opt_V + .. + t0 .. .. .. - usr.sbin - etcupdate - .. - newsyslog - .. - nmtree - .. - pw + calendar + .. + cmp + .. + comm + .. + cut + .. + dirname + .. + file2c + .. + grep + .. + gzip + .. + join + .. + jot + .. + lastcomm + .. + m4 + .. + ncal + .. + opensm + .. + printf + .. + sed + regress.multitest.out .. - sa + .. + tr + .. + truncate + .. + uudecode + .. + uuencode + .. + xargs + .. + yacc + yacc .. .. .. + usr.sbin + etcupdate + .. + newsyslog + .. + nmtree + .. + pw + .. + sa + .. + .. .. # vim: set expandtab ts=4 sw=4: Modified: stable/10/etc/mtree/BSD.usr.dist ============================================================================== --- stable/10/etc/mtree/BSD.usr.dist Tue Jan 20 23:05:00 2015 (r277456) +++ stable/10/etc/mtree/BSD.usr.dist Tue Jan 20 23:39:08 2015 (r277457) @@ -126,6 +126,8 @@ sbin .. share + atf + .. bsdconfig media .. @@ -169,6 +171,8 @@ doc IPv6 .. + atf + .. atm .. legal @@ -189,6 +193,8 @@ .. papers .. + pjdfstest + .. psd 01.cacm .. Modified: stable/10/tools/build/mk/OptionalObsoleteFiles.inc ============================================================================== --- stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Jan 20 23:05:00 2015 (r277456) +++ stable/10/tools/build/mk/OptionalObsoleteFiles.inc Tue Jan 20 23:39:08 2015 (r277457) @@ -4585,10 +4585,10 @@ OLD_FILES+=usr/share/man/man4/atf-test-c OLD_FILES+=usr/share/mk/atf.test.mk # Test suite. -. if(exists(${DESTDIR}/usr/tests/)) -TESTS_DIRS!=find ${DESTDIR}/usr/tests -type d | sed -e 's,^${DESTDIR}/,,'; echo +. if exists(${DESTDIR}${TESTSBASE}) +TESTS_DIRS!=find ${DESTDIR}${TESTSBASE} -type d | sed -e 's,^${DESTDIR}/,,'; echo OLD_DIRS+=${TESTS_DIRS} -TESTS_FILES!=find ${DESTDIR}/usr/tests \! -type d | sed -e 's,^${DESTDIR}/,,'; echo +TESTS_FILES!=find ${DESTDIR}${TESTSBASE} \! -type d | sed -e 's,^${DESTDIR}/,,'; echo OLD_FILES+=${TESTS_FILES} . endif .endif # Test suite. From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:39:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2593DC40; Tue, 20 Jan 2015 23:39:51 +0000 (UTC) Received: from mail-pa0-x234.google.com (mail-pa0-x234.google.com [IPv6:2607:f8b0:400e:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DCFC5E7C; Tue, 20 Jan 2015 23:39:50 +0000 (UTC) Received: by mail-pa0-f52.google.com with SMTP id kx10so18202426pab.11; Tue, 20 Jan 2015 15:39:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=OO0IsrzIa+yF+Y9dTe7RSTvOrSDGBszNetsP2KYVkAk=; b=c6DMyysZAhhbReyvaxCPp7O+h+e7sLoVq0FJL+h5jJOcyvTho74p1hHbszCpGrSqum tlw0L2Y9bKMtL+8l67VyNuKzpen3GiRG8Y+GYJnzRRsvkLnXsbzTA8BZMg5p/gp8ohLN 5Q0AQbkLEDyxW8uR+8lIHSZBMTu9ir3yhR3MBKAl/vaVxtuHfvtWAwZHVl1YHt5y8g13 NzPkf/wKo89VU6OkAE1qtFQUaDFd5vHZk7PcJu9dLTr/JE0KW9UC04YZNXx38N7v9oQD jXRwLRK01C47Ck3piBSLFB5xYC4lq7JS2mc/ODkj4m+Guaq5XD+kYEFFltnP7WCgqfr1 d3RQ== X-Received: by 10.66.250.166 with SMTP id zd6mr56042719pac.41.1421797190419; Tue, 20 Jan 2015 15:39:50 -0800 (PST) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id yq5sm4312910pac.15.2015.01.20.15.39.48 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 15:39:49 -0800 (PST) Sender: Navdeep Parhar Message-ID: <54BEE743.7030601@FreeBSD.org> Date: Tue, 20 Jan 2015 15:39:47 -0800 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: sbruno@freebsd.org, Hans Petter Selasky , Gleb Smirnoff , Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> In-Reply-To: <54BEE62D.2060703@ignoranthack.me> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Jason Wolfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:39:51 -0000 Sean, Was this really "Reviewed by: sbruno@" or just "Tested by: sbruno@"? I was very happy to see so many reviewers on the original commit but you seem to be the only one still left on the list. Regards, Navdeep On 01/20/15 15:35, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/20/15 14:30, Hans Petter Selasky wrote: >> On 01/20/15 22:11, Gleb Smirnoff wrote: >>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin Belousov >>> wrote: K> > Like stated in the manual page, >>> callout_reset_curcpu/on() does not work K> > with MPSAFE callouts >>> any more! K> I.e. you 'fixed' some undeterminate bugs in callout >>> migration by not K> doing migration at all anymore. K> K> > K> > >>> You need to use callout_init_{mtx,rm,rw} and remove the custom >>> locking K> > inside the callback in the TCP stack to get it >>> working like before! K> K> No, you need to do this, if you think >>> that whole callout KPI must be K> rototiled. It is up to the >>> person who modifies the KPI, to ensure that K> existing code is >>> not broken. K> K> As I understand, currently we are back to the >>> one-cpu callouts. K> Do other people consider this situation >>> acceptable ? >>> >>> I think this isn't acceptable. The commit to a complex subsystem >>> lacked a review from persons involved in the system before. The >>> commit to subsystem broke consumers of the subsystem and this was >>> even done not accidentially, but due to Hans not caring about >>> it. >>> >>> As for me this is enough to request a backout, and let the >>> change back in only after proper review. >>> >> >> Hi Gleb, >> >> Backing out my callout API patch means we will for sure >> re-introduce an unknown callout spinlock hang, as noted to me by >> several people. What do you think about that? dram Maybe "Jason >> Wolfe" CC'ed can add to 10-stable w/o my patches: >> > > Jason picked up this patch for work and it resolved our instability > issues that had remained unsolved for quite some time as reported to > freebsd-net: > > https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html > > This had gone undiagnosed for some time (even with the gracious help > of jhb in offline emails, thanks btw!). > > There's some diagnostics in that email thread that may be of value to > you folks for determination of the validity of changing the callout > API or at least understanding why we were involved in diagnostics. > > While I'd sure love to tune performance, the fact that our machines > were basically going out to lunch without these changes, probably > means that others were seeing it and didn't know what else to do. As > much as I enjoy a good "break out the pitch forks and torches" email > thread, this increased stability for us and is allowing us to upgrade > from freebsd8 to freebsd10. Bear this in mind when you throw your > voice in favor of reverting. > >> int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, >> sbintime_t precision, void (*ftn)(void *), void *arg, int cpu, int >> flags) { sbintime_t to_sbt, pr; struct callout_cpu *cc; int >> cancelled, direct; >> >> + cpu = timeout_cpu; /* XXX test code XXX */ >> >> cancelled = 0; >> > > Jason or I would have to run this in production, which would be > problematic I fear. We never had a deterministic test case that would > exhibit the reported failure. We merely "tested in production" and > saw that panics ceased. We didn't note a dropoff in our traffic > either, perhaps we are not as efficient as others in this corner case, > but we were consistently seeing the spinlock hangs after a day or so > of traffic. > >> And see if he observes a callout spinlock hang or not on his test >> setup. The patch above should force all callouts to the same thread >> basically. Then we could maybe see if single threading the callouts >> has anything to do with solving the spinlock hang. >> >> The "rewritten" callout API still has all the features and >> capabilities the old one had, when used as described in "man 9 >> callout". >> >> At the present moment I'm not technically convinced a backout is >> correct. > > Neither am I, to be honest. Just based on *results*. > >> >> Gleb: I think we would see far better results with high speed >> internet links using TCP if we could extend the LRO (large receive >> offload) code to accumulate more than 64KBytes worth of data per >> call to the TCP stack instead of complaining about some callouts >> ending up on the same thread! Actually I have a patch for that. >> >> --HPS >> >> >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQF8BAEBCgBmBQJUvuYrXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kJTMIAMfh6ghV/AwQauY+a44q1hjJ > WC7E3u69FK0opgSYg71kk6HckbyB+sTWND6HdXnpyrcMLXUt74zlB8c48wbUUV5+ > EwKNYzGNNnDNhoc0WtPMect8e9Y1kBRvSGfHBdVrqATXfPOyZEa+i4lQAXpiFKIt > nndqVrAH7bJM6143YDpnIg7vaR+8IQnC2ztSP4ogJzh03DZ7zVsg4BsoCPg50eVZ > kr46cXcE+SP/TsQBsVNVwRJD5NFie6QJdLoTnwkd0XfQGJMIWivNgUcE4tIxqPIf > nGQ0xMJCotpNLuPtzYzCIurSaDHdHmL6bjkhjTtBmWsMNfdGH8TKoih79GDxkTg= > =Y3rd > -----END PGP SIGNATURE----- > From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:40:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B130AD84; Tue, 20 Jan 2015 23:40:16 +0000 (UTC) Received: from mail-yk0-x22b.google.com (mail-yk0-x22b.google.com [IPv6:2607:f8b0:4002:c07::22b]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 646ABE86; Tue, 20 Jan 2015 23:40:16 +0000 (UTC) Received: by mail-yk0-f171.google.com with SMTP id 10so5243861ykt.2; Tue, 20 Jan 2015 15:40:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=9bFAJdLE5sFn/ThVb+TOCqf1rdErdUTB70w1x4Hb+5k=; b=KMiIi1NBsXq/GhqiyUb+NOP6oztJE6fkuJcIHStzEe5aKSznP72DSm9srnuKHe17ZY fSAeQaHySrs2/jRMzNpC+e/HWtccwLH2mTmcascaasAuFERB7eB/GxzRL1qAu9714kOE Ujj/D0uyVDM/TW6g4G5gJckg+DWJUNerLdkCjPQVq3M+fLQjMCN2uk77tjG6Y274wAe4 aoMUpBBDxKqgVRqRYutr7OB/9BYQcVfVg6YH6rj22/qRRlSl2fwu13sU1KD6GfHCy15l dxHs5jRUSf+Vrbcg/BIUfgU1ivRfeCaDGz6NjPjUbNeMPl6n38Shud+pymCIfwNRY4ii 6QJw== MIME-Version: 1.0 X-Received: by 10.170.57.143 with SMTP id 137mr8189323ykz.10.1421797215562; Tue, 20 Jan 2015 15:40:15 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Tue, 20 Jan 2015 15:40:15 -0800 (PST) In-Reply-To: <54BEE62D.2060703@ignoranthack.me> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> Date: Tue, 20 Jan 2015 15:40:15 -0800 X-Google-Sender-Auth: TCMvssV_b-y4xnPC2DU8I4XNojY Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:40:16 -0000 I think you're working around driver locking bugs by crippling the callout code. -K On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/20/15 14:30, Hans Petter Selasky wrote: >> On 01/20/15 22:11, Gleb Smirnoff wrote: >>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin Belousov >>> wrote: K> > Like stated in the manual page, >>> callout_reset_curcpu/on() does not work K> > with MPSAFE callouts >>> any more! K> I.e. you 'fixed' some undeterminate bugs in callout >>> migration by not K> doing migration at all anymore. K> K> > K> > >>> You need to use callout_init_{mtx,rm,rw} and remove the custom >>> locking K> > inside the callback in the TCP stack to get it >>> working like before! K> K> No, you need to do this, if you think >>> that whole callout KPI must be K> rototiled. It is up to the >>> person who modifies the KPI, to ensure that K> existing code is >>> not broken. K> K> As I understand, currently we are back to the >>> one-cpu callouts. K> Do other people consider this situation >>> acceptable ? >>> >>> I think this isn't acceptable. The commit to a complex subsystem >>> lacked a review from persons involved in the system before. The >>> commit to subsystem broke consumers of the subsystem and this was >>> even done not accidentially, but due to Hans not caring about >>> it. >>> >>> As for me this is enough to request a backout, and let the >>> change back in only after proper review. >>> >> >> Hi Gleb, >> >> Backing out my callout API patch means we will for sure >> re-introduce an unknown callout spinlock hang, as noted to me by >> several people. What do you think about that? dram Maybe "Jason >> Wolfe" CC'ed can add to 10-stable w/o my patches: >> > > Jason picked up this patch for work and it resolved our instability > issues that had remained unsolved for quite some time as reported to > freebsd-net: > > https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html > > This had gone undiagnosed for some time (even with the gracious help > of jhb in offline emails, thanks btw!). > > There's some diagnostics in that email thread that may be of value to > you folks for determination of the validity of changing the callout > API or at least understanding why we were involved in diagnostics. > > While I'd sure love to tune performance, the fact that our machines > were basically going out to lunch without these changes, probably > means that others were seeing it and didn't know what else to do. As > much as I enjoy a good "break out the pitch forks and torches" email > thread, this increased stability for us and is allowing us to upgrade > from freebsd8 to freebsd10. Bear this in mind when you throw your > voice in favor of reverting. > >> int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, >> sbintime_t precision, void (*ftn)(void *), void *arg, int cpu, int >> flags) { sbintime_t to_sbt, pr; struct callout_cpu *cc; int >> cancelled, direct; >> >> + cpu = timeout_cpu; /* XXX test code XXX */ >> >> cancelled = 0; >> > > Jason or I would have to run this in production, which would be > problematic I fear. We never had a deterministic test case that would > exhibit the reported failure. We merely "tested in production" and > saw that panics ceased. We didn't note a dropoff in our traffic > either, perhaps we are not as efficient as others in this corner case, > but we were consistently seeing the spinlock hangs after a day or so > of traffic. > >> And see if he observes a callout spinlock hang or not on his test >> setup. The patch above should force all callouts to the same thread >> basically. Then we could maybe see if single threading the callouts >> has anything to do with solving the spinlock hang. >> >> The "rewritten" callout API still has all the features and >> capabilities the old one had, when used as described in "man 9 >> callout". >> >> At the present moment I'm not technically convinced a backout is >> correct. > > Neither am I, to be honest. Just based on *results*. > >> >> Gleb: I think we would see far better results with high speed >> internet links using TCP if we could extend the LRO (large receive >> offload) code to accumulate more than 64KBytes worth of data per >> call to the TCP stack instead of complaining about some callouts >> ending up on the same thread! Actually I have a patch for that. >> >> --HPS >> >> >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQF8BAEBCgBmBQJUvuYrXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kJTMIAMfh6ghV/AwQauY+a44q1hjJ > WC7E3u69FK0opgSYg71kk6HckbyB+sTWND6HdXnpyrcMLXUt74zlB8c48wbUUV5+ > EwKNYzGNNnDNhoc0WtPMect8e9Y1kBRvSGfHBdVrqATXfPOyZEa+i4lQAXpiFKIt > nndqVrAH7bJM6143YDpnIg7vaR+8IQnC2ztSP4ogJzh03DZ7zVsg4BsoCPg50eVZ > kr46cXcE+SP/TsQBsVNVwRJD5NFie6QJdLoTnwkd0XfQGJMIWivNgUcE4tIxqPIf > nGQ0xMJCotpNLuPtzYzCIurSaDHdHmL6bjkhjTtBmWsMNfdGH8TKoih79GDxkTg= > =Y3rd > -----END PGP SIGNATURE----- > _______________________________________________ > svn-src-head@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:44:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9FC2DF1B; Tue, 20 Jan 2015 23:44:40 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74C81F31; Tue, 20 Jan 2015 23:44:40 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 20310192A3B; Tue, 20 Jan 2015 23:44:39 +0000 (UTC) Message-ID: <54BEE866.6090106@ignoranthack.me> Date: Tue, 20 Jan 2015 15:44:38 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Navdeep Parhar , Hans Petter Selasky , Gleb Smirnoff , Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE743.7030601@FreeBSD.org> In-Reply-To: <54BEE743.7030601@FreeBSD.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Jason Wolfe X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:44:40 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/20/15 15:39, Navdeep Parhar wrote: > Sean, > > Was this really "Reviewed by: sbruno@" or just "Tested by: > sbruno@"? I was very happy to see so many reviewers on the > original commit but you seem to be the only one still left on the > list. > > Regards, Navdeep I doubt that I would qualify as a "Reviewer" in this code by any stretch of the imagination. My contribution to the testing was in house and general review of code flow in out freebsd10 environment. sean > > On 01/20/15 15:35, Sean Bruno wrote: On 01/20/15 14:30, Hans Petter > Selasky wrote: >>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin >>>>> Belousov wrote: K> > Like stated in the manual page, >>>>> callout_reset_curcpu/on() does not work K> > with MPSAFE >>>>> callouts any more! K> I.e. you 'fixed' some undeterminate >>>>> bugs in callout migration by not K> doing migration at all >>>>> anymore. K> K> > K> > You need to use >>>>> callout_init_{mtx,rm,rw} and remove the custom locking K> > >>>>> inside the callback in the TCP stack to get it working like >>>>> before! K> K> No, you need to do this, if you think that >>>>> whole callout KPI must be K> rototiled. It is up to the >>>>> person who modifies the KPI, to ensure that K> existing >>>>> code is not broken. K> K> As I understand, currently we are >>>>> back to the one-cpu callouts. K> Do other people consider >>>>> this situation acceptable ? >>>>> >>>>> I think this isn't acceptable. The commit to a complex >>>>> subsystem lacked a review from persons involved in the >>>>> system before. The commit to subsystem broke consumers of >>>>> the subsystem and this was even done not accidentially, but >>>>> due to Hans not caring about it. >>>>> >>>>> As for me this is enough to request a backout, and let the >>>>> change back in only after proper review. >>>>> >>>> >>>> Hi Gleb, >>>> >>>> Backing out my callout API patch means we will for sure >>>> re-introduce an unknown callout spinlock hang, as noted to me >>>> by several people. What do you think about that? dram Maybe >>>> "Jason Wolfe" CC'ed can add to 10-stable w/o my patches: >>>> > > Jason picked up this patch for work and it resolved our > instability issues that had remained unsolved for quite some time > as reported to freebsd-net: > > https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html > > This had gone undiagnosed for some time (even with the gracious > help of jhb in offline emails, thanks btw!). > > There's some diagnostics in that email thread that may be of value > to you folks for determination of the validity of changing the > callout API or at least understanding why we were involved in > diagnostics. > > While I'd sure love to tune performance, the fact that our > machines were basically going out to lunch without these changes, > probably means that others were seeing it and didn't know what else > to do. As much as I enjoy a good "break out the pitch forks and > torches" email thread, this increased stability for us and is > allowing us to upgrade from freebsd8 to freebsd10. Bear this in > mind when you throw your voice in favor of reverting. > >>>> int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, >>>> sbintime_t precision, void (*ftn)(void *), void *arg, int >>>> cpu, int flags) { sbintime_t to_sbt, pr; struct callout_cpu >>>> *cc; int cancelled, direct; >>>> >>>> + cpu = timeout_cpu; /* XXX test code XXX */ >>>> >>>> cancelled = 0; >>>> > > Jason or I would have to run this in production, which would be > problematic I fear. We never had a deterministic test case that > would exhibit the reported failure. We merely "tested in > production" and saw that panics ceased. We didn't note a dropoff > in our traffic either, perhaps we are not as efficient as others in > this corner case, but we were consistently seeing the spinlock > hangs after a day or so of traffic. > >>>> And see if he observes a callout spinlock hang or not on his >>>> test setup. The patch above should force all callouts to the >>>> same thread basically. Then we could maybe see if single >>>> threading the callouts has anything to do with solving the >>>> spinlock hang. >>>> >>>> The "rewritten" callout API still has all the features and >>>> capabilities the old one had, when used as described in "man >>>> 9 callout". >>>> >>>> At the present moment I'm not technically convinced a backout >>>> is correct. > > Neither am I, to be honest. Just based on *results*. > >>>> >>>> Gleb: I think we would see far better results with high >>>> speed internet links using TCP if we could extend the LRO >>>> (large receive offload) code to accumulate more than 64KBytes >>>> worth of data per call to the TCP stack instead of >>>> complaining about some callouts ending up on the same thread! >>>> Actually I have a patch for that. >>>> >>>> --HPS >>>> >>>> >>>> > >> > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUvuhjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kz74H/RVMvCmstmep+rXvwYNXwQvQ M45uwBUYe27qL1Z11qbMwghV0tkLWPkko7Nwgb+BwDhNcqsgxvGxH/8i8ohElHs2 8Pbec9ajuZtDuhPL8ldibntT7OZJYUUkTbvC7sxlT0MCHyuu+Dn8wKR5BtgcmhCW rCEkanrXtGHZdP+JnN9zvo4jcxC2pDNxd/7poo3dDLf75z76k+gGborubGoYP36C 6356JneibgbybjhjK0qWW15b5sZyCgtbS1TQq2avmRdSDtyv6umPVCsS1p2JTKnS o6LChkGvtUb+HDLkQMHYoNF6KMNRefIiYqvXtnzvxCv1yjoDz9zEv5vRm/Y21Xc= =luC8 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:46:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D33B4E0; Tue, 20 Jan 2015 23:46:48 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 980D4F44; Tue, 20 Jan 2015 23:46:48 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 54547192A3B; Tue, 20 Jan 2015 23:46:47 +0000 (UTC) Message-ID: <54BEE8E6.3080009@ignoranthack.me> Date: Tue, 20 Jan 2015 15:46:46 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:46:49 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/20/15 15:40, K. Macy wrote: > I think you're working around driver locking bugs by crippling the > callout code. > > -K > We had zero evidence of this. What leads you down that path? I'm totally open to being wrong, e.g. "yeah, you slowed down things so that you don't hit a race condition" sean > On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno > wrote: On 01/20/15 14:30, Hans Petter > Selasky wrote: >>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin >>>>> Belousov wrote: K> > Like stated in the manual page, >>>>> callout_reset_curcpu/on() does not work K> > with MPSAFE >>>>> callouts any more! K> I.e. you 'fixed' some undeterminate >>>>> bugs in callout migration by not K> doing migration at all >>>>> anymore. K> K> > K> > You need to use >>>>> callout_init_{mtx,rm,rw} and remove the custom locking K> > >>>>> inside the callback in the TCP stack to get it working like >>>>> before! K> K> No, you need to do this, if you think that >>>>> whole callout KPI must be K> rototiled. It is up to the >>>>> person who modifies the KPI, to ensure that K> existing >>>>> code is not broken. K> K> As I understand, currently we are >>>>> back to the one-cpu callouts. K> Do other people consider >>>>> this situation acceptable ? >>>>> >>>>> I think this isn't acceptable. The commit to a complex >>>>> subsystem lacked a review from persons involved in the >>>>> system before. The commit to subsystem broke consumers of >>>>> the subsystem and this was even done not accidentially, but >>>>> due to Hans not caring about it. >>>>> >>>>> As for me this is enough to request a backout, and let the >>>>> change back in only after proper review. >>>>> >>>> >>>> Hi Gleb, >>>> >>>> Backing out my callout API patch means we will for sure >>>> re-introduce an unknown callout spinlock hang, as noted to me >>>> by several people. What do you think about that? dram Maybe >>>> "Jason Wolfe" CC'ed can add to 10-stable w/o my patches: >>>> > > Jason picked up this patch for work and it resolved our > instability issues that had remained unsolved for quite some time > as reported to freebsd-net: > > https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html > > This had gone undiagnosed for some time (even with the gracious > help of jhb in offline emails, thanks btw!). > > There's some diagnostics in that email thread that may be of value > to you folks for determination of the validity of changing the > callout API or at least understanding why we were involved in > diagnostics. > > While I'd sure love to tune performance, the fact that our > machines were basically going out to lunch without these changes, > probably means that others were seeing it and didn't know what else > to do. As much as I enjoy a good "break out the pitch forks and > torches" email thread, this increased stability for us and is > allowing us to upgrade from freebsd8 to freebsd10. Bear this in > mind when you throw your voice in favor of reverting. > >>>> int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, >>>> sbintime_t precision, void (*ftn)(void *), void *arg, int >>>> cpu, int flags) { sbintime_t to_sbt, pr; struct callout_cpu >>>> *cc; int cancelled, direct; >>>> >>>> + cpu = timeout_cpu; /* XXX test code XXX */ >>>> >>>> cancelled = 0; >>>> > > Jason or I would have to run this in production, which would be > problematic I fear. We never had a deterministic test case that > would exhibit the reported failure. We merely "tested in > production" and saw that panics ceased. We didn't note a dropoff > in our traffic either, perhaps we are not as efficient as others in > this corner case, but we were consistently seeing the spinlock > hangs after a day or so of traffic. > >>>> And see if he observes a callout spinlock hang or not on his >>>> test setup. The patch above should force all callouts to the >>>> same thread basically. Then we could maybe see if single >>>> threading the callouts has anything to do with solving the >>>> spinlock hang. >>>> >>>> The "rewritten" callout API still has all the features and >>>> capabilities the old one had, when used as described in "man >>>> 9 callout". >>>> >>>> At the present moment I'm not technically convinced a backout >>>> is correct. > > Neither am I, to be honest. Just based on *results*. > >>>> >>>> Gleb: I think we would see far better results with high >>>> speed internet links using TCP if we could extend the LRO >>>> (large receive offload) code to accumulate more than 64KBytes >>>> worth of data per call to the TCP stack instead of >>>> complaining about some callouts ending up on the same thread! >>>> Actually I have a patch for that. >>>> >>>> --HPS >>>> >>>> >>>> > >> _______________________________________________ >> 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" > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUvujmXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kv2MH/1F15x/lgwWq5fE/cZ3n9HlV 9Nd7DU03coj9qUU6LH1eLPPuUn7yelCw8xxtb0qOTIDyrzNYe+HIaJi1GMHkV8Ve iKFuB1G9gcN/nQ5BdaAezOazEUcRY2msigMh5n/2X/UDRzLAGfhbDFbogpRy1TyI fqKzYDM8Mx9yZfCuc4/yBUVmxDcVn6NsuQ7CW745qXQcrELdJ8fjKfaYWbprCR7u xA3Iwiio9Bv0/8MvR9n3PZ8z3NjAKD1XxV5iAPI+ANc/5Rc60cSmtP0mQakqOoz6 8uucaus79KdykdNovh31ka0dp0JBCghZOsfNXP69TFfvSXyngMZqwZgqVLVcX3M= =0AV4 -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:48:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EABC9222; Tue, 20 Jan 2015 23:48:06 +0000 (UTC) Received: from mail-yh0-x230.google.com (mail-yh0-x230.google.com [IPv6:2607:f8b0:4002:c01::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB1EFF4B; Tue, 20 Jan 2015 23:48:06 +0000 (UTC) Received: by mail-yh0-f48.google.com with SMTP id a41so5473131yho.7; Tue, 20 Jan 2015 15:48:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ys/gb57OI3eZ7XOY7tNt1O7PLAwVgHYynV1B53vbTug=; b=xt2tt23lG0vsoVcCm230nShvB3lIG8X3sMUimbjmaiteDdMlCBBYcE4XcK/V9t3KEH nnsTGYrdSAUt3zNXCIqxKFMhxHmaNUuHBkY+a2wdR8bjvOArxoIP2M6ehN7penEe3Q4A HXcGpVL0nDQOV/RK9jL9g00LElFQE6XEUGF6ht6ddZ+F+4jKQ0X9ov1zmL1wj98cnEXT SldoSC9pyETVN6sjzsiQvG6cmMW5lKciUuhLwcAVbE/tAEO9seL3E875pWy7XJFHIlNL glMy5POfVgaE7yifoSorNZtcvOAxfM4sprLi2rh9P9b4g1HulzKyNEvbldFAl1dvA0Jc MI9Q== MIME-Version: 1.0 X-Received: by 10.236.89.172 with SMTP id c32mr22709191yhf.180.1421797685822; Tue, 20 Jan 2015 15:48:05 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Tue, 20 Jan 2015 15:48:05 -0800 (PST) In-Reply-To: <54BEE8E6.3080009@ignoranthack.me> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> Date: Tue, 20 Jan 2015 15:48:05 -0800 X-Google-Sender-Auth: l7UP_U1iq2RWv4WgNDglT54hWB4 Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:48:07 -0000 Are any other drivers hitting this? e.g. cxgb/cxgbe? -K On Tue, Jan 20, 2015 at 3:46 PM, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/20/15 15:40, K. Macy wrote: >> I think you're working around driver locking bugs by crippling the >> callout code. >> >> -K >> > > We had zero evidence of this. What leads you down that path? I'm > totally open to being wrong, e.g. "yeah, you slowed down things so > that you don't hit a race condition" > > sean > >> On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno >> wrote: On 01/20/15 14:30, Hans Petter >> Selasky wrote: >>>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin >>>>>> Belousov wrote: K> > Like stated in the manual page, >>>>>> callout_reset_curcpu/on() does not work K> > with MPSAFE >>>>>> callouts any more! K> I.e. you 'fixed' some undeterminate >>>>>> bugs in callout migration by not K> doing migration at all >>>>>> anymore. K> K> > K> > You need to use >>>>>> callout_init_{mtx,rm,rw} and remove the custom locking K> > >>>>>> inside the callback in the TCP stack to get it working like >>>>>> before! K> K> No, you need to do this, if you think that >>>>>> whole callout KPI must be K> rototiled. It is up to the >>>>>> person who modifies the KPI, to ensure that K> existing >>>>>> code is not broken. K> K> As I understand, currently we are >>>>>> back to the one-cpu callouts. K> Do other people consider >>>>>> this situation acceptable ? >>>>>> >>>>>> I think this isn't acceptable. The commit to a complex >>>>>> subsystem lacked a review from persons involved in the >>>>>> system before. The commit to subsystem broke consumers of >>>>>> the subsystem and this was even done not accidentially, but >>>>>> due to Hans not caring about it. >>>>>> >>>>>> As for me this is enough to request a backout, and let the >>>>>> change back in only after proper review. >>>>>> >>>>> >>>>> Hi Gleb, >>>>> >>>>> Backing out my callout API patch means we will for sure >>>>> re-introduce an unknown callout spinlock hang, as noted to me >>>>> by several people. What do you think about that? dram Maybe >>>>> "Jason Wolfe" CC'ed can add to 10-stable w/o my patches: >>>>> >> >> Jason picked up this patch for work and it resolved our >> instability issues that had remained unsolved for quite some time >> as reported to freebsd-net: >> >> https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html >> >> This had gone undiagnosed for some time (even with the gracious >> help of jhb in offline emails, thanks btw!). >> >> There's some diagnostics in that email thread that may be of value >> to you folks for determination of the validity of changing the >> callout API or at least understanding why we were involved in >> diagnostics. >> >> While I'd sure love to tune performance, the fact that our >> machines were basically going out to lunch without these changes, >> probably means that others were seeing it and didn't know what else >> to do. As much as I enjoy a good "break out the pitch forks and >> torches" email thread, this increased stability for us and is >> allowing us to upgrade from freebsd8 to freebsd10. Bear this in >> mind when you throw your voice in favor of reverting. >> >>>>> int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, >>>>> sbintime_t precision, void (*ftn)(void *), void *arg, int >>>>> cpu, int flags) { sbintime_t to_sbt, pr; struct callout_cpu >>>>> *cc; int cancelled, direct; >>>>> >>>>> + cpu = timeout_cpu; /* XXX test code XXX */ >>>>> >>>>> cancelled = 0; >>>>> >> >> Jason or I would have to run this in production, which would be >> problematic I fear. We never had a deterministic test case that >> would exhibit the reported failure. We merely "tested in >> production" and saw that panics ceased. We didn't note a dropoff >> in our traffic either, perhaps we are not as efficient as others in >> this corner case, but we were consistently seeing the spinlock >> hangs after a day or so of traffic. >> >>>>> And see if he observes a callout spinlock hang or not on his >>>>> test setup. The patch above should force all callouts to the >>>>> same thread basically. Then we could maybe see if single >>>>> threading the callouts has anything to do with solving the >>>>> spinlock hang. >>>>> >>>>> The "rewritten" callout API still has all the features and >>>>> capabilities the old one had, when used as described in "man >>>>> 9 callout". >>>>> >>>>> At the present moment I'm not technically convinced a backout >>>>> is correct. >> >> Neither am I, to be honest. Just based on *results*. >> >>>>> >>>>> Gleb: I think we would see far better results with high >>>>> speed internet links using TCP if we could extend the LRO >>>>> (large receive offload) code to accumulate more than 64KBytes >>>>> worth of data per call to the TCP stack instead of >>>>> complaining about some callouts ending up on the same thread! >>>>> Actually I have a patch for that. >>>>> >>>>> --HPS >>>>> >>>>> >>>>> >> >>> _______________________________________________ >>> 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" >> >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQF8BAEBCgBmBQJUvujmXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kv2MH/1F15x/lgwWq5fE/cZ3n9HlV > 9Nd7DU03coj9qUU6LH1eLPPuUn7yelCw8xxtb0qOTIDyrzNYe+HIaJi1GMHkV8Ve > iKFuB1G9gcN/nQ5BdaAezOazEUcRY2msigMh5n/2X/UDRzLAGfhbDFbogpRy1TyI > fqKzYDM8Mx9yZfCuc4/yBUVmxDcVn6NsuQ7CW745qXQcrELdJ8fjKfaYWbprCR7u > xA3Iwiio9Bv0/8MvR9n3PZ8z3NjAKD1XxV5iAPI+ANc/5Rc60cSmtP0mQakqOoz6 > 8uucaus79KdykdNovh31ka0dp0JBCghZOsfNXP69TFfvSXyngMZqwZgqVLVcX3M= > =0AV4 > -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:51:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 430AF471; Tue, 20 Jan 2015 23:51:56 +0000 (UTC) Received: from mail-yk0-x231.google.com (mail-yk0-x231.google.com [IPv6:2607:f8b0:4002:c07::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E8BD4FF8; Tue, 20 Jan 2015 23:51:55 +0000 (UTC) Received: by mail-yk0-f177.google.com with SMTP id 19so1971769ykq.8; Tue, 20 Jan 2015 15:51:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Q/X1v9EUfs/EnEiltc7u0207HQ0LvnhTZsJ67s8QOsU=; b=KG3bwO7O/M7gwdnsSXrKcjGmq1g/J+wjm4pHNo7XQIvijafEAanWHj7ZZ/mgnpSc/O COlNA4rOVPePanIAr1XZ84WOIN2qea2kLddBo2LhFvIK7UPUozFF3ruoBLdvoiyRlbv2 Y3QzbwF76brUQopZjGLtqD02APhCA/sd4aRZKe2uWb62P1rBOdDunR34kzVLlBWTmw36 AhGUGOI0v2XE9auWcJOT31lLkrNabe3jPZZJp3rGRPS9SHgVKwr+oS2KUUxCpJ2X5vso Tn2QTbFUq9l59bjFgpjylAxR42e73YS8y1FW7mrcp+KZm6FYx6I+eDTYpig/FdZsbjjY kx8w== MIME-Version: 1.0 X-Received: by 10.170.44.4 with SMTP id 4mr2900501ykm.101.1421797915016; Tue, 20 Jan 2015 15:51:55 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Tue, 20 Jan 2015 15:51:54 -0800 (PST) In-Reply-To: References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> Date: Tue, 20 Jan 2015 15:51:54 -0800 X-Google-Sender-Auth: 9hW-saO6bX0FxhRQu7tmoJssbOw Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:51:56 -0000 On Tue, Jan 20, 2015 at 3:48 PM, K. Macy wrote: > Are any other drivers hitting this? e.g. cxgb/cxgbe? The evidence is simply past experience of recurring locking and control flow bugs in the intel drivers. -K > > -K > > On Tue, Jan 20, 2015 at 3:46 PM, Sean Bruno wrote: >> -----BEGIN PGP SIGNED MESSAGE----- >> Hash: SHA512 >> >> On 01/20/15 15:40, K. Macy wrote: >>> I think you're working around driver locking bugs by crippling the >>> callout code. >>> >>> -K >>> >> >> We had zero evidence of this. What leads you down that path? I'm >> totally open to being wrong, e.g. "yeah, you slowed down things so >> that you don't hit a race condition" >> >> sean >> >>> On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno >>> wrote: On 01/20/15 14:30, Hans Petter >>> Selasky wrote: >>>>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin >>>>>>> Belousov wrote: K> > Like stated in the manual page, >>>>>>> callout_reset_curcpu/on() does not work K> > with MPSAFE >>>>>>> callouts any more! K> I.e. you 'fixed' some undeterminate >>>>>>> bugs in callout migration by not K> doing migration at all >>>>>>> anymore. K> K> > K> > You need to use >>>>>>> callout_init_{mtx,rm,rw} and remove the custom locking K> > >>>>>>> inside the callback in the TCP stack to get it working like >>>>>>> before! K> K> No, you need to do this, if you think that >>>>>>> whole callout KPI must be K> rototiled. It is up to the >>>>>>> person who modifies the KPI, to ensure that K> existing >>>>>>> code is not broken. K> K> As I understand, currently we are >>>>>>> back to the one-cpu callouts. K> Do other people consider >>>>>>> this situation acceptable ? >>>>>>> >>>>>>> I think this isn't acceptable. The commit to a complex >>>>>>> subsystem lacked a review from persons involved in the >>>>>>> system before. The commit to subsystem broke consumers of >>>>>>> the subsystem and this was even done not accidentially, but >>>>>>> due to Hans not caring about it. >>>>>>> >>>>>>> As for me this is enough to request a backout, and let the >>>>>>> change back in only after proper review. >>>>>>> >>>>>> >>>>>> Hi Gleb, >>>>>> >>>>>> Backing out my callout API patch means we will for sure >>>>>> re-introduce an unknown callout spinlock hang, as noted to me >>>>>> by several people. What do you think about that? dram Maybe >>>>>> "Jason Wolfe" CC'ed can add to 10-stable w/o my patches: >>>>>> >>> >>> Jason picked up this patch for work and it resolved our >>> instability issues that had remained unsolved for quite some time >>> as reported to freebsd-net: >>> >>> https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html >>> >>> This had gone undiagnosed for some time (even with the gracious >>> help of jhb in offline emails, thanks btw!). >>> >>> There's some diagnostics in that email thread that may be of value >>> to you folks for determination of the validity of changing the >>> callout API or at least understanding why we were involved in >>> diagnostics. >>> >>> While I'd sure love to tune performance, the fact that our >>> machines were basically going out to lunch without these changes, >>> probably means that others were seeing it and didn't know what else >>> to do. As much as I enjoy a good "break out the pitch forks and >>> torches" email thread, this increased stability for us and is >>> allowing us to upgrade from freebsd8 to freebsd10. Bear this in >>> mind when you throw your voice in favor of reverting. >>> >>>>>> int callout_reset_sbt_on(struct callout *c, sbintime_t sbt, >>>>>> sbintime_t precision, void (*ftn)(void *), void *arg, int >>>>>> cpu, int flags) { sbintime_t to_sbt, pr; struct callout_cpu >>>>>> *cc; int cancelled, direct; >>>>>> >>>>>> + cpu = timeout_cpu; /* XXX test code XXX */ >>>>>> >>>>>> cancelled = 0; >>>>>> >>> >>> Jason or I would have to run this in production, which would be >>> problematic I fear. We never had a deterministic test case that >>> would exhibit the reported failure. We merely "tested in >>> production" and saw that panics ceased. We didn't note a dropoff >>> in our traffic either, perhaps we are not as efficient as others in >>> this corner case, but we were consistently seeing the spinlock >>> hangs after a day or so of traffic. >>> >>>>>> And see if he observes a callout spinlock hang or not on his >>>>>> test setup. The patch above should force all callouts to the >>>>>> same thread basically. Then we could maybe see if single >>>>>> threading the callouts has anything to do with solving the >>>>>> spinlock hang. >>>>>> >>>>>> The "rewritten" callout API still has all the features and >>>>>> capabilities the old one had, when used as described in "man >>>>>> 9 callout". >>>>>> >>>>>> At the present moment I'm not technically convinced a backout >>>>>> is correct. >>> >>> Neither am I, to be honest. Just based on *results*. >>> >>>>>> >>>>>> Gleb: I think we would see far better results with high >>>>>> speed internet links using TCP if we could extend the LRO >>>>>> (large receive offload) code to accumulate more than 64KBytes >>>>>> worth of data per call to the TCP stack instead of >>>>>> complaining about some callouts ending up on the same thread! >>>>>> Actually I have a patch for that. >>>>>> >>>>>> --HPS >>>>>> >>>>>> >>>>>> >>> >>>> _______________________________________________ >>>> 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" >>> >>> >> >> -----BEGIN PGP SIGNATURE----- >> Version: GnuPG v2 >> >> iQF8BAEBCgBmBQJUvujmXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w >> ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx >> MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kv2MH/1F15x/lgwWq5fE/cZ3n9HlV >> 9Nd7DU03coj9qUU6LH1eLPPuUn7yelCw8xxtb0qOTIDyrzNYe+HIaJi1GMHkV8Ve >> iKFuB1G9gcN/nQ5BdaAezOazEUcRY2msigMh5n/2X/UDRzLAGfhbDFbogpRy1TyI >> fqKzYDM8Mx9yZfCuc4/yBUVmxDcVn6NsuQ7CW745qXQcrELdJ8fjKfaYWbprCR7u >> xA3Iwiio9Bv0/8MvR9n3PZ8z3NjAKD1XxV5iAPI+ANc/5Rc60cSmtP0mQakqOoz6 >> 8uucaus79KdykdNovh31ka0dp0JBCghZOsfNXP69TFfvSXyngMZqwZgqVLVcX3M= >> =0AV4 >> -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:53:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 39A295C0; Tue, 20 Jan 2015 23:53:37 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C47771; Tue, 20 Jan 2015 23:53:36 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id A175F192A3B; Tue, 20 Jan 2015 23:53:35 +0000 (UTC) Message-ID: <54BEEA7F.1070301@ignoranthack.me> Date: Tue, 20 Jan 2015 15:53:35 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:53:37 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/20/15 15:48, K. Macy wrote: > Are any other drivers hitting this? e.g. cxgb/cxgbe? > > -K > Unkown to me. Nor am I aware of anyone else who ever hit our panics either. Our environment, and the failure, was only seen in the Intel 10GE space (ixgbe). This is an artifact of our use cases, and hasn't been expanded nor tested in our environment with other vendor interfaces. sean > On Tue, Jan 20, 2015 at 3:46 PM, Sean Bruno > wrote: On 01/20/15 15:40, K. Macy wrote: >>>> I think you're working around driver locking bugs by >>>> crippling the callout code. >>>> >>>> -K >>>> > > We had zero evidence of this. What leads you down that path? I'm > totally open to being wrong, e.g. "yeah, you slowed down things so > that you don't hit a race condition" > > sean > >>>> On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno >>>> wrote: On 01/20/15 14:30, Hans >>>> Petter Selasky wrote: >>>>>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin >>>>>>>> Belousov wrote: K> > Like stated in the manual page, >>>>>>>> callout_reset_curcpu/on() does not work K> > with >>>>>>>> MPSAFE callouts any more! K> I.e. you 'fixed' some >>>>>>>> undeterminate bugs in callout migration by not K> >>>>>>>> doing migration at all anymore. K> K> > K> > You need >>>>>>>> to use callout_init_{mtx,rm,rw} and remove the custom >>>>>>>> locking K> > inside the callback in the TCP stack to >>>>>>>> get it working like before! K> K> No, you need to do >>>>>>>> this, if you think that whole callout KPI must be K> >>>>>>>> rototiled. It is up to the person who modifies the >>>>>>>> KPI, to ensure that K> existing code is not broken. >>>>>>>> K> K> As I understand, currently we are back to the >>>>>>>> one-cpu callouts. K> Do other people consider this >>>>>>>> situation acceptable ? >>>>>>>> >>>>>>>> I think this isn't acceptable. The commit to a >>>>>>>> complex subsystem lacked a review from persons >>>>>>>> involved in the system before. The commit to >>>>>>>> subsystem broke consumers of the subsystem and this >>>>>>>> was even done not accidentially, but due to Hans not >>>>>>>> caring about it. >>>>>>>> >>>>>>>> As for me this is enough to request a backout, and >>>>>>>> let the change back in only after proper review. >>>>>>>> >>>>>>> >>>>>>> Hi Gleb, >>>>>>> >>>>>>> Backing out my callout API patch means we will for >>>>>>> sure re-introduce an unknown callout spinlock hang, as >>>>>>> noted to me by several people. What do you think about >>>>>>> that? dram Maybe "Jason Wolfe" CC'ed can add to >>>>>>> 10-stable w/o my patches: >>>>>>> >>>> >>>> Jason picked up this patch for work and it resolved our >>>> instability issues that had remained unsolved for quite some >>>> time as reported to freebsd-net: >>>> >>>> https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html >>>> >>>> >>>> This had gone undiagnosed for some time (even with the gracious >>>> help of jhb in offline emails, thanks btw!). >>>> >>>> There's some diagnostics in that email thread that may be of >>>> value to you folks for determination of the validity of >>>> changing the callout API or at least understanding why we >>>> were involved in diagnostics. >>>> >>>> While I'd sure love to tune performance, the fact that our >>>> machines were basically going out to lunch without these >>>> changes, probably means that others were seeing it and didn't >>>> know what else to do. As much as I enjoy a good "break out >>>> the pitch forks and torches" email thread, this increased >>>> stability for us and is allowing us to upgrade from freebsd8 >>>> to freebsd10. Bear this in mind when you throw your voice in >>>> favor of reverting. >>>> >>>>>>> int callout_reset_sbt_on(struct callout *c, sbintime_t >>>>>>> sbt, sbintime_t precision, void (*ftn)(void *), void >>>>>>> *arg, int cpu, int flags) { sbintime_t to_sbt, pr; >>>>>>> struct callout_cpu *cc; int cancelled, direct; >>>>>>> >>>>>>> + cpu = timeout_cpu; /* XXX test code XXX */ >>>>>>> >>>>>>> cancelled = 0; >>>>>>> >>>> >>>> Jason or I would have to run this in production, which would >>>> be problematic I fear. We never had a deterministic test >>>> case that would exhibit the reported failure. We merely >>>> "tested in production" and saw that panics ceased. We didn't >>>> note a dropoff in our traffic either, perhaps we are not as >>>> efficient as others in this corner case, but we were >>>> consistently seeing the spinlock hangs after a day or so of >>>> traffic. >>>> >>>>>>> And see if he observes a callout spinlock hang or not >>>>>>> on his test setup. The patch above should force all >>>>>>> callouts to the same thread basically. Then we could >>>>>>> maybe see if single threading the callouts has anything >>>>>>> to do with solving the spinlock hang. >>>>>>> >>>>>>> The "rewritten" callout API still has all the features >>>>>>> and capabilities the old one had, when used as >>>>>>> described in "man 9 callout". >>>>>>> >>>>>>> At the present moment I'm not technically convinced a >>>>>>> backout is correct. >>>> >>>> Neither am I, to be honest. Just based on *results*. >>>> >>>>>>> >>>>>>> Gleb: I think we would see far better results with >>>>>>> high speed internet links using TCP if we could extend >>>>>>> the LRO (large receive offload) code to accumulate more >>>>>>> than 64KBytes worth of data per call to the TCP stack >>>>>>> instead of complaining about some callouts ending up on >>>>>>> the same thread! Actually I have a patch for that. >>>>>>> >>>>>>> --HPS >>>>>>> >>>>>>> >>>>>>> >>>> >>>>> _______________________________________________ >>>>> 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" >>>> >>>> > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUvup4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kNdgH/iFU6kSAcuPJDwiNONLULu9c Nu9kJzQUgCpROor2CnrsjN0WILWTAfmWaQK1b7ClUIwKPmgzvX09DZdsdfQnIMFR aimC3uKW0rJeMDlQNbN/J2mI5+QOyREUozxb53jetDj9t+OmC08idne0AuYuMgwY NZoKt2llhJScjjEu2EJV9W3FoDCmg/ITA83IbzmmoZHHtXACdDVh0vwmNb1UPluA 0hcJv4rQrY5Khq08a4tonQxTB96Sgk/c+0zPpvqSctKEEmf6TiREbwr68SOM4dkY zLxpD/9IeExFTShJSGW+slKAuzCobr+iG8a9tDLV+STtoAX9i5jyLQLnwDcX7AY= =F1sR -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:56:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD3A9717; Tue, 20 Jan 2015 23:56:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5FF88C; Tue, 20 Jan 2015 23:56:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0KNu8Aj016565; Tue, 20 Jan 2015 23:56:08 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0KNu5ts016548; Tue, 20 Jan 2015 23:56:05 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501202356.t0KNu5ts016548@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Tue, 20 Jan 2015 23:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277458 - in head: release release/amd64 release/i386 release/scripts release/tools share/man/man7 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:56:09 -0000 Author: gjb Date: Tue Jan 20 23:56:04 2015 New Revision: 277458 URL: https://svnweb.freebsd.org/changeset/base/277458 Log: Merge the following revisions from ^/projects/release-vmimage: r273823-r273826, r273833, r273836, r273944, r274069-r274071, r274134, r274211, r274280-r274285, r274287-r274288, r274292, r274296-r274297, r274356, r274533, r274725, r274726, r274729, r274734, r274771, r274945-r274946, r277180, r277183-r277184, r277186-r277187, r277250-r277253, r277263-r277264, r277383-r277384, r277393-r277395, r277438-r277439, r277447, r277455: r273823: Move virtual machine / cloud provider targets and options from release/Makefile to their own Makefile. r273824: Add glue to allow enabling building cloud provider VM images by default. When WITH_CLOUDWARE is not empty, add CLOUDTARGETS to the release/Makefile 'release' target. r273825: Avoid hard-coding the Azure image file format. While here, avoid using OSRELEASE for the output file name. r273826: Remove a few vestiges of passing an exit code to panic(). r273833: Initial commit providing a mechanism to create openstack images as part of the release build. r273836: Fix output file name for openstack images. No further conversion is necessary for this VM file target, so there is no need to append the '.raw' suffix here. r273944: Uncomment the cloudinit rc.conf(5) line. r274069: Add line continuation so OPENSTACKCONF is actually included in the env(1). r274070: Add a 'vm-cloudware' target, used to drive all targets in CLOUDTARGETS. r274071: Add examples for WITH_CLOUDWARE to release.conf.sample. Add WITH_CLOUDWARE evaluation to RELEASE_RMAKEFLAGS. r274134: Initial rewrite to consolidate VM image build scripts into one. r274211: Add write_partition_layout() used to populate the final image. Fix duplicated mkimg(1) call in vm_create_disk(). Add primitive (untested) PowerPC/PowerPC64 VM image support. Note: As it is currently written, the /boot/pmbr and /boot/{gptboot,boot1.hfs} use the build host and not the target build. Fixing this is likely going to be a hack in itself. r274280: Return if vm_create_disk() is unsuccessful. r274281: Add CLEANFILES entry for VM targets r274282: Add vm_extra_pre_umount() prototype to vmimage.subr. r274283: Fix DESTDIR for installworld, and make sure it is created before use. r274284: Move usage() from vmimage.subr to mk-vmimage.sh, in case vmimage.subr has not been sourced. r274285: Spell 'OPTARG' correctly. Actually call vm_create_base(). r274287: Fix line continuation in write_partition_layout(). Remove variable test that is no longer needed. r274288: Fix scheme flag to mkimg(1). r274292: mount(8) and umount(8) devfs(5) as needed. r274296: Change path for mk-vmimage.sh from ${TARGET}/ to scripts/ now that it is consolidated into one file. Fix paths for the base image and output disk image files. r274297: Call cleanup() after everything is done. r274356: Remove a stray directory from CLEANFILES. r274533: Set the boot partition type to 'apple-boot' for powerpc. r274725: In vm_install_base(), copy the host resolv.conf into the build chroot before attempting to do anything that requires working DNS (i.e., pkg bootstrap). In vm_extra_pre_umount(), remove the resolv.conf before the disk image is unmounted from the backing md(4). r274726 (cperciva): Silence errors when umounting the chroot's /dev, since it probably doesn't exist when we're running this. Unmount filesystems before attempting to destroy the md which holds them. r274729 (cperciva): Unmount filesystem and destroy md before we read the vnode from disk and package it into a disk image. Otherwise we end up packaging an unclean filesystem. r274734 (cperciva): Merge duplicative vm-CLOUDTYPE targets before additional duplication gets added by the impending arrival of ec2 and gcloud. r274771 (cperciva): Add NOSWAP option which can be set by a vmimage.conf file to specify that no swap space should be created in the image. This will be used by EC2 builds, since FreeBSD/EC2 allocates swap space on "ephemeral" disks which are physically attached to the Xen host node. r274945: In vm_extra_install_packages(), only bootstrap pkg(8) if VM_EXTRA_PACKAGES is empty. In vm_extra_pre_umount(), cleanup downloaded packages if pkg(8) was bootstrapped earlier. r274946: Fix indentation nit. r277180: In vm_extra_install_base(), do not install waagent in the openstack image, because it is not used. This appears to be a copy mistake. Remove vm_extra_install_base() from the openstack.conf entirely, since it does not need to be overridden. r277183: Enable the textmode console by default for VM images, since there is no way to tell if the environment will be able to use the graphics-mode console. r277184: Enable password-less sudo for openstack images. r277186: Update the VM_EXTRA_PACKAGES list for the openstack images. The documentation suggests doing a "just fetch this and run it"-style bootstrap, from which the list of dependencies was obtained (in github, at: pellaeon/bsd-cloudinit-installer) There is one Python dependency unmet, oslo.config, which is not in the Ports Collection. r277187: Add a comment to note that setting hw.vga.textmode=1 is temporary. r277250: Remove vm_extra_install_base() for the Azure image, now that the waagent exists in the ports tree. Add sysutils/azure-agent to the VM_EXTRA_PACKAGES list. In vm_extra_pre_umount(), remove the explicit pkg(8) install list, as dependencies are resolved by sysutils/azure-agent. r277251: Add a 'list-cloudware' target to print the list of supported CLOUDWARE values and a description. Add the AZURE_DESC and OPENSTACK_DESC descriptions. r277252: Update release(7) r277253: Add 'list-vmtargets' target, which produces a list of all supported VM and cloud provider images. Add VHD_DESC, VMDK_DESC, QCOW2_DESC, RAW_DESC image descriptions. Format the output to make a bit more readable. Update release(7) to document the list-vmtargets target. r277263: Add initial support for the GCE (Google Compute Engine) cloud hosting provider image. r277264: Style and line length cleanup. r277383: Remove the console setting from rc.conf(5), which is not used there. While here, set console to include vidconsole in the loader.conf(5). r277384: Fix an indentation nit. No functional changes. r277393: Remove the pkg-clean(8) call from vm_extra_pre_umount() since the function is often overridden. Add vm_extra_pkg_rmcache() to call pkg-clean(8) to avoid duplicated code. r277394: Move resolv.conf(5) removal back to vm_extra_pre_umount() where it belongs. The GCE image needs resolv.conf(5) to exist (created as part of the image setup), so it cannot be removed. r277395: Comment the line that configures ttys(5) to 'off', which makes it impossible to test that the image boots. Add a note explaining why the line is commented, and not (yet) removed entirely. r277438: Move the 'install' bits that are specific to virtual machine images from the Makefile to Makefile.vm. Rename the 'install' target to 'release-install', and add a new 'vm-install' target. Add a new 'install' target that invokes the new targets. r277439: Add WITH_CLOUDWARE to the list of make(1) variables for the release build. r277447: Remove hw.vga.textmode=1 from the VM image loader.conf, which was included during test builds and not intended to be included when merging this project branch back to head. r277455: Remove mk-azure.sh, which is no longer needed. MFC after: 1 month X-MFC-To: stable/10 (requires mkimg(1)) Help from: cperciva, swills Relnotes: yes Sponsored by: The FreeBSD Foundation Added: head/release/Makefile.vm - copied, changed from r273823, projects/release-vmimage/release/Makefile.vm head/release/scripts/mk-vmimage.sh - copied, changed from r274134, projects/release-vmimage/release/scripts/mk-vmimage.sh head/release/tools/gce.conf - copied, changed from r277263, projects/release-vmimage/release/tools/gce.conf head/release/tools/openstack.conf - copied, changed from r273833, projects/release-vmimage/release/tools/openstack.conf head/release/tools/vmimage.subr (contents, props changed) - copied, changed from r274134, projects/release-vmimage/release/tools/vmimage.subr Deleted: head/release/amd64/mk-azure.sh head/release/amd64/mk-vmimage.sh head/release/i386/mk-azure.sh head/release/i386/mk-vmimage.sh Modified: head/release/Makefile head/release/release.conf.sample head/release/release.sh head/release/tools/azure.conf head/share/man/man7/release.7 Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Tue Jan 20 23:39:08 2015 (r277457) +++ head/release/Makefile Tue Jan 20 23:56:04 2015 (r277458) @@ -9,7 +9,9 @@ # mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) # release: Build all media and FTP distribution area -# install: Copies all release media into ${DESTDIR} +# install: Invokes the release-install and vm-install targets +# release-install: Copies all release installation media into ${DESTDIR} +# vm-install: Copies all virtual machine images into ${DESTDIR} # # Variables affecting the build process: # WORLDDIR: location of src tree -- must have built world and default kernel @@ -26,6 +28,7 @@ # WITH_VMIMAGES: if set, build virtual machine images with the release # WITH_COMPRESSED_VMIMAGES: if set, compress virtual machine disk images # with xz(1) (extremely time consuming) +# WITH_CLOUDWARE: if set, build cloud hosting disk images with the release # TARGET/TARGET_ARCH: architecture of built release # @@ -103,12 +106,6 @@ IMAGES+= memstick.img IMAGES+= mini-memstick.img .endif -VMTARGETS= vm-base vm-image -VMFORMATS?= vhd vmdk qcow2 raw -VMSIZE?= 20G -VMBASE?= vm -AZURECONF?= ${.CURDIR}/tools/azure.conf - CLEANFILES= packagesystem *.txz MANIFEST system ${IMAGES} .if defined(WITH_COMPRESSED_IMAGES) && !empty(WITH_COMPRESSED_IMAGES) . for I in ${IMAGES} @@ -118,22 +115,7 @@ CLEANFILES+= ${I}.xz .if defined(WITH_DVD) && !empty(WITH_DVD) CLEANFILES+= pkg-stage .endif -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -CLEANFILES+= ${VMBASE}.img -. for FORMAT in ${VMFORMATS} -CLEANFILES+= ${VMBASE}.${FORMAT} -. endfor -.endif CLEANDIRS= dist ftp release bootonly dvd -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -CLEANDIRS+= ${VMTARGETS} -.endif -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) -CLEANFILES+= ${OSRELEASE}.vhd \ - ${OSRELEASE}.vhd.raw \ - azure.img -CLEANDIRS+= vm-azure -.endif beforeclean: chflags -R noschg . .include @@ -299,8 +281,13 @@ release: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} .endif +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS} +.endif + +install: release-install vm-install -install: +release-install: .if defined(DESTDIR) && !empty(DESTDIR) mkdir -p ${DESTDIR} .endif @@ -313,52 +300,5 @@ install: .endfor cd ${DESTDIR} && sha256 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.SHA256 cd ${DESTDIR} && md5 ${OSRELEASE}* > ${DESTDIR}/CHECKSUM.MD5 -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) - mkdir -p ${DESTDIR}/vmimages -. for FORMAT in ${VMFORMATS} - cp -p ${VMBASE}.${FORMAT} \ - ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} -. endfor -. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) -# This is very time consuming, so defer it after the images are moved to -# the DESTDIR. -. for FORMAT in ${VMFORMATS} - # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. - ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} -. endfor -. endif - cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ - ${DESTDIR}/vmimages/CHECKSUM.SHA256 - cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ - ${DESTDIR}/vmimages/CHECKSUM.MD5 -.endif -vm-base: -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} -. endif -.endif - touch ${.TARGET} - -vm-image: vm-base -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) -. for FORMAT in ${VMFORMATS} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} -. endfor -. endif -.endif - touch ${.TARGET} - -vm-azure: -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ - ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ - ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd -.endif - touch ${.TARGET} +.include "${.CURDIR}/Makefile.vm" Copied and modified: head/release/Makefile.vm (from r273823, projects/release-vmimage/release/Makefile.vm) ============================================================================== --- projects/release-vmimage/release/Makefile.vm Wed Oct 29 14:57:30 2014 (r273823, copy source) +++ head/release/Makefile.vm Tue Jan 20 23:56:04 2015 (r277458) @@ -5,11 +5,48 @@ # Makefile for building virtual machine and cloud provider disk images. # -VMTARGETS= vm-base vm-image +VMTARGETS= vm-image VMFORMATS?= vhd vmdk qcow2 raw VMSIZE?= 20G VMBASE?= vm -AZURECONF?= ${.CURDIR}/tools/azure.conf + +VHD_DESC= Azure, VirtualPC, Hyper-V, Xen disk image +VMDK_DESC= VMWare, VirtualBox disk image +QCOW2_DESC= Qemu, KVM disk image +RAW_DESC= Unformatted raw disk image + +CLOUDWARE?= AZURE \ + GCE \ + OPENSTACK +AZURE_FORMAT= vhdf +AZURE_DESC= Microsoft Azure platform image +GCE_FORMAT= raw +GCE_DESC= Google Compute Engine image +OPENSTACK_FORMAT=qcow2 +OPENSTACK_DESC= OpenStack platform image + +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) +. for _CW in ${CLOUDWARE} +CLOUDTARGETS+= vm-${_CW:tl} +CLEANDIRS+= vm-${_CW:tl} +CLEANFILES+= ${_CW:tl}.img \ + ${_CW:tl}.${${_CW:tu}_FORMAT} \ + ${_CW:tl}.${${_CW:tu}_FORMAT}.raw +${_CW:tu}IMAGE= ${_CW:tl}.${${_CW:tu}_FORMAT} +. if exists(${.CURDIR}/tools/${_CW:tl}.conf) && !defined(${_CW:tu}CONF) +${_CW:tu}CONF?= ${.CURDIR}/tools/${_CW:tl}.conf +. endif + +vm-${_CW:tl}: + mkdir -p ${.OBJDIR}/${.TARGET} + env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ + ${.CURDIR}/scripts/mk-vmimage.sh \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ + -i ${.OBJDIR}/${_CW:tl}.img -s ${VMSIZE} -f ${${_CW}_FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${${_CW}IMAGE} -c ${${_CW}CONF} + touch ${.TARGET} +. endfor +.endif .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} @@ -19,39 +56,56 @@ CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) -CLEANFILES+= ${OSRELEASE}.vhd \ - ${OSRELEASE}.vhd.raw \ - azure.img -CLEANDIRS+= vm-azure -.endif +vm-base: vm-image -vm-base: +vm-image: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) +. for FORMAT in ${VMFORMATS} + mkdir -p ${.OBJDIR}/${.TARGET} env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${WORLDDIR} ${.OBJDIR}/${.TARGET} ${VMSIZE} -. endif + ${.CURDIR}/scripts/mk-vmimage.sh \ + -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ + -i ${.OBJDIR}/${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ + -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} +. endfor .endif touch ${.TARGET} -vm-image: vm-base +vm-cloudware: ${CLOUDTARGETS} + +list-vmtargets: list-cloudware + @${ECHO} + @${ECHO} "Supported virtual machine disk image formats:" +.for FORMAT in ${VMFORMATS:tu} + @${ECHO} " ${FORMAT:tl}: ${${FORMAT}_DESC}" +.endfor + +list-cloudware: +.if !empty(CLOUDWARE) + @${ECHO} + @${ECHO} "Supported cloud hosting provider images:" +. for _CW in ${CLOUDWARE} + @${ECHO} " ${_CW:tu}: ${${_CW:tu}_DESC}" +. endfor +.endif + +vm-install: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) -. if exists(${.CURDIR}/${TARGET}/mk-vmimage.sh) + mkdir -p ${DESTDIR}/vmimages +. for FORMAT in ${VMFORMATS} + cp -p ${VMBASE}.${FORMAT} \ + ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} +. endfor +. if defined(WITH_COMPRESSED_VMIMAGES) && !empty(WITH_COMPRESSED_VMIMAGES) +# This is very time consuming, so defer it after the images are moved to +# the DESTDIR. . for FORMAT in ${VMFORMATS} - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - ${.CURDIR}/${TARGET}/mk-vmimage.sh ${.TARGET} \ - ${VMBASE}.img ${FORMAT} ${VMBASE}.${FORMAT} + # Don't keep the originals. There is a copy in ${.OBJDIR} if needed. + ${XZCMD} ${DESTDIR}/vmimages/${OSRELEASE}.${FORMAT} . endfor . endif + cd ${DESTDIR}/vmimages && sha256 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.SHA256 + cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ + ${DESTDIR}/vmimages/CHECKSUM.MD5 .endif - touch ${.TARGET} - -vm-azure: -.if exists(${.CURDIR}/${TARGET}/mk-azure.sh) - env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} AZURECONF=${AZURECONF} \ - ${.CURDIR}/${TARGET}/mk-azure.sh ${.TARGET} azure.img \ - ${WORLDDIR} ${.TARGET} ${VMSIZE} ${OSRELEASE}.vhd -.endif - touch ${.TARGET} Modified: head/release/release.conf.sample ============================================================================== --- head/release/release.conf.sample Tue Jan 20 23:39:08 2015 (r277457) +++ head/release/release.conf.sample Tue Jan 20 23:56:04 2015 (r277458) @@ -98,3 +98,11 @@ PORTBRANCH="ports/head@rHEAD" ## image formats to create. Valid values are listed in the mkimg(1) ## manual page, as well as 'mkimg --formats' output. #VMFORMATS="vhdf vmdk qcow2 raw" + +## Set to a non-empty value to build virtual machine images for various +## cloud providers as part of the release build. +#WITH_CLOUDWARE= + +## If WITH_CLOUDWARE is set to a non-empty value, this is a list of providers +## to create disk images. +#CLOUDWARE="AZURE OPENSTACK" Modified: head/release/release.sh ============================================================================== --- head/release/release.sh Tue Jan 20 23:39:08 2015 (r277457) +++ head/release/release.sh Tue Jan 20 23:56:04 2015 (r277458) @@ -94,6 +94,10 @@ WITH_COMPRESSED_IMAGES= WITH_VMIMAGES= WITH_COMPRESSED_VMIMAGES= +# Set to non-empty value to build virtual machine images for various +# cloud providers as part of the release. +WITH_CLOUDWARE= + usage() { echo "Usage: $0 [-c release.conf]" exit 1 @@ -174,7 +178,8 @@ CHROOT_DMAKEFLAGS="${CONF_FILES}" RELEASE_WMAKEFLAGS="${MAKE_FLAGS} ${WORLD_FLAGS} ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_KMAKEFLAGS="${MAKE_FLAGS} ${KERNEL_FLAGS} KERNCONF=\"${KERNEL}\" ${ARCH_FLAGS} ${CONF_FILES}" RELEASE_RMAKEFLAGS="${ARCH_FLAGS} KERNCONF=\"${KERNEL}\" ${CONF_FILES} \ - ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES}" + ${DOCPORTS} WITH_DVD=${WITH_DVD} WITH_VMIMAGES=${WITH_VMIMAGES} \ + WITH_CLOUDWARE=${WITH_CLOUDWARE}" # Force src checkout if configured FORCE_SRC_KEY= Copied and modified: head/release/scripts/mk-vmimage.sh (from r274134, projects/release-vmimage/release/scripts/mk-vmimage.sh) ============================================================================== --- projects/release-vmimage/release/scripts/mk-vmimage.sh Wed Nov 5 13:22:19 2014 (r274134, copy source) +++ head/release/scripts/mk-vmimage.sh Tue Jan 20 23:56:04 2015 (r277458) @@ -32,6 +32,12 @@ # $FreeBSD$ # +usage() { + echo "${0} usage:" + echo "${@}" + return 1 +} + main() { local arg while getopts "C:c:d:f:i:o:s:S:" arg; do @@ -49,7 +55,7 @@ main() { VMFORMAT="${OPTARG}" ;; i) - VMBASE="${VMBASE}" + VMBASE="${OPTARG}" ;; o) VMIMAGE="${OPTARG}" @@ -87,13 +93,16 @@ main() { . "${VMCONFIG}" fi + vm_create_base vm_install_base vm_extra_install_base vm_extra_install_packages vm_extra_install_ports vm_extra_enable_services vm_extra_pre_umount - vm_create_disk + vm_extra_pkg_rmcache + cleanup + vm_create_disk || return 0 vm_extra_create_disk return 0 Modified: head/release/tools/azure.conf ============================================================================== --- head/release/tools/azure.conf Tue Jan 20 23:39:08 2015 (r277457) +++ head/release/tools/azure.conf Tue Jan 20 23:56:04 2015 (r277458) @@ -6,9 +6,37 @@ # Set to a list of packages to install. # Example: #export VM_EXTRA_PACKAGES="www/apache24" -export VM_EXTRA_PACKAGES= +export VM_EXTRA_PACKAGES="sysutils/azure-agent" # Set to a list of third-party software to enable in rc.conf(5). # Example: #export VM_RC_LIST="apache24" export VM_RC_LIST= + +vm_extra_pre_umount() { + chroot ${DESTDIR} /usr/sbin/waagent -verbose -install + yes | chroot ${DESTDIR} /usr/sbin/waagent -deprovision + echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'ifconfig_hn0="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + echo 'waagent_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'console="comconsole vidconsole"' >> ${DESTDIR}/boot/loader.conf + echo 'comconsole_speed="115200"' >> ${DESTDIR}/boot/loader.conf + + rm -f ${DESTDIR}/etc/resolv.conf + + return 0 +} + +vm_extra_create_disk() { + if [ ! -x "/usr/local/bin/qemu-img" ]; then + env ASSUME_ALWAYS_YES=yes pkg install -y emulators/qemu-devel + fi + + mv ${VMIMAGE} ${VMIMAGE}.raw + size=$(qemu-img info -f raw --output json ${VMIMAGE}.raw | awk '/virtual-size/ {print $2}' | tr -d ',') + size=$(( ( ${size} / ( 1024 * 1024 ) + 1 ) * ( 1024 * 1024 ) )) + qemu-img resize ${VMIMAGE}.raw ${size} + qemu-img convert -f raw -o subformat=fixed -O vpc ${VMIMAGE}.raw ${VMIMAGE} + + return 0 +} Copied and modified: head/release/tools/gce.conf (from r277263, projects/release-vmimage/release/tools/gce.conf) ============================================================================== --- projects/release-vmimage/release/tools/gce.conf Fri Jan 16 19:27:19 2015 (r277263, copy source) +++ head/release/tools/gce.conf Tue Jan 20 23:56:04 2015 (r277458) @@ -4,7 +4,9 @@ # # Set to a list of packages to install. -export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs google-cloud-sdk google-daemon panicmail sudo firstboot-growfs google-startup-scripts" +export VM_EXTRA_PACKAGES="firstboot-freebsd-update firstboot-pkgs \ + google-cloud-sdk google-daemon panicmail sudo firstboot-growfs \ + google-startup-scripts" # Set to a list of third-party software to enable in rc.conf(5). export VM_RC_LIST="google_accounts_manager ntpd" @@ -16,8 +18,7 @@ vm_extra_install_base() { } vm_extra_pre_umount() { - cat << EOF >> ${DESTDIR}/etc/rc.conf -console="comconsole" + cat << EOF >> ${DESTDIR}/etc/rc.conf dumpdev="AUTO" ifconfig_vtnet0="SYNCDHCP mtu 1460" ntpd_sync_on_start="YES" @@ -34,12 +35,12 @@ firstboot_growfs_enable="YES" google_startup_enable="YES" EOF - cat << EOF >> ${DESTDIR}/boot/loader.conf + cat << EOF >> ${DESTDIR}/boot/loader.conf autoboot_delay="-1" beastie_disable="YES" loader_logo="none" hw.memtest.tests="0" -console="comconsole" +console="comconsole,vidconsole" hw.vtnet.mq_disable=1 kern.timecounter.hardware=ACPI-safe aesni_load="YES" @@ -50,7 +51,7 @@ EOF ${DESTDIR}/etc/hosts # overwrite ntp.conf - cat << EOF > ${DESTDIR}/etc/ntp.conf + cat << EOF > ${DESTDIR}/etc/ntp.conf server metadata.google.internal iburst restrict default kod nomodify notrap nopeer noquery @@ -61,11 +62,11 @@ restrict -6 ::1 restrict 127.127.1.0 EOF - cat << EOF >> ${DESTDIR}/etc/syslog.conf + cat << EOF >> ${DESTDIR}/etc/syslog.conf *.err;kern.warning;auth.notice;mail.crit /dev/console EOF - cat << EOF >> ${DESTDIR}/etc/ssh/sshd_config + cat << EOF >> ${DESTDIR}/etc/ssh/sshd_config ChallengeResponseAuthentication no X11Forwarding no AcceptEnv LANG @@ -74,11 +75,11 @@ AllowAgentForwarding no ClientAliveInterval 420 EOF - cat << EOF >> ${DESTDIR}/etc/crontab + cat << EOF >> ${DESTDIR}/etc/crontab 0 3 * * * root /usr/sbin/freebsd-update cron EOF - cat << EOF >> ${DESTDIR}/etc/sysctl.conf + cat << EOF >> ${DESTDIR}/etc/sysctl.conf net.inet.icmp.drop_redirect=1 net.inet.ip.redirect=0 net.inet.tcp.blackhole=2 @@ -88,9 +89,12 @@ debug.trace_on_panic=1 debug.debugger_on_panic=0 EOF - sed -E -i '' 's/^([^#].*[[:space:]])on/\1off/' ${DESTDIR}/etc/ttys + ## XXX: Verify this is needed. I do not see this requirement + ## in the docs, and it impairs the ability to boot-test a copy + ## of the image prior to packaging for upload to GCE. + #sed -E -i '' 's/^([^#].*[[:space:]])on/\1off/' ${DESTDIR}/etc/ttys - touch ${DESTDIR}/firstboot + touch ${DESTDIR}/firstboot return 0 } Copied and modified: head/release/tools/openstack.conf (from r273833, projects/release-vmimage/release/tools/openstack.conf) ============================================================================== --- projects/release-vmimage/release/tools/openstack.conf Wed Oct 29 17:04:09 2014 (r273833, copy source) +++ head/release/tools/openstack.conf Tue Jan 20 23:56:04 2015 (r277458) @@ -4,7 +4,22 @@ # # Set to a list of packages to install. -export VM_EXTRA_PACKAGES="net/cloud-init" +export VM_EXTRA_PACKAGES="net/cloud-init devel/py-pbr devel/py-iso8601 \ + net/py-eventlet net/py-netaddr comms/py-serial devel/py-six \ + devel/py-babel net/py-oauth net/py-netifaces" # Set to a list of third-party software to enable in rc.conf(5). -export VM_RC_LIST="#cloudinit" +export VM_RC_LIST="cloudinit" + +vm_extra_pre_umount() { + echo 'sshd_enable="YES"' >> ${DESTDIR}/etc/rc.conf + echo 'ifconfig_DEFAULT="SYNCDHCP"' >> ${DESTDIR}/etc/rc.conf + + # Openstack wants sudo(8) usable by default without a password. + echo 'ALL ALL=(ALL) NOPASSWD:ALL' >> \ + ${DESTDIR}/usr/local/etc/sudoers.d/cloud-init + + rm -f ${DESTDIR}/etc/resolv.conf + + return 0 +} Copied and modified: head/release/tools/vmimage.subr (from r274134, projects/release-vmimage/release/tools/vmimage.subr) ============================================================================== --- projects/release-vmimage/release/tools/vmimage.subr Wed Nov 5 13:22:19 2014 (r274134, copy source) +++ head/release/tools/vmimage.subr Tue Jan 20 23:56:04 2015 (r277458) @@ -9,15 +9,33 @@ export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/local/sbin" trap "cleanup" INT QUIT TRAP ABRT TERM -mkimg_bootcode="/boot/pmbr" -mkimg_partitions="-p freebsd-boot/bootfs:=/boot/gptboot" -mkimg_partitions="${mkimg_partitions} -p freebsd-swap/swapfs::1G" -mkimg_partitions="${mkimg_partitions} freebsd-ufs/rootfs:=${VMBASE}" - -usage() { - echo "${0} usage:" - echo "${@}" - return 1 +write_partition_layout() { + if [ -z "${NOSWAP}" ]; then + SWAPOPT="-p freebsd-swap/swapfs::1G" + fi + + case "${TARGET}:${TARGET_ARCH}" in + amd64:amd64 | i386:i386) + mkimg -s gpt -b /boot/pmbr \ + -p freebsd-boot/bootfs:=/boot/gptboot \ + ${SWAPOPT} \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + ;; + powerpc:powerpc*) + mkimg -s apm \ + -p apple-boot/bootfs:=/boot/boot1.hfs \ + ${SWAPOPT} \ + -p freebsd-ufs/rootfs:=${VMBASE} \ + -o ${VMIMAGE} + ;; + *) + # ENOTSUPP + return 1 + ;; + esac + + return 0 } err() { @@ -27,11 +45,11 @@ err() { } cleanup() { + umount ${DESTDIR}/dev 2>/dev/null + umount ${DESTDIR} if [ ! -z "${mddev}" ]; then mdconfig -d -u ${mddev} fi - umount ${DESTDIR}/dev - umount ${DESTDIR} return 0 } @@ -61,11 +79,18 @@ vm_install_base() { > ${DESTDIR}/etc/fstab echo '/dev/gpt/rootfs / ufs rw 1 1' \ >> ${DESTDIR}/etc/fstab - echo '/dev/gpt/swapfs none swap sw 0 0' \ - >> ${DESTDIR}/etc/fstab + if [ -z "${NOSWAP}" ]; then + echo '/dev/gpt/swapfs none swap sw 0 0' \ + >> ${DESTDIR}/etc/fstab + fi + mkdir -p ${DESTDIR}/dev + mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} /usr/bin/newaliases chroot ${DESTDIR} /etc/rc.d/ldconfig forcestart + umount ${DESTDIR}/dev + + cp /etc/resolv.conf ${DESTDIR}/etc/resolv.conf return 0 } @@ -89,12 +114,16 @@ vm_extra_enable_services() { } vm_extra_install_packages() { + if [ -z "${VM_EXTRA_PACKAGES}" ]; then + return 0 + fi + mkdir -p ${DESTDIR}/dev + mount -t devfs devfs ${DESTDIR}/dev chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ /usr/sbin/pkg bootstrap -y - if [ ! -z "${VM_EXTRA_PACKAGES}" ]; then - chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ - /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} - fi + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/sbin/pkg install -y ${VM_EXTRA_PACKAGES} + umount ${DESTDIR}/dev return 0 } @@ -106,6 +135,23 @@ vm_extra_install_ports() { return 0 } +vm_extra_pre_umount() { + # Prototype. When overridden, installs additional ports within the + # virtual machine environment. + + rm -f ${DESTDIR}/etc/resolv.conf + return 0 +} + +vm_extra_pkg_rmcache() { + if [ -e ${DESTDIR}/usr/local/sbin/pkg ]; then + chroot ${DESTDIR} env ASSUME_ALWAYS_YES=yes \ + /usr/local/sbin/pkg clean -y -a + fi + + return 0 +} + vm_umount_base() { i=0 sync @@ -124,21 +170,10 @@ vm_umount_base() { } vm_create_disk() { - if [ -z "${mkimg_paritions}" ]; then - err "No partition types specified. Skipping." - return 1 - fi echo "Creating image... Please wait." echo - mkimg -f ${mkimg_format} -s ${mkimg_scheme} \ - ${mkimg_bootcode} \ - ${mkimg_partitions} \ - ${mkimg_outfile} - - mkimg -b /boot/pmbr -p freebsd-boot/bootfs:=/boot/gptboot \ - -p freebsd-swap/swapfs::1G \ - -p freebsd-ufs/rootfs:=${VMBASE} \ - -o ${VMIMAGE}.raw + + write_partition_layout || return 1 return 0 } Modified: head/share/man/man7/release.7 ============================================================================== --- head/share/man/man7/release.7 Tue Jan 20 23:39:08 2015 (r277457) +++ head/share/man/man7/release.7 Tue Jan 20 23:56:04 2015 (r277458) @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 2, 2014 +.Dd January 16, 2015 .Dt RELEASE 7 .Os .Sh NAME @@ -406,6 +406,57 @@ See for valid format values .Pq requires version 20140927 or later . .El +.Pp +For a list of supported +.Va VMFORMATS +values +.Pq including cloud hosting provider formats +along with a brief description, run: +.Bd -literal -offset indent +cd /usr/src +make -C release list-vmtargets +.Ed +.Sh CLOUD HOSTING MACHINE IMAGES +The +.Fx +release build tools support building virtual machine images for various +cloud hosting providers, each with their own specific configuration to +include support for each hosting provider by default. +.Pp +The following +.Xr make 1 +environment variables are supported: +.Pp +.Bl -tag -width Ev +.It Va CLOUDWARE +Set to a list of one or more cloud hosting providers, enclosed in quotes. +Requires +.Va WITH_CLOUDWARE +to also be set. +.It Va WITH_CLOUDWARE +Set to a non-empty value to enable building virtual machine images +for various cloud hosting providers. +Requires +.Va CLOUDWARE +to also be set. +.El +.Pp +Additionally, the +.Va CLOUDWARE +and +.Va WITH_CLOUDWARE +variables can be added to +.Pa release.conf , +and used in conjunction with +.Pa release.sh . +.Pp +For a list of supported +.Va CLOUDWARE +values, run: +.Bd -literal -offset indent +cd /usr/src +make -C release list-cloudware +.Ed .Sh MAKEFILE TARGETS The release makefile .Pq Pa src/release/Makefile @@ -470,6 +521,23 @@ target requires the .Va WITH_VMIMAGES .Xr make 1 envirionment variable to be set to a non-null value. +.It Cm vm-cloudware +Builds +.Fx +virtual machine images for various cloud hosting providers. +See +.Qq CLOUD HOSTING MACHINE IMAGES +for implementation details. +.It Cm list-cloudware +Displays the list of valid +.Va CLOUDWARE +values. +.It Cm list-vmtargets +Displays the list of valid +.Va VMFORMAT +and +.Va CLOUDWARE +values. .El .Pp Major subtargets called by targets above: @@ -576,8 +644,11 @@ Typically, one only needs to set .It Pa /usr/src/Makefile .It Pa /usr/src/Makefile.inc1 .It Pa /usr/src/release/Makefile +.It Pa /usr/src/release/Makefile.vm .It Pa /usr/src/release/release.sh .It Pa /usr/src/release/release.conf.sample +.It Pa /usr/src/release/tools/*.conf +.It Pa /usr/src/release/tools/vmimage.subr .El .Sh EXAMPLES The following sequence of commands can be used to build a From owner-svn-src-all@FreeBSD.ORG Tue Jan 20 23:59:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 149A69AE; Tue, 20 Jan 2015 23:59:50 +0000 (UTC) Received: from mail-yk0-x234.google.com (mail-yk0-x234.google.com [IPv6:2607:f8b0:4002:c07::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BAD05B8; Tue, 20 Jan 2015 23:59:49 +0000 (UTC) Received: by mail-yk0-f180.google.com with SMTP id 131so1980839ykp.11; Tue, 20 Jan 2015 15:59:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=weq51djkEwlWd7n+TIZJDdxlBgrnzFnRG3IPWO+2l3w=; b=KgpjjxqDPlL2GtBFHZgGSKbxjE5W0MadW29ENCPUBgUM+YXukryoBUMQ+k6/xnzexu WFflS0uFwLFZzmi1llLOmR0NpJZjQGRwL+6TbGNrn923fLkeaI8CopOA/ECgAxtEeCo1 28M/8/YADZce3YD4qLAfkTpt+lPrfy0r3anqKDWCh6JlEtV3nh1ILelhSuQVsLHL1dgH eDB8PbiMNkLpJh7tnoxuPrRRLtfx91z1gMBbaElN37FSpFT4fqjSYnn5/lcpROXtaG6Y NnSQy5KT46DEqYwU5inZ7of940FnOwxLksvNm9ujvF7OyH9RGS+d2rMO6QtMM6383A16 PYTg== MIME-Version: 1.0 X-Received: by 10.170.121.76 with SMTP id n73mr13373585ykb.119.1421798389009; Tue, 20 Jan 2015 15:59:49 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Tue, 20 Jan 2015 15:59:48 -0800 (PST) In-Reply-To: <54BEEA7F.1070301@ignoranthack.me> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> Date: Tue, 20 Jan 2015 15:59:48 -0800 X-Google-Sender-Auth: xxeBevLHZGEMac3qZR7zl_1ypbI Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Jan 2015 23:59:50 -0000 On Tue, Jan 20, 2015 at 3:53 PM, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/20/15 15:48, K. Macy wrote: >> Are any other drivers hitting this? e.g. cxgb/cxgbe? >> >> -K >> > > Unkown to me. Nor am I aware of anyone else who ever hit our panics > either. Our environment, and the failure, was only seen in the Intel > 10GE space (ixgbe). This is an artifact of our use cases, and hasn't > been expanded nor tested in our environment with other vendor interfaces. For an ill characterized problem isolated to one environment this seems like a workaround that should not be part of the general code base. -K > sean > >> On Tue, Jan 20, 2015 at 3:46 PM, Sean Bruno >> wrote: On 01/20/15 15:40, K. Macy wrote: >>>>> I think you're working around driver locking bugs by >>>>> crippling the callout code. >>>>> >>>>> -K >>>>> >> >> We had zero evidence of this. What leads you down that path? I'm >> totally open to being wrong, e.g. "yeah, you slowed down things so >> that you don't hit a race condition" >> >> sean >> >>>>> On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno >>>>> wrote: On 01/20/15 14:30, Hans >>>>> Petter Selasky wrote: >>>>>>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>>>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, Konstantin >>>>>>>>> Belousov wrote: K> > Like stated in the manual page, >>>>>>>>> callout_reset_curcpu/on() does not work K> > with >>>>>>>>> MPSAFE callouts any more! K> I.e. you 'fixed' some >>>>>>>>> undeterminate bugs in callout migration by not K> >>>>>>>>> doing migration at all anymore. K> K> > K> > You need >>>>>>>>> to use callout_init_{mtx,rm,rw} and remove the custom >>>>>>>>> locking K> > inside the callback in the TCP stack to >>>>>>>>> get it working like before! K> K> No, you need to do >>>>>>>>> this, if you think that whole callout KPI must be K> >>>>>>>>> rototiled. It is up to the person who modifies the >>>>>>>>> KPI, to ensure that K> existing code is not broken. >>>>>>>>> K> K> As I understand, currently we are back to the >>>>>>>>> one-cpu callouts. K> Do other people consider this >>>>>>>>> situation acceptable ? >>>>>>>>> >>>>>>>>> I think this isn't acceptable. The commit to a >>>>>>>>> complex subsystem lacked a review from persons >>>>>>>>> involved in the system before. The commit to >>>>>>>>> subsystem broke consumers of the subsystem and this >>>>>>>>> was even done not accidentially, but due to Hans not >>>>>>>>> caring about it. >>>>>>>>> >>>>>>>>> As for me this is enough to request a backout, and >>>>>>>>> let the change back in only after proper review. >>>>>>>>> >>>>>>>> >>>>>>>> Hi Gleb, >>>>>>>> >>>>>>>> Backing out my callout API patch means we will for >>>>>>>> sure re-introduce an unknown callout spinlock hang, as >>>>>>>> noted to me by several people. What do you think about >>>>>>>> that? dram Maybe "Jason Wolfe" CC'ed can add to >>>>>>>> 10-stable w/o my patches: >>>>>>>> >>>>> >>>>> Jason picked up this patch for work and it resolved our >>>>> instability issues that had remained unsolved for quite some >>>>> time as reported to freebsd-net: >>>>> >>>>> https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html >>>>> >>>>> >>>>> > This had gone undiagnosed for some time (even with the gracious >>>>> help of jhb in offline emails, thanks btw!). >>>>> >>>>> There's some diagnostics in that email thread that may be of >>>>> value to you folks for determination of the validity of >>>>> changing the callout API or at least understanding why we >>>>> were involved in diagnostics. >>>>> >>>>> While I'd sure love to tune performance, the fact that our >>>>> machines were basically going out to lunch without these >>>>> changes, probably means that others were seeing it and didn't >>>>> know what else to do. As much as I enjoy a good "break out >>>>> the pitch forks and torches" email thread, this increased >>>>> stability for us and is allowing us to upgrade from freebsd8 >>>>> to freebsd10. Bear this in mind when you throw your voice in >>>>> favor of reverting. >>>>> >>>>>>>> int callout_reset_sbt_on(struct callout *c, sbintime_t >>>>>>>> sbt, sbintime_t precision, void (*ftn)(void *), void >>>>>>>> *arg, int cpu, int flags) { sbintime_t to_sbt, pr; >>>>>>>> struct callout_cpu *cc; int cancelled, direct; >>>>>>>> >>>>>>>> + cpu = timeout_cpu; /* XXX test code XXX */ >>>>>>>> >>>>>>>> cancelled = 0; >>>>>>>> >>>>> >>>>> Jason or I would have to run this in production, which would >>>>> be problematic I fear. We never had a deterministic test >>>>> case that would exhibit the reported failure. We merely >>>>> "tested in production" and saw that panics ceased. We didn't >>>>> note a dropoff in our traffic either, perhaps we are not as >>>>> efficient as others in this corner case, but we were >>>>> consistently seeing the spinlock hangs after a day or so of >>>>> traffic. >>>>> >>>>>>>> And see if he observes a callout spinlock hang or not >>>>>>>> on his test setup. The patch above should force all >>>>>>>> callouts to the same thread basically. Then we could >>>>>>>> maybe see if single threading the callouts has anything >>>>>>>> to do with solving the spinlock hang. >>>>>>>> >>>>>>>> The "rewritten" callout API still has all the features >>>>>>>> and capabilities the old one had, when used as >>>>>>>> described in "man 9 callout". >>>>>>>> >>>>>>>> At the present moment I'm not technically convinced a >>>>>>>> backout is correct. >>>>> >>>>> Neither am I, to be honest. Just based on *results*. >>>>> >>>>>>>> >>>>>>>> Gleb: I think we would see far better results with >>>>>>>> high speed internet links using TCP if we could extend >>>>>>>> the LRO (large receive offload) code to accumulate more >>>>>>>> than 64KBytes worth of data per call to the TCP stack >>>>>>>> instead of complaining about some callouts ending up on >>>>>>>> the same thread! Actually I have a patch for that. >>>>>>>> >>>>>>>> --HPS >>>>>>>> >>>>>>>> >>>>>>>> >>>>> >>>>>> _______________________________________________ >>>>>> 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" >>>>> >>>>> >> >> >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQF8BAEBCgBmBQJUvup4XxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5kNdgH/iFU6kSAcuPJDwiNONLULu9c > Nu9kJzQUgCpROor2CnrsjN0WILWTAfmWaQK1b7ClUIwKPmgzvX09DZdsdfQnIMFR > aimC3uKW0rJeMDlQNbN/J2mI5+QOyREUozxb53jetDj9t+OmC08idne0AuYuMgwY > NZoKt2llhJScjjEu2EJV9W3FoDCmg/ITA83IbzmmoZHHtXACdDVh0vwmNb1UPluA > 0hcJv4rQrY5Khq08a4tonQxTB96Sgk/c+0zPpvqSctKEEmf6TiREbwr68SOM4dkY > zLxpD/9IeExFTShJSGW+slKAuzCobr+iG8a9tDLV+STtoAX9i5jyLQLnwDcX7AY= > =F1sR > -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 00:22:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1D455E5A; Wed, 21 Jan 2015 00:22:48 +0000 (UTC) Received: from mail.ignoranthack.me (ignoranthack.me [199.102.79.106]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E308038E; Wed, 21 Jan 2015 00:22:47 +0000 (UTC) Received: from [192.168.200.212] (unknown [50.136.155.142]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sbruno@ignoranthack.me) by mail.ignoranthack.me (Postfix) with ESMTPSA id 0A779192A3B; Wed, 21 Jan 2015 00:22:45 +0000 (UTC) Message-ID: <54BEF154.3030606@ignoranthack.me> Date: Tue, 20 Jan 2015 16:22:44 -0800 From: Sean Bruno Reply-To: sbruno@freebsd.org User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 00:22:48 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/20/15 15:59, K. Macy wrote: > On Tue, Jan 20, 2015 at 3:53 PM, Sean Bruno > wrote: On 01/20/15 15:48, K. Macy wrote: >>>> Are any other drivers hitting this? e.g. cxgb/cxgbe? >>>> >>>> -K >>>> > > Unkown to me. Nor am I aware of anyone else who ever hit our > panics either. Our environment, and the failure, was only seen in > the Intel 10GE space (ixgbe). This is an artifact of our use > cases, and hasn't been expanded nor tested in our environment with > other vendor interfaces. > >> For an ill characterized problem isolated to one environment >> this seems like a workaround that should not be part of the >> general code base. > >> -K > There was never any indication in our testing that the driver was involved in any way. In our universe, this commit (right or wrong) resolved our panics. I think that there is some room for improvement based on the commentary in this thread, but some people do indeed prefer stability over performance. I hope we can come to a middle ground somewhere here. sean > > sean > >>>> On Tue, Jan 20, 2015 at 3:46 PM, Sean Bruno >>>> wrote: On 01/20/15 15:40, K. Macy >>>> wrote: >>>>>>> I think you're working around driver locking bugs by >>>>>>> crippling the callout code. >>>>>>> >>>>>>> -K >>>>>>> >>>> >>>> We had zero evidence of this. What leads you down that path? >>>> I'm totally open to being wrong, e.g. "yeah, you slowed down >>>> things so that you don't hit a race condition" >>>> >>>> sean >>>> >>>>>>> On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno >>>>>>> wrote: On 01/20/15 14:30, >>>>>>> Hans Petter Selasky wrote: >>>>>>>>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>>>>>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, >>>>>>>>>>> Konstantin Belousov wrote: K> > Like stated in >>>>>>>>>>> the manual page, callout_reset_curcpu/on() does >>>>>>>>>>> not work K> > with MPSAFE callouts any more! K> >>>>>>>>>>> I.e. you 'fixed' some undeterminate bugs in >>>>>>>>>>> callout migration by not K> doing migration at >>>>>>>>>>> all anymore. K> K> > K> > You need to use >>>>>>>>>>> callout_init_{mtx,rm,rw} and remove the custom >>>>>>>>>>> locking K> > inside the callback in the TCP >>>>>>>>>>> stack to get it working like before! K> K> No, >>>>>>>>>>> you need to do this, if you think that whole >>>>>>>>>>> callout KPI must be K> rototiled. It is up to >>>>>>>>>>> the person who modifies the KPI, to ensure that >>>>>>>>>>> K> existing code is not broken. K> K> As I >>>>>>>>>>> understand, currently we are back to the >>>>>>>>>>> one-cpu callouts. K> Do other people consider >>>>>>>>>>> this situation acceptable ? >>>>>>>>>>> >>>>>>>>>>> I think this isn't acceptable. The commit to a >>>>>>>>>>> complex subsystem lacked a review from persons >>>>>>>>>>> involved in the system before. The commit to >>>>>>>>>>> subsystem broke consumers of the subsystem and >>>>>>>>>>> this was even done not accidentially, but due >>>>>>>>>>> to Hans not caring about it. >>>>>>>>>>> >>>>>>>>>>> As for me this is enough to request a backout, >>>>>>>>>>> and let the change back in only after proper >>>>>>>>>>> review. >>>>>>>>>>> >>>>>>>>>> >>>>>>>>>> Hi Gleb, >>>>>>>>>> >>>>>>>>>> Backing out my callout API patch means we will >>>>>>>>>> for sure re-introduce an unknown callout spinlock >>>>>>>>>> hang, as noted to me by several people. What do >>>>>>>>>> you think about that? dram Maybe "Jason Wolfe" >>>>>>>>>> CC'ed can add to 10-stable w/o my patches: >>>>>>>>>> >>>>>>> >>>>>>> Jason picked up this patch for work and it resolved >>>>>>> our instability issues that had remained unsolved for >>>>>>> quite some time as reported to freebsd-net: >>>>>>> >>>>>>> https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html >>>>>>> >>>>>>> >>>>>>> > >>>>>>> This had gone undiagnosed for some time (even with the gracious >>>>>>> help of jhb in offline emails, thanks btw!). >>>>>>> >>>>>>> There's some diagnostics in that email thread that may >>>>>>> be of value to you folks for determination of the >>>>>>> validity of changing the callout API or at least >>>>>>> understanding why we were involved in diagnostics. >>>>>>> >>>>>>> While I'd sure love to tune performance, the fact that >>>>>>> our machines were basically going out to lunch without >>>>>>> these changes, probably means that others were seeing >>>>>>> it and didn't know what else to do. As much as I enjoy >>>>>>> a good "break out the pitch forks and torches" email >>>>>>> thread, this increased stability for us and is allowing >>>>>>> us to upgrade from freebsd8 to freebsd10. Bear this in >>>>>>> mind when you throw your voice in favor of reverting. >>>>>>> >>>>>>>>>> int callout_reset_sbt_on(struct callout *c, >>>>>>>>>> sbintime_t sbt, sbintime_t precision, void >>>>>>>>>> (*ftn)(void *), void *arg, int cpu, int flags) { >>>>>>>>>> sbintime_t to_sbt, pr; struct callout_cpu *cc; >>>>>>>>>> int cancelled, direct; >>>>>>>>>> >>>>>>>>>> + cpu = timeout_cpu; /* XXX test code XXX >>>>>>>>>> */ >>>>>>>>>> >>>>>>>>>> cancelled = 0; >>>>>>>>>> >>>>>>> >>>>>>> Jason or I would have to run this in production, which >>>>>>> would be problematic I fear. We never had a >>>>>>> deterministic test case that would exhibit the reported >>>>>>> failure. We merely "tested in production" and saw that >>>>>>> panics ceased. We didn't note a dropoff in our traffic >>>>>>> either, perhaps we are not as efficient as others in >>>>>>> this corner case, but we were consistently seeing the >>>>>>> spinlock hangs after a day or so of traffic. >>>>>>> >>>>>>>>>> And see if he observes a callout spinlock hang or >>>>>>>>>> not on his test setup. The patch above should >>>>>>>>>> force all callouts to the same thread basically. >>>>>>>>>> Then we could maybe see if single threading the >>>>>>>>>> callouts has anything to do with solving the >>>>>>>>>> spinlock hang. >>>>>>>>>> >>>>>>>>>> The "rewritten" callout API still has all the >>>>>>>>>> features and capabilities the old one had, when >>>>>>>>>> used as described in "man 9 callout". >>>>>>>>>> >>>>>>>>>> At the present moment I'm not technically >>>>>>>>>> convinced a backout is correct. >>>>>>> >>>>>>> Neither am I, to be honest. Just based on *results*. >>>>>>> >>>>>>>>>> >>>>>>>>>> Gleb: I think we would see far better results >>>>>>>>>> with high speed internet links using TCP if we >>>>>>>>>> could extend the LRO (large receive offload) code >>>>>>>>>> to accumulate more than 64KBytes worth of data >>>>>>>>>> per call to the TCP stack instead of complaining >>>>>>>>>> about some callouts ending up on the same thread! >>>>>>>>>> Actually I have a patch for that. >>>>>>>>>> >>>>>>>>>> --HPS >>>>>>>>>> >>>>>>>>>> >>>>>>>>>> >>>>>>> >>>>>>>> _______________________________________________ >>>>>>>> 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" >>>>>>> >>>>>>> >>>> >>>> >>>> > > > > -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAEBCgBmBQJUvvFSXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k1AcIAJvIeDso4/a4YqEyXxGj4CAb QLfESoILRDF3LpczRpIFGnUPRs9pWUTm6DIUut0ZjgLChq1kHzdi2uIFe9QB3ehX zzw4MEtxDEqXv5zOAmP1gvcx1a2rKZJnTlfW2CHa2QAYTR06BFARu8u3NyC3tZiq o/NGpidv+nrkcrDSHmzpVgIrlZzyB+YsGyNcvRUkewxMpos9syB2sKiXm9u/MQYQ nHyjFw9IOjDFAiZgww0y/8QYB9efr639Hgt1BYn86t4iZzwDOajH+jeb9VXMT5s9 liauQ4NiiMBe6F/mldoJ+XrtlPZ9rdx5jbgz8zBQcB7LzoWv91q0GOVpk/Am8FQ= =E1eL -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 00:37:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96A2623C; Wed, 21 Jan 2015 00:37:45 +0000 (UTC) Received: from mail-yh0-x22a.google.com (mail-yh0-x22a.google.com [IPv6:2607:f8b0:4002:c01::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 46DAA6A2; Wed, 21 Jan 2015 00:37:45 +0000 (UTC) Received: by mail-yh0-f42.google.com with SMTP id a41so5580612yho.1; Tue, 20 Jan 2015 16:37:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=mYFdu5RixQPZoBkoG9X98f+ZVaEV5J8dEGOdcWow9g8=; b=J0aXZQhmV6zwvXzfmlN660l9sLKqDoEbADtAW6k2uS/kSYTcC7eePDPnBH5i+c7NXv dGcOxiLdScgOelRjGCx74syJNSIgy8c1HsTdecHg3mynNM4BAZLCjNp9VtpINgdkve7w Z0zBXePZ9VOt2v7LzV8PnSfBXs4HrtrPkMCkBpS15nT3pgrLOUboPAFx03tuumHD8qYg ncsqaYnQQG/wmyM1nCnKWmUd2/Czh4B2FS3quE1kdWEXiK23iVWV2w9xeaApihe7HYzz f4FY0EWtpaY8QvD3/gIRaXXr3aty4N9z6auLUJDNwv2RZGfxLEcECXl6Du9aXpfI+FL5 4LCg== MIME-Version: 1.0 X-Received: by 10.170.44.4 with SMTP id 4mr2949166ykm.101.1421800664480; Tue, 20 Jan 2015 16:37:44 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Tue, 20 Jan 2015 16:37:44 -0800 (PST) In-Reply-To: <54BEF154.3030606@ignoranthack.me> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> Date: Tue, 20 Jan 2015 16:37:44 -0800 X-Google-Sender-Auth: -L9LfQBSVVnEHcsvC2pM95gqdno Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Sean Bruno Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 00:37:45 -0000 On Tue, Jan 20, 2015 at 4:22 PM, Sean Bruno wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA512 > > On 01/20/15 15:59, K. Macy wrote: >> On Tue, Jan 20, 2015 at 3:53 PM, Sean Bruno >> wrote: On 01/20/15 15:48, K. Macy wrote: >>>>> Are any other drivers hitting this? e.g. cxgb/cxgbe? >>>>> >>>>> -K >>>>> >> >> Unkown to me. Nor am I aware of anyone else who ever hit our >> panics either. Our environment, and the failure, was only seen in >> the Intel 10GE space (ixgbe). This is an artifact of our use >> cases, and hasn't been expanded nor tested in our environment with >> other vendor interfaces. >> >>> For an ill characterized problem isolated to one environment >>> this seems like a workaround that should not be part of the >>> general code base. >> >>> -K >> > > There was never any indication in our testing that the driver was > involved in any way. > > In our universe, this commit (right or wrong) resolved our panics. I > think that there is some room for improvement based on the commentary > in this thread, but some people do indeed prefer stability over > performance. I hope we can come to a middle ground somewhere here. I would pick stability over performance any day. However, it _seems_ to me, and maybe I simply don't understand some key details, that the fix consisted of largely single-threading the callout system. And as I say I may simply not understand the specifics, but this sort of large scale disabling does not constitute a fix but is a workaround. It's more like disabling preemption because it fixes a panic. Yes, it might "fix" a whole array of bugs that crop up but it could not be seen as a fix to an otherwise working system. -K > > sean > >> >> sean >> >>>>> On Tue, Jan 20, 2015 at 3:46 PM, Sean Bruno >>>>> wrote: On 01/20/15 15:40, K. Macy >>>>> wrote: >>>>>>>> I think you're working around driver locking bugs by >>>>>>>> crippling the callout code. >>>>>>>> >>>>>>>> -K >>>>>>>> >>>>> >>>>> We had zero evidence of this. What leads you down that path? >>>>> I'm totally open to being wrong, e.g. "yeah, you slowed down >>>>> things so that you don't hit a race condition" >>>>> >>>>> sean >>>>> >>>>>>>> On Tue, Jan 20, 2015 at 3:35 PM, Sean Bruno >>>>>>>> wrote: On 01/20/15 14:30, >>>>>>>> Hans Petter Selasky wrote: >>>>>>>>>>> On 01/20/15 22:11, Gleb Smirnoff wrote: >>>>>>>>>>>> On Tue, Jan 20, 2015 at 09:51:26AM +0200, >>>>>>>>>>>> Konstantin Belousov wrote: K> > Like stated in >>>>>>>>>>>> the manual page, callout_reset_curcpu/on() does >>>>>>>>>>>> not work K> > with MPSAFE callouts any more! K> >>>>>>>>>>>> I.e. you 'fixed' some undeterminate bugs in >>>>>>>>>>>> callout migration by not K> doing migration at >>>>>>>>>>>> all anymore. K> K> > K> > You need to use >>>>>>>>>>>> callout_init_{mtx,rm,rw} and remove the custom >>>>>>>>>>>> locking K> > inside the callback in the TCP >>>>>>>>>>>> stack to get it working like before! K> K> No, >>>>>>>>>>>> you need to do this, if you think that whole >>>>>>>>>>>> callout KPI must be K> rototiled. It is up to >>>>>>>>>>>> the person who modifies the KPI, to ensure that >>>>>>>>>>>> K> existing code is not broken. K> K> As I >>>>>>>>>>>> understand, currently we are back to the >>>>>>>>>>>> one-cpu callouts. K> Do other people consider >>>>>>>>>>>> this situation acceptable ? >>>>>>>>>>>> >>>>>>>>>>>> I think this isn't acceptable. The commit to a >>>>>>>>>>>> complex subsystem lacked a review from persons >>>>>>>>>>>> involved in the system before. The commit to >>>>>>>>>>>> subsystem broke consumers of the subsystem and >>>>>>>>>>>> this was even done not accidentially, but due >>>>>>>>>>>> to Hans not caring about it. >>>>>>>>>>>> >>>>>>>>>>>> As for me this is enough to request a backout, >>>>>>>>>>>> and let the change back in only after proper >>>>>>>>>>>> review. >>>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Hi Gleb, >>>>>>>>>>> >>>>>>>>>>> Backing out my callout API patch means we will >>>>>>>>>>> for sure re-introduce an unknown callout spinlock >>>>>>>>>>> hang, as noted to me by several people. What do >>>>>>>>>>> you think about that? dram Maybe "Jason Wolfe" >>>>>>>>>>> CC'ed can add to 10-stable w/o my patches: >>>>>>>>>>> >>>>>>>> >>>>>>>> Jason picked up this patch for work and it resolved >>>>>>>> our instability issues that had remained unsolved for >>>>>>>> quite some time as reported to freebsd-net: >>>>>>>> >>>>>>>> https://lists.freebsd.org/pipermail/freebsd-net/2015-January/040895.html >>>>>>>> >>>>>>>> >>>>>>>> >> >>>>>>>> > This had gone undiagnosed for some time (even with the gracious >>>>>>>> help of jhb in offline emails, thanks btw!). >>>>>>>> >>>>>>>> There's some diagnostics in that email thread that may >>>>>>>> be of value to you folks for determination of the >>>>>>>> validity of changing the callout API or at least >>>>>>>> understanding why we were involved in diagnostics. >>>>>>>> >>>>>>>> While I'd sure love to tune performance, the fact that >>>>>>>> our machines were basically going out to lunch without >>>>>>>> these changes, probably means that others were seeing >>>>>>>> it and didn't know what else to do. As much as I enjoy >>>>>>>> a good "break out the pitch forks and torches" email >>>>>>>> thread, this increased stability for us and is allowing >>>>>>>> us to upgrade from freebsd8 to freebsd10. Bear this in >>>>>>>> mind when you throw your voice in favor of reverting. >>>>>>>> >>>>>>>>>>> int callout_reset_sbt_on(struct callout *c, >>>>>>>>>>> sbintime_t sbt, sbintime_t precision, void >>>>>>>>>>> (*ftn)(void *), void *arg, int cpu, int flags) { >>>>>>>>>>> sbintime_t to_sbt, pr; struct callout_cpu *cc; >>>>>>>>>>> int cancelled, direct; >>>>>>>>>>> >>>>>>>>>>> + cpu = timeout_cpu; /* XXX test code XXX >>>>>>>>>>> */ >>>>>>>>>>> >>>>>>>>>>> cancelled = 0; >>>>>>>>>>> >>>>>>>> >>>>>>>> Jason or I would have to run this in production, which >>>>>>>> would be problematic I fear. We never had a >>>>>>>> deterministic test case that would exhibit the reported >>>>>>>> failure. We merely "tested in production" and saw that >>>>>>>> panics ceased. We didn't note a dropoff in our traffic >>>>>>>> either, perhaps we are not as efficient as others in >>>>>>>> this corner case, but we were consistently seeing the >>>>>>>> spinlock hangs after a day or so of traffic. >>>>>>>> >>>>>>>>>>> And see if he observes a callout spinlock hang or >>>>>>>>>>> not on his test setup. The patch above should >>>>>>>>>>> force all callouts to the same thread basically. >>>>>>>>>>> Then we could maybe see if single threading the >>>>>>>>>>> callouts has anything to do with solving the >>>>>>>>>>> spinlock hang. >>>>>>>>>>> >>>>>>>>>>> The "rewritten" callout API still has all the >>>>>>>>>>> features and capabilities the old one had, when >>>>>>>>>>> used as described in "man 9 callout". >>>>>>>>>>> >>>>>>>>>>> At the present moment I'm not technically >>>>>>>>>>> convinced a backout is correct. >>>>>>>> >>>>>>>> Neither am I, to be honest. Just based on *results*. >>>>>>>> >>>>>>>>>>> >>>>>>>>>>> Gleb: I think we would see far better results >>>>>>>>>>> with high speed internet links using TCP if we >>>>>>>>>>> could extend the LRO (large receive offload) code >>>>>>>>>>> to accumulate more than 64KBytes worth of data >>>>>>>>>>> per call to the TCP stack instead of complaining >>>>>>>>>>> about some callouts ending up on the same thread! >>>>>>>>>>> Actually I have a patch for that. >>>>>>>>>>> >>>>>>>>>>> --HPS >>>>>>>>>>> >>>>>>>>>>> >>>>>>>>>>> >>>>>>>> >>>>>>>>> _______________________________________________ >>>>>>>>> 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" >>>>>>>> >>>>>>>> >>>>> >>>>> >>>>> >> >> >> >> > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2 > > iQF8BAEBCgBmBQJUvvFSXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w > ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRCQUFENDYzMkU3MTIxREU4RDIwOTk3REQx > MjAxRUZDQTFFNzI3RTY0AAoJEBIB78oecn5k1AcIAJvIeDso4/a4YqEyXxGj4CAb > QLfESoILRDF3LpczRpIFGnUPRs9pWUTm6DIUut0ZjgLChq1kHzdi2uIFe9QB3ehX > zzw4MEtxDEqXv5zOAmP1gvcx1a2rKZJnTlfW2CHa2QAYTR06BFARu8u3NyC3tZiq > o/NGpidv+nrkcrDSHmzpVgIrlZzyB+YsGyNcvRUkewxMpos9syB2sKiXm9u/MQYQ > nHyjFw9IOjDFAiZgww0y/8QYB9efr639Hgt1BYn86t4iZzwDOajH+jeb9VXMT5s9 > liauQ4NiiMBe6F/mldoJ+XrtlPZ9rdx5jbgz8zBQcB7LzoWv91q0GOVpk/Am8FQ= > =E1eL > -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 00:50:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C49C4BE; Wed, 21 Jan 2015 00:50:00 +0000 (UTC) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D1AF07E6; Wed, 21 Jan 2015 00:49:59 +0000 (UTC) Received: by mail-ig0-f181.google.com with SMTP id hn18so6095450igb.2; Tue, 20 Jan 2015 16:49:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=quqiDEo6lbjiQU3p59cMdu3xkbwGtlVCKg33kJKiBXI=; b=XIVsc0kP68F80uzjgKxKv8yLvvgoR/So3T3KsGauRqWWdEP39yy1wA/LCGZtCmT4i2 5vg0xwjyelVCeFIN5vOY3U5Ok/1WrmN/3i9xFN3EXoHClvGDljB1zLwVu8C5AZ60EflQ NYNLXgQxiqbsmYbP+s+MDZpSGP1IA71l52fNGzWm9UG6D8WyFzhlBOUGCneM9R8Va1E0 08w2DCdsr6JzD7kriQcaQ/vcqYFC2/AAgqD9MgWv647pN2phuMBC6uUqp2xSIt7U1Gyq BqECdn/Gkaidffvr5bMoZLvyEGUZDlUDuaq1MGYvjX+P6LuVApMJUpACuazAdDP0HdzJ CutQ== MIME-Version: 1.0 X-Received: by 10.50.66.171 with SMTP id g11mr517250igt.49.1421801399255; Tue, 20 Jan 2015 16:49:59 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Tue, 20 Jan 2015 16:49:59 -0800 (PST) In-Reply-To: <54BED6FB.8060401@selasky.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> Date: Tue, 20 Jan 2015 16:49:59 -0800 X-Google-Sender-Auth: NXKq1hKRrZ9-zvF905vKlDFggLY Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 00:50:00 -0000 On 20 January 2015 at 14:30, Hans Petter Selasky wrote: > Backing out my callout API patch means we will for sure re-introduce an > unknown callout spinlock hang, as noted to me by several people. What do you > think about that? > > Maybe "Jason Wolfe" CC'ed can add to 10-stable w/o my patches: > > int > callout_reset_sbt_on(struct callout *c, sbintime_t sbt, sbintime_t > precision, > void (*ftn)(void *), void *arg, int cpu, int flags) > { > sbintime_t to_sbt, pr; > struct callout_cpu *cc; > int cancelled, direct; > > + cpu = timeout_cpu; /* XXX test code XXX */ > > cancelled = 0; > > And see if he observes a callout spinlock hang or not on his test setup. The > patch above should force all callouts to the same thread basically. Then we > could maybe see if single threading the callouts has anything to do with > solving the spinlock hang. > > The "rewritten" callout API still has all the features and capabilities the > old one had, when used as described in "man 9 callout". > > At the present moment I'm not technically convinced a backout is correct. > > Gleb: I think we would see far better results with high speed internet links > using TCP if we could extend the LRO (large receive offload) code to > accumulate more than 64KBytes worth of data per call to the TCP stack > instead of complaining about some callouts ending up on the same thread! > Actually I have a patch for that. You should totally try say, 100,000 active TCP connections on a box. See what happens to swi0 (clock). TL;DR - the lock contention sucks and it takes a chunk of the core up. The lock contention is highly not good. That's why I'd like to see both the callout stuff in its slightly-better-defined-and-sane state from you /and/ make it so TCP can use it. I'll have to double-check to see if the RSS stuff is all lined up correctly so we can use it when we create the callouts (well, at inpcb creation time, right), rather than when we first schedule them. Then we can experiment with having the initial CPU be specified at callout create time rather than expecting to be able to move it when we first schedule it. Or, hm, maybe have it so we don't have a CPU chosen until the first time we schedule the timeout, and if it hasn't been scheduled before, allow the CPU to be set? Because at that point we aren't migrating it off f timeout_cpu - it's never been added to it in the first place. -a From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 00:50:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7119C5FC for ; Wed, 21 Jan 2015 00:50:41 +0000 (UTC) Received: from nm32-vm4.bullet.mail.bf1.yahoo.com (nm32-vm4.bullet.mail.bf1.yahoo.com [72.30.239.140]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 06DA67EF for ; Wed, 21 Jan 2015 00:50:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421801433; bh=MHbTwGeIoqlEwpe67rWMRNPHZq1BICYRwxiZrc2nNj4=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=lahE/Oj5ylz/KCv5YvCnD6qwLKECDnBujr0zA/H1QHpcRuaImpbm/uMKTsIPIn2W7nLc+NMuE3+npOzHiRlxvEiRtgJ5j+DkeUTXULjnMotdlEwhmg0v/9Ky7ZoHFYQAiNCj7yxzcPQDKbYk7TM+e4tBcS7RcW4UViz9R3Oe4ugwO20q59mEKRgoXn2qg751eCzsVxv0jsOzElkguKMRMykZp0fEPZDBYTPyoCrU2QmTiZHlW2Ukt7F37lt8vgGf+dSIvXfSXtrLukFXymZSZwgU40Oq7I6PwtyOtzD66d5ZDIy9Gflt0SD0h6pmCunA8F8BPoKZXZL7HfB/SMo/1A== Received: from [66.196.81.174] by nm32.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 00:50:33 -0000 Received: from [68.142.230.64] by tm20.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 00:50:33 -0000 Received: from [127.0.0.1] by smtp221.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 00:50:33 -0000 X-Yahoo-Newman-Id: 89947.54961.bm@smtp221.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: w71VM0QVM1kfbA8rOKidKHokW0xPRTTw2.E2v9M52zspZKc OCSux4YCLc3D57scymTz3jKKZLftxZgacMMbucxzZstVCjkT2X6qPrrAvaU7 KC3YGGz.756qKxrMBhjeiFKfhg4qyJCRsS8fyKYton8iccA5.QvXleF2VHxh EJTas7XHHhTGrCUOg.ZITMM.DnVZkBP3XrPGG3HZV6jby5G0daF2ZjYXURw6 lGlU8Id_sM7rFeF3H4mhEzYN5HJqWfAmpRQCUe3nHQkMg0QCKFIYXGnzg24l 3aTDYbudcGRssxJx21.njkUsj4xcCc1ozqN1ig2aKBRyngl5LWq4PVkUKuRC .dIj7vIocWkyrzwmSnytLoD7B8PHS6CusCujol82.wIgzlEmUzmBKfANIY3T 38fWAA.nlYnoifFURooyYqWzzX9FJ.2b.E4dNZeHjnsAJ7RM8uyW38htP1yp G8144hQgZREo820SJXE4DrS6UTUsqjwXTUVj.TrGFe8cTRLLf5bg9lY8qCoX 9hv886jNi4lTjd47PMMZnLX0lXnTNiKL1XpVvZQ6goLKoqRFDMqv1R6fEhOH dXuDPk0lqxDCwvKrBaraJW0X4ioZFpSW_QRqQE.j_38FOx92OOFv4FpYy8YW yu1G9yWVYoQ-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54BEF7CF.9030505@FreeBSD.org> Date: Tue, 20 Jan 2015 19:50:23 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Navdeep Parhar , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> In-Reply-To: <54BEE305.6020905@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 00:50:41 -0000 On 01/20/15 18:21, Navdeep Parhar wrote: > The problem reported by Luigi has been fixed in r277225 already. > > Regards, > Navdeep > But the fix is rather ugly, isn't it? I would personally prefer to just kill the older gcc but in the meantime updating it so that it behaves like the updated gcc/clang would be better. IMHO. Pedro. > On 01/20/15 15:10, Pedro Giffuni wrote: >> Hi; >> >> I got this patch from the OpenBSD-tech list[1]. >> Perhaps this fixes the gcc issue? >> >> Apparently it's required for mesa too. >> >> Pedro. >> >> [1] http://article.gmane.org/gmane.os.openbsd.tech/40604 >> >> On 01/06/15 15:33, Navdeep Parhar wrote: >>> On Tue, Jan 06, 2015 at 07:58:34PM +0100, Luigi Rizzo wrote: >>>> >>>> On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar >>>> wrote: >>>> >>>> Author: np >>>> Date: Wed Dec 31 23:19:16 2014 >>>> New Revision: 276485 >>>> URL: https://svnweb.freebsd.org/changeset/base/276485 >>>> >>>> Log: >>>> cxgbe(4): major tx rework. >>>> >>>> >>>> FYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) >>>> which prevent the kernel from compiling with our stock gcc >>>> and its standard kernel build flags (specifically -std=...). >>>> >>>> Adding the following in the kernel config >>>> >>>> makeoptions COPTFLAGS="-fms-extensions" >>>> >>>> seems to do the job >>>> >>>> I know it is unavoidable that we'll end up with gcc not working, >>>> but maybe we can still avoid unnamed unions. >>> There are two unresolved issues with mp_ring and I had to make the >>> driver amd64-only while I consider my options. >>> >>> - platforms where gcc is the default (and our version has problems with >>> unnamed unions). This is simple to fix but reduces the >>> readability of >>> the code. But sure, if building head with gcc is popular then that >>> trumps readability. I wonder if adding -fms-extensions just to the >>> driver's build flags would be an acceptable compromise. >>> - platforms without the acq/rel versions of 64b cmpset. I think it >>> would be simple to add acq/rel variants to i386/pc98 and others that >>> already have 64b cmpset. The driver will be permanently unplugged >>> from >>> whatever remains (only 32 bit powerpc I think). >>> >>> I'll try to sort all this out within the next couple of weeks. >>> >>> Regards, >>> Navdeep >>> >>>> cheers >>>> luigi >>>> >>>> >>>> a) Front load as much work as possible in if_transmit, before >>>> any driver >>>> lock or software queue has to get involved. >>>> >>>> b) Replace buf_ring with a brand new mp_ring (multiproducer >>>> ring). This >>>> is specifically for the tx multiqueue model where one of the >>>> if_transmit >>>> producer threads becomes the consumer and other producers >>>> carry on as >>>> usual. mp_ring is implemented as standalone code and it >>>> should be >>>> possible to use it in any driver with tx multiqueue. It also >>>> has: >>>> - the ability to enqueue/dequeue multiple items. This might >>>> become >>>> significant if packet batching is ever implemented. >>>> - an abdication mechanism to allow a thread to give up >>>> writing tx >>>> descriptors and have another if_transmit thread take over. >>>> A thread >>>> that's writing tx descriptors can end up doing so for an >>>> unbounded >>>> time period if a) there are other if_transmit threads >>>> continuously >>>> feeding the sofware queue, and b) the chip keeps up with >>>> whatever the >>>> thread is throwing at it. >>>> - accurate statistics about interesting events even when the >>>> stats come >>>> at the expense of additional branches/conditional code. >>>> >>>> The NIC txq lock is uncontested on the fast path at this >>>> point. I've >>>> left it there for synchronization with the control events >>>> (interface >>>> up/down, modload/unload). >>>> >>>> c) Add support for "type 1" coalescing work request in the >>>> normal NIC tx >>>> path. This work request is optimized for frames with a single >>>> item in >>>> the DMA gather list. These are very common when forwarding >>>> packets. >>>> Note that netmap tx in cxgbe already uses these "type 1" work >>>> requests. >>>> >>>> d) Do not request automatic cidx updates every 32 >>>> descriptors. Instead, >>>> request updates via bits in individual work requests (still >>>> every 32 >>>> descriptors approximately). Also, request an automatic final >>>> update >>>> when the queue idles after activity. This means NIC tx >>>> reclaim is still >>>> performed lazily but it will catch up quickly as soon as the >>>> queue >>>> idles. This seems to be the best middle ground and I'll >>>> probably do >>>> something similar for netmap tx as well. >>>> >>>> e) Implement a faster tx path for WRQs (used by TOE tx and >>>> control >>>> queues, _not_ by the normal NIC tx). Allow work requests to >>>> be written >>>> directly to the hardware descriptor ring if room is >>>> available. I will >>>> convert t4_tom and iw_cxgbe modules to this faster style >>>> gradually. >>>> >>>> MFC after: 2 months >>>> >>>> Added: >>>> head/sys/dev/cxgbe/t4_mp_ring.c (contents, props changed) >>>> head/sys/dev/cxgbe/t4_mp_ring.h (contents, props changed) >>>> Modified: >>>> head/sys/conf/files >>>> head/sys/dev/cxgbe/adapter.h >>>> head/sys/dev/cxgbe/t4_l2t.c >>>> head/sys/dev/cxgbe/t4_main.c >>>> head/sys/dev/cxgbe/t4_sge.c >>>> head/sys/modules/cxgbe/if_cxgbe/Makefile >>>> >>>> Modified: head/sys/conf/files >>>> >>>> =========================================================================== >>>> >>>> >>>> === >>>> --- head/sys/conf/files Wed Dec 31 22:52:43 2014 (r276484) >>>> +++ head/sys/conf/files Wed Dec 31 23:19:16 2014 (r276485) >>>> @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p >>>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>>> dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ >>>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>>> +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ >>>> + compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>>> dev/cxgbe/t4_main.c optional cxgbe pci \ >>>> compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>>> dev/cxgbe/t4_netmap.c optional cxgbe pci \ >>>> >>>> Modified: head/sys/dev/cxgbe/adapter.h >>>> >>>> =========================================================================== >>>> >>>> >>>> === >>>> --- head/sys/dev/cxgbe/adapter.h Wed Dec 31 22:52:43 2014 >>>> (r276484) >>>> +++ head/sys/dev/cxgbe/adapter.h Wed Dec 31 23:19:16 2014 >>>> (r276485) >>>> @@ -152,7 +152,8 @@ enum { >>>> CL_METADATA_SIZE = CACHE_LINE_SIZE, >>>> >>>> SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR >>>> size in >>>> desc */ >>>> - TX_SGL_SEGS = 36, >>>> + TX_SGL_SEGS = 39, >>>> + TX_SGL_SEGS_TSO = 38, >>>> TX_WR_FLITS = SGE_MAX_WR_LEN / 8 >>>> }; >>>> >>>> @@ -273,6 +274,7 @@ struct port_info { >>>> struct timeval last_refreshed; >>>> struct port_stats stats; >>>> u_int tnl_cong_drops; >>>> + u_int tx_parse_error; >>>> >>>> eventhandler_tag vlan_c; >>>> >>>> @@ -308,23 +310,9 @@ struct tx_desc { >>>> __be64 flit[8]; >>>> }; >>>> >>>> -struct tx_map { >>>> - struct mbuf *m; >>>> - bus_dmamap_t map; >>>> -}; >>>> - >>>> -/* DMA maps used for tx */ >>>> -struct tx_maps { >>>> - struct tx_map *maps; >>>> - uint32_t map_total; /* # of DMA maps */ >>>> - uint32_t map_pidx; /* next map to be used */ >>>> - uint32_t map_cidx; /* reclaimed up to this index */ >>>> - uint32_t map_avail; /* # of available maps */ >>>> -}; >>>> - >>>> struct tx_sdesc { >>>> + struct mbuf *m; /* m_nextpkt linked chain of >>>> frames */ >>>> uint8_t desc_used; /* # of hardware descriptors >>>> used by the WR >>>> */ >>>> - uint8_t credits; /* NIC txq: # of frames sent out >>>> in the WR >>>> */ >>>> }; >>>> >>>> >>>> @@ -378,16 +366,12 @@ struct sge_iq { >>>> enum { >>>> EQ_CTRL = 1, >>>> EQ_ETH = 2, >>>> -#ifdef TCP_OFFLOAD >>>> EQ_OFLD = 3, >>>> -#endif >>>> >>>> /* eq flags */ >>>> - EQ_TYPEMASK = 7, /* 3 lsbits hold the >>>> type */ >>>> - EQ_ALLOCATED = (1 << 3), /* firmware resources >>>> allocated */ >>>> - EQ_DOOMED = (1 << 4), /* about to be >>>> destroyed */ >>>> - EQ_CRFLUSHED = (1 << 5), /* expecting an update >>>> from SGE */ >>>> - EQ_STALLED = (1 << 6), /* out of hw descriptors >>>> or dmamaps >>>> */ >>>> + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the >>>> type (see >>>> above) */ >>>> + EQ_ALLOCATED = (1 << 2), /* firmware resources >>>> allocated */ >>>> + EQ_ENABLED = (1 << 3), /* open for business */ >>>> }; >>>> >>>> /* Listed in order of preference. Update t4_sysctls too if you >>>> change >>>> these */ >>>> @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB >>>> struct sge_eq { >>>> unsigned int flags; /* MUST be first */ >>>> unsigned int cntxt_id; /* SGE context id for the eq */ >>>> - bus_dma_tag_t desc_tag; >>>> - bus_dmamap_t desc_map; >>>> - char lockname[16]; >>>> struct mtx eq_lock; >>>> >>>> struct tx_desc *desc; /* KVA of descriptor ring */ >>>> - bus_addr_t ba; /* bus address of descriptor >>>> ring */ >>>> - struct sge_qstat *spg; /* status page, for >>>> convenience */ >>>> uint16_t doorbells; >>>> volatile uint32_t *udb; /* KVA of doorbell (lies within >>>> BAR2) */ >>>> u_int udb_qid; /* relative qid within the >>>> doorbell page */ >>>> - uint16_t cap; /* max # of desc, for >>>> convenience */ >>>> - uint16_t avail; /* available descriptors, for >>>> convenience * >>>> / >>>> - uint16_t qsize; /* size (# of entries) of the >>>> queue */ >>>> + uint16_t sidx; /* index of the entry with the >>>> status page >>>> */ >>>> uint16_t cidx; /* consumer idx (desc idx) */ >>>> uint16_t pidx; /* producer idx (desc idx) */ >>>> - uint16_t pending; /* # of descriptors used since >>>> last >>>> doorbell */ >>>> + uint16_t equeqidx; /* EQUEQ last requested at this >>>> pidx */ >>>> + uint16_t dbidx; /* pidx of the most recent >>>> doorbell */ >>>> uint16_t iqid; /* iq that gets egr_update for >>>> the eq */ >>>> uint8_t tx_chan; /* tx channel used by the eq */ >>>> - struct task tx_task; >>>> - struct callout tx_callout; >>>> + volatile u_int equiq; /* EQUIQ outstanding */ >>>> >>>> - /* stats */ >>>> - >>>> - uint32_t egr_update; /* # of SGE_EGR_UPDATE >>>> notifications for eq >>>> */ >>>> - uint32_t unstalled; /* recovered from stall */ >>>> + bus_dma_tag_t desc_tag; >>>> + bus_dmamap_t desc_map; >>>> + bus_addr_t ba; /* bus address of descriptor >>>> ring */ >>>> + char lockname[16]; >>>> }; >>>> >>>> struct sw_zone_info { >>>> @@ -499,18 +476,19 @@ struct sge_fl { >>>> struct cluster_layout cll_alt; /* alternate refill >>>> zone, layout */ >>>> }; >>>> >>>> +struct mp_ring; >>>> + >>>> /* txq: SGE egress queue + what's needed for Ethernet NIC */ >>>> struct sge_txq { >>>> struct sge_eq eq; /* MUST be first */ >>>> >>>> struct ifnet *ifp; /* the interface this txq >>>> belongs to */ >>>> - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ >>>> - struct buf_ring *br; /* tx buffer ring */ >>>> + struct mp_ring *r; /* tx software ring */ >>>> struct tx_sdesc *sdesc; /* KVA of software descriptor >>>> ring */ >>>> - struct mbuf *m; /* held up due to temporary >>>> resource >>>> shortage */ >>>> - >>>> - struct tx_maps txmaps; >>>> + struct sglist *gl; >>>> + __be32 cpl_ctrl0; /* for convenience */ >>>> >>>> + struct task tx_reclaim_task; >>>> /* stats for common events first */ >>>> >>>> uint64_t txcsum; /* # of times hardware assisted >>>> with >>>> checksum */ >>>> @@ -519,13 +497,12 @@ struct sge_txq { >>>> uint64_t imm_wrs; /* # of work requests with >>>> immediate data * >>>> / >>>> uint64_t sgl_wrs; /* # of work requests with >>>> direct SGL */ >>>> uint64_t txpkt_wrs; /* # of txpkt work requests (not >>>> coalesced) >>>> */ >>>> - uint64_t txpkts_wrs; /* # of coalesced tx work >>>> requests */ >>>> - uint64_t txpkts_pkts; /* # of frames in coalesced tx >>>> work >>>> requests */ >>>> + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work >>>> requests */ >>>> + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work >>>> requests */ >>>> + uint64_t txpkts0_pkts; /* # of frames in type0 >>>> coalesced tx WRs */ >>>> + uint64_t txpkts1_pkts; /* # of frames in type1 >>>> coalesced tx WRs */ >>>> >>>> /* stats for not-that-common events */ >>>> - >>>> - uint32_t no_dmamap; /* no DMA map to load the mbuf */ >>>> - uint32_t no_desc; /* out of hardware descriptors */ >>>> } __aligned(CACHE_LINE_SIZE); >>>> >>>> /* rxq: SGE ingress queue + SGE free list + miscellaneous >>>> items */ >>>> @@ -574,7 +551,13 @@ struct wrqe { >>>> STAILQ_ENTRY(wrqe) link; >>>> struct sge_wrq *wrq; >>>> int wr_len; >>>> - uint64_t wr[] __aligned(16); >>>> + char wr[] __aligned(16); >>>> +}; >>>> + >>>> +struct wrq_cookie { >>>> + TAILQ_ENTRY(wrq_cookie) link; >>>> + int ndesc; >>>> + int pidx; >>>> }; >>>> >>>> /* >>>> @@ -585,17 +568,32 @@ struct sge_wrq { >>>> struct sge_eq eq; /* MUST be first */ >>>> >>>> struct adapter *adapter; >>>> + struct task wrq_tx_task; >>>> + >>>> + /* Tx desc reserved but WR not "committed" yet. */ >>>> + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) >>>> incomplete_wrs; >>>> >>>> - /* List of WRs held up due to lack of tx descriptors */ >>>> + /* List of WRs ready to go out as soon as descriptors are >>>> available. */ >>>> STAILQ_HEAD(, wrqe) wr_list; >>>> + u_int nwr_pending; >>>> + u_int ndesc_needed; >>>> >>>> /* stats for common events first */ >>>> >>>> - uint64_t tx_wrs; /* # of tx work requests */ >>>> + uint64_t tx_wrs_direct; /* # of WRs written directly to >>>> desc ring. >>>> */ >>>> + uint64_t tx_wrs_ss; /* # of WRs copied from scratch >>>> space. */ >>>> + uint64_t tx_wrs_copied; /* # of WRs queued and copied to >>>> desc ring. >>>> */ >>>> >>>> /* stats for not-that-common events */ >>>> >>>> - uint32_t no_desc; /* out of hardware descriptors */ >>>> + /* >>>> + * Scratch space for work requests that wrap around >>>> after reaching >>>> the >>>> + * status page, and some infomation about the last WR >>>> that used it. >>>> + */ >>>> + uint16_t ss_pidx; >>>> + uint16_t ss_len; >>>> + uint8_t ss[SGE_MAX_WR_LEN]; >>>> + >>>> } __aligned(CACHE_LINE_SIZE); >>>> >>>> >>>> @@ -744,7 +742,7 @@ struct adapter { >>>> struct sge sge; >>>> int lro_timeout; >>>> >>>> - struct taskqueue *tq[NCHAN]; /* taskqueues that flush >>>> data out * >>>> / >>>> + struct taskqueue *tq[NCHAN]; /* General purpose >>>> taskqueues */ >>>> struct port_info *port[MAX_NPORTS]; >>>> uint8_t chan_map[NCHAN]; >>>> >>>> @@ -978,12 +976,11 @@ static inline int >>>> tx_resume_threshold(struct sge_eq *eq) >>>> { >>>> >>>> - return (eq->qsize / 4); >>>> + /* not quite the same as qsize / 4, but this will do. */ >>>> + return (eq->sidx / 4); >>>> } >>>> >>>> /* t4_main.c */ >>>> -void t4_tx_task(void *, int); >>>> -void t4_tx_callout(void *); >>>> int t4_os_find_pci_capability(struct adapter *, int); >>>> int t4_os_pci_save_state(struct adapter *); >>>> int t4_os_pci_restore_state(struct adapter *); >>>> @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct adapt >>>> int t4_teardown_adapter_queues(struct adapter *); >>>> int t4_setup_port_queues(struct port_info *); >>>> int t4_teardown_port_queues(struct port_info *); >>>> -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); >>>> -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); >>>> void t4_intr_all(void *); >>>> void t4_intr(void *); >>>> void t4_intr_err(void *); >>>> void t4_intr_evt(void *); >>>> void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, >>>> struct wrqe *); >>>> -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); >>>> void t4_update_fl_bufsize(struct ifnet *); >>>> -int can_resume_tx(struct sge_eq *); >>>> +int parse_pkt(struct mbuf **); >>>> +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); >>>> +void commit_wrq_wr(struct sge_wrq *, void *, struct >>>> wrq_cookie *); >>>> >>>> /* t4_tracer.c */ >>>> struct t4_tracer; >>>> >>>> Modified: head/sys/dev/cxgbe/t4_l2t.c >>>> >>>> =========================================================================== >>>> >>>> >>>> === >>>> --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014 >>>> (r276484) >>>> +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014 >>>> (r276485) >>>> @@ -113,16 +113,15 @@ found: >>>> int >>>> t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) >>>> { >>>> - struct wrqe *wr; >>>> + struct wrq_cookie cookie; >>>> struct cpl_l2t_write_req *req; >>>> int idx = e->idx + sc->vres.l2t.start; >>>> >>>> mtx_assert(&e->lock, MA_OWNED); >>>> >>>> - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); >>>> - if (wr == NULL) >>>> + req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), >>>> 16), & >>>> cookie); >>>> + if (req == NULL) >>>> return (ENOMEM); >>>> - req = wrtod(wr); >>>> >>>> INIT_TP_WR(req, 0); >>>> OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, >>>> idx | >>>> @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct >>>> req->vlan = htons(e->vlan); >>>> memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); >>>> >>>> - t4_wrq_tx(sc, wr); >>>> + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); >>>> >>>> if (sync && e->state != L2T_STATE_SWITCHING) >>>> e->state = L2T_STATE_SYNC_WRITE; >>>> >>>> Modified: head/sys/dev/cxgbe/t4_main.c >>>> >>>> =========================================================================== >>>> >>>> >>>> === >>>> --- head/sys/dev/cxgbe/t4_main.c Wed Dec 31 22:52:43 2014 >>>> (r276484) >>>> +++ head/sys/dev/cxgbe/t4_main.c Wed Dec 31 23:19:16 2014 >>>> (r276485) >>>> @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); >>>> #include "common/t4_regs_values.h" >>>> #include "t4_ioctl.h" >>>> #include "t4_l2t.h" >>>> +#include "t4_mp_ring.h" >>>> >>>> /* T4 bus driver interface */ >>>> static int t4_probe(device_t); >>>> @@ -378,7 +379,8 @@ static void build_medialist(struct port_ >>>> static int cxgbe_init_synchronized(struct port_info *); >>>> static int cxgbe_uninit_synchronized(struct port_info *); >>>> static int setup_intr_handlers(struct adapter *); >>>> -static void quiesce_eq(struct adapter *, struct sge_eq *); >>>> +static void quiesce_txq(struct adapter *, struct sge_txq *); >>>> +static void quiesce_wrq(struct adapter *, struct sge_wrq *); >>>> static void quiesce_iq(struct adapter *, struct sge_iq *); >>>> static void quiesce_fl(struct adapter *, struct sge_fl *); >>>> static int t4_alloc_irq(struct adapter *, struct irq *, int rid, >>>> @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER >>>> static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); >>>> static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); >>>> #endif >>>> -static inline void txq_start(struct ifnet *, struct sge_txq *); >>>> static uint32_t fconf_to_mode(uint32_t); >>>> static uint32_t mode_to_fconf(uint32_t); >>>> static uint32_t fspec_to_fconf(struct t4_filter_specification >>>> *); >>>> @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, struct >>>> { >>>> struct port_info *pi = ifp->if_softc; >>>> struct adapter *sc = pi->adapter; >>>> - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; >>>> - struct buf_ring *br; >>>> + struct sge_txq *txq; >>>> + void *items[1]; >>>> int rc; >>>> >>>> M_ASSERTPKTHDR(m); >>>> + MPASS(m->m_nextpkt == NULL); /* not quite ready for >>>> this yet */ >>>> >>>> if (__predict_false(pi->link_cfg.link_ok == 0)) { >>>> m_freem(m); >>>> return (ENETDOWN); >>>> } >>>> >>>> - /* check if flowid is set */ >>>> - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>>> - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>>> rsrv_noflowq)) >>>> - + pi->rsrv_noflowq); >>>> - br = txq->br; >>>> - >>>> - if (TXQ_TRYLOCK(txq) == 0) { >>>> - struct sge_eq *eq = &txq->eq; >>>> - >>>> - /* >>>> - * It is possible that t4_eth_tx finishes up and >>>> releases >>>> the >>>> - * lock between the TRYLOCK above and the >>>> drbr_enqueue >>>> here. We >>>> - * need to make sure that this mbuf doesn't just >>>> sit there >>>> in >>>> - * the drbr. >>>> - */ >>>> - >>>> - rc = drbr_enqueue(ifp, br, m); >>>> - if (rc == 0 && callout_pending(&eq->tx_callout) >>>> == 0 && >>>> - !(eq->flags & EQ_DOOMED)) >>>> - callout_reset(&eq->tx_callout, 1, >>>> t4_tx_callout, >>>> eq); >>>> + rc = parse_pkt(&m); >>>> + if (__predict_false(rc != 0)) { >>>> + MPASS(m == NULL); /* was >>>> freed >>>> already */ >>>> + atomic_add_int(&pi->tx_parse_error, 1); /* rare, >>>> atomic is >>>> ok */ >>>> return (rc); >>>> } >>>> >>>> - /* >>>> - * txq->m is the mbuf that is held up due to a temporary >>>> shortage >>>> of >>>> - * resources and it should be put on the wire first. >>>> Then what's >>>> in >>>> - * drbr and finally the mbuf that was just passed in >>>> to us. >>>> - * >>>> - * Return code should indicate the fate of the mbuf that >>>> was passed >>>> in >>>> - * this time. >>>> - */ >>>> - >>>> - TXQ_LOCK_ASSERT_OWNED(txq); >>>> - if (drbr_needs_enqueue(ifp, br) || txq->m) { >>>> - >>>> - /* Queued for transmission. */ >>>> - >>>> - rc = drbr_enqueue(ifp, br, m); >>>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>>> - (void) t4_eth_tx(ifp, txq, m); >>>> - TXQ_UNLOCK(txq); >>>> - return (rc); >>>> - } >>>> + /* Select a txq. */ >>>> + txq = &sc->sge.txq[pi->first_txq]; >>>> + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>>> + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>>> rsrv_noflowq)) + >>>> + pi->rsrv_noflowq); >>>> >>>> - /* Direct transmission. */ >>>> - rc = t4_eth_tx(ifp, txq, m); >>>> - if (rc != 0 && txq->m) >>>> - rc = 0; /* held, will be transmitted soon >>>> (hopefully) */ >>>> + items[0] = m; >>>> + rc = mp_ring_enqueue(txq->r, items, 1, 4096); >>>> + if (__predict_false(rc != 0)) >>>> + m_freem(m); >>>> >>>> - TXQ_UNLOCK(txq); >>>> return (rc); >>>> } >>>> >>>> @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) >>>> struct port_info *pi = ifp->if_softc; >>>> struct sge_txq *txq; >>>> int i; >>>> - struct mbuf *m; >>>> >>>> /* queues do not exist if !PORT_INIT_DONE. */ >>>> if (pi->flags & PORT_INIT_DONE) { >>>> for_each_txq(pi, i, txq) { >>>> TXQ_LOCK(txq); >>>> - m_freem(txq->m); >>>> - txq->m = NULL; >>>> - while ((m = >>>> buf_ring_dequeue_sc(txq->br)) != NULL) >>>> - m_freem(m); >>>> + txq->eq.flags &= ~EQ_ENABLED; >>>> TXQ_UNLOCK(txq); >>>> + while (!mp_ring_is_idle(txq->r)) { >>>> + mp_ring_check_drainage(txq->r, 0); >>>> + pause("qflush", 1); >>>> + } >>>> } >>>> } >>>> if_qflush(ifp); >>>> @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift >>>> struct sge_txq *txq; >>>> >>>> for_each_txq(pi, i, txq) >>>> - drops += txq->br->br_drops; >>>> + drops += >>>> counter_u64_fetch(txq->r->drops); >>>> } >>>> >>>> return (drops); >>>> @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info >>>> { >>>> struct adapter *sc = pi->adapter; >>>> struct ifnet *ifp = pi->ifp; >>>> - int rc = 0; >>>> + int rc = 0, i; >>>> + struct sge_txq *txq; >>>> >>>> ASSERT_SYNCHRONIZED_OP(sc); >>>> >>>> @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info >>>> } >>>> >>>> /* >>>> + * Can't fail from this point onwards. Review >>>> cxgbe_uninit_synchronized >>>> + * if this changes. >>>> + */ >>>> + >>>> + for_each_txq(pi, i, txq) { >>>> + TXQ_LOCK(txq); >>>> + txq->eq.flags |= EQ_ENABLED; >>>> + TXQ_UNLOCK(txq); >>>> + } >>>> + >>>> + /* >>>> * The first iq of the first port to come up is used for >>>> tracing. >>>> */ >>>> if (sc->traceq < 0) { >>>> @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in >>>> { >>>> struct adapter *sc = pi->adapter; >>>> struct ifnet *ifp = pi->ifp; >>>> - int rc; >>>> + int rc, i; >>>> + struct sge_txq *txq; >>>> >>>> ASSERT_SYNCHRONIZED_OP(sc); >>>> >>>> @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in >>>> return (rc); >>>> } >>>> >>>> + for_each_txq(pi, i, txq) { >>>> + TXQ_LOCK(txq); >>>> + txq->eq.flags &= ~EQ_ENABLED; >>>> + TXQ_UNLOCK(txq); >>>> + } >>>> + >>>> clrbit(&sc->open_device_map, pi->port_id); >>>> PORT_LOCK(pi); >>>> ifp->if_drv_flags &= ~IFF_DRV_RUNNING; >>>> @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) >>>> >>>> if (pi->flags & PORT_INIT_DONE) { >>>> >>>> - /* Need to quiesce queues. XXX: ctrl queues? */ >>>> + /* Need to quiesce queues. */ >>>> + >>>> + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); >>>> >>>> for_each_txq(pi, i, txq) { >>>> - quiesce_eq(sc, &txq->eq); >>>> + quiesce_txq(sc, txq); >>>> } >>>> >>>> #ifdef TCP_OFFLOAD >>>> for_each_ofld_txq(pi, i, ofld_txq) { >>>> - quiesce_eq(sc, &ofld_txq->eq); >>>> + quiesce_wrq(sc, ofld_txq); >>>> } >>>> #endif >>>> >>>> @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) >>>> } >>>> >>>> static void >>>> -quiesce_eq(struct adapter *sc, struct sge_eq *eq) >>>> +quiesce_txq(struct adapter *sc, struct sge_txq *txq) >>>> { >>>> - EQ_LOCK(eq); >>>> - eq->flags |= EQ_DOOMED; >>>> + struct sge_eq *eq = &txq->eq; >>>> + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; >>>> >>>> - /* >>>> - * Wait for the response to a credit flush if one's >>>> - * pending. >>>> - */ >>>> - while (eq->flags & EQ_CRFLUSHED) >>>> - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); >>>> - EQ_UNLOCK(eq); >>>> + (void) sc; /* unused */ >>>> >>>> - callout_drain(&eq->tx_callout); /* XXX: iffy */ >>>> - pause("callout", 10); /* Still iffy */ >>>> +#ifdef INVARIANTS >>>> + TXQ_LOCK(txq); >>>> + MPASS((eq->flags & EQ_ENABLED) == 0); >>>> + TXQ_UNLOCK(txq); >>>> +#endif >>>> >>>> - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); >>>> + /* Wait for the mp_ring to empty. */ >>>> + while (!mp_ring_is_idle(txq->r)) { >>>> + mp_ring_check_drainage(txq->r, 0); >>>> + pause("rquiesce", 1); >>>> + } >>>> + >>>> + /* Then wait for the hardware to finish. */ >>>> + while (spg->cidx != htobe16(eq->pidx)) >>>> + pause("equiesce", 1); >>>> + >>>> + /* Finally, wait for the driver to reclaim all >>>> descriptors. */ >>>> + while (eq->cidx != eq->pidx) >>>> + pause("dquiesce", 1); >>>> +} >>>> + >>>> +static void >>>> +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) >>>> +{ >>>> + >>>> + /* XXXTX */ >>>> } >>>> >>>> static void >>>> @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) >>>> oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", >>>> CTLFLAG_RD, >>>> NULL, "port statistics"); >>>> children = SYSCTL_CHILDREN(oid); >>>> + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, >>>> "tx_parse_error", >>>> CTLFLAG_RD, >>>> + &pi->tx_parse_error, 0, >>>> + "# of tx packets with invalid length or # of >>>> segments"); >>>> >>>> #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ >>>> SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ >>>> @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) >>>> } >>>> #endif >>>> >>>> -static inline void >>>> -txq_start(struct ifnet *ifp, struct sge_txq *txq) >>>> -{ >>>> - struct buf_ring *br; >>>> - struct mbuf *m; >>>> - >>>> - TXQ_LOCK_ASSERT_OWNED(txq); >>>> - >>>> - br = txq->br; >>>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>>> - if (m) >>>> - t4_eth_tx(ifp, txq, m); >>>> -} >>>> - >>>> -void >>>> -t4_tx_callout(void *arg) >>>> -{ >>>> - struct sge_eq *eq = arg; >>>> - struct adapter *sc; >>>> - >>>> - if (EQ_TRYLOCK(eq) == 0) >>>> - goto reschedule; >>>> - >>>> - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { >>>> - EQ_UNLOCK(eq); >>>> -reschedule: >>>> - if (__predict_true(!(eq->flags && EQ_DOOMED))) >>>> - callout_schedule(&eq->tx_callout, 1); >>>> - return; >>>> - } >>>> - >>>> - EQ_LOCK_ASSERT_OWNED(eq); >>>> - >>>> - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { >>>> - >>>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>>> - struct sge_txq *txq = arg; >>>> - struct port_info *pi = >>>> txq->ifp->if_softc; >>>> - >>>> - sc = pi->adapter; >>>> - } else { >>>> - struct sge_wrq *wrq = arg; >>>> - >>>> - sc = wrq->adapter; >>>> - } >>>> - >>>> - taskqueue_enqueue(sc->tq[eq->tx_chan], >>>> &eq->tx_task); >>>> - } >>>> - >>>> - EQ_UNLOCK(eq); >>>> -} >>>> - >>>> -void >>>> -t4_tx_task(void *arg, int count) >>>> -{ >>>> - struct sge_eq *eq = arg; >>>> - >>>> - EQ_LOCK(eq); >>>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>>> - struct sge_txq *txq = arg; >>>> - txq_start(txq->ifp, txq); >>>> - } else { >>>> - struct sge_wrq *wrq = arg; >>>> - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); >>>> - } >>>> - EQ_UNLOCK(eq); >>>> -} >>>> - >>>> static uint32_t >>>> fconf_to_mode(uint32_t fconf) >>>> { >>>> @@ -7452,9 +7394,9 @@ static int >>>> set_filter_wr(struct adapter *sc, int fidx) >>>> { >>>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>>> - struct wrqe *wr; >>>> struct fw_filter_wr *fwr; >>>> unsigned int ftid; >>>> + struct wrq_cookie cookie; >>>> >>>> ASSERT_SYNCHRONIZED_OP(sc); >>>> >>>> @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, int fi >>>> >>>> ftid = sc->tids.ftid_base + fidx; >>>> >>>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>>> - if (wr == NULL) >>>> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), >>>> 16), & >>>> cookie); >>>> + if (fwr == NULL) >>>> return (ENOMEM); >>>> - >>>> - fwr = wrtod(wr); >>>> - bzero(fwr, sizeof (*fwr)); >>>> + bzero(fwr, sizeof(*fwr)); >>>> >>>> fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); >>>> fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); >>>> @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi >>>> f->pending = 1; >>>> sc->tids.ftids_in_use++; >>>> >>>> - t4_wrq_tx(sc, wr); >>>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>>> return (0); >>>> } >>>> >>>> @@ -7555,22 +7495,21 @@ static int >>>> del_filter_wr(struct adapter *sc, int fidx) >>>> { >>>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>>> - struct wrqe *wr; >>>> struct fw_filter_wr *fwr; >>>> unsigned int ftid; >>>> + struct wrq_cookie cookie; >>>> >>>> ftid = sc->tids.ftid_base + fidx; >>>> >>>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>>> - if (wr == NULL) >>>> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), >>>> 16), & >>>> cookie); >>>> + if (fwr == NULL) >>>> return (ENOMEM); >>>> - fwr = wrtod(wr); >>>> bzero(fwr, sizeof (*fwr)); >>>> >>>> t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); >>>> >>>> f->pending = 1; >>>> - t4_wrq_tx(sc, wr); >>>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>>> return (0); >>>> } >>>> >>>> @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long >>>> >>>> /* MAC stats */ >>>> t4_clr_port_stats(sc, pi->tx_chan); >>>> + pi->tx_parse_error = 0; >>>> >>>> if (pi->flags & PORT_INIT_DONE) { >>>> struct sge_rxq *rxq; >>>> @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned long >>>> txq->imm_wrs = 0; >>>> txq->sgl_wrs = 0; >>>> txq->txpkt_wrs = 0; >>>> - txq->txpkts_wrs = 0; >>>> - txq->txpkts_pkts = 0; >>>> - txq->br->br_drops = 0; >>>> - txq->no_dmamap = 0; >>>> - txq->no_desc = 0; >>>> + txq->txpkts0_wrs = 0; >>>> + txq->txpkts1_wrs = 0; >>>> + txq->txpkts0_pkts = 0; >>>> + txq->txpkts1_pkts = 0; >>>> + mp_ring_reset_stats(txq->r); >>>> } >>>> >>>> #ifdef TCP_OFFLOAD >>>> /* nothing to clear for each ofld_rxq */ >>>> >>>> for_each_ofld_txq(pi, i, wrq) { >>>> - wrq->tx_wrs = 0; >>>> - wrq->no_desc = 0; >>>> + wrq->tx_wrs_direct = 0; >>>> + wrq->tx_wrs_copied = 0; >>>> } >>>> #endif >>>> wrq = &sc->sge.ctrlq[pi->port_id]; >>>> - wrq->tx_wrs = 0; >>>> - wrq->no_desc = 0; >>>> + wrq->tx_wrs_direct = 0; >>>> + wrq->tx_wrs_copied = 0; >>>> } >>>> break; >>>> } >>>> >>>> Added: head/sys/dev/cxgbe/t4_mp_ring.c >>>> >>>> =========================================================================== >>>> >>>> >>>> === >>>> --- /dev/null 00:00:00 1970 (empty, because file is newly >>>> added) >>>> +++ head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 >>>> (r276485) >>>> @@ -0,0 +1,364 @@ >>>> +/*- >>>> + * Copyright (c) 2014 Chelsio Communications, Inc. >>>> + * All rights reserved. >>>> + * Written by: Navdeep Parhar >>>> + * >>>> + * Redistribution and use in source and binary forms, with or >>>> without >>>> + * modification, are permitted provided that the following >>>> conditions >>>> + * are met: >>>> + * 1. Redistributions of source code must retain the above >>>> copyright >>>> + * notice, this list of conditions and the following >>>> disclaimer. >>>> + * 2. Redistributions in binary form must reproduce the above >>>> copyright >>>> + * notice, this list of conditions and the following >>>> disclaimer in the >>>> + * documentation and/or other materials provided with the >>>> distribution. >>>> + * >>>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS >>>> ``AS IS'' AND >>>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >>>> LIMITED TO, THE >>>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A >>>> PARTICULAR >>>> PURPOSE >>>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR >>>> CONTRIBUTORS BE LIABLE >>>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >>>> CONSEQUENTIAL >>>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >>>> SUBSTITUTE GOODS >>>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >>>> INTERRUPTION) >>>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >>>> CONTRACT, >>>> STRICT >>>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >>>> ARISING IN ANY >>>> WAY >>>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >>>> POSSIBILITY OF >>>> + * SUCH DAMAGE. >>>> + */ >>>> + >>>> +#include >>>> +__FBSDID("$FreeBSD$"); >>>> + >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> +#include >>>> + >>>> +#include "t4_mp_ring.h" >>>> + >>>> +union ring_state { >>>> + struct { >>>> + uint16_t pidx_head; >>>> + uint16_t pidx_tail; >>>> + uint16_t cidx; >>>> + uint16_t flags; >>>> + }; >>>> + uint64_t state; >>>> +}; >>>> + >>>> +enum { >>>> + IDLE = 0, /* consumer ran to completion, nothing >>>> more to do. >>>> */ >>>> + BUSY, /* consumer is running already, or will >>>> be shortly. >>>> */ >>>> + STALLED, /* consumer stopped due to lack of >>>> resources. */ >>>> + ABDICATED, /* consumer stopped even though there >>>> was work to >>>> be >>>> + done because it wants another thread >>>> to take >>>> over. */ >>>> +}; >>>> + >>>> +static inline uint16_t >>>> +space_available(struct mp_ring *r, union ring_state s) >>>> +{ >>>> + uint16_t x = r->size - 1; >>>> + >>>> + if (s.cidx == s.pidx_head) >>>> + return (x); >>>> + else if (s.cidx > s.pidx_head) >>>> + return (s.cidx - s.pidx_head - 1); >>>> + else >>>> + return (x - s.pidx_head + s.cidx); >>>> +} >>>> + >>>> +static inline uint16_t >>>> +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) >>>> +{ >>>> + int x = r->size - idx; >>>> + >>>> + MPASS(x > 0); >>>> + return (x > n ? idx + n : n - x); >>>> +} >>>> + >>>> +/* Consumer is about to update the ring's state to s */ >>>> +static inline uint16_t >>>> +state_to_flags(union ring_state s, int abdicate) >>>> +{ >>>> + >>>> + if (s.cidx == s.pidx_tail) >>>> + return (IDLE); >>>> + else if (abdicate && s.pidx_tail != s.pidx_head) >>>> + return (ABDICATED); >>>> + >>>> + return (BUSY); >>>> +} >>>> + >>>> +/* >>>> + * Caller passes in a state, with a guarantee that there is >>>> work to do and >>>> that >>>> + * all items up to the pidx_tail in the state are visible. >>>> + */ >>>> +static void >>>> +drain_ring(struct mp_ring *r, union ring_state os, uint16_t >>>> prev, int >>>> budget) >>>> +{ >>>> + union ring_state ns; >>>> + int n, pending, total; >>>> + uint16_t cidx = os.cidx; >>>> + uint16_t pidx = os.pidx_tail; >>>> + >>>> + MPASS(os.flags == BUSY); >>>> + MPASS(cidx != pidx); >>>> + >>>> + if (prev == IDLE) >>>> + counter_u64_add(r->starts, 1); >>>> + pending = 0; >>>> + total = 0; >>>> + >>>> + while (cidx != pidx) { >>>> + >>>> + /* Items from cidx to pidx are available for >>>> consumption. * >>>> / >>>> + n = r->drain(r, cidx, pidx); >>>> + if (n == 0) { >>>> + critical_enter(); >>>> + do { >>>> + os.state = ns.state = r->state; >>>> + ns.cidx = cidx; >>>> + ns.flags = STALLED; >>>> + } while (atomic_cmpset_64(&r->state, >>>> os.state, >>>> + ns.state) == 0); >>>> + critical_exit(); >>>> + if (prev != STALLED) >>>> + counter_u64_add(r->stalls, 1); >>>> + else if (total > 0) { >>>> + counter_u64_add(r->restarts, 1); >>>> + counter_u64_add(r->stalls, 1); >>>> + } >>>> + break; >>>> + } >>>> + cidx = increment_idx(r, cidx, n); >>>> + pending += n; >>>> + total += n; >>>> + >>>> + /* >>>> + * We update the cidx only if we've caught up >>>> with the >>>> pidx, the >>>> + * real cidx is getting too far ahead of the one >>>> visible to >>>> + * everyone else, or we have exceeded our budget. >>>> + */ >>>> + if (cidx != pidx && pending < 64 && total < >>>> budget) >>>> + continue; >>>> + critical_enter(); >>>> + do { >>>> + os.state = ns.state = r->state; >>>> + ns.cidx = cidx; >>>> + ns.flags = state_to_flags(ns, total >= >>>> budget); >>>> + } while (atomic_cmpset_acq_64(&r->state, >>>> os.state, >>>> ns.state) == 0); >>>> + critical_exit(); >>>> + >>>> + if (ns.flags == ABDICATED) >>>> + counter_u64_add(r->abdications, 1); >>>> + if (ns.flags != BUSY) { >>>> + /* Wrong loop exit if we're going to >>>> stall. */ >>>> + MPASS(ns.flags != STALLED); >>>> + if (prev == STALLED) { >>>> + MPASS(total > 0); >>>> + counter_u64_add(r->restarts, 1); >>>> + } >>>> + break; >>>> + } >>>> + >>>> + /* >>>> + * The acquire style atomic above guarantees >>>> visibility of >>>> items >>>> + * associated with any pidx change that we >>>> notice here. >>>> + */ >>>> + pidx = ns.pidx_tail; >>>> + pending = 0; >>>> + } >>>> +} >>>> + >>>> +int >>>> +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, >>>> ring_drain_t >>>> drain, >>>> + ring_can_drain_t can_drain, struct malloc_type *mt, int >>>> flags) >>>> +{ >>>> + struct mp_ring *r; >>>> + >>>> + /* All idx are 16b so size can be 65536 at most */ >>>> + if (pr == NULL || size < 2 || size > 65536 || drain == >>>> NULL || >>>> + can_drain == NULL) >>>> + return (EINVAL); >>>> + *pr = NULL; >>>> + flags &= M_NOWAIT | M_WAITOK; >>>> + MPASS(flags != 0); >>>> + >>>> + r = malloc(__offsetof(struct mp_ring, items[size]), mt, >>>> flags | >>>> M_ZERO); >>>> + if (r == NULL) >>>> + return (ENOMEM); >>>> + r->size = size; >>>> + r->cookie = cookie; >>>> + r->mt = mt; >>>> + r->drain = drain; >>>> + r->can_drain = can_drain; >>>> + r->enqueues = counter_u64_alloc(flags); >>>> + r->drops = counter_u64_alloc(flags); >>>> + r->starts = counter_u64_alloc(flags); >>>> + r->stalls = counter_u64_alloc(flags); >>>> + r->restarts = counter_u64_alloc(flags); >>>> + r->abdications = counter_u64_alloc(flags); >>>> + if (r->enqueues == NULL || r->drops == NULL || r->starts >>>> == NULL || >>>> + r->stalls == NULL || r->restarts == NULL || >>>> + r->abdications == NULL) { >>>> + mp_ring_free(r); >>>> + return (ENOMEM); >>>> + } >>>> + >>>> + *pr = r; >>>> + return (0); >>>> +} >>>> + >>>> +void >>>> + >>>> +mp_ring_free(struct mp_ring *r) >>>> +{ >>>> + >>>> + if (r == NULL) >>>> + return; >>>> + >>>> + if (r->enqueues != NULL) >>>> + counter_u64_free(r->enqueues); >>>> + if (r->drops != NULL) >>>> + counter_u64_free(r->drops); >>>> + if (r->starts != NULL) >>>> + counter_u64_free(r->starts); >>>> + if (r->stalls != NULL) >>>> + counter_u64_free(r->stalls); >>>> + if (r->restarts != NULL) >>>> + counter_u64_free(r->restarts); >>>> + if (r->abdications != NULL) >>>> + counter_u64_free(r->abdications); >>>> + >>>> + free(r, r->mt); >>>> +} >>>> + >>>> +/* >>>> + * Enqueue n items and maybe drain the ring for some time. >>>> + * >>>> + * Returns an errno. >>>> + */ >>>> +int >>>> +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int >>>> budget) >>>> +{ >>>> + union ring_state os, ns; >>>> + uint16_t pidx_start, pidx_stop; >>>> + int i; >>>> + >>>> + MPASS(items != NULL); >>>> + MPASS(n > 0); >>>> + >>>> >>>> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>>> >>>> >>>> >>>> >>>> >>>> -- >>>> -----------------------------------------+------------------------------- >>>> >>>> >>>> Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. >>>> dell'Informazione >>>> http://www.iet.unipi.it/~luigi/ . Universita` di Pisa >>>> TEL +39-050-2211611 . via Diotisalvi 2 >>>> Mobile +39-338-6809875 . 56122 PISA (Italy) >>>> -----------------------------------------+------------------------------- >>>> >>>> >> > > From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:06:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 997E9871; Wed, 21 Jan 2015 01:06:05 +0000 (UTC) Received: from mail-pd0-x22f.google.com (mail-pd0-x22f.google.com [IPv6:2607:f8b0:400e:c02::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5F1C9976; Wed, 21 Jan 2015 01:06:05 +0000 (UTC) Received: by mail-pd0-f175.google.com with SMTP id fl12so13419584pdb.6; Tue, 20 Jan 2015 17:06:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=E1vUNFCsp0k7+y5juK4Pa4/MdXQIrzdiGaFADLGv8YQ=; b=N09TYSbJI7P1WB+NpnHDJD9SUJfuxz8DV9Pm0LLwcJuGQgjpXWjPkWUTk2Sm7qjib9 jbUBMRud3r4HScLwiw2wkJ+UpoVDiACpN6jMSNNHVw2ko1RtNmdz1P2+zOWqQ9kISDUO Zl8yhGNkWmlarZIAf9b/uD7qkdq7UVD5LTGQJnHdwivbjLAmn7UkWZhQSrPQET/5MGI7 YH9Dqjf2OxdW6xDJNJoH5fNU/PQN5KQFpYMoVFKl3kwgITNwb/PK8k281yXQO1Ier7/g gQw/cdHcUKjWp7Lz6AYXtQp+XKpMu4D9qY6JYKdOVCYt8cCGJ8z/oykeJfDX2h3ElDZc AQzQ== X-Received: by 10.69.26.130 with SMTP id iy2mr58462302pbd.93.1421802364906; Tue, 20 Jan 2015 17:06:04 -0800 (PST) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id gk2sm4130386pbc.14.2015.01.20.17.06.02 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 17:06:03 -0800 (PST) Sender: Navdeep Parhar Message-ID: <54BEFB79.6090806@FreeBSD.org> Date: Tue, 20 Jan 2015 17:06:01 -0800 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> In-Reply-To: <54BEF7CF.9030505@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:06:05 -0000 On 01/20/15 16:50, Pedro Giffuni wrote: > > On 01/20/15 18:21, Navdeep Parhar wrote: >> The problem reported by Luigi has been fixed in r277225 already. >> >> Regards, >> Navdeep >> > > But the fix is rather ugly, isn't it? I would personally prefer to just > kill the older > gcc but in the meantime updating it so that it behaves like the updated > gcc/clang would be better. IMHO. I'm not sure why you think the fix is ugly. Modifying the base compiler to deal with minor stuff like this seems excessive and I never even considered that. Regards, Navdeep > > Pedro. > >> On 01/20/15 15:10, Pedro Giffuni wrote: >>> Hi; >>> >>> I got this patch from the OpenBSD-tech list[1]. >>> Perhaps this fixes the gcc issue? >>> >>> Apparently it's required for mesa too. >>> >>> Pedro. >>> >>> [1] http://article.gmane.org/gmane.os.openbsd.tech/40604 >>> >>> On 01/06/15 15:33, Navdeep Parhar wrote: >>>> On Tue, Jan 06, 2015 at 07:58:34PM +0100, Luigi Rizzo wrote: >>>>> >>>>> On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar >>>>> wrote: >>>>> >>>>> Author: np >>>>> Date: Wed Dec 31 23:19:16 2014 >>>>> New Revision: 276485 >>>>> URL: https://svnweb.freebsd.org/changeset/base/276485 >>>>> >>>>> Log: >>>>> cxgbe(4): major tx rework. >>>>> >>>>> >>>>> FYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) >>>>> which prevent the kernel from compiling with our stock gcc >>>>> and its standard kernel build flags (specifically -std=...). >>>>> >>>>> Adding the following in the kernel config >>>>> >>>>> makeoptions COPTFLAGS="-fms-extensions" >>>>> >>>>> seems to do the job >>>>> >>>>> I know it is unavoidable that we'll end up with gcc not working, >>>>> but maybe we can still avoid unnamed unions. >>>> There are two unresolved issues with mp_ring and I had to make the >>>> driver amd64-only while I consider my options. >>>> >>>> - platforms where gcc is the default (and our version has problems with >>>> unnamed unions). This is simple to fix but reduces the >>>> readability of >>>> the code. But sure, if building head with gcc is popular then that >>>> trumps readability. I wonder if adding -fms-extensions just to the >>>> driver's build flags would be an acceptable compromise. >>>> - platforms without the acq/rel versions of 64b cmpset. I think it >>>> would be simple to add acq/rel variants to i386/pc98 and others that >>>> already have 64b cmpset. The driver will be permanently unplugged >>>> from >>>> whatever remains (only 32 bit powerpc I think). >>>> >>>> I'll try to sort all this out within the next couple of weeks. >>>> >>>> Regards, >>>> Navdeep >>>> >>>>> cheers >>>>> luigi >>>>> >>>>> >>>>> a) Front load as much work as possible in if_transmit, before >>>>> any driver >>>>> lock or software queue has to get involved. >>>>> >>>>> b) Replace buf_ring with a brand new mp_ring (multiproducer >>>>> ring). This >>>>> is specifically for the tx multiqueue model where one of the >>>>> if_transmit >>>>> producer threads becomes the consumer and other producers >>>>> carry on as >>>>> usual. mp_ring is implemented as standalone code and it >>>>> should be >>>>> possible to use it in any driver with tx multiqueue. It also >>>>> has: >>>>> - the ability to enqueue/dequeue multiple items. This might >>>>> become >>>>> significant if packet batching is ever implemented. >>>>> - an abdication mechanism to allow a thread to give up >>>>> writing tx >>>>> descriptors and have another if_transmit thread take over. >>>>> A thread >>>>> that's writing tx descriptors can end up doing so for an >>>>> unbounded >>>>> time period if a) there are other if_transmit threads >>>>> continuously >>>>> feeding the sofware queue, and b) the chip keeps up with >>>>> whatever the >>>>> thread is throwing at it. >>>>> - accurate statistics about interesting events even when the >>>>> stats come >>>>> at the expense of additional branches/conditional code. >>>>> >>>>> The NIC txq lock is uncontested on the fast path at this >>>>> point. I've >>>>> left it there for synchronization with the control events >>>>> (interface >>>>> up/down, modload/unload). >>>>> >>>>> c) Add support for "type 1" coalescing work request in the >>>>> normal NIC tx >>>>> path. This work request is optimized for frames with a single >>>>> item in >>>>> the DMA gather list. These are very common when forwarding >>>>> packets. >>>>> Note that netmap tx in cxgbe already uses these "type 1" work >>>>> requests. >>>>> >>>>> d) Do not request automatic cidx updates every 32 >>>>> descriptors. Instead, >>>>> request updates via bits in individual work requests (still >>>>> every 32 >>>>> descriptors approximately). Also, request an automatic final >>>>> update >>>>> when the queue idles after activity. This means NIC tx >>>>> reclaim is still >>>>> performed lazily but it will catch up quickly as soon as the >>>>> queue >>>>> idles. This seems to be the best middle ground and I'll >>>>> probably do >>>>> something similar for netmap tx as well. >>>>> >>>>> e) Implement a faster tx path for WRQs (used by TOE tx and >>>>> control >>>>> queues, _not_ by the normal NIC tx). Allow work requests to >>>>> be written >>>>> directly to the hardware descriptor ring if room is >>>>> available. I will >>>>> convert t4_tom and iw_cxgbe modules to this faster style >>>>> gradually. >>>>> >>>>> MFC after: 2 months >>>>> >>>>> Added: >>>>> head/sys/dev/cxgbe/t4_mp_ring.c (contents, props changed) >>>>> head/sys/dev/cxgbe/t4_mp_ring.h (contents, props changed) >>>>> Modified: >>>>> head/sys/conf/files >>>>> head/sys/dev/cxgbe/adapter.h >>>>> head/sys/dev/cxgbe/t4_l2t.c >>>>> head/sys/dev/cxgbe/t4_main.c >>>>> head/sys/dev/cxgbe/t4_sge.c >>>>> head/sys/modules/cxgbe/if_cxgbe/Makefile >>>>> >>>>> Modified: head/sys/conf/files >>>>> >>>>> =========================================================================== >>>>> >>>>> >>>>> === >>>>> --- head/sys/conf/files Wed Dec 31 22:52:43 2014 (r276484) >>>>> +++ head/sys/conf/files Wed Dec 31 23:19:16 2014 (r276485) >>>>> @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p >>>>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>>>> dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ >>>>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>>>> +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ >>>>> + compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>>>> dev/cxgbe/t4_main.c optional cxgbe pci \ >>>>> compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>>>> dev/cxgbe/t4_netmap.c optional cxgbe pci \ >>>>> >>>>> Modified: head/sys/dev/cxgbe/adapter.h >>>>> >>>>> =========================================================================== >>>>> >>>>> >>>>> === >>>>> --- head/sys/dev/cxgbe/adapter.h Wed Dec 31 22:52:43 2014 >>>>> (r276484) >>>>> +++ head/sys/dev/cxgbe/adapter.h Wed Dec 31 23:19:16 2014 >>>>> (r276485) >>>>> @@ -152,7 +152,8 @@ enum { >>>>> CL_METADATA_SIZE = CACHE_LINE_SIZE, >>>>> >>>>> SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR >>>>> size in >>>>> desc */ >>>>> - TX_SGL_SEGS = 36, >>>>> + TX_SGL_SEGS = 39, >>>>> + TX_SGL_SEGS_TSO = 38, >>>>> TX_WR_FLITS = SGE_MAX_WR_LEN / 8 >>>>> }; >>>>> >>>>> @@ -273,6 +274,7 @@ struct port_info { >>>>> struct timeval last_refreshed; >>>>> struct port_stats stats; >>>>> u_int tnl_cong_drops; >>>>> + u_int tx_parse_error; >>>>> >>>>> eventhandler_tag vlan_c; >>>>> >>>>> @@ -308,23 +310,9 @@ struct tx_desc { >>>>> __be64 flit[8]; >>>>> }; >>>>> >>>>> -struct tx_map { >>>>> - struct mbuf *m; >>>>> - bus_dmamap_t map; >>>>> -}; >>>>> - >>>>> -/* DMA maps used for tx */ >>>>> -struct tx_maps { >>>>> - struct tx_map *maps; >>>>> - uint32_t map_total; /* # of DMA maps */ >>>>> - uint32_t map_pidx; /* next map to be used */ >>>>> - uint32_t map_cidx; /* reclaimed up to this index */ >>>>> - uint32_t map_avail; /* # of available maps */ >>>>> -}; >>>>> - >>>>> struct tx_sdesc { >>>>> + struct mbuf *m; /* m_nextpkt linked chain of >>>>> frames */ >>>>> uint8_t desc_used; /* # of hardware descriptors >>>>> used by the WR >>>>> */ >>>>> - uint8_t credits; /* NIC txq: # of frames sent out >>>>> in the WR >>>>> */ >>>>> }; >>>>> >>>>> >>>>> @@ -378,16 +366,12 @@ struct sge_iq { >>>>> enum { >>>>> EQ_CTRL = 1, >>>>> EQ_ETH = 2, >>>>> -#ifdef TCP_OFFLOAD >>>>> EQ_OFLD = 3, >>>>> -#endif >>>>> >>>>> /* eq flags */ >>>>> - EQ_TYPEMASK = 7, /* 3 lsbits hold the >>>>> type */ >>>>> - EQ_ALLOCATED = (1 << 3), /* firmware resources >>>>> allocated */ >>>>> - EQ_DOOMED = (1 << 4), /* about to be >>>>> destroyed */ >>>>> - EQ_CRFLUSHED = (1 << 5), /* expecting an update >>>>> from SGE */ >>>>> - EQ_STALLED = (1 << 6), /* out of hw descriptors >>>>> or dmamaps >>>>> */ >>>>> + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the >>>>> type (see >>>>> above) */ >>>>> + EQ_ALLOCATED = (1 << 2), /* firmware resources >>>>> allocated */ >>>>> + EQ_ENABLED = (1 << 3), /* open for business */ >>>>> }; >>>>> >>>>> /* Listed in order of preference. Update t4_sysctls too if you >>>>> change >>>>> these */ >>>>> @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB >>>>> struct sge_eq { >>>>> unsigned int flags; /* MUST be first */ >>>>> unsigned int cntxt_id; /* SGE context id for the eq */ >>>>> - bus_dma_tag_t desc_tag; >>>>> - bus_dmamap_t desc_map; >>>>> - char lockname[16]; >>>>> struct mtx eq_lock; >>>>> >>>>> struct tx_desc *desc; /* KVA of descriptor ring */ >>>>> - bus_addr_t ba; /* bus address of descriptor >>>>> ring */ >>>>> - struct sge_qstat *spg; /* status page, for >>>>> convenience */ >>>>> uint16_t doorbells; >>>>> volatile uint32_t *udb; /* KVA of doorbell (lies within >>>>> BAR2) */ >>>>> u_int udb_qid; /* relative qid within the >>>>> doorbell page */ >>>>> - uint16_t cap; /* max # of desc, for >>>>> convenience */ >>>>> - uint16_t avail; /* available descriptors, for >>>>> convenience * >>>>> / >>>>> - uint16_t qsize; /* size (# of entries) of the >>>>> queue */ >>>>> + uint16_t sidx; /* index of the entry with the >>>>> status page >>>>> */ >>>>> uint16_t cidx; /* consumer idx (desc idx) */ >>>>> uint16_t pidx; /* producer idx (desc idx) */ >>>>> - uint16_t pending; /* # of descriptors used since >>>>> last >>>>> doorbell */ >>>>> + uint16_t equeqidx; /* EQUEQ last requested at this >>>>> pidx */ >>>>> + uint16_t dbidx; /* pidx of the most recent >>>>> doorbell */ >>>>> uint16_t iqid; /* iq that gets egr_update for >>>>> the eq */ >>>>> uint8_t tx_chan; /* tx channel used by the eq */ >>>>> - struct task tx_task; >>>>> - struct callout tx_callout; >>>>> + volatile u_int equiq; /* EQUIQ outstanding */ >>>>> >>>>> - /* stats */ >>>>> - >>>>> - uint32_t egr_update; /* # of SGE_EGR_UPDATE >>>>> notifications for eq >>>>> */ >>>>> - uint32_t unstalled; /* recovered from stall */ >>>>> + bus_dma_tag_t desc_tag; >>>>> + bus_dmamap_t desc_map; >>>>> + bus_addr_t ba; /* bus address of descriptor >>>>> ring */ >>>>> + char lockname[16]; >>>>> }; >>>>> >>>>> struct sw_zone_info { >>>>> @@ -499,18 +476,19 @@ struct sge_fl { >>>>> struct cluster_layout cll_alt; /* alternate refill >>>>> zone, layout */ >>>>> }; >>>>> >>>>> +struct mp_ring; >>>>> + >>>>> /* txq: SGE egress queue + what's needed for Ethernet NIC */ >>>>> struct sge_txq { >>>>> struct sge_eq eq; /* MUST be first */ >>>>> >>>>> struct ifnet *ifp; /* the interface this txq >>>>> belongs to */ >>>>> - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ >>>>> - struct buf_ring *br; /* tx buffer ring */ >>>>> + struct mp_ring *r; /* tx software ring */ >>>>> struct tx_sdesc *sdesc; /* KVA of software descriptor >>>>> ring */ >>>>> - struct mbuf *m; /* held up due to temporary >>>>> resource >>>>> shortage */ >>>>> - >>>>> - struct tx_maps txmaps; >>>>> + struct sglist *gl; >>>>> + __be32 cpl_ctrl0; /* for convenience */ >>>>> >>>>> + struct task tx_reclaim_task; >>>>> /* stats for common events first */ >>>>> >>>>> uint64_t txcsum; /* # of times hardware assisted >>>>> with >>>>> checksum */ >>>>> @@ -519,13 +497,12 @@ struct sge_txq { >>>>> uint64_t imm_wrs; /* # of work requests with >>>>> immediate data * >>>>> / >>>>> uint64_t sgl_wrs; /* # of work requests with >>>>> direct SGL */ >>>>> uint64_t txpkt_wrs; /* # of txpkt work requests (not >>>>> coalesced) >>>>> */ >>>>> - uint64_t txpkts_wrs; /* # of coalesced tx work >>>>> requests */ >>>>> - uint64_t txpkts_pkts; /* # of frames in coalesced tx >>>>> work >>>>> requests */ >>>>> + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work >>>>> requests */ >>>>> + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work >>>>> requests */ >>>>> + uint64_t txpkts0_pkts; /* # of frames in type0 >>>>> coalesced tx WRs */ >>>>> + uint64_t txpkts1_pkts; /* # of frames in type1 >>>>> coalesced tx WRs */ >>>>> >>>>> /* stats for not-that-common events */ >>>>> - >>>>> - uint32_t no_dmamap; /* no DMA map to load the mbuf */ >>>>> - uint32_t no_desc; /* out of hardware descriptors */ >>>>> } __aligned(CACHE_LINE_SIZE); >>>>> >>>>> /* rxq: SGE ingress queue + SGE free list + miscellaneous >>>>> items */ >>>>> @@ -574,7 +551,13 @@ struct wrqe { >>>>> STAILQ_ENTRY(wrqe) link; >>>>> struct sge_wrq *wrq; >>>>> int wr_len; >>>>> - uint64_t wr[] __aligned(16); >>>>> + char wr[] __aligned(16); >>>>> +}; >>>>> + >>>>> +struct wrq_cookie { >>>>> + TAILQ_ENTRY(wrq_cookie) link; >>>>> + int ndesc; >>>>> + int pidx; >>>>> }; >>>>> >>>>> /* >>>>> @@ -585,17 +568,32 @@ struct sge_wrq { >>>>> struct sge_eq eq; /* MUST be first */ >>>>> >>>>> struct adapter *adapter; >>>>> + struct task wrq_tx_task; >>>>> + >>>>> + /* Tx desc reserved but WR not "committed" yet. */ >>>>> + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) >>>>> incomplete_wrs; >>>>> >>>>> - /* List of WRs held up due to lack of tx descriptors */ >>>>> + /* List of WRs ready to go out as soon as descriptors are >>>>> available. */ >>>>> STAILQ_HEAD(, wrqe) wr_list; >>>>> + u_int nwr_pending; >>>>> + u_int ndesc_needed; >>>>> >>>>> /* stats for common events first */ >>>>> >>>>> - uint64_t tx_wrs; /* # of tx work requests */ >>>>> + uint64_t tx_wrs_direct; /* # of WRs written directly to >>>>> desc ring. >>>>> */ >>>>> + uint64_t tx_wrs_ss; /* # of WRs copied from scratch >>>>> space. */ >>>>> + uint64_t tx_wrs_copied; /* # of WRs queued and copied to >>>>> desc ring. >>>>> */ >>>>> >>>>> /* stats for not-that-common events */ >>>>> >>>>> - uint32_t no_desc; /* out of hardware descriptors */ >>>>> + /* >>>>> + * Scratch space for work requests that wrap around >>>>> after reaching >>>>> the >>>>> + * status page, and some infomation about the last WR >>>>> that used it. >>>>> + */ >>>>> + uint16_t ss_pidx; >>>>> + uint16_t ss_len; >>>>> + uint8_t ss[SGE_MAX_WR_LEN]; >>>>> + >>>>> } __aligned(CACHE_LINE_SIZE); >>>>> >>>>> >>>>> @@ -744,7 +742,7 @@ struct adapter { >>>>> struct sge sge; >>>>> int lro_timeout; >>>>> >>>>> - struct taskqueue *tq[NCHAN]; /* taskqueues that flush >>>>> data out * >>>>> / >>>>> + struct taskqueue *tq[NCHAN]; /* General purpose >>>>> taskqueues */ >>>>> struct port_info *port[MAX_NPORTS]; >>>>> uint8_t chan_map[NCHAN]; >>>>> >>>>> @@ -978,12 +976,11 @@ static inline int >>>>> tx_resume_threshold(struct sge_eq *eq) >>>>> { >>>>> >>>>> - return (eq->qsize / 4); >>>>> + /* not quite the same as qsize / 4, but this will do. */ >>>>> + return (eq->sidx / 4); >>>>> } >>>>> >>>>> /* t4_main.c */ >>>>> -void t4_tx_task(void *, int); >>>>> -void t4_tx_callout(void *); >>>>> int t4_os_find_pci_capability(struct adapter *, int); >>>>> int t4_os_pci_save_state(struct adapter *); >>>>> int t4_os_pci_restore_state(struct adapter *); >>>>> @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct adapt >>>>> int t4_teardown_adapter_queues(struct adapter *); >>>>> int t4_setup_port_queues(struct port_info *); >>>>> int t4_teardown_port_queues(struct port_info *); >>>>> -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, int); >>>>> -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); >>>>> void t4_intr_all(void *); >>>>> void t4_intr(void *); >>>>> void t4_intr_err(void *); >>>>> void t4_intr_evt(void *); >>>>> void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, >>>>> struct wrqe *); >>>>> -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf *); >>>>> void t4_update_fl_bufsize(struct ifnet *); >>>>> -int can_resume_tx(struct sge_eq *); >>>>> +int parse_pkt(struct mbuf **); >>>>> +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie *); >>>>> +void commit_wrq_wr(struct sge_wrq *, void *, struct >>>>> wrq_cookie *); >>>>> >>>>> /* t4_tracer.c */ >>>>> struct t4_tracer; >>>>> >>>>> Modified: head/sys/dev/cxgbe/t4_l2t.c >>>>> >>>>> =========================================================================== >>>>> >>>>> >>>>> === >>>>> --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014 >>>>> (r276484) >>>>> +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014 >>>>> (r276485) >>>>> @@ -113,16 +113,15 @@ found: >>>>> int >>>>> t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int sync) >>>>> { >>>>> - struct wrqe *wr; >>>>> + struct wrq_cookie cookie; >>>>> struct cpl_l2t_write_req *req; >>>>> int idx = e->idx + sc->vres.l2t.start; >>>>> >>>>> mtx_assert(&e->lock, MA_OWNED); >>>>> >>>>> - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); >>>>> - if (wr == NULL) >>>>> + req = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*req), >>>>> 16), & >>>>> cookie); >>>>> + if (req == NULL) >>>>> return (ENOMEM); >>>>> - req = wrtod(wr); >>>>> >>>>> INIT_TP_WR(req, 0); >>>>> OPCODE_TID(req) = htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, >>>>> idx | >>>>> @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct >>>>> req->vlan = htons(e->vlan); >>>>> memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); >>>>> >>>>> - t4_wrq_tx(sc, wr); >>>>> + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); >>>>> >>>>> if (sync && e->state != L2T_STATE_SWITCHING) >>>>> e->state = L2T_STATE_SYNC_WRITE; >>>>> >>>>> Modified: head/sys/dev/cxgbe/t4_main.c >>>>> >>>>> =========================================================================== >>>>> >>>>> >>>>> === >>>>> --- head/sys/dev/cxgbe/t4_main.c Wed Dec 31 22:52:43 2014 >>>>> (r276484) >>>>> +++ head/sys/dev/cxgbe/t4_main.c Wed Dec 31 23:19:16 2014 >>>>> (r276485) >>>>> @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); >>>>> #include "common/t4_regs_values.h" >>>>> #include "t4_ioctl.h" >>>>> #include "t4_l2t.h" >>>>> +#include "t4_mp_ring.h" >>>>> >>>>> /* T4 bus driver interface */ >>>>> static int t4_probe(device_t); >>>>> @@ -378,7 +379,8 @@ static void build_medialist(struct port_ >>>>> static int cxgbe_init_synchronized(struct port_info *); >>>>> static int cxgbe_uninit_synchronized(struct port_info *); >>>>> static int setup_intr_handlers(struct adapter *); >>>>> -static void quiesce_eq(struct adapter *, struct sge_eq *); >>>>> +static void quiesce_txq(struct adapter *, struct sge_txq *); >>>>> +static void quiesce_wrq(struct adapter *, struct sge_wrq *); >>>>> static void quiesce_iq(struct adapter *, struct sge_iq *); >>>>> static void quiesce_fl(struct adapter *, struct sge_fl *); >>>>> static int t4_alloc_irq(struct adapter *, struct irq *, int rid, >>>>> @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER >>>>> static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); >>>>> static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); >>>>> #endif >>>>> -static inline void txq_start(struct ifnet *, struct sge_txq *); >>>>> static uint32_t fconf_to_mode(uint32_t); >>>>> static uint32_t mode_to_fconf(uint32_t); >>>>> static uint32_t fspec_to_fconf(struct t4_filter_specification >>>>> *); >>>>> @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, struct >>>>> { >>>>> struct port_info *pi = ifp->if_softc; >>>>> struct adapter *sc = pi->adapter; >>>>> - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; >>>>> - struct buf_ring *br; >>>>> + struct sge_txq *txq; >>>>> + void *items[1]; >>>>> int rc; >>>>> >>>>> M_ASSERTPKTHDR(m); >>>>> + MPASS(m->m_nextpkt == NULL); /* not quite ready for >>>>> this yet */ >>>>> >>>>> if (__predict_false(pi->link_cfg.link_ok == 0)) { >>>>> m_freem(m); >>>>> return (ENETDOWN); >>>>> } >>>>> >>>>> - /* check if flowid is set */ >>>>> - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>>>> - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>>>> rsrv_noflowq)) >>>>> - + pi->rsrv_noflowq); >>>>> - br = txq->br; >>>>> - >>>>> - if (TXQ_TRYLOCK(txq) == 0) { >>>>> - struct sge_eq *eq = &txq->eq; >>>>> - >>>>> - /* >>>>> - * It is possible that t4_eth_tx finishes up and >>>>> releases >>>>> the >>>>> - * lock between the TRYLOCK above and the >>>>> drbr_enqueue >>>>> here. We >>>>> - * need to make sure that this mbuf doesn't just >>>>> sit there >>>>> in >>>>> - * the drbr. >>>>> - */ >>>>> - >>>>> - rc = drbr_enqueue(ifp, br, m); >>>>> - if (rc == 0 && callout_pending(&eq->tx_callout) >>>>> == 0 && >>>>> - !(eq->flags & EQ_DOOMED)) >>>>> - callout_reset(&eq->tx_callout, 1, >>>>> t4_tx_callout, >>>>> eq); >>>>> + rc = parse_pkt(&m); >>>>> + if (__predict_false(rc != 0)) { >>>>> + MPASS(m == NULL); /* was >>>>> freed >>>>> already */ >>>>> + atomic_add_int(&pi->tx_parse_error, 1); /* rare, >>>>> atomic is >>>>> ok */ >>>>> return (rc); >>>>> } >>>>> >>>>> - /* >>>>> - * txq->m is the mbuf that is held up due to a temporary >>>>> shortage >>>>> of >>>>> - * resources and it should be put on the wire first. >>>>> Then what's >>>>> in >>>>> - * drbr and finally the mbuf that was just passed in >>>>> to us. >>>>> - * >>>>> - * Return code should indicate the fate of the mbuf that >>>>> was passed >>>>> in >>>>> - * this time. >>>>> - */ >>>>> - >>>>> - TXQ_LOCK_ASSERT_OWNED(txq); >>>>> - if (drbr_needs_enqueue(ifp, br) || txq->m) { >>>>> - >>>>> - /* Queued for transmission. */ >>>>> - >>>>> - rc = drbr_enqueue(ifp, br, m); >>>>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>>>> - (void) t4_eth_tx(ifp, txq, m); >>>>> - TXQ_UNLOCK(txq); >>>>> - return (rc); >>>>> - } >>>>> + /* Select a txq. */ >>>>> + txq = &sc->sge.txq[pi->first_txq]; >>>>> + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>>>> + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>>>> rsrv_noflowq)) + >>>>> + pi->rsrv_noflowq); >>>>> >>>>> - /* Direct transmission. */ >>>>> - rc = t4_eth_tx(ifp, txq, m); >>>>> - if (rc != 0 && txq->m) >>>>> - rc = 0; /* held, will be transmitted soon >>>>> (hopefully) */ >>>>> + items[0] = m; >>>>> + rc = mp_ring_enqueue(txq->r, items, 1, 4096); >>>>> + if (__predict_false(rc != 0)) >>>>> + m_freem(m); >>>>> >>>>> - TXQ_UNLOCK(txq); >>>>> return (rc); >>>>> } >>>>> >>>>> @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) >>>>> struct port_info *pi = ifp->if_softc; >>>>> struct sge_txq *txq; >>>>> int i; >>>>> - struct mbuf *m; >>>>> >>>>> /* queues do not exist if !PORT_INIT_DONE. */ >>>>> if (pi->flags & PORT_INIT_DONE) { >>>>> for_each_txq(pi, i, txq) { >>>>> TXQ_LOCK(txq); >>>>> - m_freem(txq->m); >>>>> - txq->m = NULL; >>>>> - while ((m = >>>>> buf_ring_dequeue_sc(txq->br)) != NULL) >>>>> - m_freem(m); >>>>> + txq->eq.flags &= ~EQ_ENABLED; >>>>> TXQ_UNLOCK(txq); >>>>> + while (!mp_ring_is_idle(txq->r)) { >>>>> + mp_ring_check_drainage(txq->r, 0); >>>>> + pause("qflush", 1); >>>>> + } >>>>> } >>>>> } >>>>> if_qflush(ifp); >>>>> @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift >>>>> struct sge_txq *txq; >>>>> >>>>> for_each_txq(pi, i, txq) >>>>> - drops += txq->br->br_drops; >>>>> + drops += >>>>> counter_u64_fetch(txq->r->drops); >>>>> } >>>>> >>>>> return (drops); >>>>> @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info >>>>> { >>>>> struct adapter *sc = pi->adapter; >>>>> struct ifnet *ifp = pi->ifp; >>>>> - int rc = 0; >>>>> + int rc = 0, i; >>>>> + struct sge_txq *txq; >>>>> >>>>> ASSERT_SYNCHRONIZED_OP(sc); >>>>> >>>>> @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info >>>>> } >>>>> >>>>> /* >>>>> + * Can't fail from this point onwards. Review >>>>> cxgbe_uninit_synchronized >>>>> + * if this changes. >>>>> + */ >>>>> + >>>>> + for_each_txq(pi, i, txq) { >>>>> + TXQ_LOCK(txq); >>>>> + txq->eq.flags |= EQ_ENABLED; >>>>> + TXQ_UNLOCK(txq); >>>>> + } >>>>> + >>>>> + /* >>>>> * The first iq of the first port to come up is used for >>>>> tracing. >>>>> */ >>>>> if (sc->traceq < 0) { >>>>> @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in >>>>> { >>>>> struct adapter *sc = pi->adapter; >>>>> struct ifnet *ifp = pi->ifp; >>>>> - int rc; >>>>> + int rc, i; >>>>> + struct sge_txq *txq; >>>>> >>>>> ASSERT_SYNCHRONIZED_OP(sc); >>>>> >>>>> @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in >>>>> return (rc); >>>>> } >>>>> >>>>> + for_each_txq(pi, i, txq) { >>>>> + TXQ_LOCK(txq); >>>>> + txq->eq.flags &= ~EQ_ENABLED; >>>>> + TXQ_UNLOCK(txq); >>>>> + } >>>>> + >>>>> clrbit(&sc->open_device_map, pi->port_id); >>>>> PORT_LOCK(pi); >>>>> ifp->if_drv_flags &= ~IFF_DRV_RUNNING; >>>>> @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) >>>>> >>>>> if (pi->flags & PORT_INIT_DONE) { >>>>> >>>>> - /* Need to quiesce queues. XXX: ctrl queues? */ >>>>> + /* Need to quiesce queues. */ >>>>> + >>>>> + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); >>>>> >>>>> for_each_txq(pi, i, txq) { >>>>> - quiesce_eq(sc, &txq->eq); >>>>> + quiesce_txq(sc, txq); >>>>> } >>>>> >>>>> #ifdef TCP_OFFLOAD >>>>> for_each_ofld_txq(pi, i, ofld_txq) { >>>>> - quiesce_eq(sc, &ofld_txq->eq); >>>>> + quiesce_wrq(sc, ofld_txq); >>>>> } >>>>> #endif >>>>> >>>>> @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) >>>>> } >>>>> >>>>> static void >>>>> -quiesce_eq(struct adapter *sc, struct sge_eq *eq) >>>>> +quiesce_txq(struct adapter *sc, struct sge_txq *txq) >>>>> { >>>>> - EQ_LOCK(eq); >>>>> - eq->flags |= EQ_DOOMED; >>>>> + struct sge_eq *eq = &txq->eq; >>>>> + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; >>>>> >>>>> - /* >>>>> - * Wait for the response to a credit flush if one's >>>>> - * pending. >>>>> - */ >>>>> - while (eq->flags & EQ_CRFLUSHED) >>>>> - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); >>>>> - EQ_UNLOCK(eq); >>>>> + (void) sc; /* unused */ >>>>> >>>>> - callout_drain(&eq->tx_callout); /* XXX: iffy */ >>>>> - pause("callout", 10); /* Still iffy */ >>>>> +#ifdef INVARIANTS >>>>> + TXQ_LOCK(txq); >>>>> + MPASS((eq->flags & EQ_ENABLED) == 0); >>>>> + TXQ_UNLOCK(txq); >>>>> +#endif >>>>> >>>>> - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); >>>>> + /* Wait for the mp_ring to empty. */ >>>>> + while (!mp_ring_is_idle(txq->r)) { >>>>> + mp_ring_check_drainage(txq->r, 0); >>>>> + pause("rquiesce", 1); >>>>> + } >>>>> + >>>>> + /* Then wait for the hardware to finish. */ >>>>> + while (spg->cidx != htobe16(eq->pidx)) >>>>> + pause("equiesce", 1); >>>>> + >>>>> + /* Finally, wait for the driver to reclaim all >>>>> descriptors. */ >>>>> + while (eq->cidx != eq->pidx) >>>>> + pause("dquiesce", 1); >>>>> +} >>>>> + >>>>> +static void >>>>> +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) >>>>> +{ >>>>> + >>>>> + /* XXXTX */ >>>>> } >>>>> >>>>> static void >>>>> @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) >>>>> oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", >>>>> CTLFLAG_RD, >>>>> NULL, "port statistics"); >>>>> children = SYSCTL_CHILDREN(oid); >>>>> + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, >>>>> "tx_parse_error", >>>>> CTLFLAG_RD, >>>>> + &pi->tx_parse_error, 0, >>>>> + "# of tx packets with invalid length or # of >>>>> segments"); >>>>> >>>>> #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ >>>>> SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ >>>>> @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) >>>>> } >>>>> #endif >>>>> >>>>> -static inline void >>>>> -txq_start(struct ifnet *ifp, struct sge_txq *txq) >>>>> -{ >>>>> - struct buf_ring *br; >>>>> - struct mbuf *m; >>>>> - >>>>> - TXQ_LOCK_ASSERT_OWNED(txq); >>>>> - >>>>> - br = txq->br; >>>>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>>>> - if (m) >>>>> - t4_eth_tx(ifp, txq, m); >>>>> -} >>>>> - >>>>> -void >>>>> -t4_tx_callout(void *arg) >>>>> -{ >>>>> - struct sge_eq *eq = arg; >>>>> - struct adapter *sc; >>>>> - >>>>> - if (EQ_TRYLOCK(eq) == 0) >>>>> - goto reschedule; >>>>> - >>>>> - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { >>>>> - EQ_UNLOCK(eq); >>>>> -reschedule: >>>>> - if (__predict_true(!(eq->flags && EQ_DOOMED))) >>>>> - callout_schedule(&eq->tx_callout, 1); >>>>> - return; >>>>> - } >>>>> - >>>>> - EQ_LOCK_ASSERT_OWNED(eq); >>>>> - >>>>> - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { >>>>> - >>>>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>>>> - struct sge_txq *txq = arg; >>>>> - struct port_info *pi = >>>>> txq->ifp->if_softc; >>>>> - >>>>> - sc = pi->adapter; >>>>> - } else { >>>>> - struct sge_wrq *wrq = arg; >>>>> - >>>>> - sc = wrq->adapter; >>>>> - } >>>>> - >>>>> - taskqueue_enqueue(sc->tq[eq->tx_chan], >>>>> &eq->tx_task); >>>>> - } >>>>> - >>>>> - EQ_UNLOCK(eq); >>>>> -} >>>>> - >>>>> -void >>>>> -t4_tx_task(void *arg, int count) >>>>> -{ >>>>> - struct sge_eq *eq = arg; >>>>> - >>>>> - EQ_LOCK(eq); >>>>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>>>> - struct sge_txq *txq = arg; >>>>> - txq_start(txq->ifp, txq); >>>>> - } else { >>>>> - struct sge_wrq *wrq = arg; >>>>> - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); >>>>> - } >>>>> - EQ_UNLOCK(eq); >>>>> -} >>>>> - >>>>> static uint32_t >>>>> fconf_to_mode(uint32_t fconf) >>>>> { >>>>> @@ -7452,9 +7394,9 @@ static int >>>>> set_filter_wr(struct adapter *sc, int fidx) >>>>> { >>>>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>>>> - struct wrqe *wr; >>>>> struct fw_filter_wr *fwr; >>>>> unsigned int ftid; >>>>> + struct wrq_cookie cookie; >>>>> >>>>> ASSERT_SYNCHRONIZED_OP(sc); >>>>> >>>>> @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, int fi >>>>> >>>>> ftid = sc->tids.ftid_base + fidx; >>>>> >>>>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>>>> - if (wr == NULL) >>>>> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), >>>>> 16), & >>>>> cookie); >>>>> + if (fwr == NULL) >>>>> return (ENOMEM); >>>>> - >>>>> - fwr = wrtod(wr); >>>>> - bzero(fwr, sizeof (*fwr)); >>>>> + bzero(fwr, sizeof(*fwr)); >>>>> >>>>> fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); >>>>> fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); >>>>> @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi >>>>> f->pending = 1; >>>>> sc->tids.ftids_in_use++; >>>>> >>>>> - t4_wrq_tx(sc, wr); >>>>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>>>> return (0); >>>>> } >>>>> >>>>> @@ -7555,22 +7495,21 @@ static int >>>>> del_filter_wr(struct adapter *sc, int fidx) >>>>> { >>>>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>>>> - struct wrqe *wr; >>>>> struct fw_filter_wr *fwr; >>>>> unsigned int ftid; >>>>> + struct wrq_cookie cookie; >>>>> >>>>> ftid = sc->tids.ftid_base + fidx; >>>>> >>>>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>>>> - if (wr == NULL) >>>>> + fwr = start_wrq_wr(&sc->sge.mgmtq, howmany(sizeof(*fwr), >>>>> 16), & >>>>> cookie); >>>>> + if (fwr == NULL) >>>>> return (ENOMEM); >>>>> - fwr = wrtod(wr); >>>>> bzero(fwr, sizeof (*fwr)); >>>>> >>>>> t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); >>>>> >>>>> f->pending = 1; >>>>> - t4_wrq_tx(sc, wr); >>>>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>>>> return (0); >>>>> } >>>>> >>>>> @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long >>>>> >>>>> /* MAC stats */ >>>>> t4_clr_port_stats(sc, pi->tx_chan); >>>>> + pi->tx_parse_error = 0; >>>>> >>>>> if (pi->flags & PORT_INIT_DONE) { >>>>> struct sge_rxq *rxq; >>>>> @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned long >>>>> txq->imm_wrs = 0; >>>>> txq->sgl_wrs = 0; >>>>> txq->txpkt_wrs = 0; >>>>> - txq->txpkts_wrs = 0; >>>>> - txq->txpkts_pkts = 0; >>>>> - txq->br->br_drops = 0; >>>>> - txq->no_dmamap = 0; >>>>> - txq->no_desc = 0; >>>>> + txq->txpkts0_wrs = 0; >>>>> + txq->txpkts1_wrs = 0; >>>>> + txq->txpkts0_pkts = 0; >>>>> + txq->txpkts1_pkts = 0; >>>>> + mp_ring_reset_stats(txq->r); >>>>> } >>>>> >>>>> #ifdef TCP_OFFLOAD >>>>> /* nothing to clear for each ofld_rxq */ >>>>> >>>>> for_each_ofld_txq(pi, i, wrq) { >>>>> - wrq->tx_wrs = 0; >>>>> - wrq->no_desc = 0; >>>>> + wrq->tx_wrs_direct = 0; >>>>> + wrq->tx_wrs_copied = 0; >>>>> } >>>>> #endif >>>>> wrq = &sc->sge.ctrlq[pi->port_id]; >>>>> - wrq->tx_wrs = 0; >>>>> - wrq->no_desc = 0; >>>>> + wrq->tx_wrs_direct = 0; >>>>> + wrq->tx_wrs_copied = 0; >>>>> } >>>>> break; >>>>> } >>>>> >>>>> Added: head/sys/dev/cxgbe/t4_mp_ring.c >>>>> >>>>> =========================================================================== >>>>> >>>>> >>>>> === >>>>> --- /dev/null 00:00:00 1970 (empty, because file is newly >>>>> added) >>>>> +++ head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 2014 >>>>> (r276485) >>>>> @@ -0,0 +1,364 @@ >>>>> +/*- >>>>> + * Copyright (c) 2014 Chelsio Communications, Inc. >>>>> + * All rights reserved. >>>>> + * Written by: Navdeep Parhar >>>>> + * >>>>> + * Redistribution and use in source and binary forms, with or >>>>> without >>>>> + * modification, are permitted provided that the following >>>>> conditions >>>>> + * are met: >>>>> + * 1. Redistributions of source code must retain the above >>>>> copyright >>>>> + * notice, this list of conditions and the following >>>>> disclaimer. >>>>> + * 2. Redistributions in binary form must reproduce the above >>>>> copyright >>>>> + * notice, this list of conditions and the following >>>>> disclaimer in the >>>>> + * documentation and/or other materials provided with the >>>>> distribution. >>>>> + * >>>>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS >>>>> ``AS IS'' AND >>>>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >>>>> LIMITED TO, THE >>>>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A >>>>> PARTICULAR >>>>> PURPOSE >>>>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR >>>>> CONTRIBUTORS BE LIABLE >>>>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR >>>>> CONSEQUENTIAL >>>>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >>>>> SUBSTITUTE GOODS >>>>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >>>>> INTERRUPTION) >>>>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >>>>> CONTRACT, >>>>> STRICT >>>>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >>>>> ARISING IN ANY >>>>> WAY >>>>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >>>>> POSSIBILITY OF >>>>> + * SUCH DAMAGE. >>>>> + */ >>>>> + >>>>> +#include >>>>> +__FBSDID("$FreeBSD$"); >>>>> + >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> +#include >>>>> + >>>>> +#include "t4_mp_ring.h" >>>>> + >>>>> +union ring_state { >>>>> + struct { >>>>> + uint16_t pidx_head; >>>>> + uint16_t pidx_tail; >>>>> + uint16_t cidx; >>>>> + uint16_t flags; >>>>> + }; >>>>> + uint64_t state; >>>>> +}; >>>>> + >>>>> +enum { >>>>> + IDLE = 0, /* consumer ran to completion, nothing >>>>> more to do. >>>>> */ >>>>> + BUSY, /* consumer is running already, or will >>>>> be shortly. >>>>> */ >>>>> + STALLED, /* consumer stopped due to lack of >>>>> resources. */ >>>>> + ABDICATED, /* consumer stopped even though there >>>>> was work to >>>>> be >>>>> + done because it wants another thread >>>>> to take >>>>> over. */ >>>>> +}; >>>>> + >>>>> +static inline uint16_t >>>>> +space_available(struct mp_ring *r, union ring_state s) >>>>> +{ >>>>> + uint16_t x = r->size - 1; >>>>> + >>>>> + if (s.cidx == s.pidx_head) >>>>> + return (x); >>>>> + else if (s.cidx > s.pidx_head) >>>>> + return (s.cidx - s.pidx_head - 1); >>>>> + else >>>>> + return (x - s.pidx_head + s.cidx); >>>>> +} >>>>> + >>>>> +static inline uint16_t >>>>> +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) >>>>> +{ >>>>> + int x = r->size - idx; >>>>> + >>>>> + MPASS(x > 0); >>>>> + return (x > n ? idx + n : n - x); >>>>> +} >>>>> + >>>>> +/* Consumer is about to update the ring's state to s */ >>>>> +static inline uint16_t >>>>> +state_to_flags(union ring_state s, int abdicate) >>>>> +{ >>>>> + >>>>> + if (s.cidx == s.pidx_tail) >>>>> + return (IDLE); >>>>> + else if (abdicate && s.pidx_tail != s.pidx_head) >>>>> + return (ABDICATED); >>>>> + >>>>> + return (BUSY); >>>>> +} >>>>> + >>>>> +/* >>>>> + * Caller passes in a state, with a guarantee that there is >>>>> work to do and >>>>> that >>>>> + * all items up to the pidx_tail in the state are visible. >>>>> + */ >>>>> +static void >>>>> +drain_ring(struct mp_ring *r, union ring_state os, uint16_t >>>>> prev, int >>>>> budget) >>>>> +{ >>>>> + union ring_state ns; >>>>> + int n, pending, total; >>>>> + uint16_t cidx = os.cidx; >>>>> + uint16_t pidx = os.pidx_tail; >>>>> + >>>>> + MPASS(os.flags == BUSY); >>>>> + MPASS(cidx != pidx); >>>>> + >>>>> + if (prev == IDLE) >>>>> + counter_u64_add(r->starts, 1); >>>>> + pending = 0; >>>>> + total = 0; >>>>> + >>>>> + while (cidx != pidx) { >>>>> + >>>>> + /* Items from cidx to pidx are available for >>>>> consumption. * >>>>> / >>>>> + n = r->drain(r, cidx, pidx); >>>>> + if (n == 0) { >>>>> + critical_enter(); >>>>> + do { >>>>> + os.state = ns.state = r->state; >>>>> + ns.cidx = cidx; >>>>> + ns.flags = STALLED; >>>>> + } while (atomic_cmpset_64(&r->state, >>>>> os.state, >>>>> + ns.state) == 0); >>>>> + critical_exit(); >>>>> + if (prev != STALLED) >>>>> + counter_u64_add(r->stalls, 1); >>>>> + else if (total > 0) { >>>>> + counter_u64_add(r->restarts, 1); >>>>> + counter_u64_add(r->stalls, 1); >>>>> + } >>>>> + break; >>>>> + } >>>>> + cidx = increment_idx(r, cidx, n); >>>>> + pending += n; >>>>> + total += n; >>>>> + >>>>> + /* >>>>> + * We update the cidx only if we've caught up >>>>> with the >>>>> pidx, the >>>>> + * real cidx is getting too far ahead of the one >>>>> visible to >>>>> + * everyone else, or we have exceeded our budget. >>>>> + */ >>>>> + if (cidx != pidx && pending < 64 && total < >>>>> budget) >>>>> + continue; >>>>> + critical_enter(); >>>>> + do { >>>>> + os.state = ns.state = r->state; >>>>> + ns.cidx = cidx; >>>>> + ns.flags = state_to_flags(ns, total >= >>>>> budget); >>>>> + } while (atomic_cmpset_acq_64(&r->state, >>>>> os.state, >>>>> ns.state) == 0); >>>>> + critical_exit(); >>>>> + >>>>> + if (ns.flags == ABDICATED) >>>>> + counter_u64_add(r->abdications, 1); >>>>> + if (ns.flags != BUSY) { >>>>> + /* Wrong loop exit if we're going to >>>>> stall. */ >>>>> + MPASS(ns.flags != STALLED); >>>>> + if (prev == STALLED) { >>>>> + MPASS(total > 0); >>>>> + counter_u64_add(r->restarts, 1); >>>>> + } >>>>> + break; >>>>> + } >>>>> + >>>>> + /* >>>>> + * The acquire style atomic above guarantees >>>>> visibility of >>>>> items >>>>> + * associated with any pidx change that we >>>>> notice here. >>>>> + */ >>>>> + pidx = ns.pidx_tail; >>>>> + pending = 0; >>>>> + } >>>>> +} >>>>> + >>>>> +int >>>>> +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, >>>>> ring_drain_t >>>>> drain, >>>>> + ring_can_drain_t can_drain, struct malloc_type *mt, int >>>>> flags) >>>>> +{ >>>>> + struct mp_ring *r; >>>>> + >>>>> + /* All idx are 16b so size can be 65536 at most */ >>>>> + if (pr == NULL || size < 2 || size > 65536 || drain == >>>>> NULL || >>>>> + can_drain == NULL) >>>>> + return (EINVAL); >>>>> + *pr = NULL; >>>>> + flags &= M_NOWAIT | M_WAITOK; >>>>> + MPASS(flags != 0); >>>>> + >>>>> + r = malloc(__offsetof(struct mp_ring, items[size]), mt, >>>>> flags | >>>>> M_ZERO); >>>>> + if (r == NULL) >>>>> + return (ENOMEM); >>>>> + r->size = size; >>>>> + r->cookie = cookie; >>>>> + r->mt = mt; >>>>> + r->drain = drain; >>>>> + r->can_drain = can_drain; >>>>> + r->enqueues = counter_u64_alloc(flags); >>>>> + r->drops = counter_u64_alloc(flags); >>>>> + r->starts = counter_u64_alloc(flags); >>>>> + r->stalls = counter_u64_alloc(flags); >>>>> + r->restarts = counter_u64_alloc(flags); >>>>> + r->abdications = counter_u64_alloc(flags); >>>>> + if (r->enqueues == NULL || r->drops == NULL || r->starts >>>>> == NULL || >>>>> + r->stalls == NULL || r->restarts == NULL || >>>>> + r->abdications == NULL) { >>>>> + mp_ring_free(r); >>>>> + return (ENOMEM); >>>>> + } >>>>> + >>>>> + *pr = r; >>>>> + return (0); >>>>> +} >>>>> + >>>>> +void >>>>> + >>>>> +mp_ring_free(struct mp_ring *r) >>>>> +{ >>>>> + >>>>> + if (r == NULL) >>>>> + return; >>>>> + >>>>> + if (r->enqueues != NULL) >>>>> + counter_u64_free(r->enqueues); >>>>> + if (r->drops != NULL) >>>>> + counter_u64_free(r->drops); >>>>> + if (r->starts != NULL) >>>>> + counter_u64_free(r->starts); >>>>> + if (r->stalls != NULL) >>>>> + counter_u64_free(r->stalls); >>>>> + if (r->restarts != NULL) >>>>> + counter_u64_free(r->restarts); >>>>> + if (r->abdications != NULL) >>>>> + counter_u64_free(r->abdications); >>>>> + >>>>> + free(r, r->mt); >>>>> +} >>>>> + >>>>> +/* >>>>> + * Enqueue n items and maybe drain the ring for some time. >>>>> + * >>>>> + * Returns an errno. >>>>> + */ >>>>> +int >>>>> +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int >>>>> budget) >>>>> +{ >>>>> + union ring_state os, ns; >>>>> + uint16_t pidx_start, pidx_stop; >>>>> + int i; >>>>> + >>>>> + MPASS(items != NULL); >>>>> + MPASS(n > 0); >>>>> + >>>>> >>>>> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> -- >>>>> -----------------------------------------+------------------------------- >>>>> >>>>> >>>>> Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. >>>>> dell'Informazione >>>>> http://www.iet.unipi.it/~luigi/ . Universita` di Pisa >>>>> TEL +39-050-2211611 . via Diotisalvi 2 >>>>> Mobile +39-338-6809875 . 56122 PISA (Italy) >>>>> -----------------------------------------+------------------------------- >>>>> >>>>> >>> >> >> > From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:06:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D0F80929; Wed, 21 Jan 2015 01:06:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96FC4978; Wed, 21 Jan 2015 01:06:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L16AHX050649; Wed, 21 Jan 2015 01:06:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L168OS050631; Wed, 21 Jan 2015 01:06:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210106.t0L168OS050631@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 01:06:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277460 - in head/sys: arm/arm arm/at91 arm/include arm/versatile arm/xilinx arm/xscale/i80321 arm/xscale/i8134x arm/xscale/ixp425 arm/xscale/pxa dev/usb/controller X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:06:11 -0000 Author: ian Date: Wed Jan 21 01:06:08 2015 New Revision: 277460 URL: https://svnweb.freebsd.org/changeset/base/277460 Log: Revise the arm bus_space implementation to avoid dereferencing the tag on every operation to retrieve the bs_cookie value almost nothing actually uses. The bus_space struct contains a private data pointer (poorly named bs_cookie, now renamed to bs_privdata) which is used only by a few old armv4 xscale implementations. The bus_space functions were all defined to take this value as the first parameter instead of the bus_space_tag_t, requiring all the inline macro and function expansions to dereference the tag to pass it to another function, which never uses it. Now all the functions take the tag as the first parameter and retrieve the privdata if they need it. Also fix a couple bus_space_unmap() implementations that were calling kva_free() instead of pmap_unmapdev(). Discussed with: cognet Modified: head/sys/arm/arm/bus_space_generic.c head/sys/arm/at91/at91.c head/sys/arm/include/bus.h head/sys/arm/versatile/bus_space.c head/sys/arm/xilinx/zy7_bus_space.c head/sys/arm/xscale/i80321/i80321_space.c head/sys/arm/xscale/i8134x/i81342_space.c head/sys/arm/xscale/ixp425/avila_ata.c head/sys/arm/xscale/ixp425/cambria_exp_space.c head/sys/arm/xscale/ixp425/ixp425_a4x_space.c head/sys/arm/xscale/ixp425/ixp425_pci_space.c head/sys/arm/xscale/ixp425/ixp425_space.c head/sys/arm/xscale/pxa/pxa_space.c head/sys/dev/usb/controller/ehci_ixp4xx.c Modified: head/sys/arm/arm/bus_space_generic.c ============================================================================== --- head/sys/arm/arm/bus_space_generic.c Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/arm/bus_space_generic.c Wed Jan 21 01:06:08 2015 (r277460) @@ -57,7 +57,7 @@ __FBSDID("$FreeBSD$"); bs_protos(generic); int -generic_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +generic_bs_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { void *va; @@ -74,7 +74,7 @@ generic_bs_map(void *t, bus_addr_t bpa, } int -generic_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, +generic_bs_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp) { @@ -84,21 +84,21 @@ generic_bs_alloc(void *t, bus_addr_t rst void -generic_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +generic_bs_unmap(bus_space_tag_t t, bus_space_handle_t h, bus_size_t size) { pmap_unmapdev((vm_offset_t)h, size); } void -generic_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) +generic_bs_free(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size) { panic("generic_bs_free(): not implemented"); } int -generic_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +generic_bs_subregion(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -107,7 +107,7 @@ generic_bs_subregion(void *t, bus_space_ } void -generic_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset, +generic_bs_barrier(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t offset, bus_size_t len, int flags) { Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/at91/at91.c Wed Jan 21 01:06:08 2015 (r277460) @@ -55,7 +55,7 @@ __FBSDID("$FreeBSD$"); uint32_t at91_master_clock; static int -at91_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +at91_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { vm_paddr_t pa, endpa; @@ -77,23 +77,18 @@ at91_bs_map(void *t, bus_addr_t bpa, bus } static void -at91_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +at91_bs_unmap(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t size) { - vm_offset_t va, endva; + vm_offset_t va; - if (t == 0) - return; - va = trunc_page((vm_offset_t)t); + va = (vm_offset_t)h; if (va >= AT91_BASE && va <= AT91_BASE + 0xff00000) return; - endva = round_page((vm_offset_t)t + size); - - /* Free the kernel virtual mapping. */ - kva_free(va, endva - va); + pmap_unmapdev(va, size); } static int -at91_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +at91_bs_subregion(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -102,7 +97,7 @@ at91_bs_subregion(void *t, bus_space_han } static void -at91_barrier(void *t, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, +at91_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t size, bus_size_t b, int a) { } Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/include/bus.h Wed Jan 21 01:06:08 2015 (r277460) @@ -81,168 +81,168 @@ struct bus_space { /* cookie */ - void *bs_cookie; + void *bs_privdata; /* mapping/unmapping */ - int (*bs_map) (void *, bus_addr_t, bus_size_t, + int (*bs_map) (bus_space_tag_t, bus_addr_t, bus_size_t, int, bus_space_handle_t *); - void (*bs_unmap) (void *, bus_space_handle_t, bus_size_t); - int (*bs_subregion) (void *, bus_space_handle_t, + void (*bs_unmap) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + int (*bs_subregion) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, bus_space_handle_t *); /* allocation/deallocation */ - int (*bs_alloc) (void *, bus_addr_t, bus_addr_t, + int (*bs_alloc) (bus_space_tag_t, bus_addr_t, bus_addr_t, bus_size_t, bus_size_t, bus_size_t, int, bus_addr_t *, bus_space_handle_t *); - void (*bs_free) (void *, bus_space_handle_t, + void (*bs_free) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* get kernel virtual address */ /* barrier */ - void (*bs_barrier) (void *, bus_space_handle_t, + void (*bs_barrier) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_size_t, int); /* read (single) */ - u_int8_t (*bs_r_1) (void *, bus_space_handle_t, bus_size_t); - u_int16_t (*bs_r_2) (void *, bus_space_handle_t, bus_size_t); - u_int32_t (*bs_r_4) (void *, bus_space_handle_t, bus_size_t); - u_int64_t (*bs_r_8) (void *, bus_space_handle_t, bus_size_t); + uint8_t (*bs_r_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint16_t (*bs_r_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint64_t (*bs_r_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple */ - void (*bs_rm_1) (void *, bus_space_handle_t, bus_size_t, - u_int8_t *, bus_size_t); - void (*bs_rm_2) (void *, bus_space_handle_t, bus_size_t, - u_int16_t *, bus_size_t); - void (*bs_rm_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rm_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rm_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint8_t *, bus_size_t); + void (*bs_rm_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint16_t *, bus_size_t); + void (*bs_rm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* read region */ - void (*bs_rr_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t *, bus_size_t); - void (*bs_rr_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t *, bus_size_t); - void (*bs_rr_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rr_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t *, bus_size_t); + void (*bs_rr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t *, bus_size_t); + void (*bs_rr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* write (single) */ - void (*bs_w_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t); - void (*bs_w_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t); - void (*bs_w_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t); - void (*bs_w_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t); + void (*bs_w_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t); + void (*bs_w_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_w_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t); /* write multiple */ - void (*bs_wm_1) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wm_2) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wm_4) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wm_8) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wm_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wm_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* write region */ - void (*bs_wr_1) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wr_2) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wr_4) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wr_8) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* set multiple */ - void (*bs_sm_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t, bus_size_t); - void (*bs_sm_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t, bus_size_t); - void (*bs_sm_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t, bus_size_t); - void (*bs_sm_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t, bus_size_t); + void (*bs_sm_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t, bus_size_t); + void (*bs_sm_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t, bus_size_t); + void (*bs_sm_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t, bus_size_t); + void (*bs_sm_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t, bus_size_t); /* set region */ - void (*bs_sr_1) (void *, bus_space_handle_t, - bus_size_t, u_int8_t, bus_size_t); - void (*bs_sr_2) (void *, bus_space_handle_t, - bus_size_t, u_int16_t, bus_size_t); - void (*bs_sr_4) (void *, bus_space_handle_t, - bus_size_t, u_int32_t, bus_size_t); - void (*bs_sr_8) (void *, bus_space_handle_t, - bus_size_t, u_int64_t, bus_size_t); + void (*bs_sr_1) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t, bus_size_t); + void (*bs_sr_2) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t, bus_size_t); + void (*bs_sr_4) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t, bus_size_t); + void (*bs_sr_8) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t, bus_size_t); /* copy */ - void (*bs_c_1) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_2) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_4) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_4) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); - void (*bs_c_8) (void *, bus_space_handle_t, bus_size_t, + void (*bs_c_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t, bus_space_handle_t, bus_size_t, bus_size_t); /* read stream (single) */ - u_int8_t (*bs_r_1_s) (void *, bus_space_handle_t, bus_size_t); - u_int16_t (*bs_r_2_s) (void *, bus_space_handle_t, bus_size_t); - u_int32_t (*bs_r_4_s) (void *, bus_space_handle_t, bus_size_t); - u_int64_t (*bs_r_8_s) (void *, bus_space_handle_t, bus_size_t); + uint8_t (*bs_r_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint16_t (*bs_r_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint64_t (*bs_r_8_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple stream */ - void (*bs_rm_1_s) (void *, bus_space_handle_t, bus_size_t, - u_int8_t *, bus_size_t); - void (*bs_rm_2_s) (void *, bus_space_handle_t, bus_size_t, - u_int16_t *, bus_size_t); - void (*bs_rm_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rm_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rm_1_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint8_t *, bus_size_t); + void (*bs_rm_2_s) (bus_space_tag_t, bus_space_handle_t, bus_size_t, + uint16_t *, bus_size_t); + void (*bs_rm_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rm_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* read region stream */ - void (*bs_rr_1_s) (void *, bus_space_handle_t, - bus_size_t, u_int8_t *, bus_size_t); - void (*bs_rr_2_s) (void *, bus_space_handle_t, - bus_size_t, u_int16_t *, bus_size_t); - void (*bs_rr_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t *, bus_size_t); - void (*bs_rr_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t *, bus_size_t); + void (*bs_rr_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t *, bus_size_t); + void (*bs_rr_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t *, bus_size_t); + void (*bs_rr_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t *, bus_size_t); + void (*bs_rr_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t *, bus_size_t); /* write stream (single) */ - void (*bs_w_1_s) (void *, bus_space_handle_t, - bus_size_t, u_int8_t); - void (*bs_w_2_s) (void *, bus_space_handle_t, - bus_size_t, u_int16_t); - void (*bs_w_4_s) (void *, bus_space_handle_t, - bus_size_t, u_int32_t); - void (*bs_w_8_s) (void *, bus_space_handle_t, - bus_size_t, u_int64_t); + void (*bs_w_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint16_t); + void (*bs_w_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_w_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint64_t); /* write multiple stream */ - void (*bs_wm_1_s) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wm_2_s) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wm_4_s) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wm_8_s) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wm_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wm_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wm_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wm_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); /* write region stream */ - void (*bs_wr_1_s) (void *, bus_space_handle_t, - bus_size_t, const u_int8_t *, bus_size_t); - void (*bs_wr_2_s) (void *, bus_space_handle_t, - bus_size_t, const u_int16_t *, bus_size_t); - void (*bs_wr_4_s) (void *, bus_space_handle_t, - bus_size_t, const u_int32_t *, bus_size_t); - void (*bs_wr_8_s) (void *, bus_space_handle_t, - bus_size_t, const u_int64_t *, bus_size_t); + void (*bs_wr_1_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint8_t *, bus_size_t); + void (*bs_wr_2_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint16_t *, bus_size_t); + void (*bs_wr_4_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint32_t *, bus_size_t); + void (*bs_wr_8_s) (bus_space_tag_t, bus_space_handle_t, + bus_size_t, const uint64_t *, bus_size_t); }; @@ -253,19 +253,19 @@ struct bus_space { #define __bs_opname(op,size) __bs_c(__bs_c(__bs_c(bs_,op),_),size) #define __bs_nonsingle(type, sz, t, h, o, a, c) \ - (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, a, c) + (*(t)->__bs_opname(type,sz))((t), h, o, a, c) #define __bs_set(type, sz, t, h, o, v, c) \ - (*(t)->__bs_opname(type,sz))((t)->bs_cookie, h, o, v, c) + (*(t)->__bs_opname(type,sz))((t), h, o, v, c) #define __bs_copy(sz, t, h1, o1, h2, o2, cnt) \ - (*(t)->__bs_opname(c,sz))((t)->bs_cookie, h1, o1, h2, o2, cnt) + (*(t)->__bs_opname(c,sz))((t), h1, o1, h2, o2, cnt) #define __bs_opname_s(op,size) __bs_c(__bs_c(__bs_c(__bs_c(bs_,op),_),size),_s) #define __bs_rs_s(sz, t, h, o) \ - (*(t)->__bs_opname_s(r,sz))((t)->bs_cookie, h, o) + (*(t)->__bs_opname_s(r,sz))((t), h, o) #define __bs_ws_s(sz, t, h, o, v) \ - (*(t)->__bs_opname_s(w,sz))((t)->bs_cookie, h, o, v) + (*(t)->__bs_opname_s(w,sz))((t), h, o, v) #define __bs_nonsingle_s(type, sz, t, h, o, a, c) \ - (*(t)->__bs_opname_s(type,sz))((t)->bs_cookie, h, o, a, c) + (*(t)->__bs_opname_s(type,sz))((t), h, o, a, c) #define __generate_inline_bs_rs(IFN, MBR, TYP) \ @@ -276,7 +276,7 @@ struct bus_space { if (__predict_true(t->MBR == NULL)) \ return (*(volatile TYP *)(h + o)); \ else \ - return (t->MBR(t->bs_cookie, h, o)); \ + return (t->MBR(t, h, o)); \ } #define __generate_inline_bs_ws(IFN, MBR, TYP) \ @@ -287,34 +287,34 @@ struct bus_space { if (__predict_true(t->MBR == NULL)) \ *(volatile TYP *)(h + o) = v; \ else \ - t->MBR(t->bs_cookie, h, o, v); \ + t->MBR(t, h, o, v); \ } /* * Mapping and unmapping operations. */ #define bus_space_map(t, a, s, c, hp) \ - (*(t)->bs_map)((t)->bs_cookie, (a), (s), (c), (hp)) + (*(t)->bs_map)((t), (a), (s), (c), (hp)) #define bus_space_unmap(t, h, s) \ - (*(t)->bs_unmap)((t)->bs_cookie, (h), (s)) + (*(t)->bs_unmap)((t), (h), (s)) #define bus_space_subregion(t, h, o, s, hp) \ - (*(t)->bs_subregion)((t)->bs_cookie, (h), (o), (s), (hp)) + (*(t)->bs_subregion)((t), (h), (o), (s), (hp)) /* * Allocation and deallocation operations. */ #define bus_space_alloc(t, rs, re, s, a, b, c, ap, hp) \ - (*(t)->bs_alloc)((t)->bs_cookie, (rs), (re), (s), (a), (b), \ + (*(t)->bs_alloc)((t), (rs), (re), (s), (a), (b), \ (c), (ap), (hp)) #define bus_space_free(t, h, s) \ - (*(t)->bs_free)((t)->bs_cookie, (h), (s)) + (*(t)->bs_free)((t), (h), (s)) /* * Bus barrier operations. */ #define bus_space_barrier(t, h, o, l, f) \ - (*(t)->bs_barrier)((t)->bs_cookie, (h), (o), (l), (f)) + (*(t)->bs_barrier)((t), (h), (o), (l), (f)) #define BUS_SPACE_BARRIER_READ 0x01 #define BUS_SPACE_BARRIER_WRITE 0x02 @@ -478,204 +478,204 @@ __generate_inline_bs_ws(bus_space_write_ */ #define bs_map_proto(f) \ -int __bs_c(f,_bs_map) (void *t, bus_addr_t addr, \ +int __bs_c(f,_bs_map) (bus_space_tag_t t, bus_addr_t addr, \ bus_size_t size, int cacheable, bus_space_handle_t *bshp); #define bs_unmap_proto(f) \ -void __bs_c(f,_bs_unmap) (void *t, bus_space_handle_t bsh, \ +void __bs_c(f,_bs_unmap) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t size); #define bs_subregion_proto(f) \ -int __bs_c(f,_bs_subregion) (void *t, bus_space_handle_t bsh, \ +int __bs_c(f,_bs_subregion) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset, bus_size_t size, \ bus_space_handle_t *nbshp); #define bs_alloc_proto(f) \ -int __bs_c(f,_bs_alloc) (void *t, bus_addr_t rstart, \ +int __bs_c(f,_bs_alloc) (bus_space_tag_t t, bus_addr_t rstart, \ bus_addr_t rend, bus_size_t size, bus_size_t align, \ bus_size_t boundary, int cacheable, bus_addr_t *addrp, \ bus_space_handle_t *bshp); #define bs_free_proto(f) \ -void __bs_c(f,_bs_free) (void *t, bus_space_handle_t bsh, \ +void __bs_c(f,_bs_free) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t size); #define bs_mmap_proto(f) \ int __bs_c(f,_bs_mmap) (struct cdev *, vm_offset_t, vm_paddr_t *, int); #define bs_barrier_proto(f) \ -void __bs_c(f,_bs_barrier) (void *t, bus_space_handle_t bsh, \ +void __bs_c(f,_bs_barrier) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset, bus_size_t len, int flags); #define bs_r_1_proto(f) \ -u_int8_t __bs_c(f,_bs_r_1) (void *t, bus_space_handle_t bsh, \ +uint8_t __bs_c(f,_bs_r_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_r_2_proto(f) \ -u_int16_t __bs_c(f,_bs_r_2) (void *t, bus_space_handle_t bsh, \ +uint16_t __bs_c(f,_bs_r_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_r_4_proto(f) \ -u_int32_t __bs_c(f,_bs_r_4) (void *t, bus_space_handle_t bsh, \ +uint32_t __bs_c(f,_bs_r_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_r_8_proto(f) \ -u_int64_t __bs_c(f,_bs_r_8) (void *t, bus_space_handle_t bsh, \ +uint64_t __bs_c(f,_bs_r_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_r_1_s_proto(f) \ -u_int8_t __bs_c(f,_bs_r_1_s) (void *t, bus_space_handle_t bsh, \ +uint8_t __bs_c(f,_bs_r_1_s) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_r_2_s_proto(f) \ -u_int16_t __bs_c(f,_bs_r_2_s) (void *t, bus_space_handle_t bsh, \ +uint16_t __bs_c(f,_bs_r_2_s) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_r_4_s_proto(f) \ -u_int32_t __bs_c(f,_bs_r_4_s) (void *t, bus_space_handle_t bsh, \ +uint32_t __bs_c(f,_bs_r_4_s) (bus_space_tag_t t, bus_space_handle_t bsh, \ bus_size_t offset); #define bs_w_1_proto(f) \ -void __bs_c(f,_bs_w_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int8_t value); +void __bs_c(f,_bs_w_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint8_t value); #define bs_w_2_proto(f) \ -void __bs_c(f,_bs_w_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int16_t value); +void __bs_c(f,_bs_w_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t value); #define bs_w_4_proto(f) \ -void __bs_c(f,_bs_w_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int32_t value); +void __bs_c(f,_bs_w_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t value); #define bs_w_8_proto(f) \ -void __bs_c(f,_bs_w_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int64_t value); +void __bs_c(f,_bs_w_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint64_t value); #define bs_w_1_s_proto(f) \ -void __bs_c(f,_bs_w_1_s) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int8_t value); +void __bs_c(f,_bs_w_1_s) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint8_t value); #define bs_w_2_s_proto(f) \ -void __bs_c(f,_bs_w_2_s) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int16_t value); +void __bs_c(f,_bs_w_2_s) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t value); #define bs_w_4_s_proto(f) \ -void __bs_c(f,_bs_w_4_s) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int32_t value); +void __bs_c(f,_bs_w_4_s) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t value); #define bs_rm_1_proto(f) \ -void __bs_c(f,_bs_rm_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int8_t *addr, bus_size_t count); +void __bs_c(f,_bs_rm_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint8_t *addr, bus_size_t count); #define bs_rm_2_proto(f) \ -void __bs_c(f,_bs_rm_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int16_t *addr, bus_size_t count); +void __bs_c(f,_bs_rm_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t *addr, bus_size_t count); #define bs_rm_4_proto(f) \ -void __bs_c(f,_bs_rm_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int32_t *addr, bus_size_t count); +void __bs_c(f,_bs_rm_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t *addr, bus_size_t count); #define bs_rm_8_proto(f) \ -void __bs_c(f,_bs_rm_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int64_t *addr, bus_size_t count); +void __bs_c(f,_bs_rm_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint64_t *addr, bus_size_t count); #define bs_wm_1_proto(f) \ -void __bs_c(f,_bs_wm_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int8_t *addr, bus_size_t count); +void __bs_c(f,_bs_wm_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint8_t *addr, bus_size_t count); #define bs_wm_2_proto(f) \ -void __bs_c(f,_bs_wm_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int16_t *addr, bus_size_t count); +void __bs_c(f,_bs_wm_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint16_t *addr, bus_size_t count); #define bs_wm_4_proto(f) \ -void __bs_c(f,_bs_wm_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int32_t *addr, bus_size_t count); +void __bs_c(f,_bs_wm_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint32_t *addr, bus_size_t count); #define bs_wm_8_proto(f) \ -void __bs_c(f,_bs_wm_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int64_t *addr, bus_size_t count); +void __bs_c(f,_bs_wm_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint64_t *addr, bus_size_t count); #define bs_rr_1_proto(f) \ -void __bs_c(f, _bs_rr_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int8_t *addr, bus_size_t count); +void __bs_c(f, _bs_rr_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint8_t *addr, bus_size_t count); #define bs_rr_2_proto(f) \ -void __bs_c(f, _bs_rr_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int16_t *addr, bus_size_t count); +void __bs_c(f, _bs_rr_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t *addr, bus_size_t count); #define bs_rr_4_proto(f) \ -void __bs_c(f, _bs_rr_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int32_t *addr, bus_size_t count); +void __bs_c(f, _bs_rr_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t *addr, bus_size_t count); #define bs_rr_8_proto(f) \ -void __bs_c(f, _bs_rr_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int64_t *addr, bus_size_t count); +void __bs_c(f, _bs_rr_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint64_t *addr, bus_size_t count); #define bs_wr_1_proto(f) \ -void __bs_c(f, _bs_wr_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int8_t *addr, bus_size_t count); +void __bs_c(f, _bs_wr_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint8_t *addr, bus_size_t count); #define bs_wr_2_proto(f) \ -void __bs_c(f, _bs_wr_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int16_t *addr, bus_size_t count); +void __bs_c(f, _bs_wr_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint16_t *addr, bus_size_t count); #define bs_wr_4_proto(f) \ -void __bs_c(f, _bs_wr_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int32_t *addr, bus_size_t count); +void __bs_c(f, _bs_wr_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint32_t *addr, bus_size_t count); #define bs_wr_8_proto(f) \ -void __bs_c(f, _bs_wr_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, const u_int64_t *addr, bus_size_t count); +void __bs_c(f, _bs_wr_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, const uint64_t *addr, bus_size_t count); #define bs_sm_1_proto(f) \ -void __bs_c(f,_bs_sm_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int8_t value, bus_size_t count); +void __bs_c(f,_bs_sm_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint8_t value, bus_size_t count); #define bs_sm_2_proto(f) \ -void __bs_c(f,_bs_sm_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int16_t value, bus_size_t count); +void __bs_c(f,_bs_sm_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t value, bus_size_t count); #define bs_sm_4_proto(f) \ -void __bs_c(f,_bs_sm_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int32_t value, bus_size_t count); +void __bs_c(f,_bs_sm_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t value, bus_size_t count); #define bs_sm_8_proto(f) \ -void __bs_c(f,_bs_sm_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int64_t value, bus_size_t count); +void __bs_c(f,_bs_sm_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint64_t value, bus_size_t count); #define bs_sr_1_proto(f) \ -void __bs_c(f,_bs_sr_1) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int8_t value, bus_size_t count); +void __bs_c(f,_bs_sr_1) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint8_t value, bus_size_t count); #define bs_sr_2_proto(f) \ -void __bs_c(f,_bs_sr_2) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int16_t value, bus_size_t count); +void __bs_c(f,_bs_sr_2) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint16_t value, bus_size_t count); #define bs_sr_4_proto(f) \ -void __bs_c(f,_bs_sr_4) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int32_t value, bus_size_t count); +void __bs_c(f,_bs_sr_4) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint32_t value, bus_size_t count); #define bs_sr_8_proto(f) \ -void __bs_c(f,_bs_sr_8) (void *t, bus_space_handle_t bsh, \ - bus_size_t offset, u_int64_t value, bus_size_t count); +void __bs_c(f,_bs_sr_8) (bus_space_tag_t t, bus_space_handle_t bsh, \ + bus_size_t offset, uint64_t value, bus_size_t count); #define bs_c_1_proto(f) \ -void __bs_c(f,_bs_c_1) (void *t, bus_space_handle_t bsh1, \ +void __bs_c(f,_bs_c_1) (bus_space_tag_t t, bus_space_handle_t bsh1, \ bus_size_t offset1, bus_space_handle_t bsh2, \ bus_size_t offset2, bus_size_t count); #define bs_c_2_proto(f) \ -void __bs_c(f,_bs_c_2) (void *t, bus_space_handle_t bsh1, \ +void __bs_c(f,_bs_c_2) (bus_space_tag_t t, bus_space_handle_t bsh1, \ bus_size_t offset1, bus_space_handle_t bsh2, \ bus_size_t offset2, bus_size_t count); #define bs_c_4_proto(f) \ -void __bs_c(f,_bs_c_4) (void *t, bus_space_handle_t bsh1, \ +void __bs_c(f,_bs_c_4) (bus_space_tag_t t, bus_space_handle_t bsh1, \ bus_size_t offset1, bus_space_handle_t bsh2, \ bus_size_t offset2, bus_size_t count); #define bs_c_8_proto(f) \ -void __bs_c(f,_bs_c_8) (void *t, bus_space_handle_t bsh1, \ +void __bs_c(f,_bs_c_8) (bus_space_tag_t t, bus_space_handle_t bsh1, \ bus_size_t offset1, bus_space_handle_t bsh2, \ bus_size_t offset2, bus_size_t count); Modified: head/sys/arm/versatile/bus_space.c ============================================================================== --- head/sys/arm/versatile/bus_space.c Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/versatile/bus_space.c Wed Jan 21 01:06:08 2015 (r277460) @@ -46,7 +46,7 @@ bs_protos(generic_armv4); struct bus_space _base_tag = { /* cookie */ - .bs_cookie = (void *) 0, + .bs_privdata = (void *) 0, /* mapping/unmapping */ .bs_map = generic_bs_map, Modified: head/sys/arm/xilinx/zy7_bus_space.c ============================================================================== --- head/sys/arm/xilinx/zy7_bus_space.c Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/xilinx/zy7_bus_space.c Wed Jan 21 01:06:08 2015 (r277460) @@ -46,7 +46,7 @@ bs_protos(generic_armv4); struct bus_space _base_tag = { /* cookie */ - .bs_cookie = (void *) 0, + .bs_privdata = (void *) 0, /* mapping/unmapping */ .bs_map = generic_bs_map, Modified: head/sys/arm/xscale/i80321/i80321_space.c ============================================================================== --- head/sys/arm/xscale/i80321/i80321_space.c Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/xscale/i80321/i80321_space.c Wed Jan 21 01:06:08 2015 (r277460) @@ -182,7 +182,7 @@ i80321_bs_init(bus_space_tag_t bs, void { *bs = i80321_bs_tag_template; - bs->bs_cookie = cookie; + bs->bs_privdata = cookie; } void @@ -190,7 +190,7 @@ i80321_io_bs_init(bus_space_tag_t bs, vo { *bs = i80321_bs_tag_template; - bs->bs_cookie = cookie; + bs->bs_privdata = cookie; bs->bs_map = i80321_io_bs_map; bs->bs_unmap = i80321_io_bs_unmap; @@ -204,7 +204,7 @@ i80321_mem_bs_init(bus_space_tag_t bs, v { *bs = i80321_bs_tag_template; - bs->bs_cookie = cookie; + bs->bs_privdata = cookie; bs->bs_map = i80321_mem_bs_map; bs->bs_unmap = i80321_mem_bs_unmap; @@ -216,7 +216,7 @@ i80321_mem_bs_init(bus_space_tag_t bs, v /* *** Routines shared by i80321, PCI IO, and PCI MEM. *** */ int -i80321_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +i80321_bs_subregion(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -225,7 +225,7 @@ i80321_bs_subregion(void *t, bus_space_h } void -i80321_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset, +i80321_bs_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t len, int flags) { @@ -236,7 +236,7 @@ i80321_bs_barrier(void *t, bus_space_han extern struct i80321_softc *i80321_softc; int -i80321_io_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +i80321_io_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { struct i80321_softc *sc = i80321_softc; @@ -264,14 +264,14 @@ i80321_io_bs_map(void *t, bus_addr_t bpa } void -i80321_io_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +i80321_io_bs_unmap(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t size) { /* Nothing to do. */ } int -i80321_io_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, +i80321_io_bs_alloc(bus_space_tag_t tag, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp) { @@ -280,7 +280,7 @@ i80321_io_bs_alloc(void *t, bus_addr_t r } void -i80321_io_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) +i80321_io_bs_free(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t size) { panic("i80321_io_bs_free(): not implemented"); @@ -290,33 +290,23 @@ i80321_io_bs_free(void *t, bus_space_han /* *** Routines for PCI MEM. *** */ extern int badaddr_read(void *, int, void *); int -i80321_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +i80321_mem_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { - vm_paddr_t pa, endpa; - pa = trunc_page(bpa); - endpa = round_page(bpa + size); - - *bshp = (vm_offset_t)pmap_mapdev(pa, endpa - pa); - + *bshp = (vm_offset_t)pmap_mapdev(bpa, size); return (0); } void -i80321_mem_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +i80321_mem_bs_unmap(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t size) { - vm_offset_t va, endva; - - va = trunc_page((vm_offset_t)t); - endva = va + round_page(size); - /* Free the kernel virtual mapping. */ - kva_free(va, endva - va); + pmap_unmapdev((vm_offset_t)h, size); } int -i80321_mem_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, +i80321_mem_bs_alloc(bus_space_tag_t tag, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp) { @@ -325,7 +315,7 @@ i80321_mem_bs_alloc(void *t, bus_addr_t } void -i80321_mem_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) +i80321_mem_bs_free(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t size) { panic("i80321_mem_bs_free(): not implemented"); Modified: head/sys/arm/xscale/i8134x/i81342_space.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342_space.c Wed Jan 21 00:00:41 2015 (r277459) +++ head/sys/arm/xscale/i8134x/i81342_space.c Wed Jan 21 01:06:08 2015 (r277460) @@ -183,7 +183,7 @@ i81342_bs_init(bus_space_tag_t bs, void { *bs = i81342_bs_tag_template; - bs->bs_cookie = cookie; + bs->bs_privdata = cookie; } void @@ -191,7 +191,7 @@ i81342_io_bs_init(bus_space_tag_t bs, vo { *bs = i81342_bs_tag_template; - bs->bs_cookie = cookie; + bs->bs_privdata = cookie; bs->bs_map = i81342_io_bs_map; bs->bs_unmap = i81342_io_bs_unmap; @@ -205,7 +205,7 @@ i81342_mem_bs_init(bus_space_tag_t bs, v { *bs = i81342_bs_tag_template; - bs->bs_cookie = cookie; + bs->bs_privdata = cookie; bs->bs_map = i81342_mem_bs_map; bs->bs_unmap = i81342_mem_bs_unmap; @@ -217,7 +217,7 @@ i81342_mem_bs_init(bus_space_tag_t bs, v /* *** Routines shared by i81342, PCI IO, and PCI MEM. *** */ int -i81342_bs_subregion(void *t, bus_space_handle_t bsh, bus_size_t offset, +i81342_bs_subregion(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp) { @@ -226,7 +226,7 @@ i81342_bs_subregion(void *t, bus_space_h } void -i81342_bs_barrier(void *t, bus_space_handle_t bsh, bus_size_t offset, +i81342_bs_barrier(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t offset, bus_size_t len, int flags) { @@ -236,7 +236,7 @@ i81342_bs_barrier(void *t, bus_space_han /* *** Routines for PCI IO. *** */ int -i81342_io_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +i81342_io_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { @@ -245,14 +245,14 @@ i81342_io_bs_map(void *t, bus_addr_t bpa } void -i81342_io_bs_unmap(void *t, bus_space_handle_t h, bus_size_t size) +i81342_io_bs_unmap(bus_space_tag_t tag, bus_space_handle_t h, bus_size_t size) { /* Nothing to do. */ } int -i81342_io_bs_alloc(void *t, bus_addr_t rstart, bus_addr_t rend, +i81342_io_bs_alloc(bus_space_tag_t tag, bus_addr_t rstart, bus_addr_t rend, bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags, bus_addr_t *bpap, bus_space_handle_t *bshp) { @@ -261,7 +261,7 @@ i81342_io_bs_alloc(void *t, bus_addr_t r } void -i81342_io_bs_free(void *t, bus_space_handle_t bsh, bus_size_t size) +i81342_io_bs_free(bus_space_tag_t tag, bus_space_handle_t bsh, bus_size_t size) { panic("i81342_io_bs_free(): not implemented"); @@ -272,10 +272,10 @@ i81342_io_bs_free(void *t, bus_space_han extern int badaddr_read(void *, int, void *); static vm_offset_t allocable = 0xe1000000; int -i81342_mem_bs_map(void *t, bus_addr_t bpa, bus_size_t size, int flags, +i81342_mem_bs_map(bus_space_tag_t tag, bus_addr_t bpa, bus_size_t size, int flags, bus_space_handle_t *bshp) { - struct i81342_pci_softc *sc = (struct i81342_pci_softc *)t; + struct i81342_pci_softc *sc = (struct i81342_pci_softc *)tag->bs_privdata; struct i81342_pci_map *tmp; vm_offset_t addr, endaddr; vm_paddr_t paddr; @@ -315,12 +315,12 @@ i81342_mem_bs_map(void *t, bus_addr_t bp } *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:06:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5DBCAA71; Wed, 21 Jan 2015 01:06:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2E03D979; Wed, 21 Jan 2015 01:06:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L16FZW050703; Wed, 21 Jan 2015 01:06:15 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L16FBB050702; Wed, 21 Jan 2015 01:06:15 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201501210106.t0L16FBB050702@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 21 Jan 2015 01:06:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277461 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:06:15 -0000 Author: mjg Date: Wed Jan 21 01:06:14 2015 New Revision: 277461 URL: https://svnweb.freebsd.org/changeset/base/277461 Log: filedesc: plug a test for impossible condition in _fget Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jan 21 01:06:08 2015 (r277460) +++ head/sys/kern/kern_descrip.c Wed Jan 21 01:06:14 2015 (r277461) @@ -2439,8 +2439,7 @@ _fget(struct thread *td, int fd, struct int error; *fpp = NULL; - if (td == NULL || (fdp = td->td_proc->p_fd) == NULL) - return (EBADF); + fdp = td->td_proc->p_fd; if (needrightsp != NULL) needrights = *needrightsp; else From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:08:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35ACEC3A; Wed, 21 Jan 2015 01:08:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07B4E98A; Wed, 21 Jan 2015 01:08:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L17xmC050971; Wed, 21 Jan 2015 01:07:59 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L17xIQ050966; Wed, 21 Jan 2015 01:07:59 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501210107.t0L17xIQ050966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Jan 2015 01:07:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277462 - in head/contrib/elftoolchain: common readelf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:08:00 -0000 Author: emaste Date: Wed Jan 21 01:07:58 2015 New Revision: 277462 URL: https://svnweb.freebsd.org/changeset/base/277462 Log: redelf: Add missing R_X86_64_ relocation types PR: 196918 Reviewed by: dim Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D1570 Modified: head/contrib/elftoolchain/common/elfdefinitions.h head/contrib/elftoolchain/readelf/readelf.c Modified: head/contrib/elftoolchain/common/elfdefinitions.h ============================================================================== --- head/contrib/elftoolchain/common/elfdefinitions.h Wed Jan 21 01:06:14 2015 (r277461) +++ head/contrib/elftoolchain/common/elfdefinitions.h Wed Jan 21 01:07:58 2015 (r277462) @@ -1948,11 +1948,17 @@ _ELF_DEFINE_RELOC(R_X86_64_TPOFF32, 23) _ELF_DEFINE_RELOC(R_X86_64_PC64, 24) \ _ELF_DEFINE_RELOC(R_X86_64_GOTOFF64, 25) \ _ELF_DEFINE_RELOC(R_X86_64_GOTPC32, 26) \ +_ELF_DEFINE_RELOC(R_X86_64_GOT64, 27) \ +_ELF_DEFINE_RELOC(R_X86_64_GOTPCREL64, 28) \ +_ELF_DEFINE_RELOC(R_X86_64_GOTPC64, 29) \ +_ELF_DEFINE_RELOC(R_X86_64_GOTPLT64, 30) \ +_ELF_DEFINE_RELOC(R_X86_64_PLTOFF64, 31) \ _ELF_DEFINE_RELOC(R_X86_64_SIZE32, 32) \ _ELF_DEFINE_RELOC(R_X86_64_SIZE64, 33) \ _ELF_DEFINE_RELOC(R_X86_64_GOTPC32_TLSDESC, 34) \ _ELF_DEFINE_RELOC(R_X86_64_TLSDESC_CALL, 35) \ -_ELF_DEFINE_RELOC(R_X86_64_TLSDESC, 36) +_ELF_DEFINE_RELOC(R_X86_64_TLSDESC, 36) \ +_ELF_DEFINE_RELOC(R_X86_64_IRELATIVE, 37) #define _ELF_DEFINE_RELOCATIONS() \ _ELF_DEFINE_386_RELOCATIONS() \ Modified: head/contrib/elftoolchain/readelf/readelf.c ============================================================================== --- head/contrib/elftoolchain/readelf/readelf.c Wed Jan 21 01:06:14 2015 (r277461) +++ head/contrib/elftoolchain/readelf/readelf.c Wed Jan 21 01:07:58 2015 (r277462) @@ -1480,6 +1480,20 @@ r_type(unsigned int mach, unsigned int t case 21: return "R_X86_64_DTPOFF32"; case 22: return "R_X86_64_GOTTPOFF"; case 23: return "R_X86_64_TPOFF32"; + case 24: return "R_X86_64_PC64"; + case 25: return "R_X86_64_GOTOFF64"; + case 26: return "R_X86_64_GOTPC32"; + case 27: return "R_X86_64_GOT64"; + case 28: return "R_X86_64_GOTPCREL64"; + case 29: return "R_X86_64_GOTPC64"; + case 30: return "R_X86_64_GOTPLT64"; + case 31: return "R_X86_64_PLTOFF64"; + case 32: return "R_X86_64_SIZE32"; + case 33: return "R_X86_64_SIZE64"; + case 34: return "R_X86_64_GOTPC32_TLSDESC"; + case 35: return "R_X86_64_TLSDESC_CALL"; + case 36: return "R_X86_64_TLSDESC"; + case 37: return "R_X86_64_IRELATIVE"; default: return ""; } default: return ""; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:11:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAA3AE1E; Wed, 21 Jan 2015 01:11:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC080A4B; Wed, 21 Jan 2015 01:11:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L1BcWI054497; Wed, 21 Jan 2015 01:11:38 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L1BccO054496; Wed, 21 Jan 2015 01:11:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501210111.t0L1BccO054496@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Wed, 21 Jan 2015 01:11:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277463 - head/usr.bin/grep X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:11:39 -0000 Author: delphij Date: Wed Jan 21 01:11:37 2015 New Revision: 277463 URL: https://svnweb.freebsd.org/changeset/base/277463 Log: Fix xz handling for files larger than 32K. Submitted by: Stefan Ehmann PR: bin/186861 MFC after: 2 weeks Modified: head/usr.bin/grep/file.c Modified: head/usr.bin/grep/file.c ============================================================================== --- head/usr.bin/grep/file.c Wed Jan 21 01:07:58 2015 (r277462) +++ head/usr.bin/grep/file.c Wed Jan 21 01:11:37 2015 (r277463) @@ -65,6 +65,8 @@ __FBSDID("$FreeBSD$"); static gzFile gzbufdesc; #ifndef WITHOUT_LZMA static lzma_stream lstrm = LZMA_STREAM_INIT; +static lzma_action laction; +static uint8_t lin_buf[MAXBUFSIZ]; #endif #ifndef WITHOUT_BZIP2 static BZFILE* bzbufdesc; @@ -123,34 +125,34 @@ grep_refill(struct file *f) #endif #ifndef WITHOUT_LZMA } else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { - lzma_action action = LZMA_RUN; - uint8_t in_buf[MAXBUFSIZ]; lzma_ret ret; + lstrm.next_out = buffer; - ret = (filebehave == FILE_XZ) ? - lzma_stream_decoder(&lstrm, UINT64_MAX, - LZMA_CONCATENATED) : - lzma_alone_decoder(&lstrm, UINT64_MAX); + do { + if (lstrm.avail_in == 0) { + lstrm.next_in = lin_buf; + nr = read(f->fd, lin_buf, MAXBUFSIZ); + + if (nr < 0) + return (-1); + else if (nr == 0) + laction = LZMA_FINISH; - if (ret != LZMA_OK) - return (-1); + lstrm.avail_in = nr; + } - lstrm.next_out = buffer; - lstrm.avail_out = MAXBUFSIZ; - lstrm.next_in = in_buf; - nr = read(f->fd, in_buf, MAXBUFSIZ); + ret = lzma_code(&lstrm, laction); + + if (ret != LZMA_OK && ret != LZMA_STREAM_END) + return (-1); + + if (lstrm.avail_out == 0 || ret == LZMA_STREAM_END) { + bufrem = MAXBUFSIZ - lstrm.avail_out; + lstrm.next_out = buffer; + lstrm.avail_out = MAXBUFSIZ; + } + } while (bufrem == 0 && ret != LZMA_STREAM_END); - if (nr < 0) - return (-1); - else if (nr == 0) - action = LZMA_FINISH; - - lstrm.avail_in = nr; - ret = lzma_code(&lstrm, action); - - if (ret != LZMA_OK && ret != LZMA_STREAM_END) - return (-1); - bufrem = MAXBUFSIZ - lstrm.avail_out; return (0); #endif /* WIHTOUT_LZMA */ } else @@ -291,6 +293,23 @@ grep_open(const char *path) (bzbufdesc = BZ2_bzdopen(f->fd, "r")) == NULL) goto error2; #endif +#ifndef WITHOUT_LZMA + else if ((filebehave == FILE_XZ) || (filebehave == FILE_LZMA)) { + lzma_ret ret; + + ret = (filebehave == FILE_XZ) ? + lzma_stream_decoder(&lstrm, UINT64_MAX, + LZMA_CONCATENATED) : + lzma_alone_decoder(&lstrm, UINT64_MAX); + + if (ret != LZMA_OK) + goto error2; + + lstrm.avail_in = 0; + lstrm.avail_out = MAXBUFSIZ; + laction = LZMA_RUN; + } +#endif /* Fill read buffer, also catches errors early */ if (bufrem == 0 && grep_refill(f) != 0) From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:12:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99574F9F; Wed, 21 Jan 2015 01:12:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8578FA58; Wed, 21 Jan 2015 01:12:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L1CMSx055112; Wed, 21 Jan 2015 01:12:22 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L1CMOn055111; Wed, 21 Jan 2015 01:12:22 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501210112.t0L1CMOn055111@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Jan 2015 01:12:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277464 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:12:22 -0000 Author: emaste Date: Wed Jan 21 01:12:21 2015 New Revision: 277464 URL: https://svnweb.freebsd.org/changeset/base/277464 Log: Add missing R_X86_64_ constants to elf_common.h PR: 196918 MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Modified: head/sys/sys/elf_common.h Modified: head/sys/sys/elf_common.h ============================================================================== --- head/sys/sys/elf_common.h Wed Jan 21 01:11:37 2015 (r277463) +++ head/sys/sys/elf_common.h Wed Jan 21 01:12:21 2015 (r277464) @@ -1223,6 +1223,19 @@ typedef struct { #define R_X86_64_DTPOFF32 21 /* Offset in TLS block */ #define R_X86_64_GOTTPOFF 22 /* PC relative offset to IE GOT entry */ #define R_X86_64_TPOFF32 23 /* Offset in static TLS block */ +#define R_X86_64_PC64 24 /* PC-relative 64 bit signed sym value. */ +#define R_X86_64_GOTOFF64 25 +#define R_X86_64_GOTPC32 26 +#define R_X86_64_GOT64 27 +#define R_X86_64_GOTPCREL64 28 +#define R_X86_64_GOTPC64 29 +#define R_X86_64_GOTPLT64 30 +#define R_X86_64_PLTOFF64 31 +#define R_X86_64_SIZE32 32 +#define R_X86_64_SIZE64 33 +#define R_X86_64_GOTPC32_TLSDESC 34 +#define R_X86_64_TLSDESC_CALL 35 +#define R_X86_64_TLSDESC 36 #define R_X86_64_IRELATIVE 37 From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:33:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 263B94A7 for ; Wed, 21 Jan 2015 01:33:44 +0000 (UTC) Received: from nm6.bullet.mail.bf1.yahoo.com (nm6.bullet.mail.bf1.yahoo.com [98.139.212.165]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4F39C46 for ; Wed, 21 Jan 2015 01:33:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421804016; bh=2Da6MbQLTKZ5E/m1aH5WjG+7typsmoKsSo+HsNPGiAY=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=KMpdToFRgvhx3hsDJ0joO8py0US7JPEatQDBAQ/Y27Kmf6W3bBTTeyVmDJSw9Fhl1RshB6V+rF5dQBsIBxLQtKDu/Jnsj6p5W05OISBy9Npy+zEv2wFamxPK6djEn7J5EGQwehBmTKGR45dt19nuMIdRJ2i690EXMdTBseFTOD4ar0WqVr8jx5mJTNRXdlAGYBAvCPO6pHNvXTrmOHimHGq4KT6kVBjfQOuemEy7rDDjtk+D+zNxT9QEjwlTtkcNLd+dy3jaKTUa6pI3KtpN3C+J96pw66KHXIyo9KQOmoHA9ZqFzZRTi1SXiPqkDChY/f75LF5Ck9OryAsrHFdhqw== Received: from [98.139.214.32] by nm6.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 01:33:36 -0000 Received: from [98.139.211.206] by tm15.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 01:33:36 -0000 Received: from [127.0.0.1] by smtp215.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 01:33:36 -0000 X-Yahoo-Newman-Id: 460484.29023.bm@smtp215.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: I9a1MbEVM1nLkC.fXs0A0J0BAJ6e7BEtoZ7dbtsI8WN5utE p9Adu8qUqAt2RboXZaxJALNSEHyMSwGmjnxBY0X.ry6vOI4ioaa.ZFaN33b9 BJo4iSmHFt0eTMZA52H9BZxHHqLFo3uOL6cVTMnqxgU5MTYsfQoLHVyYde.n 8aXHaE2A_Q.PfEePri44rR74FVyoa.puw2u4vpU8guTc22z1mnyjq0ROO5g3 W3joN3Ui1.gXu34c6RisLFBlZC1IAnNHJdaVzIiZRW_RRlLwzB8tTxJM6qHy utPILdHARrGUJgqwEyMlfse5Rgg1quZMTYoYHhd0ocDnjsN4.k_d6XmJMj70 n0gUxaC2H.2GkT2OuzOaaq6sb8jXR2nMxJ4l2YrPlgpcqpE_UYt4Aa4DB7NO 3KZKAiQ5BMy_F.ubfOGjOaKVJ1urxrFP9VMC8TrzNSuhP_P4SIQB149NJxw7 y8B3Srv9O_EBhufVaykyNzRnSYV0TP66hbPfkOnEDAaNDPqMs8gqjKToq98x QUEzetBrnV9XZHvN7ODk9FLA1fkk4iSBDsPbcNnI6KAmGoUhpnK2nrdBgRT2 JacBGyqHAFVJOYCqa34gPJ7dMaGURwMDA3EFJfQkMrQWThZtD452NJOHNYGJ Fdy6qGIzJpJpg2ha_ml4WBDe9UWu8hAi1Xskf4BGDCA2SYMuPL9q3faQy4ZH t31QdhuzBHDcbGxqIWnoURMa2Cg-- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54BF01F2.4030502@FreeBSD.org> Date: Tue, 20 Jan 2015 20:33:38 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Navdeep Parhar , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <54BEFB79.6090806@FreeBSD.org> In-Reply-To: <54BEFB79.6090806@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:33:44 -0000 On 01/20/15 20:06, Navdeep Parhar wrote: > On 01/20/15 16:50, Pedro Giffuni wrote: >> >> On 01/20/15 18:21, Navdeep Parhar wrote: >>> The problem reported by Luigi has been fixed in r277225 already. >>> >>> Regards, >>> Navdeep >>> >> >> But the fix is rather ugly, isn't it? I would personally prefer to just >> kill the older >> gcc but in the meantime updating it so that it behaves like the updated >> gcc/clang would be better. IMHO. > > I'm not sure why you think the fix is ugly. Modifying the base > compiler to deal with minor stuff like this seems excessive and I > never even considered that. > "Modifying the base compiler to deal with minor stuff like this" is actually called "an update" since upstream already did it: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 You could also call it "making it more compatible with clang and newer gcc" The base compiler is ugly as it can be but that's upstream's fault, not the fault those of us that were once condemned to add bandaids. Happily I am not planning to touch it anymore ;). Pedro. > Regards, > Navdeep > >> >> Pedro. >> >>> On 01/20/15 15:10, Pedro Giffuni wrote: >>>> Hi; >>>> >>>> I got this patch from the OpenBSD-tech list[1]. >>>> Perhaps this fixes the gcc issue? >>>> >>>> Apparently it's required for mesa too. >>>> >>>> Pedro. >>>> >>>> [1] http://article.gmane.org/gmane.os.openbsd.tech/40604 >>>> >>>> On 01/06/15 15:33, Navdeep Parhar wrote: >>>>> On Tue, Jan 06, 2015 at 07:58:34PM +0100, Luigi Rizzo wrote: >>>>>> >>>>>> On Thu, Jan 1, 2015 at 12:19 AM, Navdeep Parhar >>>>>> wrote: >>>>>> >>>>>> Author: np >>>>>> Date: Wed Dec 31 23:19:16 2014 >>>>>> New Revision: 276485 >>>>>> URL: https://svnweb.freebsd.org/changeset/base/276485 >>>>>> >>>>>> Log: >>>>>> cxgbe(4): major tx rework. >>>>>> >>>>>> >>>>>> FYI, this commit has some unnamed unions (eg. in t4_mp_ring.c) >>>>>> which prevent the kernel from compiling with our stock gcc >>>>>> and its standard kernel build flags (specifically -std=...). >>>>>> >>>>>> Adding the following in the kernel config >>>>>> >>>>>> makeoptions COPTFLAGS="-fms-extensions" >>>>>> >>>>>> seems to do the job >>>>>> >>>>>> I know it is unavoidable that we'll end up with gcc not working, >>>>>> but maybe we can still avoid unnamed unions. >>>>> There are two unresolved issues with mp_ring and I had to make the >>>>> driver amd64-only while I consider my options. >>>>> >>>>> - platforms where gcc is the default (and our version has problems >>>>> with >>>>> unnamed unions). This is simple to fix but reduces the >>>>> readability of >>>>> the code. But sure, if building head with gcc is popular then >>>>> that >>>>> trumps readability. I wonder if adding -fms-extensions just to >>>>> the >>>>> driver's build flags would be an acceptable compromise. >>>>> - platforms without the acq/rel versions of 64b cmpset. I think it >>>>> would be simple to add acq/rel variants to i386/pc98 and others >>>>> that >>>>> already have 64b cmpset. The driver will be permanently unplugged >>>>> from >>>>> whatever remains (only 32 bit powerpc I think). >>>>> >>>>> I'll try to sort all this out within the next couple of weeks. >>>>> >>>>> Regards, >>>>> Navdeep >>>>> >>>>>> cheers >>>>>> luigi >>>>>> >>>>>> >>>>>> a) Front load as much work as possible in if_transmit, before >>>>>> any driver >>>>>> lock or software queue has to get involved. >>>>>> >>>>>> b) Replace buf_ring with a brand new mp_ring (multiproducer >>>>>> ring). This >>>>>> is specifically for the tx multiqueue model where one of the >>>>>> if_transmit >>>>>> producer threads becomes the consumer and other producers >>>>>> carry on as >>>>>> usual. mp_ring is implemented as standalone code and it >>>>>> should be >>>>>> possible to use it in any driver with tx multiqueue. It also >>>>>> has: >>>>>> - the ability to enqueue/dequeue multiple items. This might >>>>>> become >>>>>> significant if packet batching is ever implemented. >>>>>> - an abdication mechanism to allow a thread to give up >>>>>> writing tx >>>>>> descriptors and have another if_transmit thread take over. >>>>>> A thread >>>>>> that's writing tx descriptors can end up doing so for an >>>>>> unbounded >>>>>> time period if a) there are other if_transmit threads >>>>>> continuously >>>>>> feeding the sofware queue, and b) the chip keeps up with >>>>>> whatever the >>>>>> thread is throwing at it. >>>>>> - accurate statistics about interesting events even when the >>>>>> stats come >>>>>> at the expense of additional branches/conditional code. >>>>>> >>>>>> The NIC txq lock is uncontested on the fast path at this >>>>>> point. I've >>>>>> left it there for synchronization with the control events >>>>>> (interface >>>>>> up/down, modload/unload). >>>>>> >>>>>> c) Add support for "type 1" coalescing work request in the >>>>>> normal NIC tx >>>>>> path. This work request is optimized for frames with a >>>>>> single >>>>>> item in >>>>>> the DMA gather list. These are very common when forwarding >>>>>> packets. >>>>>> Note that netmap tx in cxgbe already uses these "type 1" work >>>>>> requests. >>>>>> >>>>>> d) Do not request automatic cidx updates every 32 >>>>>> descriptors. Instead, >>>>>> request updates via bits in individual work requests (still >>>>>> every 32 >>>>>> descriptors approximately). Also, request an automatic final >>>>>> update >>>>>> when the queue idles after activity. This means NIC tx >>>>>> reclaim is still >>>>>> performed lazily but it will catch up quickly as soon as the >>>>>> queue >>>>>> idles. This seems to be the best middle ground and I'll >>>>>> probably do >>>>>> something similar for netmap tx as well. >>>>>> >>>>>> e) Implement a faster tx path for WRQs (used by TOE tx and >>>>>> control >>>>>> queues, _not_ by the normal NIC tx). Allow work requests to >>>>>> be written >>>>>> directly to the hardware descriptor ring if room is >>>>>> available. I will >>>>>> convert t4_tom and iw_cxgbe modules to this faster style >>>>>> gradually. >>>>>> >>>>>> MFC after: 2 months >>>>>> >>>>>> Added: >>>>>> head/sys/dev/cxgbe/t4_mp_ring.c (contents, props changed) >>>>>> head/sys/dev/cxgbe/t4_mp_ring.h (contents, props changed) >>>>>> Modified: >>>>>> head/sys/conf/files >>>>>> head/sys/dev/cxgbe/adapter.h >>>>>> head/sys/dev/cxgbe/t4_l2t.c >>>>>> head/sys/dev/cxgbe/t4_main.c >>>>>> head/sys/dev/cxgbe/t4_sge.c >>>>>> head/sys/modules/cxgbe/if_cxgbe/Makefile >>>>>> >>>>>> Modified: head/sys/conf/files >>>>>> >>>>>> =========================================================================== >>>>>> >>>>>> >>>>>> >>>>>> === >>>>>> --- head/sys/conf/files Wed Dec 31 22:52:43 2014 (r276484) >>>>>> +++ head/sys/conf/files Wed Dec 31 23:19:16 2014 (r276485) >>>>>> @@ -1142,6 +1142,8 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p >>>>>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>>>>> dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ >>>>>> compile-with "${NORMAL_C} -I$S/dev/cxgb" >>>>>> +dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ >>>>>> + compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>>>>> dev/cxgbe/t4_main.c optional cxgbe pci \ >>>>>> compile-with "${NORMAL_C} -I$S/dev/cxgbe" >>>>>> dev/cxgbe/t4_netmap.c optional cxgbe pci \ >>>>>> >>>>>> Modified: head/sys/dev/cxgbe/adapter.h >>>>>> >>>>>> =========================================================================== >>>>>> >>>>>> >>>>>> >>>>>> === >>>>>> --- head/sys/dev/cxgbe/adapter.h Wed Dec 31 22:52:43 >>>>>> 2014 >>>>>> (r276484) >>>>>> +++ head/sys/dev/cxgbe/adapter.h Wed Dec 31 23:19:16 >>>>>> 2014 >>>>>> (r276485) >>>>>> @@ -152,7 +152,8 @@ enum { >>>>>> CL_METADATA_SIZE = CACHE_LINE_SIZE, >>>>>> >>>>>> SGE_MAX_WR_NDESC = SGE_MAX_WR_LEN / EQ_ESIZE, /* max WR >>>>>> size in >>>>>> desc */ >>>>>> - TX_SGL_SEGS = 36, >>>>>> + TX_SGL_SEGS = 39, >>>>>> + TX_SGL_SEGS_TSO = 38, >>>>>> TX_WR_FLITS = SGE_MAX_WR_LEN / 8 >>>>>> }; >>>>>> >>>>>> @@ -273,6 +274,7 @@ struct port_info { >>>>>> struct timeval last_refreshed; >>>>>> struct port_stats stats; >>>>>> u_int tnl_cong_drops; >>>>>> + u_int tx_parse_error; >>>>>> >>>>>> eventhandler_tag vlan_c; >>>>>> >>>>>> @@ -308,23 +310,9 @@ struct tx_desc { >>>>>> __be64 flit[8]; >>>>>> }; >>>>>> >>>>>> -struct tx_map { >>>>>> - struct mbuf *m; >>>>>> - bus_dmamap_t map; >>>>>> -}; >>>>>> - >>>>>> -/* DMA maps used for tx */ >>>>>> -struct tx_maps { >>>>>> - struct tx_map *maps; >>>>>> - uint32_t map_total; /* # of DMA maps */ >>>>>> - uint32_t map_pidx; /* next map to be used */ >>>>>> - uint32_t map_cidx; /* reclaimed up to this >>>>>> index */ >>>>>> - uint32_t map_avail; /* # of available maps */ >>>>>> -}; >>>>>> - >>>>>> struct tx_sdesc { >>>>>> + struct mbuf *m; /* m_nextpkt linked chain of >>>>>> frames */ >>>>>> uint8_t desc_used; /* # of hardware descriptors >>>>>> used by the WR >>>>>> */ >>>>>> - uint8_t credits; /* NIC txq: # of frames sent >>>>>> out >>>>>> in the WR >>>>>> */ >>>>>> }; >>>>>> >>>>>> >>>>>> @@ -378,16 +366,12 @@ struct sge_iq { >>>>>> enum { >>>>>> EQ_CTRL = 1, >>>>>> EQ_ETH = 2, >>>>>> -#ifdef TCP_OFFLOAD >>>>>> EQ_OFLD = 3, >>>>>> -#endif >>>>>> >>>>>> /* eq flags */ >>>>>> - EQ_TYPEMASK = 7, /* 3 lsbits hold the >>>>>> type */ >>>>>> - EQ_ALLOCATED = (1 << 3), /* firmware resources >>>>>> allocated */ >>>>>> - EQ_DOOMED = (1 << 4), /* about to be >>>>>> destroyed */ >>>>>> - EQ_CRFLUSHED = (1 << 5), /* expecting an update >>>>>> from SGE */ >>>>>> - EQ_STALLED = (1 << 6), /* out of hw >>>>>> descriptors >>>>>> or dmamaps >>>>>> */ >>>>>> + EQ_TYPEMASK = 0x3, /* 2 lsbits hold the >>>>>> type (see >>>>>> above) */ >>>>>> + EQ_ALLOCATED = (1 << 2), /* firmware resources >>>>>> allocated */ >>>>>> + EQ_ENABLED = (1 << 3), /* open for business */ >>>>>> }; >>>>>> >>>>>> /* Listed in order of preference. Update t4_sysctls too if >>>>>> you >>>>>> change >>>>>> these */ >>>>>> @@ -402,32 +386,25 @@ enum {DOORBELL_UDB, DOORBELL_WCWR, DOORB >>>>>> struct sge_eq { >>>>>> unsigned int flags; /* MUST be first */ >>>>>> unsigned int cntxt_id; /* SGE context id for the eq */ >>>>>> - bus_dma_tag_t desc_tag; >>>>>> - bus_dmamap_t desc_map; >>>>>> - char lockname[16]; >>>>>> struct mtx eq_lock; >>>>>> >>>>>> struct tx_desc *desc; /* KVA of descriptor ring */ >>>>>> - bus_addr_t ba; /* bus address of descriptor >>>>>> ring */ >>>>>> - struct sge_qstat *spg; /* status page, for >>>>>> convenience */ >>>>>> uint16_t doorbells; >>>>>> volatile uint32_t *udb; /* KVA of doorbell (lies within >>>>>> BAR2) */ >>>>>> u_int udb_qid; /* relative qid within the >>>>>> doorbell page */ >>>>>> - uint16_t cap; /* max # of desc, for >>>>>> convenience */ >>>>>> - uint16_t avail; /* available descriptors, for >>>>>> convenience * >>>>>> / >>>>>> - uint16_t qsize; /* size (# of entries) of the >>>>>> queue */ >>>>>> + uint16_t sidx; /* index of the entry with the >>>>>> status page >>>>>> */ >>>>>> uint16_t cidx; /* consumer idx (desc idx) */ >>>>>> uint16_t pidx; /* producer idx (desc idx) */ >>>>>> - uint16_t pending; /* # of descriptors used since >>>>>> last >>>>>> doorbell */ >>>>>> + uint16_t equeqidx; /* EQUEQ last requested at this >>>>>> pidx */ >>>>>> + uint16_t dbidx; /* pidx of the most recent >>>>>> doorbell */ >>>>>> uint16_t iqid; /* iq that gets egr_update for >>>>>> the eq */ >>>>>> uint8_t tx_chan; /* tx channel used by the eq */ >>>>>> - struct task tx_task; >>>>>> - struct callout tx_callout; >>>>>> + volatile u_int equiq; /* EQUIQ outstanding */ >>>>>> >>>>>> - /* stats */ >>>>>> - >>>>>> - uint32_t egr_update; /* # of SGE_EGR_UPDATE >>>>>> notifications for eq >>>>>> */ >>>>>> - uint32_t unstalled; /* recovered from stall */ >>>>>> + bus_dma_tag_t desc_tag; >>>>>> + bus_dmamap_t desc_map; >>>>>> + bus_addr_t ba; /* bus address of descriptor >>>>>> ring */ >>>>>> + char lockname[16]; >>>>>> }; >>>>>> >>>>>> struct sw_zone_info { >>>>>> @@ -499,18 +476,19 @@ struct sge_fl { >>>>>> struct cluster_layout cll_alt; /* alternate refill >>>>>> zone, layout */ >>>>>> }; >>>>>> >>>>>> +struct mp_ring; >>>>>> + >>>>>> /* txq: SGE egress queue + what's needed for Ethernet NIC */ >>>>>> struct sge_txq { >>>>>> struct sge_eq eq; /* MUST be first */ >>>>>> >>>>>> struct ifnet *ifp; /* the interface this txq >>>>>> belongs to */ >>>>>> - bus_dma_tag_t tx_tag; /* tag for transmit buffers */ >>>>>> - struct buf_ring *br; /* tx buffer ring */ >>>>>> + struct mp_ring *r; /* tx software ring */ >>>>>> struct tx_sdesc *sdesc; /* KVA of software descriptor >>>>>> ring */ >>>>>> - struct mbuf *m; /* held up due to temporary >>>>>> resource >>>>>> shortage */ >>>>>> - >>>>>> - struct tx_maps txmaps; >>>>>> + struct sglist *gl; >>>>>> + __be32 cpl_ctrl0; /* for convenience */ >>>>>> >>>>>> + struct task tx_reclaim_task; >>>>>> /* stats for common events first */ >>>>>> >>>>>> uint64_t txcsum; /* # of times hardware assisted >>>>>> with >>>>>> checksum */ >>>>>> @@ -519,13 +497,12 @@ struct sge_txq { >>>>>> uint64_t imm_wrs; /* # of work requests with >>>>>> immediate data * >>>>>> / >>>>>> uint64_t sgl_wrs; /* # of work requests with >>>>>> direct SGL */ >>>>>> uint64_t txpkt_wrs; /* # of txpkt work requests >>>>>> (not >>>>>> coalesced) >>>>>> */ >>>>>> - uint64_t txpkts_wrs; /* # of coalesced tx work >>>>>> requests */ >>>>>> - uint64_t txpkts_pkts; /* # of frames in coalesced tx >>>>>> work >>>>>> requests */ >>>>>> + uint64_t txpkts0_wrs; /* # of type0 coalesced tx work >>>>>> requests */ >>>>>> + uint64_t txpkts1_wrs; /* # of type1 coalesced tx work >>>>>> requests */ >>>>>> + uint64_t txpkts0_pkts; /* # of frames in type0 >>>>>> coalesced tx WRs */ >>>>>> + uint64_t txpkts1_pkts; /* # of frames in type1 >>>>>> coalesced tx WRs */ >>>>>> >>>>>> /* stats for not-that-common events */ >>>>>> - >>>>>> - uint32_t no_dmamap; /* no DMA map to load the >>>>>> mbuf */ >>>>>> - uint32_t no_desc; /* out of hardware >>>>>> descriptors */ >>>>>> } __aligned(CACHE_LINE_SIZE); >>>>>> >>>>>> /* rxq: SGE ingress queue + SGE free list + miscellaneous >>>>>> items */ >>>>>> @@ -574,7 +551,13 @@ struct wrqe { >>>>>> STAILQ_ENTRY(wrqe) link; >>>>>> struct sge_wrq *wrq; >>>>>> int wr_len; >>>>>> - uint64_t wr[] __aligned(16); >>>>>> + char wr[] __aligned(16); >>>>>> +}; >>>>>> + >>>>>> +struct wrq_cookie { >>>>>> + TAILQ_ENTRY(wrq_cookie) link; >>>>>> + int ndesc; >>>>>> + int pidx; >>>>>> }; >>>>>> >>>>>> /* >>>>>> @@ -585,17 +568,32 @@ struct sge_wrq { >>>>>> struct sge_eq eq; /* MUST be first */ >>>>>> >>>>>> struct adapter *adapter; >>>>>> + struct task wrq_tx_task; >>>>>> + >>>>>> + /* Tx desc reserved but WR not "committed" yet. */ >>>>>> + TAILQ_HEAD(wrq_incomplete_wrs , wrq_cookie) >>>>>> incomplete_wrs; >>>>>> >>>>>> - /* List of WRs held up due to lack of tx descriptors */ >>>>>> + /* List of WRs ready to go out as soon as >>>>>> descriptors are >>>>>> available. */ >>>>>> STAILQ_HEAD(, wrqe) wr_list; >>>>>> + u_int nwr_pending; >>>>>> + u_int ndesc_needed; >>>>>> >>>>>> /* stats for common events first */ >>>>>> >>>>>> - uint64_t tx_wrs; /* # of tx work requests */ >>>>>> + uint64_t tx_wrs_direct; /* # of WRs written directly to >>>>>> desc ring. >>>>>> */ >>>>>> + uint64_t tx_wrs_ss; /* # of WRs copied from scratch >>>>>> space. */ >>>>>> + uint64_t tx_wrs_copied; /* # of WRs queued and >>>>>> copied to >>>>>> desc ring. >>>>>> */ >>>>>> >>>>>> /* stats for not-that-common events */ >>>>>> >>>>>> - uint32_t no_desc; /* out of hardware >>>>>> descriptors */ >>>>>> + /* >>>>>> + * Scratch space for work requests that wrap around >>>>>> after reaching >>>>>> the >>>>>> + * status page, and some infomation about the last WR >>>>>> that used it. >>>>>> + */ >>>>>> + uint16_t ss_pidx; >>>>>> + uint16_t ss_len; >>>>>> + uint8_t ss[SGE_MAX_WR_LEN]; >>>>>> + >>>>>> } __aligned(CACHE_LINE_SIZE); >>>>>> >>>>>> >>>>>> @@ -744,7 +742,7 @@ struct adapter { >>>>>> struct sge sge; >>>>>> int lro_timeout; >>>>>> >>>>>> - struct taskqueue *tq[NCHAN]; /* taskqueues that >>>>>> flush >>>>>> data out * >>>>>> / >>>>>> + struct taskqueue *tq[NCHAN]; /* General purpose >>>>>> taskqueues */ >>>>>> struct port_info *port[MAX_NPORTS]; >>>>>> uint8_t chan_map[NCHAN]; >>>>>> >>>>>> @@ -978,12 +976,11 @@ static inline int >>>>>> tx_resume_threshold(struct sge_eq *eq) >>>>>> { >>>>>> >>>>>> - return (eq->qsize / 4); >>>>>> + /* not quite the same as qsize / 4, but this will >>>>>> do. */ >>>>>> + return (eq->sidx / 4); >>>>>> } >>>>>> >>>>>> /* t4_main.c */ >>>>>> -void t4_tx_task(void *, int); >>>>>> -void t4_tx_callout(void *); >>>>>> int t4_os_find_pci_capability(struct adapter *, int); >>>>>> int t4_os_pci_save_state(struct adapter *); >>>>>> int t4_os_pci_restore_state(struct adapter *); >>>>>> @@ -1024,16 +1021,15 @@ int t4_setup_adapter_queues(struct >>>>>> adapt >>>>>> int t4_teardown_adapter_queues(struct adapter *); >>>>>> int t4_setup_port_queues(struct port_info *); >>>>>> int t4_teardown_port_queues(struct port_info *); >>>>>> -int t4_alloc_tx_maps(struct tx_maps *, bus_dma_tag_t, int, >>>>>> int); >>>>>> -void t4_free_tx_maps(struct tx_maps *, bus_dma_tag_t); >>>>>> void t4_intr_all(void *); >>>>>> void t4_intr(void *); >>>>>> void t4_intr_err(void *); >>>>>> void t4_intr_evt(void *); >>>>>> void t4_wrq_tx_locked(struct adapter *, struct sge_wrq *, >>>>>> struct wrqe *); >>>>>> -int t4_eth_tx(struct ifnet *, struct sge_txq *, struct mbuf >>>>>> *); >>>>>> void t4_update_fl_bufsize(struct ifnet *); >>>>>> -int can_resume_tx(struct sge_eq *); >>>>>> +int parse_pkt(struct mbuf **); >>>>>> +void *start_wrq_wr(struct sge_wrq *, int, struct wrq_cookie >>>>>> *); >>>>>> +void commit_wrq_wr(struct sge_wrq *, void *, struct >>>>>> wrq_cookie *); >>>>>> >>>>>> /* t4_tracer.c */ >>>>>> struct t4_tracer; >>>>>> >>>>>> Modified: head/sys/dev/cxgbe/t4_l2t.c >>>>>> >>>>>> =========================================================================== >>>>>> >>>>>> >>>>>> >>>>>> === >>>>>> --- head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 22:52:43 2014 >>>>>> (r276484) >>>>>> +++ head/sys/dev/cxgbe/t4_l2t.c Wed Dec 31 23:19:16 2014 >>>>>> (r276485) >>>>>> @@ -113,16 +113,15 @@ found: >>>>>> int >>>>>> t4_write_l2e(struct adapter *sc, struct l2t_entry *e, int >>>>>> sync) >>>>>> { >>>>>> - struct wrqe *wr; >>>>>> + struct wrq_cookie cookie; >>>>>> struct cpl_l2t_write_req *req; >>>>>> int idx = e->idx + sc->vres.l2t.start; >>>>>> >>>>>> mtx_assert(&e->lock, MA_OWNED); >>>>>> >>>>>> - wr = alloc_wrqe(sizeof(*req), &sc->sge.mgmtq); >>>>>> - if (wr == NULL) >>>>>> + req = start_wrq_wr(&sc->sge.mgmtq, >>>>>> howmany(sizeof(*req), >>>>>> 16), & >>>>>> cookie); >>>>>> + if (req == NULL) >>>>>> return (ENOMEM); >>>>>> - req = wrtod(wr); >>>>>> >>>>>> INIT_TP_WR(req, 0); >>>>>> OPCODE_TID(req) = >>>>>> htonl(MK_OPCODE_TID(CPL_L2T_WRITE_REQ, >>>>>> idx | >>>>>> @@ -132,7 +131,7 @@ t4_write_l2e(struct adapter *sc, struct >>>>>> req->vlan = htons(e->vlan); >>>>>> memcpy(req->dst_mac, e->dmac, sizeof(req->dst_mac)); >>>>>> >>>>>> - t4_wrq_tx(sc, wr); >>>>>> + commit_wrq_wr(&sc->sge.mgmtq, req, &cookie); >>>>>> >>>>>> if (sync && e->state != L2T_STATE_SWITCHING) >>>>>> e->state = L2T_STATE_SYNC_WRITE; >>>>>> >>>>>> Modified: head/sys/dev/cxgbe/t4_main.c >>>>>> >>>>>> =========================================================================== >>>>>> >>>>>> >>>>>> >>>>>> === >>>>>> --- head/sys/dev/cxgbe/t4_main.c Wed Dec 31 22:52:43 >>>>>> 2014 >>>>>> (r276484) >>>>>> +++ head/sys/dev/cxgbe/t4_main.c Wed Dec 31 23:19:16 >>>>>> 2014 >>>>>> (r276485) >>>>>> @@ -66,6 +66,7 @@ __FBSDID("$FreeBSD$"); >>>>>> #include "common/t4_regs_values.h" >>>>>> #include "t4_ioctl.h" >>>>>> #include "t4_l2t.h" >>>>>> +#include "t4_mp_ring.h" >>>>>> >>>>>> /* T4 bus driver interface */ >>>>>> static int t4_probe(device_t); >>>>>> @@ -378,7 +379,8 @@ static void build_medialist(struct port_ >>>>>> static int cxgbe_init_synchronized(struct port_info *); >>>>>> static int cxgbe_uninit_synchronized(struct port_info *); >>>>>> static int setup_intr_handlers(struct adapter *); >>>>>> -static void quiesce_eq(struct adapter *, struct sge_eq *); >>>>>> +static void quiesce_txq(struct adapter *, struct sge_txq *); >>>>>> +static void quiesce_wrq(struct adapter *, struct sge_wrq *); >>>>>> static void quiesce_iq(struct adapter *, struct sge_iq *); >>>>>> static void quiesce_fl(struct adapter *, struct sge_fl *); >>>>>> static int t4_alloc_irq(struct adapter *, struct irq *, int >>>>>> rid, >>>>>> @@ -434,7 +436,6 @@ static int sysctl_tx_rate(SYSCTL_HANDLER >>>>>> static int sysctl_ulprx_la(SYSCTL_HANDLER_ARGS); >>>>>> static int sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS); >>>>>> #endif >>>>>> -static inline void txq_start(struct ifnet *, struct sge_txq >>>>>> *); >>>>>> static uint32_t fconf_to_mode(uint32_t); >>>>>> static uint32_t mode_to_fconf(uint32_t); >>>>>> static uint32_t fspec_to_fconf(struct t4_filter_specification >>>>>> *); >>>>>> @@ -1429,67 +1430,36 @@ cxgbe_transmit(struct ifnet *ifp, >>>>>> struct >>>>>> { >>>>>> struct port_info *pi = ifp->if_softc; >>>>>> struct adapter *sc = pi->adapter; >>>>>> - struct sge_txq *txq = &sc->sge.txq[pi->first_txq]; >>>>>> - struct buf_ring *br; >>>>>> + struct sge_txq *txq; >>>>>> + void *items[1]; >>>>>> int rc; >>>>>> >>>>>> M_ASSERTPKTHDR(m); >>>>>> + MPASS(m->m_nextpkt == NULL); /* not quite ready for >>>>>> this yet */ >>>>>> >>>>>> if (__predict_false(pi->link_cfg.link_ok == 0)) { >>>>>> m_freem(m); >>>>>> return (ENETDOWN); >>>>>> } >>>>>> >>>>>> - /* check if flowid is set */ >>>>>> - if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>>>>> - txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>>>>> rsrv_noflowq)) >>>>>> - + pi->rsrv_noflowq); >>>>>> - br = txq->br; >>>>>> - >>>>>> - if (TXQ_TRYLOCK(txq) == 0) { >>>>>> - struct sge_eq *eq = &txq->eq; >>>>>> - >>>>>> - /* >>>>>> - * It is possible that t4_eth_tx finishes up >>>>>> and >>>>>> releases >>>>>> the >>>>>> - * lock between the TRYLOCK above and the >>>>>> drbr_enqueue >>>>>> here. We >>>>>> - * need to make sure that this mbuf doesn't >>>>>> just >>>>>> sit there >>>>>> in >>>>>> - * the drbr. >>>>>> - */ >>>>>> - >>>>>> - rc = drbr_enqueue(ifp, br, m); >>>>>> - if (rc == 0 && callout_pending(&eq->tx_callout) >>>>>> == 0 && >>>>>> - !(eq->flags & EQ_DOOMED)) >>>>>> - callout_reset(&eq->tx_callout, 1, >>>>>> t4_tx_callout, >>>>>> eq); >>>>>> + rc = parse_pkt(&m); >>>>>> + if (__predict_false(rc != 0)) { >>>>>> + MPASS(m == NULL); /* was >>>>>> freed >>>>>> already */ >>>>>> + atomic_add_int(&pi->tx_parse_error, 1); /* rare, >>>>>> atomic is >>>>>> ok */ >>>>>> return (rc); >>>>>> } >>>>>> >>>>>> - /* >>>>>> - * txq->m is the mbuf that is held up due to a >>>>>> temporary >>>>>> shortage >>>>>> of >>>>>> - * resources and it should be put on the wire first. >>>>>> Then what's >>>>>> in >>>>>> - * drbr and finally the mbuf that was just passed in >>>>>> to us. >>>>>> - * >>>>>> - * Return code should indicate the fate of the mbuf >>>>>> that >>>>>> was passed >>>>>> in >>>>>> - * this time. >>>>>> - */ >>>>>> - >>>>>> - TXQ_LOCK_ASSERT_OWNED(txq); >>>>>> - if (drbr_needs_enqueue(ifp, br) || txq->m) { >>>>>> - >>>>>> - /* Queued for transmission. */ >>>>>> - >>>>>> - rc = drbr_enqueue(ifp, br, m); >>>>>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>>>>> - (void) t4_eth_tx(ifp, txq, m); >>>>>> - TXQ_UNLOCK(txq); >>>>>> - return (rc); >>>>>> - } >>>>>> + /* Select a txq. */ >>>>>> + txq = &sc->sge.txq[pi->first_txq]; >>>>>> + if (M_HASHTYPE_GET(m) != M_HASHTYPE_NONE) >>>>>> + txq += ((m->m_pkthdr.flowid % (pi->ntxq - pi-> >>>>>> rsrv_noflowq)) + >>>>>> + pi->rsrv_noflowq); >>>>>> >>>>>> - /* Direct transmission. */ >>>>>> - rc = t4_eth_tx(ifp, txq, m); >>>>>> - if (rc != 0 && txq->m) >>>>>> - rc = 0; /* held, will be transmitted soon >>>>>> (hopefully) */ >>>>>> + items[0] = m; >>>>>> + rc = mp_ring_enqueue(txq->r, items, 1, 4096); >>>>>> + if (__predict_false(rc != 0)) >>>>>> + m_freem(m); >>>>>> >>>>>> - TXQ_UNLOCK(txq); >>>>>> return (rc); >>>>>> } >>>>>> >>>>>> @@ -1499,17 +1469,17 @@ cxgbe_qflush(struct ifnet *ifp) >>>>>> struct port_info *pi = ifp->if_softc; >>>>>> struct sge_txq *txq; >>>>>> int i; >>>>>> - struct mbuf *m; >>>>>> >>>>>> /* queues do not exist if !PORT_INIT_DONE. */ >>>>>> if (pi->flags & PORT_INIT_DONE) { >>>>>> for_each_txq(pi, i, txq) { >>>>>> TXQ_LOCK(txq); >>>>>> - m_freem(txq->m); >>>>>> - txq->m = NULL; >>>>>> - while ((m = >>>>>> buf_ring_dequeue_sc(txq->br)) != NULL) >>>>>> - m_freem(m); >>>>>> + txq->eq.flags &= ~EQ_ENABLED; >>>>>> TXQ_UNLOCK(txq); >>>>>> + while (!mp_ring_is_idle(txq->r)) { >>>>>> + mp_ring_check_drainage(txq->r, 0); >>>>>> + pause("qflush", 1); >>>>>> + } >>>>>> } >>>>>> } >>>>>> if_qflush(ifp); >>>>>> @@ -1564,7 +1534,7 @@ cxgbe_get_counter(struct ifnet *ifp, ift >>>>>> struct sge_txq *txq; >>>>>> >>>>>> for_each_txq(pi, i, txq) >>>>>> - drops += txq->br->br_drops; >>>>>> + drops += >>>>>> counter_u64_fetch(txq->r->drops); >>>>>> } >>>>>> >>>>>> return (drops); >>>>>> @@ -3236,7 +3206,8 @@ cxgbe_init_synchronized(struct port_info >>>>>> { >>>>>> struct adapter *sc = pi->adapter; >>>>>> struct ifnet *ifp = pi->ifp; >>>>>> - int rc = 0; >>>>>> + int rc = 0, i; >>>>>> + struct sge_txq *txq; >>>>>> >>>>>> ASSERT_SYNCHRONIZED_OP(sc); >>>>>> >>>>>> @@ -3265,6 +3236,17 @@ cxgbe_init_synchronized(struct port_info >>>>>> } >>>>>> >>>>>> /* >>>>>> + * Can't fail from this point onwards. Review >>>>>> cxgbe_uninit_synchronized >>>>>> + * if this changes. >>>>>> + */ >>>>>> + >>>>>> + for_each_txq(pi, i, txq) { >>>>>> + TXQ_LOCK(txq); >>>>>> + txq->eq.flags |= EQ_ENABLED; >>>>>> + TXQ_UNLOCK(txq); >>>>>> + } >>>>>> + >>>>>> + /* >>>>>> * The first iq of the first port to come up is used >>>>>> for >>>>>> tracing. >>>>>> */ >>>>>> if (sc->traceq < 0) { >>>>>> @@ -3297,7 +3279,8 @@ cxgbe_uninit_synchronized(struct port_in >>>>>> { >>>>>> struct adapter *sc = pi->adapter; >>>>>> struct ifnet *ifp = pi->ifp; >>>>>> - int rc; >>>>>> + int rc, i; >>>>>> + struct sge_txq *txq; >>>>>> >>>>>> ASSERT_SYNCHRONIZED_OP(sc); >>>>>> >>>>>> @@ -3314,6 +3297,12 @@ cxgbe_uninit_synchronized(struct port_in >>>>>> return (rc); >>>>>> } >>>>>> >>>>>> + for_each_txq(pi, i, txq) { >>>>>> + TXQ_LOCK(txq); >>>>>> + txq->eq.flags &= ~EQ_ENABLED; >>>>>> + TXQ_UNLOCK(txq); >>>>>> + } >>>>>> + >>>>>> clrbit(&sc->open_device_map, pi->port_id); >>>>>> PORT_LOCK(pi); >>>>>> ifp->if_drv_flags &= ~IFF_DRV_RUNNING; >>>>>> @@ -3543,15 +3532,17 @@ port_full_uninit(struct port_info *pi) >>>>>> >>>>>> if (pi->flags & PORT_INIT_DONE) { >>>>>> >>>>>> - /* Need to quiesce queues. XXX: ctrl >>>>>> queues? */ >>>>>> + /* Need to quiesce queues. */ >>>>>> + >>>>>> + quiesce_wrq(sc, &sc->sge.ctrlq[pi->port_id]); >>>>>> >>>>>> for_each_txq(pi, i, txq) { >>>>>> - quiesce_eq(sc, &txq->eq); >>>>>> + quiesce_txq(sc, txq); >>>>>> } >>>>>> >>>>>> #ifdef TCP_OFFLOAD >>>>>> for_each_ofld_txq(pi, i, ofld_txq) { >>>>>> - quiesce_eq(sc, &ofld_txq->eq); >>>>>> + quiesce_wrq(sc, ofld_txq); >>>>>> } >>>>>> #endif >>>>>> >>>>>> @@ -3576,23 +3567,39 @@ port_full_uninit(struct port_info *pi) >>>>>> } >>>>>> >>>>>> static void >>>>>> -quiesce_eq(struct adapter *sc, struct sge_eq *eq) >>>>>> +quiesce_txq(struct adapter *sc, struct sge_txq *txq) >>>>>> { >>>>>> - EQ_LOCK(eq); >>>>>> - eq->flags |= EQ_DOOMED; >>>>>> + struct sge_eq *eq = &txq->eq; >>>>>> + struct sge_qstat *spg = (void *)&eq->desc[eq->sidx]; >>>>>> >>>>>> - /* >>>>>> - * Wait for the response to a credit flush if one's >>>>>> - * pending. >>>>>> - */ >>>>>> - while (eq->flags & EQ_CRFLUSHED) >>>>>> - mtx_sleep(eq, &eq->eq_lock, 0, "crflush", 0); >>>>>> - EQ_UNLOCK(eq); >>>>>> + (void) sc; /* unused */ >>>>>> >>>>>> - callout_drain(&eq->tx_callout); /* XXX: iffy */ >>>>>> - pause("callout", 10); /* Still iffy */ >>>>>> +#ifdef INVARIANTS >>>>>> + TXQ_LOCK(txq); >>>>>> + MPASS((eq->flags & EQ_ENABLED) == 0); >>>>>> + TXQ_UNLOCK(txq); >>>>>> +#endif >>>>>> >>>>>> - taskqueue_drain(sc->tq[eq->tx_chan], &eq->tx_task); >>>>>> + /* Wait for the mp_ring to empty. */ >>>>>> + while (!mp_ring_is_idle(txq->r)) { >>>>>> + mp_ring_check_drainage(txq->r, 0); >>>>>> + pause("rquiesce", 1); >>>>>> + } >>>>>> + >>>>>> + /* Then wait for the hardware to finish. */ >>>>>> + while (spg->cidx != htobe16(eq->pidx)) >>>>>> + pause("equiesce", 1); >>>>>> + >>>>>> + /* Finally, wait for the driver to reclaim all >>>>>> descriptors. */ >>>>>> + while (eq->cidx != eq->pidx) >>>>>> + pause("dquiesce", 1); >>>>>> +} >>>>>> + >>>>>> +static void >>>>>> +quiesce_wrq(struct adapter *sc, struct sge_wrq *wrq) >>>>>> +{ >>>>>> + >>>>>> + /* XXXTX */ >>>>>> } >>>>>> >>>>>> static void >>>>>> @@ -4892,6 +4899,9 @@ cxgbe_sysctls(struct port_info *pi) >>>>>> oid = SYSCTL_ADD_NODE(ctx, children, OID_AUTO, "stats", >>>>>> CTLFLAG_RD, >>>>>> NULL, "port statistics"); >>>>>> children = SYSCTL_CHILDREN(oid); >>>>>> + SYSCTL_ADD_UINT(ctx, children, OID_AUTO, >>>>>> "tx_parse_error", >>>>>> CTLFLAG_RD, >>>>>> + &pi->tx_parse_error, 0, >>>>>> + "# of tx packets with invalid length or # of >>>>>> segments"); >>>>>> >>>>>> #define SYSCTL_ADD_T4_REG64(pi, name, desc, reg) \ >>>>>> SYSCTL_ADD_OID(ctx, children, OID_AUTO, name, \ >>>>>> @@ -6947,74 +6957,6 @@ sysctl_wcwr_stats(SYSCTL_HANDLER_ARGS) >>>>>> } >>>>>> #endif >>>>>> >>>>>> -static inline void >>>>>> -txq_start(struct ifnet *ifp, struct sge_txq *txq) >>>>>> -{ >>>>>> - struct buf_ring *br; >>>>>> - struct mbuf *m; >>>>>> - >>>>>> - TXQ_LOCK_ASSERT_OWNED(txq); >>>>>> - >>>>>> - br = txq->br; >>>>>> - m = txq->m ? txq->m : drbr_dequeue(ifp, br); >>>>>> - if (m) >>>>>> - t4_eth_tx(ifp, txq, m); >>>>>> -} >>>>>> - >>>>>> -void >>>>>> -t4_tx_callout(void *arg) >>>>>> -{ >>>>>> - struct sge_eq *eq = arg; >>>>>> - struct adapter *sc; >>>>>> - >>>>>> - if (EQ_TRYLOCK(eq) == 0) >>>>>> - goto reschedule; >>>>>> - >>>>>> - if (eq->flags & EQ_STALLED && !can_resume_tx(eq)) { >>>>>> - EQ_UNLOCK(eq); >>>>>> -reschedule: >>>>>> - if (__predict_true(!(eq->flags && EQ_DOOMED))) >>>>>> - callout_schedule(&eq->tx_callout, 1); >>>>>> - return; >>>>>> - } >>>>>> - >>>>>> - EQ_LOCK_ASSERT_OWNED(eq); >>>>>> - >>>>>> - if (__predict_true((eq->flags & EQ_DOOMED) == 0)) { >>>>>> - >>>>>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>>>>> - struct sge_txq *txq = arg; >>>>>> - struct port_info *pi = >>>>>> txq->ifp->if_softc; >>>>>> - >>>>>> - sc = pi->adapter; >>>>>> - } else { >>>>>> - struct sge_wrq *wrq = arg; >>>>>> - >>>>>> - sc = wrq->adapter; >>>>>> - } >>>>>> - >>>>>> - taskqueue_enqueue(sc->tq[eq->tx_chan], >>>>>> &eq->tx_task); >>>>>> - } >>>>>> - >>>>>> - EQ_UNLOCK(eq); >>>>>> -} >>>>>> - >>>>>> -void >>>>>> -t4_tx_task(void *arg, int count) >>>>>> -{ >>>>>> - struct sge_eq *eq = arg; >>>>>> - >>>>>> - EQ_LOCK(eq); >>>>>> - if ((eq->flags & EQ_TYPEMASK) == EQ_ETH) { >>>>>> - struct sge_txq *txq = arg; >>>>>> - txq_start(txq->ifp, txq); >>>>>> - } else { >>>>>> - struct sge_wrq *wrq = arg; >>>>>> - t4_wrq_tx_locked(wrq->adapter, wrq, NULL); >>>>>> - } >>>>>> - EQ_UNLOCK(eq); >>>>>> -} >>>>>> - >>>>>> static uint32_t >>>>>> fconf_to_mode(uint32_t fconf) >>>>>> { >>>>>> @@ -7452,9 +7394,9 @@ static int >>>>>> set_filter_wr(struct adapter *sc, int fidx) >>>>>> { >>>>>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>>>>> - struct wrqe *wr; >>>>>> struct fw_filter_wr *fwr; >>>>>> unsigned int ftid; >>>>>> + struct wrq_cookie cookie; >>>>>> >>>>>> ASSERT_SYNCHRONIZED_OP(sc); >>>>>> >>>>>> @@ -7473,12 +7415,10 @@ set_filter_wr(struct adapter *sc, >>>>>> int fi >>>>>> >>>>>> ftid = sc->tids.ftid_base + fidx; >>>>>> >>>>>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>>>>> - if (wr == NULL) >>>>>> + fwr = start_wrq_wr(&sc->sge.mgmtq, >>>>>> howmany(sizeof(*fwr), >>>>>> 16), & >>>>>> cookie); >>>>>> + if (fwr == NULL) >>>>>> return (ENOMEM); >>>>>> - >>>>>> - fwr = wrtod(wr); >>>>>> - bzero(fwr, sizeof (*fwr)); >>>>>> + bzero(fwr, sizeof(*fwr)); >>>>>> >>>>>> fwr->op_pkd = htobe32(V_FW_WR_OP(FW_FILTER_WR)); >>>>>> fwr->len16_pkd = htobe32(FW_LEN16(*fwr)); >>>>>> @@ -7547,7 +7487,7 @@ set_filter_wr(struct adapter *sc, int fi >>>>>> f->pending = 1; >>>>>> sc->tids.ftids_in_use++; >>>>>> >>>>>> - t4_wrq_tx(sc, wr); >>>>>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>>>>> return (0); >>>>>> } >>>>>> >>>>>> @@ -7555,22 +7495,21 @@ static int >>>>>> del_filter_wr(struct adapter *sc, int fidx) >>>>>> { >>>>>> struct filter_entry *f = &sc->tids.ftid_tab[fidx]; >>>>>> - struct wrqe *wr; >>>>>> struct fw_filter_wr *fwr; >>>>>> unsigned int ftid; >>>>>> + struct wrq_cookie cookie; >>>>>> >>>>>> ftid = sc->tids.ftid_base + fidx; >>>>>> >>>>>> - wr = alloc_wrqe(sizeof(*fwr), &sc->sge.mgmtq); >>>>>> - if (wr == NULL) >>>>>> + fwr = start_wrq_wr(&sc->sge.mgmtq, >>>>>> howmany(sizeof(*fwr), >>>>>> 16), & >>>>>> cookie); >>>>>> + if (fwr == NULL) >>>>>> return (ENOMEM); >>>>>> - fwr = wrtod(wr); >>>>>> bzero(fwr, sizeof (*fwr)); >>>>>> >>>>>> t4_mk_filtdelwr(ftid, fwr, sc->sge.fwq.abs_id); >>>>>> >>>>>> f->pending = 1; >>>>>> - t4_wrq_tx(sc, wr); >>>>>> + commit_wrq_wr(&sc->sge.mgmtq, fwr, &cookie); >>>>>> return (0); >>>>>> } >>>>>> >>>>>> @@ -8170,6 +8109,7 @@ t4_ioctl(struct cdev *dev, unsigned long >>>>>> >>>>>> /* MAC stats */ >>>>>> t4_clr_port_stats(sc, pi->tx_chan); >>>>>> + pi->tx_parse_error = 0; >>>>>> >>>>>> if (pi->flags & PORT_INIT_DONE) { >>>>>> struct sge_rxq *rxq; >>>>>> @@ -8192,24 +8132,24 @@ t4_ioctl(struct cdev *dev, unsigned >>>>>> long >>>>>> txq->imm_wrs = 0; >>>>>> txq->sgl_wrs = 0; >>>>>> txq->txpkt_wrs = 0; >>>>>> - txq->txpkts_wrs = 0; >>>>>> - txq->txpkts_pkts = 0; >>>>>> - txq->br->br_drops = 0; >>>>>> - txq->no_dmamap = 0; >>>>>> - txq->no_desc = 0; >>>>>> + txq->txpkts0_wrs = 0; >>>>>> + txq->txpkts1_wrs = 0; >>>>>> + txq->txpkts0_pkts = 0; >>>>>> + txq->txpkts1_pkts = 0; >>>>>> + mp_ring_reset_stats(txq->r); >>>>>> } >>>>>> >>>>>> #ifdef TCP_OFFLOAD >>>>>> /* nothing to clear for each >>>>>> ofld_rxq */ >>>>>> >>>>>> for_each_ofld_txq(pi, i, wrq) { >>>>>> - wrq->tx_wrs = 0; >>>>>> - wrq->no_desc = 0; >>>>>> + wrq->tx_wrs_direct = 0; >>>>>> + wrq->tx_wrs_copied = 0; >>>>>> } >>>>>> #endif >>>>>> wrq = &sc->sge.ctrlq[pi->port_id]; >>>>>> - wrq->tx_wrs = 0; >>>>>> - wrq->no_desc = 0; >>>>>> + wrq->tx_wrs_direct = 0; >>>>>> + wrq->tx_wrs_copied = 0; >>>>>> } >>>>>> break; >>>>>> } >>>>>> >>>>>> Added: head/sys/dev/cxgbe/t4_mp_ring.c >>>>>> >>>>>> =========================================================================== >>>>>> >>>>>> >>>>>> >>>>>> === >>>>>> --- /dev/null 00:00:00 1970 (empty, because file is newly >>>>>> added) >>>>>> +++ head/sys/dev/cxgbe/t4_mp_ring.c Wed Dec 31 23:19:16 >>>>>> 2014 >>>>>> (r276485) >>>>>> @@ -0,0 +1,364 @@ >>>>>> +/*- >>>>>> + * Copyright (c) 2014 Chelsio Communications, Inc. >>>>>> + * All rights reserved. >>>>>> + * Written by: Navdeep Parhar >>>>>> + * >>>>>> + * Redistribution and use in source and binary forms, with or >>>>>> without >>>>>> + * modification, are permitted provided that the following >>>>>> conditions >>>>>> + * are met: >>>>>> + * 1. Redistributions of source code must retain the above >>>>>> copyright >>>>>> + * notice, this list of conditions and the following >>>>>> disclaimer. >>>>>> + * 2. Redistributions in binary form must reproduce the above >>>>>> copyright >>>>>> + * notice, this list of conditions and the following >>>>>> disclaimer in the >>>>>> + * documentation and/or other materials provided with the >>>>>> distribution. >>>>>> + * >>>>>> + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS >>>>>> ``AS IS'' AND >>>>>> + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT >>>>>> LIMITED TO, THE >>>>>> + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A >>>>>> PARTICULAR >>>>>> PURPOSE >>>>>> + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR >>>>>> CONTRIBUTORS BE LIABLE >>>>>> + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, >>>>>> EXEMPLARY, OR >>>>>> CONSEQUENTIAL >>>>>> + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF >>>>>> SUBSTITUTE GOODS >>>>>> + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS >>>>>> INTERRUPTION) >>>>>> + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN >>>>>> CONTRACT, >>>>>> STRICT >>>>>> + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) >>>>>> ARISING IN ANY >>>>>> WAY >>>>>> + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE >>>>>> POSSIBILITY OF >>>>>> + * SUCH DAMAGE. >>>>>> + */ >>>>>> + >>>>>> +#include >>>>>> +__FBSDID("$FreeBSD$"); >>>>>> + >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> +#include >>>>>> + >>>>>> +#include "t4_mp_ring.h" >>>>>> + >>>>>> +union ring_state { >>>>>> + struct { >>>>>> + uint16_t pidx_head; >>>>>> + uint16_t pidx_tail; >>>>>> + uint16_t cidx; >>>>>> + uint16_t flags; >>>>>> + }; >>>>>> + uint64_t state; >>>>>> +}; >>>>>> + >>>>>> +enum { >>>>>> + IDLE = 0, /* consumer ran to completion, nothing >>>>>> more to do. >>>>>> */ >>>>>> + BUSY, /* consumer is running already, or will >>>>>> be shortly. >>>>>> */ >>>>>> + STALLED, /* consumer stopped due to lack of >>>>>> resources. */ >>>>>> + ABDICATED, /* consumer stopped even though there >>>>>> was work to >>>>>> be >>>>>> + done because it wants another thread >>>>>> to take >>>>>> over. */ >>>>>> +}; >>>>>> + >>>>>> +static inline uint16_t >>>>>> +space_available(struct mp_ring *r, union ring_state s) >>>>>> +{ >>>>>> + uint16_t x = r->size - 1; >>>>>> + >>>>>> + if (s.cidx == s.pidx_head) >>>>>> + return (x); >>>>>> + else if (s.cidx > s.pidx_head) >>>>>> + return (s.cidx - s.pidx_head - 1); >>>>>> + else >>>>>> + return (x - s.pidx_head + s.cidx); >>>>>> +} >>>>>> + >>>>>> +static inline uint16_t >>>>>> +increment_idx(struct mp_ring *r, uint16_t idx, uint16_t n) >>>>>> +{ >>>>>> + int x = r->size - idx; >>>>>> + >>>>>> + MPASS(x > 0); >>>>>> + return (x > n ? idx + n : n - x); >>>>>> +} >>>>>> + >>>>>> +/* Consumer is about to update the ring's state to s */ >>>>>> +static inline uint16_t >>>>>> +state_to_flags(union ring_state s, int abdicate) >>>>>> +{ >>>>>> + >>>>>> + if (s.cidx == s.pidx_tail) >>>>>> + return (IDLE); >>>>>> + else if (abdicate && s.pidx_tail != s.pidx_head) >>>>>> + return (ABDICATED); >>>>>> + >>>>>> + return (BUSY); >>>>>> +} >>>>>> + >>>>>> +/* >>>>>> + * Caller passes in a state, with a guarantee that there is >>>>>> work to do and >>>>>> that >>>>>> + * all items up to the pidx_tail in the state are visible. >>>>>> + */ >>>>>> +static void >>>>>> +drain_ring(struct mp_ring *r, union ring_state os, uint16_t >>>>>> prev, int >>>>>> budget) >>>>>> +{ >>>>>> + union ring_state ns; >>>>>> + int n, pending, total; >>>>>> + uint16_t cidx = os.cidx; >>>>>> + uint16_t pidx = os.pidx_tail; >>>>>> + >>>>>> + MPASS(os.flags == BUSY); >>>>>> + MPASS(cidx != pidx); >>>>>> + >>>>>> + if (prev == IDLE) >>>>>> + counter_u64_add(r->starts, 1); >>>>>> + pending = 0; >>>>>> + total = 0; >>>>>> + >>>>>> + while (cidx != pidx) { >>>>>> + >>>>>> + /* Items from cidx to pidx are available for >>>>>> consumption. * >>>>>> / >>>>>> + n = r->drain(r, cidx, pidx); >>>>>> + if (n == 0) { >>>>>> + critical_enter(); >>>>>> + do { >>>>>> + os.state = ns.state = r->state; >>>>>> + ns.cidx = cidx; >>>>>> + ns.flags = STALLED; >>>>>> + } while (atomic_cmpset_64(&r->state, >>>>>> os.state, >>>>>> + ns.state) == 0); >>>>>> + critical_exit(); >>>>>> + if (prev != STALLED) >>>>>> + counter_u64_add(r->stalls, 1); >>>>>> + else if (total > 0) { >>>>>> + counter_u64_add(r->restarts, 1); >>>>>> + counter_u64_add(r->stalls, 1); >>>>>> + } >>>>>> + break; >>>>>> + } >>>>>> + cidx = increment_idx(r, cidx, n); >>>>>> + pending += n; >>>>>> + total += n; >>>>>> + >>>>>> + /* >>>>>> + * We update the cidx only if we've caught up >>>>>> with the >>>>>> pidx, the >>>>>> + * real cidx is getting too far ahead of the >>>>>> one >>>>>> visible to >>>>>> + * everyone else, or we have exceeded our >>>>>> budget. >>>>>> + */ >>>>>> + if (cidx != pidx && pending < 64 && total < >>>>>> budget) >>>>>> + continue; >>>>>> + critical_enter(); >>>>>> + do { >>>>>> + os.state = ns.state = r->state; >>>>>> + ns.cidx = cidx; >>>>>> + ns.flags = state_to_flags(ns, total >= >>>>>> budget); >>>>>> + } while (atomic_cmpset_acq_64(&r->state, >>>>>> os.state, >>>>>> ns.state) == 0); >>>>>> + critical_exit(); >>>>>> + >>>>>> + if (ns.flags == ABDICATED) >>>>>> + counter_u64_add(r->abdications, 1); >>>>>> + if (ns.flags != BUSY) { >>>>>> + /* Wrong loop exit if we're going to >>>>>> stall. */ >>>>>> + MPASS(ns.flags != STALLED); >>>>>> + if (prev == STALLED) { >>>>>> + MPASS(total > 0); >>>>>> + counter_u64_add(r->restarts, 1); >>>>>> + } >>>>>> + break; >>>>>> + } >>>>>> + >>>>>> + /* >>>>>> + * The acquire style atomic above guarantees >>>>>> visibility of >>>>>> items >>>>>> + * associated with any pidx change that we >>>>>> notice here. >>>>>> + */ >>>>>> + pidx = ns.pidx_tail; >>>>>> + pending = 0; >>>>>> + } >>>>>> +} >>>>>> + >>>>>> +int >>>>>> +mp_ring_alloc(struct mp_ring **pr, int size, void *cookie, >>>>>> ring_drain_t >>>>>> drain, >>>>>> + ring_can_drain_t can_drain, struct malloc_type *mt, int >>>>>> flags) >>>>>> +{ >>>>>> + struct mp_ring *r; >>>>>> + >>>>>> + /* All idx are 16b so size can be 65536 at most */ >>>>>> + if (pr == NULL || size < 2 || size > 65536 || drain == >>>>>> NULL || >>>>>> + can_drain == NULL) >>>>>> + return (EINVAL); >>>>>> + *pr = NULL; >>>>>> + flags &= M_NOWAIT | M_WAITOK; >>>>>> + MPASS(flags != 0); >>>>>> + >>>>>> + r = malloc(__offsetof(struct mp_ring, items[size]), mt, >>>>>> flags | >>>>>> M_ZERO); >>>>>> + if (r == NULL) >>>>>> + return (ENOMEM); >>>>>> + r->size = size; >>>>>> + r->cookie = cookie; >>>>>> + r->mt = mt; >>>>>> + r->drain = drain; >>>>>> + r->can_drain = can_drain; >>>>>> + r->enqueues = counter_u64_alloc(flags); >>>>>> + r->drops = counter_u64_alloc(flags); >>>>>> + r->starts = counter_u64_alloc(flags); >>>>>> + r->stalls = counter_u64_alloc(flags); >>>>>> + r->restarts = counter_u64_alloc(flags); >>>>>> + r->abdications = counter_u64_alloc(flags); >>>>>> + if (r->enqueues == NULL || r->drops == NULL || >>>>>> r->starts >>>>>> == NULL || >>>>>> + r->stalls == NULL || r->restarts == NULL || >>>>>> + r->abdications == NULL) { >>>>>> + mp_ring_free(r); >>>>>> + return (ENOMEM); >>>>>> + } >>>>>> + >>>>>> + *pr = r; >>>>>> + return (0); >>>>>> +} >>>>>> + >>>>>> +void >>>>>> + >>>>>> +mp_ring_free(struct mp_ring *r) >>>>>> +{ >>>>>> + >>>>>> + if (r == NULL) >>>>>> + return; >>>>>> + >>>>>> + if (r->enqueues != NULL) >>>>>> + counter_u64_free(r->enqueues); >>>>>> + if (r->drops != NULL) >>>>>> + counter_u64_free(r->drops); >>>>>> + if (r->starts != NULL) >>>>>> + counter_u64_free(r->starts); >>>>>> + if (r->stalls != NULL) >>>>>> + counter_u64_free(r->stalls); >>>>>> + if (r->restarts != NULL) >>>>>> + counter_u64_free(r->restarts); >>>>>> + if (r->abdications != NULL) >>>>>> + counter_u64_free(r->abdications); >>>>>> + >>>>>> + free(r, r->mt); >>>>>> +} >>>>>> + >>>>>> +/* >>>>>> + * Enqueue n items and maybe drain the ring for some time. >>>>>> + * >>>>>> + * Returns an errno. >>>>>> + */ >>>>>> +int >>>>>> +mp_ring_enqueue(struct mp_ring *r, void **items, int n, int >>>>>> budget) >>>>>> +{ >>>>>> + union ring_state os, ns; >>>>>> + uint16_t pidx_start, pidx_stop; >>>>>> + int i; >>>>>> + >>>>>> + MPASS(items != NULL); >>>>>> + MPASS(n > 0); >>>>>> + >>>>>> >>>>>> *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> -- >>>>>> -----------------------------------------+------------------------------- >>>>>> >>>>>> >>>>>> >>>>>> Prof. Luigi RIZZO, rizzo@iet.unipi.it . Dip. di Ing. >>>>>> dell'Informazione >>>>>> http://www.iet.unipi.it/~luigi/ . Universita` di Pisa >>>>>> TEL +39-050-2211611 . via Diotisalvi 2 >>>>>> Mobile +39-338-6809875 . 56122 PISA (Italy) >>>>>> -----------------------------------------+------------------------------- >>>>>> >>>>>> >>>>>> >>>> >>> >>> >> > From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 01:40:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AA725652; Wed, 21 Jan 2015 01:40:35 +0000 (UTC) Received: from mail-pa0-x22c.google.com (mail-pa0-x22c.google.com [IPv6:2607:f8b0:400e:c03::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 70898C79; Wed, 21 Jan 2015 01:40:35 +0000 (UTC) Received: by mail-pa0-f44.google.com with SMTP id et14so49421402pad.3; Tue, 20 Jan 2015 17:40:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=5V4pju5HMDwceqK8mTnCRm/8Rs9Ikk6h35jnz5pcPVQ=; b=jREJ26/ITR+bumrzafvnLyFWn/lp5Jn/VC/StUy7gPJpkWJEP/yp6ZgbjrDkZcTYF9 rVzv0p0NUtpYQrLRBdeMB9lSYPawKXF24ibPPM4Ezhd3e1Ml+e2Rnp2ikKnfdfmlrANT c2t2fUlGCNlCEcdGp3V8pUBeb29dARxKW6YARw2QpVt9xi6hvpj7AbfFxNnm5jzjWSbU xGMXUGO0NxhakU/emNAUWRzY7SnurK31ovpt+v0i40lhaXUaT0f1a/+GGCCVRxK3ZdAx uXjXM4ParzleOVbvJZAw9cDTiH6pg/A7tfA1cT3nVJpedQay6jFkXYd0BwMlL3tXBKPM DTPA== X-Received: by 10.70.32.195 with SMTP id l3mr34110118pdi.41.1421804434933; Tue, 20 Jan 2015 17:40:34 -0800 (PST) Received: from [10.192.166.0] (stargate.chelsio.com. [67.207.112.58]) by mx.google.com with ESMTPSA id cc3sm1215990pdb.67.2015.01.20.17.40.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 20 Jan 2015 17:40:33 -0800 (PST) Sender: Navdeep Parhar Message-ID: <54BF0390.8070003@FreeBSD.org> Date: Tue, 20 Jan 2015 17:40:32 -0800 From: Navdeep Parhar User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Pedro Giffuni , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <54BEFB79.6090806@FreeBSD.org> <54BF01F2.4030502@FreeBSD.org> In-Reply-To: <54BF01F2.4030502@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 01:40:35 -0000 On 01/20/15 17:33, Pedro Giffuni wrote: > > On 01/20/15 20:06, Navdeep Parhar wrote: >> On 01/20/15 16:50, Pedro Giffuni wrote: >>> >>> On 01/20/15 18:21, Navdeep Parhar wrote: >>>> The problem reported by Luigi has been fixed in r277225 already. >>>> >>>> Regards, >>>> Navdeep >>>> >>> >>> But the fix is rather ugly, isn't it? I would personally prefer to just >>> kill the older >>> gcc but in the meantime updating it so that it behaves like the updated >>> gcc/clang would be better. IMHO. >> >> I'm not sure why you think the fix is ugly. Modifying the base >> compiler to deal with minor stuff like this seems excessive and I >> never even considered that. >> > > "Modifying the base compiler to deal with minor stuff like this" is > actually called > "an update" since upstream already did it: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10676 > > You could also call it "making it more compatible with clang and newer gcc" > > The base compiler is ugly as it can be but that's upstream's fault, not > the fault > those of us that were once condemned to add bandaids. Happily I am not > planning to touch it anymore ;). I'm not planning to touch it at all, and I'm happy too :-) Regards, Navdeep > > Pedro. > > >> Regards, >> Navdeep >> >>> >>> Pedro. >>> >>>> On 01/20/15 15:10, Pedro Giffuni wrote: >>>>> Hi; >>>>> >>>>> I got this patch from the OpenBSD-tech list[1]. >>>>> Perhaps this fixes the gcc issue? >>>>> >>>>> Apparently it's required for mesa too. >>>>> >>>>> Pedro. >>>>> >>>>> [1] http://article.gmane.org/gmane.os.openbsd.tech/40604 >>>>> From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 02:19:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id F3C60D4C; Wed, 21 Jan 2015 02:19:05 +0000 (UTC) Date: Wed, 21 Jan 2015 02:19:05 +0000 From: Alexey Dokuchaev To: Pedro Giffuni Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121021905.GA73548@FreeBSD.org> References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BEF7CF.9030505@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Luigi Rizzo , Navdeep Parhar X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 02:19:06 -0000 On Tue, Jan 20, 2015 at 07:50:23PM -0500, Pedro Giffuni wrote: > But the fix is rather ugly, isn't it? I would personally prefer to just > kill the older gcc but in the meantime updating it so that it behaves > like the updated gcc/clang would be better. IMHO. Seconded. Putting extra harness on the code to avoid bugs in the compiler that were actually fixed upsteam is totally bogus. ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 02:35:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 540E4FDB; Wed, 21 Jan 2015 02:35:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3532E1FA; Wed, 21 Jan 2015 02:35:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L2Z53H092389; Wed, 21 Jan 2015 02:35:05 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L2Z5rI092388; Wed, 21 Jan 2015 02:35:05 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210235.t0L2Z5rI092388@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 02:35:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277465 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 02:35:05 -0000 Author: ian Date: Wed Jan 21 02:35:04 2015 New Revision: 277465 URL: https://svnweb.freebsd.org/changeset/base/277465 Log: Use the explicit member initializer style to init the bus_space struct. Fill in some formerly NULL members where the implementation function exists. Add a dummy function that panics and use it as a placeholder for thigns that are still unimplemented. Remove a few unused includes. Modified: head/sys/arm/arm/bus_space-v6.c Modified: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Wed Jan 21 01:12:21 2015 (r277464) +++ head/sys/arm/arm/bus_space-v6.c Wed Jan 21 02:35:04 2015 (r277465) @@ -34,125 +34,130 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include /* Prototypes for all the bus_space structure functions */ bs_protos(generic); bs_protos(generic_armv4); +static void +bs_unimplemented(void) +{ + + panic("unimplemented bus_space function called"); +} + +#define BS_UNIMPLEMENTED (void *)bs_unimplemented + /* * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. */ static struct bus_space _base_tag = { - /* cookie */ - (void *) 0, + /* privdata is whatever the implementer wants; unused in base tag */ + .bs_privdata = NULL, /* mapping/unmapping */ - generic_bs_map, - generic_bs_unmap, - generic_bs_subregion, + .bs_map = generic_bs_map, + .bs_unmap = generic_bs_unmap, + .bs_subregion = generic_bs_subregion, /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - generic_bs_barrier, + .bs_barrier = generic_bs_barrier, /* read (single) */ - NULL, /* bs_r_1, Use inline code in bus.h */ - NULL, /* bs_r_2, Use inline code in bus.h */ - NULL, /* bs_r_4, Use inline code in bus.h */ - NULL, /* bs_r_8, Use inline code in bus.h */ + .bs_r_1 = NULL, /* Use inline code in bus.h */ + .bs_r_2 = NULL, /* Use inline code in bus.h */ + .bs_r_4 = NULL, /* Use inline code in bus.h */ + .bs_r_8 = NULL, /* Use inline code in bus.h */ /* read multiple */ - generic_bs_rm_1, - generic_armv4_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_armv4_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = BS_UNIMPLEMENTED, /* read region */ - generic_bs_rr_1, - generic_armv4_bs_rr_2, - generic_bs_rr_4, - NULL, + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_armv4_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = BS_UNIMPLEMENTED, /* write (single) */ - NULL, /* bs_w_1, Use inline code in bus.h */ - NULL, /* bs_w_2, Use inline code in bus.h */ - NULL, /* bs_w_4, Use inline code in bus.h */ - NULL, /* bs_w_8, Use inline code in bus.h */ + .bs_w_1 = NULL, /* Use inline code in bus.h */ + .bs_w_2 = NULL, /* Use inline code in bus.h */ + .bs_w_4 = NULL, /* Use inline code in bus.h */ + .bs_w_8 = NULL, /* Use inline code in bus.h */ /* write multiple */ - generic_bs_wm_1, - generic_armv4_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_armv4_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = BS_UNIMPLEMENTED, /* write region */ - generic_bs_wr_1, - generic_armv4_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_armv4_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = BS_UNIMPLEMENTED, /* set multiple */ - NULL, - NULL, - NULL, - NULL, + .bs_sm_1 = BS_UNIMPLEMENTED, + .bs_sm_2 = BS_UNIMPLEMENTED, + .bs_sm_4 = BS_UNIMPLEMENTED, + .bs_sm_8 = BS_UNIMPLEMENTED, /* set region */ - generic_bs_sr_1, - generic_armv4_bs_sr_2, - generic_bs_sr_4, - NULL, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_armv4_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = BS_UNIMPLEMENTED, /* copy */ - NULL, - generic_armv4_bs_c_2, - NULL, - NULL, + .bs_c_1 = BS_UNIMPLEMENTED, + .bs_c_2 = generic_armv4_bs_c_2, + .bs_c_4 = BS_UNIMPLEMENTED, + .bs_c_8 = BS_UNIMPLEMENTED, /* read stream (single) */ - NULL, /* bs_r_1_s, Use inline code in bus.h */ - NULL, /* bs_r_2_s, Use inline code in bus.h */ - NULL, /* bs_r_4_s, Use inline code in bus.h */ - NULL, /* bs_r_8_s, Use inline code in bus.h */ + .bs_r_1_s = NULL, /* Use inline code in bus.h */ + .bs_r_2_s = NULL, /* Use inline code in bus.h */ + .bs_r_4_s = NULL, /* Use inline code in bus.h */ + .bs_r_8_s = NULL, /* Use inline code in bus.h */ /* read multiple stream */ - NULL, - generic_armv4_bs_rm_2, /* bus_space_read_multi_stream_2 */ - NULL, - NULL, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_armv4_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = BS_UNIMPLEMENTED, /* read region stream */ - NULL, - NULL, - NULL, - NULL, + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = BS_UNIMPLEMENTED, /* write stream (single) */ - NULL, /* bs_w_1_s, Use inline code in bus.h */ - NULL, /* bs_w_2_s, Use inline code in bus.h */ - NULL, /* bs_w_4_s, Use inline code in bus.h */ - NULL, /* bs_w_8_s, Use inline code in bus.h */ + .bs_w_1_s = NULL, /* Use inline code in bus.h */ + .bs_w_2_s = NULL, /* Use inline code in bus.h */ + .bs_w_4_s = NULL, /* Use inline code in bus.h */ + .bs_w_8_s = NULL, /* Use inline code in bus.h */ /* write multiple stream */ - NULL, - generic_armv4_bs_wm_2, /* bus_space_write_multi_stream_2 */ - NULL, - NULL, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_armv4_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = BS_UNIMPLEMENTED, /* write region stream */ - NULL, - NULL, - NULL, - NULL + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_4, + .bs_wr_4_s = generic_bs_wr_8, + .bs_wr_8_s = BS_UNIMPLEMENTED, }; bus_space_tag_t fdtbus_bs_tag = &_base_tag; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 02:49:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E91B16BA; Wed, 21 Jan 2015 02:49:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BBD5A35D; Wed, 21 Jan 2015 02:49:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L2nKU4097612; Wed, 21 Jan 2015 02:49:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L2nKlL097609; Wed, 21 Jan 2015 02:49:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210249.t0L2nKlL097609@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 02:49:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277466 - in head/sys/arm: arm lpc xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 02:49:21 -0000 Author: ian Date: Wed Jan 21 02:49:19 2015 New Revision: 277466 URL: https://svnweb.freebsd.org/changeset/base/277466 Log: Use arm/bus_space-v6.c for all armv6 systems, the essentially identical files for lpc and xilinx aren't needed. Also, fix a couple paste-os. Deleted: head/sys/arm/lpc/lpc_space.c head/sys/arm/xilinx/zy7_bus_space.c Modified: head/sys/arm/arm/bus_space-v6.c head/sys/arm/lpc/files.lpc head/sys/arm/xilinx/files.zynq7 Modified: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Wed Jan 21 02:35:04 2015 (r277465) +++ head/sys/arm/arm/bus_space-v6.c Wed Jan 21 02:49:19 2015 (r277466) @@ -137,7 +137,7 @@ static struct bus_space _base_tag = { /* read region stream */ .bs_rr_1_s = generic_bs_rr_1, - .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_2_s = generic_armv4_bs_rr_2, .bs_rr_4_s = generic_bs_rr_4, .bs_rr_8_s = BS_UNIMPLEMENTED, @@ -155,8 +155,8 @@ static struct bus_space _base_tag = { /* write region stream */ .bs_wr_1_s = generic_bs_wr_1, - .bs_wr_2_s = generic_bs_wr_4, - .bs_wr_4_s = generic_bs_wr_8, + .bs_wr_2_s = generic_armv4_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, .bs_wr_8_s = BS_UNIMPLEMENTED, }; Modified: head/sys/arm/lpc/files.lpc ============================================================================== --- head/sys/arm/lpc/files.lpc Wed Jan 21 02:35:04 2015 (r277465) +++ head/sys/arm/lpc/files.lpc Wed Jan 21 02:49:19 2015 (r277466) @@ -1,9 +1,9 @@ # $FreeBSD$ +arm/arm/bus_space-v6.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard arm/arm/cpufunc_asm_armv5.S standard arm/lpc/lpc_machdep.c standard -arm/lpc/lpc_space.c standard arm/lpc/lpc_pwr.c standard arm/lpc/lpc_intc.c standard arm/lpc/lpc_timer.c standard Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Wed Jan 21 02:35:04 2015 (r277465) +++ head/sys/arm/xilinx/files.zynq7 Wed Jan 21 02:49:19 2015 (r277466) @@ -5,6 +5,7 @@ kern/kern_clocksource.c standard +arm/arm/bus_space-v6.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_armv5.S standard @@ -18,7 +19,6 @@ arm/arm/pl310.c standard arm/xilinx/zy7_machdep.c standard arm/xilinx/zy7_l2cache.c standard -arm/xilinx/zy7_bus_space.c standard arm/xilinx/zy7_slcr.c standard arm/xilinx/zy7_devcfg.c standard arm/xilinx/zy7_mp.c optional smp From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 02:56:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1618889C; Wed, 21 Jan 2015 02:56:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0102760B; Wed, 21 Jan 2015 02:56:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L2uH6A002089; Wed, 21 Jan 2015 02:56:17 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L2uEOU002068; Wed, 21 Jan 2015 02:56:14 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210256.t0L2uEOU002068@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 02:56:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277467 - in head/sys/arm: arm at91 cavium/cns11xx mv samsung/s3c2xx0 versatile xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 02:56:18 -0000 Author: ian Date: Wed Jan 21 02:56:13 2015 New Revision: 277467 URL: https://svnweb.freebsd.org/changeset/base/277467 Log: For some reason, all the arm bus_space functions that work with uint16 values have armv4 in the name. There's nothing armv4-special about them, so just use the same sort of names as all the other functions. Modified: head/sys/arm/arm/bus_space-v6.c head/sys/arm/arm/bus_space_asm_generic.S head/sys/arm/at91/at91.c head/sys/arm/cavium/cns11xx/econa.c head/sys/arm/mv/bus_space.c head/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c head/sys/arm/versatile/bus_space.c head/sys/arm/versatile/versatile_pci_bus_space.c head/sys/arm/xscale/i80321/i80321_space.c head/sys/arm/xscale/i80321/obio_space.c head/sys/arm/xscale/i8134x/i81342_space.c head/sys/arm/xscale/i8134x/obio_space.c head/sys/arm/xscale/ixp425/ixp425_a4x_space.c head/sys/arm/xscale/ixp425/ixp425_space.c head/sys/arm/xscale/pxa/pxa_space.c Modified: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/arm/bus_space-v6.c Wed Jan 21 02:56:13 2015 (r277467) @@ -38,7 +38,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); static void bs_unimplemented(void) @@ -77,13 +76,13 @@ static struct bus_space _base_tag = { /* read multiple */ .bs_rm_1 = generic_bs_rm_1, - .bs_rm_2 = generic_armv4_bs_rm_2, + .bs_rm_2 = generic_bs_rm_2, .bs_rm_4 = generic_bs_rm_4, .bs_rm_8 = BS_UNIMPLEMENTED, /* read region */ .bs_rr_1 = generic_bs_rr_1, - .bs_rr_2 = generic_armv4_bs_rr_2, + .bs_rr_2 = generic_bs_rr_2, .bs_rr_4 = generic_bs_rr_4, .bs_rr_8 = BS_UNIMPLEMENTED, @@ -95,13 +94,13 @@ static struct bus_space _base_tag = { /* write multiple */ .bs_wm_1 = generic_bs_wm_1, - .bs_wm_2 = generic_armv4_bs_wm_2, + .bs_wm_2 = generic_bs_wm_2, .bs_wm_4 = generic_bs_wm_4, .bs_wm_8 = BS_UNIMPLEMENTED, /* write region */ .bs_wr_1 = generic_bs_wr_1, - .bs_wr_2 = generic_armv4_bs_wr_2, + .bs_wr_2 = generic_bs_wr_2, .bs_wr_4 = generic_bs_wr_4, .bs_wr_8 = BS_UNIMPLEMENTED, @@ -113,13 +112,13 @@ static struct bus_space _base_tag = { /* set region */ .bs_sr_1 = generic_bs_sr_1, - .bs_sr_2 = generic_armv4_bs_sr_2, + .bs_sr_2 = generic_bs_sr_2, .bs_sr_4 = generic_bs_sr_4, .bs_sr_8 = BS_UNIMPLEMENTED, /* copy */ .bs_c_1 = BS_UNIMPLEMENTED, - .bs_c_2 = generic_armv4_bs_c_2, + .bs_c_2 = generic_bs_c_2, .bs_c_4 = BS_UNIMPLEMENTED, .bs_c_8 = BS_UNIMPLEMENTED, @@ -131,13 +130,13 @@ static struct bus_space _base_tag = { /* read multiple stream */ .bs_rm_1_s = generic_bs_rm_1, - .bs_rm_2_s = generic_armv4_bs_rm_2, + .bs_rm_2_s = generic_bs_rm_2, .bs_rm_4_s = generic_bs_rm_4, .bs_rm_8_s = BS_UNIMPLEMENTED, /* read region stream */ .bs_rr_1_s = generic_bs_rr_1, - .bs_rr_2_s = generic_armv4_bs_rr_2, + .bs_rr_2_s = generic_bs_rr_2, .bs_rr_4_s = generic_bs_rr_4, .bs_rr_8_s = BS_UNIMPLEMENTED, @@ -149,13 +148,13 @@ static struct bus_space _base_tag = { /* write multiple stream */ .bs_wm_1_s = generic_bs_wm_1, - .bs_wm_2_s = generic_armv4_bs_wm_2, + .bs_wm_2_s = generic_bs_wm_2, .bs_wm_4_s = generic_bs_wm_4, .bs_wm_8_s = BS_UNIMPLEMENTED, /* write region stream */ .bs_wr_1_s = generic_bs_wr_1, - .bs_wr_2_s = generic_armv4_bs_wr_2, + .bs_wr_2_s = generic_bs_wr_2, .bs_wr_4_s = generic_bs_wr_4, .bs_wr_8_s = BS_UNIMPLEMENTED, }; Modified: head/sys/arm/arm/bus_space_asm_generic.S ============================================================================== --- head/sys/arm/arm/bus_space_asm_generic.S Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/arm/bus_space_asm_generic.S Wed Jan 21 02:56:13 2015 (r277467) @@ -52,10 +52,10 @@ ENTRY(generic_bs_r_1) RET END(generic_bs_r_1) -ENTRY(generic_armv4_bs_r_2) +ENTRY(generic_bs_r_2) ldrh r0, [r1, r2] RET -END(generic_armv4_bs_r_2) +END(generic_bs_r_2) ENTRY(generic_bs_r_4) ldr r0, [r1, r2] @@ -71,10 +71,10 @@ ENTRY(generic_bs_w_1) RET END(generic_bs_w_1) -ENTRY(generic_armv4_bs_w_2) +ENTRY(generic_bs_w_2) strh r3, [r1, r2] RET -END(generic_armv4_bs_w_2) +END(generic_bs_w_2) ENTRY(generic_bs_w_4) str r3, [r1, r2] @@ -100,7 +100,7 @@ ENTRY(generic_bs_rm_1) RET END(generic_bs_rm_1) -ENTRY(generic_armv4_bs_rm_2) +ENTRY(generic_bs_rm_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -113,7 +113,7 @@ ENTRY(generic_armv4_bs_rm_2) bne 1b RET -END(generic_armv4_bs_rm_2) +END(generic_bs_rm_2) ENTRY(generic_bs_rm_4) add r0, r1, r2 @@ -149,7 +149,7 @@ ENTRY(generic_bs_wm_1) RET END(generic_bs_wm_1) -ENTRY(generic_armv4_bs_wm_2) +ENTRY(generic_bs_wm_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -162,7 +162,7 @@ ENTRY(generic_armv4_bs_wm_2) bne 1b RET -END(generic_armv4_bs_wm_2) +END(generic_bs_wm_2) ENTRY(generic_bs_wm_4) add r0, r1, r2 @@ -198,7 +198,7 @@ ENTRY(generic_bs_rr_1) RET END(generic_bs_rr_1) -ENTRY(generic_armv4_bs_rr_2) +ENTRY(generic_bs_rr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -211,7 +211,7 @@ ENTRY(generic_armv4_bs_rr_2) bne 1b RET -END(generic_armv4_bs_rr_2) +END(generic_bs_rr_2) ENTRY(generic_bs_rr_4) add r0, r1, r2 @@ -247,7 +247,7 @@ ENTRY(generic_bs_wr_1) RET END(generic_bs_wr_1) -ENTRY(generic_armv4_bs_wr_2) +ENTRY(generic_bs_wr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -260,7 +260,7 @@ ENTRY(generic_armv4_bs_wr_2) bne 1b RET -END(generic_armv4_bs_wr_2) +END(generic_bs_wr_2) ENTRY(generic_bs_wr_4) add r0, r1, r2 @@ -295,7 +295,7 @@ ENTRY(generic_bs_sr_1) RET END(generic_bs_sr_1) -ENTRY(generic_armv4_bs_sr_2) +ENTRY(generic_bs_sr_2) add r0, r1, r2 mov r1, r3 ldr r2, [sp, #0] @@ -307,7 +307,7 @@ ENTRY(generic_armv4_bs_sr_2) bne 1b RET -END(generic_armv4_bs_sr_2) +END(generic_bs_sr_2) ENTRY(generic_bs_sr_4) add r0, r1, r2 @@ -327,7 +327,7 @@ END(generic_bs_sr_4) * copy region */ -ENTRY(generic_armv4_bs_c_2) +ENTRY(generic_bs_c_2) add r0, r1, r2 ldr r2, [sp, #0] add r1, r2, r3 @@ -356,5 +356,5 @@ ENTRY(generic_armv4_bs_c_2) bne 3b RET -END(generic_armv4_bs_c_2) +END(generic_bs_c_2) Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/at91/at91.c Wed Jan 21 02:56:13 2015 (r277467) @@ -116,7 +116,6 @@ bus_dma_get_range_nb(void) } bs_protos(generic); -bs_protos(generic_armv4); struct bus_space at91_bs_tag = { /* cookie */ @@ -136,37 +135,37 @@ struct bus_space at91_bs_tag = { /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region */ NULL, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, @@ -178,49 +177,49 @@ struct bus_space at91_bs_tag = { /* set region */ NULL, - generic_armv4_bs_sr_2, + generic_bs_sr_2, generic_bs_sr_4, NULL, /* copy */ NULL, - generic_armv4_bs_c_2, + generic_bs_c_2, NULL, NULL, /* read (single) stream */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple stream */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region stream */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) stream */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple stream */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region stream */ NULL, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, }; Modified: head/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- head/sys/arm/cavium/cns11xx/econa.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/cavium/cns11xx/econa.c Wed Jan 21 02:56:13 2015 (r277467) @@ -57,7 +57,6 @@ unsigned int AHB_clock; unsigned int APB_clock; bs_protos(generic); -bs_protos(generic_armv4); struct bus_space econa_bs_tag = { /* cookie */ @@ -77,31 +76,31 @@ struct bus_space econa_bs_tag = { /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, @@ -137,7 +136,7 @@ struct bus_space econa_bs_tag = { /* read multiple stream */ NULL, - generic_armv4_bs_rm_2, + generic_bs_rm_2, NULL, NULL, @@ -155,7 +154,7 @@ struct bus_space econa_bs_tag = { /* write multiple stream */ NULL, - generic_armv4_bs_wm_2, + generic_bs_wm_2, NULL, NULL, Modified: head/sys/arm/mv/bus_space.c ============================================================================== --- head/sys/arm/mv/bus_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/mv/bus_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -46,7 +46,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); /* * The bus space tag. This is constant for all instances, so @@ -70,31 +69,31 @@ static struct bus_space _base_tag = { /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, @@ -130,7 +129,7 @@ static struct bus_space _base_tag = { /* read multiple stream */ NULL, - generic_armv4_bs_rm_2, /* bus_space_read_multi_stream_2 */ + generic_bs_rm_2, /* bus_space_read_multi_stream_2 */ NULL, NULL, @@ -148,7 +147,7 @@ static struct bus_space _base_tag = { /* write multiple stream */ NULL, - generic_armv4_bs_wm_2, /* bus_space_write_multi_stream_2 */ + generic_bs_wm_2, /* bus_space_write_multi_stream_2 */ NULL, NULL, Modified: head/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c ============================================================================== --- head/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -90,7 +90,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); struct bus_space s3c2xx0_bs_tag = { /* cookie */ @@ -110,37 +109,37 @@ struct bus_space s3c2xx0_bs_tag = { /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region */ generic_bs_wr_1, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, @@ -152,13 +151,13 @@ struct bus_space s3c2xx0_bs_tag = { /* set region */ generic_bs_sr_1, - generic_armv4_bs_sr_2, + generic_bs_sr_2, NULL, NULL, /* copy */ NULL, - generic_armv4_bs_c_2, + generic_bs_c_2, NULL, NULL, }; Modified: head/sys/arm/versatile/bus_space.c ============================================================================== --- head/sys/arm/versatile/bus_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/versatile/bus_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); struct bus_space _base_tag = { /* cookie */ @@ -62,37 +61,37 @@ struct bus_space _base_tag = { /* read (single) */ .bs_r_1 = generic_bs_r_1, - .bs_r_2 = generic_armv4_bs_r_2, + .bs_r_2 = generic_bs_r_2, .bs_r_4 = generic_bs_r_4, .bs_r_8 = NULL, /* read multiple */ .bs_rm_1 = generic_bs_rm_1, - .bs_rm_2 = generic_armv4_bs_rm_2, + .bs_rm_2 = generic_bs_rm_2, .bs_rm_4 = generic_bs_rm_4, .bs_rm_8 = NULL, /* read region */ .bs_rr_1 = generic_bs_rr_1, - .bs_rr_2 = generic_armv4_bs_rr_2, + .bs_rr_2 = generic_bs_rr_2, .bs_rr_4 = generic_bs_rr_4, .bs_rr_8 = NULL, /* write (single) */ .bs_w_1 = generic_bs_w_1, - .bs_w_2 = generic_armv4_bs_w_2, + .bs_w_2 = generic_bs_w_2, .bs_w_4 = generic_bs_w_4, .bs_w_8 = NULL, /* write multiple */ .bs_wm_1 = generic_bs_wm_1, - .bs_wm_2 = generic_armv4_bs_wm_2, + .bs_wm_2 = generic_bs_wm_2, .bs_wm_4 = generic_bs_wm_4, .bs_wm_8 = NULL, /* write region */ .bs_wr_1 = generic_bs_wr_1, - .bs_wr_2 = generic_armv4_bs_wr_2, + .bs_wr_2 = generic_bs_wr_2, .bs_wr_4 = generic_bs_wr_4, .bs_wr_8 = NULL, @@ -101,13 +100,13 @@ struct bus_space _base_tag = { /* set region */ .bs_sr_1 = NULL, - .bs_sr_2 = generic_armv4_bs_sr_2, + .bs_sr_2 = generic_bs_sr_2, .bs_sr_4 = generic_bs_sr_4, .bs_sr_8 = NULL, /* copy */ .bs_c_1 = NULL, - .bs_c_2 = generic_armv4_bs_c_2, + .bs_c_2 = generic_bs_c_2, .bs_c_4 = NULL, .bs_c_8 = NULL, }; Modified: head/sys/arm/versatile/versatile_pci_bus_space.c ============================================================================== --- head/sys/arm/versatile/versatile_pci_bus_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/versatile/versatile_pci_bus_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -37,7 +37,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); /* * Bus space that handles offsets in word for 1/2 bytes read/write access. @@ -61,37 +60,37 @@ static struct bus_space bus_space_pcimem /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region */ generic_bs_wr_1, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, Modified: head/sys/arm/xscale/i80321/i80321_space.c ============================================================================== --- head/sys/arm/xscale/i80321/i80321_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/xscale/i80321/i80321_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -64,7 +64,6 @@ bs_protos(i80321); bs_protos(i80321_io); bs_protos(i80321_mem); bs_protos(generic); -bs_protos(generic_armv4); /* * Template bus_space -- copied, and the bits that are NULL are @@ -88,37 +87,37 @@ const struct bus_space i80321_bs_tag_tem /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region */ NULL, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, @@ -130,49 +129,49 @@ const struct bus_space i80321_bs_tag_tem /* set region */ NULL, - generic_armv4_bs_sr_2, + generic_bs_sr_2, generic_bs_sr_4, NULL, /* copy */ NULL, - generic_armv4_bs_c_2, + generic_bs_c_2, NULL, NULL, /* read (single) stream */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple stream */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region stream */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) stream */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple stream */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region stream */ NULL, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, }; Modified: head/sys/arm/xscale/i80321/obio_space.c ============================================================================== --- head/sys/arm/xscale/i80321/obio_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/xscale/i80321/obio_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); /* * The obio bus space tag. This is constant for all instances, so @@ -74,7 +73,7 @@ struct bus_space obio_bs_tag = { /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, @@ -92,7 +91,7 @@ struct bus_space obio_bs_tag = { /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, Modified: head/sys/arm/xscale/i8134x/i81342_space.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/xscale/i8134x/i81342_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -65,7 +65,6 @@ bs_protos(i81342); bs_protos(i81342_io); bs_protos(i81342_mem); bs_protos(generic); -bs_protos(generic_armv4); /* * Template bus_space -- copied, and the bits that are NULL are @@ -89,37 +88,37 @@ const struct bus_space i81342_bs_tag_tem /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region */ NULL, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, @@ -131,49 +130,49 @@ const struct bus_space i81342_bs_tag_tem /* set region */ NULL, - generic_armv4_bs_sr_2, + generic_bs_sr_2, generic_bs_sr_4, NULL, /* copy */ NULL, - generic_armv4_bs_c_2, + generic_bs_c_2, NULL, NULL, /* read (single) stream */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, /* read multiple stream */ generic_bs_rm_1, - generic_armv4_bs_rm_2, + generic_bs_rm_2, generic_bs_rm_4, NULL, /* read region stream */ generic_bs_rr_1, - generic_armv4_bs_rr_2, + generic_bs_rr_2, generic_bs_rr_4, NULL, /* write (single) stream */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, /* write multiple stream */ generic_bs_wm_1, - generic_armv4_bs_wm_2, + generic_bs_wm_2, generic_bs_wm_4, NULL, /* write region stream */ NULL, - generic_armv4_bs_wr_2, + generic_bs_wr_2, generic_bs_wr_4, NULL, }; Modified: head/sys/arm/xscale/i8134x/obio_space.c ============================================================================== --- head/sys/arm/xscale/i8134x/obio_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/xscale/i8134x/obio_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -50,7 +50,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); /* * The obio bus space tag. This is constant for all instances, so @@ -74,7 +73,7 @@ struct bus_space obio_bs_tag = { /* read (single) */ generic_bs_r_1, - generic_armv4_bs_r_2, + generic_bs_r_2, generic_bs_r_4, NULL, @@ -92,7 +91,7 @@ struct bus_space obio_bs_tag = { /* write (single) */ generic_bs_w_1, - generic_armv4_bs_w_2, + generic_bs_w_2, generic_bs_w_4, NULL, Modified: head/sys/arm/xscale/ixp425/ixp425_a4x_space.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_a4x_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/xscale/ixp425/ixp425_a4x_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -62,7 +62,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(a4x); bs_protos(generic); -bs_protos(generic_armv4); struct bus_space ixp425_a4x_bs_tag = { /* cookie */ Modified: head/sys/arm/xscale/ixp425/ixp425_space.c ============================================================================== --- head/sys/arm/xscale/ixp425/ixp425_space.c Wed Jan 21 02:49:19 2015 (r277466) +++ head/sys/arm/xscale/ixp425/ixp425_space.c Wed Jan 21 02:56:13 2015 (r277467) @@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$"); /* Proto types for all the bus_space structure functions */ bs_protos(generic); -bs_protos(generic_armv4); struct bus_space ixp425_bs_tag = { /* cookie */ @@ -79,37 +78,37 @@ struct bus_space ixp425_bs_tag = { /* read (single) */ .bs_r_1 = generic_bs_r_1, - .bs_r_2 = generic_armv4_bs_r_2, + .bs_r_2 = generic_bs_r_2, .bs_r_4 = generic_bs_r_4, .bs_r_8 = NULL, /* read multiple */ .bs_rm_1 = generic_bs_rm_1, - .bs_rm_2 = generic_armv4_bs_rm_2, + .bs_rm_2 = generic_bs_rm_2, .bs_rm_4 = generic_bs_rm_4, .bs_rm_8 = NULL, /* read region */ .bs_rr_1 = generic_bs_rr_1, - .bs_rr_2 = generic_armv4_bs_rr_2, + .bs_rr_2 = generic_bs_rr_2, .bs_rr_4 = generic_bs_rr_4, .bs_rr_8 = NULL, /* write (single) */ .bs_w_1 = generic_bs_w_1, - .bs_w_2 = generic_armv4_bs_w_2, + .bs_w_2 = generic_bs_w_2, .bs_w_4 = generic_bs_w_4, .bs_w_8 = NULL, /* write multiple */ .bs_wm_1 = generic_bs_wm_1, - .bs_wm_2 = generic_armv4_bs_wm_2, + .bs_wm_2 = generic_bs_wm_2, .bs_wm_4 = generic_bs_wm_4, .bs_wm_8 = NULL, /* write region */ .bs_wr_1 = generic_bs_wr_1, - .bs_wr_2 = generic_armv4_bs_wr_2, *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 02:57:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E679A0F; Wed, 21 Jan 2015 02:57:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 408B161D; Wed, 21 Jan 2015 02:57:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L2vthK002320; Wed, 21 Jan 2015 02:57:55 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L2vtuF002319; Wed, 21 Jan 2015 02:57:55 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501210257.t0L2vtuF002319@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 21 Jan 2015 02:57:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277468 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 02:57:55 -0000 Author: nwhitehorn Date: Wed Jan 21 02:57:54 2015 New Revision: 277468 URL: https://svnweb.freebsd.org/changeset/base/277468 Log: On 64-bit PowerPC, use more native forms of the PPC 970 HID restore sequences, like are used to read the HIDs. This is both easier to read and avoids a miscompilation by GCC in certain circumstances. Also avoid double restoration of HID4 and HID5. MFC after: 2 weeks Modified: head/sys/powerpc/aim/mp_cpudep.c Modified: head/sys/powerpc/aim/mp_cpudep.c ============================================================================== --- head/sys/powerpc/aim/mp_cpudep.c Wed Jan 21 02:56:13 2015 (r277467) +++ head/sys/powerpc/aim/mp_cpudep.c Wed Jan 21 02:57:54 2015 (r277468) @@ -58,7 +58,9 @@ SYSINIT(cpu_save_config, SI_SUB_CPU, SI_ void cpudep_ap_early_bootstrap(void) { +#ifndef __powerpc64__ register_t reg; +#endif __asm __volatile("mtsprg 0, %0" :: "r"(ap_pcpu)); powerpc_sync(); @@ -69,12 +71,17 @@ cpudep_ap_early_bootstrap(void) case IBM970MP: /* Restore HID4 and HID5, which are necessary for the MMU */ +#ifdef __powerpc64__ + mtspr(SPR_HID4, bsp_state[2]); powerpc_sync(); isync(); + mtspr(SPR_HID5, bsp_state[3]); powerpc_sync(); isync(); +#else __asm __volatile("ld %0, 16(%2); sync; isync; \ mtspr %1, %0; sync; isync;" : "=r"(reg) : "K"(SPR_HID4), "r"(bsp_state)); __asm __volatile("ld %0, 24(%2); sync; isync; \ mtspr %1, %0; sync; isync;" : "=r"(reg) : "K"(SPR_HID5), "r"(bsp_state)); +#endif powerpc_sync(); break; } @@ -292,9 +299,24 @@ cpudep_ap_setup() /* * The 970 has strange rules about how to update HID registers. * See Table 2-3, 970MP manual + * + * Note: HID4 and HID5 restored already in + * cpudep_ap_early_bootstrap() */ __asm __volatile("mtasr %0; sync" :: "r"(0)); + #ifdef __powerpc64__ + __asm __volatile(" \ + sync; isync; \ + mtspr %1, %0; \ + mfspr %0, %1; mfspr %0, %1; mfspr %0, %1; \ + mfspr %0, %1; mfspr %0, %1; mfspr %0, %1; \ + sync; isync" + :: "r"(bsp_state[0]), "K"(SPR_HID0)); + __asm __volatile("sync; isync; \ + mtspr %1, %0; mtspr %1, %0; sync; isync" + :: "r"(bsp_state[1]), "K"(SPR_HID1)); + #else __asm __volatile(" \ ld %0,0(%2); \ sync; isync; \ @@ -306,12 +328,7 @@ cpudep_ap_setup() __asm __volatile("ld %0, 8(%2); sync; isync; \ mtspr %1, %0; mtspr %1, %0; sync; isync" : "=r"(reg) : "K"(SPR_HID1), "r"(bsp_state)); - __asm __volatile("ld %0, 16(%2); sync; isync; \ - mtspr %1, %0; sync; isync;" - : "=r"(reg) : "K"(SPR_HID4), "r"(bsp_state)); - __asm __volatile("ld %0, 24(%2); sync; isync; \ - mtspr %1, %0; sync; isync;" - : "=r"(reg) : "K"(SPR_HID5), "r"(bsp_state)); + #endif powerpc_sync(); break; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:06:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A8A97EC0; Wed, 21 Jan 2015 03:06:15 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B58986E; Wed, 21 Jan 2015 03:06:15 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id y20so13898805ier.1; Tue, 20 Jan 2015 19:06:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XnfDN6uau3SUVa0rOuS8c+nh/CUuqjSpD4oYXNhuArc=; b=aN3dvDsUwie/gHPQ3GOM3V2oPtIkBQtm0qa6QudU2wmgmbto4MlOPP+aOgD8nXx/Ff JDIKD1g9Mz5T3V6wwN/REclP+Q6EKiZD1y6G+nHPKyDczImYM8JQy2OFdQg/hIgs2JMY ntkM+RNnrRZhAusv/jRUbfrAElwUnnFcvAT5CDQLGCTgPFQxgH5FVzBYr0d+LJL1drHQ IMZOaHMCLukiFANnyaqzwPvTXGVTogK02wkMhYKalQ5jFEVVo7GE3kawWpjRKL1okyc2 DD8z/gdVpqFN+0kSfYqJD+sJrkXUYRm9nPclsj/EqqhpLEWiV+BbnNgD4o4lQj8hJ28k H+QQ== MIME-Version: 1.0 X-Received: by 10.50.107.7 with SMTP id gy7mr31337762igb.49.1421809574767; Tue, 20 Jan 2015 19:06:14 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Tue, 20 Jan 2015 19:06:14 -0800 (PST) In-Reply-To: <20150121021905.GA73548@FreeBSD.org> References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> Date: Tue, 20 Jan 2015 19:06:14 -0800 X-Google-Sender-Auth: Dzq68BveNLVYWqDZ1UV1YcFnX1w Message-ID: Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe From: Adrian Chadd To: Alexey Dokuchaev Content-Type: text/plain; charset=UTF-8 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , Navdeep Parhar , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:06:15 -0000 On 20 January 2015 at 18:19, Alexey Dokuchaev wrote: > On Tue, Jan 20, 2015 at 07:50:23PM -0500, Pedro Giffuni wrote: >> But the fix is rather ugly, isn't it? I would personally prefer to just >> kill the older gcc but in the meantime updating it so that it behaves >> like the updated gcc/clang would be better. IMHO. > > Seconded. Putting extra harness on the code to avoid bugs in the compiler > that were actually fixed upsteam is totally bogus. Right, but: * not all of us work on compilers; * not all of us want to currently be working on compilers; * some of us have to use the gcc that's in tree; * .. and apparently updating that gcc to something > 4.2 is verboten. So if someone wants to help Navdeep by backporting those options, please do. I bet he'd love the help. -adrian From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:22:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 06D2C341; Wed, 21 Jan 2015 03:22:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E7D8FA14; Wed, 21 Jan 2015 03:22:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L3Mbg0016711; Wed, 21 Jan 2015 03:22:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L3Mb74016710; Wed, 21 Jan 2015 03:22:37 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210322.t0L3Mb74016710@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 03:22:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277469 - head/sys/arm/mv X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:22:38 -0000 Author: ian Date: Wed Jan 21 03:22:37 2015 New Revision: 277469 URL: https://svnweb.freebsd.org/changeset/base/277469 Log: The mv/bus_space.c file is essentially identical to arm/bus_space-v6.c, so just use it. Deleted: head/sys/arm/mv/bus_space.c Modified: head/sys/arm/mv/files.mv Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Wed Jan 21 02:57:54 2015 (r277468) +++ head/sys/arm/mv/files.mv Wed Jan 21 03:22:37 2015 (r277469) @@ -12,6 +12,7 @@ # - JTAG/ICE # - Vector Floating Point (VFP) unit # +arm/arm/bus_space-v6.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard @@ -21,7 +22,6 @@ arm/arm/cpufunc_asm_armv7.S standard arm/arm/cpufunc_asm_sheeva.S standard arm/arm/cpufunc_asm_pj4b.S standard -arm/mv/bus_space.c standard arm/mv/gpio.c standard arm/mv/mv_common.c standard arm/mv/mv_localbus.c standard From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:24:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5BB9B498; Wed, 21 Jan 2015 03:24:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2ED15A22; Wed, 21 Jan 2015 03:24:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L3OKHw016957; Wed, 21 Jan 2015 03:24:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L3OJ96016954; Wed, 21 Jan 2015 03:24:19 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210324.t0L3OJ96016954@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 03:24:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277470 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:24:20 -0000 Author: ian Date: Wed Jan 21 03:24:18 2015 New Revision: 277470 URL: https://svnweb.freebsd.org/changeset/base/277470 Log: Move bs_unimplemented() to bus_space_generic.c so it can be shared. Modified: head/sys/arm/arm/bus_space-v6.c head/sys/arm/arm/bus_space_generic.c head/sys/arm/include/bus.h Modified: head/sys/arm/arm/bus_space-v6.c ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Wed Jan 21 03:22:37 2015 (r277469) +++ head/sys/arm/arm/bus_space-v6.c Wed Jan 21 03:24:18 2015 (r277470) @@ -39,15 +39,6 @@ __FBSDID("$FreeBSD$"); /* Prototypes for all the bus_space structure functions */ bs_protos(generic); -static void -bs_unimplemented(void) -{ - - panic("unimplemented bus_space function called"); -} - -#define BS_UNIMPLEMENTED (void *)bs_unimplemented - /* * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. Modified: head/sys/arm/arm/bus_space_generic.c ============================================================================== --- head/sys/arm/arm/bus_space_generic.c Wed Jan 21 03:22:37 2015 (r277469) +++ head/sys/arm/arm/bus_space_generic.c Wed Jan 21 03:24:18 2015 (r277470) @@ -53,6 +53,13 @@ __FBSDID("$FreeBSD$"); #include #include +void +generic_bs_unimplemented(void) +{ + + panic("unimplemented bus_space function called"); +} + /* Prototypes for all the bus_space structure functions */ bs_protos(generic); Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Wed Jan 21 03:22:37 2015 (r277469) +++ head/sys/arm/include/bus.h Wed Jan 21 03:24:18 2015 (r277470) @@ -730,6 +730,9 @@ bs_c_2_proto(f); \ bs_c_4_proto(f); \ bs_c_8_proto(f); +void generic_bs_unimplemented(void); +#define BS_UNIMPLEMENTED (void *)generic_bs_unimplemented + #define BUS_SPACE_ALIGNED_POINTER(p, t) ALIGNED_POINTER(p, t) #define BUS_SPACE_MAXADDR_24BIT 0xFFFFFF From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:28:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74A88719; Wed, 21 Jan 2015 03:28:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 562DAA47; Wed, 21 Jan 2015 03:28:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L3S8V5017622; Wed, 21 Jan 2015 03:28:08 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L3S7t0017620; Wed, 21 Jan 2015 03:28:07 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210328.t0L3S7t0017620@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 03:28:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277471 - head/sys/arm/at91 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:28:08 -0000 Author: ian Date: Wed Jan 21 03:28:07 2015 New Revision: 277471 URL: https://svnweb.freebsd.org/changeset/base/277471 Log: Use explicit initializer style, fill in missing functions. Modified: head/sys/arm/at91/at91.c head/sys/arm/at91/files.at91 Modified: head/sys/arm/at91/at91.c ============================================================================== --- head/sys/arm/at91/at91.c Wed Jan 21 03:24:18 2015 (r277470) +++ head/sys/arm/at91/at91.c Wed Jan 21 03:28:07 2015 (r277471) @@ -118,110 +118,110 @@ bus_dma_get_range_nb(void) bs_protos(generic); struct bus_space at91_bs_tag = { - /* cookie */ - (void *) 0, + /* privdata is whatever the implementer wants; unused in base tag */ + .bs_privdata = NULL, /* mapping/unmapping */ - at91_bs_map, - at91_bs_unmap, - at91_bs_subregion, + .bs_map = at91_bs_map, + .bs_unmap = at91_bs_unmap, + .bs_subregion = at91_bs_subregion, /* allocation/deallocation */ - NULL, - NULL, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - at91_barrier, + .bs_barrier = at91_barrier, /* read (single) */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, + .bs_r_1 = NULL, /* Use inline code in bus.h */ + .bs_r_2 = NULL, /* Use inline code in bus.h */ + .bs_r_4 = NULL, /* Use inline code in bus.h */ + .bs_r_8 = NULL, /* Use inline code in bus.h */ /* read multiple */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1 = generic_bs_rm_1, + .bs_rm_2 = generic_bs_rm_2, + .bs_rm_4 = generic_bs_rm_4, + .bs_rm_8 = BS_UNIMPLEMENTED, /* read region */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, + .bs_rr_1 = generic_bs_rr_1, + .bs_rr_2 = generic_bs_rr_2, + .bs_rr_4 = generic_bs_rr_4, + .bs_rr_8 = BS_UNIMPLEMENTED, /* write (single) */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, + .bs_w_1 = NULL, /* Use inline code in bus.h */ + .bs_w_2 = NULL, /* Use inline code in bus.h */ + .bs_w_4 = NULL, /* Use inline code in bus.h */ + .bs_w_8 = NULL, /* Use inline code in bus.h */ /* write multiple */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1 = generic_bs_wm_1, + .bs_wm_2 = generic_bs_wm_2, + .bs_wm_4 = generic_bs_wm_4, + .bs_wm_8 = BS_UNIMPLEMENTED, /* write region */ - NULL, - generic_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1 = generic_bs_wr_1, + .bs_wr_2 = generic_bs_wr_2, + .bs_wr_4 = generic_bs_wr_4, + .bs_wr_8 = BS_UNIMPLEMENTED, /* set multiple */ - NULL, - NULL, - NULL, - NULL, + .bs_sm_1 = BS_UNIMPLEMENTED, + .bs_sm_2 = BS_UNIMPLEMENTED, + .bs_sm_4 = BS_UNIMPLEMENTED, + .bs_sm_8 = BS_UNIMPLEMENTED, /* set region */ - NULL, - generic_bs_sr_2, - generic_bs_sr_4, - NULL, + .bs_sr_1 = generic_bs_sr_1, + .bs_sr_2 = generic_bs_sr_2, + .bs_sr_4 = generic_bs_sr_4, + .bs_sr_8 = BS_UNIMPLEMENTED, /* copy */ - NULL, - generic_bs_c_2, - NULL, - NULL, - - /* read (single) stream */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, + .bs_c_1 = BS_UNIMPLEMENTED, + .bs_c_2 = generic_bs_c_2, + .bs_c_4 = BS_UNIMPLEMENTED, + .bs_c_8 = BS_UNIMPLEMENTED, + + /* read stream (single) */ + .bs_r_1_s = NULL, /* Use inline code in bus.h */ + .bs_r_2_s = NULL, /* Use inline code in bus.h */ + .bs_r_4_s = NULL, /* Use inline code in bus.h */ + .bs_r_8_s = NULL, /* Use inline code in bus.h */ /* read multiple stream */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, + .bs_rm_1_s = generic_bs_rm_1, + .bs_rm_2_s = generic_bs_rm_2, + .bs_rm_4_s = generic_bs_rm_4, + .bs_rm_8_s = BS_UNIMPLEMENTED, /* read region stream */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) stream */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, + .bs_rr_1_s = generic_bs_rr_1, + .bs_rr_2_s = generic_bs_rr_2, + .bs_rr_4_s = generic_bs_rr_4, + .bs_rr_8_s = BS_UNIMPLEMENTED, + + /* write stream (single) */ + .bs_w_1_s = NULL, /* Use inline code in bus.h */ + .bs_w_2_s = NULL, /* Use inline code in bus.h */ + .bs_w_4_s = NULL, /* Use inline code in bus.h */ + .bs_w_8_s = NULL, /* Use inline code in bus.h */ /* write multiple stream */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, + .bs_wm_1_s = generic_bs_wm_1, + .bs_wm_2_s = generic_bs_wm_2, + .bs_wm_4_s = generic_bs_wm_4, + .bs_wm_8_s = BS_UNIMPLEMENTED, /* write region stream */ - NULL, - generic_bs_wr_2, - generic_bs_wr_4, - NULL, + .bs_wr_1_s = generic_bs_wr_1, + .bs_wr_2_s = generic_bs_wr_2, + .bs_wr_4_s = generic_bs_wr_4, + .bs_wr_8_s = BS_UNIMPLEMENTED, }; #ifndef FDT Modified: head/sys/arm/at91/files.at91 ============================================================================== --- head/sys/arm/at91/files.at91 Wed Jan 21 03:24:18 2015 (r277470) +++ head/sys/arm/at91/files.at91 Wed Jan 21 03:28:07 2015 (r277471) @@ -1,4 +1,5 @@ # $FreeBSD$ +arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard arm/at91/at91_machdep.c standard arm/at91/at91_aic.c standard From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:36:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 99AAE98E for ; Wed, 21 Jan 2015 03:36:20 +0000 (UTC) Received: from nm41-vm8.bullet.mail.bf1.yahoo.com (nm41-vm8.bullet.mail.bf1.yahoo.com [216.109.114.175]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FF5CB1E for ; Wed, 21 Jan 2015 03:36:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421811372; bh=1BWGXyNgwveDHOJxtW6yFCzWyFbSK1ZfGCS7oVlmhdQ=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=BX7P5T35d/F/ZEXVrVj44WoVaBTfkP8514nY/GP2HPa9tpDdJSs1hHqi7PlAsMo4H4dPojsg26mjznSLW0Djxw995QUgT88Jlc2QvyOWS0hXU+DmCYKFe/atSsnx5sIoQPZFa+jC4q4T9qN4H6Nl6dE5aUxyeoOqhIgoZlX4gDJJczth0SZy+VcaS6JAPSTOlWk5m290qsJHAMhNUnzWz/YZ+35IVzl+SQ3wOdiNH2Z4WndNyXgifheospsqYRBOg3Yl2c+vY1/dlePSNB06l6PwfAN0tkmhm0qqFe/c7ELfgL7a3qmEwAaNTh8ual0/2wxKsyJip/mI33aughdfMg== Received: from [66.196.81.173] by nm41.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 03:36:12 -0000 Received: from [98.139.211.205] by tm19.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 03:36:12 -0000 Received: from [127.0.0.1] by smtp214.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 03:36:12 -0000 X-Yahoo-Newman-Id: 604478.25420.bm@smtp214.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: UejmnnsVM1lVfP0BOSa_d0kE9wZACn9W2WIdXXOoI9l2y9N DQsvmkC.L.fcsW.K81klVXqAhgxjgL045Qcca1B5ww8.2brYKi83NMq4raos 5sfNs6vmA1rmDwvoksJnYOxVSKzRs99EuvftO2LhNx4SdqtoFLs_4PK9Huge YBvMlUbDazUGxrYOhbcDNVHhhn2uZp7UzlFb12MjMgvcdn856lyKsZs0dlqG PgZ0R_.MIr1qF.9i1CbhmX.Bceb8eMiEgdCySi8XFFd.MxhQx7.avPQJqvYd KESzW6q.WQdU8ZSZh2HPklBj_XfhNUkuUgmYU0_bVUv0uIT8fWyBdwyu7AZn a3eCSqFeNJnRfJKPUtTMB1U8kqGXT1Gm69Nu3xW83B1YsSPaHh.WSlVwBaIa Ka4bRF.zlqLbSIupSKLguKRSUWUYef1R7RdaJ8ftfiNgImtiJiYxBlUMqYKN YWCsFugFGi7K6piEa0lY8.FSKwJTxDFO45Y1VqSdDI6wJ15QnVWR8NhZuYgV dNbghuZr9.6zlC3RJgPl77Jld7bCDtVbbW_tbzmr5lH2IbEpBZ4yuAmkx4lh hS..r1ndhUHVvoFbZICttQYp0P7n8P3Y- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54BF1EB0.2080901@FreeBSD.org> Date: Tue, 20 Jan 2015 22:36:16 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:36:20 -0000 On 01/20/15 22:06, Adrian Chadd wrote: > On 20 January 2015 at 18:19, Alexey Dokuchaev wrote: >> On Tue, Jan 20, 2015 at 07:50:23PM -0500, Pedro Giffuni wrote: >>> But the fix is rather ugly, isn't it? I would personally prefer to just >>> kill the older gcc but in the meantime updating it so that it behaves >>> like the updated gcc/clang would be better. IMHO. >> Seconded. Putting extra harness on the code to avoid bugs in the compiler >> that were actually fixed upsteam is totally bogus. > Right, but: > > * not all of us work on compilers; > * not all of us want to currently be working on compilers; > * some of us have to use the gcc that's in tree; > * .. and apparently updating that gcc to something > 4.2 is verboten. The external toolchain can't be that bad(?). > So if someone wants to help Navdeep by backporting those options, Hmm .. didn't I post a patch? > please do. I bet he'd love the help. > Ugh he doesn't and TBH, I don't care enough to look for consensus either. I find it interesting, and even funny that even the extreme copyleft are predicting clang will take over gcc: http://youtu.be/-ItFjEG3LaA Cheers, Pedro. > > -adrian > From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:44:34 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 71585BC5; Wed, 21 Jan 2015 03:44:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B6DEBFB; Wed, 21 Jan 2015 03:44:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L3iYDx026493; Wed, 21 Jan 2015 03:44:34 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L3iU7d026467; Wed, 21 Jan 2015 03:44:30 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210344.t0L3iU7d026467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 03:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277472 - in head/sys/arm: allwinner allwinner/a20 altera/socfpga arm broadcom/bcm2835 freescale/imx freescale/vybrid lpc mv rockchip samsung/exynos ti xilinx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:44:34 -0000 Author: ian Date: Wed Jan 21 03:44:29 2015 New Revision: 277472 URL: https://svnweb.freebsd.org/changeset/base/277472 Log: Rename bus_space-v6.c to bus_space_base.c, because it's not v6-specific and now some v5 Marvell systems are using it. Only define fdt_bus_tag if option FDT is defined. Added: head/sys/arm/arm/bus_space_base.c - copied, changed from r277470, head/sys/arm/arm/bus_space-v6.c Deleted: head/sys/arm/arm/bus_space-v6.c Modified: head/sys/arm/allwinner/a20/files.a20 head/sys/arm/allwinner/files.a10 head/sys/arm/altera/socfpga/files.socfpga head/sys/arm/broadcom/bcm2835/files.bcm2835 head/sys/arm/freescale/imx/files.imx51 head/sys/arm/freescale/imx/files.imx53 head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/vybrid/files.vybrid head/sys/arm/lpc/files.lpc head/sys/arm/mv/files.mv head/sys/arm/rockchip/files.rk30xx head/sys/arm/samsung/exynos/files.exynos5 head/sys/arm/ti/files.ti head/sys/arm/xilinx/files.zynq7 Modified: head/sys/arm/allwinner/a20/files.a20 ============================================================================== --- head/sys/arm/allwinner/a20/files.a20 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/allwinner/a20/files.a20 Wed Jan 21 03:44:29 2015 (r277472) @@ -17,7 +17,7 @@ arm/allwinner/a10_ehci.c optional ehci arm/allwinner/if_emac.c optional emac arm/allwinner/a10_wdog.c standard arm/allwinner/timer.c standard -arm/arm/bus_space-v6.c standard -arm/allwinner/a10_common.c standard +arm/arm/bus_space_base.c standard +arm/allwinner/a10_common.c standard arm/allwinner/a10_machdep.c standard arm/allwinner/a20/a20_mp.c optional smp Modified: head/sys/arm/allwinner/files.a10 ============================================================================== --- head/sys/arm/allwinner/files.a10 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/allwinner/files.a10 Wed Jan 21 03:44:29 2015 (r277472) @@ -19,5 +19,5 @@ arm/allwinner/a20/a20_cpu_cfg.c standar arm/allwinner/aintc.c standard arm/allwinner/if_emac.c optional emac arm/allwinner/timer.c standard -arm/arm/bus_space-v6.c standard -#arm/allwinner/console.c standard +arm/arm/bus_space_base.c standard +#arm/allwinner/console.c standard Modified: head/sys/arm/altera/socfpga/files.socfpga ============================================================================== --- head/sys/arm/altera/socfpga/files.socfpga Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/altera/socfpga/files.socfpga Wed Jan 21 03:44:29 2015 (r277472) @@ -9,7 +9,7 @@ arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard Copied and modified: head/sys/arm/arm/bus_space_base.c (from r277470, head/sys/arm/arm/bus_space-v6.c) ============================================================================== --- head/sys/arm/arm/bus_space-v6.c Wed Jan 21 03:24:18 2015 (r277470, copy source) +++ head/sys/arm/arm/bus_space_base.c Wed Jan 21 03:44:29 2015 (r277472) @@ -36,6 +36,8 @@ __FBSDID("$FreeBSD$"); #include #include +#include "opt_platform.h" + /* Prototypes for all the bus_space structure functions */ bs_protos(generic); @@ -43,7 +45,7 @@ bs_protos(generic); * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. */ -static struct bus_space _base_tag = { +static struct bus_space arm_base_tag = { /* privdata is whatever the implementer wants; unused in base tag */ .bs_privdata = NULL, @@ -150,4 +152,6 @@ static struct bus_space _base_tag = { .bs_wr_8_s = BS_UNIMPLEMENTED, }; -bus_space_tag_t fdtbus_bs_tag = &_base_tag; +#ifdef FDT +bus_space_tag_t fdtbus_bs_tag = &arm_base_tag; +#endif Modified: head/sys/arm/broadcom/bcm2835/files.bcm2835 ============================================================================== --- head/sys/arm/broadcom/bcm2835/files.bcm2835 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/broadcom/bcm2835/files.bcm2835 Wed Jan 21 03:44:29 2015 (r277472) @@ -15,7 +15,7 @@ arm/broadcom/bcm2835/bcm2835_spi.c opti arm/broadcom/bcm2835/bcm2835_systimer.c standard arm/broadcom/bcm2835/bcm2835_wdog.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_arm11.S standard Modified: head/sys/arm/freescale/imx/files.imx51 ============================================================================== --- head/sys/arm/freescale/imx/files.imx51 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/freescale/imx/files.imx51 Wed Jan 21 03:44:29 2015 (r277472) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx51_machdep.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard # Dummy serial console #arm/freescale/imx/console.c standard Modified: head/sys/arm/freescale/imx/files.imx53 ============================================================================== --- head/sys/arm/freescale/imx/files.imx53 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/freescale/imx/files.imx53 Wed Jan 21 03:44:29 2015 (r277472) @@ -10,7 +10,7 @@ kern/kern_clocksource.c standard arm/freescale/imx/imx_common.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx53_machdep.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard # Special serial console for debuging early boot code #arm/freescale/imx/console.c standard Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/freescale/imx/files.imx6 Wed Jan 21 03:44:29 2015 (r277472) @@ -15,7 +15,7 @@ kern/kern_clocksource.c standard # arm/arm/gic.c standard arm/arm/pl310.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard Modified: head/sys/arm/freescale/vybrid/files.vybrid ============================================================================== --- head/sys/arm/freescale/vybrid/files.vybrid Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/freescale/vybrid/files.vybrid Wed Jan 21 03:44:29 2015 (r277472) @@ -9,7 +9,7 @@ arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard Modified: head/sys/arm/lpc/files.lpc ============================================================================== --- head/sys/arm/lpc/files.lpc Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/lpc/files.lpc Wed Jan 21 03:44:29 2015 (r277472) @@ -1,5 +1,5 @@ # $FreeBSD$ -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard arm/arm/cpufunc_asm_armv5.S standard Modified: head/sys/arm/mv/files.mv ============================================================================== --- head/sys/arm/mv/files.mv Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/mv/files.mv Wed Jan 21 03:44:29 2015 (r277472) @@ -12,7 +12,7 @@ # - JTAG/ICE # - Vector Floating Point (VFP) unit # -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard Modified: head/sys/arm/rockchip/files.rk30xx ============================================================================== --- head/sys/arm/rockchip/files.rk30xx Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/rockchip/files.rk30xx Wed Jan 21 03:44:29 2015 (r277472) @@ -11,7 +11,7 @@ arm/arm/cpufunc_asm_armv7.S standard arm/arm/gic.c standard arm/arm/mpcore_timer.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/rockchip/rk30xx_common.c standard arm/rockchip/rk30xx_machdep.c standard arm/rockchip/rk30xx_pmu.c standard Modified: head/sys/arm/samsung/exynos/files.exynos5 ============================================================================== --- head/sys/arm/samsung/exynos/files.exynos5 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/samsung/exynos/files.exynos5 Wed Jan 21 03:44:29 2015 (r277472) @@ -9,7 +9,7 @@ arm/arm/cpufunc_asm_arm10.S standard arm/arm/cpufunc_asm_arm11.S standard arm/arm/cpufunc_asm_armv7.S standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/gic.c standard arm/arm/generic_timer.c standard Modified: head/sys/arm/ti/files.ti ============================================================================== --- head/sys/arm/ti/files.ti Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/ti/files.ti Wed Jan 21 03:44:29 2015 (r277472) @@ -2,7 +2,7 @@ kern/kern_clocksource.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_armv5.S standard Modified: head/sys/arm/xilinx/files.zynq7 ============================================================================== --- head/sys/arm/xilinx/files.zynq7 Wed Jan 21 03:28:07 2015 (r277471) +++ head/sys/arm/xilinx/files.zynq7 Wed Jan 21 03:44:29 2015 (r277472) @@ -5,7 +5,7 @@ kern/kern_clocksource.c standard -arm/arm/bus_space-v6.c standard +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/cpufunc_asm_armv5.S standard From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:52:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A9ED3E11; Wed, 21 Jan 2015 03:52:53 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 833DDCCA; Wed, 21 Jan 2015 03:52:53 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t0L3qlrv029482 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Tue, 20 Jan 2015 19:52:47 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t0L3qhJQ029481; Tue, 20 Jan 2015 19:52:43 -0800 (PST) (envelope-from sgk) Date: Tue, 20 Jan 2015 19:52:43 -0800 From: Steve Kargl To: Pedro Giffuni Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121035243.GA29469@troutmask.apl.washington.edu> References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BF1EB0.2080901@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Luigi Rizzo , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:52:53 -0000 On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: > > On 01/20/15 22:06, Adrian Chadd wrote: > > * .. and apparently updating that gcc to something > 4.2 is verboten. > > The external toolchain can't be that bad(?). > Are the ever change knobs documented somewhere? > > please do. I bet he'd love the help. > > > Ugh he doesn't and TBH, I don't care enough to look for > consensus either. > > I find it interesting, and even funny that even the extreme > copyleft are predicting clang will take over gcc: > > http://youtu.be/-ItFjEG3LaA > Clang won't take over gcc anytime soon. Fortran, ada? -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:53:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4CF8F51 for ; Wed, 21 Jan 2015 03:53:47 +0000 (UTC) Received: from nm6.bullet.mail.bf1.yahoo.com (nm6.bullet.mail.bf1.yahoo.com [98.139.212.165]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67F7FCD4 for ; Wed, 21 Jan 2015 03:53:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421812425; bh=KT35l4+WwRRV4TlrL/FpraeW5TsTCd6QSqaJfjRoH04=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=gVermKzwYdRLL9xuYon16yB44t1yOHmF3HAERng2DScESgBRV72MtYMn/kvrzewF3ZN87i5Rp9ydaDwnrt75kYkp6ttWM4CQl+xzYPLQqsBynTc2S9LSOZ6iPWu0TkZwA0EczRdnIMu70WS1vpKMsR/vasNSm9Kd9X9wEIIshhM+LsPam5i5uVkWqzHsHtZdnFB6LZm6FxOFkmfrR2ejKNE0fzvT1KfqbfF9N7jT8/b5sSUl9Cknmxwv4V4Gs27pveQEsAyXKeo+ASBxHtCvRjiRGxt2hvEH27/sgbz/sGwSrhNQuhsIVE1kN1/pgGyinVPT1erAmwKZvgozkx52DA== Received: from [98.139.215.141] by nm6.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 03:53:45 -0000 Received: from [68.142.230.73] by tm12.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 03:53:45 -0000 Received: from [127.0.0.1] by smtp230.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 03:53:45 -0000 X-Yahoo-Newman-Id: 570115.37348.bm@smtp230.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: SXAb8p8VM1mzgQ4x142nJmfIHU3KgcWNT3fFGB.Jzu7ZGRK zzsRfoUczsNGo3LaJFHGrlY9JcY7eQDgWgUDO6ymRRBu5Teeu7M.yE8JtRB6 XtaITp_YBf9Ve8DSLMIz0QhS.7X7IlV5_W283j6V6vxofzXLJz_c9pmH1B99 Dw6BPHvkw5nQkrQJP_FRDi_qScIsEVEezrUzzGuxN.C0JwTjDh.uxTUIcdvQ R_Db8so_WQOTRruEURXZfVkI.T_U6_Xf2DnD6opI40JGFY8mQ2R2hXwQTDxC FCCadKrdkQEpkY6qcQT1rCzDb4PiJk0R9EgMklYDvNp0BPLik4KvWi5iXMkQ oUvNR8lwZP_5VllOh.k_eQarOi6qfRdmLmtgbOzQtGgTWlPF9hnqunEHORw1 C.srGmj7SPgslIleK.QUyOsS8xdEUmo4B2yvKGsiomxOi18qeLlSiCnUVQe9 nNm.rT9VMU7Myf4OED4YMxF269UGYcWJLkKd97ATv1g42it7OnKq0gNyyTrc 85e5wrqg0gQoieVcBqRG_v5GQJ6aTid37JuiB1YmfIF3nQcW6FLw4bTgScnN eE795nKgMyAOv3B5s_BglEIVbhd6QIAfQ4WQ- X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54BF22BD.4080304@FreeBSD.org> Date: Tue, 20 Jan 2015 22:53:33 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "src-committers@freebsd.org" Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> In-Reply-To: <54BF1EB0.2080901@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:53:47 -0000 On 01/20/15 22:36, Pedro Giffuni wrote: > > ... > > I find it interesting, and even funny that even the extreme > copyleft are predicting clang will take over gcc: > > http://youtu.be/-ItFjEG3LaA > Actually I should apologize for publishing that link, it is rather poorly argumented and is not subject for a technical list. It's also boring (around 21:00 and 60:00 are the only "interesting" and controversial comments). Please let's not discuss that crap in the technical lists. Sorry again, Pedro. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 03:59:11 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31B7617E; Wed, 21 Jan 2015 03:59:11 +0000 (UTC) Received: from d.mail.sonic.net (d.mail.sonic.net [64.142.111.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 18A9DCF9; Wed, 21 Jan 2015 03:59:10 +0000 (UTC) Received: from comporellon.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by d.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0L3x8UX021332 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 20 Jan 2015 19:59:08 -0800 Message-ID: <54BF240C.2090107@freebsd.org> Date: Tue, 20 Jan 2015 19:59:08 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277421 - head/sys/powerpc/powerpc References: <201501201621.t0KGLx26096724@svn.freebsd.org> <20150120191438.GL42409@kib.kiev.ua> In-Reply-To: <20150120191438.GL42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVacb8wDZv0nddrVr10W1s6eMKnHJOWqR0nYT6S+PdCVoOGT3fWV1nyrKbPMDkNTki2bK4U+k+F9tS5JWRFpKlWb91Sdq6JSHcs= X-Sonic-ID: C;st+L2SGh5BGO8JCx7jkJAQ== M;vMjU2SGh5BGO8JCx7jkJAQ== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 03:59:11 -0000 On 01/20/15 11:14, Konstantin Belousov wrote: > On Tue, Jan 20, 2015 at 04:21:59PM +0000, Nathan Whitehorn wrote: >> Author: nwhitehorn >> Date: Tue Jan 20 16:21:59 2015 >> New Revision: 277421 >> URL: https://svnweb.freebsd.org/changeset/base/277421 >> >> Log: >> There does not seem to be any reason to acquire GIANT here. Follow amd64 >> in removing it. >> >> MFC after: 1 month >> >> Modified: >> head/sys/powerpc/powerpc/mem.c >> >> Modified: head/sys/powerpc/powerpc/mem.c >> ============================================================================== >> --- head/sys/powerpc/powerpc/mem.c Tue Jan 20 15:45:09 2015 (r277420) >> +++ head/sys/powerpc/powerpc/mem.c Tue Jan 20 16:21:59 2015 (r277421) >> @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, >> cnt = 0; >> error = 0; >> >> - GIANT_REQUIRED; >> - > This is not an acquisition, to be pedantic. Really, it is cdevsw which > has D_NEEDGIANT flag which acquires Giant. After architectures get > rid of GIANT_REQUIRED, flag can be removed. > Just so I understand, you are not objecting to this commit, right? Just pointing out that (a) my commit message was wrong and that (b) once all architectures make this change (presumably more involved) we can get rid of the D_NEEDGIANT in /sys/dev/mem/memdev.c? -Nathan From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 04:06:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2FAC36C; Wed, 21 Jan 2015 04:06:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CFAA0DC6; Wed, 21 Jan 2015 04:06:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L46biM036171; Wed, 21 Jan 2015 04:06:37 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L46a5C036167; Wed, 21 Jan 2015 04:06:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210406.t0L46a5C036167@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 04:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277473 - in head/sys/arm: arm include versatile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 04:06:38 -0000 Author: ian Date: Wed Jan 21 04:06:36 2015 New Revision: 277473 URL: https://svnweb.freebsd.org/changeset/base/277473 Log: The versatile platform had two copies of a bus_space that are essentially duplicates of the standard arm base bus_space, so just use it. Deleted: head/sys/arm/versatile/bus_space.c head/sys/arm/versatile/versatile_pci_bus_space.c head/sys/arm/versatile/versatile_pci_bus_space.h Modified: head/sys/arm/arm/bus_space_base.c head/sys/arm/include/bus.h head/sys/arm/versatile/files.versatile head/sys/arm/versatile/versatile_pci.c Modified: head/sys/arm/arm/bus_space_base.c ============================================================================== --- head/sys/arm/arm/bus_space_base.c Wed Jan 21 03:44:29 2015 (r277472) +++ head/sys/arm/arm/bus_space_base.c Wed Jan 21 04:06:36 2015 (r277473) @@ -45,7 +45,7 @@ bs_protos(generic); * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. */ -static struct bus_space arm_base_tag = { +static struct bus_space arm_base_bus_space = { /* privdata is whatever the implementer wants; unused in base tag */ .bs_privdata = NULL, @@ -153,5 +153,7 @@ static struct bus_space arm_base_tag = { }; #ifdef FDT -bus_space_tag_t fdtbus_bs_tag = &arm_base_tag; +bus_space_tag_t fdtbus_bs_tag = &arm_base_bus_space; #endif + +bus_space_tag_t arm_base_bs_tag = &arm_base_bus_space; Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Wed Jan 21 03:44:29 2015 (r277472) +++ head/sys/arm/include/bus.h Wed Jan 21 04:06:36 2015 (r277473) @@ -245,6 +245,7 @@ struct bus_space { bus_size_t, const uint64_t *, bus_size_t); }; +extern bus_space_tag_t arm_base_bs_tag; /* * Utility macros; INTERNAL USE ONLY. Modified: head/sys/arm/versatile/files.versatile ============================================================================== --- head/sys/arm/versatile/files.versatile Wed Jan 21 03:44:29 2015 (r277472) +++ head/sys/arm/versatile/files.versatile Wed Jan 21 04:06:36 2015 (r277473) @@ -1,5 +1,6 @@ # $FreeBSD$ +arm/arm/bus_space_base.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm11.S standard @@ -7,14 +8,12 @@ arm/arm/cpufunc_asm_arm11x6.S standard arm/arm/cpufunc_asm_armv5.S standard arm/arm/cpufunc_asm_armv6.S standard -arm/versatile/bus_space.c standard arm/versatile/pl050.c optional sc arm/versatile/sp804.c standard arm/versatile/versatile_machdep.c standard arm/versatile/versatile_clcd.c optional sc arm/versatile/versatile_common.c standard arm/versatile/versatile_pci.c optional pci -arm/versatile/versatile_pci_bus_space.c optional pci arm/versatile/versatile_sic.c standard arm/versatile/versatile_timer.c standard Modified: head/sys/arm/versatile/versatile_pci.c ============================================================================== --- head/sys/arm/versatile/versatile_pci.c Wed Jan 21 03:44:29 2015 (r277472) +++ head/sys/arm/versatile/versatile_pci.c Wed Jan 21 04:06:36 2015 (r277473) @@ -355,7 +355,7 @@ versatile_pci_activate_resource(device_t vaddr = (vm_offset_t)pmap_mapdev(rman_get_start(r), rman_get_size(r)); rman_set_bushandle(r, vaddr); - rman_set_bustag(r, versatile_bus_space_pcimem); + rman_set_bustag(r, arm_base_bs_tag); res = rman_activate_resource(r); break; case SYS_RES_IRQ: From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 04:19:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE14B719; Wed, 21 Jan 2015 04:19:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CBAC3ECB; Wed, 21 Jan 2015 04:19:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L4Jtex041348; Wed, 21 Jan 2015 04:19:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L4JtCa041347; Wed, 21 Jan 2015 04:19:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210419.t0L4JtCa041347@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 04:19:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277474 - head/sys/arm/versatile X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 04:19:56 -0000 Author: ian Date: Wed Jan 21 04:19:54 2015 New Revision: 277474 URL: https://svnweb.freebsd.org/changeset/base/277474 Log: Remove a no-longer-used include. Modified: head/sys/arm/versatile/versatile_pci.c Modified: head/sys/arm/versatile/versatile_pci.c ============================================================================== --- head/sys/arm/versatile/versatile_pci.c Wed Jan 21 04:06:36 2015 (r277473) +++ head/sys/arm/versatile/versatile_pci.c Wed Jan 21 04:19:54 2015 (r277474) @@ -53,8 +53,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include - #define MEM_SYS 0 #define MEM_CORE 1 #define MEM_BASE 2 From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 04:20:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CC3B9857 for ; Wed, 21 Jan 2015 04:20:01 +0000 (UTC) Received: from nm25-vm1.bullet.mail.bf1.yahoo.com (nm25-vm1.bullet.mail.bf1.yahoo.com [98.139.212.155]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CC90ED0 for ; Wed, 21 Jan 2015 04:20:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1421813993; bh=q6v02lzm07YXZ08R1xnFF3OPcSp7z1Q1vubKkPcRpXM=; h=Date:From:To:CC:Subject:References:In-Reply-To:From:Subject; b=LCFO44jMDfIp1A8CgfnC0hP8000AgiDvXSbzd4dsKeQ18VbL4XiGHSHi53qhDCFa6YiuzaHWKJ3VpL6ewijc/R4B9K1dsz7YvWwk8I42pIR0sScnnmf5Mnszt82VR4xQna4tYaWlo24+n1YjMHX8JVqhm/QHK4AYV+h0WOkyWlNiZdWOnvMthqQ32nQAv4+pCxGVjh1PHa+0tcJMYxLZ2X/BAY1e5qGCP90nyD2Did1PB5gg/L4X/BpHSReCjrQzA6KxM3Vy2MP6Zcl8aP8rtNcAuLcnWbHGKDroPTs8Cd/0DV77+qkBxzGX3aYt4rZ8eFfgPK42CbGPcgIgjECmcg== Received: from [98.139.212.151] by nm25.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 04:19:53 -0000 Received: from [98.139.213.8] by tm8.bullet.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 04:19:53 -0000 Received: from [127.0.0.1] by smtp108.mail.bf1.yahoo.com with NNFMP; 21 Jan 2015 04:19:53 -0000 X-Yahoo-Newman-Id: 591322.72942.bm@smtp108.mail.bf1.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: YfhJ62sVM1nJTg6FNB3LcqZwOfeN8XiASWCEKM_EW.6UzKK hODhugUXExOLCdQ5XoIJE6cZz8h8xaUCEVj3dY3j8DDTJ8vSkgvKRz0t4UV5 uWW2pJvedFdzS89YmK_17mOwjLuyWfRnlv8Un7ISplVwOijUqtorphIn.UxD Mx6x1woM4STRlHjWWXr5A1Ut4UUucyuYb9Fy3v9MXJJIg_H6.qU4zpFN1zY0 diO1FT6uS29Cct5FXZwWFL.ccoDONP_jlcVKb1PW2ZEbCXSnCQuzlUd_jT3W 2xHA_e0ciiPaYYs5jDg8XamxQxoFanKYE42sxo3wHuhnOdR_r2sdbjw6vT9z KuTBMigvu_PJ5UqmjjRQpUnsCtpGkNgMoIIZjYgDeu9iXCP4aqT2tB2yAxX0 1FtOol7U7FijEB94DDnIb5slvysAe6LVXB9mN1cpFMMaKVOiudhJ7owU0w4a ylPNwegwoYWjJlIRzE_qdcnShubpFsHeu.zivbBHVwFPDZM4aj9rJWMJezbl naZH7tSPJiXfL9yFZsH_QhP_THvRwsQ2LONUjW1RezRoOt8vMT6ClXfPmzex _57dOfsonFRTdjUEk86wYN.U31shFmwfSpXhHWpyJWUr.LbMX.Wkojgy6VOz PIHkKpxR46jeB1_5gXLqwipOY.WjXMSc5jCnW_lP7RO25 X-Yahoo-SMTP: xcjD0guswBAZaPPIbxpWwLcp9Unf Message-ID: <54BF28EE.1070801@FreeBSD.org> Date: Tue, 20 Jan 2015 23:19:58 -0500 From: Pedro Giffuni User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Steve Kargl Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121035243.GA29469@troutmask.apl.washington.edu> In-Reply-To: <20150121035243.GA29469@troutmask.apl.washington.edu> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Luigi Rizzo , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 04:20:02 -0000 On 01/20/15 22:52, Steve Kargl wrote: > On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: >> On 01/20/15 22:06, Adrian Chadd wrote: >>> * .. and apparently updating that gcc to something > 4.2 is verboten. >> The external toolchain can't be that bad(?). >> > Are the ever change knobs documented somewhere? > https://wiki.freebsd.org/ExternalToolchain >>> please do. I bet he'd love the help. >>> >> Ugh he doesn't and TBH, I don't care enough to look for >> consensus either. >> >> I find it interesting, and even funny that even the extreme >> copyleft are predicting clang will take over gcc: >> >> http://youtu.be/-ItFjEG3LaA >> > Clang won't take over gcc anytime soon. > Fortran, ada? > OK, I do use fortran and even when not everyone uses fortran it's still very difficult to avoid pulling in a version of gcc when installing very basic ports (I recall some X stuff still requires it), but there is already interest to make clang the default compiler in some linux distribution (I forgot which, sorry), so it will not happen soon but it may very well happen. Pedro. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 04:22:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 596CCB9D; Wed, 21 Jan 2015 04:22:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46D7FF7B; Wed, 21 Jan 2015 04:22:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L4MLjB045445; Wed, 21 Jan 2015 04:22:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L4MK59045443; Wed, 21 Jan 2015 04:22:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210422.t0L4MK59045443@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 04:22:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277475 - head/sys/arm/cavium/cns11xx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 04:22:21 -0000 Author: ian Date: Wed Jan 21 04:22:20 2015 New Revision: 277475 URL: https://svnweb.freebsd.org/changeset/base/277475 Log: Use the base arm bus_space instead of an identical local copy. Modified: head/sys/arm/cavium/cns11xx/econa.c head/sys/arm/cavium/cns11xx/files.econa Modified: head/sys/arm/cavium/cns11xx/econa.c ============================================================================== --- head/sys/arm/cavium/cns11xx/econa.c Wed Jan 21 04:19:54 2015 (r277474) +++ head/sys/arm/cavium/cns11xx/econa.c Wed Jan 21 04:22:20 2015 (r277475) @@ -56,116 +56,7 @@ unsigned int CPU_clock = 200000000; unsigned int AHB_clock; unsigned int APB_clock; -bs_protos(generic); - -struct bus_space econa_bs_tag = { - /* cookie */ - (void *) 0, - - /* mapping/unmapping */ - generic_bs_map, - generic_bs_unmap, - generic_bs_subregion, - - /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, - - /* barrier */ - generic_bs_barrier, - - /* read (single) */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region */ - NULL, - NULL, - NULL, - NULL, - - /* set multiple */ - NULL, - NULL, - NULL, - NULL, - - /* set region */ - NULL, - NULL, - NULL, - NULL, - - /* copy */ - NULL, - NULL, - NULL, - NULL, - - /* read (single) stream */ - NULL, - NULL, - NULL, - NULL, - - /* read multiple stream */ - NULL, - generic_bs_rm_2, - NULL, - NULL, - - /* read region stream */ - NULL, - NULL, - NULL, - NULL, - - /* write (single) stream */ - NULL, - NULL, - NULL, - NULL, - - /* write multiple stream */ - NULL, - generic_bs_wm_2, - NULL, - NULL, - - /* write region stream */ - NULL, - NULL, - NULL, - NULL -}; - -bus_space_tag_t obio_tag = &econa_bs_tag; +bus_space_tag_t obio_tag; static int econa_probe(device_t dev) @@ -464,8 +355,10 @@ econa_attach(device_t dev) struct econa_softc *sc = device_get_softc(dev); int i; + obio_tag = arm_base_bs_tag; + econa_softc = sc; - sc->ec_st = &econa_bs_tag; + sc->ec_st = arm_base_bs_tag; sc->ec_sh = ECONA_IO_BASE; sc->dev = dev; if (bus_space_subregion(sc->ec_st, sc->ec_sh, ECONA_PIC_BASE, @@ -547,7 +440,7 @@ econa_alloc_resource(device_t dev, devic rle->res = rman_reserve_resource(&sc->ec_mem_rman, start, end, count, flags, child); if (rle->res != NULL) { - rman_set_bustag(rle->res, &econa_bs_tag); + rman_set_bustag(rle->res, arm_base_bs_tag); rman_set_bushandle(rle->res, start); } break; Modified: head/sys/arm/cavium/cns11xx/files.econa ============================================================================== --- head/sys/arm/cavium/cns11xx/files.econa Wed Jan 21 04:19:54 2015 (r277474) +++ head/sys/arm/cavium/cns11xx/files.econa Wed Jan 21 04:22:20 2015 (r277475) @@ -6,6 +6,7 @@ arm/cavium/cns11xx/timer.c standard arm/cavium/cns11xx/uart_bus_ec.c optional uart arm/cavium/cns11xx/uart_cpu_ec.c optional uart dev/uart/uart_dev_ns8250.c optional uart +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/cavium/cns11xx/ehci_ebus.c optional ehci arm/cavium/cns11xx/ohci_ec.c optional ohci From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 04:28:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31686D69; Wed, 21 Jan 2015 04:28:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 135D0FB8; Wed, 21 Jan 2015 04:28:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L4SKTh046184; Wed, 21 Jan 2015 04:28:20 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L4SKrY046177; Wed, 21 Jan 2015 04:28:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210428.t0L4SKrY046177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 04:28:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277476 - head/sys/arm/samsung/s3c2xx0 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 04:28:21 -0000 Author: ian Date: Wed Jan 21 04:28:19 2015 New Revision: 277476 URL: https://svnweb.freebsd.org/changeset/base/277476 Log: Use the base arm bus_space instead of an identical local copy. Modified: head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 head/sys/arm/samsung/s3c2xx0/s3c24x0.c head/sys/arm/samsung/s3c2xx0/s3c2xx0var.h head/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c Modified: head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 ============================================================================== --- head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Wed Jan 21 04:22:20 2015 (r277475) +++ head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Wed Jan 21 04:28:19 2015 (r277476) @@ -1,4 +1,5 @@ # $FreeBSD$ +arm/arm/bus_space_base.c standard arm/arm/bus_space_asm_generic.S standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_arm9.S standard Modified: head/sys/arm/samsung/s3c2xx0/s3c24x0.c ============================================================================== --- head/sys/arm/samsung/s3c2xx0/s3c24x0.c Wed Jan 21 04:22:20 2015 (r277475) +++ head/sys/arm/samsung/s3c2xx0/s3c24x0.c Wed Jan 21 04:28:19 2015 (r277476) @@ -56,6 +56,8 @@ __FBSDID("$FreeBSD$"); #define S3C2XX0_XTAL_CLK 12000000 +bus_space_tag_t s3c2xx0_bs_tag; + #define IPL_LEVELS 13 u_int irqmasks[IPL_LEVELS]; @@ -349,7 +351,7 @@ s3c24x0_alloc_resource(device_t bus, dev panic("Unable to map address space %#lX-%#lX", start, end); - rman_set_bustag(res, &s3c2xx0_bs_tag); + rman_set_bustag(res, s3c2xx0_bs_tag); rman_set_bushandle(res, start); if (flags & RF_ACTIVE) { if (bus_activate_resource(child, type, *rid, res)) { @@ -442,8 +444,9 @@ s3c24x0_attach(device_t dev) unsigned int i, j; u_long irqmax; + s3c2xx0_bs_tag = arm_base_bs_tag; s3c2xx0_softc = &(sc->sc_sx); - sc->sc_sx.sc_iot = iot = &s3c2xx0_bs_tag; + sc->sc_sx.sc_iot = iot = s3c2xx0_bs_tag; s3c2xx0_softc->s3c2xx0_irq_rman.rm_type = RMAN_ARRAY; s3c2xx0_softc->s3c2xx0_irq_rman.rm_descr = "S3C24X0 IRQs"; s3c2xx0_softc->s3c2xx0_mem_rman.rm_type = RMAN_ARRAY; @@ -641,7 +644,7 @@ cpu_reset(void) { (void) disable_interrupts(PSR_I|PSR_F); - bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_wdt_ioh, WDT_WTCON, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_wdt_ioh, WDT_WTCON, WTCON_ENABLE | WTCON_CLKSEL_16 | WTCON_ENRST); for(;;); } @@ -651,9 +654,9 @@ s3c24x0_sleep(int mode __unused) { int reg; - reg = bus_space_read_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_clkman_ioh, + reg = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_clkman_ioh, CLKMAN_CLKCON); - bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_clkman_ioh, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_clkman_ioh, CLKMAN_CLKCON, reg | CLKCON_IDLE); } @@ -664,15 +667,15 @@ arm_get_next_irq(int last __unused) uint32_t intpnd; int irq, subirq; - if ((irq = bus_space_read_4(&s3c2xx0_bs_tag, + if ((irq = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTOFFSET)) != 0) { /* Clear the pending bit */ - intpnd = bus_space_read_4(&s3c2xx0_bs_tag, + intpnd = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTPND); - bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_SRCPND, intpnd); - bus_space_write_4(&s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTPND, intpnd); switch (irq) { @@ -682,9 +685,9 @@ arm_get_next_irq(int last __unused) case S3C24X0_INT_UART2: /* Find the sub IRQ */ subirq = 0x7ff; - subirq &= bus_space_read_4(&s3c2xx0_bs_tag, + subirq &= bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_SUBSRCPND); - subirq &= ~(bus_space_read_4(&s3c2xx0_bs_tag, + subirq &= ~(bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK)); if (subirq == 0) return (irq); @@ -692,7 +695,7 @@ arm_get_next_irq(int last __unused) subirq = ffs(subirq) - 1; /* Clear the sub irq pending bit */ - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_SUBSRCPND, (1 << subirq)); @@ -716,9 +719,9 @@ arm_get_next_irq(int last __unused) case S3C24X0_INT_8_23: /* Find the external interrupt being called */ subirq = 0x7fffff; - subirq &= bus_space_read_4(&s3c2xx0_bs_tag, + subirq &= bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTPEND); - subirq &= ~bus_space_read_4(&s3c2xx0_bs_tag, + subirq &= ~bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK); if (subirq == 0) return (irq); @@ -726,7 +729,7 @@ arm_get_next_irq(int last __unused) subirq = ffs(subirq) - 1; /* Clear the external irq pending bit */ - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTPEND, (1 << subirq)); @@ -748,22 +751,22 @@ arm_mask_irq(uintptr_t irq) irq -= S3C24X0_EXTIRQ_MIN; } if (irq < S3C24X0_SUBIRQ_MIN) { - mask = bus_space_read_4(&s3c2xx0_bs_tag, + mask = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK); mask |= (1 << irq); - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK, mask); } else if (irq < S3C24X0_EXTIRQ_MIN) { - mask = bus_space_read_4(&s3c2xx0_bs_tag, + mask = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK); mask |= (1 << (irq - S3C24X0_SUBIRQ_MIN)); - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK, mask); } else { - mask = bus_space_read_4(&s3c2xx0_bs_tag, + mask = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK); mask |= (1 << (irq - S3C24X0_EXTIRQ_MIN)); - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, GPIO_EINTMASK, mask); } } @@ -778,22 +781,22 @@ arm_unmask_irq(uintptr_t irq) irq -= S3C24X0_EXTIRQ_MIN; } if (irq < S3C24X0_SUBIRQ_MIN) { - mask = bus_space_read_4(&s3c2xx0_bs_tag, + mask = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK); mask &= ~(1 << irq); - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTMSK, mask); } else if (irq < S3C24X0_EXTIRQ_MIN) { - mask = bus_space_read_4(&s3c2xx0_bs_tag, + mask = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK); mask &= ~(1 << (irq - S3C24X0_SUBIRQ_MIN)); - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, INTCTL_INTSUBMSK, mask); } else { - mask = bus_space_read_4(&s3c2xx0_bs_tag, + mask = bus_space_read_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_gpio_ioh, GPIO_EINTMASK); mask &= ~(1 << (irq - S3C24X0_EXTIRQ_MIN)); - bus_space_write_4(&s3c2xx0_bs_tag, + bus_space_write_4(s3c2xx0_bs_tag, s3c2xx0_softc->sc_intctl_ioh, GPIO_EINTMASK, mask); } } Modified: head/sys/arm/samsung/s3c2xx0/s3c2xx0var.h ============================================================================== --- head/sys/arm/samsung/s3c2xx0/s3c2xx0var.h Wed Jan 21 04:22:20 2015 (r277475) +++ head/sys/arm/samsung/s3c2xx0/s3c2xx0var.h Wed Jan 21 04:28:19 2015 (r277476) @@ -74,7 +74,7 @@ struct s3c2xx0_ivar { typedef void *s3c2xx0_chipset_tag_t; -extern struct bus_space s3c2xx0_bs_tag; +extern bus_space_tag_t s3c2xx0_bs_tag; extern struct s3c2xx0_softc *s3c2xx0_softc; extern struct arm32_bus_dma_tag s3c2xx0_bus_dma; Modified: head/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c ============================================================================== --- head/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c Wed Jan 21 04:22:20 2015 (r277475) +++ head/sys/arm/samsung/s3c2xx0/uart_cpu_s3c2410.c Wed Jan 21 04:28:19 2015 (r277476) @@ -61,7 +61,7 @@ uart_cpu_getdev(int devtype, struct uart di->ops = uart_getops(&uart_s3c2410_class); di->bas.chan = 0; - di->bas.bst = &s3c2xx0_bs_tag; + di->bas.bst = s3c2xx0_bs_tag; di->bas.bsh = s3c2410_uart_vaddr; di->bas.regshft = 0; di->bas.rclk = s3c2410_pclk; @@ -69,7 +69,7 @@ uart_cpu_getdev(int devtype, struct uart di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; - uart_bus_space_io = &s3c2xx0_bs_tag; + uart_bus_space_io = s3c2xx0_bs_tag; uart_bus_space_mem = NULL; return (0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 05:05:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E70906A8; Wed, 21 Jan 2015 05:05:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D31EF3CF; Wed, 21 Jan 2015 05:05:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L55B3c065373; Wed, 21 Jan 2015 05:05:11 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L558XE065355; Wed, 21 Jan 2015 05:05:08 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210505.t0L558XE065355@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 05:05:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277477 - in head/sys/arm/xscale: i80321 i8134x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 05:05:12 -0000 Author: ian Date: Wed Jan 21 05:05:07 2015 New Revision: 277477 URL: https://svnweb.freebsd.org/changeset/base/277477 Log: Use the base arm bus_space instead of an identical local copy. Deleted: head/sys/arm/xscale/i80321/obio_space.c Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c head/sys/arm/xscale/i80321/files.ep80219 head/sys/arm/xscale/i80321/files.i80219 head/sys/arm/xscale/i80321/files.i80321 head/sys/arm/xscale/i80321/files.iq31244 head/sys/arm/xscale/i80321/iq31244_machdep.c head/sys/arm/xscale/i80321/obio.c head/sys/arm/xscale/i80321/obiovar.h head/sys/arm/xscale/i80321/uart_cpu_i80321.c head/sys/arm/xscale/i8134x/crb_machdep.c head/sys/arm/xscale/i8134x/files.i81342 head/sys/arm/xscale/i8134x/obio.c head/sys/arm/xscale/i8134x/obiovar.h head/sys/arm/xscale/i8134x/uart_cpu_i81342.c Modified: head/sys/arm/xscale/i80321/ep80219_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/ep80219_machdep.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/ep80219_machdep.c Wed Jan 21 05:05:07 2015 (r277477) @@ -312,7 +312,7 @@ initarm(struct arm_boot_params *abp) * registers. */ i80321_calibrate_delay(); - i80321_sdram_bounds(&obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE, + i80321_sdram_bounds(obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE, &memstart, &memsize); physmem = memsize / PAGE_SIZE; cninit(); Modified: head/sys/arm/xscale/i80321/files.ep80219 ============================================================================== --- head/sys/arm/xscale/i80321/files.ep80219 Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/files.ep80219 Wed Jan 21 05:05:07 2015 (r277477) @@ -6,7 +6,6 @@ arm/xscale/i80321/iq80321.c standard arm/xscale/i80321/ep80219_machdep.c standard arm/xscale/i80321/obio.c standard -arm/xscale/i80321/obio_space.c standard arm/xscale/i80321/uart_cpu_i80321.c optional uart arm/xscale/i80321/uart_bus_i80321.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/arm/xscale/i80321/files.i80219 ============================================================================== --- head/sys/arm/xscale/i80321/files.i80219 Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/files.i80219 Wed Jan 21 05:05:07 2015 (r277477) @@ -2,6 +2,7 @@ # # IOP Specific # +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard arm/xscale/i80321/i80321.c standard Modified: head/sys/arm/xscale/i80321/files.i80321 ============================================================================== --- head/sys/arm/xscale/i80321/files.i80321 Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/files.i80321 Wed Jan 21 05:05:07 2015 (r277477) @@ -1,4 +1,5 @@ #$FreeBSD$ +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard arm/xscale/i80321/i80321.c standard Modified: head/sys/arm/xscale/i80321/files.iq31244 ============================================================================== --- head/sys/arm/xscale/i80321/files.iq31244 Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/files.iq31244 Wed Jan 21 05:05:07 2015 (r277477) @@ -3,7 +3,6 @@ arm/xscale/i80321/iq80321.c standard arm/xscale/i80321/iq31244_machdep.c standard arm/xscale/i80321/iq31244_7seg.c optional iq31244_7seg arm/xscale/i80321/obio.c standard -arm/xscale/i80321/obio_space.c standard arm/xscale/i80321/uart_cpu_i80321.c optional uart arm/xscale/i80321/uart_bus_i80321.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/arm/xscale/i80321/iq31244_machdep.c ============================================================================== --- head/sys/arm/xscale/i80321/iq31244_machdep.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/iq31244_machdep.c Wed Jan 21 05:05:07 2015 (r277477) @@ -313,7 +313,7 @@ initarm(struct arm_boot_params *abp) * registers. */ i80321_calibrate_delay(); - i80321_sdram_bounds(&obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE, + i80321_sdram_bounds(obio_bs_tag, IQ80321_80321_VBASE + VERDE_MCU_BASE, &memstart, &memsize); physmem = memsize / PAGE_SIZE; cninit(); Modified: head/sys/arm/xscale/i80321/obio.c ============================================================================== --- head/sys/arm/xscale/i80321/obio.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/obio.c Wed Jan 21 05:05:07 2015 (r277477) @@ -58,6 +58,8 @@ __FBSDID("$FreeBSD$"); #include #include +bus_space_tag_t obio_bs_tag; + int obio_probe(device_t); int obio_attach(device_t); @@ -72,7 +74,8 @@ obio_attach(device_t dev) { struct obio_softc *sc = device_get_softc(dev); - sc->oba_st = &obio_bs_tag; + obio_bs_tag = arm_base_bs_tag; + sc->oba_st = obio_bs_tag; sc->oba_addr = IQ80321_OBIO_BASE; sc->oba_size = IQ80321_OBIO_SIZE; sc->oba_rman.rm_type = RMAN_ARRAY; Modified: head/sys/arm/xscale/i80321/obiovar.h ============================================================================== --- head/sys/arm/xscale/i80321/obiovar.h Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/obiovar.h Wed Jan 21 05:05:07 2015 (r277477) @@ -53,6 +53,6 @@ struct obio_softc { struct rman oba_irq_rman; }; -extern struct bus_space obio_bs_tag; +extern bus_space_tag_t obio_bs_tag; #endif /* _IQ80321_OBIOVAR_H_ */ Modified: head/sys/arm/xscale/i80321/uart_cpu_i80321.c ============================================================================== --- head/sys/arm/xscale/i80321/uart_cpu_i80321.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i80321/uart_cpu_i80321.c Wed Jan 21 05:05:07 2015 (r277477) @@ -53,14 +53,14 @@ uart_cpu_getdev(int devtype, struct uart { di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = &obio_bs_tag; + di->bas.bst = obio_bs_tag; di->bas.regshft = 0; di->bas.rclk = 0; di->baudrate = 115200; di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; - uart_bus_space_io = &obio_bs_tag; + uart_bus_space_io = obio_bs_tag; uart_bus_space_mem = NULL; di->bas.bsh = 0xfe800000; return (0); Modified: head/sys/arm/xscale/i8134x/crb_machdep.c ============================================================================== --- head/sys/arm/xscale/i8134x/crb_machdep.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i8134x/crb_machdep.c Wed Jan 21 05:05:07 2015 (r277477) @@ -293,7 +293,7 @@ initarm(struct arm_boot_params *abp) cpu_setup(""); i80321_calibrate_delay(); - i81342_sdram_bounds(&obio_bs_tag, IOP34X_VADDR, &memstart, &memsize); + i81342_sdram_bounds(obio_bs_tag, IOP34X_VADDR, &memstart, &memsize); physmem = memsize / PAGE_SIZE; cninit(); /* Set stack for exception handlers */ Modified: head/sys/arm/xscale/i8134x/files.i81342 ============================================================================== --- head/sys/arm/xscale/i8134x/files.i81342 Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i8134x/files.i81342 Wed Jan 21 05:05:07 2015 (r277477) @@ -1,4 +1,5 @@ # $FreeBSD$ +arm/arm/bus_space_base.c standard arm/arm/bus_space_generic.c standard arm/arm/cpufunc_asm_xscale.S standard arm/arm/cpufunc_asm_xscale_c3.S standard @@ -9,7 +10,6 @@ arm/xscale/i8134x/i81342_mcu.c standard arm/xscale/i8134x/i81342_pci.c optional pci arm/xscale/i8134x/i81342_space.c standard arm/xscale/i8134x/obio.c standard -arm/xscale/i8134x/obio_space.c standard arm/xscale/i8134x/uart_bus_i81342.c optional uart arm/xscale/i8134x/uart_cpu_i81342.c optional uart dev/uart/uart_dev_ns8250.c optional uart Modified: head/sys/arm/xscale/i8134x/obio.c ============================================================================== --- head/sys/arm/xscale/i8134x/obio.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i8134x/obio.c Wed Jan 21 05:05:07 2015 (r277477) @@ -56,6 +56,7 @@ __FBSDID("$FreeBSD$"); #include #include +bus_space_tag_t obio_bs_tag; static int obio_probe(device_t dev) @@ -68,7 +69,8 @@ obio_attach(device_t dev) { struct obio_softc *sc = device_get_softc(dev); - sc->oba_st = &obio_bs_tag; + obio_bs_tag = arm_base_bs_tag; + sc->oba_st = obio_bs_tag; sc->oba_rman.rm_type = RMAN_ARRAY; sc->oba_rman.rm_descr = "OBIO I/O"; if (rman_init(&sc->oba_rman) != 0 || Modified: head/sys/arm/xscale/i8134x/obiovar.h ============================================================================== --- head/sys/arm/xscale/i8134x/obiovar.h Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i8134x/obiovar.h Wed Jan 21 05:05:07 2015 (r277477) @@ -50,6 +50,6 @@ struct obio_softc { struct rman oba_irq_rman; }; -extern struct bus_space obio_bs_tag; +extern bus_space_tag_t obio_bs_tag; #endif /* _IQ80321_OBIOVAR_H_ */ Modified: head/sys/arm/xscale/i8134x/uart_cpu_i81342.c ============================================================================== --- head/sys/arm/xscale/i8134x/uart_cpu_i81342.c Wed Jan 21 04:28:19 2015 (r277476) +++ head/sys/arm/xscale/i8134x/uart_cpu_i81342.c Wed Jan 21 05:05:07 2015 (r277477) @@ -54,14 +54,14 @@ uart_cpu_getdev(int devtype, struct uart di->ops = uart_getops(&uart_ns8250_class); di->bas.chan = 0; - di->bas.bst = &obio_bs_tag; + di->bas.bst = obio_bs_tag; di->bas.regshft = 2; di->bas.rclk = 33334000; di->baudrate = 115200; di->databits = 8; di->stopbits = 1; di->parity = UART_PARITY_NONE; - uart_bus_space_io = &obio_bs_tag; + uart_bus_space_io = obio_bs_tag; uart_bus_space_mem = NULL; di->bas.bsh = IOP34X_UART0_VADDR; return (0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 05:10:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85A1B81E; Wed, 21 Jan 2015 05:10:24 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67A15660; Wed, 21 Jan 2015 05:10:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L5AOM3068362; Wed, 21 Jan 2015 05:10:24 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L5ANwA068360; Wed, 21 Jan 2015 05:10:24 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210510.t0L5ANwA068360@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 05:10:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277478 - in head/sys/arm/xscale: i80321 i8134x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 05:10:24 -0000 Author: ian Date: Wed Jan 21 05:10:23 2015 New Revision: 277478 URL: https://svnweb.freebsd.org/changeset/base/277478 Log: Use the base arm bus_space instead of an identical local copy. Modified: head/sys/arm/xscale/i80321/i80321_space.c head/sys/arm/xscale/i8134x/i81342_space.c Modified: head/sys/arm/xscale/i80321/i80321_space.c ============================================================================== --- head/sys/arm/xscale/i80321/i80321_space.c Wed Jan 21 05:05:07 2015 (r277477) +++ head/sys/arm/xscale/i80321/i80321_space.c Wed Jan 21 05:10:23 2015 (r277478) @@ -63,124 +63,12 @@ __FBSDID("$FreeBSD$"); bs_protos(i80321); bs_protos(i80321_io); bs_protos(i80321_mem); -bs_protos(generic); - -/* - * Template bus_space -- copied, and the bits that are NULL are - * filled in. - */ -const struct bus_space i80321_bs_tag_template = { - /* cookie */ - (void *) 0, - - /* mapping/unmapping */ - NULL, - NULL, - i80321_bs_subregion, - - /* allocation/deallocation */ - NULL, - NULL, - - /* barrier */ - i80321_bs_barrier, - - /* read (single) */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region */ - NULL, - generic_bs_wr_2, - generic_bs_wr_4, - NULL, - - /* set multiple */ - NULL, - NULL, - NULL, - NULL, - - /* set region */ - NULL, - generic_bs_sr_2, - generic_bs_sr_4, - NULL, - - /* copy */ - NULL, - generic_bs_c_2, - NULL, - NULL, - - /* read (single) stream */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple stream */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region stream */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) stream */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple stream */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region stream */ - NULL, - generic_bs_wr_2, - generic_bs_wr_4, - NULL, -}; void i80321_bs_init(bus_space_tag_t bs, void *cookie) { - *bs = i80321_bs_tag_template; + *bs = *arm_base_bs_tag; bs->bs_privdata = cookie; } @@ -188,7 +76,7 @@ void i80321_io_bs_init(bus_space_tag_t bs, void *cookie) { - *bs = i80321_bs_tag_template; + *bs = *arm_base_bs_tag; bs->bs_privdata = cookie; bs->bs_map = i80321_io_bs_map; @@ -202,7 +90,7 @@ void i80321_mem_bs_init(bus_space_tag_t bs, void *cookie) { - *bs = i80321_bs_tag_template; + *bs = *arm_base_bs_tag; bs->bs_privdata = cookie; bs->bs_map = i80321_mem_bs_map; Modified: head/sys/arm/xscale/i8134x/i81342_space.c ============================================================================== --- head/sys/arm/xscale/i8134x/i81342_space.c Wed Jan 21 05:05:07 2015 (r277477) +++ head/sys/arm/xscale/i8134x/i81342_space.c Wed Jan 21 05:10:23 2015 (r277478) @@ -64,124 +64,12 @@ __FBSDID("$FreeBSD$"); bs_protos(i81342); bs_protos(i81342_io); bs_protos(i81342_mem); -bs_protos(generic); - -/* - * Template bus_space -- copied, and the bits that are NULL are - * filled in. - */ -const struct bus_space i81342_bs_tag_template = { - /* cookie */ - (void *) 0, - - /* mapping/unmapping */ - NULL, - NULL, - i81342_bs_subregion, - - /* allocation/deallocation */ - NULL, - NULL, - - /* barrier */ - i81342_bs_barrier, - - /* read (single) */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region */ - NULL, - generic_bs_wr_2, - generic_bs_wr_4, - NULL, - - /* set multiple */ - NULL, - NULL, - NULL, - NULL, - - /* set region */ - NULL, - generic_bs_sr_2, - generic_bs_sr_4, - NULL, - - /* copy */ - NULL, - generic_bs_c_2, - NULL, - NULL, - - /* read (single) stream */ - generic_bs_r_1, - generic_bs_r_2, - generic_bs_r_4, - NULL, - - /* read multiple stream */ - generic_bs_rm_1, - generic_bs_rm_2, - generic_bs_rm_4, - NULL, - - /* read region stream */ - generic_bs_rr_1, - generic_bs_rr_2, - generic_bs_rr_4, - NULL, - - /* write (single) stream */ - generic_bs_w_1, - generic_bs_w_2, - generic_bs_w_4, - NULL, - - /* write multiple stream */ - generic_bs_wm_1, - generic_bs_wm_2, - generic_bs_wm_4, - NULL, - - /* write region stream */ - NULL, - generic_bs_wr_2, - generic_bs_wr_4, - NULL, -}; void i81342_bs_init(bus_space_tag_t bs, void *cookie) { - *bs = i81342_bs_tag_template; + *bs = *arm_base_bs_tag; bs->bs_privdata = cookie; } @@ -189,7 +77,7 @@ void i81342_io_bs_init(bus_space_tag_t bs, void *cookie) { - *bs = i81342_bs_tag_template; + *bs = *arm_base_bs_tag; bs->bs_privdata = cookie; bs->bs_map = i81342_io_bs_map; @@ -203,7 +91,7 @@ void i81342_mem_bs_init(bus_space_tag_t bs, void *cookie) { - *bs = i81342_bs_tag_template; + *bs = *arm_base_bs_tag; bs->bs_privdata = cookie; bs->bs_map = i81342_mem_bs_map; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 05:23:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 750F3A4D; Wed, 21 Jan 2015 05:23:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 624C37AB; Wed, 21 Jan 2015 05:23:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L5NADs074470; Wed, 21 Jan 2015 05:23:10 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L5NA57074469; Wed, 21 Jan 2015 05:23:10 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210523.t0L5NA57074469@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 05:23:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277479 - head/sys/arm/xscale/pxa X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 05:23:10 -0000 Author: ian Date: Wed Jan 21 05:23:09 2015 New Revision: 277479 URL: https://svnweb.freebsd.org/changeset/base/277479 Log: Use explicit initializer style, fill in missing functions as unimplemented. Modified: head/sys/arm/xscale/pxa/pxa_space.c Modified: head/sys/arm/xscale/pxa/pxa_space.c ============================================================================== --- head/sys/arm/xscale/pxa/pxa_space.c Wed Jan 21 05:10:23 2015 (r277478) +++ head/sys/arm/xscale/pxa/pxa_space.c Wed Jan 21 05:23:09 2015 (r277479) @@ -65,73 +65,109 @@ bs_protos(pxa); */ struct bus_space _base_tag = { /* cookie */ - (void *) 0, + .bs_privdata = NULL, /* mapping/unmapping */ - generic_bs_map, - generic_bs_unmap, - generic_bs_subregion, + .bs_map = generic_bs_map, + .bs_unmap = generic_bs_unmap, + .bs_subregion = generic_bs_subregion, /* allocation/deallocation */ - generic_bs_alloc, - generic_bs_free, + .bs_alloc = generic_bs_alloc, + .bs_free = generic_bs_free, /* barrier */ - generic_bs_barrier, + .bs_barrier = generic_bs_barrier, /* read (single) */ - pxa_bs_r_1, - pxa_bs_r_2, - pxa_bs_r_4, - NULL, + .bs_r_1 = pxa_bs_r_1, + .bs_r_2 = pxa_bs_r_2, + .bs_r_4 = pxa_bs_r_4, + .bs_r_8 = BS_UNIMPLEMENTED, /* read multiple */ - pxa_bs_rm_1, - pxa_bs_rm_2, - NULL, - NULL, + .bs_rm_1 = pxa_bs_rm_1, + .bs_rm_2 = pxa_bs_rm_2, + .bs_rm_4 = BS_UNIMPLEMENTED, + .bs_rm_8 = BS_UNIMPLEMENTED, /* read region */ - pxa_bs_rr_1, - NULL, - NULL, - NULL, + .bs_rr_1 = pxa_bs_rr_1, + .bs_rr_2 = BS_UNIMPLEMENTED, + .bs_rr_4 = BS_UNIMPLEMENTED, + .bs_rr_8 = BS_UNIMPLEMENTED, /* write (single) */ - pxa_bs_w_1, - pxa_bs_w_2, - pxa_bs_w_4, - NULL, + .bs_w_1 = pxa_bs_w_1, + .bs_w_2 = pxa_bs_w_2, + .bs_w_4 = pxa_bs_w_4, + .bs_w_8 = BS_UNIMPLEMENTED, /* write multiple */ - pxa_bs_wm_1, - pxa_bs_wm_2, - NULL, - NULL, + .bs_wm_1 = pxa_bs_wm_1, + .bs_wm_2 = pxa_bs_wm_2, + .bs_wm_4 = BS_UNIMPLEMENTED, + .bs_wm_8 = BS_UNIMPLEMENTED, /* write region */ - NULL, - NULL, - NULL, - NULL, + .bs_wr_1 = BS_UNIMPLEMENTED, + .bs_wr_2 = BS_UNIMPLEMENTED, + .bs_wr_4 = BS_UNIMPLEMENTED, + .bs_wr_8 = BS_UNIMPLEMENTED, /* set multiple */ - NULL, - NULL, - NULL, - NULL, + .bs_sm_1 = BS_UNIMPLEMENTED, + .bs_sm_2 = BS_UNIMPLEMENTED, + .bs_sm_4 = BS_UNIMPLEMENTED, + .bs_sm_8 = BS_UNIMPLEMENTED, /* set region */ - NULL, - NULL, - NULL, - NULL, + .bs_sr_1 = BS_UNIMPLEMENTED, + .bs_sr_2 = BS_UNIMPLEMENTED, + .bs_sr_4 = BS_UNIMPLEMENTED, + .bs_sr_8 = BS_UNIMPLEMENTED, /* copy */ - NULL, - NULL, - NULL, - NULL, + .bs_c_1 = BS_UNIMPLEMENTED, + .bs_c_2 = BS_UNIMPLEMENTED, + .bs_c_4 = BS_UNIMPLEMENTED, + .bs_c_8 = BS_UNIMPLEMENTED, + + /* read stream (single) */ + .bs_r_1_s = BS_UNIMPLEMENTED, + .bs_r_2_s = BS_UNIMPLEMENTED, + .bs_r_4_s = BS_UNIMPLEMENTED, + .bs_r_8_s = BS_UNIMPLEMENTED, + + /* read multiple stream */ + .bs_rm_1_s = BS_UNIMPLEMENTED, + .bs_rm_2_s = BS_UNIMPLEMENTED, + .bs_rm_4_s = BS_UNIMPLEMENTED, + .bs_rm_8_s = BS_UNIMPLEMENTED, + + /* read region stream */ + .bs_rr_1_s = BS_UNIMPLEMENTED, + .bs_rr_2_s = BS_UNIMPLEMENTED, + .bs_rr_4_s = BS_UNIMPLEMENTED, + .bs_rr_8_s = BS_UNIMPLEMENTED, + + /* write stream (single) */ + .bs_w_1_s = BS_UNIMPLEMENTED, + .bs_w_2_s = BS_UNIMPLEMENTED, + .bs_w_4_s = BS_UNIMPLEMENTED, + .bs_w_8_s = BS_UNIMPLEMENTED, + + /* write multiple stream */ + .bs_wm_1_s = BS_UNIMPLEMENTED, + .bs_wm_2_s = BS_UNIMPLEMENTED, + .bs_wm_4_s = BS_UNIMPLEMENTED, + .bs_wm_8_s = BS_UNIMPLEMENTED, + + /* write region stream */ + .bs_wr_1_s = BS_UNIMPLEMENTED, + .bs_wr_2_s = BS_UNIMPLEMENTED, + .bs_wr_4_s = BS_UNIMPLEMENTED, + .bs_wr_8_s = BS_UNIMPLEMENTED, }; static struct bus_space _obio_tag; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 05:31:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8580DBEC; Wed, 21 Jan 2015 05:31:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7283886B; Wed, 21 Jan 2015 05:31:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L5VtOc078995; Wed, 21 Jan 2015 05:31:55 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L5VtJs078993; Wed, 21 Jan 2015 05:31:55 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501210531.t0L5VtJs078993@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 05:31:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277480 - in head/sys/arm: samsung/s3c2xx0 xscale/i8134x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 05:31:55 -0000 Author: ian Date: Wed Jan 21 05:31:54 2015 New Revision: 277480 URL: https://svnweb.freebsd.org/changeset/base/277480 Log: Remove a couple files that are no longer used (functionality take over by arm/bus_space_base.c). Deleted: head/sys/arm/samsung/s3c2xx0/s3c2xx0_space.c head/sys/arm/xscale/i8134x/obio_space.c Modified: head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Modified: head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 ============================================================================== --- head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Wed Jan 21 05:23:09 2015 (r277479) +++ head/sys/arm/samsung/s3c2xx0/files.s3c2xx0 Wed Jan 21 05:31:54 2015 (r277480) @@ -7,7 +7,6 @@ arm/samsung/s3c2xx0/board_ln2410sbc.c op arm/samsung/s3c2xx0/s3c24x0_rtc.c standard arm/samsung/s3c2xx0/s3c24x0_machdep.c standard arm/samsung/s3c2xx0/s3c24x0.c standard -arm/samsung/s3c2xx0/s3c2xx0_space.c standard arm/samsung/s3c2xx0/s3c24x0_clk.c standard arm/samsung/s3c2xx0/uart_bus_s3c2410.c optional uart arm/samsung/s3c2xx0/uart_cpu_s3c2410.c optional uart From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 05:53:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1122DEA5; Wed, 21 Jan 2015 05:53:50 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8DFEA05; Wed, 21 Jan 2015 05:53:49 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id bj1so50654003pad.9; Tue, 20 Jan 2015 21:53:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=80w0iMhzauGcQpIeSKDAVl68ZDdm98ofM8li9iYtp2U=; b=uBc3DPG1tX3gFyKsqMdmPz6oM7bmBJcS8R6HJirFo7e+5be89X9DyNzt0Uma18fIhZ OErfsVq637LWaVn79EpqatyN4/lGu/24RoZj66N/b2v3novM4LQvTtaYHZls/D4Vm5zG Gc4rcPuiDyE816n/eKt4D1gtbkI13cYXq9YRyshshWFAdmVo2DsdGP5oMOS3brqH+ruH CNSxoSJiACwcqWOeb9nDutfj5fW3wswWQWyPzcVqPIxvlwghThxJz/BVdB3AX0Hn5SOm 7frL9366Dn+zxfiH+MpAuLtK4CqetVZyBOvXcDNfnMyK5hLm+CiX7FP+9RwXbqw8WpKG Yo4A== X-Received: by 10.70.91.201 with SMTP id cg9mr24449679pdb.57.1421819629437; Tue, 20 Jan 2015 21:53:49 -0800 (PST) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id ds16sm1732557pdb.65.2015.01.20.21.53.47 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 20 Jan 2015 21:53:48 -0800 (PST) Sender: Navdeep Parhar Date: Tue, 20 Jan 2015 21:53:40 -0800 From: Navdeep Parhar To: Pedro Giffuni Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121055329.GB3307@ox> Mail-Followup-To: Pedro Giffuni , Adrian Chadd , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BF1EB0.2080901@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Luigi Rizzo , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 05:53:50 -0000 On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: > > On 01/20/15 22:06, Adrian Chadd wrote: > >On 20 January 2015 at 18:19, Alexey Dokuchaev wrote: > >>On Tue, Jan 20, 2015 at 07:50:23PM -0500, Pedro Giffuni wrote: > >>>But the fix is rather ugly, isn't it? I would personally prefer to just > >>>kill the older gcc but in the meantime updating it so that it behaves > >>>like the updated gcc/clang would be better. IMHO. > >>Seconded. Putting extra harness on the code to avoid bugs in the compiler > >>that were actually fixed upsteam is totally bogus. > >Right, but: > > > >* not all of us work on compilers; > >* not all of us want to currently be working on compilers; > >* some of us have to use the gcc that's in tree; > >* .. and apparently updating that gcc to something > 4.2 is verboten. > > The external toolchain can't be that bad(?). > > >So if someone wants to help Navdeep by backporting those options, > > Hmm .. didn't I post a patch? > > >please do. I bet he'd love the help. > > > Ugh he doesn't and TBH, I don't care enough to look for > consensus either. Let's please just move on from this discussion then. I am not familiar with gcc internals so I can't vouch for this patch, and gcc is the default compiler on platforms that I cannot test. Given that, it would be reckless of me to push a gcc patch just to get it to play nice with one single file in the tree. High risk, little reward (given that -fms-extensions can be applied to just the file in question without disturbing anything else in the tree). Regards, Navdeep From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 07:54:17 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E6A8C6F; Wed, 21 Jan 2015 07:54:17 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A1F6B6D2; Wed, 21 Jan 2015 07:54:16 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0L7sBaO012198 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jan 2015 09:54:11 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0L7sBaO012198 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0L7sAfU012197; Wed, 21 Jan 2015 09:54:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 21 Jan 2015 09:54:10 +0200 From: Konstantin Belousov To: Nathan Whitehorn Subject: Re: svn commit: r277421 - head/sys/powerpc/powerpc Message-ID: <20150121075410.GM42409@kib.kiev.ua> References: <201501201621.t0KGLx26096724@svn.freebsd.org> <20150120191438.GL42409@kib.kiev.ua> <54BF240C.2090107@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BF240C.2090107@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 07:54:17 -0000 On Tue, Jan 20, 2015 at 07:59:08PM -0800, Nathan Whitehorn wrote: > > On 01/20/15 11:14, Konstantin Belousov wrote: > > On Tue, Jan 20, 2015 at 04:21:59PM +0000, Nathan Whitehorn wrote: > >> Author: nwhitehorn > >> Date: Tue Jan 20 16:21:59 2015 > >> New Revision: 277421 > >> URL: https://svnweb.freebsd.org/changeset/base/277421 > >> > >> Log: > >> There does not seem to be any reason to acquire GIANT here. Follow amd64 > >> in removing it. > >> > >> MFC after: 1 month > >> > >> Modified: > >> head/sys/powerpc/powerpc/mem.c > >> > >> Modified: head/sys/powerpc/powerpc/mem.c > >> ============================================================================== > >> --- head/sys/powerpc/powerpc/mem.c Tue Jan 20 15:45:09 2015 (r277420) > >> +++ head/sys/powerpc/powerpc/mem.c Tue Jan 20 16:21:59 2015 (r277421) > >> @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, > >> cnt = 0; > >> error = 0; > >> > >> - GIANT_REQUIRED; > >> - > > This is not an acquisition, to be pedantic. Really, it is cdevsw which > > has D_NEEDGIANT flag which acquires Giant. After architectures get > > rid of GIANT_REQUIRED, flag can be removed. > > > Just so I understand, you are not objecting to this commit, right? Absolutely not, this is the right thing to do. > Just > pointing out that (a) my commit message was wrong and that (b) once all > architectures make this change (presumably more involved) we can get rid > of the D_NEEDGIANT in /sys/dev/mem/memdev.c? Exactly. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:00:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58BC9E56; Wed, 21 Jan 2015 08:00:19 +0000 (UTC) Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D28F976D; Wed, 21 Jan 2015 08:00:18 +0000 (UTC) Received: from [IPv6:2001:7b8:3a7::5529:9fa5:cf6:9530] (unknown [IPv6:2001:7b8:3a7:0:5529:9fa5:cf6:9530]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 2A1F85C2E; Wed, 21 Jan 2015 09:00:08 +0100 (CET) Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_CE364395-FE82-4164-9419-8596551839E5"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Dimitry Andric In-Reply-To: <20150121055329.GB3307@ox> Date: Wed, 21 Jan 2015 09:00:03 +0100 Message-Id: <98838DA6-1969-4764-83DE-71F7BB568E23@FreeBSD.org> References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121055329.GB3307@ox> To: Navdeep Parhar X-Mailer: Apple Mail (2.1993) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:00:19 -0000 --Apple-Mail=_CE364395-FE82-4164-9419-8596551839E5 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 Jan 2015, at 06:53, Navdeep Parhar wrote: >=20 > On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: >>=20 >> On 01/20/15 22:06, Adrian Chadd wrote: >>> On 20 January 2015 at 18:19, Alexey Dokuchaev = wrote: >>>> On Tue, Jan 20, 2015 at 07:50:23PM -0500, Pedro Giffuni wrote: >>>>> But the fix is rather ugly, isn't it? I would personally prefer to = just >>>>> kill the older gcc but in the meantime updating it so that it = behaves >>>>> like the updated gcc/clang would be better. IMHO. >>>> Seconded. Putting extra harness on the code to avoid bugs in the = compiler >>>> that were actually fixed upsteam is totally bogus. >>> Right, but: >>>=20 >>> * not all of us work on compilers; >>> * not all of us want to currently be working on compilers; >>> * some of us have to use the gcc that's in tree; >>> * .. and apparently updating that gcc to something > 4.2 is = verboten. >>=20 >> The external toolchain can't be that bad(?). >>=20 >>> So if someone wants to help Navdeep by backporting those options, >>=20 >> Hmm .. didn't I post a patch? >>=20 >>> please do. I bet he'd love the help. >>>=20 >> Ugh he doesn't and TBH, I don't care enough to look for >> consensus either. >=20 > Let's please just move on from this discussion then. I am not = familiar > with gcc internals so I can't vouch for this patch, and gcc is the > default compiler on platforms that I cannot test. Given that, it = would > be reckless of me to push a gcc patch just to get it to play nice with > one single file in the tree. High risk, little reward (given that > -fms-extensions can be applied to just the file in question without > disturbing anything else in the tree). Alternatively, just use the ${GCC_MS_EXTENSIONS} Makefile macro, which I specifically introduced for this issue. See e.g. sys/modules/ibcore/Makefile for an example. -Dimitry --Apple-Mail=_CE364395-FE82-4164-9419-8596551839E5 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlS/XIYACgkQsF6jCi4glqMLNgCfTU7AL+edjlRlCpRA1CDPdFnZ k4QAni+w/Q/CjcwMiY9RLVLD5NJ3apiD =wRrZ -----END PGP SIGNATURE----- --Apple-Mail=_CE364395-FE82-4164-9419-8596551839E5-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:01:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 47021FBC; Wed, 21 Jan 2015 08:01:45 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 0B531813; Wed, 21 Jan 2015 08:01:44 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id 6313F7E820; Wed, 21 Jan 2015 18:51:47 +1100 (EST) Message-ID: <54BF5A7B.2080601@freebsd.org> Date: Wed, 21 Jan 2015 18:51:23 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Will Andrews , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r275832 - head/tools/tools/nanobsd References: <201412161759.sBGHx6ZL016021@svn.freebsd.org> In-Reply-To: <201412161759.sBGHx6ZL016021@svn.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: imp@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:01:45 -0000 Hi Will, On 12/17/14 04:59, Will Andrews wrote: > Author: will > Date: Tue Dec 16 17:59:05 2014 > New Revision: 275832 > URL: https://svnweb.freebsd.org/changeset/base/275832 > > Log: > Make NanoBSD source-able from other scripts. > > Summary: > This change converts NanoBSD into a two-script bundle. > - defaults.sh contains all non-CLI code. Most NanoBSD code is moved into > this file. > - nanobsd.sh now consists just of a command line interface that calls into > functions in defaults.sh. > > Test Plan: Run NanoBSD using a previously-working configuration. > > Reviewers: imp > > Reviewed By: imp > > Differential Revision: https://reviews.freebsd.org/D1321 > > Added: > head/tools/tools/nanobsd/defaults.sh (contents, props changed) > Modified: > head/tools/tools/nanobsd/nanobsd.sh I think this change introduced a bug - I'm seeing nanobsd error out with the "NANO_TOOLS directory does not exist" message. The problem is that NANO_TOOLS is initialised to "tools/tools/nanobsd", and you changed the test in nanobsd.sh to *not* check for "${NANO_SRC}/${NANO_TOOLS}", which errors out except if the cwd is ${NANO_SRC}. You tweak NANO_TOOLS appropriately in set_defaults_and_export() but it's run after the dir test. There are a couple of ways to fix but I'll leave it to you to decide which you prefer. Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:04:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34CB31C3; Wed, 21 Jan 2015 08:04:54 +0000 (UTC) Received: from mail-ie0-x230.google.com (mail-ie0-x230.google.com [IPv6:2607:f8b0:4001:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDB3383E; Wed, 21 Jan 2015 08:04:53 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id rd18so12197255iec.7; Wed, 21 Jan 2015 00:04:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=siZcRpcqeEw4NW1dGHTFfnsoGnSyzh88r/dIN1PhpgY=; b=BnvKUVU95oCanzGrJBqX9XF2l/yAtQw799ckE/EuGcNb0jxfXOl8Ss53lu76OZBiVK nxI/ANDaKVJGQldYDrcKDdRj1kE/pFp46Ck66CiSmU0HFt2YzQ+NGHzEGwy8ohpcT33E 9NTEFG4SXYZy0hwK66vLdHssJIQEGMawtCSLcxRjk0SlWhnZYHazJ59VbJHDIwSy8afD JYD42Mv99ppXxJHUfDF9TFb4q/dxk8SRBrkoSVi+GVYxWL8N0ho/keGgT33u04HxmxrP 5mzuJfAzFOddKZL0hM0c9dEZOQ+OSun9yxRDVVK/E2n5dZAa2qNTXq73M+i5zdIrIkDT EJdg== MIME-Version: 1.0 X-Received: by 10.42.62.71 with SMTP id x7mr38299744ich.61.1421827493405; Wed, 21 Jan 2015 00:04:53 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Wed, 21 Jan 2015 00:04:53 -0800 (PST) In-Reply-To: <201501202229.t0KMTReZ071739@svn.freebsd.org> References: <201501202229.t0KMTReZ071739@svn.freebsd.org> Date: Wed, 21 Jan 2015 00:04:53 -0800 X-Google-Sender-Auth: QoLERBqr3ptBsyGfzL2nLxJzI6o Message-ID: Subject: Re: svn commit: r277449 - head/sys/cddl/compat/opensolaris/sys From: Adrian Chadd To: Will Andrews Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:04:54 -0000 ... common/sys/zfs_context.h:538 ? -a On 20 January 2015 at 14:29, Will Andrews wrote: > Author: will > Date: Tue Jan 20 22:29:27 2015 > New Revision: 277449 > URL: https://svnweb.freebsd.org/changeset/base/277449 > > Log: > NSEC_TO_TICK(usec) -> NSEC_TO_TICK(nsec) > > Modified: > head/sys/cddl/compat/opensolaris/sys/time.h > > Modified: head/sys/cddl/compat/opensolaris/sys/time.h > ============================================================================== > --- head/sys/cddl/compat/opensolaris/sys/time.h Tue Jan 20 22:27:45 2015 (r277448) > +++ head/sys/cddl/compat/opensolaris/sys/time.h Tue Jan 20 22:29:27 2015 (r277449) > @@ -51,7 +51,7 @@ typedef longlong_t hrtime_t; > #endif > > #define SEC_TO_TICK(sec) ((sec) * hz) > -#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz)) > +#define NSEC_TO_TICK(nsec) ((nsec) / (NANOSEC / hz)) > > #ifdef _KERNEL > static __inline hrtime_t > From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:06:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4312330; Wed, 21 Jan 2015 08:06:35 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6A285E; Wed, 21 Jan 2015 08:06:34 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 6BB821FE023; Wed, 21 Jan 2015 09:06:31 +0100 (CET) Message-ID: <54BF5E39.5030007@selasky.org> Date: Wed, 21 Jan 2015 09:07:21 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:06:35 -0000 On 01/21/15 01:49, Adrian Chadd wrote: > You should totally try say, 100,000 active TCP connections on a box. > See what happens to swi0 (clock). > > TL;DR - the lock contention sucks and it takes a chunk of the core up. > The lock contention is highly not good. > > That's why I'd like to see both the callout stuff in its > slightly-better-defined-and-sane state from you/and/ make it so TCP > can use it. > > I'll have to double-check to see if the RSS stuff is all lined up > correctly so we can use it when we create the callouts (well, at inpcb > creation time, right), rather than when we first schedule them. Then > we can experiment with having the initial CPU be specified at callout > create time rather than expecting to be able to move it when we first > schedule it. > > Or, hm, maybe have it so we don't have a CPU chosen until the first > time we schedule the timeout, and if it hasn't been scheduled before, > allow the CPU to be set? Because at that point we aren't migrating it > off f timeout_cpu - it's never been added to it in the first place. Hi Adrian, What you are saying is correct. If you set the initial c_cpu value when the callout is initialized it will run on SWI#X instead of SWI#0. This is fully allowed, so maybe a callout_init_cpu() would be appropriate, to set the initial CPU number for callouts. With regard to the callout the c_cpu value can be different from zero, only the it must remain fixed/constant when there is no lock protecting updates to it! Kip and Gleb: Does adding a callout_init_cpu() function which can be used for existing callouts and in conjunction with CALLOUT_MPSAFE change anything? --HPS From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:10:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51D524C9; Wed, 21 Jan 2015 08:10:59 +0000 (UTC) Received: from mail-pd0-x234.google.com (mail-pd0-x234.google.com [IPv6:2607:f8b0:400e:c02::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1054190E; Wed, 21 Jan 2015 08:10:59 +0000 (UTC) Received: by mail-pd0-f180.google.com with SMTP id ft15so19167103pdb.11; Wed, 21 Jan 2015 00:10:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=0re12HAM00huPv1f8FonSDKeE/E+z+5peK76Z6B2YLQ=; b=aGrwCvxcMTvPrzraQ6nVjh1U3/WbecHaVIs8SgkuKNz2Cj/GMLKTXhW3el8hGkIwHn m1T9OzhzSOp9gWMOHp6vJZLWZzlUZBDxjVnppYr07JC556ApQgHUio4GhNy5CsUUgP5I 8i8RThZDSz3Yy8f13gSKL18LGIKbBsC21ax4U9dOckn/ZxIdeLzfv1Zm9xhyFFPm2JFx 6U2ZfYA9jPWwIfvNQU0NTngN6sG1noarEBISg3BZGqOm0vnWaAZ3VK2wogKUV+3j0uYH fmyfB8EG3Ku7wu/OW/T/PhkWh/7lBuGGbY57xTvi4MkgynSRP4fyvvDnWScCq8btBl4p l0ig== X-Received: by 10.68.68.167 with SMTP id x7mr28703767pbt.23.1421827858497; Wed, 21 Jan 2015 00:10:58 -0800 (PST) Received: from ox ([24.6.44.228]) by mx.google.com with ESMTPSA id xc7sm5089872pbc.29.2015.01.21.00.10.56 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 Jan 2015 00:10:57 -0800 (PST) Sender: Navdeep Parhar Date: Wed, 21 Jan 2015 00:10:50 -0800 From: Navdeep Parhar To: Dimitry Andric Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121081050.GA4505@ox> Mail-Followup-To: Dimitry Andric , Pedro Giffuni , Adrian Chadd , Luigi Rizzo , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" References: <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121055329.GB3307@ox> <98838DA6-1969-4764-83DE-71F7BB568E23@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <98838DA6-1969-4764-83DE-71F7BB568E23@FreeBSD.org> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:10:59 -0000 On Wed, Jan 21, 2015 at 09:00:03AM +0100, Dimitry Andric wrote: > On 21 Jan 2015, at 06:53, Navdeep Parhar wrote: > > > > On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: > >> > >> On 01/20/15 22:06, Adrian Chadd wrote: > >>> On 20 January 2015 at 18:19, Alexey Dokuchaev wrote: > >>>> On Tue, Jan 20, 2015 at 07:50:23PM -0500, Pedro Giffuni wrote: > >>>>> But the fix is rather ugly, isn't it? I would personally prefer to just > >>>>> kill the older gcc but in the meantime updating it so that it behaves > >>>>> like the updated gcc/clang would be better. IMHO. > >>>> Seconded. Putting extra harness on the code to avoid bugs in the compiler > >>>> that were actually fixed upsteam is totally bogus. > >>> Right, but: > >>> > >>> * not all of us work on compilers; > >>> * not all of us want to currently be working on compilers; > >>> * some of us have to use the gcc that's in tree; > >>> * .. and apparently updating that gcc to something > 4.2 is verboten. > >> > >> The external toolchain can't be that bad(?). > >> > >>> So if someone wants to help Navdeep by backporting those options, > >> > >> Hmm .. didn't I post a patch? > >> > >>> please do. I bet he'd love the help. > >>> > >> Ugh he doesn't and TBH, I don't care enough to look for > >> consensus either. > > > > Let's please just move on from this discussion then. I am not familiar > > with gcc internals so I can't vouch for this patch, and gcc is the > > default compiler on platforms that I cannot test. Given that, it would > > be reckless of me to push a gcc patch just to get it to play nice with > > one single file in the tree. High risk, little reward (given that > > -fms-extensions can be applied to just the file in question without > > disturbing anything else in the tree). > > Alternatively, just use the ${GCC_MS_EXTENSIONS} Makefile macro, which > I specifically introduced for this issue. Ah, a rose with another name. I'm happy to use this but it's not clear why there is a GCC in the macro's name when clang deals with -fms-extensions just as well. (It's not even clear why the longer ${GCC_MS_EXTENSIONS} should be preferred to -fms-extentions. Isn't this like #define ONE 1 ?) In any case I'm perfectly fine with any change that doesn't involve a commit from me to gcc. Regards, Navdeep > > See e.g. sys/modules/ibcore/Makefile for an example. > > -Dimitry > From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:16:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6BBE68A; Wed, 21 Jan 2015 08:16:13 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4741B93E; Wed, 21 Jan 2015 08:16:13 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0L8G6tr025128 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jan 2015 10:16:07 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0L8G6tr025128 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0L8G6kF025127; Wed, 21 Jan 2015 10:16:06 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 21 Jan 2015 10:16:06 +0200 From: Konstantin Belousov To: "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150121081606.GN42409@kib.kiev.ua> References: <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , Sean Bruno , Gleb Smirnoff , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:16:13 -0000 On Tue, Jan 20, 2015 at 04:37:44PM -0800, K. Macy wrote: > I would pick stability over performance any day. However, it _seems_ > to me, and maybe I simply don't understand some key details, that the > fix consisted of largely single-threading the callout system. And as I > say I may simply not understand the specifics, but this sort of large > scale disabling does not constitute a fix but is a workaround. It's > more like disabling preemption because it fixes a panic. Yes, it might > "fix" a whole array of bugs that crop up but it could not be seen as a > fix to an otherwise working system. Well, this is not a complete truth. Let me try to explain my understanding, I spent some time actually looking at the new code. Would be nice if corrections to my understanding is posted, if needed. Now, when callout_reset() is directed to change cpu, the change only happens when the callout is associated with a lock, and that lock is owned by the caller of callout_reset(). There are two consequences. One, which is good, is significant simplification of the migration code, together with the drain. This is exactly the place where there bugs which make my head hurt, see e.g. r234952 and r243901. Note that some callouts follow this pattern already, e.g. process timers after r243869. Another consequence, which is very visible and which causes the roar, is that all lockless callers of callout_reset_on(9) now silently changed the behaviour to callout_reset(9). There is no audit performed to identify such callers, and there is no even a plan to fix them. The answer to the complains seems to be 'if you think that the fix is needed, go and fix'. My impression is that some set of vocal active developers consider the second consequence unacceptable, myself included. IMO, committing the change, however good the consequence one is, without fixing the consequence two, is inappropriate. And the onus of doing this is on the person doing the change. Yes, it is very interesting is the change actually good WRT fixing migration, since indeed there is serious reduction in the migration amount due to locked callout_reset() being not universally used. It is possible that the bugs are only covered. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:17:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 335487E7; Wed, 21 Jan 2015 08:17:17 +0000 (UTC) Received: from troutmask.apl.washington.edu (troutmask.apl.washington.edu [128.95.76.21]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "troutmask", Issuer "troutmask" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0A25B955; Wed, 21 Jan 2015 08:17:17 +0000 (UTC) Received: from troutmask.apl.washington.edu (localhost [127.0.0.1]) by troutmask.apl.washington.edu (8.14.9/8.14.9) with ESMTP id t0L8HGqV030347 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 00:17:16 -0800 (PST) (envelope-from sgk@troutmask.apl.washington.edu) Received: (from sgk@localhost) by troutmask.apl.washington.edu (8.14.9/8.14.9/Submit) id t0L8HEXG030346; Wed, 21 Jan 2015 00:17:14 -0800 (PST) (envelope-from sgk) Date: Wed, 21 Jan 2015 00:17:14 -0800 From: Steve Kargl To: Pedro Giffuni Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121081714.GA30318@troutmask.apl.washington.edu> References: <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121035243.GA29469@troutmask.apl.washington.edu> <54BF28EE.1070801@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BF28EE.1070801@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , Luigi Rizzo , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:17:17 -0000 On Tue, Jan 20, 2015 at 11:19:58PM -0500, Pedro Giffuni wrote: > > On 01/20/15 22:52, Steve Kargl wrote: > > On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: > >> On 01/20/15 22:06, Adrian Chadd wrote: > >>> * .. and apparently updating that gcc to something > 4.2 is verboten. > >> The external toolchain can't be that bad(?). > >> > > Are the ever change knobs documented somewhere? > > > https://wiki.freebsd.org/ExternalToolchain > IHMO, the wiki is not proper documentation. 'man src.conf' should have the information needed. -- Steve From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:30:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C565BE07; Wed, 21 Jan 2015 08:30:42 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 84948AB6; Wed, 21 Jan 2015 08:30:42 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id h15so12821867igd.4; Wed, 21 Jan 2015 00:30:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=NPa3ITGGVwhcqgJDhW+hGoNqPGiOdkJb5Pc8YuX8yjw=; b=UM2Kxea2eD0q7PHgPfixKYKw+foAtdy8W5ZHexNtJ+DLag7lpGQMYErIrGzDZPaKIj 3IjaUwBubED+h9/G1GyvH3EYrE1YPnPMspHF6M98Jz9X9AhyjePMHwSljpQAEUAcIJDL 9OOL9P6f28DAB4uusMaOSvuZe2wQzWKJbQelyvIrDPeTCQfwGULJrnuPUwB6uLmXljHI L2eGlHCrjNG7SsExceQazgCqwjYKS51gPXjbO05s/+8sTpoe2J9qnNjP5HqHlYt2Y2MS onTqH045Ai6fxx+RmjUW2iAdzjg0HsfbGWQ1ENWUB7j/YJ7i3I/ImjsNV3mvHIQK71TU OFPg== X-Received: by 10.50.30.130 with SMTP id s2mr16779714igh.11.1421829041846; Wed, 21 Jan 2015 00:30:41 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:90a0:7b5d:1762:3e7d? ([2601:8:ab80:7d6:90a0:7b5d:1762:3e7d]) by mx.google.com with ESMTPSA id lr3sm5100054igb.22.2015.01.21.00.30.40 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 00:30:41 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_783034A3-2D28-4476-B95B-8A28DB4A8D3C"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe From: Garrett Cooper In-Reply-To: <20150121081714.GA30318@troutmask.apl.washington.edu> Date: Wed, 21 Jan 2015 00:30:38 -0800 Message-Id: <6DB81A6F-FF7A-4E39-829C-EADE06D7C61D@gmail.com> References: <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121035243.GA29469@troutmask.apl.washington.edu> <54BF28EE.1070801@FreeBSD.org> <20150121081714.GA30318@troutmask.apl.washington.edu> To: Steve Kargl X-Mailer: Apple Mail (2.1878.6) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:30:43 -0000 --Apple-Mail=_783034A3-2D28-4476-B95B-8A28DB4A8D3C Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 21, 2015, at 0:17, Steve Kargl = wrote: > On Tue, Jan 20, 2015 at 11:19:58PM -0500, Pedro Giffuni wrote: >>=20 >> On 01/20/15 22:52, Steve Kargl wrote: >>> On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: >>>> On 01/20/15 22:06, Adrian Chadd wrote: >>>>> * .. and apparently updating that gcc to something > 4.2 is = verboten. >>>> The external toolchain can't be that bad(?). >>>>=20 >>> Are the ever change knobs documented somewhere? >>>=20 >> https://wiki.freebsd.org/ExternalToolchain >=20 > IHMO, the wiki is not proper documentation. 'man src.conf' > should have the information needed. build(7) seems like a more appropriate area, but I wholeheartedly agree. Thanks! --Apple-Mail=_783034A3-2D28-4476-B95B-8A28DB4A8D3C Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUv2OvAAoJEMZr5QU6S73eu4YH/jkCHsyhHVP519o7GPQE/CBr k9ZSqz13PDBu42YEZSltnIsa9MXhdt2qerSRAKBmbofcEDkmWiLA3ViOzg+uKTZK jAxpVhoImfP+mhTqAUeVDWqB+V5QCcVCa+unzxGgSoGpVVP7v5iig8hY4VYrnmDH XxGQQ+SalihvX2NBt264VUgwE4iTs4Y0c8gazCzhvV/+Y2zue6JIp7ilPC80GSkW xfLYwZJjeBQiSSa2ayIr1Nk7Yz5AGULmjiRFc/3/WyXs6RlG+F27LniUnLGr1dtt PWWjGxB+wfqMLk4ztrUsE7yH+WsyYl1l5Rh0aE5nkGj/9vf+W8230UsMF+u3va0= =E5B8 -----END PGP SIGNATURE----- --Apple-Mail=_783034A3-2D28-4476-B95B-8A28DB4A8D3C-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:31:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D1957F45; Wed, 21 Jan 2015 08:31:24 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87E42B56; Wed, 21 Jan 2015 08:31:24 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id B91B31FE023; Wed, 21 Jan 2015 09:31:21 +0100 (CET) Message-ID: <54BF640B.6000700@selasky.org> Date: Wed, 21 Jan 2015 09:32:11 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: sbruno@freebsd.org, "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> In-Reply-To: <54BEEA7F.1070301@ignoranthack.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:31:25 -0000 On 01/21/15 00:53, Sean Bruno wrote: > Unkown to me. Nor am I aware of anyone else who ever hit our panics > either. Our environment, and the failure, was only seen in the Intel > 10GE space (ixgbe). This is an artifact of our use cases, and hasn't > been expanded nor tested in our environment with other vendor interfaces. > > sean Hi, I've seen this with Mellanox hardware when running some special tests, but not during regular use yet. That was the reason for going into the callout subsystem in the first place. 40GE. Also I would like to mention during the heat of this discussion, that during X-mas this year, I had a very heavy discussion with Attilio and a few other FreeBSD developers, who's name was on a patch (r220456) that changed how the return value of "callout_active()" works. "callout_active()" is heavily used inside the TCP stack and what was found is there is a potential race related to migrating the callout from one CPU to the other, which in turn might give other symptoms than a spinlock hang. FYI: https://svnweb.freebsd.org/base?view=revision&revision=225057 Cite: "If the newly scheduled thread wants to acquire the old queue it will just spin forever." This description reminds me very much of what "Jason Wolfe", others and myself have seen. Konstantin, you're responsible for r220456 (Approved by: kib). I would like to ask what investigation you did to ensure that you solved the problem as described in the commit message and didn't introduce a new one? In r220456 the "callout_reset_on()" function was changed in a way that directly conflicts with how the TCP stack works, by not always ensuring that "callout_active()" returns non-zero after a callout is restarted! See return at line 821: > https://svnweb.freebsd.org/base/head/sys/kern/kern_timeout.c?revision=225057&view=markup&pathrev=225057#l821 Kib: Any comments? --HPS From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:32:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5047149; Wed, 21 Jan 2015 08:32:38 +0000 (UTC) Received: from mail-wi0-x234.google.com (mail-wi0-x234.google.com [IPv6:2a00:1450:400c:c05::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 389D5B6A; Wed, 21 Jan 2015 08:32:38 +0000 (UTC) Received: by mail-wi0-f180.google.com with SMTP id bs8so30955626wib.1; Wed, 21 Jan 2015 00:32:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-type:content-disposition:in-reply-to:user-agent; bh=uVOaf4Wr5qh1JKi0g3pWB9VJohZmLyOG2EPtxn5OWWM=; b=pDKL6fJDldGg70UY+xbS0fQ1ZQ26F52yx0+k7ZBS0WWw39YBaHRp8FVQtNAn03VDgj gTSksN75EdezVVbm0dA4QZXJsMcdCfM2cd8nFM+jrAffOB2EwT2rlxcuiwDOOFO0IDoZ rVDlLeEIlLWPRhdrIInkGmdO3nmSlE3lP5R0go2+ovSdgNxHXtCiDCLHmbgxHgDf1WBZ dyo1jvLsDZiZXbmLV5AzzzPao9U6AwnULtHhz8mkimqhoCzFvop7qpVu1Rn28h5HPXE9 R5uDpcKY/vnQvopB3g8WZMyBQl5irPEAANS1NmbMAmujIbwm0j8KbhvCoo5IKSklFko9 owbg== X-Received: by 10.194.104.196 with SMTP id gg4mr21211047wjb.31.1421829156674; Wed, 21 Jan 2015 00:32:36 -0800 (PST) Received: from ivaldir.etoilebsd.net ([2001:41d0:8:db4c::1]) by mx.google.com with ESMTPSA id fc6sm6243508wib.12.2015.01.21.00.32.35 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jan 2015 00:32:35 -0800 (PST) Sender: Baptiste Daroussin Date: Wed, 21 Jan 2015 09:32:33 +0100 From: Baptiste Daroussin To: Steve Kargl Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121083233.GL13897@ivaldir.etoilebsd.net> References: <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121035243.GA29469@troutmask.apl.washington.edu> <54BF28EE.1070801@FreeBSD.org> <20150121081714.GA30318@troutmask.apl.washington.edu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="CqfQkoYPE/jGoa5Q" Content-Disposition: inline In-Reply-To: <20150121081714.GA30318@troutmask.apl.washington.edu> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:32:38 -0000 --CqfQkoYPE/jGoa5Q Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 21, 2015 at 12:17:14AM -0800, Steve Kargl wrote: > On Tue, Jan 20, 2015 at 11:19:58PM -0500, Pedro Giffuni wrote: > >=20 > > On 01/20/15 22:52, Steve Kargl wrote: > > > On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: > > >> On 01/20/15 22:06, Adrian Chadd wrote: > > >>> * .. and apparently updating that gcc to something > 4.2 is verbote= n. > > >> The external toolchain can't be that bad(?). > > >> > > > Are the ever change knobs documented somewhere? > > > > > https://wiki.freebsd.org/ExternalToolchain > >=20 >=20 > IHMO, the wiki is not proper documentation. 'man src.conf' > should have the information needed. >=20 Planned into build(7) but not yet done as it is work in progress aka some k= nobs might or might not change Bapt --CqfQkoYPE/jGoa5Q Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlS/ZCEACgkQ8kTtMUmk6ExzBACgn8jQ3gnbULKOAPgVDhlgsa5n NzQAoKBt9+LB4W/NOhdrcLj/UeIOZR45 =tx0M -----END PGP SIGNATURE----- --CqfQkoYPE/jGoa5Q-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:51:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A17D4AB for ; Wed, 21 Jan 2015 08:51:09 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86326D26 for ; Wed, 21 Jan 2015 08:51:08 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0L8p0xC035613 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jan 2015 10:51:00 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0L8p0xC035613 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0L8p08Z035612; Wed, 21 Jan 2015 10:51:00 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 21 Jan 2015 10:51:00 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150121085100.GQ42409@kib.kiev.ua> References: <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BF640B.6000700@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BF640B.6000700@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: Adrian Chadd , "src-committers@freebsd.org" , "K. Macy" , Jason Wolfe , "svn-src-all@freebsd.org" , sbruno@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:51:09 -0000 On Wed, Jan 21, 2015 at 09:32:11AM +0100, Hans Petter Selasky wrote: > On 01/21/15 00:53, Sean Bruno wrote: > > Unkown to me. Nor am I aware of anyone else who ever hit our panics > > either. Our environment, and the failure, was only seen in the Intel > > 10GE space (ixgbe). This is an artifact of our use cases, and hasn't > > been expanded nor tested in our environment with other vendor interfaces. > > > > sean > > Hi, > > I've seen this with Mellanox hardware when running some special tests, > but not during regular use yet. That was the reason for going into the > callout subsystem in the first place. 40GE. > > Also I would like to mention during the heat of this discussion, that > during X-mas this year, I had a very heavy discussion with Attilio and a > few other FreeBSD developers, who's name was on a patch (r220456) that > changed how the return value of "callout_active()" works. > "callout_active()" is heavily used inside the TCP stack and what was > found is there is a potential race related to migrating the callout from > one CPU to the other, which in turn might give other symptoms than a > spinlock hang. > > FYI: > > https://svnweb.freebsd.org/base?view=revision&revision=225057 > > Cite: "If the newly scheduled thread wants to acquire the old queue it > will just spin forever." > > This description reminds me very much of what "Jason Wolfe", others and > myself have seen. > > Konstantin, you're responsible for r220456 (Approved by: kib). I would I definitely do not see anything related to my freefall login in the log message for r220456, nor I participated in any way in the work which lead to that revision. If you mean r225057, note that approval by re != review. > like to ask what investigation you did to ensure that you solved the > problem as described in the commit message and didn't introduce a new one? > > In r220456 the "callout_reset_on()" function was changed in a way that > directly conflicts with how the TCP stack works, by not always ensuring > that "callout_active()" returns non-zero after a callout is restarted! > See return at line 821: > > > https://svnweb.freebsd.org/base/head/sys/kern/kern_timeout.c?revision=225057&view=markup&pathrev=225057#l821 > > Kib: Any comments? With the re hat on, explanation for the proposed commit looked reasonable, and committer provided enough evidence that change got adequate testing. Since change fixed a bug, and this is exactly what re wants to see during release cycle, I see no reason why commit should be denied. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 08:55:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E30B5570; Wed, 21 Jan 2015 08:55:02 +0000 (UTC) Received: from nibbler.fubar.geek.nz (nibbler.fubar.geek.nz [199.48.134.198]) by mx1.freebsd.org (Postfix) with ESMTP id C4613D59; Wed, 21 Jan 2015 08:55:02 +0000 (UTC) Received: from bender.lan (97e078e7.skybroadband.com [151.224.120.231]) by nibbler.fubar.geek.nz (Postfix) with ESMTPSA id E923873000; Wed, 21 Jan 2015 08:54:59 +0000 (UTC) Date: Wed, 21 Jan 2015 08:54:53 +0000 From: Andrew Turner To: Ian Lepore Subject: Re: svn commit: r277467 - in head/sys/arm: arm at91 cavium/cns11xx mv samsung/s3c2xx0 versatile xscale/i80321 xscale/i8134x xscale/ixp425 xscale/pxa Message-ID: <20150121085453.794657f9@bender.lan> In-Reply-To: <201501210256.t0L2uEOU002068@svn.freebsd.org> References: <201501210256.t0L2uEOU002068@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 08:55:03 -0000 On Wed, 21 Jan 2015 02:56:14 +0000 (UTC) Ian Lepore wrote: > Author: ian > Date: Wed Jan 21 02:56:13 2015 > New Revision: 277467 > URL: https://svnweb.freebsd.org/changeset/base/277467 > > Log: > For some reason, all the arm bus_space functions that work with > uint16 values have armv4 in the name. There's nothing armv4-special > about them, so just use the same sort of names as all the other > functions. This is because ARMv3 lacked half word load and store instructions. We got this code from NetBSD who appears to have support for these older ARM processors. Andrew From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 09:01:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C4CC1836; Wed, 21 Jan 2015 09:01:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFF4AE25; Wed, 21 Jan 2015 09:01:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L91neY077089; Wed, 21 Jan 2015 09:01:49 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L91nTT077088; Wed, 21 Jan 2015 09:01:49 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201501210901.t0L91nTT077088@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Wed, 21 Jan 2015 09:01:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277481 - head/sys/dev/mii X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 09:01:49 -0000 Author: kevlo Date: Wed Jan 21 09:01:48 2015 New Revision: 277481 URL: https://svnweb.freebsd.org/changeset/base/277481 Log: Typo: ivalid -> invalid. Modified: head/sys/dev/mii/mii.c Modified: head/sys/dev/mii/mii.c ============================================================================== --- head/sys/dev/mii/mii.c Wed Jan 21 05:31:54 2015 (r277480) +++ head/sys/dev/mii/mii.c Wed Jan 21 09:01:48 2015 (r277481) @@ -374,7 +374,7 @@ mii_attach(device_t dev, device_t *miibu } if (offloc != MII_OFFSET_ANY && (offloc < 0 || offloc >= MII_NPHY)) { - printf("%s: ivalid offloc %d\n", __func__, offloc); + printf("%s: invalid offloc %d\n", __func__, offloc); return (EINVAL); } @@ -383,7 +383,7 @@ mii_attach(device_t dev, device_t *miibu phymax = MII_NPHY - 1; } else { if (phyloc < 0 || phyloc >= MII_NPHY) { - printf("%s: ivalid phyloc %d\n", __func__, phyloc); + printf("%s: invalid phyloc %d\n", __func__, phyloc); return (EINVAL); } phymin = phymax = phyloc; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 09:06:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F0B97BA6; Wed, 21 Jan 2015 09:06:49 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76CF6E60; Wed, 21 Jan 2015 09:06:49 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 9EBF81FE023; Wed, 21 Jan 2015 10:06:46 +0100 (CET) Message-ID: <54BF6C58.7010500@selasky.org> Date: Wed, 21 Jan 2015 10:07:36 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BF640B.6000700@selasky.org> <20150121085100.GQ42409@kib.kiev.ua> In-Reply-To: <20150121085100.GQ42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , "K. Macy" , Jason Wolfe , "svn-src-all@freebsd.org" , sbruno@freebsd.org, Gleb Smirnoff , "svn-src-head@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 09:06:50 -0000 On 01/21/15 09:51, Konstantin Belousov wrote: > On Wed, Jan 21, 2015 at 09:32:11AM +0100, Hans Petter Selasky wrote: >> On 01/21/15 00:53, Sean Bruno wrote: >>> Unkown to me. Nor am I aware of anyone else who ever hit our panics >>> either. Our environment, and the failure, was only seen in the Intel >>> 10GE space (ixgbe). This is an artifact of our use cases, and hasn't >>> been expanded nor tested in our environment with other vendor interfaces. >>> >>> sean >> Hi, >> >> I've seen this with Mellanox hardware when running some special tests, >> but not during regular use yet. That was the reason for going into the >> callout subsystem in the first place. 40GE. >> >> Also I would like to mention during the heat of this discussion, that >> during X-mas this year, I had a very heavy discussion with Attilio and a >> few other FreeBSD developers, who's name was on a patch (r220456) that >> changed how the return value of "callout_active()" works. >> "callout_active()" is heavily used inside the TCP stack and what was >> found is there is a potential race related to migrating the callout from >> one CPU to the other, which in turn might give other symptoms than a >> spinlock hang. >> >> FYI: >> >> https://svnweb.freebsd.org/base?view=revision&revision=225057 >> >> Cite: "If the newly scheduled thread wants to acquire the old queue it >> will just spin forever." >> >> This description reminds me very much of what "Jason Wolfe", others and >> myself have seen. >> >> Konstantin, you're responsible for r220456 (Approved by: kib). I would > I definitely do not see anything related to my freefall login in the > log message for r220456, nor I participated in any way in the work > which lead to that revision. > > If you mean r225057, note that approval by re != review. Yes, I meant r225057. >> like to ask what investigation you did to ensure that you solved the >> problem as described in the commit message and didn't introduce a new one? >> >> In r220456 the "callout_reset_on()" function was changed in a way that >> directly conflicts with how the TCP stack works, by not always ensuring >> that "callout_active()" returns non-zero after a callout is restarted! >> See return at line 821: >> >>> https://svnweb.freebsd.org/base/head/sys/kern/kern_timeout.c?revision=225057&view=markup&pathrev=225057#l821 >> >> Kib: Any comments? > > With the re hat on, explanation for the proposed commit looked reasonable, > and committer provided enough evidence that change got adequate testing. > Since change fixed a bug, and this is exactly what re wants to see > during release cycle, I see no reason why commit should be denied. The problem is Attilio is no longer an active committer and he was not been very willing to do more work in this area. When people writing code in an area no longer respond - what should we do? --HPS From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 09:39:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B74BB535; Wed, 21 Jan 2015 09:39:21 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A14C225E; Wed, 21 Jan 2015 09:39:21 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L9dLGT093368; Wed, 21 Jan 2015 09:39:21 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L9dLjL093367; Wed, 21 Jan 2015 09:39:21 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501210939.t0L9dLjL093367@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 21 Jan 2015 09:39:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277482 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 09:39:21 -0000 Author: smh Date: Wed Jan 21 09:39:20 2015 New Revision: 277482 URL: https://svnweb.freebsd.org/changeset/base/277482 Log: MFC r272509 (by delphi): Diff reduction with upstream Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Jan 21 09:01:48 2015 (r277481) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Jan 21 09:39:20 2015 (r277482) @@ -1997,8 +1997,8 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t */ if (df.df_start >= zv->zv_volsize) break; /* No need to do anything... */ - if (df.df_start + df.df_length > zv->zv_volsize) - df.df_length = DMU_OBJECT_END; + + mutex_exit(&spa_namespace_lock); rl = zfs_range_lock(&zv->zv_znode, df.df_start, df.df_length, RL_WRITER); @@ -2037,7 +2037,7 @@ zvol_ioctl(dev_t dev, int cmd, intptr_t dmu_objset_pool(zv->zv_objset), 0); } } - break; + return (error); } default: From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 09:45:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC0C58CE; Wed, 21 Jan 2015 09:45:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4ACD36A; Wed, 21 Jan 2015 09:45:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0L9jnGQ097871; Wed, 21 Jan 2015 09:45:49 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0L9jnT3097866; Wed, 21 Jan 2015 09:45:49 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501210945.t0L9jnT3097866@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Wed, 21 Jan 2015 09:45:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277483 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 09:45:49 -0000 Author: smh Date: Wed Jan 21 09:45:48 2015 New Revision: 277483 URL: https://svnweb.freebsd.org/changeset/base/277483 Log: MFC r276063: Standardise on illumos for #ifdef's in zvol.c MFC r276066: Refactor zvol locking to minimise diff with upstream MFC r276069: Fix panic when resizing ZFS zvol's Sponsored by: Multiplay Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Wed Jan 21 09:39:20 2015 (r277482) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zvol.h Wed Jan 21 09:45:48 2015 (r277483) @@ -43,7 +43,7 @@ extern void zvol_create_cb(objset_t *os, extern int zvol_create_minor(const char *); extern int zvol_remove_minor(const char *); extern void zvol_remove_minors(const char *); -extern int zvol_set_volsize(const char *, major_t, uint64_t); +extern int zvol_set_volsize(const char *, uint64_t); #ifdef sun extern int zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jan 21 09:39:20 2015 (r277482) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jan 21 09:45:48 2015 (r277483) @@ -2483,8 +2483,7 @@ zfs_prop_set_special(const char *dsname, err = dsl_dataset_set_refreservation(dsname, source, intval); break; case ZFS_PROP_VOLSIZE: - err = zvol_set_volsize(dsname, ddi_driver_major(zfs_dip), - intval); + err = zvol_set_volsize(dsname, intval); break; case ZFS_PROP_VERSION: { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Jan 21 09:39:20 2015 (r277482) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Wed Jan 21 09:45:48 2015 (r277483) @@ -97,6 +97,7 @@ #include "zfs_namecheck.h" +#ifndef illumos struct g_class zfs_zvol_class = { .name = "ZFS::ZVOL", .version = G_VERSION, @@ -104,19 +105,30 @@ struct g_class zfs_zvol_class = { DECLARE_GEOM_CLASS(zfs_zvol_class, zfs_zvol); +#endif void *zfsdev_state; static char *zvol_tag = "zvol_tag"; #define ZVOL_DUMPSIZE "dumpsize" /* - * The spa_namespace_lock protects the zfsdev_state structure from being - * modified while it's being used, e.g. an open that comes in before a - * create finishes. It also protects temporary opens of the dataset so that, + * This lock protects the zfsdev_state structure from being modified + * while it's being used, e.g. an open that comes in before a create + * finishes. It also protects temporary opens of the dataset so that, * e.g., an open doesn't get a spurious EBUSY. */ +#ifdef illumos +kmutex_t zfsdev_state_lock; +#else +/* + * In FreeBSD we've replaced the upstream zfsdev_state_lock with the + * spa_namespace_lock in the ZVOL code. + */ +#define zfsdev_state_lock spa_namespace_lock +#endif static uint32_t zvol_minors; +#ifndef illumos SYSCTL_DECL(_vfs_zfs); SYSCTL_NODE(_vfs_zfs, OID_AUTO, vol, CTLFLAG_RW, 0, "ZFS VOLUME"); static int volmode = ZFS_VOLMODE_GEOM; @@ -124,6 +136,7 @@ TUNABLE_INT("vfs.zfs.vol.mode", &volmode SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, mode, CTLFLAG_RWTUN, &volmode, 0, "Expose as GEOM providers (1), device files (2) or neither"); +#endif typedef struct zvol_extent { list_node_t ze_node; dva_t ze_dva; /* dva associated with this extent */ @@ -134,28 +147,40 @@ typedef struct zvol_extent { * The in-core state of each volume. */ typedef struct zvol_state { +#ifndef illumos LIST_ENTRY(zvol_state) zv_links; +#endif char zv_name[MAXPATHLEN]; /* pool/dd name */ uint64_t zv_volsize; /* amount of space we advertise */ uint64_t zv_volblocksize; /* volume block size */ +#ifdef illumos + minor_t zv_minor; /* minor number */ +#else struct cdev *zv_dev; /* non-GEOM device */ struct g_provider *zv_provider; /* GEOM provider */ +#endif uint8_t zv_min_bs; /* minimum addressable block shift */ uint8_t zv_flags; /* readonly, dumpified, etc. */ objset_t *zv_objset; /* objset handle */ +#ifdef illumos + uint32_t zv_open_count[OTYPCNT]; /* open counts */ +#endif uint32_t zv_total_opens; /* total open count */ zilog_t *zv_zilog; /* ZIL handle */ list_t zv_extents; /* List of extents for dump */ znode_t zv_znode; /* for range locking */ dmu_buf_t *zv_dbuf; /* bonus handle */ +#ifndef illumos int zv_state; int zv_volmode; /* Provide GEOM or cdev */ struct bio_queue_head zv_queue; struct mtx zv_queue_mtx; /* zv_queue mutex */ +#endif } zvol_state_t; +#ifndef illumos static LIST_HEAD(, zvol_state) all_zvols; - +#endif /* * zvol specific flags */ @@ -173,6 +198,7 @@ int zvol_maxphys = DMU_MAX_ACCESS/2; * Toggle unmap functionality. */ boolean_t zvol_unmap_enabled = B_TRUE; +#ifndef illumos SYSCTL_INT(_vfs_zfs_vol, OID_AUTO, unmap_enabled, CTLFLAG_RWTUN, &zvol_unmap_enabled, 0, "Enable UNMAP functionality"); @@ -196,28 +222,30 @@ static struct cdevsw zvol_cdevsw = { .d_flags = D_DISK | D_TRACKCLOSE, }; -extern int zfs_set_prop_nvlist(const char *, zprop_source_t, - nvlist_t *, nvlist_t *); +static void zvol_geom_run(zvol_state_t *zv); +static void zvol_geom_destroy(zvol_state_t *zv); +static int zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace); +static void zvol_geom_start(struct bio *bp); +static void zvol_geom_worker(void *arg); static void zvol_log_truncate(zvol_state_t *zv, dmu_tx_t *tx, uint64_t off, uint64_t len, boolean_t sync); +#endif /* !illumos */ + +extern int zfs_set_prop_nvlist(const char *, zprop_source_t, + nvlist_t *, nvlist_t *); static int zvol_remove_zv(zvol_state_t *); static int zvol_get_data(void *arg, lr_write_t *lr, char *buf, zio_t *zio); static int zvol_dumpify(zvol_state_t *zv); static int zvol_dump_fini(zvol_state_t *zv); static int zvol_dump_init(zvol_state_t *zv, boolean_t resize); -static void zvol_geom_run(zvol_state_t *zv); -static void zvol_geom_destroy(zvol_state_t *zv); -static int zvol_geom_access(struct g_provider *pp, int acr, int acw, int ace); -static void zvol_geom_start(struct bio *bp); -static void zvol_geom_worker(void *arg); - static void -zvol_size_changed(zvol_state_t *zv) +zvol_size_changed(zvol_state_t *zv, uint64_t volsize) { -#ifdef sun - dev_t dev = makedevice(maj, min); +#ifdef illumos + dev_t dev = makedevice(ddi_driver_major(zfs_dip), zv->zv_minor); + zv->zv_volsize = volsize; VERIFY(ddi_prop_update_int64(dev, zfs_dip, "Size", volsize) == DDI_SUCCESS); VERIFY(ddi_prop_update_int64(dev, zfs_dip, @@ -226,7 +254,8 @@ zvol_size_changed(zvol_state_t *zv) /* Notify specfs to invalidate the cached size */ spec_size_invalidate(dev, VBLK); spec_size_invalidate(dev, VCHR); -#else /* !sun */ +#else /* !illumos */ + zv->zv_volsize = volsize; if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { struct g_provider *pp; @@ -237,7 +266,7 @@ zvol_size_changed(zvol_state_t *zv) g_resize_provider(pp, zv->zv_volsize); g_topology_unlock(); } -#endif /* !sun */ +#endif /* illumos */ } int @@ -293,16 +322,26 @@ zvol_get_stats(objset_t *os, nvlist_t *n static zvol_state_t * zvol_minor_lookup(const char *name) { +#ifdef illumos + minor_t minor; +#endif zvol_state_t *zv; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); +#ifdef illumos + for (minor = 1; minor <= ZFSDEV_MAX_MINOR; minor++) { + zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); + if (zv == NULL) + continue; +#else LIST_FOREACH(zv, &all_zvols, zv_links) { +#endif if (strcmp(zv->zv_name, name) == 0) - break; + return (zv); } - return (zv); + return (NULL); } /* extent mapping arg */ @@ -518,20 +557,20 @@ zil_replay_func_t *zvol_replay_vector[TX zvol_replay_err, /* TX_WRITE2 */ }; -#ifdef sun +#ifdef illumos int zvol_name2minor(const char *name, minor_t *minor) { zvol_state_t *zv; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); zv = zvol_minor_lookup(name); if (minor && zv) *minor = zv->zv_minor; - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (zv ? 0 : -1); } -#endif /* sun */ +#endif /* illumos */ /* * Create a minor node (plus a whole lot more) for the specified volume. @@ -542,19 +581,26 @@ zvol_create_minor(const char *name) zfs_soft_state_t *zs; zvol_state_t *zv; objset_t *os; + dmu_object_info_t doi; +#ifdef illumos + minor_t minor = 0; + char chrbuf[30], blkbuf[30]; +#else struct cdev *dev; struct g_provider *pp; struct g_geom *gp; - dmu_object_info_t doi; uint64_t volsize, mode; +#endif int error; +#ifndef illumos ZFS_LOG(1, "Creating ZVOL %s...", name); +#endif - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); if (zvol_minor_lookup(name) != NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EEXIST)); } @@ -562,20 +608,20 @@ zvol_create_minor(const char *name) error = dmu_objset_own(name, DMU_OST_ZVOL, B_TRUE, FTAG, &os); if (error) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } -#ifdef sun +#ifdef illumos if ((minor = zfsdev_minor_alloc()) == 0) { dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } if (ddi_soft_state_zalloc(zfsdev_state, minor) != DDI_SUCCESS) { dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } (void) ddi_prop_update_string(minor, zfs_dip, ZVOL_PROP_NAME, @@ -587,7 +633,7 @@ zvol_create_minor(const char *name) minor, DDI_PSEUDO, 0) == DDI_FAILURE) { ddi_soft_state_free(zfsdev_state, minor); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } @@ -598,14 +644,14 @@ zvol_create_minor(const char *name) ddi_remove_minor_node(zfs_dip, chrbuf); ddi_soft_state_free(zfsdev_state, minor); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(EAGAIN)); } zs = ddi_get_soft_state(zfsdev_state, minor); zs->zss_type = ZSST_ZVOL; zv = zs->zss_data = kmem_zalloc(sizeof (zvol_state_t), KM_SLEEP); -#else /* !sun */ +#else /* !illumos */ zv = kmem_zalloc(sizeof(*zv), KM_SLEEP); zv->zv_state = 0; @@ -613,7 +659,7 @@ zvol_create_minor(const char *name) if (error) { kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, zvol_tag); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (error); } error = dsl_prop_get_integer(name, @@ -644,7 +690,7 @@ zvol_create_minor(const char *name) 0640, "%s/%s", ZVOL_DRIVER, name) != 0) { kmem_free(zv, sizeof(*zv)); dmu_objset_disown(os, FTAG); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } zv->zv_dev = dev; @@ -652,10 +698,13 @@ zvol_create_minor(const char *name) dev->si_drv2 = zv; } LIST_INSERT_HEAD(&all_zvols, zv, zv_links); -#endif /* !sun */ +#endif /* illumos */ (void) strlcpy(zv->zv_name, name, MAXPATHLEN); zv->zv_min_bs = DEV_BSHIFT; +#ifdef illumos + zv->zv_minor = minor; +#endif zv->zv_objset = os; if (dmu_objset_is_snapshot(os) || !spa_writeable(dmu_objset_spa(os))) zv->zv_flags |= ZVOL_RDONLY; @@ -680,17 +729,16 @@ zvol_create_minor(const char *name) zvol_minors++; - mutex_exit(&spa_namespace_lock); - -#ifndef sun + mutex_exit(&zfsdev_state_lock); +#ifndef illumos if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { zvol_geom_run(zv); g_topology_unlock(); } PICKUP_GIANT(); -#endif ZFS_LOG(1, "ZVOL %s created.", name); +#endif return (0); } @@ -701,20 +749,24 @@ zvol_create_minor(const char *name) static int zvol_remove_zv(zvol_state_t *zv) { -#ifdef sun +#ifdef illumos + char nmbuf[20]; minor_t minor = zv->zv_minor; #endif - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); if (zv->zv_total_opens != 0) return (SET_ERROR(EBUSY)); - ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name); - -#ifdef sun +#ifdef illumos (void) snprintf(nmbuf, sizeof (nmbuf), "%u,raw", minor); ddi_remove_minor_node(zfs_dip, nmbuf); + + (void) snprintf(nmbuf, sizeof (nmbuf), "%u", minor); + ddi_remove_minor_node(zfs_dip, nmbuf); #else + ZFS_LOG(1, "ZVOL %s destroyed.", zv->zv_name); + LIST_REMOVE(zv, zv_links); if (zv->zv_volmode == ZFS_VOLMODE_GEOM) { g_topology_lock(); @@ -722,13 +774,15 @@ zvol_remove_zv(zvol_state_t *zv) g_topology_unlock(); } else if (zv->zv_volmode == ZFS_VOLMODE_DEV) destroy_dev(zv->zv_dev); -#endif /* sun */ +#endif avl_destroy(&zv->zv_znode.z_range_avl); mutex_destroy(&zv->zv_znode.z_range_lock); - kmem_free(zv, sizeof(*zv)); - + kmem_free(zv, sizeof (zvol_state_t)); +#ifdef illumos + ddi_soft_state_free(zfsdev_state, minor); +#endif zvol_minors--; return (0); } @@ -739,13 +793,13 @@ zvol_remove_minor(const char *name) zvol_state_t *zv; int rc; - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); if ((zv = zvol_minor_lookup(name)) == NULL) { - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } rc = zvol_remove_zv(zv); - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (rc); } @@ -763,21 +817,22 @@ zvol_first_open(zvol_state_t *zv) if (error) return (error); + zv->zv_objset = os; error = zap_lookup(os, ZVOL_ZAP_OBJ, "size", 8, 1, &volsize); if (error) { ASSERT(error == 0); dmu_objset_disown(os, zvol_tag); return (error); } - zv->zv_objset = os; + error = dmu_bonus_hold(os, ZVOL_OBJ, zvol_tag, &zv->zv_dbuf); if (error) { dmu_objset_disown(os, zvol_tag); return (error); } - zv->zv_volsize = volsize; + + zvol_size_changed(zv, volsize); zv->zv_zilog = zil_open(os, zvol_get_data); - zvol_size_changed(zv); VERIFY(dsl_prop_get_integer(zv->zv_name, "readonly", &readonly, NULL) == 0); @@ -810,7 +865,7 @@ zvol_last_close(zvol_state_t *zv) zv->zv_objset = NULL; } -#ifdef sun +#ifdef illumos int zvol_prealloc(zvol_state_t *zv) { @@ -849,7 +904,7 @@ zvol_prealloc(zvol_state_t *zv) return (0); } -#endif /* sun */ +#endif /* illumos */ static int zvol_update_volsize(objset_t *os, uint64_t volsize) @@ -857,7 +912,7 @@ zvol_update_volsize(objset_t *os, uint64 dmu_tx_t *tx; int error; - ASSERT(MUTEX_HELD(&spa_namespace_lock)); + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); tx = dmu_tx_create(os); dmu_tx_hold_zap(tx, ZVOL_ZAP_OBJ, TRUE, NULL); @@ -881,13 +936,34 @@ zvol_update_volsize(objset_t *os, uint64 void zvol_remove_minors(const char *name) { +#ifdef illumos + zvol_state_t *zv; + char *namebuf; + minor_t minor; + + namebuf = kmem_zalloc(strlen(name) + 2, KM_SLEEP); + (void) strncpy(namebuf, name, strlen(name)); + (void) strcat(namebuf, "/"); + mutex_enter(&zfsdev_state_lock); + for (minor = 1; minor <= ZFSDEV_MAX_MINOR; minor++) { + + zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); + if (zv == NULL) + continue; + if (strncmp(namebuf, zv->zv_name, strlen(namebuf)) == 0) + (void) zvol_remove_zv(zv); + } + kmem_free(namebuf, strlen(name) + 2); + + mutex_exit(&zfsdev_state_lock); +#else /* !illumos */ zvol_state_t *zv, *tzv; size_t namelen; namelen = strlen(name); DROP_GIANT(); - mutex_enter(&spa_namespace_lock); + mutex_enter(&zfsdev_state_lock); LIST_FOREACH_SAFE(zv, &all_zvols, zv_links, tzv) { if (strcmp(zv->zv_name, name) == 0 || @@ -898,69 +974,48 @@ zvol_remove_minors(const char *name) } } - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); PICKUP_GIANT(); +#endif /* illumos */ } -int -zvol_set_volsize(const char *name, major_t maj, uint64_t volsize) +static int +zvol_update_live_volsize(zvol_state_t *zv, uint64_t volsize) { - zvol_state_t *zv = NULL; - objset_t *os; - int error; - dmu_object_info_t doi; uint64_t old_volsize = 0ULL; - uint64_t readonly; - - mutex_enter(&spa_namespace_lock); - zv = zvol_minor_lookup(name); - if ((error = dmu_objset_hold(name, FTAG, &os)) != 0) { - mutex_exit(&spa_namespace_lock); - return (error); - } + int error = 0; - if ((error = dmu_object_info(os, ZVOL_OBJ, &doi)) != 0 || - (error = zvol_check_volsize(volsize, - doi.doi_data_block_size)) != 0) - goto out; + ASSERT(MUTEX_HELD(&zfsdev_state_lock)); - VERIFY(dsl_prop_get_integer(name, "readonly", &readonly, - NULL) == 0); - if (readonly) { - error = EROFS; - goto out; - } - - error = zvol_update_volsize(os, volsize); /* * Reinitialize the dump area to the new size. If we * failed to resize the dump area then restore it back to - * its original size. + * its original size. We must set the new volsize prior + * to calling dumpvp_resize() to ensure that the devices' + * size(9P) is not visible by the dump subsystem. */ - if (zv && error == 0) { + old_volsize = zv->zv_volsize; + zvol_size_changed(zv, volsize); + #ifdef ZVOL_DUMP - if (zv->zv_flags & ZVOL_DUMPIFIED) { - old_volsize = zv->zv_volsize; - zv->zv_volsize = volsize; - if ((error = zvol_dumpify(zv)) != 0 || - (error = dumpvp_resize()) != 0) { - (void) zvol_update_volsize(os, old_volsize); - zv->zv_volsize = old_volsize; - error = zvol_dumpify(zv); - } - } -#endif /* ZVOL_DUMP */ - if (error == 0) { - zv->zv_volsize = volsize; - zvol_size_changed(zv); + if (zv->zv_flags & ZVOL_DUMPIFIED) { + if ((error = zvol_dumpify(zv)) != 0 || + (error = dumpvp_resize()) != 0) { + int dumpify_error; + + (void) zvol_update_volsize(zv->zv_objset, old_volsize); + zvol_size_changed(zv, old_volsize); + dumpify_error = zvol_dumpify(zv); + error = dumpify_error ? dumpify_error : error; } } +#endif /* ZVOL_DUMP */ -#ifdef sun +#ifdef illumos /* * Generate a LUN expansion event. */ - if (zv && error == 0) { + if (error == 0) { sysevent_id_t eid; nvlist_t *attr; char *physpath = kmem_zalloc(MAXPATHLEN, KM_SLEEP); @@ -977,22 +1032,89 @@ zvol_set_volsize(const char *name, major nvlist_free(attr); kmem_free(physpath, MAXPATHLEN); } -#endif /* sun */ +#endif /* illumos */ + return (error); +} -out: - dmu_objset_rele(os, FTAG); +int +zvol_set_volsize(const char *name, uint64_t volsize) +{ + zvol_state_t *zv = NULL; + objset_t *os; + int error; + dmu_object_info_t doi; + uint64_t readonly; + boolean_t owned = B_FALSE; + + error = dsl_prop_get_integer(name, + zfs_prop_to_name(ZFS_PROP_READONLY), &readonly, NULL); + if (error != 0) + return (error); + if (readonly) + return (SET_ERROR(EROFS)); + + mutex_enter(&zfsdev_state_lock); + zv = zvol_minor_lookup(name); + + if (zv == NULL || zv->zv_objset == NULL) { + if ((error = dmu_objset_own(name, DMU_OST_ZVOL, B_FALSE, + FTAG, &os)) != 0) { + mutex_exit(&zfsdev_state_lock); + return (error); + } + owned = B_TRUE; + if (zv != NULL) + zv->zv_objset = os; + } else { + os = zv->zv_objset; + } + + if ((error = dmu_object_info(os, ZVOL_OBJ, &doi)) != 0 || + (error = zvol_check_volsize(volsize, doi.doi_data_block_size)) != 0) + goto out; - mutex_exit(&spa_namespace_lock); + error = zvol_update_volsize(os, volsize); + if (error == 0 && zv != NULL) + error = zvol_update_live_volsize(zv, volsize); +out: + if (owned) { + dmu_objset_disown(os, FTAG); + if (zv != NULL) + zv->zv_objset = NULL; + } + mutex_exit(&zfsdev_state_lock); return (error); } /*ARGSUSED*/ +#ifdef illumos +int +zvol_open(dev_t *devp, int flag, int otyp, cred_t *cr) +#else static int zvol_open(struct g_provider *pp, int flag, int count) +#endif { zvol_state_t *zv; int err = 0; +#ifdef illumos + + mutex_enter(&zfsdev_state_lock); + + zv = zfsdev_get_soft_state(getminor(*devp), ZSST_ZVOL); + if (zv == NULL) { + mutex_exit(&zfsdev_state_lock); + return (SET_ERROR(ENXIO)); + } + + if (zv->zv_total_opens == 0) + err = zvol_first_open(zv); + if (err) { + mutex_exit(&zfsdev_state_lock); + return (err); + } +#else /* !illumos */ boolean_t locked = B_FALSE; /* @@ -1006,15 +1128,15 @@ zvol_open(struct g_provider *pp, int fla * recursively, but that function already has all the * necessary protection. */ - if (!MUTEX_HELD(&spa_namespace_lock)) { - mutex_enter(&spa_namespace_lock); + if (!MUTEX_HELD(&zfsdev_state_lock)) { + mutex_enter(&zfsdev_state_lock); locked = B_TRUE; } zv = pp->private; if (zv == NULL) { if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (SET_ERROR(ENXIO)); } @@ -1022,13 +1144,14 @@ zvol_open(struct g_provider *pp, int fla err = zvol_first_open(zv); if (err) { if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); return (err); } pp->mediasize = zv->zv_volsize; pp->stripeoffset = 0; pp->stripesize = zv->zv_volblocksize; } +#endif /* illumos */ if ((flag & FWRITE) && (zv->zv_flags & ZVOL_RDONLY)) { err = SET_ERROR(EROFS); goto out; @@ -1047,20 +1170,46 @@ zvol_open(struct g_provider *pp, int fla } #endif +#ifdef illumos + if (zv->zv_open_count[otyp] == 0 || otyp == OTYP_LYR) { + zv->zv_open_count[otyp]++; + zv->zv_total_opens++; + } + mutex_exit(&zfsdev_state_lock); +#else zv->zv_total_opens += count; if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); +#endif return (err); out: if (zv->zv_total_opens == 0) zvol_last_close(zv); +#ifdef illumos + mutex_exit(&zfsdev_state_lock); +#else if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); +#endif return (err); } /*ARGSUSED*/ +#ifdef illumos +int +zvol_close(dev_t dev, int flag, int otyp, cred_t *cr) +{ + minor_t minor = getminor(dev); + zvol_state_t *zv; + int error = 0; + + mutex_enter(&zfsdev_state_lock); + + zv = zfsdev_get_soft_state(minor, ZSST_ZVOL); + if (zv == NULL) { + mutex_exit(&zfsdev_state_lock); +#else /* !illumos */ static int zvol_close(struct g_provider *pp, int flag, int count) { @@ -1069,15 +1218,16 @@ zvol_close(struct g_provider *pp, int fl boolean_t locked = B_FALSE; /* See comment in zvol_open(). */ - if (!MUTEX_HELD(&spa_namespace_lock)) { - mutex_enter(&spa_namespace_lock); + if (!MUTEX_HELD(&zfsdev_state_lock)) { + mutex_enter(&zfsdev_state_lock); locked = B_TRUE; } zv = pp->private; if (zv == NULL) { if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); +#endif /* illumos */ return (SET_ERROR(ENXIO)); } @@ -1090,18 +1240,30 @@ zvol_close(struct g_provider *pp, int fl * If the open count is zero, this is a spurious close. * That indicates a bug in the kernel / DDI framework. */ +#ifdef illumos + ASSERT(zv->zv_open_count[otyp] != 0); +#endif ASSERT(zv->zv_total_opens != 0); /* * You may get multiple opens, but only one close. */ +#ifdef illumos + zv->zv_open_count[otyp]--; + zv->zv_total_opens--; +#else zv->zv_total_opens -= count; +#endif if (zv->zv_total_opens == 0) zvol_last_close(zv); +#ifdef illumos + mutex_exit(&zfsdev_state_lock); +#else if (locked) - mutex_exit(&spa_namespace_lock); + mutex_exit(&zfsdev_state_lock); +#endif return (error); } @@ -1261,7 +1423,7 @@ zvol_log_write(zvol_state_t *zv, dmu_tx_ } } -#ifdef sun +#ifdef illumos static int zvol_dumpio_vdev(vdev_t *vd, void *addr, uint64_t offset, uint64_t origoffset, uint64_t size, boolean_t doread, boolean_t isdump) @@ -1354,11 +1516,16 @@ zvol_dumpio(zvol_state_t *zv, void *addr return (error); } -#endif /* sun */ +int +zvol_strategy(buf_t *bp) +{ + zfs_soft_state_t *zs = NULL; +#else /* !illumos */ void zvol_strategy(struct bio *bp) { +#endif /* illumos */ zvol_state_t *zv; uint64_t off, volsize; size_t resid; @@ -1366,22 +1533,53 @@ zvol_strategy(struct bio *bp) objset_t *os; rl_t *rl; int error = 0; +#ifdef illumos + boolean_t doread = bp->b_flags & B_READ; +#else boolean_t doread = 0; +#endif boolean_t is_dumpified; boolean_t sync; +#ifdef illumos + if (getminor(bp->b_edev) == 0) { + error = SET_ERROR(EINVAL); + } else { + zs = ddi_get_soft_state(zfsdev_state, getminor(bp->b_edev)); + if (zs == NULL) + error = SET_ERROR(ENXIO); + else if (zs->zss_type != ZSST_ZVOL) + error = SET_ERROR(EINVAL); + } + + if (error) { + bioerror(bp, error); + biodone(bp); + return (0); + } + + zv = zs->zss_data; + + if (!(bp->b_flags & B_READ) && (zv->zv_flags & ZVOL_RDONLY)) { + bioerror(bp, EROFS); + biodone(bp); + return (0); + } + + off = ldbtob(bp->b_blkno); +#else /* !illumos */ if (bp->bio_to) zv = bp->bio_to->private; else zv = bp->bio_dev->si_drv2; if (zv == NULL) { - error = ENXIO; + error = SET_ERROR(ENXIO); goto out; } if (bp->bio_cmd != BIO_READ && (zv->zv_flags & ZVOL_RDONLY)) { - error = EROFS; + error = SET_ERROR(EROFS); goto out; } @@ -1399,26 +1597,41 @@ zvol_strategy(struct bio *bp) } off = bp->bio_offset; +#endif /* illumos */ volsize = zv->zv_volsize; os = zv->zv_objset; ASSERT(os != NULL); +#ifdef illumos + bp_mapin(bp); + addr = bp->b_un.b_addr; + resid = bp->b_bcount; + + if (resid > 0 && (off < 0 || off >= volsize)) { + bioerror(bp, EIO); + biodone(bp); + return (0); + } + + is_dumpified = zv->zv_flags & ZVOL_DUMPIFIED; + sync = ((!(bp->b_flags & B_ASYNC) && + !(zv->zv_flags & ZVOL_WCE)) || + (zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS)) && + !doread && !is_dumpified; +#else /* !illumos */ addr = bp->bio_data; resid = bp->bio_length; if (resid > 0 && (off < 0 || off >= volsize)) { - error = EIO; + error = SET_ERROR(EIO); goto out; } -#ifdef illumos - is_dumpified = zv->zv_flags & ZVOL_DUMPIFIED; -#else is_dumpified = B_FALSE; -#endif - sync = !doread && !is_dumpified && + sync = !doread && !is_dumpified && zv->zv_objset->os_sync == ZFS_SYNC_ALWAYS; +#endif /* illumos */ /* * There must be no buffer changes when doing a dmu_sync() because @@ -1427,6 +1640,7 @@ zvol_strategy(struct bio *bp) rl = zfs_range_lock(&zv->zv_znode, off, resid, doread ? RL_READER : RL_WRITER); +#ifndef illumos if (bp->bio_cmd == BIO_DELETE) { dmu_tx_t *tx = dmu_tx_create(zv->zv_objset); error = dmu_tx_assign(tx, TXG_WAIT); @@ -1441,7 +1655,7 @@ zvol_strategy(struct bio *bp) } goto unlock; } - +#endif *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 10:29:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B6C4389D; Wed, 21 Jan 2015 10:29:17 +0000 (UTC) Received: from tensor.andric.com (unknown [IPv6:2001:7b8:3a7:1:2d0:b7ff:fea0:8c26]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "tensor.andric.com", Issuer "COMODO RSA Domain Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6BE92A75; Wed, 21 Jan 2015 10:29:17 +0000 (UTC) Received: from [192.168.3.3] (unknown [77.243.161.229]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id 79B415C2E; Wed, 21 Jan 2015 11:29:10 +0100 (CET) Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D"; protocol="application/pgp-signature"; micalg=pgp-sha1 X-Pgp-Agent: GPGMail 2.5b4 From: Dimitry Andric In-Reply-To: <20150121081050.GA4505@ox> Date: Wed, 21 Jan 2015 11:29:02 +0100 Message-Id: <5FC194F0-9D47-4B71-87E7-82EB81CA63D0@FreeBSD.org> References: <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> <54BF1EB0.2080901@FreeBSD.org> <20150121055329.GB3307@ox> <98838DA6-1969-4764-83DE-71F7BB568E23@FreeBSD.org> <20150121081050.GA4505@ox> To: Navdeep Parhar X-Mailer: Apple Mail (2.1993) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 10:29:18 -0000 --Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On 21 Jan 2015, at 09:10, Navdeep Parhar wrote: >=20 > On Wed, Jan 21, 2015 at 09:00:03AM +0100, Dimitry Andric wrote: >> On 21 Jan 2015, at 06:53, Navdeep Parhar wrote: >>>=20 >>> On Tue, Jan 20, 2015 at 10:36:16PM -0500, Pedro Giffuni wrote: ... >> Alternatively, just use the ${GCC_MS_EXTENSIONS} Makefile macro, = which >> I specifically introduced for this issue. >=20 > Ah, a rose with another name. I'm happy to use this but it's not = clear why > there is a GCC in the macro's name when clang deals with = -fms-extensions > just as well. It's because only gcc (in base) requires this flag to support anonymous unions, whereas clang also supports them without the flag. None of the sources requiring this flag use actual Microsoft C extensions. > (It's not even clear why the longer ${GCC_MS_EXTENSIONS} > should be preferred to -fms-extentions. Isn't this like #define ONE 1 = ?) Using -fms-extensions with clang can lead to other trouble, since it is stricter about conflicts with Microsoft-reserved type names. Last time I ran into this problem, several of our system headers tried to override type names which are reserved by Microsoft, leading to compile errors. Meanwhile, that issue may have been solved, but the crutches are still there. Instead of the macro, you could also use: CFLAGS.gcc+=3D -fms-extensions But note that this flag is probably superfluous with newer gcc's, so using the macro is still a better solution, because the compiler version can be checked in a central location, such as sys/conf/kern.mk. > In any case I'm perfectly fine with any change that doesn't involve a = commit > from me to gcc. Fixing this version of gcc is not really worth the trouble, indeed. -Dimitry --Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.26 iEYEARECAAYFAlS/f3UACgkQsF6jCi4glqMWPwCgwrIw7uS9Jz9jB2p3+dlHvDTI 9xUAoIJFk6l/0A2L61ryz4myYQvnAw0M =FYha -----END PGP SIGNATURE----- --Apple-Mail=_B7B5B89E-F8B2-4B2E-8504-13F1DBECE44D-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 10:47:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16652C92; Wed, 21 Jan 2015 10:47:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 015B7C98; Wed, 21 Jan 2015 10:47:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LAlSLw026803; Wed, 21 Jan 2015 10:47:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LAlSI2026802; Wed, 21 Jan 2015 10:47:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501211047.t0LAlSI2026802@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Wed, 21 Jan 2015 10:47:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277484 - head/cddl/contrib/opensolaris/lib/libzpool/common/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 10:47:29 -0000 Author: ngie Date: Wed Jan 21 10:47:28 2015 New Revision: 277484 URL: https://svnweb.freebsd.org/changeset/base/277484 Log: Follow up to r277449 by fixing the remaining NSEC_TO_TICK macro to have the same named parameters Reported by: Ben Perrault , Willem Jan Withagen Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Modified: head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Wed Jan 21 09:45:48 2015 (r277483) +++ head/cddl/contrib/opensolaris/lib/libzpool/common/sys/zfs_context.h Wed Jan 21 10:47:28 2015 (r277484) @@ -535,7 +535,7 @@ extern vnode_t *rootdir; extern void delay(clock_t ticks); #define SEC_TO_TICK(sec) ((sec) * hz) -#define NSEC_TO_TICK(usec) ((usec) / (NANOSEC / hz)) +#define NSEC_TO_TICK(nsec) ((nsec) / (NANOSEC / hz)) #define gethrestime_sec() time(NULL) #define gethrestime(t) \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 10:54:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 1033) id 69FA7F5B; Wed, 21 Jan 2015 10:54:51 +0000 (UTC) Date: Wed, 21 Jan 2015 10:54:51 +0000 From: Alexey Dokuchaev To: Adrian Chadd Subject: Re: svn commit: r276485 - in head/sys: conf dev/cxgbe modules/cxgbe/if_cxgbe Message-ID: <20150121105451.GA65826@FreeBSD.org> References: <201412312319.sBVNJHca031041@svn.freebsd.org> <20150106203344.GB26068@ox> <54BEE07A.3070207@FreeBSD.org> <54BEE305.6020905@FreeBSD.org> <54BEF7CF.9030505@FreeBSD.org> <20150121021905.GA73548@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Pedro Giffuni , Navdeep Parhar , "svn-src-head@freebsd.org" , Luigi Rizzo X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 10:54:51 -0000 On Tue, Jan 20, 2015 at 07:06:14PM -0800, Adrian Chadd wrote: > On 20 January 2015 at 18:19, Alexey Dokuchaev wrote: > > Seconded. Putting extra harness on the code to avoid bugs in the > > compiler that were actually fixed upsteam is totally bogus. > > Right, but: > [...] > * some of us have to use the gcc that's in tree; > * .. and apparently updating that gcc to something > 4.2 is verboten. To be clear: I did not suggest moving to external toolchain (I hate to do it myself). I was talking about merging the fix to base gcc4.2 (provided that it can be licensed under GPLv2). Now that most people had lost their interest in 8.x, it can be a problem of organizational nature, but not technical. ./danfe From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 13:03:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55540F68; Wed, 21 Jan 2015 13:03:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 41616D7D; Wed, 21 Jan 2015 13:03:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LD3JBF092969; Wed, 21 Jan 2015 13:03:19 GMT (envelope-from rrs@FreeBSD.org) Received: (from rrs@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LD3JM4092968; Wed, 21 Jan 2015 13:03:19 GMT (envelope-from rrs@FreeBSD.org) Message-Id: <201501211303.t0LD3JM4092968@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rrs set sender to rrs@FreeBSD.org using -f From: Randall Stewart Date: Wed, 21 Jan 2015 13:03:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277485 - head/usr.sbin/pmcstudy X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 13:03:19 -0000 Author: rrs Date: Wed Jan 21 13:03:18 2015 New Revision: 277485 URL: https://svnweb.freebsd.org/changeset/base/277485 Log: Fix minor errors found by coverity. Thanks Gleb for the pointers to the email! Modified: head/usr.sbin/pmcstudy/pmcstudy.c Modified: head/usr.sbin/pmcstudy/pmcstudy.c ============================================================================== --- head/usr.sbin/pmcstudy/pmcstudy.c Wed Jan 21 10:47:28 2015 (r277484) +++ head/usr.sbin/pmcstudy/pmcstudy.c Wed Jan 21 13:03:18 2015 (r277485) @@ -1808,6 +1808,9 @@ process_file(char *filename) if (cnts == NULL) { /* Nothing we can do */ printf("Nothing to do -- no counters built\n"); + if (io) { + fclose(io); + } return; } lace_cpus_together(); @@ -2044,7 +2047,7 @@ get_cpuid_set(void) printf("No memory3 allocation fails at startup?\n"); exit(-1); } - memset(more, sz, 0); + memset(more, 0, sz); memcpy(more, valid_pmcs, sz); pmc_allocated_cnt *= 2; free(valid_pmcs); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 13:48:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E72D2D6; Wed, 21 Jan 2015 13:48:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDE99276; Wed, 21 Jan 2015 13:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LDm60M013772; Wed, 21 Jan 2015 13:48:06 GMT (envelope-from gavin@FreeBSD.org) Received: (from gavin@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LDm6BY013771; Wed, 21 Jan 2015 13:48:06 GMT (envelope-from gavin@FreeBSD.org) Message-Id: <201501211348.t0LDm6BY013771@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gavin set sender to gavin@FreeBSD.org using -f From: Gavin Atkinson Date: Wed, 21 Jan 2015 13:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277486 - head/share/man/man9 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 13:48:07 -0000 Author: gavin Date: Wed Jan 21 13:48:06 2015 New Revision: 277486 URL: https://svnweb.freebsd.org/changeset/base/277486 Log: "softc" is short for "software context", use that phrase in the device_get_softc(9) man page. MFC after: 1 week Modified: head/share/man/man9/device_get_softc.9 Modified: head/share/man/man9/device_get_softc.9 ============================================================================== --- head/share/man/man9/device_get_softc.9 Wed Jan 21 13:03:18 2015 (r277485) +++ head/share/man/man9/device_get_softc.9 Wed Jan 21 13:48:06 2015 (r277486) @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 2, 2005 +.Dd January 21, 2015 .Dt DEVICE_GET_SOFTC 9 .Os .Sh NAME @@ -40,7 +40,7 @@ .Ft void * .Fn device_get_softc "device_t dev" .Sh DESCRIPTION -Return the driver-specific state of +Return the driver-specific software context of .Fa dev . The softc is automatically allocated and zeroed when the device is attached. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 14:01:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 46EE5C0C; Wed, 21 Jan 2015 14:01:12 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id 0705A684; Wed, 21 Jan 2015 14:01:11 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id D9FBA7E820; Thu, 22 Jan 2015 01:01:09 +1100 (EST) Message-ID: <54BFB10C.9080004@freebsd.org> Date: Thu, 22 Jan 2015 01:00:44 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Adrian Chadd , Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 14:01:12 -0000 On 01/20/15 09:22, Adrian Chadd wrote: > Yeah, it looks like you set c_cpu to timeout_cpu in > _callout_init_locked(), but then you only handle the case of the CPU > being changed in certain circumstances. You aren't handling the CPU > being initialised when the callout is first added. > > And, callout_restart_async() calls callout_lock(), which calls > CC_LOCK() on the callout CPU, which initially is zero. Then, it never > seems to be 'moved' into the correct CPU, even though it's being > called with a CPU id. > > So, if I am reading this all correctly, you aren't really handling > multi CPU callwheels at all. ;) > > In my instance, I'm seeing quite a lot of lock contention between the > userland threads, the network RX threads and the clock thread, all > contending on a single callout wheel being used for TCP timers. One of > the early goals for fixing up the RSS stuff in -HEAD was to make > per-CPU (Well, per-RSS-bucket really) TCP timers not contend with the > NIC RX processing path, and now it does. :( To clarify, you're seeing this with net.inet.tcp.per_cpu_timers=1? Cheers, Lawrence From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 15:24:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E7F853A1 for ; Wed, 21 Jan 2015 15:24:08 +0000 (UTC) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id B0844FB4 for ; Wed, 21 Jan 2015 15:24:08 +0000 (UTC) Received: by mail-ie0-f178.google.com with SMTP id rp18so3568183iec.9 for ; Wed, 21 Jan 2015 07:24:02 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=0wzgE+1s5H0tO1AVLt9Z0zI9qev1wW48KMp4KzoRJOs=; b=k8ImoTgRGtaRDFGH6LzbF6sN5vTfyGA1WZLvDekw7d3dEQG0urBjQcMKT3x7dUlZxV 323x3zLJv11Q50Por946eW0CaVtAjSg+pzBZHQjlrYre12w2AkT/D1uwVuj8FKfJ8TRV JsPRsgoQIVtENRgSHnmhZUiSZkbEZgXIHgKbae/Zgs1Gv1JTkKcycg6ugRnNBe4whWsE /HB/xQrtRXBVVZhz7pNYTM36ZBm6VFhfzu5hlGfqP6mw4/Gbd5aOvwqiKdMSPR7OWT9j fUn78HVSpKONT9heLvH8G6qm5PaYms/j4tkhpXG+tNNnAMSjkJV79EFNVhKiNKIeRogs ARHw== X-Gm-Message-State: ALoCoQlOI/UfLsB4q56CALS3UyiDE4eAfusJh2Mc6kMbKRrKiuCxY8Cwtihjcrejmo4Bhi1FY1zi X-Received: by 10.50.137.99 with SMTP id qh3mr5101114igb.9.1421853842312; Wed, 21 Jan 2015 07:24:02 -0800 (PST) Received: from sol.firepipe.net (c-50-183-92-30.hsd1.co.comcast.net. [50.183.92.30]) by mx.google.com with ESMTPSA id kt1sm5966846igb.20.2015.01.21.07.24.01 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jan 2015 07:24:01 -0800 (PST) Date: Wed, 21 Jan 2015 08:23:59 -0700 From: Will Andrews To: Lawrence Stewart Subject: Re: svn commit: r275832 - head/tools/tools/nanobsd Message-ID: <20150121152352.GB38973@sol.firepipe.net> References: <201412161759.sBGHx6ZL016021@svn.freebsd.org> <54BF5A7B.2080601@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="BwCQnh7xodEAoBMC" Content-Disposition: inline In-Reply-To: <54BF5A7B.2080601@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, imp@freebsd.org, Will Andrews X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 15:24:09 -0000 --BwCQnh7xodEAoBMC Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jan 21, 2015 at 06:51:23PM +1100, Lawrence Stewart wrote: > I think this change introduced a bug - I'm seeing nanobsd error out with > the "NANO_TOOLS directory does not exist" message. >=20 > The problem is that NANO_TOOLS is initialised to "tools/tools/nanobsd", > and you changed the test in nanobsd.sh to *not* check for > "${NANO_SRC}/${NANO_TOOLS}", which errors out except if the cwd is > ${NANO_SRC}. >=20 > You tweak NANO_TOOLS appropriately in set_defaults_and_export() but it's > run after the dir test. There are a couple of ways to fix but I'll leave > it to you to decide which you prefer. Will this work for you? https://people.freebsd.org/~will/patches/nanobsd.sh.diff This also fixes another bug where NANO_PMAKE would be modified too early. Thanks, --Will. --BwCQnh7xodEAoBMC Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlS/xIcACgkQF47idPgWcsVNYgCeJnWbAyN3HCbnEOMjjDdDyjcS Nr8AoIjuvgf7DM/Jr6x9NJr/gYhTvvmn =qGsa -----END PGP SIGNATURE----- --BwCQnh7xodEAoBMC-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 16:09:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 34303C8D; Wed, 21 Jan 2015 16:09:17 +0000 (UTC) Received: from mail-ie0-x22a.google.com (mail-ie0-x22a.google.com [IPv6:2607:f8b0:4001:c03::22a]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EB2996C6; Wed, 21 Jan 2015 16:09:16 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id y20so16596247ier.1; Wed, 21 Jan 2015 08:09:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bFJBZfQSywHnL1WtZHiyOUVxBuZplov8XDyrOieWhGQ=; b=UT+UKnXlcN0appnO9uaD+Wd6/U0aH8vMjXV0v5UqzLZhJvCh33ZYwcIxCrM4Lk3/qb 4hkEYUrv7iw3BKnwk6W0l1RYavry57TQJatEoVqIWCSTzGZlVkIYm7R2iTHiZydVtg/A C9ZfJXllMi4Gkd6E2+N8eREsazdrJxvXXfhniFY/al4uWeWtCy7P2q7bHSLtLqCfhGr4 axbQmtOS6oZkPI8axRYrQMi2Pbc5vJc5Vhvbs7/stE5T4IwHdbZ3PUWGQGPjH3i2DA9J cQGieKayfKN/3Vtey7rgObWW5f4GI14RkANGxi8Uw1yMAJiEIHivkqouP96UE2akI16B PqDw== MIME-Version: 1.0 X-Received: by 10.50.93.70 with SMTP id cs6mr5348158igb.6.1421856556360; Wed, 21 Jan 2015 08:09:16 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Wed, 21 Jan 2015 08:09:16 -0800 (PST) In-Reply-To: <54BFB10C.9080004@freebsd.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BFB10C.9080004@freebsd.org> Date: Wed, 21 Jan 2015 08:09:16 -0800 X-Google-Sender-Auth: ZPygylGb3oQI4pCDTJd48UsJkLk Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Lawrence Stewart Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Hans Petter Selasky X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 16:09:17 -0000 On 21 January 2015 at 06:00, Lawrence Stewart wrote: > On 01/20/15 09:22, Adrian Chadd wrote: >> Yeah, it looks like you set c_cpu to timeout_cpu in >> _callout_init_locked(), but then you only handle the case of the CPU >> being changed in certain circumstances. You aren't handling the CPU >> being initialised when the callout is first added. >> >> And, callout_restart_async() calls callout_lock(), which calls >> CC_LOCK() on the callout CPU, which initially is zero. Then, it never >> seems to be 'moved' into the correct CPU, even though it's being >> called with a CPU id. >> >> So, if I am reading this all correctly, you aren't really handling >> multi CPU callwheels at all. ;) >> >> In my instance, I'm seeing quite a lot of lock contention between the >> userland threads, the network RX threads and the clock thread, all >> contending on a single callout wheel being used for TCP timers. One of >> the early goals for fixing up the RSS stuff in -HEAD was to make >> per-CPU (Well, per-RSS-bucket really) TCP timers not contend with the >> NIC RX processing path, and now it does. :( > > To clarify, you're seeing this with net.inet.tcp.per_cpu_timers=1? Yup, RSS enables that by default. -adrian From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 16:10:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9C335DD8; Wed, 21 Jan 2015 16:10:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85FDF6D3; Wed, 21 Jan 2015 16:10:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LGAdl7085450; Wed, 21 Jan 2015 16:10:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LGAcMg085437; Wed, 21 Jan 2015 16:10:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501211610.t0LGAcMg085437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Jan 2015 16:10:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277487 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 16:10:39 -0000 Author: kib Date: Wed Jan 21 16:10:37 2015 New Revision: 277487 URL: https://svnweb.freebsd.org/changeset/base/277487 Log: An update for the i915 GPU driver, which brings the code up to Linux commit 4d93914ae3db4a897ead4b. Some related drm infrastructure changes are imported as needed. Biggest update is the rewrite of the i915 gem io to more closely follow Linux model, althought the mechanism used by FreeBSD port is different. Sponsored by: The FreeBSD Foundation MFC after: 2 month Added: head/sys/dev/drm2/i915/i915_gem_stolen.c (contents, props changed) head/sys/dev/drm2/i915/intel_ddi.c (contents, props changed) head/sys/dev/drm2/i915/intel_pm.c (contents, props changed) Modified: head/sys/dev/drm2/drm.h head/sys/dev/drm2/drmP.h head/sys/dev/drm2/drm_crtc.c head/sys/dev/drm2/drm_crtc.h head/sys/dev/drm2/drm_crtc_helper.c head/sys/dev/drm2/drm_crtc_helper.h head/sys/dev/drm2/drm_drv.c head/sys/dev/drm2/drm_edid.c head/sys/dev/drm2/drm_edid.h head/sys/dev/drm2/drm_edid_modes.h head/sys/dev/drm2/drm_fb_helper.c head/sys/dev/drm2/drm_ioctl.c head/sys/dev/drm2/drm_irq.c head/sys/dev/drm2/drm_memory.c head/sys/dev/drm2/drm_mode.h head/sys/dev/drm2/drm_pciids.h head/sys/dev/drm2/drm_stub.c head/sys/dev/drm2/i915/i915_debug.c head/sys/dev/drm2/i915/i915_dma.c head/sys/dev/drm2/i915/i915_drm.h head/sys/dev/drm2/i915/i915_drv.c head/sys/dev/drm2/i915/i915_drv.h head/sys/dev/drm2/i915/i915_gem.c head/sys/dev/drm2/i915/i915_gem_context.c head/sys/dev/drm2/i915/i915_gem_evict.c head/sys/dev/drm2/i915/i915_gem_execbuffer.c head/sys/dev/drm2/i915/i915_gem_gtt.c head/sys/dev/drm2/i915/i915_gem_tiling.c head/sys/dev/drm2/i915/i915_irq.c head/sys/dev/drm2/i915/i915_reg.h head/sys/dev/drm2/i915/i915_suspend.c head/sys/dev/drm2/i915/intel_bios.c head/sys/dev/drm2/i915/intel_crt.c head/sys/dev/drm2/i915/intel_display.c head/sys/dev/drm2/i915/intel_dp.c head/sys/dev/drm2/i915/intel_drv.h head/sys/dev/drm2/i915/intel_fb.c head/sys/dev/drm2/i915/intel_hdmi.c head/sys/dev/drm2/i915/intel_iic.c head/sys/dev/drm2/i915/intel_lvds.c head/sys/dev/drm2/i915/intel_modes.c head/sys/dev/drm2/i915/intel_overlay.c head/sys/dev/drm2/i915/intel_panel.c head/sys/dev/drm2/i915/intel_ringbuffer.c head/sys/dev/drm2/i915/intel_ringbuffer.h head/sys/dev/drm2/i915/intel_sdvo.c head/sys/dev/drm2/i915/intel_sprite.c head/sys/dev/drm2/i915/intel_tv.c head/sys/dev/drm2/radeon/atombios_encoders.c head/sys/dev/drm2/radeon/radeon_legacy_encoders.c head/sys/modules/drm2/i915kms/Makefile Modified: head/sys/dev/drm2/drm.h ============================================================================== --- head/sys/dev/drm2/drm.h Wed Jan 21 13:48:06 2015 (r277486) +++ head/sys/dev/drm2/drm.h Wed Jan 21 16:10:37 2015 (r277487) @@ -1018,6 +1018,9 @@ struct drm_event_vblank { #define DRM_CAP_PRIME 0x5 #define DRM_CAP_TIMESTAMP_MONOTONIC 0x6 +#define DRM_PRIME_CAP_IMPORT 0x1 +#define DRM_PRIME_CAP_EXPORT 0x2 + #include "drm_mode.h" /** @@ -1126,6 +1129,8 @@ struct drm_event_vblank { #define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane) #define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane) #define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2) +#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties) +#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property) #define DRM_IOCTL_MM_INIT DRM_IOWR(0xc0, struct drm_mm_init_arg) #define DRM_IOCTL_MM_TAKEDOWN DRM_IOWR(0xc1, struct drm_mm_type_arg) Modified: head/sys/dev/drm2/drmP.h ============================================================================== --- head/sys/dev/drm2/drmP.h Wed Jan 21 13:48:06 2015 (r277486) +++ head/sys/dev/drm2/drmP.h Wed Jan 21 16:10:37 2015 (r277487) @@ -1246,6 +1246,7 @@ int drm_ati_pcigart_cleanup(struct drm_d /* Cache management (drm_memory.c) */ void drm_clflush_pages(vm_page_t *pages, unsigned long num_pages); +void drm_clflush_virt_range(char *addr, unsigned long length); /* Locking IOCTL support (drm_drv.c) */ int drm_lock(struct drm_device *dev, void *data, Modified: head/sys/dev/drm2/drm_crtc.c ============================================================================== --- head/sys/dev/drm2/drm_crtc.c Wed Jan 21 13:48:06 2015 (r277486) +++ head/sys/dev/drm2/drm_crtc.c Wed Jan 21 16:10:37 2015 (r277487) @@ -352,7 +352,7 @@ void drm_framebuffer_cleanup(struct drm_ * @funcs: callbacks for the new CRTC * * LOCKING: - * Caller must hold mode config lock. + * Takes mode_config lock. * * Inits a new object created as base part of an driver crtc object. * @@ -372,8 +372,11 @@ int drm_crtc_init(struct drm_device *dev if (ret) goto out; + crtc->base.properties = &crtc->properties; + list_add_tail(&crtc->head, &dev->mode_config.crtc_list); dev->mode_config.num_crtc++; + out: sx_xunlock(&dev->mode_config.mutex); @@ -474,6 +477,7 @@ int drm_connector_init(struct drm_device if (ret) goto out; + connector->base.properties = &connector->properties; connector->dev = dev; connector->funcs = funcs; connector->connector_type = connector_type; @@ -582,6 +586,7 @@ int drm_plane_init(struct drm_device *de if (ret) goto out; + plane->base.properties = &plane->properties; plane->dev = dev; plane->funcs = funcs; plane->format_types = malloc(sizeof(uint32_t) * format_count, @@ -1399,11 +1404,7 @@ int drm_mode_getconnector(struct drm_dev } connector = obj_to_connector(obj); - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] != 0) { - props_count++; - } - } + props_count = connector->properties.count; for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) { if (connector->encoder_ids[i] != 0) { @@ -1456,21 +1457,19 @@ int drm_mode_getconnector(struct drm_dev copied = 0; prop_ptr = (uint32_t *)(uintptr_t)(out_resp->props_ptr); prop_values = (uint64_t *)(uintptr_t)(out_resp->prop_values_ptr); - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] != 0) { - if (copyout(&connector->property_ids[i], - prop_ptr + copied, sizeof(uint32_t))) { - ret = EFAULT; - goto out; - } + for (i = 0; i < connector->properties.count; i++) { + if (copyout(&connector->properties.ids[i], + prop_ptr + copied, sizeof(uint32_t))) { + ret = EFAULT; + goto out; + } - if (copyout(&connector->property_values[i], - prop_values + copied, sizeof(uint64_t))) { - ret = EFAULT; - goto out; - } - copied++; + if (copyout(&connector->properties.values[i], + prop_values + copied, sizeof(uint64_t))) { + ret = EFAULT; + goto out; } + copied++; } } out_resp->count_props = props_count; @@ -1808,7 +1807,7 @@ int drm_mode_setcrtc(struct drm_device * struct drm_display_mode *mode = NULL; struct drm_mode_set set; uint32_t *set_connectors_ptr; - int ret = 0; + int ret; int i; if (!drm_core_check_feature(dev, DRIVER_MODESET)) @@ -2070,7 +2069,7 @@ int drm_mode_addfb(struct drm_device *de ret = -dev->mode_config.funcs->fb_create(dev, file_priv, &r, &fb); if (ret != 0) { - DRM_ERROR("could not create framebuffer, error %d\n", ret); + DRM_DEBUG_KMS("could not create framebuffer, error %d\n", ret); goto out; } @@ -2152,6 +2151,47 @@ static int format_check(struct drm_mode_ } } +static int framebuffer_check(struct drm_mode_fb_cmd2 *r) +{ + int ret, hsub, vsub, num_planes, i; + + ret = format_check(r); + if (ret) { + DRM_DEBUG_KMS("bad framebuffer format 0x%08x\n", r->pixel_format); + return ret; + } + + hsub = drm_format_horz_chroma_subsampling(r->pixel_format); + vsub = drm_format_vert_chroma_subsampling(r->pixel_format); + num_planes = drm_format_num_planes(r->pixel_format); + + if (r->width == 0 || r->width % hsub) { + DRM_DEBUG_KMS("bad framebuffer width %u\n", r->height); + return -EINVAL; + } + + if (r->height == 0 || r->height % vsub) { + DRM_DEBUG_KMS("bad framebuffer height %u\n", r->height); + return -EINVAL; + } + + for (i = 0; i < num_planes; i++) { + unsigned int width = r->width / (i != 0 ? hsub : 1); + + if (!r->handles[i]) { + DRM_DEBUG_KMS("no buffer object handle for plane %d\n", i); + return -EINVAL; + } + + if (r->pitches[i] < drm_format_plane_cpp(r->pixel_format, i) * width) { + DRM_DEBUG_KMS("bad pitch %u for plane %d\n", r->pitches[i], i); + return -EINVAL; + } + } + + return 0; +} + /** * drm_mode_addfb2 - add an FB to the graphics configuration * @inode: inode from the ioctl @@ -2181,21 +2221,19 @@ int drm_mode_addfb2(struct drm_device *d return (EINVAL); if ((config->min_width > r->width) || (r->width > config->max_width)) { - DRM_ERROR("bad framebuffer width %d, should be >= %d && <= %d\n", + DRM_DEBUG_KMS("bad framebuffer width %d, should be >= %d && <= %d\n", r->width, config->min_width, config->max_width); return (EINVAL); } if ((config->min_height > r->height) || (r->height > config->max_height)) { - DRM_ERROR("bad framebuffer height %d, should be >= %d && <= %d\n", + DRM_DEBUG_KMS("bad framebuffer height %d, should be >= %d && <= %d\n", r->height, config->min_height, config->max_height); return (EINVAL); } - ret = format_check(r); - if (ret) { - DRM_ERROR("bad framebuffer format 0x%08x\n", r->pixel_format); - return ret; - } + ret = framebuffer_check(r); + if (ret) + return -ret; sx_xlock(&dev->mode_config.mutex); @@ -2204,7 +2242,7 @@ int drm_mode_addfb2(struct drm_device *d ret = -dev->mode_config.funcs->fb_create(dev, file_priv, r, &fb); if (ret != 0) { - DRM_ERROR("could not create framebuffer, error %d\n", ret); + DRM_DEBUG_KMS("could not create framebuffer, error %d\n", ret); goto out; } @@ -2335,7 +2373,7 @@ int drm_mode_dirtyfb_ioctl(struct drm_de struct drm_framebuffer *fb; unsigned flags; int num_clips; - int ret = 0; + int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return (EINVAL); @@ -2530,7 +2568,7 @@ int drm_mode_attachmode_ioctl(struct drm struct drm_display_mode *mode; struct drm_mode_object *obj; struct drm_mode_modeinfo *umode = &mode_cmd->mode; - int ret = 0; + int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; @@ -2584,7 +2622,7 @@ int drm_mode_detachmode_ioctl(struct drm struct drm_connector *connector; struct drm_display_mode mode; struct drm_mode_modeinfo *umode = &mode_cmd->mode; - int ret = 0; + int ret; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; @@ -2672,6 +2710,33 @@ struct drm_property *drm_property_create return property; } +struct drm_property *drm_property_create_bitmask(struct drm_device *dev, + int flags, const char *name, + const struct drm_prop_enum_list *props, + int num_values) +{ + struct drm_property *property; + int i, ret; + + flags |= DRM_MODE_PROP_BITMASK; + + property = drm_property_create(dev, flags, name, num_values); + if (!property) + return NULL; + + for (i = 0; i < num_values; i++) { + ret = drm_property_add_enum(property, i, + props[i].type, + props[i].name); + if (ret) { + drm_property_destroy(dev, property); + return NULL; + } + } + + return property; +} + struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, const char *name, uint64_t min, uint64_t max) @@ -2695,7 +2760,14 @@ int drm_property_add_enum(struct drm_pro { struct drm_property_enum *prop_enum; - if (!(property->flags & DRM_MODE_PROP_ENUM)) + if (!(property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK))) + return -EINVAL; + + /* + * Bitmask enum properties have the additional constraint of values + * from 0 to 63 + */ + if ((property->flags & DRM_MODE_PROP_BITMASK) && (value > 63)) return -EINVAL; if (!list_empty(&property->enum_blob_list)) { @@ -2736,56 +2808,71 @@ void drm_property_destroy(struct drm_dev free(property, DRM_MEM_KMS); } -int drm_connector_attach_property(struct drm_connector *connector, +void drm_connector_attach_property(struct drm_connector *connector, struct drm_property *property, uint64_t init_val) { - int i; - - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == 0) { - connector->property_ids[i] = property->base.id; - connector->property_values[i] = init_val; - break; - } - } - - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + drm_object_attach_property(&connector->base, property, init_val); } int drm_connector_property_set_value(struct drm_connector *connector, struct drm_property *property, uint64_t value) { + return drm_object_property_set_value(&connector->base, property, value); +} + +int drm_connector_property_get_value(struct drm_connector *connector, + struct drm_property *property, uint64_t *val) +{ + return drm_object_property_get_value(&connector->base, property, val); +} + +void drm_object_attach_property(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t init_val) +{ + int count = obj->properties->count; + + if (count == DRM_OBJECT_MAX_PROPERTY) { + printf("Failed to attach object property (type: 0x%x). Please " + "increase DRM_OBJECT_MAX_PROPERTY by 1 for each time " + "you see this message on the same object type.\n", + obj->type); + return; + } + + obj->properties->ids[count] = property->base.id; + obj->properties->values[count] = init_val; + obj->properties->count++; +} + +int drm_object_property_set_value(struct drm_mode_object *obj, + struct drm_property *property, uint64_t val) +{ int i; - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == property->base.id) { - connector->property_values[i] = value; - break; + for (i = 0; i < obj->properties->count; i++) { + if (obj->properties->ids[i] == property->base.id) { + obj->properties->values[i] = val; + return 0; } } - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + return -EINVAL; } -int drm_connector_property_get_value(struct drm_connector *connector, +int drm_object_property_get_value(struct drm_mode_object *obj, struct drm_property *property, uint64_t *val) { int i; - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == property->base.id) { - *val = connector->property_values[i]; - break; + for (i = 0; i < obj->properties->count; i++) { + if (obj->properties->ids[i] == property->base.id) { + *val = obj->properties->values[i]; + return 0; } } - if (i == DRM_CONNECTOR_MAX_PROPERTY) - return -EINVAL; - return 0; + return -EINVAL; } int drm_mode_getproperty_ioctl(struct drm_device *dev, @@ -2817,7 +2904,7 @@ int drm_mode_getproperty_ioctl(struct dr } property = obj_to_property(obj); - if (property->flags & DRM_MODE_PROP_ENUM) { + if (property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)) { list_for_each_entry(prop_enum, &property->enum_blob_list, head) enum_count++; } else if (property->flags & DRM_MODE_PROP_BLOB) { @@ -2842,7 +2929,7 @@ int drm_mode_getproperty_ioctl(struct dr } out_resp->count_values = value_count; - if (property->flags & DRM_MODE_PROP_ENUM) { + if (property->flags & (DRM_MODE_PROP_ENUM | DRM_MODE_PROP_BITMASK)) { if ((out_resp->count_enum_blobs >= enum_count) && enum_count) { copied = 0; enum_ptr = (struct drm_mode_property_enum *)(uintptr_t)out_resp->enum_blob_ptr; @@ -2965,7 +3052,7 @@ int drm_mode_connector_update_edid_prope struct edid *edid) { struct drm_device *dev = connector->dev; - int ret = 0, size; + int ret, size; if (connector->edid_blob_ptr) drm_property_destroy_blob(dev, connector->edid_blob_ptr); @@ -2988,75 +3075,202 @@ int drm_mode_connector_update_edid_prope return ret; } +static bool drm_property_change_is_valid(struct drm_property *property, + u64 value) +{ + if (property->flags & DRM_MODE_PROP_IMMUTABLE) + return false; + if (property->flags & DRM_MODE_PROP_RANGE) { + if (value < property->values[0] || value > property->values[1]) + return false; + return true; + } else if (property->flags & DRM_MODE_PROP_BITMASK) { + int i; + u64 valid_mask = 0; + for (i = 0; i < property->num_values; i++) + valid_mask |= (1ULL << property->values[i]); + return !(value & ~valid_mask); + } else { + int i; + for (i = 0; i < property->num_values; i++) + if (property->values[i] == value) + return true; + return false; + } +} + int drm_mode_connector_property_set_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv) { - struct drm_mode_connector_set_property *out_resp = data; - struct drm_mode_object *obj; - struct drm_property *property; - struct drm_connector *connector; + struct drm_mode_connector_set_property *conn_set_prop = data; + struct drm_mode_obj_set_property obj_set_prop = { + .value = conn_set_prop->value, + .prop_id = conn_set_prop->prop_id, + .obj_id = conn_set_prop->connector_id, + .obj_type = DRM_MODE_OBJECT_CONNECTOR + }; + + /* It does all the locking and checking we need */ + return drm_mode_obj_set_property_ioctl(dev, &obj_set_prop, file_priv); +} + +static int drm_mode_connector_set_obj_prop(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t value) +{ + int ret = -EINVAL; + struct drm_connector *connector = obj_to_connector(obj); + + /* Do DPMS ourselves */ + if (property == connector->dev->mode_config.dpms_property) { + if (connector->funcs->dpms) + (*connector->funcs->dpms)(connector, (int)value); + ret = 0; + } else if (connector->funcs->set_property) + ret = connector->funcs->set_property(connector, property, value); + + /* store the property value if successful */ + if (!ret) + drm_connector_property_set_value(connector, property, value); + return ret; +} + +static int drm_mode_crtc_set_obj_prop(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t value) +{ int ret = -EINVAL; + struct drm_crtc *crtc = obj_to_crtc(obj); + + if (crtc->funcs->set_property) + ret = crtc->funcs->set_property(crtc, property, value); + if (!ret) + drm_object_property_set_value(obj, property, value); + + return ret; +} + +static int drm_mode_plane_set_obj_prop(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t value) +{ + int ret = -EINVAL; + struct drm_plane *plane = obj_to_plane(obj); + + if (plane->funcs->set_property) + ret = plane->funcs->set_property(plane, property, value); + if (!ret) + drm_object_property_set_value(obj, property, value); + + return ret; +} + +int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + struct drm_mode_obj_get_properties *arg = data; + struct drm_mode_object *obj; + int ret = 0; int i; + int copied = 0; + int props_count = 0; + uint32_t __user *props_ptr; + uint64_t __user *prop_values_ptr; if (!drm_core_check_feature(dev, DRIVER_MODESET)) return -EINVAL; sx_xlock(&dev->mode_config.mutex); - obj = drm_mode_object_find(dev, out_resp->connector_id, DRM_MODE_OBJECT_CONNECTOR); + obj = drm_mode_object_find(dev, arg->obj_id, arg->obj_type); if (!obj) { + ret = -EINVAL; + goto out; + } + if (!obj->properties) { + ret = -EINVAL; goto out; } - connector = obj_to_connector(obj); - for (i = 0; i < DRM_CONNECTOR_MAX_PROPERTY; i++) { - if (connector->property_ids[i] == out_resp->prop_id) - break; + props_count = obj->properties->count; + + /* This ioctl is called twice, once to determine how much space is + * needed, and the 2nd time to fill it. */ + if ((arg->count_props >= props_count) && props_count) { + copied = 0; + props_ptr = (uint32_t __user *)(unsigned long)(arg->props_ptr); + prop_values_ptr = (uint64_t __user *)(unsigned long) + (arg->prop_values_ptr); + for (i = 0; i < props_count; i++) { + if (copyout(props_ptr + copied, + &obj->properties->ids[i], sizeof(uint32_t))) { + ret = -EFAULT; + goto out; + } + if (copyout(prop_values_ptr + copied, + &obj->properties->values[i], sizeof(uint64_t))) { + ret = -EFAULT; + goto out; + } + copied++; + } } + arg->count_props = props_count; +out: + sx_xunlock(&dev->mode_config.mutex); + return ret; +} - if (i == DRM_CONNECTOR_MAX_PROPERTY) { +int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv) +{ + struct drm_mode_obj_set_property *arg = data; + struct drm_mode_object *arg_obj; + struct drm_mode_object *prop_obj; + struct drm_property *property; + int ret = -EINVAL; + int i; + + if (!drm_core_check_feature(dev, DRIVER_MODESET)) + return -EINVAL; + + sx_xlock(&dev->mode_config.mutex); + + arg_obj = drm_mode_object_find(dev, arg->obj_id, arg->obj_type); + if (!arg_obj) + goto out; + if (!arg_obj->properties) goto out; - } - obj = drm_mode_object_find(dev, out_resp->prop_id, DRM_MODE_OBJECT_PROPERTY); - if (!obj) { + for (i = 0; i < arg_obj->properties->count; i++) + if (arg_obj->properties->ids[i] == arg->prop_id) + break; + + if (i == arg_obj->properties->count) goto out; - } - property = obj_to_property(obj); - if (property->flags & DRM_MODE_PROP_IMMUTABLE) + prop_obj = drm_mode_object_find(dev, arg->prop_id, + DRM_MODE_OBJECT_PROPERTY); + if (!prop_obj) goto out; + property = obj_to_property(prop_obj); - if (property->flags & DRM_MODE_PROP_RANGE) { - if (out_resp->value < property->values[0]) - goto out; + if (!drm_property_change_is_valid(property, arg->value)) + goto out; - if (out_resp->value > property->values[1]) - goto out; - } else { - int found = 0; - for (i = 0; i < property->num_values; i++) { - if (property->values[i] == out_resp->value) { - found = 1; - break; - } - } - if (!found) { - goto out; - } + switch (arg_obj->type) { + case DRM_MODE_OBJECT_CONNECTOR: + ret = drm_mode_connector_set_obj_prop(arg_obj, property, + arg->value); + break; + case DRM_MODE_OBJECT_CRTC: + ret = drm_mode_crtc_set_obj_prop(arg_obj, property, arg->value); + break; + case DRM_MODE_OBJECT_PLANE: + ret = drm_mode_plane_set_obj_prop(arg_obj, property, arg->value); + break; } - /* Do DPMS ourselves */ - if (property == connector->dev->mode_config.dpms_property) { - if (connector->funcs->dpms) - (*connector->funcs->dpms)(connector, (int) out_resp->value); - ret = 0; - } else if (connector->funcs->set_property) - ret = connector->funcs->set_property(connector, property, out_resp->value); - - /* store the property value if successful */ - if (!ret) - drm_connector_property_set_value(connector, property, out_resp->value); out: sx_xunlock(&dev->mode_config.mutex); return ret; @@ -3176,6 +3390,11 @@ int drm_mode_gamma_get_ioctl(struct drm_ } crtc = obj_to_crtc(obj); + if (crtc->funcs->gamma_set == NULL) { + ret = -ENOSYS; + goto out; + } + /* memcpy into gamma store */ if (crtc_lut->gamma_size != crtc->gamma_size) { ret = -EINVAL; @@ -3417,3 +3636,136 @@ void drm_fb_get_bpp_depth(uint32_t forma break; } } + +/** + * drm_format_num_planes - get the number of planes for format + * @format: pixel format (DRM_FORMAT_*) + * + * RETURNS: + * The number of planes used by the specified pixel format. + */ +int drm_format_num_planes(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + case DRM_FORMAT_YUV411: + case DRM_FORMAT_YVU411: + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: + return 3; + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + case DRM_FORMAT_NV16: + case DRM_FORMAT_NV61: + return 2; + default: + return 1; + } +} + +/** + * drm_format_plane_cpp - determine the bytes per pixel value + * @format: pixel format (DRM_FORMAT_*) + * @plane: plane index + * + * RETURNS: + * The bytes per pixel value for the specified plane. + */ +int drm_format_plane_cpp(uint32_t format, int plane) +{ + unsigned int depth; + int bpp; + + if (plane >= drm_format_num_planes(format)) + return 0; + + switch (format) { + case DRM_FORMAT_YUYV: + case DRM_FORMAT_YVYU: + case DRM_FORMAT_UYVY: + case DRM_FORMAT_VYUY: + return 2; + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + case DRM_FORMAT_NV16: + case DRM_FORMAT_NV61: + return plane ? 2 : 1; + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + case DRM_FORMAT_YUV411: + case DRM_FORMAT_YVU411: + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV444: + case DRM_FORMAT_YVU444: + return 1; + default: + drm_fb_get_bpp_depth(format, &depth, &bpp); + return bpp >> 3; + } +} + +/** + * drm_format_horz_chroma_subsampling - get the horizontal chroma subsampling factor + * @format: pixel format (DRM_FORMAT_*) + * + * RETURNS: + * The horizontal chroma subsampling factor for the + * specified pixel format. + */ +int drm_format_horz_chroma_subsampling(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_YUV411: + case DRM_FORMAT_YVU411: + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + return 4; + case DRM_FORMAT_YUYV: + case DRM_FORMAT_YVYU: + case DRM_FORMAT_UYVY: + case DRM_FORMAT_VYUY: + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + case DRM_FORMAT_NV16: + case DRM_FORMAT_NV61: + case DRM_FORMAT_YUV422: + case DRM_FORMAT_YVU422: + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + return 2; + default: + return 1; + } +} + +/** + * drm_format_vert_chroma_subsampling - get the vertical chroma subsampling factor + * @format: pixel format (DRM_FORMAT_*) + * + * RETURNS: + * The vertical chroma subsampling factor for the + * specified pixel format. + */ +int drm_format_vert_chroma_subsampling(uint32_t format) +{ + switch (format) { + case DRM_FORMAT_YUV410: + case DRM_FORMAT_YVU410: + return 4; + case DRM_FORMAT_YUV420: + case DRM_FORMAT_YVU420: + case DRM_FORMAT_NV12: + case DRM_FORMAT_NV21: + return 2; + default: + return 1; + } +} Modified: head/sys/dev/drm2/drm_crtc.h ============================================================================== --- head/sys/dev/drm2/drm_crtc.h Wed Jan 21 13:48:06 2015 (r277486) +++ head/sys/dev/drm2/drm_crtc.h Wed Jan 21 16:10:37 2015 (r277487) @@ -47,6 +47,14 @@ struct i2c_adapter; struct drm_mode_object { uint32_t id; uint32_t type; + struct drm_object_properties *properties; +}; + +#define DRM_OBJECT_MAX_PROPERTY 16 +struct drm_object_properties { + int count; + uint32_t ids[DRM_OBJECT_MAX_PROPERTY]; + uint64_t values[DRM_OBJECT_MAX_PROPERTY]; }; /* @@ -295,7 +303,8 @@ struct drm_plane; * @mode_fixup: fixup proposed mode * @mode_set: set the desired mode on the CRTC * @gamma_set: specify color ramp for CRTC - * @destroy: deinit and free object. + * @destroy: deinit and free object + * @set_property: called when a property is changed * * The drm_crtc_funcs structure is the central CRTC management structure * in the DRM. Each CRTC controls one or more connectors (note that the name @@ -339,6 +348,8 @@ struct drm_crtc_funcs { int (*page_flip)(struct drm_crtc *crtc, struct drm_framebuffer *fb, struct drm_pending_vblank_event *event); + int (*set_property)(struct drm_crtc *crtc, + struct drm_property *property, uint64_t val); }; /** @@ -347,6 +358,7 @@ struct drm_crtc_funcs { * @x: x position on screen * @y: y position on screen * @funcs: CRTC control functions + * @properties: property tracking for this CRTC * * Each CRTC may have one or more connectors associated with it. This structure * allows the CRTC to be controlled. @@ -382,6 +394,8 @@ struct drm_crtc { /* if you are using the helper */ void *helper_private; + + struct drm_object_properties properties; }; @@ -431,7 +445,6 @@ struct drm_encoder_funcs { }; #define DRM_CONNECTOR_MAX_UMODES 16 -#define DRM_CONNECTOR_MAX_PROPERTY 16 #define DRM_CONNECTOR_LEN 32 #define DRM_CONNECTOR_MAX_ENCODER 2 @@ -511,8 +524,7 @@ struct drm_connector { struct list_head user_modes; struct drm_property_blob *edid_blob_ptr; - u32 property_ids[DRM_CONNECTOR_MAX_PROPERTY]; - uint64_t property_values[DRM_CONNECTOR_MAX_PROPERTY]; + struct drm_object_properties properties; uint8_t polled; /* DRM_CONNECTOR_POLL_* */ @@ -543,6 +555,7 @@ struct drm_connector { * @update_plane: update the plane configuration * @disable_plane: shut down the plane * @destroy: clean up plane resources + * @set_property: called when a property is changed */ struct drm_plane_funcs { int (*update_plane)(struct drm_plane *plane, @@ -553,6 +566,8 @@ struct drm_plane_funcs { uint32_t src_w, uint32_t src_h); int (*disable_plane)(struct drm_plane *plane); void (*destroy)(struct drm_plane *plane); + int (*set_property)(struct drm_plane *plane, + struct drm_property *property, uint64_t val); }; /** @@ -570,6 +585,7 @@ struct drm_plane_funcs { * @enabled: enabled flag * @funcs: helper functions * @helper_private: storage for drver layer + @properties: property tracking for this plane */ struct drm_plane { struct drm_device *dev; @@ -592,6 +608,8 @@ struct drm_plane { const struct drm_plane_funcs *funcs; void *helper_private; + + struct drm_object_properties properties; }; /** @@ -806,6 +824,15 @@ extern int drm_connector_property_set_va extern int drm_connector_property_get_value(struct drm_connector *connector, struct drm_property *property, uint64_t *value); +void drm_object_attach_property(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t init_val); +extern int drm_object_property_set_value(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t val); +extern int drm_object_property_get_value(struct drm_mode_object *obj, + struct drm_property *property, + uint64_t *value); extern struct drm_display_mode *drm_crtc_mode_create(struct drm_device *dev); extern void drm_framebuffer_set_object(struct drm_device *dev, unsigned long handle); @@ -818,7 +845,7 @@ extern int drmfb_remove(struct drm_devic extern void drm_crtc_probe_connector_modes(struct drm_device *dev, int maxX, int maxY); extern bool drm_crtc_in_use(struct drm_crtc *crtc); -extern int drm_connector_attach_property(struct drm_connector *connector, +extern void drm_connector_attach_property(struct drm_connector *connector, struct drm_property *property, uint64_t init_val); extern struct drm_property *drm_property_create(struct drm_device *dev, int flags, const char *name, int num_values); @@ -826,6 +853,10 @@ extern struct drm_property *drm_property const char *name, const struct drm_prop_enum_list *props, int num_values); +struct drm_property *drm_property_create_bitmask(struct drm_device *dev, + int flags, const char *name, + const struct drm_prop_enum_list *props, + int num_values); struct drm_property *drm_property_create_range(struct drm_device *dev, int flags, const char *name, uint64_t min, uint64_t max); @@ -921,7 +952,8 @@ extern int drm_add_modes_noedid(struct d extern int drm_edid_header_is_valid(const u8 *raw_edid); extern bool drm_edid_is_valid(struct edid *edid); struct drm_display_mode *drm_mode_find_dmt(struct drm_device *dev, - int hsize, int vsize, int fresh); + int hsize, int vsize, int fresh, + bool rb); extern int drm_mode_create_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); @@ -929,7 +961,16 @@ extern int drm_mode_mmap_dumb_ioctl(stru void *data, struct drm_file *file_priv); extern int drm_mode_destroy_dumb_ioctl(struct drm_device *dev, void *data, struct drm_file *file_priv); +extern int drm_mode_obj_get_properties_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); +extern int drm_mode_obj_set_property_ioctl(struct drm_device *dev, void *data, + struct drm_file *file_priv); extern void drm_fb_get_bpp_depth(uint32_t format, unsigned int *depth, int *bpp); +extern int drm_format_num_planes(uint32_t format); +extern int drm_format_plane_cpp(uint32_t format, int plane); +extern int drm_format_horz_chroma_subsampling(uint32_t format); +extern int drm_format_vert_chroma_subsampling(uint32_t format); + #endif /* __DRM_CRTC_H__ */ Modified: head/sys/dev/drm2/drm_crtc_helper.c ============================================================================== --- head/sys/dev/drm2/drm_crtc_helper.c Wed Jan 21 13:48:06 2015 (r277486) +++ head/sys/dev/drm2/drm_crtc_helper.c Wed Jan 21 16:10:37 2015 (r277487) @@ -549,7 +549,7 @@ int drm_crtc_helper_set_config(struct dr int count = 0, ro, fail = 0; struct drm_crtc_helper_funcs *crtc_funcs; struct drm_mode_set save_set; - int ret = 0; + int ret; int i; DRM_DEBUG_KMS("\n"); Modified: head/sys/dev/drm2/drm_crtc_helper.h ============================================================================== --- head/sys/dev/drm2/drm_crtc_helper.h Wed Jan 21 13:48:06 2015 (r277486) +++ head/sys/dev/drm2/drm_crtc_helper.h Wed Jan 21 16:10:37 2015 (r277487) @@ -78,7 +78,7 @@ struct drm_encoder_helper_funcs { *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 16:13:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9F85CF85; Wed, 21 Jan 2015 16:13:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B8FB7DE; Wed, 21 Jan 2015 16:13:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LGDcKV088669; Wed, 21 Jan 2015 16:13:38 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LGDcLg088668; Wed, 21 Jan 2015 16:13:38 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501211613.t0LGDcLg088668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Jan 2015 16:13:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277488 - head/lib/libthr/thread X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 16:13:38 -0000 Author: kib Date: Wed Jan 21 16:13:37 2015 New Revision: 277488 URL: https://svnweb.freebsd.org/changeset/base/277488 Log: Fix bug in r276630. Do not allow pthread_sigmask() to block SIGCANCEL. Reported and tested by: royger Sponsored by: The FreeBSD Foundation MFC after: 3 days Modified: head/lib/libthr/thread/thr_sig.c Modified: head/lib/libthr/thread/thr_sig.c ============================================================================== --- head/lib/libthr/thread/thr_sig.c Wed Jan 21 16:10:37 2015 (r277487) +++ head/lib/libthr/thread/thr_sig.c Wed Jan 21 16:13:37 2015 (r277488) @@ -604,7 +604,8 @@ __weak_reference(_pthread_sigmask, pthre int _pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { - if (_sigprocmask(how, set, oset)) + + if (__thr_sigprocmask(how, set, oset)) return (errno); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 16:32:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A31BC7BF; Wed, 21 Jan 2015 16:32:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F871A53; Wed, 21 Jan 2015 16:32:55 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LGWt0h098071; Wed, 21 Jan 2015 16:32:55 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LGWtOR098070; Wed, 21 Jan 2015 16:32:55 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501211632.t0LGWtOR098070@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Wed, 21 Jan 2015 16:32:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277489 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 16:32:55 -0000 Author: kib Date: Wed Jan 21 16:32:54 2015 New Revision: 277489 URL: https://svnweb.freebsd.org/changeset/base/277489 Log: Do not assert that the new pipepair mutex is not initialized. The backing memory contains garbage and might trigger the assertion. Reported and tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Modified: head/sys/kern/sys_pipe.c Modified: head/sys/kern/sys_pipe.c ============================================================================== --- head/sys/kern/sys_pipe.c Wed Jan 21 16:13:37 2015 (r277488) +++ head/sys/kern/sys_pipe.c Wed Jan 21 16:32:54 2015 (r277489) @@ -318,7 +318,7 @@ pipe_zone_init(void *mem, int size, int pp = (struct pipepair *)mem; - mtx_init(&pp->pp_mtx, "pipe mutex", NULL, MTX_DEF); + mtx_init(&pp->pp_mtx, "pipe mutex", NULL, MTX_DEF | MTX_NEW); return (0); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 16:41:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8609DC7C; Wed, 21 Jan 2015 16:41:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6EB57B7E; Wed, 21 Jan 2015 16:41:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LGf992099875; Wed, 21 Jan 2015 16:41:09 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LGf59R099855; Wed, 21 Jan 2015 16:41:05 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501211641.t0LGf59R099855@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 21 Jan 2015 16:41:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277490 - in head/lib/libthr: . arch/amd64 arch/amd64/amd64 arch/amd64/include arch/arm arch/arm/arm arch/arm/include arch/common arch/i386 arch/i386/i386 arch/i386/include arch/mips ar... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 16:41:09 -0000 Author: andrew Date: Wed Jan 21 16:41:05 2015 New Revision: 277490 URL: https://svnweb.freebsd.org/changeset/base/277490 Log: Merge all the copies of _tcb_ctor and _tcb_dtor. The amd64, i386, and sparc64 versions were identical, with the one difference where the former two used inline asm instead of _tcb_get. I have compared the function before and after replacing the asm with _tcb_get and found the object files to be identical. The arm, mips, and powerpc versions were almost identical. The only difference was the powerpc version used an alignment of 1 where arm and mips used 16. As this is an increase in alignment is will be safe. Along with this arm, mips, and powerpc all passed, when initial was true, the value returned from _tcb_get as the first argument to _rtld_allocate_tls. This would then return this pointer back to the caller. We can remove these extra calls by checking if initial is set and setting the thread control block directly. As this is what the sparc64 code does we can use it directly. As after these observations all the architectures can now have identical code we can merge them into a common file. Differential Revision: https://reviews.freebsd.org/D1556 Reviewed by: kib Sponsored by: The FreeBSD Foundation Added: head/lib/libthr/arch/common/ head/lib/libthr/thread/thr_ctrdtr.c - copied, changed from r277373, head/lib/libthr/arch/sparc64/sparc64/pthread_md.c Deleted: head/lib/libthr/arch/amd64/amd64/pthread_md.c head/lib/libthr/arch/arm/Makefile.inc head/lib/libthr/arch/arm/arm/ head/lib/libthr/arch/i386/i386/pthread_md.c head/lib/libthr/arch/mips/Makefile.inc head/lib/libthr/arch/mips/mips/ head/lib/libthr/arch/powerpc/Makefile.inc head/lib/libthr/arch/powerpc/powerpc/ head/lib/libthr/arch/sparc64/sparc64/pthread_md.c Modified: head/lib/libthr/Makefile head/lib/libthr/arch/amd64/Makefile.inc head/lib/libthr/arch/amd64/include/pthread_md.h head/lib/libthr/arch/arm/include/pthread_md.h head/lib/libthr/arch/i386/Makefile.inc head/lib/libthr/arch/i386/include/pthread_md.h head/lib/libthr/arch/mips/include/pthread_md.h head/lib/libthr/arch/powerpc/include/pthread_md.h head/lib/libthr/arch/sparc64/Makefile.inc head/lib/libthr/arch/sparc64/include/pthread_md.h head/lib/libthr/thread/Makefile.inc head/lib/libthr/thread/thr_private.h Modified: head/lib/libthr/Makefile ============================================================================== --- head/lib/libthr/Makefile Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/Makefile Wed Jan 21 16:41:05 2015 (r277490) @@ -45,7 +45,9 @@ PRECIOUSLIB= .PATH: ${.CURDIR}/arch/${MACHINE_CPUARCH}/${MACHINE_CPUARCH} +.if exists(${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc) .include "${.CURDIR}/arch/${MACHINE_CPUARCH}/Makefile.inc" +.endif .include "${.CURDIR}/sys/Makefile.inc" .include "${.CURDIR}/thread/Makefile.inc" Modified: head/lib/libthr/arch/amd64/Makefile.inc ============================================================================== --- head/lib/libthr/arch/amd64/Makefile.inc Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/amd64/Makefile.inc Wed Jan 21 16:41:05 2015 (r277490) @@ -1,3 +1,3 @@ #$FreeBSD$ -SRCS+= pthread_md.c _umtx_op_err.S +SRCS+= _umtx_op_err.S Modified: head/lib/libthr/arch/amd64/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/amd64/include/pthread_md.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/amd64/include/pthread_md.h Wed Jan 21 16:41:05 2015 (r277490) @@ -77,9 +77,6 @@ struct tcb { __result; \ }) -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *tcb); - static __inline void _tcb_set(struct tcb *tcb) { Modified: head/lib/libthr/arch/arm/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/arm/include/pthread_md.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/arm/include/pthread_md.h Wed Jan 21 16:41:05 2015 (r277490) @@ -47,12 +47,6 @@ struct tcb { struct pthread *tcb_thread; /* our hook */ }; -/* - * The tcb constructors. - */ -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *); - /* Called from the thread to set its private data. */ static __inline void _tcb_set(struct tcb *tcb) Modified: head/lib/libthr/arch/i386/Makefile.inc ============================================================================== --- head/lib/libthr/arch/i386/Makefile.inc Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/i386/Makefile.inc Wed Jan 21 16:41:05 2015 (r277490) @@ -1,3 +1,3 @@ # $FreeBSD$ -SRCS+= pthread_md.c _umtx_op_err.S +SRCS+= _umtx_op_err.S Modified: head/lib/libthr/arch/i386/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/i386/include/pthread_md.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/i386/include/pthread_md.h Wed Jan 21 16:41:05 2015 (r277490) @@ -76,12 +76,6 @@ struct tcb { __result; \ }) -/* - * The constructors. - */ -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *tcb); - /* Called from the thread to set its private data. */ static __inline void _tcb_set(struct tcb *tcb) Modified: head/lib/libthr/arch/mips/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/mips/include/pthread_md.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/mips/include/pthread_md.h Wed Jan 21 16:41:05 2015 (r277490) @@ -50,12 +50,6 @@ struct tcb { struct pthread *tcb_thread; }; -/* - * The tcb constructors. - */ -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *); - /* Called from the thread to set its private data. */ static __inline void _tcb_set(struct tcb *tcb) Modified: head/lib/libthr/arch/powerpc/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/powerpc/include/pthread_md.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/powerpc/include/pthread_md.h Wed Jan 21 16:41:05 2015 (r277490) @@ -55,9 +55,6 @@ struct tcb { struct pthread *tcb_thread; }; -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *); - static __inline void _tcb_set(struct tcb *tcb) { Modified: head/lib/libthr/arch/sparc64/Makefile.inc ============================================================================== --- head/lib/libthr/arch/sparc64/Makefile.inc Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/sparc64/Makefile.inc Wed Jan 21 16:41:05 2015 (r277490) @@ -1,3 +1,3 @@ # $FreeBSD$ -SRCS+= _umtx_op_err.S pthread_md.c +SRCS+= _umtx_op_err.S Modified: head/lib/libthr/arch/sparc64/include/pthread_md.h ============================================================================== --- head/lib/libthr/arch/sparc64/include/pthread_md.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/arch/sparc64/include/pthread_md.h Wed Jan 21 16:41:05 2015 (r277490) @@ -50,12 +50,6 @@ struct tcb { void *tcb_spare[1]; }; -/* - * The tcb constructors. - */ -struct tcb *_tcb_ctor(struct pthread *, int); -void _tcb_dtor(struct tcb *); - /* Called from the thread to set its private data. */ static __inline void _tcb_set(struct tcb *tcb) Modified: head/lib/libthr/thread/Makefile.inc ============================================================================== --- head/lib/libthr/thread/Makefile.inc Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/thread/Makefile.inc Wed Jan 21 16:41:05 2015 (r277490) @@ -14,6 +14,7 @@ SRCS+= \ thr_cond.c \ thr_condattr.c \ thr_create.c \ + thr_ctrdtr.c \ thr_detach.c \ thr_equal.c \ thr_event.c \ Copied and modified: head/lib/libthr/thread/thr_ctrdtr.c (from r277373, head/lib/libthr/arch/sparc64/sparc64/pthread_md.c) ============================================================================== --- head/lib/libthr/arch/sparc64/sparc64/pthread_md.c Mon Jan 19 07:29:28 2015 (r277373, copy source) +++ head/lib/libthr/thread/thr_ctrdtr.c Wed Jan 21 16:41:05 2015 (r277490) @@ -32,7 +32,7 @@ __FBSDID("$FreeBSD$"); #include #include -#include "pthread_md.h" +#include "thr_private.h" struct tcb * _tcb_ctor(struct pthread *thread, int initial) Modified: head/lib/libthr/thread/thr_private.h ============================================================================== --- head/lib/libthr/thread/thr_private.h Wed Jan 21 16:32:54 2015 (r277489) +++ head/lib/libthr/thread/thr_private.h Wed Jan 21 16:41:05 2015 (r277490) @@ -928,6 +928,9 @@ int __thr_sigwait(const sigset_t *set, i int __thr_sigwaitinfo(const sigset_t *set, siginfo_t *info); int __thr_swapcontext(ucontext_t *oucp, const ucontext_t *ucp); +struct tcb *_tcb_ctor(struct pthread *, int); +void _tcb_dtor(struct tcb *); + __END_DECLS #endif /* !_THR_PRIVATE_H */ From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 16:52:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 12C9DF84; Wed, 21 Jan 2015 16:52:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEB28CAF; Wed, 21 Jan 2015 16:52:24 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LGqOxm007883; Wed, 21 Jan 2015 16:52:24 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LGqOWm007882; Wed, 21 Jan 2015 16:52:24 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201501211652.t0LGqOWm007882@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 21 Jan 2015 16:52:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277491 - head/sys/dev/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 16:52:25 -0000 Author: andrew Date: Wed Jan 21 16:52:24 2015 New Revision: 277491 URL: https://svnweb.freebsd.org/changeset/base/277491 Log: Update the parsing of the cpu node. We are unable to use the reg property as the cpu id on arm64 as it may use two cells. In it's place we can use the device id. It is expected we will use the reg data on arm64 to enable cores so we still need to read and store it even if it is not yet used. Differential Revision: https://reviews.freebsd.org/D1555 Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/ofw/ofw_cpu.c Modified: head/sys/dev/ofw/ofw_cpu.c ============================================================================== --- head/sys/dev/ofw/ofw_cpu.c Wed Jan 21 16:41:05 2015 (r277490) +++ head/sys/dev/ofw/ofw_cpu.c Wed Jan 21 16:52:24 2015 (r277491) @@ -51,6 +51,10 @@ static const struct ofw_bus_devinfo *ofw static MALLOC_DEFINE(M_OFWCPU, "ofwcpu", "OFW CPU device information"); +struct ofw_cpulist_softc { + pcell_t sc_addr_cells; +}; + static device_method_t ofw_cpulist_methods[] = { /* Device interface */ DEVMETHOD(device_probe, ofw_cpulist_probe), @@ -74,7 +78,7 @@ static device_method_t ofw_cpulist_metho static driver_t ofw_cpulist_driver = { "cpulist", ofw_cpulist_methods, - 0 + sizeof(struct ofw_cpulist_softc) }; static devclass_t ofw_cpulist_devclass; @@ -100,12 +104,18 @@ ofw_cpulist_probe(device_t dev) static int ofw_cpulist_attach(device_t dev) { + struct ofw_cpulist_softc *sc; phandle_t root, child; device_t cdev; struct ofw_bus_devinfo *dinfo; + sc = device_get_softc(dev); root = ofw_bus_get_node(dev); + sc->sc_addr_cells = 1; + OF_getencprop(root, "#address-cells", &sc->sc_addr_cells, + sizeof(sc->sc_addr_cells)); + for (child = OF_child(root); child != 0; child = OF_peer(child)) { dinfo = malloc(sizeof(*dinfo), M_OFWCPU, M_WAITOK | M_ZERO); @@ -141,6 +151,8 @@ static int ofw_cpu_read_ivar(device_t de struct ofw_cpu_softc { struct pcpu *sc_cpu_pcpu; uint32_t sc_nominal_mhz; + boolean_t sc_reg_valid; + pcell_t sc_reg[2]; }; static device_method_t ofw_cpu_methods[] = { @@ -185,17 +197,39 @@ ofw_cpu_probe(device_t dev) static int ofw_cpu_attach(device_t dev) { + struct ofw_cpulist_softc *psc; struct ofw_cpu_softc *sc; phandle_t node; - uint32_t cell; + pcell_t cell; + int rv; sc = device_get_softc(dev); - node = ofw_bus_get_node(dev); - if (OF_getencprop(node, "reg", &cell, sizeof(cell)) < 0) { - cell = device_get_unit(dev); - device_printf(dev, "missing 'reg' property, using %u\n", cell); + psc = device_get_softc(device_get_parent(dev)); + + if (nitems(sc->sc_reg) < psc->sc_addr_cells) { + if (bootverbose) + device_printf(dev, "Too many address cells\n"); + return (EINVAL); } - sc->sc_cpu_pcpu = pcpu_find(cell); + + node = ofw_bus_get_node(dev); + + /* Read and validate the reg property for use later */ + sc->sc_reg_valid = false; + rv = OF_getencprop(node, "reg", sc->sc_reg, sizeof(sc->sc_reg)); + if (rv < 0) + device_printf(dev, "missing 'reg' property\n"); + else if ((rv % 4) != 0) { + if (bootverbose) + device_printf(dev, "Malformed reg property\n"); + } else if ((rv / 4) != psc->sc_addr_cells) { + if (bootverbose) + device_printf(dev, "Invalid reg size %u\n", rv); + } else + sc->sc_reg_valid = true; + + sc->sc_cpu_pcpu = pcpu_find(device_get_unit(dev)); + if (OF_getencprop(node, "clock-frequency", &cell, sizeof(cell)) < 0) { if (bootverbose) device_printf(dev, From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 17:03:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB91B338; Wed, 21 Jan 2015 17:03:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B7782DFC; Wed, 21 Jan 2015 17:03:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LH3CfN012801; Wed, 21 Jan 2015 17:03:12 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LH3COB012800; Wed, 21 Jan 2015 17:03:12 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501211703.t0LH3COB012800@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 17:03:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277492 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 17:03:12 -0000 Author: will Date: Wed Jan 21 17:03:11 2015 New Revision: 277492 URL: https://svnweb.freebsd.org/changeset/base/277492 Log: Add vfs.zfs.reference_tracking_enable sysctl/tunable. This is primarily for developer/debugging use; it enables built-in tagged tracking of refcounts inside ZFS. It can only be enabled from the loader, since it modifies how in-core state is managed. Default remains disabled. MFC after: 1 week Sponsored by: Spectra Logic Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c Wed Jan 21 16:52:24 2015 (r277491) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/refcount.c Wed Jan 21 17:03:11 2015 (r277492) @@ -30,6 +30,10 @@ #ifdef _KERNEL int reference_tracking_enable = FALSE; /* runs out of memory too easily */ +SYSCTL_DECL(_vfs_zfs); +SYSCTL_INT(_vfs_zfs, OID_AUTO, reference_tracking_enable, CTLFLAG_RDTUN, + &reference_tracking_enable, 0, + "Track reference holders to refcount_t objects, used mostly by ZFS"); #else int reference_tracking_enable = TRUE; #endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 17:59:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4E021340; Wed, 21 Jan 2015 17:59:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A15363D; Wed, 21 Jan 2015 17:59:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LHxXa5037500; Wed, 21 Jan 2015 17:59:33 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LHxXLB037499; Wed, 21 Jan 2015 17:59:33 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201501211759.t0LHxXLB037499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 21 Jan 2015 17:59:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277493 - stable/10/sys/x86/x86 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 17:59:33 -0000 Author: jhb Date: Wed Jan 21 17:59:32 2015 New Revision: 277493 URL: https://svnweb.freebsd.org/changeset/base/277493 Log: MFC 272666: Fix build for i386 kernels with out 'I686_CPU'. Reported by: Mike Tancsa Modified: stable/10/sys/x86/x86/local_apic.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/x86/x86/local_apic.c ============================================================================== --- stable/10/sys/x86/x86/local_apic.c Wed Jan 21 17:03:11 2015 (r277492) +++ stable/10/sys/x86/x86/local_apic.c Wed Jan 21 17:59:32 2015 (r277493) @@ -1298,7 +1298,7 @@ apic_init(void *dummy __unused) printf("APIC: Using the %s enumerator.\n", best_enum->apic_name); -#ifndef __amd64__ +#ifdef I686_CPU /* * To work around an errata, we disable the local APIC on some * CPUs during early startup. We need to turn the local APIC back From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:02:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD0084C4; Wed, 21 Jan 2015 18:02:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B97366EE; Wed, 21 Jan 2015 18:02:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LI2TAX041507; Wed, 21 Jan 2015 18:02:29 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LI2TJt041506; Wed, 21 Jan 2015 18:02:29 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201501211802.t0LI2TJt041506@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 21 Jan 2015 18:02:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277494 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:02:29 -0000 Author: mjg Date: Wed Jan 21 18:02:28 2015 New Revision: 277494 URL: https://svnweb.freebsd.org/changeset/base/277494 Log: filedesc: fix whitespace nits in fget and fget_read No functional changes. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jan 21 17:59:32 2015 (r277493) +++ head/sys/kern/kern_descrip.c Wed Jan 21 18:02:28 2015 (r277494) @@ -2499,7 +2499,7 @@ int fget(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) { - return(_fget(td, fd, fpp, 0, rightsp, NULL)); + return (_fget(td, fd, fpp, 0, rightsp, NULL)); } int @@ -2514,7 +2514,7 @@ int fget_read(struct thread *td, int fd, cap_rights_t *rightsp, struct file **fpp) { - return(_fget(td, fd, fpp, FREAD, rightsp, NULL)); + return (_fget(td, fd, fpp, FREAD, rightsp, NULL)); } int From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:05:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD9D467F; Wed, 21 Jan 2015 18:05:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 99F65782; Wed, 21 Jan 2015 18:05:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LI5hI3041967; Wed, 21 Jan 2015 18:05:43 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LI5hmt041966; Wed, 21 Jan 2015 18:05:43 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201501211805.t0LI5hmt041966@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 21 Jan 2015 18:05:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277495 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:05:43 -0000 Author: mjg Date: Wed Jan 21 18:05:42 2015 New Revision: 277495 URL: https://svnweb.freebsd.org/changeset/base/277495 Log: filedesc: return 0 from badfo_close The only potential in-tree consumer (_fdrop) special-cased it and returns 0 0 on its own instead of calling badfo_close. Remove the special case since it is not needed and very unlikely to encounter anyway. No objections from: kib Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jan 21 18:02:28 2015 (r277494) +++ head/sys/kern/kern_descrip.c Wed Jan 21 18:05:42 2015 (r277495) @@ -2680,11 +2680,9 @@ _fdrop(struct file *fp, struct thread *t { int error; - error = 0; if (fp->f_count != 0) panic("fdrop: count %d", fp->f_count); - if (fp->f_ops != &badfileops) - error = fo_close(fp, td); + error = fo_close(fp, td); atomic_subtract_int(&openfiles, 1); crfree(fp->f_cred); free(fp->f_advice, M_FADVISE); @@ -3664,7 +3662,7 @@ static int badfo_close(struct file *fp, struct thread *td) { - return (EBADF); + return (0); } static int From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:15:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1FED9A3D; Wed, 21 Jan 2015 18:15:18 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AA958A9; Wed, 21 Jan 2015 18:15:16 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0LIFC3P080849 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 21:15:12 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0LIFC2n080848; Wed, 21 Jan 2015 21:15:12 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 21 Jan 2015 21:15:12 +0300 From: Gleb Smirnoff To: sbruno@freebsd.org Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150121181512.GE15484@FreeBSD.org> References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54BEF154.3030606@ignoranthack.me> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , "K. Macy" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:15:18 -0000 Sean, On Tue, Jan 20, 2015 at 04:22:44PM -0800, Sean Bruno wrote: S> In our universe, this commit (right or wrong) resolved our panics. I S> think that there is some room for improvement based on the commentary S> in this thread, but some people do indeed prefer stability over S> performance. I hope we can come to a middle ground somewhere here. Sorry, but this sounds very much like alchemy. We poured this stuff into that stuff and yield in gold precipitate. We don't understand what's going on, but let's record the recipe into our tome of aclhemy wisdom. So alchemy never came to a scientific level, and chemistry evolved as science only when researchers started to measure, explain and understand. If we treat our precious kernel in alchemy way, we will follow the path of alchemy, except that it took centuries for alchemy to die, and for a software product it would take a few years. So, for me Kip ideas sound very sensible. There could be a race somewhere else. You tweak callout subsystem in any direction, timings of events in kernel shift, your race is hidden. If we fix problems w/o understanding them, we are going alchemy way. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:22:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 790F4C96; Wed, 21 Jan 2015 18:22:27 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 05A3498D; Wed, 21 Jan 2015 18:22:25 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0LIMN9p080881 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 21:22:23 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0LIMNdv080880; Wed, 21 Jan 2015 21:22:23 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 21 Jan 2015 21:22:23 +0300 From: Gleb Smirnoff To: Gavin Atkinson Subject: Re: svn commit: r277486 - head/share/man/man9 Message-ID: <20150121182223.GF15484@FreeBSD.org> References: <201501211348.t0LDm6BY013771@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501211348.t0LDm6BY013771@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:22:27 -0000 On Wed, Jan 21, 2015 at 01:48:06PM +0000, Gavin Atkinson wrote: G> Author: gavin G> Date: Wed Jan 21 13:48:06 2015 G> New Revision: 277486 G> URL: https://svnweb.freebsd.org/changeset/base/277486 G> G> Log: G> "softc" is short for "software context", use that phrase in the G> device_get_softc(9) man page. Thanks for making this term official :) -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:24:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FAC5E21; Wed, 21 Jan 2015 18:24:49 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 8E3F39AF; Wed, 21 Jan 2015 18:24:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0LIOiUU080895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 21 Jan 2015 21:24:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0LIOiaY080894; Wed, 21 Jan 2015 21:24:44 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Wed, 21 Jan 2015 21:24:44 +0300 From: Gleb Smirnoff To: Konstantin Belousov Subject: Re: svn commit: r277489 - head/sys/kern Message-ID: <20150121182444.GG15484@FreeBSD.org> References: <201501211632.t0LGWtOR098070@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501211632.t0LGWtOR098070@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:24:49 -0000 On Wed, Jan 21, 2015 at 04:32:55PM +0000, Konstantin Belousov wrote: K> Author: kib K> Date: Wed Jan 21 16:32:54 2015 K> New Revision: 277489 K> URL: https://svnweb.freebsd.org/changeset/base/277489 K> K> Log: K> Do not assert that the new pipepair mutex is not initialized. The K> backing memory contains garbage and might trigger the assertion. I have touched dozen of places in kernel where I do explicit M_ZERO on allocation just to satisfy later assertion in the mtx_init. Is the correct fix to use MTX_NEW? -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:25:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C7694F60; Wed, 21 Jan 2015 18:25:18 +0000 (UTC) Received: from mail-qa0-x232.google.com (mail-qa0-x232.google.com [IPv6:2607:f8b0:400d:c00::232]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 88DE29B8; Wed, 21 Jan 2015 18:25:18 +0000 (UTC) Received: by mail-qa0-f50.google.com with SMTP id k15so34398691qaq.9; Wed, 21 Jan 2015 10:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=lBf5bGaqtDf4uHeLIjp9DGrI5IltOXhpfaE04npc6nU=; b=EqD/gjh6Au9C2uP3xFLC5Qh66mIpDUZvkgmqhToz3P3wp49tLE2SqZL0YDRU6C80Ct 0EPL/wOd45vcAPmaz3nl7g6kyAUJYQiaextxd8mdShxV2z+E5QMSaEGa38rIax2aspKv QZmc0TurWKGf8CXYFkyCJ3YAaRxM4A5dH1wDA7ywa3rozPXrzG4wOCxUj/E2Rf21TOEz RmrYDIxCNo17MFaE8qOhfK6/Zm/fDY0xJaLK9PpfjMGt0H7A/hcFmYISvvagGImoCXMI CtQDBXwUCI2Vk41CJX2nRtYhd7xuBad9ADILlKnkPWNQkMaFiXhOFhSdlQv0YL6BHmAf VmpQ== MIME-Version: 1.0 X-Received: by 10.224.131.4 with SMTP id v4mr44128233qas.99.1421864717626; Wed, 21 Jan 2015 10:25:17 -0800 (PST) Sender: hiren.panchasara@gmail.com Received: by 10.96.73.69 with HTTP; Wed, 21 Jan 2015 10:25:17 -0800 (PST) In-Reply-To: <20150121182223.GF15484@FreeBSD.org> References: <201501211348.t0LDm6BY013771@svn.freebsd.org> <20150121182223.GF15484@FreeBSD.org> Date: Wed, 21 Jan 2015 10:25:17 -0800 X-Google-Sender-Auth: ldXHNQQO_NHX7ssXLhMMwH2OTO8 Message-ID: Subject: Re: svn commit: r277486 - head/share/man/man9 From: hiren panchasara To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head , svn-src-all , Gavin Atkinson , src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:25:18 -0000 On Wed, Jan 21, 2015 at 10:22 AM, Gleb Smirnoff wrote: > On Wed, Jan 21, 2015 at 01:48:06PM +0000, Gavin Atkinson wrote: > G> Author: gavin > G> Date: Wed Jan 21 13:48:06 2015 > G> New Revision: 277486 > G> URL: https://svnweb.freebsd.org/changeset/base/277486 > G> > G> Log: > G> "softc" is short for "software context", use that phrase in the > G> device_get_softc(9) man page. > > Thanks for making this term official :) Heh, yes. Thanks Gavin! cheers, Hiren From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:32:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A3061C6; Wed, 21 Jan 2015 18:32:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16BE1A95; Wed, 21 Jan 2015 18:32:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LIWrum055770; Wed, 21 Jan 2015 18:32:53 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LIWrvJ055769; Wed, 21 Jan 2015 18:32:53 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201501211832.t0LIWrvJ055769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 21 Jan 2015 18:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277496 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:32:54 -0000 Author: mjg Date: Wed Jan 21 18:32:53 2015 New Revision: 277496 URL: https://svnweb.freebsd.org/changeset/base/277496 Log: filedesc: avoid spurious copying of capabilities in fget_unlocked We obtain a stable copy and store it in local 'fde' variable. Storing another copy (based on aforementioned variable) does not serve any purpose. No functional changes. Modified: head/sys/kern/kern_descrip.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Wed Jan 21 18:05:42 2015 (r277495) +++ head/sys/kern/kern_descrip.c Wed Jan 21 18:32:53 2015 (r277496) @@ -2337,7 +2337,7 @@ fget_unlocked(struct filedesc *fdp, int u_int count; #ifdef CAPABILITIES seq_t seq; - cap_rights_t haverights; + cap_rights_t *haverights; int error; #endif @@ -2367,9 +2367,9 @@ fget_unlocked(struct filedesc *fdp, int if (fp == NULL) return (EBADF); #ifdef CAPABILITIES - haverights = *cap_rights_fde(&fde); + haverights = cap_rights_fde(&fde); if (needrightsp != NULL) { - error = cap_check(&haverights, needrightsp); + error = cap_check(haverights, needrightsp); if (error != 0) return (error); if (cap_rights_is_set(needrightsp, CAP_FCNTL)) { @@ -2408,7 +2408,7 @@ fget_unlocked(struct filedesc *fdp, int *fpp = fp; if (haverightsp != NULL) { #ifdef CAPABILITIES - *haverightsp = haverights; + *haverightsp = *haverights; #else CAP_ALL(haverightsp); #endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 18:45:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 23069615; Wed, 21 Jan 2015 18:45:56 +0000 (UTC) Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C6849BC8; Wed, 21 Jan 2015 18:45:55 +0000 (UTC) Received: by mail-qc0-f175.google.com with SMTP id c9so15071835qcz.6; Wed, 21 Jan 2015 10:45:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:subject:from:to:cc:date:in-reply-to:references :content-type:mime-version; bh=Xfz19WtKI47/G2x+sPKfgC2NauE9r6yPA5sNA2vK8EI=; b=COSyImytRuZsBsqiJOuS+PCo9nMgxr/4LasPM/XZkcoNgX7r1O9+HSg/mN1vDe+DSE XvZsyZ0x6iODITCdEidrg99/Th54sqLXOCeUpwLEu/TtoHW4jtaD8AgwqkImcFNkTx33 0IeGfl5mNvaNQNPy27sDlVJhcR7HHq6+N4LActjDuh1FXEH46LH+bQNWPlcmuE//sOIH Etl9XNAriBvBIhOEWTVUT8N3h8DVa9RgiVLzKGGqlDaaSksGf4YJP828TfphmdK0m5Jy n4Og3KSRC6hxiOo1Fjle7NuwgOTR1+qX4bb1VH27A9I1ZY1cR8bZHqzpqpojNHMFUgr5 R1uA== X-Received: by 10.229.68.202 with SMTP id w10mr38591293qci.13.1421865954771; Wed, 21 Jan 2015 10:45:54 -0800 (PST) Received: from ?IPv6:2001:470:e4fc:1::1017? ([2001:470:e4fc:1::1017]) by mx.google.com with ESMTPSA id d62sm930371qga.15.2015.01.21.10.45.52 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jan 2015 10:45:53 -0800 (PST) Message-ID: <1421865947.6315.1.camel@gmail.com> Subject: Re: svn commit: r277487 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms From: Shawn Webb To: Konstantin Belousov Date: Wed, 21 Jan 2015 13:45:47 -0500 In-Reply-To: <201501211610.t0LGAcMg085437@svn.freebsd.org> References: <201501211610.t0LGAcMg085437@svn.freebsd.org> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-7ziGbE9XsQvKWFGRcKwd" X-Mailer: Evolution 3.12.7-0ubuntu1 Mime-Version: 1.0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 18:45:56 -0000 --=-7ziGbE9XsQvKWFGRcKwd Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Wed, 2015-01-21 at 16:10 +0000, Konstantin Belousov wrote: > Author: kib > Date: Wed Jan 21 16:10:37 2015 > New Revision: 277487 > URL: https://svnweb.freebsd.org/changeset/base/277487 >=20 > Log: > An update for the i915 GPU driver, which brings the code up to Linux > commit 4d93914ae3db4a897ead4b. Some related drm infrastructure > changes are imported as needed. > =20 > Biggest update is the rewrite of the i915 gem io to more closely > follow Linux model, althought the mechanism used by FreeBSD port is > different. Hey Kostik, This causes my Haswell laptop to just display a blank screen on bootup. Is there something I should be doing? I just have i915kms_load=3D"YES" in /boot/loader.conf. Thanks, Shawn --=-7ziGbE9XsQvKWFGRcKwd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABCgAGBQJUv/PbAAoJEGqEZY9SRW7uIngP/iu4mpNQb6jYrODywdLnPd3K zwCT2uPSOt5B0of6FRZ4i4qGsvLhLMhK8mpoN7QTEpsBrVj7ToZXMv6Jy+4qbfbC PyyVxsYywLNNsFO6AMWFTUqUTmpOn9DyHVyA/VN5mtXZILgOmDE82CeB6NiryI/K +KE03v26Ogywn1na0ObohzkTeYDL/Ynt8hixkqsvnJM+Rbdmg/Vy+JtWmS9Cka/m zQ2Ql6vGyII+utqmxpQkl9bi4IWK209p2fX2Gx0GwVkZ2UixgAhtu4H8mnxESzsX /RlZszFjq5NzC+tqkpAufP5VeviVR6igRRBDyiLoDMyF699XqvNF75/hNdKaHwon kuJHUt5iSAdfsFZ3gRUTbuMt3RmK2CUwJNpDjhMqAJhFyuPPqiYAgASIgsy5R16N mzLDRDDEEi97BXa1UcrJ+OeJlA8XkqegRiN8T5k1cfGESbjZww+5/4gPOzcWEd76 2Air8WXjJG5wCs8vkMzusSOMae223uQvQlM7EoFxkOUas2vShWK2EUf7oCtNVkxt /N3ax74ZczzF6MmocUT5Z2DesjknaYTCKTJA+3VKnClthQAZ5/afPGg8EvilfKFu IgTUaQWwAsbXcAU7QsM32Ef4yvOyFS92etFEU4gol2CdLynXHoIv7ya7zyFIL6If 7LGlz+omYU/BP8PHnHm6 =FzNd -----END PGP SIGNATURE----- --=-7ziGbE9XsQvKWFGRcKwd-- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:04:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 41857BBA; Wed, 21 Jan 2015 19:04:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DF94E12; Wed, 21 Jan 2015 19:04:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJ4u4p070279; Wed, 21 Jan 2015 19:04:56 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJ4u3R070278; Wed, 21 Jan 2015 19:04:56 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501211904.t0LJ4u3R070278@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Jan 2015 19:04:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277497 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:04:56 -0000 Author: emaste Date: Wed Jan 21 19:04:55 2015 New Revision: 277497 URL: https://svnweb.freebsd.org/changeset/base/277497 Log: Remove addr2line from cross elftoolchain tools list It is not required, and there is no reason to install it just because it came with the binutils cross tools. Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jan 21 18:32:53 2015 (r277496) +++ head/Makefile.inc1 Wed Jan 21 19:04:55 2015 (r277497) @@ -1428,7 +1428,6 @@ _binutils= gnu/usr.bin/binutils .endif .if ${MK_ELFTOOLCHAIN_TOOLS} != "no" _elftctools= lib/libelftc \ - usr.bin/addr2line \ usr.bin/elfcopy \ usr.bin/nm \ usr.bin/size \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:07:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E8277D38; Wed, 21 Jan 2015 19:07:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3BA7E3F; Wed, 21 Jan 2015 19:07:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJ7kY3070721; Wed, 21 Jan 2015 19:07:46 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJ7kBl070713; Wed, 21 Jan 2015 19:07:46 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501211907.t0LJ7kBl070713@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 21 Jan 2015 19:07:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277498 - in head/sys/powerpc: aim include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:07:47 -0000 Author: nwhitehorn Date: Wed Jan 21 19:07:45 2015 New Revision: 277498 URL: https://svnweb.freebsd.org/changeset/base/277498 Log: Make 64-bit AIM trap handlers relocatable by changing all absolute branch instructions to call through pointers instead. In general, these are set implicitly through relocation processing. One has to be set explicitly in machdep.c, however, to fit one handler in the tiny (8 instruction) space available. Reviewed by: andreast Differential revision: D1554 Tested on: UP and SMP G5, Cell, POWER5+ Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/trap_subr64.S head/sys/powerpc/include/trap.h Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Wed Jan 21 19:04:55 2015 (r277497) +++ head/sys/powerpc/aim/machdep.c Wed Jan 21 19:07:45 2015 (r277498) @@ -238,7 +238,7 @@ extern void *trapcode64; #endif extern void *rstcode, *rstsize; -extern void *trapcode, *trapsize; +extern void *trapcode, *trapsize, *trapcode2; extern void *slbtrap, *slbtrapsize; extern void *alitrap, *alisize; extern void *dsitrap, *dsisize; @@ -506,6 +506,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ generictrap = &trapcode; /* Set TOC base so that the interrupt code can get at it */ + *((void **)TRAP_GENTRAP) = &trapcode2; *((register_t *)TRAP_TOCBASE) = toc; #endif Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Wed Jan 21 19:04:55 2015 (r277497) +++ head/sys/powerpc/aim/trap_subr64.S Wed Jan 21 19:07:45 2015 (r277498) @@ -302,8 +302,13 @@ CNAME(rstcode): insrdi %r9,%r8,1,0 mtmsrd %r9 isync + bl 1f + .llong cpu_reset +1: mflr %r9 + ld %r9,0(%r9) + mtlr %r9 - ba cpu_reset + blr CNAME(rstsize) = . - CNAME(rstcode) cpu_reset: @@ -342,16 +347,20 @@ cpu_reset: /* * This code gets copied to all the trap vectors - * (except ISI/DSI, ALI, and the interrupts) + * (except ISI/DSI, ALI, and the interrupts). Has to fit in 8 instructions! */ .globl CNAME(trapcode),CNAME(trapsize) + .p2align 3 CNAME(trapcode): mtsprg1 %r1 /* save SP */ mflr %r1 /* Save the old LR in r1 */ mtsprg2 %r1 /* And then in SPRG2 */ + li %r1,TRAP_GENTRAP + ld %r1,0(%r1) + mtlr %r1 li %r1, 0xA0 /* How to get the vector from LR */ - bla generictrap /* LR & SPRG3 is exception # */ + blrl /* Branch to generictrap */ CNAME(trapsize) = .-CNAME(trapcode) /* @@ -361,6 +370,7 @@ CNAME(trapsize) = .-CNAME(trapcode) * the only time this can be called. */ .globl CNAME(slbtrap),CNAME(slbtrapsize) + .p2align 3 CNAME(slbtrap): mtsprg1 %r1 /* save SP */ GET_CPUINFO(%r1) @@ -369,17 +379,31 @@ CNAME(slbtrap): std %r2,(PC_SLBSAVE+104)(%r1) mfsrr1 %r2 /* test kernel mode */ mtcr %r2 - bf 17,1f /* branch if PSL_PR is false */ + bf 17,2f /* branch if PSL_PR is false */ /* User mode */ ld %r2,(PC_SLBSAVE+104)(%r1) /* Restore CR */ mtcr %r2 ld %r2,(PC_SLBSAVE+16)(%r1) /* Restore R2 */ mflr %r1 /* Save the old LR in r1 */ mtsprg2 %r1 /* And then in SPRG2 */ + /* 52 bytes so far */ + bl 1f + .llong generictrap +1: mflr %r1 + ld %r1,0(%r1) + mtlr %r1 li %r1, 0x80 /* How to get the vector from LR */ - bla generictrap /* LR & SPRG3 is exception # */ -1: mflr %r2 /* Save the old LR in r2 */ - bla kern_slbtrap + blrl /* Branch to generictrap */ + /* 84 bytes */ +2: mflr %r2 /* Save the old LR in r2 */ + nop + bl 3f /* Begin dance to jump to kern_slbtrap*/ + .llong kern_slbtrap +3: mflr %r1 + ld %r1,0(%r1) + mtlr %r1 + GET_CPUINFO(%r1) + blrl /* 124 bytes -- 4 to spare */ CNAME(slbtrapsize) = .-CNAME(slbtrap) kern_slbtrap: @@ -518,6 +542,16 @@ CNAME(alitrap): mflr %r28 /* save LR */ mfcr %r29 /* save CR */ + /* Begin dance to branch to s_trap in a bit */ + b 1f + .p2align 3 +1: nop + bl 1f + .llong s_trap +1: mflr %r31 + ld %r31,0(%r31) + mtlr %r31 + /* Put our exception vector in SPRG3 */ li %r31, EXC_ALI mtsprg3 %r31 @@ -525,13 +559,12 @@ CNAME(alitrap): /* Test whether we already had PR set */ mfsrr1 %r31 mtcr %r31 - bla s_trap + blrl CNAME(alisize) = .-CNAME(alitrap) /* * Similar to the above for DSI - * Has to handle BAT spills - * and standard pagetable spills + * Has to handle standard pagetable spills */ .globl CNAME(dsitrap),CNAME(dsisize) CNAME(dsitrap): @@ -542,14 +575,18 @@ CNAME(dsitrap): std %r29,(PC_DISISAVE+CPUSAVE_R29)(%r1) std %r30,(PC_DISISAVE+CPUSAVE_R30)(%r1) std %r31,(PC_DISISAVE+CPUSAVE_R31)(%r1) - mfsprg1 %r1 /* restore SP */ mfcr %r29 /* save CR */ mfxer %r30 /* save XER */ mtsprg2 %r30 /* in SPRG2 */ mfsrr1 %r31 /* test kernel mode */ mtcr %r31 mflr %r28 /* save LR (SP already saved) */ - bla disitrap + bl 1f /* Begin branching to disitrap */ + .llong disitrap +1: mflr %r1 + ld %r1,0(%r1) + mtlr %r1 + blrl /* Branch to generictrap */ CNAME(dsisize) = .-CNAME(dsitrap) /* @@ -624,7 +661,7 @@ realtrap: bl restore_kernsrs /* enable kernel mapping */ mfsprg2 %r29 mr %r28,%r27 - ba s_trap + b s_trap /* * generictrap does some standard setup for trap handling to minimize @@ -636,6 +673,8 @@ realtrap: * SPRG2 - Original LR */ + .globl CNAME(trapcode2) +trapcode2: generictrap: /* Save R1 for computing the exception vector */ mtsprg3 %r1 @@ -657,6 +696,7 @@ generictrap: mfsprg3 %r31 ori %r31,%r31,0xff00 mflr %r30 + addi %r30,%r30,-4 /* The branch instruction, not the next */ and %r30,%r30,%r31 mtsprg3 %r30 @@ -804,9 +844,16 @@ CNAME(dblow): mfsprg2 %r29 /* ... and r29 */ mflr %r1 /* save LR */ mtsprg2 %r1 /* And then in SPRG2 */ + + nop /* Begin branching to generictrap */ + bl 9f + .llong generictrap +9: mflr %r1 + ld %r1,0(%r1) + mtlr %r1 li %r1, 0 /* How to get the vector from LR */ + blrl /* Branch to generictrap */ - bla generictrap /* and we look like a generic trap */ 1: GET_CPUINFO(%r1) std %r27,(PC_DBSAVE+CPUSAVE_R27)(%r1) /* free r27 */ @@ -816,6 +863,11 @@ CNAME(dblow): std %r30,(PC_DBSAVE+CPUSAVE_R30)(%r1) /* free r30 */ std %r31,(PC_DBSAVE+CPUSAVE_R31)(%r1) /* free r31 */ mflr %r28 /* save LR */ - bla dbtrap + bl 9f /* Begin branch */ + .llong dbtrap +9: mflr %r1 + ld %r1,0(%r1) + mtlr %r1 + blrl /* Branch to generictrap */ CNAME(dbsize) = .-CNAME(dblow) #endif /* KDB */ Modified: head/sys/powerpc/include/trap.h ============================================================================== --- head/sys/powerpc/include/trap.h Wed Jan 21 19:04:55 2015 (r277497) +++ head/sys/powerpc/include/trap.h Wed Jan 21 19:07:45 2015 (r277498) @@ -123,7 +123,8 @@ /* DTrace trap opcode. */ #define EXC_DTRACE 0x7c810808 -/* Magic pointer to store TOC base for trap handlers on ppc64 */ +/* Magic pointer to store TOC base and other info for trap handlers on ppc64 */ +#define TRAP_GENTRAP 0x1f0 #define TRAP_TOCBASE 0x1f8 #ifndef LOCORE From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:09:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EB2B9E93; Wed, 21 Jan 2015 19:09:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD5A1E51; Wed, 21 Jan 2015 19:09:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJ9Gxp070945; Wed, 21 Jan 2015 19:09:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJ9G5Z070942; Wed, 21 Jan 2015 19:09:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501211909.t0LJ9G5Z070942@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 21 Jan 2015 19:09:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277499 - in head/sys/powerpc: aim powerpc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:09:17 -0000 Author: nwhitehorn Date: Wed Jan 21 19:09:15 2015 New Revision: 277499 URL: https://svnweb.freebsd.org/changeset/base/277499 Log: Make sure to relocate tmpstk with everything else and avoid processing non-relative relocations that the UART code makes for absent modules. Modified: head/sys/powerpc/aim/locore64.S head/sys/powerpc/powerpc/elf64_machdep.c Modified: head/sys/powerpc/aim/locore64.S ============================================================================== --- head/sys/powerpc/aim/locore64.S Wed Jan 21 19:07:45 2015 (r277498) +++ head/sys/powerpc/aim/locore64.S Wed Jan 21 19:09:15 2015 (r277499) @@ -126,9 +126,14 @@ ASENTRY_NOPROF(__start) ld %r1,0(%r2) add %r2,%r1,%r2 + /* Get load offset */ + ld %r31,-0x8000(%r2) /* First TOC entry is TOC base */ + subf %r31,%r31,%r2 /* Subtract from real TOC base to get base */ + /* Set up the stack pointer */ ld %r1,TOC_REF(tmpstk)(%r2) addi %r1,%r1,TMPSTKSZ-96 + add %r1,%r1,%r31 /* Relocate kernel */ std %r3,48(%r1) @@ -140,8 +145,7 @@ ASENTRY_NOPROF(__start) 1: mflr %r3 ld %r4,0(%r3) add %r3,%r4,%r3 - ld %r4,-0x8000(%r2) /* First TOC entry is TOC base */ - subf %r4,%r4,%r2 /* Subtract from real TOC base to get base */ + mr %r4,%r31 bl elf_reloc_self nop ld %r3,48(%r1) Modified: head/sys/powerpc/powerpc/elf64_machdep.c ============================================================================== --- head/sys/powerpc/powerpc/elf64_machdep.c Wed Jan 21 19:07:45 2015 (r277498) +++ head/sys/powerpc/powerpc/elf64_machdep.c Wed Jan 21 19:09:15 2015 (r277499) @@ -226,6 +226,8 @@ elf_reloc_self(Elf_Dyn *dynp, Elf_Addr r */ relalim = (Elf_Rela *)((caddr_t)rela + relasz); for (; rela < relalim; rela++) { + if (ELF_R_TYPE(rela->r_info) != R_PPC_RELATIVE) + continue; where = (Elf_Addr *)(relocbase + rela->r_offset); *where = (Elf_Addr)(relocbase + rela->r_addend); } From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:11:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2A5C991; Wed, 21 Jan 2015 19:11:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 17104EFB; Wed, 21 Jan 2015 19:11:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJBFTa072253; Wed, 21 Jan 2015 19:11:15 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJBFPV072252; Wed, 21 Jan 2015 19:11:15 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501211911.t0LJBFPV072252@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Wed, 21 Jan 2015 19:11:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277500 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:11:16 -0000 Author: nwhitehorn Date: Wed Jan 21 19:11:15 2015 New Revision: 277500 URL: https://svnweb.freebsd.org/changeset/base/277500 Log: Add POWER7+ and POWER8 to the list of CPUs with 32 SLB slots. This is mostly a no-op since all currently-supported instances of these CPUs give the number of SLB slots in the device tree, but keep it here as well just in case. Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Wed Jan 21 19:09:15 2015 (r277499) +++ head/sys/powerpc/aim/machdep.c Wed Jan 21 19:11:15 2015 (r277500) @@ -394,6 +394,9 @@ powerpc_init(vm_offset_t fdt, vm_offset_ break; #ifdef __powerpc64__ case IBMPOWER7: + case IBMPOWER7PLUS: + case IBMPOWER8: + case IBMPOWER8E: /* XXX: get from ibm,slb-size in device tree */ n_slbs = 32; break; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:20:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B3EA841D; Wed, 21 Jan 2015 19:20:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A02967B; Wed, 21 Jan 2015 19:20:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJKbT7076657; Wed, 21 Jan 2015 19:20:37 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJKbh3076656; Wed, 21 Jan 2015 19:20:37 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501211920.t0LJKbh3076656@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 19:20:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277501 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:20:37 -0000 Author: will Date: Wed Jan 21 19:20:36 2015 New Revision: 277501 URL: https://svnweb.freebsd.org/changeset/base/277501 Log: Eliminate an #ifdef illumos for zfs_ioc_rename(). Since allow_mounted is a FreeBSD-specific change, default to B_TRUE, then locally check for the magic bit. Unconditionally check allow_mounted below. Convert the setting of allow_mounted to an explicit boolean. MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 672578 (in part) on 2013/07/19 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 Wed Jan 21 19:11:15 2015 (r277500) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Wed Jan 21 19:20:36 2015 (r277501) @@ -3751,10 +3751,12 @@ static int zfs_ioc_rename(zfs_cmd_t *zc) { boolean_t recursive = zc->zc_cookie & 1; + char *at; + boolean_t allow_mounted = B_TRUE; + #ifdef __FreeBSD__ - boolean_t allow_mounted = zc->zc_cookie & 2; + allow_mounted = (zc->zc_cookie & 2) != 0; #endif - char *at; zc->zc_value[sizeof (zc->zc_value) - 1] = '\0'; if (dataset_namecheck(zc->zc_value, NULL, NULL) != 0 || @@ -3769,11 +3771,7 @@ zfs_ioc_rename(zfs_cmd_t *zc) if (strncmp(zc->zc_name, zc->zc_value, at - zc->zc_name + 1)) return (SET_ERROR(EXDEV)); *at = '\0'; -#ifdef illumos - if (zc->zc_objset_type == DMU_OST_ZFS) { -#else if (zc->zc_objset_type == DMU_OST_ZFS && allow_mounted) { -#endif error = dmu_objset_find(zc->zc_name, recursive_unmount, at + 1, recursive ? DS_FIND_CHILDREN : 0); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:23:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BC875C7; Wed, 21 Jan 2015 19:23:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88989AD; Wed, 21 Jan 2015 19:23:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJNle1079880; Wed, 21 Jan 2015 19:23:47 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJNl1M079878; Wed, 21 Jan 2015 19:23:47 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501211923.t0LJNl1M079878@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Wed, 21 Jan 2015 19:23:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277502 - head/sys/arm/ti X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:23:47 -0000 Author: gonzo Date: Wed Jan 21 19:23:46 2015 New Revision: 277502 URL: https://svnweb.freebsd.org/changeset/base/277502 Log: Remove "#define DEBUG" that conflicts with "option DEBUG" in kernel config Modified: head/sys/arm/ti/ti_mbox.c head/sys/arm/ti/ti_pruss.c Modified: head/sys/arm/ti/ti_mbox.c ============================================================================== --- head/sys/arm/ti/ti_mbox.c Wed Jan 21 19:20:36 2015 (r277501) +++ head/sys/arm/ti/ti_mbox.c Wed Jan 21 19:23:46 2015 (r277502) @@ -54,7 +54,6 @@ __FBSDID("$FreeBSD$"); #include "mbox_if.h" -#define DEBUG #ifdef DEBUG #define DPRINTF(fmt, ...) do { \ printf("%s: ", __func__); \ Modified: head/sys/arm/ti/ti_pruss.c ============================================================================== --- head/sys/arm/ti/ti_pruss.c Wed Jan 21 19:20:36 2015 (r277501) +++ head/sys/arm/ti/ti_pruss.c Wed Jan 21 19:23:46 2015 (r277502) @@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$"); #include #include -#define DEBUG #ifdef DEBUG #define DPRINTF(fmt, ...) do { \ printf("%s: ", __func__); \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:25:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 721507A0; Wed, 21 Jan 2015 19:25:58 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E8EFDA; Wed, 21 Jan 2015 19:25:58 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJPw2a080229; Wed, 21 Jan 2015 19:25:58 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJPwHO080228; Wed, 21 Jan 2015 19:25:58 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501211925.t0LJPwHO080228@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 19:25:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277503 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:25:58 -0000 Author: will Date: Wed Jan 21 19:25:57 2015 New Revision: 277503 URL: https://svnweb.freebsd.org/changeset/base/277503 Log: Ignore sync requests from the system syncher, i.e. VFS_SYNC(waitfor=MNT_LAZY). ZFS already commits outstanding data every zfs_txg_timeout seconds, so these syncs are unnecessarily intrusive. Submitted by: gibbs Sponsored by: Spectra Logic MFSpectraBSD: 1105759 on 2014/12/11 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jan 21 19:23:46 2015 (r277502) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Wed Jan 21 19:25:57 2015 (r277503) @@ -132,6 +132,13 @@ zfs_sync(vfs_t *vfsp, int waitfor) if (panicstr) return (0); + /* + * Ignore the system syncher. ZFS already commits async data + * at zfs_txg_timeout intervals. + */ + if (waitfor == MNT_LAZY) + return (0); + if (vfsp != NULL) { /* * Sync a specific filesystem. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:30:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9E791A35; Wed, 21 Jan 2015 19:30:02 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8B8B2140; Wed, 21 Jan 2015 19:30:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJU2o4080849; Wed, 21 Jan 2015 19:30:02 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJU2Ci080847; Wed, 21 Jan 2015 19:30:02 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501211930.t0LJU2Ci080847@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 19:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277504 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:30:02 -0000 Author: will Date: Wed Jan 21 19:30:01 2015 New Revision: 277504 URL: https://svnweb.freebsd.org/changeset/base/277504 Log: Remove commented log messages. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Wed Jan 21 19:25:57 2015 (r277503) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c Wed Jan 21 19:30:01 2015 (r277504) @@ -2090,7 +2090,6 @@ zil_replay(objset_t *os, void *arg, zil_ zil_destroy(zilog, B_TRUE); return; } - //printf("ZFS: Replaying ZIL on %s...\n", os->os->os_spa->spa_name); zr.zr_replay = replay_func; zr.zr_arg = arg; @@ -2112,7 +2111,6 @@ zil_replay(objset_t *os, void *arg, zil_ zil_destroy(zilog, B_FALSE); txg_wait_synced(zilog->zl_dmu_pool, zilog->zl_destroy_txg); zilog->zl_replay = B_FALSE; - //printf("ZFS: Replay of ZIL on %s finished.\n", os->os->os_spa->spa_name); } boolean_t From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:32:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3177BC7E; Wed, 21 Jan 2015 19:32:41 +0000 (UTC) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E81E81FC; Wed, 21 Jan 2015 19:32:40 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id h15so15516121igd.4; Wed, 21 Jan 2015 11:32:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=1GqEDi7gEt8jQHrCYD9/Gd/oti/xFNJg3KauapIZxvA=; b=ewlT8PZUQ54KCZmke0XDebCTxLe4U1saQSDSU1l6b3aOncCDAz98rBkVAL97s+xmyJ EbLauRoZ+Oldr8piS5hTrTt4z9V+tUpS7lDy30tkSq5dk9dV33fCo4FC7KdsuJgz5my6 +H5rDWTa3yM6EaGs0RPckUQu1eZ0/G6EndyxclTzsMBWUeXAoVcYiwwHIu35IoGnG5IP +T5pNnN6harZi2vGNWckNP/YIVgh9CM50NppndaI/dE4vUcDKz+nktjFxzklp3ktyH39 MyUmzIkZUh8xohO6AfUjBpaOLLd10MY8kFr8tq2SXUXzwTrzcO4m5fw0VLKNQ3DhB2AJ B+hA== MIME-Version: 1.0 X-Received: by 10.50.107.72 with SMTP id ha8mr6787052igb.32.1421868759842; Wed, 21 Jan 2015 11:32:39 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Wed, 21 Jan 2015 11:32:39 -0800 (PST) In-Reply-To: <20150121181512.GE15484@FreeBSD.org> References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> Date: Wed, 21 Jan 2015 11:32:39 -0800 X-Google-Sender-Auth: eF7Ur-d1yWJCVhBd7Wqt6recUB4 Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: Gleb Smirnoff Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , "src-committers@freebsd.org" , "K. Macy" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:32:41 -0000 On 21 January 2015 at 10:15, Gleb Smirnoff wrote: > Sean, > > On Tue, Jan 20, 2015 at 04:22:44PM -0800, Sean Bruno wrote: > S> In our universe, this commit (right or wrong) resolved our panics. I > S> think that there is some room for improvement based on the commentary > S> in this thread, but some people do indeed prefer stability over > S> performance. I hope we can come to a middle ground somewhere here. > > Sorry, but this sounds very much like alchemy. We poured this stuff > into that stuff and yield in gold precipitate. We don't understand > what's going on, but let's record the recipe into our tome of aclhemy > wisdom. > > So alchemy never came to a scientific level, and chemistry evolved > as science only when researchers started to measure, explain and > understand. > > If we treat our precious kernel in alchemy way, we will follow > the path of alchemy, except that it took centuries for alchemy to > die, and for a software product it would take a few years. > > So, for me Kip ideas sound very sensible. There could be a race > somewhere else. You tweak callout subsystem in any direction, > timings of events in kernel shift, your race is hidden. > > If we fix problems w/o understanding them, we are going alchemy way. Hi, I don't think it's quite this bad. They originally found that things were spinning for way too long. Hans found something similar and determined/concluded that the migration code in callouts was racy-by-design and dramatically simplified it and also put very hard constraints on what is a valid situation to support migrating from one callwheel to another. Now we have fallout which we can either address or back out until the callout stuff is again reviewed/fixed. I don't think it's as alchemic as is being promoted. -a From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:53:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5825D18D; Wed, 21 Jan 2015 19:53:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 397EF639; Wed, 21 Jan 2015 19:53:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJrsnh094200; Wed, 21 Jan 2015 19:53:54 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJrrCi094194; Wed, 21 Jan 2015 19:53:53 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501211953.t0LJrrCi094194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 19:53:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277505 - head/sys/dev/dcons X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:53:54 -0000 Author: will Date: Wed Jan 21 19:53:52 2015 New Revision: 277505 URL: https://svnweb.freebsd.org/changeset/base/277505 Log: Garbage collect dragonfly and legacy FreeBSD system support from dcons(4). Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110990 on 2015/01/06 Modified: head/sys/dev/dcons/dcons.c head/sys/dev/dcons/dcons_crom.c head/sys/dev/dcons/dcons_os.h Modified: head/sys/dev/dcons/dcons.c ============================================================================== --- head/sys/dev/dcons/dcons.c Wed Jan 21 19:30:01 2015 (r277504) +++ head/sys/dev/dcons/dcons.c Wed Jan 21 19:53:52 2015 (r277505) @@ -37,11 +37,9 @@ #include -#if defined(__DragonFly__) || defined(_BOOT) -#include "dcons.h" #if defined(_BOOT) +#include "dcons.h" #include "stand.h" -#endif #else #include #endif Modified: head/sys/dev/dcons/dcons_crom.c ============================================================================== --- head/sys/dev/dcons/dcons_crom.c Wed Jan 21 19:30:01 2015 (r277504) +++ head/sys/dev/dcons/dcons_crom.c Wed Jan 21 19:53:52 2015 (r277505) @@ -46,40 +46,25 @@ #include #include -#ifdef __DragonFly__ -#include -#include -#include -#include "dcons.h" -#include "dcons_os.h" -#else #include #include #include #include #include -#endif #include -#define EXPOSE_IDT_ADDR 1 - -#if (defined(__i386__) || defined(__amd64__)) && defined(EXPOSE_IDT_ADDR) +#if (defined(__i386__) || defined(__amd64__)) #include #include #include #include /* for idt */ #endif + static bus_addr_t dcons_paddr; -#if __FreeBSD_version >= 500000 static int force_console = 0; TUNABLE_INT("hw.firewire.dcons_crom.force_console", &force_console); -#endif - -#ifndef CSRVAL_VENDOR_PRIVATE -#define NEED_NEW_DRIVER -#endif #define ADDR_HI(x) (((x) >> 24) & 0xffffff) #define ADDR_LO(x) ((x) & 0xffffff) @@ -115,8 +100,7 @@ dcons_crom_probe(device_t dev) return (0); } -#ifndef NEED_NEW_DRIVER -#if (defined(__i386__) || defined(__amd64__)) && defined(EXPOSE_IDT_ADDR) +#if (defined(__i386__) || defined(__amd64__)) static void dcons_crom_expose_idt(struct dcons_crom_softc *sc) { @@ -129,6 +113,7 @@ dcons_crom_expose_idt(struct dcons_crom_ crom_add_entry(&sc->unit, DCONS_CSR_KEY_RESET_LO, ADDR_LO(idt_paddr)); } #endif + static void dcons_crom_post_busreset(void *arg) { @@ -149,11 +134,10 @@ dcons_crom_post_busreset(void *arg) crom_add_simple_text(src, &sc->unit, &sc->ver, "dcons"); crom_add_entry(&sc->unit, DCONS_CSR_KEY_HI, ADDR_HI(dcons_paddr)); crom_add_entry(&sc->unit, DCONS_CSR_KEY_LO, ADDR_LO(dcons_paddr)); -#if (defined(__i386__) || defined(__amd64__)) && defined(EXPOSE_IDT_ADDR) +#if (defined(__i386__) || defined(__amd64__)) dcons_crom_expose_idt(sc); #endif } -#endif static void dmamap_cb(void *arg, bus_dma_segment_t *segments, int seg, int error) @@ -168,11 +152,7 @@ dmamap_cb(void *arg, bus_dma_segment_t * bus_dmamap_sync(sc->dma_tag, sc->dma_map, BUS_DMASYNC_PREWRITE); device_printf(sc->fd.dev, -#if __FreeBSD_version < 500000 - "bus_addr 0x%x\n", sc->bus_addr); -#else "bus_addr 0x%jx\n", (uintmax_t)sc->bus_addr); -#endif if (dcons_paddr != 0) { /* XXX */ device_printf(sc->fd.dev, "dcons_paddr is already set\n"); @@ -182,11 +162,9 @@ dmamap_cb(void *arg, bus_dma_segment_t * dcons_conf->dma_map = sc->dma_map; dcons_paddr = sc->bus_addr; -#if __FreeBSD_version >= 500000 /* Force to be the high-level console */ if (force_console) cnselect(dcons_conf->cdev); -#endif } static void @@ -200,10 +178,6 @@ dcons_crom_poll(void *p, int arg) static int dcons_crom_attach(device_t dev) { -#ifdef NEED_NEW_DRIVER - printf("dcons_crom: you need newer firewire driver\n"); - return (-1); -#else struct dcons_crom_softc *sc; int error; @@ -227,10 +201,8 @@ dcons_crom_attach(device_t dev) /*nsegments*/ 1, /*maxsegsz*/ BUS_SPACE_MAXSIZE_32BIT, /*flags*/ BUS_DMA_ALLOCNOW, -#if __FreeBSD_version >= 501102 /*lockfunc*/busdma_lock_mutex, /*lockarg*/&Giant, -#endif &sc->dma_tag); if (error != 0) return (error); @@ -245,7 +217,6 @@ dcons_crom_attach(device_t dev) sc->ehand = EVENTHANDLER_REGISTER(dcons_poll, dcons_crom_poll, (void *)sc, 0); return (0); -#endif } static int Modified: head/sys/dev/dcons/dcons_os.h ============================================================================== --- head/sys/dev/dcons/dcons_os.h Wed Jan 21 19:30:01 2015 (r277504) +++ head/sys/dev/dcons/dcons_os.h Wed Jan 21 19:53:52 2015 (r277505) @@ -34,7 +34,6 @@ * $FreeBSD$ */ - typedef void (*dcons_poll_fn)(void *, int); EVENTHANDLER_DECLARE(dcons_poll, dcons_poll_fn); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:58:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 479D763F; Wed, 21 Jan 2015 19:58:33 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 211F1682; Wed, 21 Jan 2015 19:58:33 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-70-85-31.nwrknj.fios.verizon.net [173.70.85.31]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 61ABDB945; Wed, 21 Jan 2015 14:58:31 -0500 (EST) From: John Baldwin To: Mike Tancsa Subject: Re: svn commit: r276076 - in stable/10/sys: amd64/amd64 i386/i386 i386/include i386/xen pc98/pc98 x86/x86 Date: Wed, 21 Jan 2015 12:59:58 -0500 Message-ID: <2651354.ontMjRkiak@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <54B969A8.4070709@sentex.net> References: <201412221953.sBMJruwk025467@svn.freebsd.org> <54B969A8.4070709@sentex.net> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Wed, 21 Jan 2015 14:58:31 -0500 (EST) Cc: svn-src-stable@freebsd.org, svn-src-all@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:58:33 -0000 On Friday, January 16, 2015 02:42:32 PM Mike Tancsa wrote: > Hi, > I noticed while building a new ALIX_DSK kernel image for my i386 > PCEngines alix box, the commit below no longer allows a kernel to be > built without cpu I686_CPU as a kernel option. > > Is this a known side effect ? The default kernel def in > /usr/src/tools/tools/nanobsd/pcengines/ALIX_DSK should be updated then. Oops, should be fixed, sorry! -- John Baldwin From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 19:59:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 401FD69E; Wed, 21 Jan 2015 19:59:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2CE0168B; Wed, 21 Jan 2015 19:59:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LJxAuR095010; Wed, 21 Jan 2015 19:59:10 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LJxAKG095009; Wed, 21 Jan 2015 19:59:10 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501211959.t0LJxAKG095009@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 19:59:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277506 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 19:59:10 -0000 Author: will Date: Wed Jan 21 19:59:09 2015 New Revision: 277506 URL: https://svnweb.freebsd.org/changeset/base/277506 Log: Fix one cause of firewire panics. sys/dev/firewire/firewire.c: In fw_xfer_unload(), clear the FWXF_INQ flag on the xfer under protection of the FW_GMTX, after the xfer is removeed from the tx/rx queue. Otherwise it is possible for the xfer to be removed again (corrupting the list or immediately panicing) from another thread that has found this xfer in the transaction label table. Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110200 on 2015/01/02 Modified: head/sys/dev/firewire/firewire.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Wed Jan 21 19:53:52 2015 (r277505) +++ head/sys/dev/firewire/firewire.c Wed Jan 21 19:59:09 2015 (r277506) @@ -1166,6 +1166,7 @@ fw_xfer_unload(struct fw_xfer *xfer) s = splfw(); FW_GLOCK(xfer->fc); STAILQ_REMOVE(&xfer->q->q, xfer, fw_xfer, link); + xfer->flag &= ~FWXF_INQ; #if 0 xfer->q->queued--; #endif From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:02:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 772AA84E; Wed, 21 Jan 2015 20:02:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 63F65799; Wed, 21 Jan 2015 20:02:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LK2Hqw099438; Wed, 21 Jan 2015 20:02:17 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LK2HEK099437; Wed, 21 Jan 2015 20:02:17 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212002.t0LK2HEK099437@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:02:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277507 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:02:17 -0000 Author: will Date: Wed Jan 21 20:02:16 2015 New Revision: 277507 URL: https://svnweb.freebsd.org/changeset/base/277507 Log: Fix a FWXF_INQ race in the firewire driver. sys/dev/firewire/firewire.c: In fw_xfer_unload() expand lock coverage so that the test for FWXF_INQ doesn't race with it being cleared in another thread. Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110207 on 2015/01/02 Modified: head/sys/dev/firewire/firewire.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Wed Jan 21 19:59:09 2015 (r277506) +++ head/sys/dev/firewire/firewire.c Wed Jan 21 20:02:16 2015 (r277507) @@ -1022,9 +1022,7 @@ static void fw_tl_free(struct firewire_comm *fc, struct fw_xfer *xfer) { struct fw_xfer *txfer; - int s; - s = splfw(); mtx_lock(&fc->tlabel_lock); if (xfer->tl < 0) { mtx_unlock(&fc->tlabel_lock); @@ -1042,14 +1040,12 @@ fw_tl_free(struct firewire_comm *fc, str fw_dump_hdr(&xfer->recv.hdr, "recv"); kdb_backtrace(); mtx_unlock(&fc->tlabel_lock); - splx(s); return; } STAILQ_REMOVE(&fc->tlabels[xfer->tl], xfer, fw_xfer, tlabel); xfer->tl = -1; mtx_unlock(&fc->tlabel_lock); - splx(s); return; } @@ -1157,22 +1153,18 @@ fw_xfer_done(struct fw_xfer *xfer) void fw_xfer_unload(struct fw_xfer *xfer) { - int s; if (xfer == NULL) return; + FW_GLOCK(xfer->fc); if (xfer->flag & FWXF_INQ) { - printf("fw_xfer_free FWXF_INQ\n"); - s = splfw(); - FW_GLOCK(xfer->fc); STAILQ_REMOVE(&xfer->q->q, xfer, fw_xfer, link); xfer->flag &= ~FWXF_INQ; #if 0 xfer->q->queued--; #endif - FW_GUNLOCK(xfer->fc); - splx(s); } + FW_GUNLOCK(xfer->fc); if (xfer->fc != NULL) { /* * Ensure that any tlabel owner can't access this From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:03:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90B9B9CC; Wed, 21 Jan 2015 20:03:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 636EF7B0; Wed, 21 Jan 2015 20:03:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LK3loQ099843; Wed, 21 Jan 2015 20:03:47 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LK3lHX099841; Wed, 21 Jan 2015 20:03:47 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212003.t0LK3lHX099841@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:03:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277508 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:03:47 -0000 Author: will Date: Wed Jan 21 20:03:46 2015 New Revision: 277508 URL: https://svnweb.freebsd.org/changeset/base/277508 Log: Fix panic in firewire and creation of invalid config ROM. sys/boot/i386/libfirewire/firewire.c: sys/dev/firewire/firewire.c: Fix configuration ROM generation count wrapping logic so that the generation count is never outside of allowed limits (0x2 -> 0xF). sys/dev/firewire/firewire.c: In fw_xfer_unload(), xfer->fc may be NULL. Protect against this before taking the fc lock. Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110685 on 2015/01/05 Modified: head/sys/dev/firewire/firewire.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Wed Jan 21 20:02:16 2015 (r277507) +++ head/sys/dev/firewire/firewire.c Wed Jan 21 20:03:46 2015 (r277508) @@ -761,8 +761,15 @@ fw_busreset(struct firewire_comm *fc, ui src = &fc->crom_src_buf->src; crom_load(src, newrom, CROMSIZE); if (bcmp(newrom, fc->config_rom, CROMSIZE) != 0) { - if (src->businfo.generation++ > FW_MAX_GENERATION) + /* Bump generation and reload. */ + src->businfo.generation++; + + /* Handle generation count wraps. */ + if (src->businfo.generation < FW_GENERATION_CHANGEABLE) src->businfo.generation = FW_GENERATION_CHANGEABLE; + + /* Recalculate CRC to account for generation change. */ + crom_load(src, newrom, CROMSIZE); bcopy(newrom, fc->config_rom, CROMSIZE); } free(newrom, M_FW); @@ -1156,16 +1163,18 @@ fw_xfer_unload(struct fw_xfer *xfer) if (xfer == NULL) return; - FW_GLOCK(xfer->fc); - if (xfer->flag & FWXF_INQ) { - STAILQ_REMOVE(&xfer->q->q, xfer, fw_xfer, link); - xfer->flag &= ~FWXF_INQ; -#if 0 - xfer->q->queued--; -#endif - } - FW_GUNLOCK(xfer->fc); + if (xfer->fc != NULL) { + FW_GLOCK(xfer->fc); + if (xfer->flag & FWXF_INQ) { + STAILQ_REMOVE(&xfer->q->q, xfer, fw_xfer, link); + xfer->flag &= ~FWXF_INQ; + #if 0 + xfer->q->queued--; + #endif + } + FW_GUNLOCK(xfer->fc); + /* * Ensure that any tlabel owner can't access this * xfer after it's freed. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:05:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C217EB1B; Wed, 21 Jan 2015 20:05:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE7177BC; Wed, 21 Jan 2015 20:05:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LK5BDj000426; Wed, 21 Jan 2015 20:05:11 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LK5BQI000423; Wed, 21 Jan 2015 20:05:11 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212005.t0LK5BQI000423@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:05:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277509 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:05:12 -0000 Author: will Date: Wed Jan 21 20:05:10 2015 New Revision: 277509 URL: https://svnweb.freebsd.org/changeset/base/277509 Log: Properly lock accesss to the firewire_comm->devices list. sys/dev/firewire/firewire.c: Add missing FW_GLOCK/UNLOCK() usage to fw_noderesolve_nodeid(). sys/dev/firewire/firewire.c: sys/dev/firewire/fwmem.c: Remove no-op splfw() calls from functions that have been audited for proper lock usage. Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110992 on 2015/01/06 Modified: head/sys/dev/firewire/firewire.c head/sys/dev/firewire/fwmem.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Wed Jan 21 20:03:46 2015 (r277508) +++ head/sys/dev/firewire/firewire.c Wed Jan 21 20:05:10 2015 (r277509) @@ -146,13 +146,12 @@ struct fw_device * fw_noderesolve_nodeid(struct firewire_comm *fc, int dst) { struct fw_device *fwdev; - int s; - s = splfw(); + FW_GLOCK(fc); STAILQ_FOREACH(fwdev, &fc->devices, link) if (fwdev->dst == dst && fwdev->status != FWDEVINVAL) break; - splx(s); + FW_GUNLOCK(fc); return fwdev; } @@ -164,15 +163,12 @@ struct fw_device * fw_noderesolve_eui64(struct firewire_comm *fc, struct fw_eui64 *eui) { struct fw_device *fwdev; - int s; - s = splfw(); FW_GLOCK(fc); STAILQ_FOREACH(fwdev, &fc->devices, link) if (FW_EUI64_EQUAL(fwdev->eui, *eui)) break; FW_GUNLOCK(fc); - splx(s); if (fwdev == NULL) return NULL; @@ -301,9 +297,7 @@ static void fw_asystart(struct fw_xfer *xfer) { struct firewire_comm *fc = xfer->fc; - int s; - s = splfw(); /* Protect from interrupt/timeout */ FW_GLOCK(fc); xfer->flag = FWXF_INQ; @@ -312,7 +306,6 @@ fw_asystart(struct fw_xfer *xfer) xfer->q->queued++; #endif FW_GUNLOCK(fc); - splx(s); /* XXX just queue for mbuf */ if (xfer->mbuf == NULL) xfer->q->start(fc); @@ -332,6 +325,7 @@ firewire_probe(device_t dev) return (0); } +/* Just use a per-packet callout? */ static void firewire_xfer_timeout(void *arg, int pending) { @@ -340,7 +334,7 @@ firewire_xfer_timeout(void *arg, int pen struct timeval tv; struct timeval split_timeout; STAILQ_HEAD(, fw_xfer) xfer_timeout; - int i, s; + int i; split_timeout.tv_sec = 0; split_timeout.tv_usec = 200 * 1000; /* 200 msec */ @@ -349,9 +343,8 @@ firewire_xfer_timeout(void *arg, int pen timevalsub(&tv, &split_timeout); STAILQ_INIT(&xfer_timeout); - s = splfw(); mtx_lock(&fc->tlabel_lock); - for (i = 0; i < 0x40; i++) { + for (i = 0; i < nitems(fc->tlabels); i++) { while ((xfer = STAILQ_FIRST(&fc->tlabels[i])) != NULL) { if ((xfer->flag & FWXF_SENT) == 0) /* not sent yet */ @@ -370,7 +363,6 @@ firewire_xfer_timeout(void *arg, int pen } } mtx_unlock(&fc->tlabel_lock); - splx(s); fc->timeout(fc); STAILQ_FOREACH_SAFE(xfer, &xfer_timeout, tlabel, txfer) Modified: head/sys/dev/firewire/fwmem.c ============================================================================== --- head/sys/dev/firewire/fwmem.c Wed Jan 21 20:03:46 2015 (r277508) +++ head/sys/dev/firewire/fwmem.c Wed Jan 21 20:05:10 2015 (r277509) @@ -348,12 +348,11 @@ fwmem_strategy(struct bio *bp) struct fw_device *fwdev; struct fw_xfer *xfer; struct cdev *dev; - int err = 0, s, iolen; + int err = 0, iolen; dev = bp->bio_dev; /* XXX check request length */ - s = splfw(); fms = dev->si_drv1; fwdev = fw_noderesolve_eui64(fms->sc->fc, &fms->eui); if (fwdev == NULL) { @@ -395,7 +394,6 @@ fwmem_strategy(struct bio *bp) /* XXX */ bp->bio_resid = bp->bio_bcount - iolen; error: - splx(s); if (err != 0) { if (fwmem_debug) printf("%s: err=%d\n", __func__, err); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:06:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8649C75; Wed, 21 Jan 2015 20:06:26 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A542B7D4; Wed, 21 Jan 2015 20:06:26 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LK6QOZ000770; Wed, 21 Jan 2015 20:06:26 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LK6Qp7000769; Wed, 21 Jan 2015 20:06:26 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212006.t0LK6Qp7000769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:06:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277510 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:06:26 -0000 Author: will Date: Wed Jan 21 20:06:25 2015 New Revision: 277510 URL: https://svnweb.freebsd.org/changeset/base/277510 Log: Fix firewire panic when issuing a reply to an unhandled asynchronous remote dma request (DMA request that the hardware cannot automatically handle). sys/dev/firewire/firewire.c In fw_rcv(), add missing early return in the error path for DMA requests to unregistered regions. Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110993 on 2015/01/06 Modified: head/sys/dev/firewire/firewire.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Wed Jan 21 20:05:10 2015 (r277509) +++ head/sys/dev/firewire/firewire.c Wed Jan 21 20:06:25 2015 (r277510) @@ -2030,6 +2030,7 @@ fw_rcv(struct fw_rcv_buf *rb) rb->xfer->hand = fw_xfer_free; if (fw_asyreq(rb->fc, -1, rb->xfer)) fw_xfer_free(rb->xfer); + return; } len = 0; for (i = 0; i < rb->nvec; i++) From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:08:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E0A9DD3; Wed, 21 Jan 2015 20:08:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6A6487EC; Wed, 21 Jan 2015 20:08:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LK8PjL001310; Wed, 21 Jan 2015 20:08:25 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LK8PhR001309; Wed, 21 Jan 2015 20:08:25 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212008.t0LK8PhR001309@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277511 - head/sys/dev/firewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:08:25 -0000 Author: will Date: Wed Jan 21 20:08:24 2015 New Revision: 277511 URL: https://svnweb.freebsd.org/changeset/base/277511 Log: Fix remote DMA based firewire debugging when targeting systems with more than 4GB of physical memory. To remotely debug the system 'stealthy' which has a kernel with this change installed and firewire properly configured: % fwcontrol -m stealthy (or stealthy's firewire EUI64) % kgdb kernel /dev/fwmem0.0 sys/dev/firewire/fwohci.c: Rather than hard code the upper limit for hw based automatic responses to remote DMA requests at 4GB, program the hardware using Maxmem, the page number one higher than the highest physical page detected in the system. While here, garbage collect more useless splfw() calls. Submitted by: gibbs MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1110994 on 2015/01/06 Modified: head/sys/dev/firewire/fwohci.c Modified: head/sys/dev/firewire/fwohci.c ============================================================================== --- head/sys/dev/firewire/fwohci.c Wed Jan 21 20:06:25 2015 (r277510) +++ head/sys/dev/firewire/fwohci.c Wed Jan 21 20:08:24 2015 (r277511) @@ -48,6 +48,7 @@ #include #include +#include #include #include @@ -188,6 +189,7 @@ static void fwohci_task_dma(void *, int) #define OHCI_PREQLO 0x118 #define OHCI_PREQLOCLR 0x11c #define OHCI_PREQUPPER 0x120 +#define OHCI_PREQUPPER_MAX 0xffff0000 #define OHCI_SID_BUF 0x64 #define OHCI_SID_CNT 0x68 @@ -854,7 +856,7 @@ fwohci_execute_db2(void *arg, bus_dma_se static void fwohci_start(struct fwohci_softc *sc, struct fwohci_dbch *dbch) { - int i, s; + int i; int tcode, hdr_len, pl_off; int fsegment = -1; uint32_t off; @@ -880,7 +882,6 @@ fwohci_start(struct fwohci_softc *sc, st if (dbch->flags & FWOHCI_DBCH_FULL) return; - s = splfw(); db_tr = dbch->top; txloop: xfer = STAILQ_FIRST(&dbch->xferq.q); @@ -1030,7 +1031,6 @@ kick: } dbch->top = db_tr; - splx(s); return; } @@ -1821,6 +1821,7 @@ static void fwohci_intr_core(struct fwohci_softc *sc, uint32_t stat, int count) { struct firewire_comm *fc = (struct firewire_comm *)sc; + uintmax_t prequpper; uint32_t node_id, plen; FW_GLOCK_ASSERT(fc); @@ -1852,8 +1853,17 @@ fwohci_intr_core(struct fwohci_softc *sc /* allow from all nodes */ OWRITE(sc, OHCI_PREQHI, 0x7fffffff); OWRITE(sc, OHCI_PREQLO, 0xffffffff); - /* 0 to 4GB region */ - OWRITE(sc, OHCI_PREQUPPER, 0x10000); + prequpper = ((uintmax_t)Maxmem << PAGE_SHIFT) >> 16; + if (prequpper > OHCI_PREQUPPER_MAX) { + device_printf(fc->dev, + "Physical memory size of 0x%jx exceeds " + "fire wire address space. Limiting dma " + "to memory below 0x%jx\n", + (uintmax_t)Maxmem << PAGE_SHIFT, + (uintmax_t)OHCI_PREQUPPER_MAX << 16); + prequpper = OHCI_PREQUPPER_MAX; + } + OWRITE(sc, OHCI_PREQUPPER, prequpper & 0xffffffff); } /* Set ATRetries register */ OWRITE(sc, OHCI_ATRETRY, 1<<(13 + 16) | 0xfff); @@ -2171,7 +2181,7 @@ fwohci_rbuf_update(struct fwohci_softc * struct fw_bulkxfer *chunk; struct fw_xferq *ir; uint32_t stat; - int s, w = 0, ldesc; + int w = 0, ldesc; ir = fc->ir[dmach]; ldesc = sc->ir[dmach].ndesc - 1; @@ -2179,7 +2189,6 @@ fwohci_rbuf_update(struct fwohci_softc * #if 0 dump_db(sc, dmach); #endif - s = splfw(); if ((ir->flag & FWXFERQ_HANDLER) == 0) FW_GLOCK(fc); fwdma_sync_multiseg_all(sc->ir[dmach].am, BUS_DMASYNC_POSTREAD); @@ -2218,7 +2227,6 @@ fwohci_rbuf_update(struct fwohci_softc * } if ((ir->flag & FWXFERQ_HANDLER) == 0) FW_GUNLOCK(fc); - splx(s); if (w == 0) return; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:11:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D348CF47; Wed, 21 Jan 2015 20:11:03 +0000 (UTC) Received: from mail-qa0-x230.google.com (mail-qa0-x230.google.com [IPv6:2607:f8b0:400d:c00::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8BEB1892; Wed, 21 Jan 2015 20:11:03 +0000 (UTC) Received: by mail-qa0-f48.google.com with SMTP id v8so34546942qal.7; Wed, 21 Jan 2015 12:11:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:content-type; bh=BFQAAUfCG9RQiwqwCiRFouTHDGduMFou8laiARS74GM=; b=h1z8kXxaDDBZRq4PrCFHjUjvYT9naVLUiJjfXsfimD2ZoBNupcIMk3naIftYecqgyH B9DukKiGdmHB2yC7IXyVapLlrUPSOsEfNBqVNgnmOp3qMd8DU6qadM0Gg/jE4NOCSnK2 gSAOhVre8VPaksDRG9aOA53KOG7fwZIyswdxZ6Icl0n2QUZ7w1HVK8MNAJO1+GMaCJ+Y iBpgXeVNW/98+M4o8MjYKxaXgVzw9OJgor7sXtOndanPdJk7dhrYnxcgMbrTtqmfUINi phze74XTHK3jZ3GLp/TQNOxWX/j0agquXjPmD/qS2EikoeHrDOqcBTGt/vNlQl5dzJPT E9iA== X-Received: by 10.224.121.142 with SMTP id h14mr71963385qar.80.1421871062623; Wed, 21 Jan 2015 12:11:02 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Wed, 21 Jan 2015 12:10:42 -0800 (PST) In-Reply-To: <201501211904.t0LJ4u3R070278@svn.freebsd.org> References: <201501211904.t0LJ4u3R070278@svn.freebsd.org> From: Ed Maste Date: Wed, 21 Jan 2015 15:10:42 -0500 X-Google-Sender-Auth: XgjtqPk9tAL10sfbMo1lTL4jhSE Message-ID: Subject: Re: svn commit: r277497 - head To: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:11:03 -0000 On 21 January 2015 at 14:04, Ed Maste wrote: > > Author: emaste > Date: Wed Jan 21 19:04:55 2015 > New Revision: 277497 > URL: https://svnweb.freebsd.org/changeset/base/277497 > > Log: > Remove addr2line from cross elftoolchain tools list > > It is not required, and there is no reason to install it just because it > came with the binutils cross tools. I left some detail out of this commit message and it confused a couple of people, so to be clear: this doesn't remove addr2line from the world build, only the cross-tools stage. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:12:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 794DE15D; Wed, 21 Jan 2015 20:12:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6556A8A0; Wed, 21 Jan 2015 20:12:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LKCapp005879; Wed, 21 Jan 2015 20:12:36 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LKCZAd005877; Wed, 21 Jan 2015 20:12:36 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501212012.t0LKCZAd005877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 20:12:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277512 - in head/sys/arm: arm include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:12:36 -0000 Author: ian Date: Wed Jan 21 20:12:35 2015 New Revision: 277512 URL: https://svnweb.freebsd.org/changeset/base/277512 Log: Micro-optimize the new arm inline bus_space implementation by grouping all the data the inline functions access together at the start of the bus_space struct. The start-of part isn't so important, it's the grouping-together that's the point: now all the most-accessed data should be in one cache line. Suggested by: cognet Modified: head/sys/arm/arm/bus_space_base.c head/sys/arm/include/bus.h Modified: head/sys/arm/arm/bus_space_base.c ============================================================================== --- head/sys/arm/arm/bus_space_base.c Wed Jan 21 20:08:24 2015 (r277511) +++ head/sys/arm/arm/bus_space_base.c Wed Jan 21 20:12:35 2015 (r277512) @@ -150,7 +150,7 @@ static struct bus_space arm_base_bus_spa .bs_wr_2_s = generic_bs_wr_2, .bs_wr_4_s = generic_bs_wr_4, .bs_wr_8_s = BS_UNIMPLEMENTED, -}; +} __aligned(CACHE_LINE_SIZE); #ifdef FDT bus_space_tag_t fdtbus_bs_tag = &arm_base_bus_space; Modified: head/sys/arm/include/bus.h ============================================================================== --- head/sys/arm/include/bus.h Wed Jan 21 20:08:24 2015 (r277511) +++ head/sys/arm/include/bus.h Wed Jan 21 20:12:35 2015 (r277512) @@ -79,9 +79,27 @@ #define BUS_SPACE_MAP_LINEAR 0x02 #define BUS_SPACE_MAP_PREFETCHABLE 0x04 +/* + * Bus space for ARM. + * + * The functions used most often are grouped together at the beginning to ensure + * that all the data fits into a single cache line. The inline implementations + * of single read/write access these values a lot. + */ struct bus_space { - /* cookie */ - void *bs_privdata; + /* Read/write single and barrier: the most commonly used functions. */ + uint8_t (*bs_r_1)(bus_space_tag_t, bus_space_handle_t, bus_size_t); + uint32_t (*bs_r_4)(bus_space_tag_t, bus_space_handle_t, bus_size_t); + void (*bs_w_1)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint8_t); + void (*bs_w_4)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, uint32_t); + void (*bs_barrier)(bus_space_tag_t, bus_space_handle_t, + bus_size_t, bus_size_t, int); + + /* Backlink to parent (if copied), and implementation private data. */ + struct bus_space *bs_parent; + void *bs_privdata; /* mapping/unmapping */ int (*bs_map) (bus_space_tag_t, bus_addr_t, bus_size_t, @@ -97,15 +115,8 @@ struct bus_space { void (*bs_free) (bus_space_tag_t, bus_space_handle_t, bus_size_t); - /* get kernel virtual address */ - /* barrier */ - void (*bs_barrier) (bus_space_tag_t, bus_space_handle_t, - bus_size_t, bus_size_t, int); - - /* read (single) */ - uint8_t (*bs_r_1) (bus_space_tag_t, bus_space_handle_t, bus_size_t); + /* Read single, the less commonly used functions. */ uint16_t (*bs_r_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t); - uint32_t (*bs_r_4) (bus_space_tag_t, bus_space_handle_t, bus_size_t); uint64_t (*bs_r_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t); /* read multiple */ @@ -128,13 +139,9 @@ struct bus_space { void (*bs_rr_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t, uint64_t *, bus_size_t); - /* write (single) */ - void (*bs_w_1) (bus_space_tag_t, bus_space_handle_t, - bus_size_t, uint8_t); + /* Write single, the less commonly used functions. */ void (*bs_w_2) (bus_space_tag_t, bus_space_handle_t, bus_size_t, uint16_t); - void (*bs_w_4) (bus_space_tag_t, bus_space_handle_t, - bus_size_t, uint32_t); void (*bs_w_8) (bus_space_tag_t, bus_space_handle_t, bus_size_t, uint64_t); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:20:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30B82381; Wed, 21 Jan 2015 20:20:22 +0000 (UTC) Received: from smtp4.ore.mailhop.org (smtp4.ore.mailhop.org [54.149.240.58]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CCDB8FA; Wed, 21 Jan 2015 20:20:21 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp4.ore.mailhop.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1YE1l8-0000rc-O0; Wed, 21 Jan 2015 20:20:14 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0LKKEjs063758; Wed, 21 Jan 2015 13:20:14 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX182l9yFJrrwK3vM5Gik1MiT Message-ID: <1421871614.14601.387.camel@freebsd.org> Subject: Re: svn commit: r277497 - head From: Ian Lepore To: Ed Maste Date: Wed, 21 Jan 2015 13:20:14 -0700 In-Reply-To: References: <201501211904.t0LJ4u3R070278@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:20:22 -0000 On Wed, 2015-01-21 at 15:10 -0500, Ed Maste wrote: > On 21 January 2015 at 14:04, Ed Maste wrote: > > > > Author: emaste > > Date: Wed Jan 21 19:04:55 2015 > > New Revision: 277497 > > URL: https://svnweb.freebsd.org/changeset/base/277497 > > > > Log: > > Remove addr2line from cross elftoolchain tools list > > > > It is not required, and there is no reason to install it just because it > > came with the binutils cross tools. > > I left some detail out of this commit message and it confused a couple > of people, so to be clear: this doesn't remove addr2line from the > world build, only the cross-tools stage. > This is still not good for me. I use the cross-addr2line tool all the time, and objdump and other such tools. I have many different sandboxes with different arch builds of different freebsd versions, and each one is a self-contained little development world that includes the cross tools that are known to work with that source base. I don't think there's a single addr2line binary I can install that will work with every object on the system. If the time spent building these things is bothering people, maybe we need a WITH_CROSS_BINUTILS knob or something? -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:22:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A40A541; Wed, 21 Jan 2015 20:22:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CDFC9AA; Wed, 21 Jan 2015 20:22:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LKMs0Y011244; Wed, 21 Jan 2015 20:22:54 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LKMsul011243; Wed, 21 Jan 2015 20:22:54 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212022.t0LKMsul011243@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277513 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:22:54 -0000 Author: will Date: Wed Jan 21 20:22:53 2015 New Revision: 277513 URL: https://svnweb.freebsd.org/changeset/base/277513 Log: Change 1112791 by kenm@ken.spectrabsd8 on 2015/01/15 16:45:13 Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards. The newer boards don't have the response field that indicates whether the SCSI status byte is present. You have to just look to see whether it is non-zero. The code was looking to see whether the sense length was valid before propagating the SCSI status byte (and sense information) up the stack. With a status like Reservation Conflict, there is no sense information, only the SCSI status byte. So it wasn't getting correctly returned. isp.c: In isp_intr(), if we are on a 2400 or 2500 type board and get a response, look at the actual contents of the SCSI status value and set the RQSF_GOT_STATUS flag accordingly so that return any SCSI status value we get. The RQSF_GOT_SENSE flag will get set later on if there is actual sense information returned. Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112791 on 2015/01/15 Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Jan 21 20:12:35 2015 (r277512) +++ head/sys/dev/isp/isp_freebsd.c Wed Jan 21 20:22:53 2015 (r277513) @@ -5123,19 +5123,34 @@ isp_action(struct cam_sim *sim, union cc break; #endif case XPT_RESET_DEV: /* BDR the specified SCSI device */ + { + struct isp_fc *fc; bus = cam_sim_bus(xpt_path_sim(ccb->ccb_h.path)); tgt = ccb->ccb_h.target_id; tgt |= (bus << 16); + if (IS_FC(isp)) + fc = ISP_FC_PC(isp, bus); + else + fc = NULL; error = isp_control(isp, ISPCTL_RESET_DEV, bus, tgt); if (error) { ccb->ccb_h.status = CAM_REQ_CMP_ERR; } else { + /* + * If we have a FC device, reset the Command + * Reference Number, because the target will expect + * that we re-start the CRN at 1 after a reset. + */ + if (fc != NULL) + isp_fcp_reset_crn(fc, tgt, /*tgt_set*/ 1); + ccb->ccb_h.status = CAM_REQ_CMP; } xpt_done(ccb); break; + } case XPT_ABORT: /* Abort the specified CCB */ { union ccb *accb = ccb->cab.abort_ccb; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:27:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B243E6C7; Wed, 21 Jan 2015 20:27:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F0F99D2; Wed, 21 Jan 2015 20:27:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LKRCCw011846; Wed, 21 Jan 2015 20:27:12 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LKRCGU011845; Wed, 21 Jan 2015 20:27:12 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212027.t0LKRCGU011845@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:27:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277514 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:27:12 -0000 Author: will Date: Wed Jan 21 20:27:11 2015 New Revision: 277514 URL: https://svnweb.freebsd.org/changeset/base/277514 Log: Force commit to record the correct log for r277513. If the user sends an XPT_RESET_DEV CCB, make sure to reset the Fibre Channel Command Reference Number if we're running on a FC controller. We send a SCSI Target Reset when we get this CCB, and as a result need to reset the CRN to 1 on the next command. isp_freebsd.c: In the XPT_RESET_DEV implementation in isp_action(), reset the CRN if we're on a FC controller. Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112787 on 2015/01/15 Modified: head/sys/dev/isp/isp_freebsd.c Modified: head/sys/dev/isp/isp_freebsd.c ============================================================================== --- head/sys/dev/isp/isp_freebsd.c Wed Jan 21 20:22:53 2015 (r277513) +++ head/sys/dev/isp/isp_freebsd.c Wed Jan 21 20:27:11 2015 (r277514) @@ -29,6 +29,7 @@ */ #include __FBSDID("$FreeBSD$"); + #include #include #include From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 20:32:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DC74D8DE; Wed, 21 Jan 2015 20:32:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C9177AAD; Wed, 21 Jan 2015 20:32:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LKWbVD016020; Wed, 21 Jan 2015 20:32:37 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LKWbbZ016019; Wed, 21 Jan 2015 20:32:37 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501212032.t0LKWbbZ016019@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Wed, 21 Jan 2015 20:32:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277515 - head/sys/dev/isp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 20:32:38 -0000 Author: will Date: Wed Jan 21 20:32:36 2015 New Revision: 277515 URL: https://svnweb.freebsd.org/changeset/base/277515 Log: Fix SCSI status byte reporting on 4Gb and 8Gb Qlogic boards. The newer boards don't have the response field that indicates whether the SCSI status byte is present. You have to just look to see whether it is non-zero. The code was looking to see whether the sense length was valid before propagating the SCSI status byte (and sense information) up the stack. With a status like Reservation Conflict, there is no sense information, only the SCSI status byte. So it wasn't getting correctly returned. isp.c: In isp_intr(), if we are on a 2400 or 2500 type board and get a response, look at the actual contents of the SCSI status value and set the RQSF_GOT_STATUS flag accordingly so that return any SCSI status value we get. The RQSF_GOT_SENSE flag will get set later on if there is actual sense information returned. Submitted by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1112791 on 2015/01/15 Modified: head/sys/dev/isp/isp.c Modified: head/sys/dev/isp/isp.c ============================================================================== --- head/sys/dev/isp/isp.c Wed Jan 21 20:27:11 2015 (r277514) +++ head/sys/dev/isp/isp.c Wed Jan 21 20:32:36 2015 (r277515) @@ -5224,7 +5224,10 @@ again: } scsi_status = sp2->req_scsi_status; completion_status = sp2->req_completion_status; - req_state_flags = 0; + if ((scsi_status & 0xff) != 0) + req_state_flags = RQSF_GOT_STATUS; + else + req_state_flags = 0; resid = sp2->req_resid; } else if (etype == RQSTYPE_RESPONSE) { isp_get_response(isp, (ispstatusreq_t *) hp, sp); From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 21:31:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 45501394; Wed, 21 Jan 2015 21:31:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 316C998; Wed, 21 Jan 2015 21:31:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LLVR1V043541; Wed, 21 Jan 2015 21:31:27 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LLVRN9043540; Wed, 21 Jan 2015 21:31:27 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501212131.t0LLVRN9043540@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Wed, 21 Jan 2015 21:31:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277516 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 21:31:27 -0000 Author: ian Date: Wed Jan 21 21:31:26 2015 New Revision: 277516 URL: https://svnweb.freebsd.org/changeset/base/277516 Log: Move the __aligned() declaration to where it will actually do something. Modified: head/sys/arm/arm/bus_space_base.c Modified: head/sys/arm/arm/bus_space_base.c ============================================================================== --- head/sys/arm/arm/bus_space_base.c Wed Jan 21 20:32:36 2015 (r277515) +++ head/sys/arm/arm/bus_space_base.c Wed Jan 21 21:31:26 2015 (r277516) @@ -45,7 +45,7 @@ bs_protos(generic); * The bus space tag. This is constant for all instances, so * we never have to explicitly "create" it. */ -static struct bus_space arm_base_bus_space = { +static struct bus_space arm_base_bus_space __aligned(CACHE_LINE_SIZE) = { /* privdata is whatever the implementer wants; unused in base tag */ .bs_privdata = NULL, @@ -150,7 +150,7 @@ static struct bus_space arm_base_bus_spa .bs_wr_2_s = generic_bs_wr_2, .bs_wr_4_s = generic_bs_wr_4, .bs_wr_8_s = BS_UNIMPLEMENTED, -} __aligned(CACHE_LINE_SIZE); +}; #ifdef FDT bus_space_tag_t fdtbus_bs_tag = &arm_base_bus_space; From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 21:44:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 74065733; Wed, 21 Jan 2015 21:44:50 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id F03D8275; Wed, 21 Jan 2015 21:44:49 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0LLiket081992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 22 Jan 2015 00:44:46 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0LLijNW081991; Thu, 22 Jan 2015 00:44:45 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Jan 2015 00:44:45 +0300 From: Gleb Smirnoff To: Craig Rodrigues , Nikos Vassiliadis Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150121214445.GL15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150107204631.GG15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150107204631.GG15484@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 21:44:50 -0000 On Wed, Jan 07, 2015 at 11:46:31PM +0300, Gleb Smirnoff wrote: T> On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: T> C> Author: rodrigc T> C> Date: Tue Jan 6 09:03:03 2015 T> C> New Revision: 276747 T> C> URL: https://svnweb.freebsd.org/changeset/base/276747 T> C> T> C> Log: T> C> Instead of creating a purge thread for every vnet, create T> C> a single purge thread and clean up all vnets from this thread. T> C> T> C> PR: 194515 T> C> Differential Revision: D1315 T> C> Submitted by: Nikos Vassiliadis T> T> I am not sure that this is a good idea. The core idea of VNETs T> is that they are isolated from each other. If we serialize purging, T> then vnets are strongly affecting each other. T> T> AFAIU, from the PR there is some panic fixed. What is the actual bug T> and why couldn't it be fixed with having per-vnet thread? So, after closer inspection, this commit is a completely messed up. You blindly remove kproc_exit(). What do you think would happen on 'kldunload -f pf'? You removed PF_RULES_RLOCK(). Cool! Now the purging thread doesn't acquire the pf lock. You substitute rw_sleep() with tsleep(). And the latter requires Giant to be held. If you tried your change with INVARIANTS, it would panic immediately. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 21:45:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBE52960; Wed, 21 Jan 2015 21:45:49 +0000 (UTC) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 73139284; Wed, 21 Jan 2015 21:45:49 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id f12so34279654qad.10; Wed, 21 Jan 2015 13:45:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=zn3YlwbWNLxwsPpjyNWpUf2QoxpPlOzy+cgJG2ypob0=; b=F75tVP5iaQvxxismKHc7OQuoU1+kKz7pVqdDgfMs4Qt2d+Ps0mDC09aDFQ54ZrsIWb lEyvL07fxl0vVVKFUMwp7KfOtNGfrHMq7QfQOHuHf5wyFw5BfWao6n7WUSxZBisyGAzz wsvCPn3TMO3F2MqQKyn6FxqQg1Tyb9v2f90lWXdWplZLtJjVg21CjqQybXKOjexGnWjS EXpxDam48LHGbAA3GTAJY/FczfjWDsXXjAVMIAlefSSnyqN+Md2cGJYhkyixVrk98pTN awPCJeSjE99ZfVvKMmgEUq/lzOkWTlpl0Vrs4j31bxGXfdI6eKLikPyI3pFd3yjRQnMX NcqQ== X-Received: by 10.224.121.142 with SMTP id h14mr72848851qar.80.1421876748640; Wed, 21 Jan 2015 13:45:48 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Wed, 21 Jan 2015 13:45:28 -0800 (PST) In-Reply-To: <1421871614.14601.387.camel@freebsd.org> References: <201501211904.t0LJ4u3R070278@svn.freebsd.org> <1421871614.14601.387.camel@freebsd.org> From: Ed Maste Date: Wed, 21 Jan 2015 16:45:28 -0500 X-Google-Sender-Auth: 6znzmrxtPR-U43sGIVtiOXJJIfk Message-ID: Subject: Re: svn commit: r277497 - head To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 21:45:49 -0000 On 21 January 2015 at 15:20, Ian Lepore wrote: > I don't think > there's a single addr2line binary I can install that will work with > every object on the system. There is, in fact - ELF Tool Chain's addr2line will work regardless of the object's architecture. However, I'm happy enough to revert this change (and add a comment about non-build use cases) if you like. From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 21:49:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22B08C2C; Wed, 21 Jan 2015 21:49:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E1F92F2; Wed, 21 Jan 2015 21:49:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0LLn3vu049760; Wed, 21 Jan 2015 21:49:03 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0LLn3CF049759; Wed, 21 Jan 2015 21:49:03 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501212149.t0LLn3CF049759@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Wed, 21 Jan 2015 21:49:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277517 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 21:49:04 -0000 Author: emaste Date: Wed Jan 21 21:49:03 2015 New Revision: 277517 URL: https://svnweb.freebsd.org/changeset/base/277517 Log: Fix bootstrap on systems with old libdwarf and WITHOUT_CDDL ELF Tool Chain tools need libelf and libdwarf. Submitted by: jmallett (earlier version) Reviewed by: jmallett Sponsored by: The FreeBSD Foundation Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Wed Jan 21 21:31:26 2015 (r277516) +++ head/Makefile.inc1 Wed Jan 21 21:49:03 2015 (r277517) @@ -1292,12 +1292,16 @@ _clang_tblgen= \ usr.bin/clang/clang-tblgen .endif +# ELF Tool Chain libraries are needed for ELF tools and dtrace tools. # dtrace tools are required for older bootstrap env and cross-build # pre libdwarf -.if ${MK_CDDL} != "no" && (${BOOTSTRAPPING} < 1100006 \ - || (${MACHINE} != ${TARGET} || ${MACHINE_ARCH} != ${TARGET_ARCH})) -_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf lib/libelf \ - lib/libdwarf cddl/usr.bin/ctfconvert cddl/usr.bin/ctfmerge +.if ${BOOTSTRAPPING} < 1100006 || (${MACHINE} != ${TARGET} || \ + ${MACHINE_ARCH} != ${TARGET_ARCH}) +_elftoolchain_libs= lib/libelf lib/libdwarf +.if ${MK_CDDL} != "no" +_dtrace_tools= cddl/usr.bin/sgsmsg cddl/lib/libctf cddl/usr.bin/ctfconvert \ + cddl/usr.bin/ctfmerge +.endif .endif # Default to building the GPL DTC, but build the BSDL one if users explicitly @@ -1324,6 +1328,7 @@ bootstrap-tools: .MAKE .for _tool in \ ${_clang_tblgen} \ ${_kerberos5_bootstrap_tools} \ + ${_elftoolchain_libs} \ ${_dtrace_tools} \ ${_strfile} \ ${_gperf} \ From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 22:15:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01CFB395; Wed, 21 Jan 2015 22:15:28 +0000 (UTC) Received: from gold.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "gold.funkthat.com", Issuer "gold.funkthat.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C4DDB7E8; Wed, 21 Jan 2015 22:15:28 +0000 (UTC) Received: from gold.funkthat.com (localhost [127.0.0.1]) by gold.funkthat.com (8.14.5/8.14.5) with ESMTP id t0LMFMvh088737 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 21 Jan 2015 14:15:22 -0800 (PST) (envelope-from jmg@gold.funkthat.com) Received: (from jmg@localhost) by gold.funkthat.com (8.14.5/8.14.5/Submit) id t0LMFL2H088736; Wed, 21 Jan 2015 14:15:21 -0800 (PST) (envelope-from jmg) Date: Wed, 21 Jan 2015 14:15:21 -0800 From: John-Mark Gurney To: Adrian Chadd Subject: Re: svn commit: r277204 - head/sys/amd64/conf Message-ID: <20150121221520.GY1949@funkthat.com> References: <201501150042.t0F0g7Um018059@svn.freebsd.org> <20150115132303.GA245@zxy.spb.ru> <368B22F3-5607-46F8-B8D2-13CA59E94861@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD 9.1-PRERELEASE amd64 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-TipJar: bitcoin:13Qmb6AeTgQecazTWph4XasEsP7nGRbAPE X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? User-Agent: Mutt/1.5.21 (2010-09-15) X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (gold.funkthat.com [127.0.0.1]); Wed, 21 Jan 2015 14:15:22 -0800 (PST) Cc: src-committers , "svn-src-all@freebsd.org" , Slawa Olhovchenkov , "svn-src-head@freebsd.org" , Warner Losh , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 22:15:29 -0000 Adrian Chadd wrote this message on Fri, Jan 16, 2015 at 10:43 -0800: > When I've done what you're doing, I end up having these options in my > minimal config file so opt_xxx.h is correctly populated. That way when > I point SYSDIR (or whichever variable it is) at the configured kernel > directory with the opt_xxx.h files, it all works out correctly. > > (I still think we shouldn't be relying on "defaults", but should ship > the opt_xxx.h files or something to derive the opt_xxx.h and makefile > config bits so things like external module building is possible > against a kernel. Or, we just kill all module options that change > behaviour/ABI of things in an incompatible way.) I have the commands that are able to stash the opt files in a kernel section, and then be able to extract them again so that when you build a kernel module it will use the correct options to match the kernel.. This is most useful for things like PAE which have a big impact... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 22:54:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 01CEDC61; Wed, 21 Jan 2015 22:54:33 +0000 (UTC) Received: from lauren.room52.net (lauren.room52.net [210.50.193.198]) by mx1.freebsd.org (Postfix) with ESMTP id B8377BBA; Wed, 21 Jan 2015 22:54:32 +0000 (UTC) Received: from lgwl-lstewart2.corp.netflix.com (c110-22-60-167.eburwd6.vic.optusnet.com.au [110.22.60.167]) by lauren.room52.net (Postfix) with ESMTPSA id 52D437E839; Thu, 22 Jan 2015 09:54:30 +1100 (EST) Message-ID: <54C02E0C.6060506@freebsd.org> Date: Thu, 22 Jan 2015 09:54:04 +1100 From: Lawrence Stewart User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Will Andrews Subject: Re: svn commit: r275832 - head/tools/tools/nanobsd References: <201412161759.sBGHx6ZL016021@svn.freebsd.org> <54BF5A7B.2080601@freebsd.org> <20150121152352.GB38973@sol.firepipe.net> In-Reply-To: <20150121152352.GB38973@sol.firepipe.net> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=2.4 required=5.0 tests=DNS_FROM_AHBL_RHSBL, UNPARSEABLE_RELAY autolearn=no version=3.3.2 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lauren.room52.net Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, imp@freebsd.org, Will Andrews X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 22:54:33 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 01/22/15 02:23, Will Andrews wrote: > On Wed, Jan 21, 2015 at 06:51:23PM +1100, Lawrence Stewart wrote: >> I think this change introduced a bug - I'm seeing nanobsd error >> out with the "NANO_TOOLS directory does not exist" message. >> >> The problem is that NANO_TOOLS is initialised to >> "tools/tools/nanobsd", and you changed the test in nanobsd.sh to >> *not* check for "${NANO_SRC}/${NANO_TOOLS}", which errors out >> except if the cwd is ${NANO_SRC}. >> >> You tweak NANO_TOOLS appropriately in set_defaults_and_export() >> but it's run after the dir test. There are a couple of ways to >> fix but I'll leave it to you to decide which you prefer. > > Will this work for you? > > https://people.freebsd.org/~will/patches/nanobsd.sh.diff > > This also fixes another bug where NANO_PMAKE would be modified too > early. Yes, looks good to me and fixes the issue I reported. Please commit. Cheers, Lawrence -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQJ8BAEBCgBmBQJUwC4GXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RkIyRTlBMzM5RUE3OEExNUUxREI4QTI5 QTUwQkNGQ0Y0MEQ5QjA5AAoJEJpQvPz0DZsJ40QP+gOt9Sl11w5jLOxwfEYYKNCb AjFkwhpmbAlpLMFR7OR7DvlRG6svHaO7RzK7pTbEHID3igdSx3+NRpBE+tyAe8fC dl2hSmGLcGq6007HCGOZGW181tfv9BrRRxKwEXEP7sGhByR5hyFy0JweaLr0TpGb 8CruuZ3hUjDEaTMIBPhBaMWMNsWHJy6Qszj3iE8FwFnmMLnC9yXbfKTXP3iT88wd y+Aq86Y5NT4HytcbWOaNa6mvQTsZfxnFIVppN+u3AWpgzhh76HzOgeFKK4Wj32/j eK3v/hi/aSmOaW5AKR10n2ADutjFvMLaHhMVVIOIBTJ6KQ7W38PGR4/sTqbxkAqa AUsTm53Bz9w3fjr4YhNzOtu0nwgcD1LyUJKnwoyUig97BL8Ogphj+I/4rzB150uD dnvgLoqY8Qh2ck0eciFiKZdY9k5t0cpQPNwpRl/L+wssKbdKGg4/0Ob5/fy9HVkx JrcrkmNyIMpLsN683OMNgvbIB5ow6Ya2cNmJtHVS8N8sJ7/Sd4RYPfEWIk7UUX9b lv+NQm42CyERE98TvE6felmb+iLFF79D2e0wJAis+pbDf8KlMIC3DBjdXls+BEZm 048o1sulxUuo2YMnQHF1sP6bZgeCwI9LslJGlXmLG8WA2oL5I9GJfnkwyD6rbJyx 668QEgpTzhLuAUBXGMT8 =QGdi -----END PGP SIGNATURE----- From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 23:15:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31041362; Wed, 21 Jan 2015 23:15:28 +0000 (UTC) Received: from smtp6.ore.mailhop.org (smtp6.ore.mailhop.org [54.149.35.133]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D9BEDB0; Wed, 21 Jan 2015 23:15:27 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp6.ore.mailhop.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1YE39P-0007WJ-R3; Wed, 21 Jan 2015 21:49:23 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0LLnKXb064488; Wed, 21 Jan 2015 14:49:20 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/oCugHKej9yN9Vkikf17Bn Message-ID: <1421876960.14601.390.camel@freebsd.org> Subject: Re: svn commit: r277497 - head From: Ian Lepore To: Ed Maste Date: Wed, 21 Jan 2015 14:49:20 -0700 In-Reply-To: References: <201501211904.t0LJ4u3R070278@svn.freebsd.org> <1421871614.14601.387.camel@freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 23:15:28 -0000 On Wed, 2015-01-21 at 16:45 -0500, Ed Maste wrote: > On 21 January 2015 at 15:20, Ian Lepore wrote: > > I don't think > > there's a single addr2line binary I can install that will work with > > every object on the system. > > There is, in fact - ELF Tool Chain's addr2line will work regardless of > the object's architecture. > > However, I'm happy enough to revert this change (and add a comment > about non-build use cases) if you like. Do you mean the new one you're working on? Because that doesn't seem to be true of the one installed on my 10-stable system right now. If it is true of the new one, that's a much better solution, and I can get by until it's ready for prime time, I think. -- Ian From owner-svn-src-all@FreeBSD.ORG Wed Jan 21 23:38:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C8C98C19; Wed, 21 Jan 2015 23:38:48 +0000 (UTC) Received: from mail-yk0-x22e.google.com (mail-yk0-x22e.google.com [IPv6:2607:f8b0:4002:c07::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8070C6A; Wed, 21 Jan 2015 23:38:48 +0000 (UTC) Received: by mail-yk0-f174.google.com with SMTP id 131so8517013ykp.5; Wed, 21 Jan 2015 15:38:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=8OMk8ZyDfJ5iO/5a42lN/FX2AkyFpSu+phMwURKEdEs=; b=WAsICYQVdpdartmx30WHMILlMN8OdxxEwLIBIsvbre2Vs4EV5x0OSKwaNvGK2lPXLe SIx1+zLlIArAKY9XOqeA11wbswRAC/6fVQ+E0uaML51h3AnZ3JfG906ijf1nIDqsuzKM gDi6E+rSRk/668ou69Smq8zIAR70T2vf4aUkLAurHmOee4hbN6uOr3k7GdTKJoWpM7BC tEsLV/iFMRkr253ITqTlD4emmdjjYU1UYQB8oP2N8kLtizZ3Oa7Yd6fcMVmkkSYFtSVi xuUP0iTmV48fkErLsLCSpHCGYVvzHJGLDujSq2CeluQRP22oW00MHkHTT4oUGeOyTA1I BJcw== MIME-Version: 1.0 X-Received: by 10.170.44.4 with SMTP id 4mr5972319ykm.101.1421883527531; Wed, 21 Jan 2015 15:38:47 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Wed, 21 Jan 2015 15:38:47 -0800 (PST) In-Reply-To: References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> Date: Wed, 21 Jan 2015 15:38:47 -0800 X-Google-Sender-Auth: vW1M_N2egVIk1Uym597yF86LjyU Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 Cc: Hans Petter Selasky , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2015 23:38:48 -0000 > They originally found that things were spinning for way too long. > > Hans found something similar and determined/concluded that the > migration code in callouts was racy-by-design and dramatically > simplified it and also put very hard constraints on what is a valid > situation to support migrating from one callwheel to another. Now we > have fallout which we can either address or back out until the callout > stuff is again reviewed/fixed. > > I don't think it's as alchemic as is being promoted. Let's not get drawn into semantic debates. To me alchemy implies voodoo debugging, whereas this is, in part, disabling functionality that exposes races - which is more like disabling preemption or fine grained locking. Normally I would advocate backing this out on the basis of precedence. That is to say, back it out so that developers will get it right the first time. However, it appears that hps@ and some others don't understand what was done wrong. So I'm going to state some basic premises and then the implied basic guidelines required of a commit that were not met. If these guidelines are violated by a change in the future I will agitate for a rapid back out. Premises: A) A performance regression is a bug every bit as much as a locking race. Stability OR performance (where we are talking about _current_ performance) is a false dichotomy. - This means that a change that fixes a bug by introducing a substantial performance regression does not constitute a fix. B) Existing behavior and performance characteristics should not be adversely changed unless there is widespread consensus. - Sometimes it is necessary to "break" a KPI but that should not be discovered by svn or scanning back through the mailing lists. Guidelines: A) Performance should not measurably regress. B) If a KPI changes behavior e.g. callout_reset_on being crippled, all clients need to be updated so that they maintain their current behavior by the committer changing the KPI. The client code maintainers aren't responsible for reacting to these types of changes. That is OK for marginal architectures like sun4v or pc98. C) If there is a non-zero possibility that these changes break the client code, committers who have touched that code in the last few years should be notified. HPS: Your change failed to meet these guidelines. Some of us are upset because these guidelines are fairly fundamental for the on-going viability of FreeBSD. Due to linguistic / time zone / cultural differences these expectations have not been adequately communicated to you. You are not in the USB sandbox where others need for your support outweighs the inconvenience of random breakage. It sounds like you are making progress towards updating the concerns that have been voiced. If kib's observations are in fact comprehensive then adding a callout_init_cpu function and updating all clients so that their callouts continue to be scheduled on a CPU other than the BSP will suffice and we can all move on. Thanks in advance. -K From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 00:02:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 764E71DC for ; Thu, 22 Jan 2015 00:02:23 +0000 (UTC) Received: from mail-pa0-f41.google.com (mail-pa0-f41.google.com [209.85.220.41]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 371B9363 for ; Thu, 22 Jan 2015 00:02:23 +0000 (UTC) Received: by mail-pa0-f41.google.com with SMTP id kq14so4377742pab.0 for ; Wed, 21 Jan 2015 16:02:17 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=pj+XAipv+1zDq0JT5C57Pi51xsjzZwF2Z0ubn1i6TkM=; b=WXBAJd4rdx+Q6I5rReHajhRRttOpus5LMJNCBOnEhCjroYD4EgaKqPRchD9puxlE34 5iONJJcTdZf0bDi/WqOUHg3wYKbskh/zWx9NKwCfNRgpnG8aXz6ArugRfrfX0dW9c0Oe 0CV0Y9BalxElOvlcx4WnSVjrEB1SN28hFP7XzTdhxOxfm1XZpB69OeIVrZuOKyV/VVnf 2/eMkk7nNx6WCZLb3WXbdVO9YbOyP8qLVWa67eQHHCqK9jtS4I9NEvzyCKfmzoDCDihp d52Y0+E7KkM2rHqS5P+oo8HTXZJ/pIRKwrSAh7JS+aHoX9iOF5Te5CzM9TVN11PFF/9W dMIA== X-Gm-Message-State: ALoCoQmup5djG9WyuoWKRQOSWCmn42YggLgjo0+JqW02bhP/uE+yC5CT8wCIoz4AXqfgBhW9RSNw X-Received: by 10.70.46.69 with SMTP id t5mr32605830pdm.167.1421884937743; Wed, 21 Jan 2015 16:02:17 -0800 (PST) Received: from bsdimp.corp.netflix.com ([69.53.237.72]) by mx.google.com with ESMTPSA id zk9sm7410858pac.1.2015.01.21.16.02.16 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 16:02:17 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Warner Losh In-Reply-To: Date: Wed, 21 Jan 2015 17:02:15 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> To: "K. Macy" X-Mailer: Apple Mail (2.1993) X-Mailman-Approved-At: Thu, 22 Jan 2015 00:04:44 +0000 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 00:02:23 -0000 > On Jan 21, 2015, at 4:38 PM, K. Macy wrote: >=20 >> They originally found that things were spinning for way too long. >>=20 >> Hans found something similar and determined/concluded that the >> migration code in callouts was racy-by-design and dramatically >> simplified it and also put very hard constraints on what is a valid >> situation to support migrating from one callwheel to another. Now we >> have fallout which we can either address or back out until the = callout >> stuff is again reviewed/fixed. >>=20 >> I don't think it's as alchemic as is being promoted. >=20 >=20 > Let's not get drawn into semantic debates. To me alchemy implies > voodoo debugging, whereas this is, in part, disabling functionality > that exposes races - which is more like disabling preemption or fine > grained locking. >=20 >=20 > Normally I would advocate backing this out on the basis of precedence. > That is to say, back it out so that developers will get it right the > first time. However, it appears that hps@ and some others don't > understand what was done wrong. So I'm going to state some basic > premises and then the implied basic guidelines required of a commit > that were not met. If these guidelines are violated by a change in the > future I will agitate for a rapid back out. >=20 > Premises: > A) A performance regression is a bug every bit as much as a locking > race. Stability OR performance (where we are talking about _current_ > performance) is a false dichotomy. > - This means that a change that fixes a bug by introducing a > substantial performance regression does not constitute a fix. > B) Existing behavior and performance characteristics should not be > adversely changed unless there is widespread consensus. > - Sometimes it is necessary to "break" a KPI but that should not be > discovered by svn or scanning back through the mailing lists. >=20 > Guidelines: > A) Performance should not measurably regress. > B) If a KPI changes behavior e.g. callout_reset_on being crippled, all > clients need to be updated so that they maintain their current > behavior by the committer changing the KPI. The client code > maintainers aren't responsible for reacting to these types of changes. > That is OK for marginal architectures like sun4v or pc98. > C) If there is a non-zero possibility that these changes break the > client code, committers who have touched that code in the last few > years should be notified. >=20 >=20 >=20 > HPS: Your change failed to meet these guidelines. Some of us are upset > because these guidelines are fairly fundamental for the on-going > viability of FreeBSD. Due to linguistic / time zone / cultural > differences these expectations have not been adequately communicated > to you. You are not in the USB sandbox where others need for your > support outweighs the inconvenience of random breakage. >=20 > It sounds like you are making progress towards updating the concerns > that have been voiced. If kib's observations are in fact comprehensive > then adding a callout_init_cpu function and updating all clients so > that their callouts continue to be scheduled on a CPU other than the > BSP will suffice and we can all move on. Is there some reason that we can=E2=80=99t back things out, break things = down into smaller pieces and have everything pass through phabric with a wide ranging review? Given the fundamental nature of these changes, they really need better review and doing it after the fact seems to be to be too risky. I=E2=80=99m not debating that this =E2=80=9Cfixes=E2=80=9D = some issues, but given the performance regression, it sure seems like we may need a different solution to be implemented and hashing that out in a branch might be the best approach. Warner= From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 00:07:58 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 407194A1; Thu, 22 Jan 2015 00:07:58 +0000 (UTC) Received: from mail-yh0-x22d.google.com (mail-yh0-x22d.google.com [IPv6:2607:f8b0:4002:c01::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E356C3BC; Thu, 22 Jan 2015 00:07:57 +0000 (UTC) Received: by mail-yh0-f45.google.com with SMTP id f73so2901034yha.4; Wed, 21 Jan 2015 16:07:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=fukvA1q/YeADEtLNqJTfgyJEmkIYtYCZ4eQ6fLn0/ik=; b=apKb45UF5fpyZIfSIUinZQB62x9qTY8Yov+ssvi3IhI+ztrGkYB9cjwqipafZI78Yc K8/JoIJVEHTZ2t0s0vB+DI8UnjswiybLPT+QQtbP0M6ctRYqs5KESe9KFq2R/zm+hzer TMJYLQqr39sZ9tYHZNFl1Y8KW8/GAOBhVS6kKEthJXy6MclO6IjIN4N3MHSqptiGF55Y o2nc30BSYfmjTI3OU9jfkBzK1OH0us/bSAFoLC10uYMXOITfQ/6VSEFPuHuxEMcoZoR+ jMKeh2la3THMSLL0BoF7CVuaUO6WD5YluwoPbxY3dyVpFtJ1ITrn3B6BFMTXpxEipZnp 7Daw== MIME-Version: 1.0 X-Received: by 10.236.89.172 with SMTP id c32mr25542433yhf.180.1421885277211; Wed, 21 Jan 2015 16:07:57 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Wed, 21 Jan 2015 16:07:56 -0800 (PST) In-Reply-To: References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> Date: Wed, 21 Jan 2015 16:07:56 -0800 X-Google-Sender-Auth: 1mSp0xxZeT3LeBdmW3KqM8Uch9o Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Warner Losh Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Thu, 22 Jan 2015 00:11:16 +0000 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 00:07:58 -0000 >> HPS: Your change failed to meet these guidelines. Some of us are upset >> because these guidelines are fairly fundamental for the on-going >> viability of FreeBSD. Due to linguistic / time zone / cultural >> differences these expectations have not been adequately communicated >> to you. You are not in the USB sandbox where others need for your >> support outweighs the inconvenience of random breakage. >> >> It sounds like you are making progress towards updating the concerns >> that have been voiced. If kib's observations are in fact comprehensive >> then adding a callout_init_cpu function and updating all clients so >> that their callouts continue to be scheduled on a CPU other than the >> BSP will suffice and we can all move on. > > Is there some reason that we can=E2=80=99t back things out, break things = down into > smaller pieces and have everything pass through phabric with a wide > ranging review? Given the fundamental nature of these changes, they > really need better review and doing it after the fact seems to be to be > too risky. I=E2=80=99m not debating that this =E2=80=9Cfixes=E2=80=9D som= e issues, but given the > performance regression, it sure seems like we may need a different > solution to be implemented and hashing that out in a branch might be > the best approach. Thank you. A more incremental approach would be appreciated by many of us. To avoid the bystander effect we can permit explicit timeouts for review-to-commit (72 hours?) so that we don't collectively end up sandbagging him. -K From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 00:10:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 957C85E3; Thu, 22 Jan 2015 00:10:45 +0000 (UTC) Received: from mail-ig0-x236.google.com (mail-ig0-x236.google.com [IPv6:2607:f8b0:4001:c05::236]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E4F0649; Thu, 22 Jan 2015 00:10:45 +0000 (UTC) Received: by mail-ig0-f182.google.com with SMTP id r10so3802002igi.3; Wed, 21 Jan 2015 16:10:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=K/kzEMreSDOBwM0WzGgFAfuFbVTfwTC8BJekt/tkpYc=; b=STNefD+hDhoOh8hvxcfBq1PycvKj9AkwkUCLwb3hkdGzNF7nD8JIiatw/GZ7iq5DSm sgKoYfH9aJLhrdSzKAgimAu7AGqV/rsurkwgl0PICdi+DQqBMzCFSRoMTbflz/a9CaTD gCV05d+ZZv2cAfh628eu/lEvR+awfKuMeP3BVSOs7Q1uLyriafG4zVekaXpb76u7j2cP sMwAJ5zRtuksPtg0389c9dNy61qWB/QksEyjN3mOjz8qU7fEiZycXTT4hRXkZG+xaQ/1 yggkeS+B53rhEsiePjpmZaBMqeZdR9ljfGRMVApB0+xqJNBp141O2Sce73dq42NsrU39 zssA== MIME-Version: 1.0 X-Received: by 10.50.93.70 with SMTP id cs6mr8352863igb.6.1421885444790; Wed, 21 Jan 2015 16:10:44 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Wed, 21 Jan 2015 16:10:44 -0800 (PST) In-Reply-To: References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> Date: Wed, 21 Jan 2015 16:10:44 -0800 X-Google-Sender-Auth: 7huVFJe-f74X7tadH_R4yALEr8k Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Adrian Chadd To: "K. Macy" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Mailman-Approved-At: Thu, 22 Jan 2015 00:21:14 +0000 Cc: Hans Petter Selasky , "src-committers@freebsd.org" , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 00:10:45 -0000 On 21 January 2015 at 16:07, K. Macy wrote: >>> HPS: Your change failed to meet these guidelines. Some of us are upset >>> because these guidelines are fairly fundamental for the on-going >>> viability of FreeBSD. Due to linguistic / time zone / cultural >>> differences these expectations have not been adequately communicated >>> to you. You are not in the USB sandbox where others need for your >>> support outweighs the inconvenience of random breakage. >>> >>> It sounds like you are making progress towards updating the concerns >>> that have been voiced. If kib's observations are in fact comprehensive >>> then adding a callout_init_cpu function and updating all clients so >>> that their callouts continue to be scheduled on a CPU other than the >>> BSP will suffice and we can all move on. >> >> Is there some reason that we can=E2=80=99t back things out, break things= down into >> smaller pieces and have everything pass through phabric with a wide >> ranging review? Given the fundamental nature of these changes, they >> really need better review and doing it after the fact seems to be to be >> too risky. I=E2=80=99m not debating that this =E2=80=9Cfixes=E2=80=9D so= me issues, but given the >> performance regression, it sure seems like we may need a different >> solution to be implemented and hashing that out in a branch might be >> the best approach. > > Thank you. A more incremental approach would be appreciated by many of > us. To avoid the bystander effect we can permit explicit timeouts for > review-to-commit (72 hours?) so that we don't collectively end up > sandbagging him. I'm +1 for this. -a From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 00:35:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EF94AD6; Thu, 22 Jan 2015 00:35:26 +0000 (UTC) Received: from mail-qa0-x233.google.com (mail-qa0-x233.google.com [IPv6:2607:f8b0:400d:c00::233]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 043D8894; Thu, 22 Jan 2015 00:35:26 +0000 (UTC) Received: by mail-qa0-f51.google.com with SMTP id f12so34825194qad.10; Wed, 21 Jan 2015 16:35:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=MhT0VQiX6AD1Zg/8K2EiPaJg6r4yZOd0Gsb5sw3Ana8=; b=hBuyfWcqrNdI+8+XL69qTdYZgRmcFZeLD1kPx/CJsHRT8Xf0ySj6iGqXMDCOwjCgEY jxdCtzG0m7uamLlYunyPa4ks+cUzoCSLg7A8ddFJTzO6FLRG+3VTqlVJCpoixN29LUn0 pE8Nts8uReh6TsjOmJPZvhIYm1h1UCU0eqrehMh6Tl6OAMkTqi4P8w3aJzSsZC7Fr2Eg Cfck4hzeEBYkTwf1r7vy5Sq/0NthFWlXINyBJtnAumeSpdisYOJUcg07+3XdgTMyv/8K k7sziZKFuPsPzeVUlKAGdVwMIii126TL2AuxxqRQfWXE5oI0fxWX1mECj2iMHL0KpDFD Tang== X-Received: by 10.224.65.134 with SMTP id j6mr55807366qai.90.1421886925190; Wed, 21 Jan 2015 16:35:25 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.140.39.209 with HTTP; Wed, 21 Jan 2015 16:35:04 -0800 (PST) In-Reply-To: <1421876960.14601.390.camel@freebsd.org> References: <201501211904.t0LJ4u3R070278@svn.freebsd.org> <1421871614.14601.387.camel@freebsd.org> <1421876960.14601.390.camel@freebsd.org> From: Ed Maste Date: Wed, 21 Jan 2015 19:35:04 -0500 X-Google-Sender-Auth: fSHKJYlV9Apg8E2slmNbQZkL6Ms Message-ID: Subject: Re: svn commit: r277497 - head To: Ian Lepore Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 00:35:26 -0000 On 21 January 2015 at 16:49, Ian Lepore wrote: > On Wed, 2015-01-21 at 16:45 -0500, Ed Maste wrote: >> On 21 January 2015 at 15:20, Ian Lepore wrote: >> > I don't think >> > there's a single addr2line binary I can install that will work with >> > every object on the system. >> >> There is, in fact - ELF Tool Chain's addr2line will work regardless of >> the object's architecture. >> >> However, I'm happy enough to revert this change (and add a comment >> about non-build use cases) if you like. > > Do you mean the new one you're working on? Because that doesn't seem to > be true of the one installed on my 10-stable system right now. If it is > true of the new one, that's a much better solution, and I can get by > until it's ready for prime time, I think. Yes, the new one I've been working on. It's now the default in HEAD (along with nm, strings, size, etc.). Bringing this to stable/10 would be tricky because it depends on the new libdwarf in 11 that's not backwards compatible. For that reason perhaps I ought to just leave them in the cross-tools stage, until we can assume developers are generally cross building from an 11.x host. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 00:43:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AADDEF62 for ; Thu, 22 Jan 2015 00:43:39 +0000 (UTC) Received: from mail-pa0-f46.google.com (mail-pa0-f46.google.com [209.85.220.46]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 78ECF97D for ; Thu, 22 Jan 2015 00:43:39 +0000 (UTC) Received: by mail-pa0-f46.google.com with SMTP id lf10so56361198pab.5 for ; Wed, 21 Jan 2015 16:43:33 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=bI0RwZXnBwP4gmat1mzhpDA7KxBSoogwVmkmMPyrvys=; b=KQc1mwi+NH4s3coY0Bb+0Bmq1tutPuN4Qu0Sr3DA3IRnze1ECWQZG7LJZrInmSjf6J j8GKdpFT/AayTv/nKh+FTdL5Y4fxvwo745vuCPQ7q/b31o0yy03EqWAL4N7YAS4lnGmI 9kHygJMii0nx1FOfFzPAW84UpUDQcKglJj0P+mMLGQPIsQuJrvvKeW52PcwQrq3A7avT r9h0lyKc5+p+jAJ/mRoDbDPtb/wvzKbC+SVi1z7JhCHdiWfIe9RiuNL3+xYREYauhE9W e7p1qc+EZa47i5uBFSZTGL506wb/JCglaoiHyNbDrf734PUvCZOYcYfyO4/z2/wyTqfv Hk+w== X-Gm-Message-State: ALoCoQki/C15DMbe7Xf4wvqYIt+cdfnUq/pBVh1Ex/gRVyZF785IPXMBT2dcK5n2kINmHxftf/k5 X-Received: by 10.67.10.227 with SMTP id ed3mr66398179pad.116.1421887413364; Wed, 21 Jan 2015 16:43:33 -0800 (PST) Received: from bsdimp.corp.netflix.com ([69.53.237.72]) by mx.google.com with ESMTPSA id ak5sm7369233pad.44.2015.01.21.16.43.32 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 16:43:32 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277497 - head From: Warner Losh In-Reply-To: Date: Wed, 21 Jan 2015 17:43:31 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3F018B96-1D7A-40BA-B592-C7DB4505F807@bsdimp.com> References: <201501211904.t0LJ4u3R070278@svn.freebsd.org> <1421871614.14601.387.camel@freebsd.org> <1421876960.14601.390.camel@freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Ian Lepore X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 00:43:39 -0000 > On Jan 21, 2015, at 5:35 PM, Ed Maste wrote: >=20 > On 21 January 2015 at 16:49, Ian Lepore wrote: >> On Wed, 2015-01-21 at 16:45 -0500, Ed Maste wrote: >>> On 21 January 2015 at 15:20, Ian Lepore wrote: >>>> I don't think >>>> there's a single addr2line binary I can install that will work with >>>> every object on the system. >>>=20 >>> There is, in fact - ELF Tool Chain's addr2line will work regardless = of >>> the object's architecture. >>>=20 >>> However, I'm happy enough to revert this change (and add a comment >>> about non-build use cases) if you like. >>=20 >> Do you mean the new one you're working on? Because that doesn't seem = to >> be true of the one installed on my 10-stable system right now. If it = is >> true of the new one, that's a much better solution, and I can get by >> until it's ready for prime time, I think. >=20 > Yes, the new one I've been working on. It's now the default in HEAD > (along with nm, strings, size, etc.). >=20 > Bringing this to stable/10 would be tricky because it depends on the > new libdwarf in 11 that's not backwards compatible. For that reason > perhaps I ought to just leave them in the cross-tools stage, until we > can assume developers are generally cross building from an 11.x host. There=E2=80=99s little harm in leaving it in, and some harm in taking it = out=E2=80=A6 The time to build this stuff is tiny... Warner From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 00:52:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD5E625C; Thu, 22 Jan 2015 00:52:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98F26A65; Thu, 22 Jan 2015 00:52:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M0qZ7r040500; Thu, 22 Jan 2015 00:52:35 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M0qZMA040499; Thu, 22 Jan 2015 00:52:35 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501220052.t0M0qZMA040499@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Thu, 22 Jan 2015 00:52:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277518 - head/tools/tools/nanobsd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 00:52:35 -0000 Author: will Date: Thu Jan 22 00:52:34 2015 New Revision: 277518 URL: https://svnweb.freebsd.org/changeset/base/277518 Log: Enable nanobsd.sh to be executed when pwd != NANO_SRC. While here, fix a bug in which NANO_PMAKE would not be appended at the appropriate time. Simply move both checks to after the call to set_defaults_and_export(). Tested by: lstewart Sponsored by: Spectra Logic Modified: head/tools/tools/nanobsd/nanobsd.sh (contents, props changed) Modified: head/tools/tools/nanobsd/nanobsd.sh ============================================================================== --- head/tools/tools/nanobsd/nanobsd.sh Wed Jan 21 21:49:03 2015 (r277517) +++ head/tools/tools/nanobsd/nanobsd.sh Thu Jan 22 00:52:34 2015 (r277518) @@ -121,6 +121,13 @@ if [ $# -gt 0 ] ; then usage fi +####################################################################### +# And then it is as simple as that... + +# File descriptor 3 is used for logging output, see pprint +exec 3>&1 +set_defaults_and_export + if [ ! -d "${NANO_TOOLS}" ]; then echo "NANO_TOOLS directory does not exist" 1>&2 exit 1 @@ -130,13 +137,6 @@ if ! $do_clean; then NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN" fi -####################################################################### -# And then it is as simple as that... - -# File descriptor 3 is used for logging output, see pprint -exec 3>&1 -set_defaults_and_export - pprint 1 "NanoBSD image ${NANO_NAME} build starting" if $do_world ; then From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 01:04:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E658A472 for ; Thu, 22 Jan 2015 01:04:59 +0000 (UTC) Received: from mail-ig0-f180.google.com (mail-ig0-f180.google.com [209.85.213.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A8DC9B6E for ; Thu, 22 Jan 2015 01:04:59 +0000 (UTC) Received: by mail-ig0-f180.google.com with SMTP id b16so26873igk.1 for ; Wed, 21 Jan 2015 17:04:51 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=OgkRidL8/wFmfsLreu2iaXGK4okeYK7KMA3lxEiKBhc=; b=C9fyOZ5tTcNNR7IKg/IG7VHCOJkWpIMukBfet1HL1Mt7j9J87FdKtpBJ85EFz6Z0A/ 6I6gPej9c4lSBp7cpgUbggkBwqIR71bkjO9FXni+XvFC7GUGA3VFfaldn63QmuO5uLX8 QtVCJoucxFs/5JSp/btFK4jhYyITpkyZyJhGdn/2M3DwSDMHhL4o6ambmt3Sxdrcpb2d ZCKfbkEv3ZR0RP93rtZs9SaahPwS7CUAh9xTJyYCScnJC/1jOOLzdwci0KjzqKeJ71Ch MYpvtwkxWzCvR09YNXDEi2SSYYDuM7h3P9pkZZY2s5+yqR61ErY6kUnULHj8+pjKP+ml yOZQ== X-Gm-Message-State: ALoCoQnfyHKr6x5tHNyp89lk2Lzr8Xzu8niYdYfcGzzjMgjYb7wQs0hBFPclyCDb/CGcEn/PN/fq X-Received: by 10.42.236.81 with SMTP id kj17mr3545657icb.60.1421888691848; Wed, 21 Jan 2015 17:04:51 -0800 (PST) Received: from sol.firepipe.net (c-50-183-92-30.hsd1.co.comcast.net. [50.183.92.30]) by mx.google.com with ESMTPSA id ig15sm956819igb.10.2015.01.21.17.04.50 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 21 Jan 2015 17:04:51 -0800 (PST) Date: Wed, 21 Jan 2015 18:04:49 -0700 From: Will Andrews To: Lawrence Stewart Subject: Re: svn commit: r275832 - head/tools/tools/nanobsd Message-ID: <20150122010448.GA40031@sol.firepipe.net> References: <201412161759.sBGHx6ZL016021@svn.freebsd.org> <54BF5A7B.2080601@freebsd.org> <20150121152352.GB38973@sol.firepipe.net> <54C02E0C.6060506@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="zYM0uCDKw75PZbzx" Content-Disposition: inline In-Reply-To: <54C02E0C.6060506@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, imp@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 01:05:00 -0000 --zYM0uCDKw75PZbzx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 22, 2015 at 09:54:04AM +1100, Lawrence Stewart wrote: > Yes, looks good to me and fixes the issue I reported. Please commit. Done in r277518. Thanks for the quick test. --=20 wca --zYM0uCDKw75PZbzx Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTATK8ACgkQF47idPgWcsVjGQCfUwrX4jmgOV97RXNDw2KnAGcl CLcAn1kv4KCK90aKYGObyzoNXOEfxHRf =JxYV -----END PGP SIGNATURE----- --zYM0uCDKw75PZbzx-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 01:05:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8895477 for ; Thu, 22 Jan 2015 01:05:00 +0000 (UTC) Received: from mail-pa0-f45.google.com (mail-pa0-f45.google.com [209.85.220.45]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7C58EB72 for ; Thu, 22 Jan 2015 01:05:00 +0000 (UTC) Received: by mail-pa0-f45.google.com with SMTP id lf10so56498976pab.4 for ; Wed, 21 Jan 2015 17:04:59 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=hwPEmUo/aCZCuNxemfa4vVsAHwT3NpS1ZR44jRXBNm4=; b=Wkqa+NuIrUyj/xAcYqrKgivF80J004Lezo/p0/RXaF0KLrdrr28PoH36kn1ZMeAn2w dcsSQbv3b7e+LxVUhpLK8CPrsuEe9KXrXCjNABMSHN5Z98hHSr04z5JpMlEenI2wUtaP JwDcs9cW0P0Uig9SQ0s9MRkvLx4V0Gsj/St0ZFzxGk+3Ipc92pVIVmbnf8HdUFiQ/Ut9 hqKSSSgfzJDsg4ej6/WKvypKbRC05h7K63O/yF1VUbO/wokqiNhiVMEXRIF92KSYcorC j604bb+dxbsgQDJsU6fudiVeNQQO9FPCZdqBCcyedOQyLuhE7ingavyg7u6l//KqAcHO w9pQ== X-Gm-Message-State: ALoCoQm4jZ4GT11vJwgqBkCYwB5wnYXHZL4xxChGovO8AHZ7zIPDYoXi7cnpduUJWnwPYXJvGQjd X-Received: by 10.66.163.228 with SMTP id yl4mr41048675pab.51.1421888699651; Wed, 21 Jan 2015 17:04:59 -0800 (PST) Received: from bsdimp.corp.netflix.com ([69.53.237.72]) by mx.google.com with ESMTPSA id kg12sm7086883pbb.44.2015.01.21.17.04.58 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 17:04:59 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277421 - head/sys/powerpc/powerpc From: Warner Losh In-Reply-To: <20150121075410.GM42409@kib.kiev.ua> Date: Wed, 21 Jan 2015 18:04:57 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <81FEE3A9-C522-48A3-9292-893685C640AF@bsdimp.com> References: <201501201621.t0KGLx26096724@svn.freebsd.org> <20150120191438.GL42409@kib.kiev.ua> <54BF240C.2090107@freebsd.org> <20150121075410.GM42409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org, Nathan Whitehorn X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 01:05:00 -0000 > On Jan 21, 2015, at 12:54 AM, Konstantin Belousov = wrote: >=20 > On Tue, Jan 20, 2015 at 07:59:08PM -0800, Nathan Whitehorn wrote: >>=20 >> On 01/20/15 11:14, Konstantin Belousov wrote: >>> On Tue, Jan 20, 2015 at 04:21:59PM +0000, Nathan Whitehorn wrote: >>>> Author: nwhitehorn >>>> Date: Tue Jan 20 16:21:59 2015 >>>> New Revision: 277421 >>>> URL: https://svnweb.freebsd.org/changeset/base/277421 >>>>=20 >>>> Log: >>>> There does not seem to be any reason to acquire GIANT here. = Follow amd64 >>>> in removing it. >>>>=20 >>>> MFC after: 1 month >>>>=20 >>>> Modified: >>>> head/sys/powerpc/powerpc/mem.c >>>>=20 >>>> Modified: head/sys/powerpc/powerpc/mem.c >>>> = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>>> --- head/sys/powerpc/powerpc/mem.c Tue Jan 20 15:45:09 2015 = (r277420) >>>> +++ head/sys/powerpc/powerpc/mem.c Tue Jan 20 16:21:59 2015 = (r277421) >>>> @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, >>>> cnt =3D 0; >>>> error =3D 0; >>>>=20 >>>> - GIANT_REQUIRED; >>>> - >>> This is not an acquisition, to be pedantic. Really, it is cdevsw = which >>> has D_NEEDGIANT flag which acquires Giant. After architectures get >>> rid of GIANT_REQUIRED, flag can be removed. >>>=20 >> Just so I understand, you are not objecting to this commit, right? > Absolutely not, this is the right thing to do. >=20 >> Just=20 >> pointing out that (a) my commit message was wrong and that (b) once = all=20 >> architectures make this change (presumably more involved) we can get = rid=20 >> of the D_NEEDGIANT in /sys/dev/mem/memdev.c? > Exactly. There doesn=E2=80=99t seem to be a reason for i386 either. Was just = looking at the code today on the plane for unrelated reasons. Warner From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 01:23:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 004309F3; Thu, 22 Jan 2015 01:23:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF214D3E; Thu, 22 Jan 2015 01:23:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M1NIQO054680; Thu, 22 Jan 2015 01:23:18 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M1NHlC054673; Thu, 22 Jan 2015 01:23:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501220123.t0M1NHlC054673@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Thu, 22 Jan 2015 01:23:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277519 - in head/sys: net netpfil/pf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 01:23:19 -0000 Author: glebius Date: Thu Jan 22 01:23:16 2015 New Revision: 277519 URL: https://svnweb.freebsd.org/changeset/base/277519 Log: Back out r276841, r276756, r276747, r276746. The change in r276747 is very very questionable, since it makes vimages more dependent on each other. But the reason for the backout is that it screwed up shutting down the pf purge threads, and now kernel immedially panics on pf module unload. Although module unloading isn't an advertised feature of pf, it is very important for development process. I'd like to not backout r276746, since in general it is good. But since it has introduced numerous build breakages, that later were addressed in r276841, r276756, r276747, I need to back it out as well. Better replay it in clean fashion from scratch. Modified: head/sys/net/pfvar.h head/sys/netpfil/pf/pf.c head/sys/netpfil/pf/pf_if.c head/sys/netpfil/pf/pf_ioctl.c head/sys/netpfil/pf/pf_norm.c head/sys/netpfil/pf/pf_table.c Modified: head/sys/net/pfvar.h ============================================================================== --- head/sys/net/pfvar.h Thu Jan 22 00:52:34 2015 (r277518) +++ head/sys/net/pfvar.h Thu Jan 22 01:23:16 2015 (r277519) @@ -829,6 +829,7 @@ typedef int pflog_packet_t(struct pfi_ki struct pf_ruleset *, struct pf_pdesc *, int); extern pflog_packet_t *pflog_packet_ptr; +#define V_pf_end_threads VNET(pf_end_threads) #endif /* _KERNEL */ #define PFSYNC_FLAG_SRCNODE 0x04 @@ -1494,7 +1495,7 @@ VNET_DECLARE(struct pf_altqqueue *, pf_ VNET_DECLARE(struct pf_rulequeue, pf_unlinked_rules); #define V_pf_unlinked_rules VNET(pf_unlinked_rules) -void pf_vnet_initialize(void); +void pf_initialize(void); void pf_mtag_initialize(void); void pf_mtag_cleanup(void); void pf_cleanup(void); @@ -1586,7 +1587,7 @@ int pf_match_addr_range(struct pf_addr * struct pf_addr *, sa_family_t); int pf_match_port(u_int8_t, u_int16_t, u_int16_t, u_int16_t); -void pf_vnet_normalize_init(void); +void pf_normalize_init(void); void pf_normalize_cleanup(void); int pf_normalize_ip(struct mbuf **, int, struct pfi_kif *, u_short *, struct pf_pdesc *); @@ -1648,7 +1649,7 @@ MALLOC_DECLARE(PFI_MTYPE); VNET_DECLARE(struct pfi_kif *, pfi_all); #define V_pfi_all VNET(pfi_all) -void pfi_vnet_initialize(void); +void pfi_initialize(void); void pfi_cleanup(void); void pfi_kif_ref(struct pfi_kif *); void pfi_kif_unref(struct pfi_kif *); Modified: head/sys/netpfil/pf/pf.c ============================================================================== --- head/sys/netpfil/pf/pf.c Thu Jan 22 00:52:34 2015 (r277518) +++ head/sys/netpfil/pf/pf.c Thu Jan 22 01:23:16 2015 (r277519) @@ -151,7 +151,6 @@ static VNET_DEFINE(struct pf_send_head, #define V_pf_sendqueue VNET(pf_sendqueue) static struct mtx pf_sendqueue_mtx; -MTX_SYSINIT(pf_sendqueue_mtx, &pf_sendqueue_mtx, "pf send queue", MTX_DEF); #define PF_SENDQ_LOCK() mtx_lock(&pf_sendqueue_mtx) #define PF_SENDQ_UNLOCK() mtx_unlock(&pf_sendqueue_mtx) @@ -173,15 +172,11 @@ static VNET_DEFINE(struct task, pf_overl #define V_pf_overloadtask VNET(pf_overloadtask) static struct mtx pf_overloadqueue_mtx; -MTX_SYSINIT(pf_overloadqueue_mtx, &pf_overloadqueue_mtx, - "pf overload/flush queue", MTX_DEF); #define PF_OVERLOADQ_LOCK() mtx_lock(&pf_overloadqueue_mtx) #define PF_OVERLOADQ_UNLOCK() mtx_unlock(&pf_overloadqueue_mtx) VNET_DEFINE(struct pf_rulequeue, pf_unlinked_rules); struct mtx pf_unlnkdrules_mtx; -MTX_SYSINIT(pf_unlnkdrules_mtx, &pf_unlnkdrules_mtx, "pf unlinked rules", - MTX_DEF); static VNET_DEFINE(uma_zone_t, pf_sources_z); #define V_pf_sources_z VNET(pf_sources_z) @@ -295,6 +290,8 @@ static void pf_route6(struct mbuf **, int in4_cksum(struct mbuf *m, u_int8_t nxt, int off, int len); +VNET_DECLARE(int, pf_end_threads); + VNET_DEFINE(struct pf_limit, pf_limits[PF_LIMIT_MAX]); #define PACKET_LOOPED(pd) ((pd)->pf_mtag && \ @@ -731,7 +728,7 @@ pf_mtag_initialize() /* Per-vnet data storage structures initialization. */ void -pf_vnet_initialize() +pf_initialize() { struct pf_keyhash *kh; struct pf_idhash *ih; @@ -791,9 +788,13 @@ pf_vnet_initialize() STAILQ_INIT(&V_pf_sendqueue); SLIST_INIT(&V_pf_overloadqueue); TASK_INIT(&V_pf_overloadtask, 0, pf_overload_task, curvnet); + mtx_init(&pf_sendqueue_mtx, "pf send queue", NULL, MTX_DEF); + mtx_init(&pf_overloadqueue_mtx, "pf overload/flush queue", NULL, + MTX_DEF); /* Unlinked, but may be referenced rules. */ TAILQ_INIT(&V_pf_unlinked_rules); + mtx_init(&pf_unlnkdrules_mtx, "pf unlinked rules", NULL, MTX_DEF); } void @@ -836,6 +837,10 @@ pf_cleanup() free(pfse, M_PFTEMP); } + mtx_destroy(&pf_sendqueue_mtx); + mtx_destroy(&pf_overloadqueue_mtx); + mtx_destroy(&pf_unlnkdrules_mtx); + uma_zdestroy(V_pf_sources_z); uma_zdestroy(V_pf_state_z); uma_zdestroy(V_pf_state_key_z); @@ -1381,37 +1386,71 @@ pf_intr(void *v) } void -pf_purge_thread(void *v __unused) +pf_purge_thread(void *v) { u_int idx = 0; - VNET_ITERATOR_DECL(vnet_iter); + + CURVNET_SET((struct vnet *)v); for (;;) { - tsleep(pf_purge_thread, PWAIT, "pftm", hz / 10); - VNET_LIST_RLOCK(); - VNET_FOREACH(vnet_iter) { - CURVNET_SET(vnet_iter); - /* Process 1/interval fraction of the state table every run. */ - idx = pf_purge_expired_states(idx, pf_hashmask / - (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); + PF_RULES_RLOCK(); + rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftm", hz / 10); - /* Purge other expired types every PFTM_INTERVAL seconds. */ - if (idx == 0) { - /* - * Order is important: - * - states and src nodes reference rules - * - states and rules reference kifs - */ - pf_purge_expired_fragments(); - pf_purge_expired_src_nodes(); - pf_purge_unlinked_rules(); - pfi_kif_purge(); - } - CURVNET_RESTORE(); + if (V_pf_end_threads) { + /* + * To cleanse up all kifs and rules we need + * two runs: first one clears reference flags, + * then pf_purge_expired_states() doesn't + * raise them, and then second run frees. + */ + PF_RULES_RUNLOCK(); + pf_purge_unlinked_rules(); + pfi_kif_purge(); + + /* + * Now purge everything. + */ + pf_purge_expired_states(0, pf_hashmask); + pf_purge_expired_fragments(); + pf_purge_expired_src_nodes(); + + /* + * Now all kifs & rules should be unreferenced, + * thus should be successfully freed. + */ + pf_purge_unlinked_rules(); + pfi_kif_purge(); + + /* + * Announce success and exit. + */ + PF_RULES_RLOCK(); + V_pf_end_threads++; + PF_RULES_RUNLOCK(); + wakeup(pf_purge_thread); + kproc_exit(0); + } + PF_RULES_RUNLOCK(); + + /* Process 1/interval fraction of the state table every run. */ + idx = pf_purge_expired_states(idx, pf_hashmask / + (V_pf_default_rule.timeout[PFTM_INTERVAL] * 10)); + + /* Purge other expired types every PFTM_INTERVAL seconds. */ + if (idx == 0) { + /* + * Order is important: + * - states and src nodes reference rules + * - states and rules reference kifs + */ + pf_purge_expired_fragments(); + pf_purge_expired_src_nodes(); + pf_purge_unlinked_rules(); + pfi_kif_purge(); } - VNET_LIST_RUNLOCK(); } /* not reached */ + CURVNET_RESTORE(); } u_int32_t Modified: head/sys/netpfil/pf/pf_if.c ============================================================================== --- head/sys/netpfil/pf/pf_if.c Thu Jan 22 00:52:34 2015 (r277518) +++ head/sys/netpfil/pf/pf_if.c Thu Jan 22 01:23:16 2015 (r277519) @@ -102,13 +102,10 @@ MALLOC_DEFINE(PFI_MTYPE, "pf_ifnet", "pf LIST_HEAD(pfi_list, pfi_kif); static VNET_DEFINE(struct pfi_list, pfi_unlinked_kifs); #define V_pfi_unlinked_kifs VNET(pfi_unlinked_kifs) - static struct mtx pfi_unlnkdkifs_mtx; -MTX_SYSINIT(pfi_unlnkdkifs_mtx, &pfi_unlnkdkifs_mtx, "pf unlinked interfaces", - MTX_DEF); void -pfi_vnet_initialize(void) +pfi_initialize(void) { struct ifg_group *ifg; struct ifnet *ifp; @@ -117,6 +114,9 @@ pfi_vnet_initialize(void) V_pfi_buffer_max = 64; V_pfi_buffer = malloc(V_pfi_buffer_max * sizeof(*V_pfi_buffer), PFI_MTYPE, M_WAITOK); + + mtx_init(&pfi_unlnkdkifs_mtx, "pf unlinked interfaces", NULL, MTX_DEF); + kif = malloc(sizeof(*kif), PFI_MTYPE, M_WAITOK); PF_RULES_WLOCK(); V_pfi_all = pfi_kif_attach(kif, IFG_ALL); @@ -129,20 +129,18 @@ pfi_vnet_initialize(void) pfi_attach_ifnet(ifp); IFNET_RUNLOCK(); - if (IS_DEFAULT_VNET(curvnet)) { - pfi_attach_cookie = EVENTHANDLER_REGISTER(ifnet_arrival_event, - pfi_attach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); - pfi_detach_cookie = EVENTHANDLER_REGISTER(ifnet_departure_event, - pfi_detach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); - pfi_attach_group_cookie = EVENTHANDLER_REGISTER(group_attach_event, - pfi_attach_group_event, curvnet, EVENTHANDLER_PRI_ANY); - pfi_change_group_cookie = EVENTHANDLER_REGISTER(group_change_event, - pfi_change_group_event, curvnet, EVENTHANDLER_PRI_ANY); - pfi_detach_group_cookie = EVENTHANDLER_REGISTER(group_detach_event, - pfi_detach_group_event, curvnet, EVENTHANDLER_PRI_ANY); - pfi_ifaddr_event_cookie = EVENTHANDLER_REGISTER(ifaddr_event, - pfi_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); - } + pfi_attach_cookie = EVENTHANDLER_REGISTER(ifnet_arrival_event, + pfi_attach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); + pfi_detach_cookie = EVENTHANDLER_REGISTER(ifnet_departure_event, + pfi_detach_ifnet_event, NULL, EVENTHANDLER_PRI_ANY); + pfi_attach_group_cookie = EVENTHANDLER_REGISTER(group_attach_event, + pfi_attach_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_change_group_cookie = EVENTHANDLER_REGISTER(group_change_event, + pfi_change_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_detach_group_cookie = EVENTHANDLER_REGISTER(group_detach_event, + pfi_detach_group_event, curvnet, EVENTHANDLER_PRI_ANY); + pfi_ifaddr_event_cookie = EVENTHANDLER_REGISTER(ifaddr_event, + pfi_ifaddr_event, NULL, EVENTHANDLER_PRI_ANY); } void @@ -168,6 +166,8 @@ pfi_cleanup(void) free(p, PFI_MTYPE); } + mtx_destroy(&pfi_unlnkdkifs_mtx); + free(V_pfi_buffer, PFI_MTYPE); } Modified: head/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- head/sys/netpfil/pf/pf_ioctl.c Thu Jan 22 00:52:34 2015 (r277518) +++ head/sys/netpfil/pf/pf_ioctl.c Thu Jan 22 01:23:16 2015 (r277519) @@ -87,7 +87,7 @@ __FBSDID("$FreeBSD$"); #include #endif -static int pf_vnet_init(void); +static int pfattach(void); static struct pf_pool *pf_get_pool(char *, u_int32_t, u_int8_t, u_int32_t, u_int8_t, u_int8_t, u_int8_t); @@ -189,6 +189,7 @@ static struct cdevsw pf_cdevsw = { static volatile VNET_DEFINE(int, pf_pfil_hooked); #define V_pf_pfil_hooked VNET(pf_pfil_hooked) +VNET_DEFINE(int, pf_end_threads); struct rwlock pf_rules_lock; struct sx pf_ioctl_lock; @@ -204,20 +205,17 @@ pfsync_defer_t *pfsync_defer_ptr = NUL pflog_packet_t *pflog_packet_ptr = NULL; static int -pf_vnet_init(void) +pfattach(void) { u_int32_t *my_timeout = V_pf_default_rule.timeout; int error; if (IS_DEFAULT_VNET(curvnet)) pf_mtag_initialize(); - TAILQ_INIT(&V_pf_tags); - TAILQ_INIT(&V_pf_qids); - - pf_vnet_initialize(); + pf_initialize(); pfr_initialize(); - pfi_vnet_initialize(); - pf_vnet_normalize_init(); + pfi_initialize(); + pf_normalize_init(); V_pf_limits[PF_LIMIT_STATES].limit = PFSTATE_HIWAT; V_pf_limits[PF_LIMIT_SRC_NODES].limit = PFSNODE_HIWAT; @@ -278,13 +276,10 @@ pf_vnet_init(void) for (int i = 0; i < SCNT_MAX; i++) V_pf_status.scounters[i] = counter_u64_alloc(M_WAITOK); - if (IS_DEFAULT_VNET(curvnet)) { - if ((error = kproc_create(pf_purge_thread, curvnet, NULL, 0, 0, - "pf purge")) != 0) { - /* XXXGL: leaked all above. */ - return (error); - } - } + if ((error = kproc_create(pf_purge_thread, curvnet, NULL, 0, 0, + "pf purge")) != 0) + /* XXXGL: leaked all above. */ + return (error); if ((error = swi_add(NULL, "pf send", pf_intr, curvnet, SWI_NET, INTR_MPSAFE, &V_pf_swi_cookie)) != 0) /* XXXGL: leaked all above. */ @@ -3720,11 +3715,27 @@ dehook_pf(void) static int pf_load(void) { + int error; + + VNET_ITERATOR_DECL(vnet_iter); + + VNET_LIST_RLOCK(); + VNET_FOREACH(vnet_iter) { + CURVNET_SET(vnet_iter); + V_pf_pfil_hooked = 0; + V_pf_end_threads = 0; + TAILQ_INIT(&V_pf_tags); + TAILQ_INIT(&V_pf_qids); + CURVNET_RESTORE(); + } + VNET_LIST_RUNLOCK(); rw_init(&pf_rules_lock, "pf rulesets"); sx_init(&pf_ioctl_lock, "pf ioctl"); pf_dev = make_dev(&pf_cdevsw, 0, 0, 0, 0600, PF_NAME); + if ((error = pfattach()) != 0) + return (error); return (0); } @@ -3748,6 +3759,11 @@ pf_unload(void) } PF_RULES_WLOCK(); shutdown_pf(); + V_pf_end_threads = 1; + while (V_pf_end_threads < 2) { + wakeup_one(pf_purge_thread); + rw_sleep(pf_purge_thread, &pf_rules_lock, 0, "pftmo", 0); + } pf_normalize_cleanup(); pfi_cleanup(); pfr_cleanup(); @@ -3797,5 +3813,3 @@ static moduledata_t pf_mod = { DECLARE_MODULE(pf, pf_mod, SI_SUB_PSEUDO, SI_ORDER_FIRST); MODULE_VERSION(pf, PF_MODVER); -VNET_SYSINIT(pf_vnet_init, SI_SUB_PROTO_IFATTACHDOMAIN, SI_ORDER_ANY - 255, - pf_vnet_init, NULL); Modified: head/sys/netpfil/pf/pf_norm.c ============================================================================== --- head/sys/netpfil/pf/pf_norm.c Thu Jan 22 00:52:34 2015 (r277518) +++ head/sys/netpfil/pf/pf_norm.c Thu Jan 22 01:23:16 2015 (r277519) @@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$"); #include "opt_pf.h" #include -#include #include #include #include @@ -93,7 +92,6 @@ struct pf_fragment { }; static struct mtx pf_frag_mtx; -MTX_SYSINIT(pf_frag_mtx, &pf_frag_mtx, "pf fragments", MTX_DEF); #define PF_FRAG_LOCK() mtx_lock(&pf_frag_mtx) #define PF_FRAG_UNLOCK() mtx_unlock(&pf_frag_mtx) #define PF_FRAG_ASSERT() mtx_assert(&pf_frag_mtx, MA_OWNED) @@ -148,7 +146,7 @@ static void pf_scrub_ip6(struct mbuf * } while(0) void -pf_vnet_normalize_init(void) +pf_normalize_init(void) { V_pf_frag_z = uma_zcreate("pf frags", sizeof(struct pf_fragment), @@ -163,6 +161,9 @@ pf_vnet_normalize_init(void) V_pf_limits[PF_LIMIT_FRAGS].limit = PFFRAG_FRENT_HIWAT; uma_zone_set_max(V_pf_frent_z, PFFRAG_FRENT_HIWAT); uma_zone_set_warning(V_pf_frent_z, "PF frag entries limit reached"); + + mtx_init(&pf_frag_mtx, "pf fragments", NULL, MTX_DEF); + TAILQ_INIT(&V_pf_fragqueue); TAILQ_INIT(&V_pf_cachequeue); } @@ -174,6 +175,8 @@ pf_normalize_cleanup(void) uma_zdestroy(V_pf_state_scrub_z); uma_zdestroy(V_pf_frent_z); uma_zdestroy(V_pf_frag_z); + + mtx_destroy(&pf_frag_mtx); } static int Modified: head/sys/netpfil/pf/pf_table.c ============================================================================== --- head/sys/netpfil/pf/pf_table.c Thu Jan 22 00:52:34 2015 (r277518) +++ head/sys/netpfil/pf/pf_table.c Thu Jan 22 01:23:16 2015 (r277519) @@ -184,13 +184,9 @@ static struct pfr_kentry static RB_PROTOTYPE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); static RB_GENERATE(pfr_ktablehead, pfr_ktable, pfrkt_tree, pfr_ktable_compare); -VNET_DEFINE(struct pfr_ktablehead, pfr_ktables); -#define V_pfr_ktables VNET(pfr_ktables) - +struct pfr_ktablehead pfr_ktables; struct pfr_table pfr_nulltable; - -VNET_DEFINE(int, pfr_ktable_cnt); -#define V_pfr_ktable_cnt VNET(pfr_ktable_cnt) +int pfr_ktable_cnt; void pfr_initialize(void) @@ -1087,7 +1083,7 @@ pfr_clr_tables(struct pfr_table *filter, return (ENOENT); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (!strcmp(p->pfrkt_anchor, PF_RESERVED_ANCHOR)) @@ -1122,7 +1118,7 @@ pfr_add_tables(struct pfr_table *tbl, in flags & PFR_FLAG_USERIOCTL)) senderr(EINVAL); key.pfrkt_flags |= PFR_TFLAG_ACTIVE; - p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); if (p == NULL) { p = pfr_create_ktable(&key.pfrkt_t, tzero, 1); if (p == NULL) @@ -1138,7 +1134,7 @@ pfr_add_tables(struct pfr_table *tbl, in /* find or create root table */ bzero(key.pfrkt_anchor, sizeof(key.pfrkt_anchor)); - r = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); + r = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); if (r != NULL) { p->pfrkt_root = r; goto _skip; @@ -1194,7 +1190,7 @@ pfr_del_tables(struct pfr_table *tbl, in if (pfr_validate_table(&key.pfrkt_t, 0, flags & PFR_FLAG_USERIOCTL)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) { SLIST_FOREACH(q, &workq, pfrkt_workq) if (!pfr_ktable_compare(p, q)) @@ -1233,7 +1229,7 @@ pfr_get_tables(struct pfr_table *filter, *size = n; return (0); } - RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (n-- <= 0) @@ -1268,7 +1264,7 @@ pfr_get_tstats(struct pfr_table *filter, return (0); } SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { if (pfr_skip_table(filter, p, flags)) continue; if (n-- <= 0) @@ -1300,7 +1296,7 @@ pfr_clr_tstats(struct pfr_table *tbl, in bcopy(tbl + i, &key.pfrkt_t, sizeof(key.pfrkt_t)); if (pfr_validate_table(&key.pfrkt_t, 0, 0)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); if (p != NULL) { SLIST_INSERT_HEAD(&workq, p, pfrkt_workq); xzero++; @@ -1332,7 +1328,7 @@ pfr_set_tflags(struct pfr_table *tbl, in if (pfr_validate_table(&key.pfrkt_t, 0, flags & PFR_FLAG_USERIOCTL)) return (EINVAL); - p = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); + p = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); if (p != NULL && (p->pfrkt_flags & PFR_TFLAG_ACTIVE)) { p->pfrkt_nflags = (p->pfrkt_flags | setflag) & ~clrflag; @@ -1374,7 +1370,7 @@ pfr_ina_begin(struct pfr_table *trs, u_i if (rs == NULL) return (ENOMEM); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1419,7 +1415,7 @@ pfr_ina_define(struct pfr_table *tbl, st return (EBUSY); tbl->pfrt_flags |= PFR_TFLAG_INACTIVE; SLIST_INIT(&tableq); - kt = RB_FIND(pfr_ktablehead, &V_pfr_ktables, (struct pfr_ktable *)tbl); + kt = RB_FIND(pfr_ktablehead, &pfr_ktables, (struct pfr_ktable *)tbl); if (kt == NULL) { kt = pfr_create_ktable(tbl, 0, 1); if (kt == NULL) @@ -1432,7 +1428,7 @@ pfr_ina_define(struct pfr_table *tbl, st /* find or create root table */ bzero(&key, sizeof(key)); strlcpy(key.pfrkt_name, tbl->pfrt_name, sizeof(key.pfrkt_name)); - rt = RB_FIND(pfr_ktablehead, &V_pfr_ktables, &key); + rt = RB_FIND(pfr_ktablehead, &pfr_ktables, &key); if (rt != NULL) { kt->pfrkt_root = rt; goto _skip; @@ -1509,7 +1505,7 @@ pfr_ina_rollback(struct pfr_table *trs, if (rs == NULL || !rs->topen || ticket != rs->tticket) return (0); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1545,7 +1541,7 @@ pfr_ina_commit(struct pfr_table *trs, u_ return (EBUSY); SLIST_INIT(&workq); - RB_FOREACH(p, pfr_ktablehead, &V_pfr_ktables) { + RB_FOREACH(p, pfr_ktablehead, &pfr_ktables) { if (!(p->pfrkt_flags & PFR_TFLAG_INACTIVE) || pfr_skip_table(trs, p, 0)) continue; @@ -1691,7 +1687,7 @@ pfr_table_count(struct pfr_table *filter PF_RULES_ASSERT(); if (flags & PFR_FLAG_ALLRSETS) - return (V_pfr_ktable_cnt); + return (pfr_ktable_cnt); if (filter->pfrt_anchor[0]) { rs = pf_find_ruleset(filter->pfrt_anchor); return ((rs != NULL) ? rs->tables : -1); @@ -1724,8 +1720,8 @@ pfr_insert_ktable(struct pfr_ktable *kt) PF_RULES_WASSERT(); - RB_INSERT(pfr_ktablehead, &V_pfr_ktables, kt); - V_pfr_ktable_cnt++; + RB_INSERT(pfr_ktablehead, &pfr_ktables, kt); + pfr_ktable_cnt++; if (kt->pfrkt_root != NULL) if (!kt->pfrkt_root->pfrkt_refcnt[PFR_REFCNT_ANCHOR]++) pfr_setflags_ktable(kt->pfrkt_root, @@ -1756,14 +1752,14 @@ pfr_setflags_ktable(struct pfr_ktable *k if (!(newf & PFR_TFLAG_ACTIVE)) newf &= ~PFR_TFLAG_USRMASK; if (!(newf & PFR_TFLAG_SETMASK)) { - RB_REMOVE(pfr_ktablehead, &V_pfr_ktables, kt); + RB_REMOVE(pfr_ktablehead, &pfr_ktables, kt); if (kt->pfrkt_root != NULL) if (!--kt->pfrkt_root->pfrkt_refcnt[PFR_REFCNT_ANCHOR]) pfr_setflags_ktable(kt->pfrkt_root, kt->pfrkt_root->pfrkt_flags & ~PFR_TFLAG_REFDANCHOR); pfr_destroy_ktable(kt, 1); - V_pfr_ktable_cnt--; + pfr_ktable_cnt--; return; } if (!(newf & PFR_TFLAG_ACTIVE) && kt->pfrkt_cnt) { @@ -1884,7 +1880,7 @@ static struct pfr_ktable * pfr_lookup_table(struct pfr_table *tbl) { /* struct pfr_ktable start like a struct pfr_table */ - return (RB_FIND(pfr_ktablehead, &V_pfr_ktables, + return (RB_FIND(pfr_ktablehead, &pfr_ktables, (struct pfr_ktable *)tbl)); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 01:27:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 56A14BF8; Thu, 22 Jan 2015 01:27:13 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id D054ED6D; Thu, 22 Jan 2015 01:27:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0M1R9VG083373 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 22 Jan 2015 04:27:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0M1R9jp083372; Thu, 22 Jan 2015 04:27:09 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Thu, 22 Jan 2015 04:27:09 +0300 From: Gleb Smirnoff To: Craig Rodrigues , Nikos Vassiliadis Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150122012709.GM15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501060903.t06934qp081875@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 01:27:13 -0000 On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: C> Author: rodrigc C> Date: Tue Jan 6 09:03:03 2015 C> New Revision: 276747 C> URL: https://svnweb.freebsd.org/changeset/base/276747 C> C> Log: C> Instead of creating a purge thread for every vnet, create C> a single purge thread and clean up all vnets from this thread. C> C> PR: 194515 C> Differential Revision: D1315 C> Submitted by: Nikos Vassiliadis Sorry guys, I backed this out due to broken kldunload of pf module, which is critical when you are working with pf bugs. I had to backout r276746 as well, since it has numerous build breakages, that are addressed by later revisions. That's my fault that I don't review in time, and I will try to improve the situation. Can you please replay r276746 again, addressing all the build problems and send the patch to me? You can user reviews.freebsd.org if you want. I'd like to get this in, but in a better quality. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 01:54:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD86ADA for ; Thu, 22 Jan 2015 01:54:30 +0000 (UTC) Received: from mail-lb0-x22e.google.com (mail-lb0-x22e.google.com [IPv6:2a00:1450:4010:c04::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2AA0EFF1 for ; Thu, 22 Jan 2015 01:54:30 +0000 (UTC) Received: by mail-lb0-f174.google.com with SMTP id f15so3731570lbj.5 for ; Wed, 21 Jan 2015 17:54:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=clockworksquid.com; s=google; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=27RmEEgkayiGQc8dykNZpQLn2nXhZwd4+wlNClVCfMQ=; b=bV/A+d1bD86t2n4xJcMb6CbNQrF6+o8pfu3g0jFbo37vrFIdrr69BA434nASLGl03r Hgvc3T+PbZzz238ROX6gZ7IdD5Z8YpjepJ+K07MdgD/L67zgQaMAiuoDgnQmqU8zHndG Q1tWAO+AaKvLaEeI/ek3PHkMJm0IYPpOlSvrY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-type; bh=27RmEEgkayiGQc8dykNZpQLn2nXhZwd4+wlNClVCfMQ=; b=PAlHBskhzJ9oYTjfb+Wupq9wySOkCn9JV8sfi7tlXBO1JVxeOhUEu46qlg9HzVdCFY Hs9bFnvfTJZHE2XAlIDk/crRppKbSDjDc2HGqmeuc3GOd0LCNte/i8oLFKGe5IVdHuZi KYU7g2kgubsahEbuy+qryJtwp4Wl1y9Sti4Jq5fDKQUNOOq5CRPvXZeC+thdCvRCvtMn BlDsWz1fUxEZziEaPRKRKI/zyENVWdKEVPFgpHsC87qCXiQd2kRtyNgP42rNdspEFZUg CuwIlrzTagSZIRhNkw1ZgAXJWIyqjP3iioSREakRRFDvinkGvevRjEXPmH7uMAGZzuI9 T04w== X-Gm-Message-State: ALoCoQlRut4QmtwF2OT4TOybl3xh1UrjphWpomCK3uzOv79SyMzFJqN5b1CCIrzRRu8EF3GJm+AA X-Received: by 10.153.6.6 with SMTP id cq6mr47664728lad.23.1421891667750; Wed, 21 Jan 2015 17:54:27 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.92.131 with HTTP; Wed, 21 Jan 2015 17:54:07 -0800 (PST) In-Reply-To: <201501212149.t0LLn3CF049759@svn.freebsd.org> References: <201501212149.t0LLn3CF049759@svn.freebsd.org> From: Juli Mallett Date: Wed, 21 Jan 2015 17:54:07 -0800 X-Google-Sender-Auth: 82VzgwcoLKKSFlvJFmNk0tFxNt4 Message-ID: Subject: Re: svn commit: r277517 - head To: Ed Maste Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 01:54:30 -0000 On Wed, Jan 21, 2015 at 1:49 PM, Ed Maste wrote: > Author: emaste > Date: Wed Jan 21 21:49:03 2015 > New Revision: 277517 > URL: https://svnweb.freebsd.org/changeset/base/277517 > > Log: > Fix bootstrap on systems with old libdwarf and WITHOUT_CDDL > > ELF Tool Chain tools need libelf and libdwarf. Thanks very much! From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 02:24:11 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7A69764A; Thu, 22 Jan 2015 02:24:11 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 65650332; Thu, 22 Jan 2015 02:24:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M2OBPd082598; Thu, 22 Jan 2015 02:24:11 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M2OAoT082590; Thu, 22 Jan 2015 02:24:10 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501220224.t0M2OAoT082590@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Jan 2015 02:24:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277520 - in stable/10: etc/defaults etc/periodic/daily share/man/man5 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 02:24:11 -0000 Author: gjb Date: Thu Jan 22 02:24:09 2015 New Revision: 277520 URL: https://svnweb.freebsd.org/changeset/base/277520 Log: MFC r277216: Evaluate running userland/kernel version in daily periodic(8) run, taken from uname(1) '-U' and '-K' flags. Sponsored by: The FreeBSD Foundation Added: stable/10/etc/periodic/daily/510.status-world-kernel - copied unchanged from r277216, head/etc/periodic/daily/510.status-world-kernel Modified: stable/10/etc/defaults/periodic.conf stable/10/etc/periodic/daily/Makefile stable/10/share/man/man5/periodic.conf.5 Directory Properties: stable/10/ (props changed) Modified: stable/10/etc/defaults/periodic.conf ============================================================================== --- stable/10/etc/defaults/periodic.conf Thu Jan 22 01:23:16 2015 (r277519) +++ stable/10/etc/defaults/periodic.conf Thu Jan 22 02:24:09 2015 (r277520) @@ -144,6 +144,10 @@ daily_status_ntpd_enable="NO" # Check daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue +# 510.status-world-kernel +daily_status_world_kernel="YES" # Check the running + # userland/kernel version + # 800.scrub-zfs daily_scrub_zfs_enable="NO" daily_scrub_zfs_pools="" # empty string selects all pools Copied: stable/10/etc/periodic/daily/510.status-world-kernel (from r277216, head/etc/periodic/daily/510.status-world-kernel) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/etc/periodic/daily/510.status-world-kernel Thu Jan 22 02:24:09 2015 (r277520, copy of r277216, head/etc/periodic/daily/510.status-world-kernel) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Check that the running userland and kernel versions are in sync. + +# 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_world_kernel" in + [Yy][Ee][Ss]) + rc=0 + _U=$(/usr/bin/uname -U 2>/dev/null) + _K=$(/usr/bin/uname -K 2>/dev/null) + [ -z "${_U}" -o -z "${_K}" ] && exit 0 + echo "" + echo "Checking userland and kernel versions:" + if [ "${_U}" != "${_K}" ]; then + echo "Userland and kernel are not in sync" + echo "Userland version: ${_U}" + echo "Kernel version: ${_K}" + rc=1 + else + echo "Userland and kernel are in sync." + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: stable/10/etc/periodic/daily/Makefile ============================================================================== --- stable/10/etc/periodic/daily/Makefile Thu Jan 22 01:23:16 2015 (r277519) +++ stable/10/etc/periodic/daily/Makefile Thu Jan 22 02:24:09 2015 (r277520) @@ -16,6 +16,7 @@ FILES= 100.clean-disks \ 409.status-gconcat \ 420.status-network \ 450.status-security \ + 510.status-world-kernel \ 999.local # NB: keep these sorted by MK_* knobs Modified: stable/10/share/man/man5/periodic.conf.5 ============================================================================== --- stable/10/share/man/man5/periodic.conf.5 Thu Jan 22 01:23:16 2015 (r277519) +++ stable/10/share/man/man5/periodic.conf.5 Thu Jan 22 02:24:09 2015 (r277520) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd December 25, 2013 +.Dd January 15, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -498,6 +498,11 @@ for yesterday's mail rejects. Set to .Dq Li YES if you want to enable NTP status check. +.It Va daily_status_world_kernel +.Pq Vt bool +Set to +.Dq Li YES +to check the running userland and kernel are in sync. .It Va daily_queuerun_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 02:24:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECAD4788; Thu, 22 Jan 2015 02:24:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D7A71344; Thu, 22 Jan 2015 02:24:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M2Oh6i082710; Thu, 22 Jan 2015 02:24:43 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M2Og24082706; Thu, 22 Jan 2015 02:24:42 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501220224.t0M2Og24082706@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Jan 2015 02:24:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277521 - in stable/9: etc/defaults etc/periodic/daily share/man/man5 X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 02:24:44 -0000 Author: gjb Date: Thu Jan 22 02:24:42 2015 New Revision: 277521 URL: https://svnweb.freebsd.org/changeset/base/277521 Log: MFC r277216: Evaluate running userland/kernel version in daily periodic(8) run, taken from uname(1) '-U' and '-K' flags. Sponsored by: The FreeBSD Foundation Added: stable/9/etc/periodic/daily/510.status-world-kernel - copied unchanged from r277216, head/etc/periodic/daily/510.status-world-kernel Modified: stable/9/etc/defaults/periodic.conf stable/9/etc/periodic/daily/Makefile stable/9/share/man/man5/periodic.conf.5 Directory Properties: stable/9/etc/ (props changed) stable/9/share/man/man5/ (props changed) Modified: stable/9/etc/defaults/periodic.conf ============================================================================== --- stable/9/etc/defaults/periodic.conf Thu Jan 22 02:24:09 2015 (r277520) +++ stable/9/etc/defaults/periodic.conf Thu Jan 22 02:24:42 2015 (r277521) @@ -152,6 +152,10 @@ pkg_info="pkg_info" # Use this progr daily_queuerun_enable="YES" # Run mail queue daily_submit_queuerun="YES" # Also submit queue +# 510.status-world-kernel +daily_status_world_kernel="YES" # Check the running + # userland/kernel version + # 800.scrub-zfs daily_scrub_zfs_enable="NO" daily_scrub_zfs_pools="" # empty string selects all pools Copied: stable/9/etc/periodic/daily/510.status-world-kernel (from r277216, head/etc/periodic/daily/510.status-world-kernel) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/etc/periodic/daily/510.status-world-kernel Thu Jan 22 02:24:42 2015 (r277521, copy of r277216, head/etc/periodic/daily/510.status-world-kernel) @@ -0,0 +1,36 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Check that the running userland and kernel versions are in sync. + +# 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_world_kernel" in + [Yy][Ee][Ss]) + rc=0 + _U=$(/usr/bin/uname -U 2>/dev/null) + _K=$(/usr/bin/uname -K 2>/dev/null) + [ -z "${_U}" -o -z "${_K}" ] && exit 0 + echo "" + echo "Checking userland and kernel versions:" + if [ "${_U}" != "${_K}" ]; then + echo "Userland and kernel are not in sync" + echo "Userland version: ${_U}" + echo "Kernel version: ${_K}" + rc=1 + else + echo "Userland and kernel are in sync." + fi + ;; + + *) rc=0;; +esac + +exit $rc Modified: stable/9/etc/periodic/daily/Makefile ============================================================================== --- stable/9/etc/periodic/daily/Makefile Thu Jan 22 02:24:09 2015 (r277520) +++ stable/9/etc/periodic/daily/Makefile Thu Jan 22 02:24:42 2015 (r277521) @@ -18,6 +18,7 @@ FILES= 100.clean-disks \ 409.status-gconcat \ 420.status-network \ 450.status-security \ + 510.status-world-kernel \ 999.local # NB: keep these sorted by MK_* knobs Modified: stable/9/share/man/man5/periodic.conf.5 ============================================================================== --- stable/9/share/man/man5/periodic.conf.5 Thu Jan 22 02:24:09 2015 (r277520) +++ stable/9/share/man/man5/periodic.conf.5 Thu Jan 22 02:24:42 2015 (r277521) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 30, 2012 +.Dd January 15, 2015 .Dt PERIODIC.CONF 5 .Os .Sh NAME @@ -633,6 +633,11 @@ if you want to enable reverse DNS lookup Set to .Dq Li YES if you want to enable NTP status check. +.It Va daily_status_world_kernel +.Pq Vt bool +Set to +.Dq Li YES +to check the running userland and kernel are in sync. .It Va daily_queuerun_enable .Pq Vt bool Set to From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 03:32:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8F1F3568; Thu, 22 Jan 2015 03:32:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7B686CFC; Thu, 22 Jan 2015 03:32:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M3W5Aw016278; Thu, 22 Jan 2015 03:32:05 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M3W5Ck016277; Thu, 22 Jan 2015 03:32:05 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501220332.t0M3W5Ck016277@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 22 Jan 2015 03:32:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277522 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 03:32:05 -0000 Author: gonzo Date: Thu Jan 22 03:32:04 2015 New Revision: 277522 URL: https://svnweb.freebsd.org/changeset/base/277522 Log: Write ACK for all kinds of LCDC interrupts Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Thu Jan 22 02:24:42 2015 (r277521) +++ head/sys/arm/ti/am335x/am335x_lcd.c Thu Jan 22 03:32:04 2015 (r277522) @@ -365,7 +365,7 @@ am335x_lcd_intr(void *arg) reg = LCD_READ4(sc, LCD_RASTER_CTRL); reg |= RASTER_CTRL_LCDEN; LCD_WRITE4(sc, LCD_RASTER_CTRL, reg); - return; + goto done; } if (reg & IRQ_PL) { @@ -376,7 +376,7 @@ am335x_lcd_intr(void *arg) reg = LCD_READ4(sc, LCD_RASTER_CTRL); reg |= RASTER_CTRL_LCDEN; LCD_WRITE4(sc, LCD_RASTER_CTRL, reg); - return; + goto done; } if (reg & IRQ_EOF0) { @@ -399,6 +399,7 @@ am335x_lcd_intr(void *arg) /* TODO: Handle ACB */ } +done: LCD_WRITE4(sc, LCD_END_OF_INT_IND, 0); } From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 03:33:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF2216BF; Thu, 22 Jan 2015 03:33:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CC54AD0E; Thu, 22 Jan 2015 03:33:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M3XqLe016548; Thu, 22 Jan 2015 03:33:52 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M3Xqja016547; Thu, 22 Jan 2015 03:33:52 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501220333.t0M3Xqja016547@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 22 Jan 2015 03:33:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277523 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 03:33:53 -0000 Author: gonzo Date: Thu Jan 22 03:33:51 2015 New Revision: 277523 URL: https://svnweb.freebsd.org/changeset/base/277523 Log: Add last_fault_code used in pmap-v6.c if kernel is compiled with "option DEBUG" Modified: head/sys/arm/arm/trap-v6.c Modified: head/sys/arm/arm/trap-v6.c ============================================================================== --- head/sys/arm/arm/trap-v6.c Thu Jan 22 03:32:04 2015 (r277522) +++ head/sys/arm/arm/trap-v6.c Thu Jan 22 03:33:51 2015 (r277523) @@ -67,6 +67,10 @@ __FBSDID("$FreeBSD$"); extern char fusubailout[]; +#ifdef DEBUG +int last_fault_code; /* For the benefit of pmap_fault_fixup() */ +#endif + struct ksig { int sig; u_long code; @@ -457,6 +461,10 @@ abort_handler(struct trapframe *tf, int if (prefetch) ftype |= VM_PROT_EXECUTE; +#ifdef DEBUG + last_fault_code = fsr; +#endif + #ifndef ARM_NEW_PMAP if (pmap_fault_fixup(vmspace_pmap(td->td_proc->p_vmspace), va, ftype, usermode)) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 03:56:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 522279A0; Thu, 22 Jan 2015 03:56:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3D75EEB4; Thu, 22 Jan 2015 03:56:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M3uPmW026209; Thu, 22 Jan 2015 03:56:25 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M3uONl026205; Thu, 22 Jan 2015 03:56:24 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201501220356.t0M3uONl026205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Thu, 22 Jan 2015 03:56:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277524 - in head/sys: dev/hwpmc sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 03:56:25 -0000 Author: rstone Date: Thu Jan 22 03:56:23 2015 New Revision: 277524 URL: https://svnweb.freebsd.org/changeset/base/277524 Log: style(9) cleanup Modified: head/sys/dev/hwpmc/hwpmc_core.c head/sys/dev/hwpmc/pmc_events.h head/sys/sys/pmc.h Modified: head/sys/dev/hwpmc/hwpmc_core.c ============================================================================== --- head/sys/dev/hwpmc/hwpmc_core.c Thu Jan 22 03:33:51 2015 (r277523) +++ head/sys/dev/hwpmc/hwpmc_core.c Thu Jan 22 03:56:23 2015 (r277524) @@ -680,7 +680,8 @@ static struct iap_event_descr iap_events IAPDESCR(08H_0EH, 0x08, 0x0E, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_10H, 0x08, 0x10, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_SB | IAP_F_SBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(08H_20H, 0x08, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX), IAPDESCR(08H_40H, 0x08, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_60H, 0x08, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(08H_80H, 0x08, 0x80, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), @@ -710,9 +711,12 @@ static struct iap_event_descr iap_events 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 | IAP_F_HWX), 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 | IAP_F_HWX), - IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(0EH_10H, 0x0E, 0x10, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(0EH_20H, 0x0E, 0x20, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(0EH_40H, 0x0E, 0x40, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(0FH_01H, 0x0F, 0x01, IAP_F_FM | IAP_F_I7), IAPDESCR(0FH_02H, 0x0F, 0x02, IAP_F_FM | IAP_F_I7 | IAP_F_WM), @@ -826,7 +830,8 @@ static struct iap_event_descr iap_events IAPDESCR(24H_AAH, 0x24, 0xAA, IAP_F_FM | IAP_F_I7 | IAP_F_WM), IAPDESCR(24H_F8H, 0x24, 0xF8, IAP_F_FM | IAP_F_HW | IAP_F_HWX), IAPDESCR(24H_3FH, 0x24, 0x3F, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | IAP_F_HWX), + IAPDESCR(24H_FFH, 0x24, 0xFF, IAP_F_FM | IAP_F_I7 | IAP_F_WM | IAP_F_HW | + IAP_F_HWX), IAPDESCR(25H, 0x25, IAP_M_CORE, IAP_F_ALLCPUSCORE2), @@ -967,7 +972,8 @@ static struct iap_event_descr iap_events IAPDESCR(49H_20H, 0x49, 0x20, IAP_F_FM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_40H, 0x49, 0x40, IAP_F_FM | IAP_F_I7O | IAP_F_HW | IAP_F_HWX), IAPDESCR(49H_60H, 0x49, 0x60, IAP_F_FM | IAP_F_HW | IAP_F_HWX), - IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | IAP_F_HWX), + IAPDESCR(49H_80H, 0x49, 0x80, IAP_F_FM | IAP_F_WM | IAP_F_I7 | IAP_F_HW | + IAP_F_HWX), IAPDESCR(4BH_00H, 0x4B, 0x00, IAP_F_FM | IAP_F_ALLCPUSCORE2), IAPDESCR(4BH_01H, 0x4B, 0x01, IAP_F_FM | IAP_F_ALLCPUSCORE2 | IAP_F_I7O), @@ -1008,10 +1014,14 @@ static struct iap_event_descr iap_events IAPDESCR(53H_01H, 0x53, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), - IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(58H_01H, 0x58, 0x01, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_02H, 0x58, 0x02, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_04H, 0x58, 0x04, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), + IAPDESCR(58H_08H, 0x58, 0x08, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(59H_20H, 0x59, 0x20, IAP_F_FM | IAP_F_SB | IAP_F_SBX), IAPDESCR(59H_40H, 0x59, 0x40, IAP_F_FM | IAP_F_SB | IAP_F_SBX), @@ -1114,8 +1124,8 @@ static struct iap_event_descr iap_events IAPDESCR(79H_30H, 0x79, 0x30, IAP_F_FM | IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), - - IAPDESCR(79H_3CH, 0x79, 0x3C, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | IAP_F_HWX), + IAPDESCR(79H_18H, 0x79, 0x18, IAP_F_FM | IAP_F_IB | IAP_F_IBX | IAP_F_HW | + IAP_F_HWX), IAPDESCR(7AH, 0x7A, IAP_M_AGENT, IAP_F_CA | IAP_F_CC2), @@ -1367,7 +1377,8 @@ static struct iap_event_descr iap_events IAPDESCR(B6H_04H, 0xB6, 0x04, IAP_F_CAS), IAPDESCR(B7H_01H, 0xB7, 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 | IAP_F_HWX | IAP_F_CAS), + IAP_F_SB | IAP_F_IB | IAP_F_SBX | IAP_F_IBX | IAP_F_HW | IAP_F_CAS | + IAP_F_HWX), IAPDESCR(B7H_02H, 0xB7, 0x02, IAP_F_CAS), IAPDESCR(B8H_01H, 0xB8, 0x01, IAP_F_FM | IAP_F_I7 | IAP_F_WM), Modified: head/sys/dev/hwpmc/pmc_events.h ============================================================================== --- head/sys/dev/hwpmc/pmc_events.h Thu Jan 22 03:33:51 2015 (r277523) +++ head/sys/dev/hwpmc/pmc_events.h Thu Jan 22 03:56:23 2015 (r277524) @@ -2734,7 +2734,7 @@ __PMC_EV_ALIAS("PAGE_WALKER_LOADS.ITLB_M __PMC_EV_ALIAS("TLB_FLUSH.DTLB_THREAD", IAP_EVENT_BDH_01H) \ __PMC_EV_ALIAS("TLB_FLUSH.STLB_ANY", IAP_EVENT_BDH_20H) \ __PMC_EV_ALIAS("INST_RETIRED.ANY_P", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ +__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.AVX_TO_SSE", IAP_EVENT_C1H_08H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.SSE_TO_AVX", IAP_EVENT_C1H_10H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.ANY_WB_ASSIST", IAP_EVENT_C1H_40H) \ @@ -2963,7 +2963,7 @@ __PMC_EV_ALIAS("PAGE_WALKER_LOADS.ITLB_M __PMC_EV_ALIAS("TLB_FLUSH.DTLB_THREAD", IAP_EVENT_BDH_01H) \ __PMC_EV_ALIAS("TLB_FLUSH.STLB_ANY", IAP_EVENT_BDH_20H) \ __PMC_EV_ALIAS("INST_RETIRED.ANY_P", IAP_EVENT_C0H_00H) \ -__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ +__PMC_EV_ALIAS("INST_RETIRED.PREC_DIST", IAP_EVENT_C0H_01H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.AVX_TO_SSE", IAP_EVENT_C1H_08H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.SSE_TO_AVX", IAP_EVENT_C1H_10H) \ __PMC_EV_ALIAS("OTHER_ASSISTS.ANY_WB_ASSIST", IAP_EVENT_C1H_40H) \ Modified: head/sys/sys/pmc.h ============================================================================== --- head/sys/sys/pmc.h Thu Jan 22 03:33:51 2015 (r277523) +++ head/sys/sys/pmc.h Thu Jan 22 03:56:23 2015 (r277524) @@ -94,7 +94,7 @@ __PMC_CPU(INTEL_ATOM_SILVERMONT, 0x92, "Intel Atom Silvermont") \ __PMC_CPU(INTEL_NEHALEM_EX, 0x93, "Intel Nehalem Xeon 7500") \ __PMC_CPU(INTEL_WESTMERE_EX, 0x94, "Intel Westmere Xeon E7") \ - __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ + __PMC_CPU(INTEL_HASWELL_XEON, 0x95, "Intel Haswell Xeon E5 v3") \ __PMC_CPU(INTEL_XSCALE, 0x100, "Intel XScale") \ __PMC_CPU(MIPS_24K, 0x200, "MIPS 24K") \ __PMC_CPU(MIPS_OCTEON, 0x201, "Cavium Octeon") \ From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 05:21:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 049F470C for ; Thu, 22 Jan 2015 05:21:06 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB2748F1 for ; Thu, 22 Jan 2015 05:21:05 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id uz6so28526604obc.11 for ; Wed, 21 Jan 2015 21:21:04 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=1omhlkBVCJNTsDzPh+6hXMmwcOYHnQpTXCs8tTJKoEQ=; b=mgmC8rKFXFDL3BnRmXEuFfBhAagN7+Ptk987rp/n7UOZdCr3zfPAw5L3VHupvrw7gf LKzrV/p3+XlAVZF4SkeeZ5Pz+pO0EKc3ePqBoDhTz7ejYLViydQ62NG9P2Q7WTiZLFoX cQZYFJ0/aW0qirvRxnY+CN+LLJZazjSJ4uFu2AGXtf+ziFrQt8w2miPRlyW6MsJGNdhU 5j0r8uBUZDCnfVgKJ5l75LQFTdtqm7egy8xSLqAKtVrbnQHgmLGmI6Lpl1UzXeI8oT4+ 4fApOcuFMQWQujeOij/L1eFqundX1AbFVu4410b9nPoxQeV65wN4BNvONoKyjHKSK9Ma qP7Q== X-Gm-Message-State: ALoCoQn8ThVypO0CRRoMDOt51pe5mRPJ0kA+W9NISb8oAL3fC2ZJ1+Mu+eGRk29YSLIPVNxzu87T X-Received: by 10.182.148.98 with SMTP id tr2mr27417291obb.28.1421904064608; Wed, 21 Jan 2015 21:21:04 -0800 (PST) Received: from [192.168.43.169] ([172.56.8.11]) by mx.google.com with ESMTPSA id r9sm9021703obi.29.2015.01.21.21.21.03 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 21:21:04 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Warner Losh In-Reply-To: <54BE0528.2050503@selasky.org> Date: Wed, 21 Jan 2015 22:21:02 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <19408675-1E2B-4F38-8C9A-66975B6C01DF@bsdimp.com> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <54BDE58F.3070909@selasky.org> <54BE0528.2050503@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 05:21:06 -0000 > On Jan 20, 2015, at 12:35 AM, Hans Petter Selasky = wrote: >=20 > On 01/20/15 06:22, Adrian Chadd wrote: >> Sweet, thanks. I'l test it, but anything that changes the locking to >> TCP is going to need a more thorough review. The "there be dragons" >> disclaimer is appropriate.:) >=20 > No changes in locking - simply some minor code reordering. This isn=E2=80=99t entirely true. You changed the INFO_WLOCK protocol, = and also drop the WLOCK to acquire the INFO_WLOCK in places, and it = isn=E2=80=99t clear to me at all why this is safe to do. Please document = the analysis you did to show that was safe. Warner From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 05:26:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A5060956 for ; Thu, 22 Jan 2015 05:26:37 +0000 (UTC) Received: from mail-ob0-f180.google.com (mail-ob0-f180.google.com [209.85.214.180]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 671E19BA for ; Thu, 22 Jan 2015 05:26:37 +0000 (UTC) Received: by mail-ob0-f180.google.com with SMTP id uz6so28541196obc.11 for ; Wed, 21 Jan 2015 21:26:36 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=2RCmvLyW7SEixhwB/8BhFfcLXIySteIgbdvYcMZ2N98=; b=T3wgfjlYiKZWVxJrbAayLY1hd0PVlldFdWP0VzgqxXKSQBMqX5hvLNeSFvFlgdBCiA UcpRCgroK58l9TYj1A9bEMISKfD/CEY4QqhVSHw+r0GwBLhAFZ5k7lmd8szs5bA+mKkG +RKSz0KNo/s//wriWy3LnQzeOJFgNnIYRjKSzp8XNS+4wQ35aA7hUbOXfYteH6Zh+1Q0 M4sFC99q0BqUCGO/TLF2UwNldHt26ASE5SpnxfNRVdKAWcQKau5b1slFtralcQ+1MgkT iIO0j5ScR0zFAer+eM2diUTJT/HJpP1UJGtbinlbVn/0y7by0VMFd1xxn5KlYfBbGduY cpHA== X-Gm-Message-State: ALoCoQlK9yzU04C83uOXISBdd8T7XglnfwAPxRtH1JEA4GZPolkjeupvsKNY7JXSbtVvd32aA55r X-Received: by 10.60.133.141 with SMTP id pc13mr27616787oeb.68.1421904396587; Wed, 21 Jan 2015 21:26:36 -0800 (PST) Received: from [192.168.43.169] ([172.56.8.11]) by mx.google.com with ESMTPSA id d198sm4759185oih.12.2015.01.21.21.26.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 21:26:36 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Warner Losh In-Reply-To: <54BE21F0.6010602@selasky.org> Date: Wed, 21 Jan 2015 22:26:33 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 05:26:37 -0000 > On Jan 20, 2015, at 2:37 AM, Hans Petter Selasky = wrote: >=20 > On 01/20/15 10:00, Konstantin Belousov wrote: >> On Tue, Jan 20, 2015 at 08:58:34AM +0100, Hans Petter Selasky wrote: >>> On 01/20/15 08:51, Konstantin Belousov wrote: >>>> On Tue, Jan 20, 2015 at 05:30:25AM +0100, Hans Petter Selasky = wrote: >>>>> On 01/19/15 22:59, Adrian Chadd wrote: >>>>>> Hi, >>>>>>=20 >>>>>> Would you please check what the results of this are with CPU = specific >>>>>> callwheels? >>>>>>=20 >>>>>> I'm doing some 10+ gig traffic testing on -HEAD with RSS enabled = (on >>>>>> ixgbe) and with this setup, the per-CPU TCP callwheel stuff is >>>>>> enabled. But all the callwheels are now back on clock(0) and so = is the >>>>>> lock contention. :( >>>>>>=20 >>>>>> Thanks, >>>>>>=20 >>>>>=20 >>>>> Hi, >>>>>=20 >>>>> Like stated in the manual page, callout_reset_curcpu/on() does not = work >>>>> with MPSAFE callouts any more! >>>> I.e. you 'fixed' some undeterminate bugs in callout migration by = not >>>> doing migration at all anymore. >>>>=20 >>>>>=20 >>>>> You need to use callout_init_{mtx,rm,rw} and remove the custom = locking >>>>> inside the callback in the TCP stack to get it working like = before! >>>>=20 >>>> No, you need to do this, if you think that whole callout KPI must = be >>>> rototiled. It is up to the person who modifies the KPI, to ensure = that >>>> existing code is not broken. >=20 > Hi, >=20 > It is not very hard to update existing callout clients and you can do = it too, if you need the extra bits of performance. >=20 > Are there more API's than the TCP stack which you think needs an = update and are performance critical? >=20 >>>>=20 >>>> As I understand, currently we are back to the one-cpu callouts. >>>> Do other people consider this situation acceptable ? >=20 > For the TCP stack - yes, but not for other clients like cv_timedwait() = and such. >=20 > If you think you have a better way to solve the callout problems, = please tell me! In order for a callout to change its CPU you need a lock = to protect which CPU the callout is on. Instead of introducing a third = lock in the callout path, which will be a congestion point, to protect = against changing the CPU number, I decided that we will use the client's = mutex and the MPSAFE implies the client doesn't have any mutex. So it = won't work with callout clients which use the CALLOUT_MPSAFE flag. = Honestly CALLOUT_MPSAFE should not be used, because it leads to extra = complexity in the clients catching the race when tearing down the = callouts and any pending callbacks. Then it is incumbent on you to fix them. You can=92t just fix one = instance and wash your hands of the problem. Maybe this is a real and legitimate bug. However, until you=92ve = followed your solution through by actually fixing the abusers of it, my = confidence that another issue won=92t present itself is quite low. The = code seems half baked to me. And from reading this thread, it seems like = perhaps I=92m not the only one. >>> Please read the callout 9 manual page first. >>=20 >> Assume I read it. How this changes any of my points above ? >> """ >> A change in the CPU selection cannot happen if this function is >> re-scheduled inside a callout function. Else the callback function = given >> by the func argument will be executed on the same CPU like previously >> done. >> """ >> You cannot do this without fixing consumers. >>=20 >=20 > The code simply needs an update. It is not broken in any ways - right? = If it is not broken, fixing it is not that urgent. Radically changing the performance characteristics is breaking the code. = Performance regression in the TCP stack is urgent to fix. Not being able = to enumerate what all the consumers are that use this and provide an = analysis about why they aren=92t important to fix is a bug in your = process, and in your interaction with the project. We simply do not = operate that way. Warner= From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 05:26:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 51E88A97 for ; Thu, 22 Jan 2015 05:26:56 +0000 (UTC) Received: from mail-oi0-f52.google.com (mail-oi0-f52.google.com [209.85.218.52]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 154059C2 for ; Thu, 22 Jan 2015 05:26:55 +0000 (UTC) Received: by mail-oi0-f52.google.com with SMTP id h136so19357174oig.11 for ; Wed, 21 Jan 2015 21:26:55 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:content-type:mime-version:subject:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=gCc/2CEv/q4N78L4DdLIdtw26G4K2P060oqnLK/KYiQ=; b=Gf5PtchV3SRTD9M7NYoJye+JaSVMFCubc3Q0nzrjDR/UQUugmhW4/+06fkEC0TOYBT zVZO1PM+oDPe+7BP93xd8T3EaA1YXTF0qgrmVRbrqUZbBwtj5d37hYy1VwAuX0iApfkV MVMLBUNXuYDJLUabivAgv3h9Zb1pyWDQy97olFtLPiXzMSRganHxhUynffL7Gkl94GAS nQvDyzCdOxKrqwLKUG1e9QpVCXJm7KNXPhdhHmpMHH0XNASFGpRLLDyasSFOOVpDPwWu IwKSVEcbj/0xv2DDCp2ZPmmzx3XYOOqveXlZTwSVkqEUVSBdak2QTQ8tlVMlUNbc384E NM0g== X-Gm-Message-State: ALoCoQlNdm6JcWr5cW+keSB3AOmwRIizqs+oXBg8QgbEGCc438+BW1NIF9OVphLO7rYsAdBMO+LF X-Received: by 10.202.89.213 with SMTP id n204mr25673842oib.77.1421904114515; Wed, 21 Jan 2015 21:21:54 -0800 (PST) Received: from [192.168.43.169] ([172.56.8.11]) by mx.google.com with ESMTPSA id r9sm9021703obi.29.2015.01.21.21.21.53 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 Jan 2015 21:21:53 -0800 (PST) Sender: Warner Losh Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Warner Losh In-Reply-To: <20150120075126.GA42409@kib.kiev.ua> Date: Wed, 21 Jan 2015 22:21:52 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <5D0577C3-FBDC-49D1-81AA-F19D56EEE2DC@bsdimp.com> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1993) Cc: Hans Petter Selasky , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 05:26:56 -0000 > On Jan 20, 2015, at 12:51 AM, Konstantin Belousov = wrote: > Do other people consider this situation acceptable ? Not even a little. Warner From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 07:13:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 21CE7836; Thu, 22 Jan 2015 07:13:39 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CE1563C4; Thu, 22 Jan 2015 07:13:38 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 364AA1FE023; Thu, 22 Jan 2015 08:13:36 +0100 (CET) Message-ID: <54C0A352.8090701@selasky.org> Date: Thu, 22 Jan 2015 08:14:26 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Warner Losh Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> In-Reply-To: <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: Konstantin Belousov , "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 07:13:39 -0000 On 01/22/15 06:26, Warner Losh wrote: > >> The code simply needs an update. It is not broken in any ways - right? If it is not broken, fixing it is not that urgent. > > Radically changing the performance characteristics is breaking the code. Performance regression in the TCP stack is urgent to fix. Not being able to enumerate what all the consumers are that use this and provide an analysis about why they arent important to fix is a bug in your process, and in your interaction with the project. We simply do not operate that way. Hi, My plan is to work out a patch for the TCP stack today, which only change the callout_init() call or its function. This should not need any particular review. I'll let adrian test and review, because I think he is closer to me timezone wise and you're standing on my head saying its urgent. If he is still not happy, I can back my change out. Else it remains in -current AS-IS. MFC to 10-stable I can delay for sure until all issues you report to me are fixed. Thank you for your patience! --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 08:10:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2C008EC9; Thu, 22 Jan 2015 08:10:32 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5472AC1; Thu, 22 Jan 2015 08:10:31 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0M8AOC6056515 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jan 2015 10:10:24 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0M8AOC6056515 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0M8ANmT056512; Thu, 22 Jan 2015 10:10:23 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Jan 2015 10:10:23 +0200 From: Konstantin Belousov To: Hans Petter Selasky Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Message-ID: <20150122081023.GT42409@kib.kiev.ua> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54C0A352.8090701@selasky.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 08:10:32 -0000 On Thu, Jan 22, 2015 at 08:14:26AM +0100, Hans Petter Selasky wrote: > On 01/22/15 06:26, Warner Losh wrote: > > > >> The code simply needs an update. It is not broken in any ways - right? If it is not broken, fixing it is not that urgent. > > > > Radically changing the performance characteristics is breaking the code. Performance regression in the TCP stack is urgent to fix. > Not being able to enumerate what all the consumers are that use this and > provide an analysis about why they aren?t important to fix is a bug in > your process, and in your interaction with the project. We simply do not > operate that way. Right, I completely agree with this statement. > Hi, > > My plan is to work out a patch for the TCP stack today, which only > change the callout_init() call or its function. This should not need any > particular review. I'll let adrian test and review, because I think he > is closer to me timezone wise and you're standing on my head saying its > urgent. If he is still not happy, I can back my change out. Else it > remains in -current AS-IS. TCP regresssion was noted, so it is brought in front. There is nothing else which makes TCP issue different from other (hidden) issues. =========================== > MFC to 10-stable I can delay for sure until > all issues you report to me are fixed. =========================== Sigh, you still do not understand. It is your duty to identify all pieces which break after your change. After that, we can argue whether each of them is critical or not to allow the migration. But this must have been done before the KPI change hit the tree. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 08:18:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 596B4ED for ; Thu, 22 Jan 2015 08:18:42 +0000 (UTC) Received: from mail-wg0-f42.google.com (mail-wg0-f42.google.com [74.125.82.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E9B3AB9D for ; Thu, 22 Jan 2015 08:18:40 +0000 (UTC) Received: by mail-wg0-f42.google.com with SMTP id x13so278899wgg.1 for ; Thu, 22 Jan 2015 00:18:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Hsjk2mZMd3zNZYw7YLLdMpZkBdnQHpiIhcKWoW6qLzs=; b=lp7zAY0XVW4aO26xBytwtS9Y+Vy3BcfAwtqSEDeKd0kMH86b7pKDzUsHvDML+Ep53D N8mKbXf+qLbv8/iHHpZUlqdsNvwVeFKTn+o0O6dVqeA9CLynfJTmn6nYny8L0zCUZ97w z49dJ330hr6uU6okC5wznYBZ65JBpekPW17vENqTc5Qz9aKYvj/wqwu9FcvlqJb7X0CC 3O4MKOhSW+GBhott4i+4XGWzSn/PjHaPxQnln4IkvdZSoA3H/K7vEapOdrpLBpsPvJnJ ElpzUcelyNezq/967fvvENM7fV1STCjn0Ss5Fe/ARt/0fIWQGugxhxWTT+jxpD54tdFR Qapw== X-Gm-Message-State: ALoCoQmWcgdzI19XpyZKgZOFEZ8NWuUjIRLvG7sc45tLS+93HpR2A+f5wgmfEWwrxP6wcsGeuz8N MIME-Version: 1.0 X-Received: by 10.180.160.144 with SMTP id xk16mr66011195wib.12.1421914717432; Thu, 22 Jan 2015 00:18:37 -0800 (PST) Received: by 10.27.205.86 with HTTP; Thu, 22 Jan 2015 00:18:37 -0800 (PST) X-Originating-IP: [178.172.239.242] In-Reply-To: <201501211610.t0LGAcMg085437@svn.freebsd.org> References: <201501211610.t0LGAcMg085437@svn.freebsd.org> Date: Thu, 22 Jan 2015 11:18:37 +0300 Message-ID: Subject: Re: svn commit: r277487 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms From: "Max N. Boyarov" To: Konstantin Belousov Content-Type: text/plain; charset=UTF-8 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 08:18:42 -0000 On Wed, Jan 21, 2015 at 7:10 PM, Konstantin Belousov wrote: > Author: kib > Date: Wed Jan 21 16:10:37 2015 > New Revision: 277487 > URL: https://svnweb.freebsd.org/changeset/base/277487 > > Log: > An update for the i915 GPU driver, which brings the code up to Linux > commit 4d93914ae3db4a897ead4b. Some related drm infrastructure > changes are imported as needed. > > Biggest update is the rewrite of the i915 gem io to more closely > follow Linux model, althought the mechanism used by FreeBSD port is > different. > > Sponsored by: The FreeBSD Foundation > MFC after: 2 month Hi, after this commit i have many error messages like: error: [drm:pid1121:gen6_sanitize_pm] *ERROR* Power management discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 18070000, was 18000000 On my thinkpad t530 info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010). info: [drm] Driver supports precise vblank timestamp query. drmn1: taking over the fictitious range 0xe0000000-0xf0000000 info: [drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off info: [drm] Connector LVDS-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.LVDS-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector VGA-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.VGA-1 info: [drm] - kern.vt.fb.default_mode fbd1 on drmn1 -- Max N. Boyarov From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 08:39:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CDDBF609; Thu, 22 Jan 2015 08:39:07 +0000 (UTC) Received: from mail.turbocat.net (mail.turbocat.net [IPv6:2a01:4f8:d16:4514::2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 87899D8B; Thu, 22 Jan 2015 08:39:07 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id DACE51FE023; Thu, 22 Jan 2015 09:39:04 +0100 (CET) Message-ID: <54C0B75B.9070305@selasky.org> Date: Thu, 22 Jan 2015 09:39:55 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> In-Reply-To: <20150122081023.GT42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "svn-src-head@freebsd.org" , Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 08:39:07 -0000 On 01/22/15 09:10, Konstantin Belousov wrote: > On Thu, Jan 22, 2015 at 08:14:26AM +0100, Hans Petter Selasky wrote: >> On 01/22/15 06:26, Warner Losh wrote: >> > >>>> The code simply needs an update. It is not broken in any ways - right? If it is not broken, fixing it is not that urgent. >>> >>> Radically changing the performance characteristics is breaking the code. Performance regression in the TCP stack is urgent to fix. > >> Not being able to enumerate what all the consumers are that use this and >> provide an analysis about why they aren?t important to fix is a bug in >> your process, and in your interaction with the project. We simply do not >> operate that way. > Right, I completely agree with this statement. > > >> Hi, >> >> My plan is to work out a patch for the TCP stack today, which only >> change the callout_init() call or its function. This should not need any >> particular review. I'll let adrian test and review, because I think he >> is closer to me timezone wise and you're standing on my head saying its >> urgent. If he is still not happy, I can back my change out. Else it >> remains in -current AS-IS. > TCP regresssion was noted, so it is brought in front. There is nothing > else which makes TCP issue different from other (hidden) issues. > > =========================== >> MFC to 10-stable I can delay for sure until >> all issues you report to me are fixed. > =========================== > > Sigh, you still do not understand. It is your duty to identify all pieces > which break after your change. After that, we can argue whether each of > them is critical or not to allow the migration. But this must have been > done before the KPI change hit the tree. > Hi, Are you saying that pieces of code that runs completely unlocked using "volatile" as only synchronization mechanism is better than what I would call a temporary and hopefully short TCP stack performance loss? I don't understand? How frequently do you reboot your boxes? Maybe one every day? And you don't care? --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:02:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3F74CF9D; Thu, 22 Jan 2015 09:02:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2AD7EE6; Thu, 22 Jan 2015 09:02:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M92wnD067868; Thu, 22 Jan 2015 09:02:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M92wQ2067867; Thu, 22 Jan 2015 09:02:58 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501220902.t0M92wQ2067867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Jan 2015 09:02:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277525 - stable/10/sys/compat/freebsd32 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:02:59 -0000 Author: kib Date: Thu Jan 22 09:02:58 2015 New Revision: 277525 URL: https://svnweb.freebsd.org/changeset/base/277525 Log: MFC r277211: fcntl F_O{GET,SET}LK take pointer as the arg, handle them properly for compat32. Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- stable/10/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 22 03:56:23 2015 (r277524) +++ stable/10/sys/compat/freebsd32/freebsd32_misc.c Thu Jan 22 09:02:58 2015 (r277525) @@ -3137,6 +3137,9 @@ freebsd32_fcntl(struct thread *td, struc case F_GETLK: case F_SETFD: case F_SETFL: + case F_OGETLK: + case F_OSETLK: + case F_OSETLKW: tmp = (unsigned int)(uap->arg); break; default: From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:07:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4522632E; Thu, 22 Jan 2015 09:07:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 30E78145; Thu, 22 Jan 2015 09:07:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M973tY068397; Thu, 22 Jan 2015 09:07:03 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M973r7068396; Thu, 22 Jan 2015 09:07:03 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501220907.t0M973r7068396@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Thu, 22 Jan 2015 09:07:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277526 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:07:03 -0000 Author: kib Date: Thu Jan 22 09:07:02 2015 New Revision: 277526 URL: https://svnweb.freebsd.org/changeset/base/277526 Log: MFC r277236: For sigaction(2), ignore possible garbage in sa_flags for sa_handler == SIG_DFL or SIG_IGN. Modified: stable/10/sys/kern/kern_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_sig.c ============================================================================== --- stable/10/sys/kern/kern_sig.c Thu Jan 22 09:02:58 2015 (r277525) +++ stable/10/sys/kern/kern_sig.c Thu Jan 22 09:07:02 2015 (r277526) @@ -658,9 +658,10 @@ kern_sigaction(td, sig, act, oact, flags if (!_SIG_VALID(sig)) return (EINVAL); - if (act != NULL && (act->sa_flags & ~(SA_ONSTACK | SA_RESTART | - SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | SA_NOCLDWAIT | - SA_SIGINFO)) != 0) + if (act != NULL && act->sa_handler != SIG_DFL && + act->sa_handler != SIG_IGN && (act->sa_flags & ~(SA_ONSTACK | + SA_RESTART | SA_RESETHAND | SA_NOCLDSTOP | SA_NODEFER | + SA_NOCLDWAIT | SA_SIGINFO)) != 0) return (EINVAL); PROC_LOCK(p); From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:12:17 2015 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 116A54D8; Thu, 22 Jan 2015 09:12:17 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8C03E214; Thu, 22 Jan 2015 09:12:16 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0M9CAfv070722 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jan 2015 11:12:10 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0M9CAfv070722 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0M9CAjh070721; Thu, 22 Jan 2015 11:12:10 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Jan 2015 11:12:10 +0200 From: Konstantin Belousov To: Warner Losh Subject: Re: svn commit: r277421 - head/sys/powerpc/powerpc Message-ID: <20150122091210.GV42409@kib.kiev.ua> References: <201501201621.t0KGLx26096724@svn.freebsd.org> <20150120191438.GL42409@kib.kiev.ua> <54BF240C.2090107@freebsd.org> <20150121075410.GM42409@kib.kiev.ua> <81FEE3A9-C522-48A3-9292-893685C640AF@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <81FEE3A9-C522-48A3-9292-893685C640AF@bsdimp.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: src-committers@FreeBSD.org, mips@freebsd.org, svn-src-all@FreeBSD.org, arm@freebsd.org, Nathan Whitehorn , sparc64@freebsd.org, svn-src-head@FreeBSD.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:12:17 -0000 On Wed, Jan 21, 2015 at 06:04:57PM -0700, Warner Losh wrote: > > > On Jan 21, 2015, at 12:54 AM, Konstantin Belousov wrote: > > > > On Tue, Jan 20, 2015 at 07:59:08PM -0800, Nathan Whitehorn wrote: > >> > >> On 01/20/15 11:14, Konstantin Belousov wrote: > >>> On Tue, Jan 20, 2015 at 04:21:59PM +0000, Nathan Whitehorn wrote: > >>>> Author: nwhitehorn > >>>> Date: Tue Jan 20 16:21:59 2015 > >>>> New Revision: 277421 > >>>> URL: https://svnweb.freebsd.org/changeset/base/277421 > >>>> > >>>> Log: > >>>> There does not seem to be any reason to acquire GIANT here. Follow amd64 > >>>> in removing it. > >>>> > >>>> MFC after: 1 month > >>>> > >>>> Modified: > >>>> head/sys/powerpc/powerpc/mem.c > >>>> > >>>> Modified: head/sys/powerpc/powerpc/mem.c > >>>> ============================================================================== > >>>> --- head/sys/powerpc/powerpc/mem.c Tue Jan 20 15:45:09 2015 (r277420) > >>>> +++ head/sys/powerpc/powerpc/mem.c Tue Jan 20 16:21:59 2015 (r277421) > >>>> @@ -100,8 +100,6 @@ memrw(struct cdev *dev, struct uio *uio, > >>>> cnt = 0; > >>>> error = 0; > >>>> > >>>> - GIANT_REQUIRED; > >>>> - > >>> This is not an acquisition, to be pedantic. Really, it is cdevsw which > >>> has D_NEEDGIANT flag which acquires Giant. After architectures get > >>> rid of GIANT_REQUIRED, flag can be removed. > >>> > >> Just so I understand, you are not objecting to this commit, right? > > Absolutely not, this is the right thing to do. > > > >> Just > >> pointing out that (a) my commit message was wrong and that (b) once all > >> architectures make this change (presumably more involved) we can get rid > >> of the D_NEEDGIANT in /sys/dev/mem/memdev.c? > > Exactly. > > There doesn???t seem to be a reason for i386 either. Was just looking > at the code today on the plane for unrelated reasons. > I agree. For i386, there is definitely no reason to require Giant. I looked over arm+mips+sparc64, and I do not see a reason. Note that I do not know/understand their pmap implementations, but I expect that Giant is not needed due to properties of the used (pmap) functions. Below is the trivial patch. Would be nice to get at least a nod from some arch maintainers. diff --git a/sys/arm/arm/mem.c b/sys/arm/arm/mem.c index 460a004..30d4b1d 100644 --- a/sys/arm/arm/mem.c +++ b/sys/arm/arm/mem.c @@ -82,8 +82,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags) int error = 0; vm_offset_t addr, eaddr; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { diff --git a/sys/dev/mem/memdev.c b/sys/dev/mem/memdev.c index 37bad15..c3d1af1 100644 --- a/sys/dev/mem/memdev.c +++ b/sys/dev/mem/memdev.c @@ -52,7 +52,7 @@ static struct cdev *memdev, *kmemdev; static struct cdevsw mem_cdevsw = { .d_version = D_VERSION, - .d_flags = D_MEM|D_NEEDGIANT, + .d_flags = D_MEM, .d_open = memopen, .d_read = memrw, .d_write = memrw, diff --git a/sys/i386/i386/mem.c b/sys/i386/i386/mem.c index 9c83f47..b036bd3 100644 --- a/sys/i386/i386/mem.c +++ b/sys/i386/i386/mem.c @@ -86,10 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags) int error = 0; vm_offset_t addr; - /* XXX UPS Why ? */ - GIANT_REQUIRED; - - if (dev2unit(dev) != CDEV_MINOR_MEM && dev2unit(dev) != CDEV_MINOR_KMEM) return EIO; diff --git a/sys/mips/mips/mem.c b/sys/mips/mips/mem.c index d40c424..08bb6b0 100644 --- a/sys/mips/mips/mem.c +++ b/sys/mips/mips/mem.c @@ -85,8 +85,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags) cnt = 0; error = 0; - GIANT_REQUIRED; - pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; diff --git a/sys/sparc64/sparc64/mem.c b/sys/sparc64/sparc64/mem.c index d09f6b8..6bd5225 100644 --- a/sys/sparc64/sparc64/mem.c +++ b/sys/sparc64/sparc64/mem.c @@ -99,8 +99,6 @@ memrw(struct cdev *dev, struct uio *uio, int flags) error = 0; ova = 0; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:14:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 761586DB; Thu, 22 Jan 2015 09:14:45 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB48823E; Thu, 22 Jan 2015 09:14:44 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0M9Edk2070791 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jan 2015 11:14:40 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0M9Edk2070791 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0M9Edsh070790; Thu, 22 Jan 2015 11:14:39 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Jan 2015 11:14:39 +0200 From: Konstantin Belousov To: Shawn Webb Subject: Re: svn commit: r277487 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms Message-ID: <20150122091439.GW42409@kib.kiev.ua> References: <201501211610.t0LGAcMg085437@svn.freebsd.org> <1421865947.6315.1.camel@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1421865947.6315.1.camel@gmail.com> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:14:45 -0000 On Wed, Jan 21, 2015 at 01:45:47PM -0500, Shawn Webb wrote: > On Wed, 2015-01-21 at 16:10 +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Wed Jan 21 16:10:37 2015 > > New Revision: 277487 > > URL: https://svnweb.freebsd.org/changeset/base/277487 > > > > Log: > > An update for the i915 GPU driver, which brings the code up to Linux > > commit 4d93914ae3db4a897ead4b. Some related drm infrastructure > > changes are imported as needed. > > > > Biggest update is the rewrite of the i915 gem io to more closely > > follow Linux model, althought the mechanism used by FreeBSD port is > > different. > > Hey Kostik, > > This causes my Haswell laptop to just display a blank screen on bootup. > Is there something I should be doing? I just have i915kms_load="YES" > in /boot/loader.conf. Yes, remove the i915kms_load from your loader.conf. Haswell is not supported. > > Thanks, > > Shawn From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:16:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB88C844; Thu, 22 Jan 2015 09:16:25 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 579D4262; Thu, 22 Jan 2015 09:16:25 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0M9GKwp071888 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 22 Jan 2015 11:16:20 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0M9GKwp071888 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0M9GKmF071887; Thu, 22 Jan 2015 11:16:20 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 22 Jan 2015 11:16:20 +0200 From: Konstantin Belousov To: Gleb Smirnoff Subject: Re: svn commit: r277489 - head/sys/kern Message-ID: <20150122091620.GX42409@kib.kiev.ua> References: <201501211632.t0LGWtOR098070@svn.freebsd.org> <20150121182444.GG15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150121182444.GG15484@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:16:25 -0000 On Wed, Jan 21, 2015 at 09:24:44PM +0300, Gleb Smirnoff wrote: > On Wed, Jan 21, 2015 at 04:32:55PM +0000, Konstantin Belousov wrote: > K> Author: kib > K> Date: Wed Jan 21 16:32:54 2015 > K> New Revision: 277489 > K> URL: https://svnweb.freebsd.org/changeset/base/277489 > K> > K> Log: > K> Do not assert that the new pipepair mutex is not initialized. The > K> backing memory contains garbage and might trigger the assertion. > > I have touched dozen of places in kernel where I do explicit M_ZERO on > allocation just to satisfy later assertion in the mtx_init. Is the > correct fix to use MTX_NEW? I think MTX_NEW is better. Note that this flag is just a month old, it was added by dchagin in r275751. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:17:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0479B9B1; Thu, 22 Jan 2015 09:17:30 +0000 (UTC) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BE10F275; Thu, 22 Jan 2015 09:17:29 +0000 (UTC) Received: by mail-pa0-f50.google.com with SMTP id bj1so608373pad.9; Thu, 22 Jan 2015 01:17:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=CyfZ64T99t3fOsWzkFjN6ti92maBnENABxYmeYIUvag=; b=mTtWjo3JDUEIv97fYLpq/nmgI3s95Mlp2/i8wpLV58NIiBoV2MnMXaBp9lVmu4U+NF LC148dR4UhJ2EEY8O0kZaak9Ufs3JwDK7fmBJGeospTHb20BQzKHPPch1DNHOkP+RRPD +/N1FYFiwQ+kcVOR2hT/NBfEBsT+yzMood2QDfhnCyxWzNTVMVU9izFVP0eECk6J0Xuf HbdZ6M+X4mO4kPavN4M9qdb/g1vynnnSZEKAJ3PRrteZVcth+7M+zw0FPu49YWiCfU1h 9AmfQqLVyFZbk5XHveKGFz6T/a8X5nIKyjGKqhH6B1ZhDxGWQE8YI5Fqg0EMHFmltAGD Zn8A== X-Received: by 10.70.38.239 with SMTP id j15mr366542pdk.115.1421918249323; Thu, 22 Jan 2015 01:17:29 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:d121:5f34:3218:d268? ([2601:8:ab80:7d6:d121:5f34:3218:d268]) by mx.google.com with ESMTPSA id bk8sm8599154pad.28.2015.01.22.01.17.28 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 22 Jan 2015 01:17:28 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_BFBE73B5-8C12-4703-841F-12D0C005BFC3"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r277487 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms From: Garrett Cooper In-Reply-To: <20150122091439.GW42409@kib.kiev.ua> Date: Thu, 22 Jan 2015 01:17:28 -0800 Message-Id: <3DCFA90E-6BF2-48E5-885E-A7D4D2C3C5C9@gmail.com> References: <201501211610.t0LGAcMg085437@svn.freebsd.org> <1421865947.6315.1.camel@gmail.com> <20150122091439.GW42409@kib.kiev.ua> To: Konstantin Belousov X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Shawn Webb X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:17:30 -0000 --Apple-Mail=_BFBE73B5-8C12-4703-841F-12D0C005BFC3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jan 22, 2015, at 1:14, Konstantin Belousov = wrote: > On Wed, Jan 21, 2015 at 01:45:47PM -0500, Shawn Webb wrote: >> On Wed, 2015-01-21 at 16:10 +0000, Konstantin Belousov wrote: >>> Author: kib >>> Date: Wed Jan 21 16:10:37 2015 >>> New Revision: 277487 >>> URL: https://svnweb.freebsd.org/changeset/base/277487 >>>=20 >>> Log: >>> An update for the i915 GPU driver, which brings the code up to = Linux >>> commit 4d93914ae3db4a897ead4b. Some related drm infrastructure >>> changes are imported as needed. >>>=20 >>> Biggest update is the rewrite of the i915 gem io to more closely >>> follow Linux model, althought the mechanism used by FreeBSD port is >>> different. >>=20 >> Hey Kostik, >>=20 >> This causes my Haswell laptop to just display a blank screen on = bootup. >> Is there something I should be doing? I just have i915kms_load=3D"YES" >> in /boot/loader.conf. > Yes, remove the i915kms_load from your loader.conf. >=20 > Haswell is not supported. Hi kib@, Wouldn=92t it be better to check for supported PCI/vendor/etc IDs and = filter out the supported ones, just to avoid people running into issues = like this when first booting i915kms on Haswell, Broadwell, etc = hardware? Thanks! --Apple-Mail=_BFBE73B5-8C12-4703-841F-12D0C005BFC3 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUwMAoAAoJEMZr5QU6S73eqcgH/2wPuwVyv/YLJpN4+6qcgDY5 6r16o1czRfta90XoywQhu+qqMYE96rWgSPC9TnBiZd1G/2Xsq5qS1UBfutGJjkNI QJCeLDTDmV7Jt04G8kvNtWTA6LgzXRwRApZ6YWpPfPHxBubI3LJNt3VxBWDerWJn nYD+YZIWo3l7+LPxHFgrb2l4ZChEa8BEcAK9NELA8NsQA73iUO42ew9DMXzUpD3F 7IbhSsdj0e7utqMmmRboEn+0kqc0UVnAsAO8L4Ktvhk/xTMONZ6efGe0pKMWOhAH mZl3BK8RkvRlJ3tyyamBXLC5ENe/shb89vZhBosW5be2zDAaCxCnrawubjs72/8= =Mbxh -----END PGP SIGNATURE----- --Apple-Mail=_BFBE73B5-8C12-4703-841F-12D0C005BFC3-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:23:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 55391B49 for ; Thu, 22 Jan 2015 09:23:03 +0000 (UTC) Received: from mailrelay10.public.one.com (mailrelay10.public.one.com [195.47.247.78]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C3CA035D for ; Thu, 22 Jan 2015 09:23:01 +0000 (UTC) X-HalOne-Cookie: 9f6213b6b59468badff61996346a9a1a4a30b6f8 X-HalOne-ID: 18b6d401-a218-11e4-9705-b82a72d06996 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cederstrand.dk; s=20140924; h=from:subject:date:message-id:to:cc:mime-version:content-type:in-reply-to: references; bh=O3M0lAgommefxFPD/U0U/ZccpUy/AwJnKIlJb1V+bSA=; b=nu5lq11VemVT2Lk+dQ96OMUlCPkjpQV9z1LDpkboABS30y986RIualNF3za3YS1la+NvnXuh1NUtj vDWbSAdUoYHoYxuKBJBEKWCR72DYp0C16IEnNtvAFeHNlAU2XP/A/JyKvwBImsr/zHPbR5RCqSmjSG kFm19XqvBXIxwaXU= Received: from [192.168.1.58] (unknown [217.157.7.221]) by smtpfilter3.public.one.com (Halon Mail Gateway) with ESMTPSA; Thu, 22 Jan 2015 09:21:50 +0000 (GMT) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Content-Type: multipart/signed; boundary="Apple-Mail=_5559BE3C-DD53-4BCD-B541-DEBD07465DA9"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.5b4 From: Erik Cederstrand In-Reply-To: <54C0B75B.9070305@selasky.org> Date: Thu, 22 Jan 2015 10:21:50 +0100 Message-Id: References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1993) Cc: Kostik Belousov , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:23:03 -0000 --Apple-Mail=_5559BE3C-DD53-4BCD-B541-DEBD07465DA9 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > Den 22/01/2015 kl. 09.39 skrev Hans Petter Selasky : >=20 > Are you saying that pieces of code that runs completely unlocked using = "volatile" as only synchronization mechanism is better than what I would = call a temporary and hopefully short TCP stack performance loss? >=20 > I don't understand? How frequently do you reboot your boxes? Maybe one = every day? And you don't care? Hans, I'm just a spectator here, but please do yourself and the project = a favor and back out your change, go back to the Phabricator review once = more and let the review process roll until everyone is satisfied. Although it's not very evident in this thread, I'm sure everyone = actually appreciates your work. I also acknowledge that it's frustrating = to back out a commit that you have spent a lot of effort on, and which = fixes actual bugs. It's also frustrating to get insufficient feedback on a code review, but = you certainly got people's attention now. Now you need to trust that the = people voicing concerns will step up and provide constructive feedback = in Phabricator, so this can be committed in a timely manner, in a = quality that we expect from FreeBSD. Kind regards, Erik --Apple-Mail=_5559BE3C-DD53-4BCD-B541-DEBD07465DA9 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJUwMEvAAoJEFWwJk18WUOGNhoP/24vIV3iwuoK0+rxRI4XgI/W 5UrPI9CrUPKihaYu9TGnd1uyfXFNnMjW1d/p/8KGET8jowLG+8Q/WYnxKZfB1lQ2 yW0PRFNwH9xNYdPiW5tMQOW8S1mBaxW6rl+BjZB8VxM3h2BM9I+eM4HENbSzC1Un nvW8P8q6jUjpDiWVJSiUGuwXP//fnVAQmL/MeecFqeJvUqVgxTWixcucBEnzBYnn cButKWRBTK8B87y7eFMSCmbEhxe0bLmn1mBKpbkzEVQCFZsLZekPqoCT2GyDOA8k B/i1qlGuMZeOWLnSg2gshCCRYYOpgwVSzqegYurz4jVvR4QGufd7c1kgc+3DxX45 jnWEMprh6XlLajgrJIUcV4unWtNAlFB8WlE3o8UR+ufHqsFu6Fmy/GPqMzy3tTfJ sRk6k+5SkVHnx+8UBEncNzYIrbHZj7f0Z0tWfg3wiLNLop2BVLBCAs6+yJnGL2Ef y17J/Kidvj9+P51Grx89KzHKt1UFi4F/1uFeYHNFA27d+1qe5LQMDI/8RfV/xiYL 7gvfBCURGPNJMTSqZbj7NTdYiQ7JoCITRtKxXHN/9XMj4+NqmWnR3O97C1Lrbu4S B5vHdQNGluS6buyfBTK3pba5oUvBxqfsK39sOmTU7YVZ9YZuTOcMhg0QPKMrd6l0 R5ucUgtZ39gk09O6bqEA =j32Y -----END PGP SIGNATURE----- --Apple-Mail=_5559BE3C-DD53-4BCD-B541-DEBD07465DA9-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:25:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8E80CBF; Thu, 22 Jan 2015 09:25:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4A2737C; Thu, 22 Jan 2015 09:25:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0M9PWQ8077437; Thu, 22 Jan 2015 09:25:32 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0M9PWpf077436; Thu, 22 Jan 2015 09:25:32 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501220925.t0M9PWpf077436@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 22 Jan 2015 09:25:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277527 - head/tools/regression/file/flock X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:25:32 -0000 Author: ngie Date: Thu Jan 22 09:25:31 2015 New Revision: 277527 URL: https://svnweb.freebsd.org/changeset/base/277527 Log: Make this compile with WARNS=6 and clang/gcc MFC after: 3 days Sponsored by: EMC / Isilon Storage Division Modified: head/tools/regression/file/flock/flock.c Modified: head/tools/regression/file/flock/flock.c ============================================================================== --- head/tools/regression/file/flock/flock.c Thu Jan 22 09:07:02 2015 (r277526) +++ head/tools/regression/file/flock/flock.c Thu Jan 22 09:25:31 2015 (r277527) @@ -27,6 +27,7 @@ * $FreeBSD$ */ +#include #include #include #ifdef __FreeBSD__ @@ -52,6 +53,10 @@ #endif #include #else +#ifndef nitems +#define nitems(x) (sizeof((x)) / sizeof((x)[0])) +#endif + #ifndef __unused #ifdef __GNUC__ #define __unused __attribute__((__unused__)) @@ -61,7 +66,7 @@ #endif #endif -int verbose = 0; +static int verbose = 0; static int make_file(const char *pathname, off_t sz) @@ -1519,7 +1524,7 @@ struct test { int intr; /* non-zero if the test interrupts a lock */ }; -struct test tests[] = { +static struct test tests[] = { { test1, 1, 0 }, { test2, 2, 0 }, { test3, 3, 1 }, @@ -1537,7 +1542,6 @@ struct test tests[] = { { test15, 15, 1 }, { test16, 16, 1 }, }; -int test_count = sizeof(tests) / sizeof(tests[0]); int main(int argc, const char *argv[]) @@ -1545,7 +1549,7 @@ main(int argc, const char *argv[]) int testnum; int fd; int nointr; - int i; + unsigned i; struct sigaction sa; int test_argc; const char **test_argv; @@ -1583,7 +1587,7 @@ main(int argc, const char *argv[]) } #endif - for (i = 0; i < test_count; i++) { + for (i = 0; i < nitems(tests); i++) { if (tests[i].intr && nointr) continue; if (!testnum || tests[i].num == testnum) From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 09:49:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1E363398; Thu, 22 Jan 2015 09:49:23 +0000 (UTC) Received: from mail-yk0-x22d.google.com (mail-yk0-x22d.google.com [IPv6:2607:f8b0:4002:c07::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D19357F0; Thu, 22 Jan 2015 09:49:22 +0000 (UTC) Received: by mail-yk0-f173.google.com with SMTP id 142so249047ykq.4; Thu, 22 Jan 2015 01:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=XuppOt+MvXZLfBycHGIcxILmL8Mj6/bFmzIanlcg1k4=; b=DIIrSY2Z9szGPS2AAPJdMrycrAs6ZgQXckjWEeNmb1EkWOeYA5trjXO6LRF9ObCWAz y5iMl3M+m+94O60GrRFWVCFU+ZvbNJLb2wL4yqYzwA5ZEveEBSiPEKmNpfy0yQKLAiwU oKPGlf/jaTCzcTHKwY/8dBwpdCCBxqEebXl1Vwo9PP6L4od/B7OQVgYKJsTJughlu1Lb b0tByo8ScnSyH98Dp8S/8rBtw70yDxF6cGFX5SCzUQvjT7GEkBdSO6WcadlqcwkR5EAq vE3q+cv34MhdKr782xgvrrrah1Xs/9/Q2c5Jh5R3y3F/bx91GaSsUN+hBK3YiT5L18lf cOIw== MIME-Version: 1.0 X-Received: by 10.236.40.116 with SMTP id e80mr213054yhb.186.1421920161829; Thu, 22 Jan 2015 01:49:21 -0800 (PST) Sender: kmacybsd@gmail.com Received: by 10.170.70.132 with HTTP; Thu, 22 Jan 2015 01:49:21 -0800 (PST) In-Reply-To: <54C0B75B.9070305@selasky.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> Date: Thu, 22 Jan 2015 01:49:21 -0800 X-Google-Sender-Auth: 2MC7MWlTQOqEyhpeI1znneXyvGk Message-ID: Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: "K. Macy" To: Hans Petter Selasky Content-Type: text/plain; charset=UTF-8 Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 09:49:23 -0000 >> Sigh, you still do not understand. It is your duty to identify all pieces >> which break after your change. After that, we can argue whether each of >> them is critical or not to allow the migration. But this must have been >> done before the KPI change hit the tree. >> > > Hi, > > Are you saying that pieces of code that runs completely unlocked using > "volatile" as only synchronization mechanism is better than what I would > call a temporary and hopefully short TCP stack performance loss? > Hans - The project has long standing expectations about how changes are made to core subsystems. When you hear "understand" your ego intercedes - put that aside. I told you this first this afternoon and others have repeated it several times. When you change a KPI, consumers are updated at the same time - _period_. This protocol is not up for debate. I'm glad that others have the presence of mind and fortitude to insist on this. Your work is appreciated, but whether or not you agree about this is not relevant. We're all sorry if this upsets you but this is only a temporary setback. Channelling this work through phabricator will go a long way towards smoothing over the current friction. Think about the greater goal here, not whether this is "done" now or in a week. -K From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 10:06:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 719F86EA; Thu, 22 Jan 2015 10:06:27 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26F6E9BF; Thu, 22 Jan 2015 10:06:26 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id D40011FE023; Thu, 22 Jan 2015 11:06:23 +0100 (CET) Message-ID: <54C0CBD2.9020206@selasky.org> Date: Thu, 22 Jan 2015 11:07:14 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 10:06:27 -0000 On 01/22/15 10:49, K. Macy wrote: >>> Sigh, you still do not understand. It is your duty to identify all pieces >>> which break after your change. After that, we can argue whether each of >>> them is critical or not to allow the migration. But this must have been >>> done before the KPI change hit the tree. >>> >> >> Hi, >> >> Are you saying that pieces of code that runs completely unlocked using >> "volatile" as only synchronization mechanism is better than what I would >> call a temporary and hopefully short TCP stack performance loss? >> > > > Hans - The project has long standing expectations about how changes > are made to core subsystems. When you hear "understand" your ego > intercedes - put that aside. I told you this first this afternoon and > others have repeated it several times. When you change a KPI, > consumers are updated at the same time - _period_. This protocol is > not up for debate. I'm glad that others have the presence of mind and > fortitude to insist on this. Your work is appreciated, but whether or > not you agree about this is not relevant. > > We're all sorry if this upsets you but this is only a temporary > setback. Channelling this work through phabricator will go a long way > towards smoothing over the current friction. Think about the greater > goal here, not whether this is "done" now or in a week. > Hi Kip, That is fine by me. I didn't know about the "protocol" you refer to until now. I will revert my callout patch and hopefully without causing any build issues and then we can have another round in the Phabricator to iron out the TCP stack issues and possibly others. Sounds good. Please give me some hours to ensure that the pullout doesn't cause any build breakages. Thank you! --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 10:10:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 97BB4895; Thu, 22 Jan 2015 10:10:49 +0000 (UTC) Received: from mail-yk0-x238.google.com (mail-yk0-x238.google.com [IPv6:2607:f8b0:4002:c07::238]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 51190A15; Thu, 22 Jan 2015 10:10:49 +0000 (UTC) Received: by mail-yk0-f184.google.com with SMTP id 20so122046yks.1; Thu, 22 Jan 2015 02:10:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:message-id:in-reply-to:references:subject :mime-version:content-type; bh=hFfFxaHbl34gw1YFkWYVudSrqFx4qwqPYkvL6C39B0o=; b=Hg0li6dZ4he+CegsWnwYrJ1bUe1jAAvRaFhKJ8wNwIDqEPM+Is24wdpHdCcnUmnDm5 53z7zpQj7VT8wWJu6YeDoBxKwsrFSliaIf/qVFNx8lFepbr99it2gCIv9PFiSs03ISXg eEkAGHVOZtuJhExWrHNyKF0MkLbz8t+F/AAaKxCPNFB48kvImHL32D5NR7rH4b2Q0a2E 9OdMs2b+NHlQUOWlICmLNTWBeJJ5ijJN4WaRE5pPMFfiMcmYcwo3hbaW+rvSgvxmn/Wa hoXa/+8yK+PNHJOHtdeF1nNSEPvArnK3PvUawzHc99Wget+wBRHgkB5FZrZOLP+eOGsi NF+g== X-Received: by 10.50.142.71 with SMTP id ru7mr165143igb.0.1421921448591; Thu, 22 Jan 2015 02:10:48 -0800 (PST) X-Google-Doc-Id: 6b879da8396577f2 X-Google-Web-Client: true Date: Thu, 22 Jan 2015 02:10:47 -0800 (PST) From: roseknr1 To: bsdmailinglist@googlegroups.com Message-Id: <6e8555f0-2b8e-4f37-b33a-472c65f0c2d4@googlegroups.com> In-Reply-To: <201501151532.t0FFWV2Y037455@svn.freebsd.org> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys MIME-Version: 1.0 X-Google-IP: 117.248.6.188 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, hselasky@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 10:10:49 -0000 http://www.mrs-realestate.blogspot.in/ 2400sq.ft 2400*200=480000 only near (sez-3) tamilnadu 6km only sez-3 after 10 year land valu woooooooooooo contact:7373730713(sms only) From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 10:38:24 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 940A8104; Thu, 22 Jan 2015 10:38:24 +0000 (UTC) Received: from frv25.fwdcdn.com (frv25.fwdcdn.com [212.42.77.25]) by mx1.freebsd.org (Postfix) with ESMTP id 507C7CFA; Thu, 22 Jan 2015 10:38:24 +0000 (UTC) Received: from [10.10.14.27] (helo=frv27.fwdcdn.com) by frv25.fwdcdn.com QID:1YEEnx-000JOR-6F/RC:4; Thu, 22 Jan 2015 12:16:01 +0200 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=ukr.net; s=fsm; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date; bh=GWnMaQ00/7UAWeHXAoZVx8hsq792WHI4TleQK1GvDLo=; b=NlBDqMT2c9m6xtEVdA+5wgClRhaJ6BX0zPTTWg6QM2gJW1uivZ1AAFqQAV7TbQyENbStfqgpm5tCcYjjx63FU6EPTvHxKhv9hlOQ/lltCLYirw/ib8T0puJbIDS9zXlBO5DO4WeFKPa3LSgKBPKAc0mS9qDd04R7NqRlW2REp2w=; Received: from [178.137.225.164] (helo=nonamehost.local) by frv27.fwdcdn.com with esmtpsa ID 1YEEno-0001ET-DQ ; Thu, 22 Jan 2015 12:15:52 +0200 Date: Thu, 22 Jan 2015 12:15:51 +0200 From: Ivan Klymenko To: "Max N. Boyarov" Subject: Re: svn commit: r277487 - in head/sys: dev/drm2 dev/drm2/i915 dev/drm2/radeon modules/drm2/i915kms Message-ID: <20150122121551.77a7a9fb@nonamehost.local> In-Reply-To: References: <201501211610.t0LGAcMg085437@svn.freebsd.org> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; amd64-portbld-freebsd11.0) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Authentication-Result: IP=178.137.225.164; mail.from=fidaj@ukr.net; dkim=pass; header.d=ukr.net X-Ukrnet-Yellow: 0 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Konstantin Belousov X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 10:38:24 -0000 =D0=92 Thu, 22 Jan 2015 11:18:37 +0300 "Max N. Boyarov" =D0=BF=D0=B8=D1=88=D0=B5=D1=82: > On Wed, Jan 21, 2015 at 7:10 PM, Konstantin Belousov > wrote: > > Author: kib > > Date: Wed Jan 21 16:10:37 2015 > > New Revision: 277487 > > URL: https://svnweb.freebsd.org/changeset/base/277487 > > > > Log: > > An update for the i915 GPU driver, which brings the code up to > > Linux commit 4d93914ae3db4a897ead4b. Some related drm > > infrastructure changes are imported as needed. > > > > Biggest update is the rewrite of the i915 gem io to more closely > > follow Linux model, althought the mechanism used by FreeBSD port > > is different. > > > > Sponsored by: The FreeBSD Foundation > > MFC after: 2 month >=20 > Hi, after this commit i have many error messages like: >=20 > error: [drm:pid1121:gen6_sanitize_pm] *ERROR* Power management > discrepancy: GEN6_RP_INTERRUPT_LIMITS expected 18070000, was 18000000 >=20 >=20 > On my thinkpad t530 > info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010). > info: [drm] Driver supports precise vblank timestamp query. > drmn1: taking over the fictitious range 0xe0000000-0xf0000000 > info: [drm] Enabling RC6 states: RC6 off, RC6p off, RC6pp off > info: [drm] Connector LVDS-1: get mode from tunables: > info: [drm] - kern.vt.fb.modes.LVDS-1 > info: [drm] - kern.vt.fb.default_mode > info: [drm] Connector VGA-1: get mode from tunables: > info: [drm] - kern.vt.fb.modes.VGA-1 > info: [drm] - kern.vt.fb.default_mode > fbd1 on drmn1 >=20 >=20 >=20 Hi. I have similar error messages like: info: [drm] Supports vblank timestamp caching Rev 1 (10.10.2010). info: [drm] Driver supports precise vblank timestamp query. info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on drmn0: taking over the fictitious range 0xc0000000-0xd0000000 info: [drm] Connector LVDS-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.LVDS-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector VGA-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.VGA-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector HDMI-A-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.HDMI-A-1 info: [drm] - kern.vt.fb.default_mode info: [drm] Connector DP-1: get mode from tunables: info: [drm] - kern.vt.fb.modes.DP-1 info: [drm] - kern.vt.fb.default_mode info: [drm] GMBUS timed out, falling back to bit banging on pin 7 [gmbus bu= s dpd] fbd0 on drmn0 VT: Replacing driver "vga" with new "fb". info: [drm] Initialized i915 1.6.0 20080730 error: [drm:pid12:i915_hangcheck_ring_idle] *ERROR* Hangcheck timer elapsed= ... blt ring idle [waiting on 1104125, at 1104125], missed IRQ? ... error: [drm:pid9861:gen6_sanitize_pm] *ERROR* Power management discrepancy:= GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12060000 ... error: [drm:pid7:i915_gem_object_unbind] *ERROR* Attempting to unbind pinne= d buffer error: [drm:pid7:i915_gem_object_unbind] *ERROR* Attempting to unbind pinne= d buffer error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... G= PU hung info: [drm] capturing error event; look for more information in sysctl hw.d= ri.0.info.i915_error_state info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... G= PU hung info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on error: [drm:pid1374:gen6_sanitize_pm] *ERROR* Power management discrepancy:= GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12060000 error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... G= PU hung info: [drm] Enabling RC6 states: RC6 on, RC6p on, RC6pp on error: [drm:pid9861:gen6_sanitize_pm] *ERROR* Power management discrepancy:= GEN6_RP_INTERRUPT_LIMITS expected 18000000, was 12060000 pid 1374 (Xorg), uid 0: exited on signal 6 error: [drm:pid7:i915_gem_object_unbind] *ERROR* Attempting to unbind pinne= d buffer error: [drm:pid7:i915_gem_object_unbind] *ERROR* Attempting to unbind pinne= d buffer error: [drm:pid7:i915_gem_object_unbind] *ERROR* Attempting to unbind pinne= d buffer error: [drm:pid7:i915_gem_object_unbind] *ERROR* Attempting to unbind pinne= d buffer ... My hardware described in this report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D194766 Thanks. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:12:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5B456B76; Thu, 22 Jan 2015 11:12:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43FA21A2; Thu, 22 Jan 2015 11:12:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MBChBX027397; Thu, 22 Jan 2015 11:12:43 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MBCg57027392; Thu, 22 Jan 2015 11:12:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201501221112.t0MBCg57027392@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Thu, 22 Jan 2015 11:12:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277528 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:12:43 -0000 Author: hselasky Date: Thu Jan 22 11:12:42 2015 New Revision: 277528 URL: https://svnweb.freebsd.org/changeset/base/277528 Log: Revert for r277213: FreeBSD developers need more time to review patches in the surrounding areas like the TCP stack which are using MPSAFE callouts to restore distribution of callouts on multiple CPUs. Bump the __FreeBSD_version instead of reverting it. Suggested by: kmacy, adrian, glebius and kib Differential Revision: https://reviews.freebsd.org/D1438 Modified: head/share/man/man9/Makefile head/share/man/man9/timeout.9 head/sys/kern/init_main.c head/sys/kern/kern_condvar.c head/sys/kern/kern_lock.c head/sys/kern/kern_switch.c head/sys/kern/kern_synch.c head/sys/kern/kern_thread.c head/sys/kern/kern_timeout.c head/sys/kern/subr_sleepqueue.c head/sys/ofed/include/linux/completion.h head/sys/sys/_callout.h head/sys/sys/callout.h head/sys/sys/param.h head/sys/sys/proc.h Modified: head/share/man/man9/Makefile ============================================================================== --- head/share/man/man9/Makefile Thu Jan 22 09:25:31 2015 (r277527) +++ head/share/man/man9/Makefile Thu Jan 22 11:12:42 2015 (r277528) @@ -1570,7 +1570,6 @@ MLINKS+=timeout.9 callout.9 \ timeout.9 callout_active.9 \ timeout.9 callout_deactivate.9 \ timeout.9 callout_drain.9 \ - timeout.9 callout_drain_async.9 \ timeout.9 callout_handle_init.9 \ timeout.9 callout_init.9 \ timeout.9 callout_init_mtx.9 \ Modified: head/share/man/man9/timeout.9 ============================================================================== --- head/share/man/man9/timeout.9 Thu Jan 22 09:25:31 2015 (r277527) +++ head/share/man/man9/timeout.9 Thu Jan 22 11:12:42 2015 (r277528) @@ -29,14 +29,13 @@ .\" .\" $FreeBSD$ .\" -.Dd January 14, 2015 +.Dd October 8, 2014 .Dt TIMEOUT 9 .Os .Sh NAME .Nm callout_active , .Nm callout_deactivate , .Nm callout_drain , -.Nm callout_drain_async , .Nm callout_handle_init , .Nm callout_init , .Nm callout_init_mtx , @@ -64,232 +63,279 @@ .In sys/systm.h .Bd -literal typedef void timeout_t (void *); -typedef void callout_func_t (void *); .Ed +.Ft int +.Fn callout_active "struct callout *c" +.Ft void +.Fn callout_deactivate "struct callout *c" +.Ft int +.Fn callout_drain "struct callout *c" +.Ft void +.Fn callout_handle_init "struct callout_handle *handle" +.Bd -literal +struct callout_handle handle = CALLOUT_HANDLE_INITIALIZER(&handle); +.Ed +.Ft void +.Fn callout_init "struct callout *c" "int mpsafe" +.Ft void +.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" +.Ft void +.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" +.Ft void +.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" +.Ft int +.Fn callout_pending "struct callout *c" +.Ft int +.Fn callout_reset "struct callout *c" "int ticks" "timeout_t *func" "void *arg" +.Ft int +.Fn callout_reset_curcpu "struct callout *c" "int ticks" "timeout_t *func" \ +"void *arg" +.Ft int +.Fn callout_reset_on "struct callout *c" "int ticks" "timeout_t *func" \ +"void *arg" "int cpu" +.Ft int +.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" +.Ft int +.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "timeout_t *func" "void *arg" "int flags" +.Ft int +.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "timeout_t *func" "void *arg" "int cpu" "int flags" +.Ft int +.Fn callout_schedule "struct callout *c" "int ticks" +.Ft int +.Fn callout_schedule_curcpu "struct callout *c" "int ticks" +.Ft int +.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" +.Ft int +.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +.Ft int +.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int flags" +.Ft int +.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ +"sbintime_t pr" "int cpu" "int flags" +.Ft int +.Fn callout_stop "struct callout *c" +.Ft struct callout_handle +.Fn timeout "timeout_t *func" "void *arg" "int ticks" +.Ft void +.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" .Sh DESCRIPTION The .Nm callout API is used to schedule a call to an arbitrary function at a specific -time in the future in a single-shot fashion. -Consumers of this API are required to allocate a -.Pq struct callout -structure for each pending function invocation. -The +time in the future. +Consumers of this API are required to allocate a callout structure .Pq struct callout -structure stores the full state about any pending function call and -should be drained by a call to -.Fn callout_drain -or -.Fn callout_drain_async -before freeing. -.Sh INITIALISATION -.Ft void -.Fn callout_handle_init "struct callout_handle *handle" -This function is deprecated and is used to prepare a -.Pq struct callout_handle -structure before it can be used the first time. -If this function is called on a pending timeout, the pending timeout -cannot be cancelled and the -.Fn untimeout -function will return as if there was no timeout pending. +for each pending function invocation. +This structure stores state about the pending function invocation including +the function to be called and the time at which the function should be invoked. +Pending function calls can be cancelled or rescheduled to a different time. +In addition, +a callout structure may be reused to schedule a new function call after a +scheduled call is completed. +.Pp +Callouts only provide a single-shot mode. +If a consumer requires a periodic timer, +it must explicitly reschedule each function call. +This is normally done by rescheduling the subsequent call within the called +function. .Pp -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" -This macro is deprecated and can be used instead of -.Fn callout_handle_init -to assign the default state to the -.Pq struct callout_handle -structure when declaring static timeouts. +Callout functions must not sleep. +They may not acquire sleepable locks, +wait on condition variables, +perform blocking allocation requests, +or invoke any other action that might sleep. .Pp -.Ft void -.Fn callout_init "struct callout *c" "int mpsafe" -This function prepares a -.Pq struct callout -structure before it can be used. -This function should not be used when the callout is pending a timeout. +Each callout structure must be initialized by +.Fn callout_init , +.Fn callout_init_mtx , +.Fn callout_init_rm , +or +.Fn callout_init_rw +before it is passed to any of the other callout functions. +The +.Fn callout_init +function initializes a callout structure in +.Fa c +that is not associated with a specific lock. If the .Fa mpsafe -argument is non-zero, the callback function will be running unlocked. -Else the Giant mutex will be locked before calling the callback function. +argument is zero, +the callout structure is not considered to be +.Dq multi-processor safe ; +and the Giant lock will be acquired before calling the callout function +and released when the callout function returns. .Pp -.Ft void -.Fn callout_init_mtx "struct callout *c" "struct mtx *mtx" "int flags" -This function prepares a -.Pq struct callout -structure before it can be used. -This function should not be used when the callout is pending a timeout. The -.Fa mtx -argument should be non-zero and should specify a pointer to a valid -spinlock type of mutex or a valid regular non-sleepable mutex which -the callback subsystem should lock before calling the callback -function. -Valid +.Fn callout_init_mtx , +.Fn callout_init_rm , +and +.Fn callout_init_rw +functions initialize a callout structure in +.Fa c +that is associated with a specific lock. +The lock is specified by the +.Fa mtx , +.Fa rm , +or +.Fa rw +parameter. +The associated lock must be held while stopping or rescheduling the +callout. +The callout subsystem acquires the associated lock before calling the +callout function and releases it after the function returns. +If the callout was cancelled while the callout subsystem waited for the +associated lock, +the callout function is not called, +and the associated lock is released. +This ensures that stopping or rescheduling the callout will abort any +previously scheduled invocation. +.Pp +Only regular mutexes may be used with +.Fn callout_init_mtx ; +spin mutexes are not supported. +A sleepable read-mostly lock +.Po +one initialized with the +.Dv RM_SLEEPABLE +flag +.Pc +may not be used with +.Fn callout_init_rm . +Similarly, other sleepable lock types such as +.Xr sx 9 +and +.Xr lockmgr 9 +cannot be used with callouts because sleeping is not permitted in +the callout subsystem. +.Pp +These .Fa flags -are: +may be specified for +.Fn callout_init_mtx , +.Fn callout_init_rm , +or +.Fn callout_init_rw : .Bl -tag -width ".Dv CALLOUT_RETURNUNLOCKED" .It Dv CALLOUT_RETURNUNLOCKED -It is assumed that the callout function has released the specified -mutex before returning. -Else the callout subsystem will release the specified mutex after the -callout function has returned. +The callout function will release the associated lock itself, +so the callout subsystem should not attempt to unlock it +after the callout function returns. +.It Dv CALLOUT_SHAREDLOCK +The lock is only acquired in read mode when running the callout handler. +This flag is ignored by +.Fn callout_init_mtx . .El .Pp -.Ft void -.Fn callout_init_rm "struct callout *c" "struct rmlock *rm" "int flags" -This function is the same like the -.Fn callout_init_mtx -function except it accepts a read-mostly type of lock. -The read-mostly lock must not be initialised with the -.Dv RM_SLEEPABLE -flag. +The function +.Fn callout_stop +cancels a callout +.Fa c +if it is currently pending. +If the callout is pending, then +.Fn callout_stop +returns a non-zero value. +If the callout is not set, +has already been serviced, +or is currently being serviced, +then zero will be returned. +If the callout has an associated lock, +then that lock must be held when this function is called. .Pp -.Ft void -.Fn callout_init_rw "struct callout *c" "struct rwlock *rw" "int flags" -This function is the same like the -.Fn callout_init_mtx -function except it accepts a reader-writer type of lock. -.Sh SCHEDULING CALLOUTS -.Ft struct callout_handle -.Fn timeout "timeout_t *func" "void *arg" "int ticks" -This function is deprecated and schedules a call to the function given by the argument -.Fa func -to take place after +The function +.Fn callout_drain +is identical to +.Fn callout_stop +except that it will wait for the callout +.Fa c +to complete if it is already in progress. +This function MUST NOT be called while holding any +locks on which the callout might block, or deadlock will result. +Note that if the callout subsystem has already begun processing this +callout, then the callout function may be invoked before +.Fn callout_drain +returns. +However, the callout subsystem does guarantee that the callout will be +fully stopped before +.Fn callout_drain +returns. +.Pp +The +.Fn callout_reset +and +.Fn callout_schedule +function families schedule a future function invocation for callout +.Fa c . +If +.Fa c +already has a pending callout, +it is cancelled before the new invocation is scheduled. +These functions return a non-zero value if a pending callout was cancelled +and zero if there was no pending callout. +If the callout has an associated lock, +then that lock must be held when any of these functions are called. +.Pp +The time at which the callout function will be invoked is determined by +either the +.Fa ticks +argument or the +.Fa sbt , +.Fa pr , +and +.Fa flags +arguments. +When +.Fa ticks +is used, +the callout is scheduled to execute after .Fa ticks Ns No /hz seconds. Non-positive values of .Fa ticks are silently converted to the value .Sq 1 . -The -.Fa func -argument should be a valid pointer to a function that takes a single -.Fa void * -argument. -Upon invocation, the -.Fa func -function will receive -.Fa arg -as its only argument. -The Giant lock is locked when the -.Fa arg -function is invoked and should not be unlocked by this function. -The returned value from -.Fn timeout -is a -.Ft struct callout_handle -structure which can be used in conjunction with the -.Fn untimeout -function to request that a scheduled timeout be cancelled. -As handles are recycled by the system, it is possible, although unlikely, -that a handle from one invocation of -.Fn timeout -may match the handle of another invocation of -.Fn timeout -if both calls used the same function pointer and argument, and the first -timeout is expired or canceled before the second call. -Please ensure that the function and argument pointers are unique when using this function. .Pp -.Ft int -.Fn callout_reset "struct callout *c" "int ticks" "callout_func_t *func" "void *arg" -This function is used to schedule or re-schedule a callout. -This function at first stops the callout given by the -.Fa c -argument, if any. -Then it will start the callout given by the -.Fa c -argument. -The relative time until the timeout callback happens is given by the -.Fa ticks -argument. -The number of ticks in a second is defined by -.Dv hz -and can vary from system to system. -This function returns a non-zero value if the given callout was pending and -the callback function was prevented from being called. -Else a value of zero is returned. -If a lock is associated with the callout given by the -.Fa c -argument and it is exclusivly locked when this function is called this -function will always ensure that previous callback function, if any, -is never reached. -In other words the callout will be atomically restarted. -Else there is no such guarantee. -The callback function is given by the -.Fa func -argument and its function argument is given by the -.Fa arg -argument. -.Pp -.Ft int -.Fn callout_reset_curcpu "struct callout *c" "int ticks" "callout_func_t *func" \ -"void *arg" -This function works the same like the -.Fn callout_reset -function except the callback function given by the -.Fa func -argument will be executed on the same CPU which called this function. -A change in the CPU selection can happen if the callout has a lock -associated with it and is locked when this function is called. -A change in the CPU selection cannot happen if this function is -re-scheduled inside a callout function. -Else the callback function given by the -.Fa func -argument will be executed on the same CPU like previously done. -.Pp -.Ft int -.Fn callout_reset_on "struct callout *c" "int ticks" "callout_func_t *func" \ -"void *arg" "int cpu" -This function works the same like the -.Fn callout_reset -function except the callback function given by the -.Fa func -argument will be executed on the CPU given by the -.Fa cpu -argument. -A change in the CPU selection can happen if the callout has a lock -associated with it and is locked when this function is called. -A change in the CPU selection cannot happen if this function is -re-scheduled inside a callout function. -Else the callback function given by the -.Fa func -argument will be executed on the same CPU like previously done. -.Pp -.Ft int -.Fn callout_reset_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" -This function works the same like the -.Fn callout_reset -function except the relative or absolute time after which the timeout -callback should happen is given by the +The +.Fa sbt , +.Fa pr , +and +.Fa flags +arguments provide more control over the scheduled time including +support for higher resolution times, +specifying the precision of the scheduled time, +and setting an absolute deadline instead of a relative timeout. +The callout is scheduled to execute in a time window which begins at +the time specified in .Fa sbt -argument and extends for the amount of time specified in the -.Fa pr -argument. -This function is used when you need high precision timeouts. -If the +and extends for the amount of time specified in +.Fa pr . +If .Fa sbt -argument specifies a time in the past, +specifies a time in the past, the window is adjusted to start at the current time. A non-zero value for .Fa pr allows the callout subsystem to coalesce callouts scheduled close to each other into fewer timer interrupts, reducing processing overhead and power consumption. -The +These .Fa flags -argument may be non-zero to adjust the interpretation of the +may be specified to adjust the interpretation of .Fa sbt -and the -.Fa pr -arguments: +and +.Fa pr : .Bl -tag -width ".Dv C_DIRECT_EXEC" .It Dv C_ABSOLUTE Handle the .Fa sbt argument as an absolute time since boot. -By default, the +By default, .Fa sbt -argument is treated like a relative amount of time, +is treated as a relative amount of time, similar to .Fa ticks . .It Dv C_DIRECT_EXEC @@ -301,7 +347,7 @@ Callout functions run in this context ma and should be as small as possible because they run with absolute priority. .It Fn C_PREL Specifies relative event time precision as binary logarithm of time interval -divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4 and so on. +divided by acceptable time deviation: 1 -- 1/2, 2 -- 1/4, etc. Note that the larger of .Fa pr or this value is used as the length of the time window. @@ -314,215 +360,65 @@ Align the timeouts to calls if possible. .El .Pp -.Ft int -.Fn callout_reset_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "callout_func_t *func" "void *arg" "int flags" -This function works the same like the -.Fn callout_reset_sbt -function except the callback function given by the -.Fa func -argument will be executed on the same CPU which called this function. -A change in the CPU selection can happen if the callout has a lock -associated with it and is locked when this function is called. -A change in the CPU selection cannot happen if this function is -re-scheduled inside a callout function. -Else the callback function given by the -.Fa func -argument will be executed on the same CPU like previously done. -.Pp -.Ft int -.Fn callout_reset_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "callout_func_t *func" "void *arg" "int cpu" "int flags" -This function works the same like the -.Fn callout_reset_sbt -function except the callback function given by the +The +.Fn callout_reset +functions accept a .Fa func -argument will be executed on the CPU given by the -.Fa cpu +argument which identifies the function to be called when the time expires. +It must be a pointer to a function that takes a single +.Fa void * argument. -A change in the CPU selection can happen if the callout has a lock -associated with it and is locked when this function is called. -A change in the CPU selection cannot happen if this function is -re-scheduled inside a callout function. -Else the callback function given by the +Upon invocation, .Fa func -argument will be executed on the same CPU like previously done. -.Pp -.Ft int -.Fn callout_schedule "struct callout *c" "int ticks" -This function works the same like the -.Fn callout_reset -function except it re-uses the callback function and the callback argument -already stored in the -.Pq struct callout -structure. -.Pp -.Ft int -.Fn callout_schedule_curcpu "struct callout *c" "int ticks" -This function works the same like the -.Fn callout_reset_curcpu -function except it re-uses the callback function and the callback argument -already stored in the -.Pq struct callout -structure. -.Pp -.Ft int -.Fn callout_schedule_on "struct callout *c" "int ticks" "int cpu" -This function works the same like the -.Fn callout_reset_on -function except it re-uses the callback function and the callback argument -already stored in the -.Pq struct callout -structure. -.Pp -.Ft int -.Fn callout_schedule_sbt "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -This function works the same like the -.Fn callout_reset_sbt -function except it re-uses the callback function and the callback argument -already stored in the -.Pq struct callout -structure. -.Pp -.Ft int -.Fn callout_schedule_sbt_curcpu "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int flags" -This function works the same like the -.Fn callout_reset_sbt_curcpu -function except it re-uses the callback function and the callback argument -already stored in the -.Pq struct callout -structure. -.Pp -.Ft int -.Fn callout_schedule_sbt_on "struct callout *c" "sbintime_t sbt" \ -"sbintime_t pr" "int cpu" "int flags" -This function works the same like the -.Fn callout_reset_sbt_on -function except it re-uses the callback function and the callback argument -already stored in the -.Pq struct callout -structure. -.Sh CHECKING THE STATE OF CALLOUTS -.Ft int -.Fn callout_pending "struct callout *c" -This function returns non-zero if the callout pointed to by the -.Fa c -argument is pending for callback. -Else this function returns zero. -This function returns zero when inside the callout function if the -callout is not re-scheduled. -.Pp -.Ft int -.Fn callout_active "struct callout *c" -This function is deprecated and returns non-zero if the callout -pointed to by the -.Fa c -argument was scheduled in the past. -Else this function returns zero. -This function also returns zero after the -.Fn callout_deactivate -or the -.Fn callout_stop -or the -.Fn callout_drain -or the -.Fn callout_drain_async -function is called on the same callout as given by the -.Fa c -argument. -.Pp -.Ft void -.Fn callout_deactivate "struct callout *c" -This function is deprecated and ensures that subsequent calls to the -.Fn callout_activate -function returns zero until the callout is scheduled again. -.Sh STOPPING CALLOUTS -.Ft void -.Fn untimeout "timeout_t *func" "void *arg" "struct callout_handle handle" -This function is deprecated and cancels the timeout associated with the -.Fa handle -argument using the function pointed to by the +will receive +.Fa arg +as its only argument. +The +.Fn callout_schedule +functions reuse the .Fa func -argument and having the +and .Fa arg -arguments to validate the handle. -If the handle does not correspond to a timeout with -the function +arguments from the previous callout. +Note that one of the +.Fn callout_reset +functions must always be called to initialize .Fa func -taking the argument +and .Fa arg -no action is taken. The -.Fa handle -must be initialised by a previous call to -.Fn timeout , -.Fn callout_handle_init -or assigned the value of -.Fn CALLOUT_HANDLE_INITIALIZER "&handle" -before being passed to -.Fn untimeout . -The behavior of calling -.Fn untimeout -with an uninitialised handle -is undefined. +before one of the +.Fn callout_schedule +functions can be used. .Pp -.Ft int -.Fn callout_stop "struct callout *c" -This function is used to stop a timeout function invocation associated with the callout pointed to by the -.Fa c -argument, in a non-blocking fashion. -This function can be called multiple times in a row with no side effects, even if the callout is already stopped. This function however should not be called before the callout has been initialised. -This function returns a non-zero value if the given callout was pending and -the callback function was prevented from being called. -Else a value of zero is returned. -If a lock is associated with the callout given by the -.Fa c -argument and it is exclusivly locked when this function is called, the -.Fn callout_stop -function will always ensure that the callback function is never reached. -In other words the callout will be atomically stopped. -Else there is no such guarantee. -.Sh DRAINING CALLOUTS -.Ft int -.Fn callout_drain "struct callout *c" -This function works the same like the -.Fn callout_stop -function except it ensures that all callback functions have returned and there are no more references to the callout pointed to by the -.Fa c -argument inside the callout subsystem before it returns. -Also this function ensures that the lock, if any, associated with the -callout is no longer being used. -When this function returns, it is safe to free the callout structure pointed to by the -.Fa c -argument. +The callout subsystem provides a softclock thread for each CPU in the system. +Callouts are assigned to a single CPU and are executed by the softclock thread +for that CPU. +Initially, +callouts are assigned to CPU 0. +The +.Fn callout_reset_on , +.Fn callout_reset_sbt_on , +.Fn callout_schedule_on +and +.Fn callout_schedule_sbt_on +functions assign the callout to CPU +.Fa cpu . +The +.Fn callout_reset_curcpu , +.Fn callout_reset_sbt_curpu , +.Fn callout_schedule_curcpu +and +.Fn callout_schedule_sbt_curcpu +functions assign the callout to the current CPU. +The +.Fn callout_reset , +.Fn callout_reset_sbt , +.Fn callout_schedule +and +.Fn callout_schedule_sbt +functions schedule the callout to execute in the softclock thread of the CPU +to which it is currently assigned. .Pp -.Ft int -.Fn callout_drain_async "struct callout *c" "callout_func_t *fn" "void *arg" -This function is non-blocking and works the same like the -.Fn callout_stop -function except if it returns non-zero it means the callback function pointed to by the -.Fa fn -argument will be called back with the -.Fa arg -argument when all references to the callout pointed to by the -.Fa c -argument are gone. -If this function returns zero, it is safe to free the callout structure pointed to by the -.Fa c -argument right away. -.Sh CALLOUT FUNCTION RESTRICTIONS -Callout functions must not sleep. -They may not acquire sleepable locks, wait on condition variables, -perform blocking allocation requests, or invoke any other action that -might sleep. -.Sh CALLOUT SUBSYSTEM INTERNALS -The callout subsystem has its own set of spinlocks to protect its internal state. -The callout subsystem provides a softclock thread for each CPU in the -system. -Callouts are assigned to a single CPU and are executed by the -softclock thread for that CPU. -Initially, callouts are assigned to CPU 0. Softclock threads are not pinned to their respective CPUs by default. The softclock thread for CPU 0 can be pinned to CPU 0 by setting the .Va kern.pin_default_swi @@ -531,7 +427,50 @@ Softclock threads for CPUs other than ze respective CPUs by setting the .Va kern.pin_pcpu_swi loader tunable to a non-zero value. -.Sh "AVOIDING RACE CONDITIONS" +.Pp +The macros +.Fn callout_pending , +.Fn callout_active +and +.Fn callout_deactivate +provide access to the current state of the callout. +The +.Fn callout_pending +macro checks whether a callout is +.Em pending ; +a callout is considered +.Em pending +when a timeout has been set but the time has not yet arrived. +Note that once the timeout time arrives and the callout subsystem +starts to process this callout, +.Fn callout_pending +will return +.Dv FALSE +even though the callout function may not have finished +.Pq or even begun +executing. +The +.Fn callout_active +macro checks whether a callout is marked as +.Em active , +and the +.Fn callout_deactivate +macro clears the callout's +.Em active +flag. +The callout subsystem marks a callout as +.Em active +when a timeout is set and it clears the +.Em active +flag in +.Fn callout_stop +and +.Fn callout_drain , +but it +.Em does not +clear it when a callout expires normally via the execution of the +callout function. +.Ss "Avoiding Race Conditions" The callout subsystem invokes callout functions from its own thread context. Without some kind of synchronization, @@ -548,7 +487,7 @@ synchronization concerns. The first approach is preferred as it is the simplest: .Bl -enum -offset indent .It -Callouts can be associated with a specific lock when they are initialised +Callouts can be associated with a specific lock when they are initialized by .Fn callout_init_mtx , .Fn callout_init_rm , @@ -569,7 +508,7 @@ or .Fn callout_schedule functions to provide this safety. .Pp -A callout initialised via +A callout initialized via .Fn callout_init with .Fa mpsafe @@ -592,8 +531,9 @@ function families .Pc indicates whether or not the callout was removed. If it is known that the callout was set and the callout function has -not yet executed, then a return value of zero indicates that the -callout function is about to be called. +not yet executed, then a return value of +.Dv FALSE +indicates that the callout function is about to be called. For example: .Bd -literal -offset indent if (sc->sc_flags & SCFLG_CALLOUT_RUNNING) { @@ -649,14 +589,16 @@ The callout function should first check .Em pending flag and return without action if .Fn callout_pending -returns non-zero. +returns +.Dv TRUE . This indicates that the callout was rescheduled using .Fn callout_reset just before the callout function was invoked. If .Fn callout_active -returns zero then the callout function should also return without -action. +returns +.Dv FALSE +then the callout function should also return without action. This indicates that the callout has been stopped. Finally, the callout function should call .Fn callout_deactivate @@ -726,13 +668,129 @@ a callout should always be drained prior or releasing the storage for the callout structure. .Sh LEGACY API .Bf Sy -The +The functions below are a legacy API that will be removed in a future release. +New code should not use these routines. +.Ef +.Pp +The function +.Fn timeout +schedules a call to the function given by the argument +.Fa func +to take place after +.Fa ticks Ns No /hz +seconds. +Non-positive values of +.Fa ticks +are silently converted to the value +.Sq 1 . +.Fa func +should be a pointer to a function that takes a +.Fa void * +argument. +Upon invocation, +.Fa func +will receive +.Fa arg +as its only argument. +The return value from .Fn timeout +is a +.Ft struct callout_handle +which can be used in conjunction with the +.Fn untimeout +function to request that a scheduled timeout be canceled. +.Pp +The function +.Fn callout_handle_init +can be used to initialize a handle to a state which will cause +any calls to +.Fn untimeout +with that handle to return with no side +effects. +.Pp +Assigning a callout handle the value of +.Fn CALLOUT_HANDLE_INITIALIZER +performs the same function as +.Fn callout_handle_init +and is provided for use on statically declared or global callout handles. +.Pp +The function +.Fn untimeout +cancels the timeout associated with +.Fa handle +using the +.Fa func and +.Fa arg +arguments to validate the handle. +If the handle does not correspond to a timeout with +the function +.Fa func +taking the argument +.Fa arg +no action is taken. +.Fa handle +must be initialized by a previous call to +.Fn timeout , +.Fn callout_handle_init , +or assigned the value of +.Fn CALLOUT_HANDLE_INITIALIZER "&handle" +before being passed to +.Fn untimeout . +The behavior of calling .Fn untimeout -functions are a legacy API that will be removed in a future release. -New code should not use these routines. -.Ef +with an uninitialized handle +is undefined. +.Pp +As handles are recycled by the system, it is possible (although unlikely) +that a handle from one invocation of +.Fn timeout +may match the handle of another invocation of +.Fn timeout +if both calls used the same function pointer and argument, and the first +timeout is expired or canceled before the second call. +The timeout facility offers O(1) running time for +.Fn timeout +and +.Fn untimeout . +Timeouts are executed from +.Fn softclock +with the +.Va Giant +lock held. +Thus they are protected from re-entrancy. +.Sh RETURN VALUES +The +.Fn callout_active +macro returns the state of a callout's +.Em active +flag. +.Pp +The +.Fn callout_pending +macro returns the state of a callout's +.Em pending +flag. +.Pp +The +.Fn callout_reset +and +.Fn callout_schedule +function families return non-zero if the callout was pending before the new +function invocation was scheduled. +.Pp +The +.Fn callout_stop +and +.Fn callout_drain +functions return non-zero if the callout was still pending when it was +called or zero otherwise. +The +.Fn timeout +function returns a +.Ft struct callout_handle +that can be passed to *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:17:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 593C1D2E; Thu, 22 Jan 2015 11:17:22 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0EE551D3; Thu, 22 Jan 2015 11:17:21 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id EE14A1FE023; Thu, 22 Jan 2015 12:17:18 +0100 (CET) Message-ID: <54C0DC71.6080106@selasky.org> Date: Thu, 22 Jan 2015 12:18:09 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: "K. Macy" Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> <54C0CBD2.9020206@selasky.org> In-Reply-To: <54C0CBD2.9020206@selasky.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , Warner Losh X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:17:22 -0000 Hi, Please move any further comments on this thread to: https://reviews.freebsd.org/D1438 See "r277528". Discussion ends here. --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:27:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13EB13A3; Thu, 22 Jan 2015 11:27:02 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CD35733C; Thu, 22 Jan 2015 11:27:01 +0000 (UTC) Received: from [192.168.1.134] (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t0MBQ0VH093440 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jan 2015 06:26:01 -0500 (EST) (envelope-from randall@lakerest.net) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.1\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Randy Stewart In-Reply-To: <54C0B75B.9070305@selasky.org> Date: Thu, 22 Jan 2015 06:26:53 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <04866FE0-43BF-4569-9B67-7ED5F6F4F736@lakerest.net> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.1) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , "M. Warner Losh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:27:02 -0000 Hans: We (netflix) run in production 35% of the internet with these very = things you identify no lock an all. We *do* have some issue we are looking at = but so far I have *never* connected the dots the way you were claiming that would cause a crash. I can see where TCP would do incorrect retransmissions = but I did *not* see a crash. Now granted my look was quick at this, but that was due to time constraints and the holidays. I am going to put myself = full-time on this to see if I can understand both how you got at =93there is a = panic in tcp=94 and it must fully be the callout-subsystem thus we need to re-write large = parts of it. You *may* be correct in a re-write is needed, you *may* be completely = incorrect. In either case I plan to dig into this and find out. R > On Jan 22, 2015, at 3:39 AM, Hans Petter Selasky = wrote: >=20 > On 01/22/15 09:10, Konstantin Belousov wrote: >> On Thu, Jan 22, 2015 at 08:14:26AM +0100, Hans Petter Selasky wrote: >>> On 01/22/15 06:26, Warner Losh wrote: >>> > >>>>> The code simply needs an update. It is not broken in any ways - = right? If it is not broken, fixing it is not that urgent. >>>>=20 >>>> Radically changing the performance characteristics is breaking the = code. Performance regression in the TCP stack is urgent to fix. >>=20 >>> Not being able to enumerate what all the consumers are that use this = and >>> provide an analysis about why they aren?t important to fix is a bug = in >>> your process, and in your interaction with the project. We simply do = not >>> operate that way. >> Right, I completely agree with this statement. >>=20 >>=20 >>> Hi, >>>=20 >>> My plan is to work out a patch for the TCP stack today, which only >>> change the callout_init() call or its function. This should not need = any >>> particular review. I'll let adrian test and review, because I think = he >>> is closer to me timezone wise and you're standing on my head saying = its >>> urgent. If he is still not happy, I can back my change out. Else it >>> remains in -current AS-IS. >> TCP regresssion was noted, so it is brought in front. There is = nothing >> else which makes TCP issue different from other (hidden) issues. >>=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> MFC to 10-stable I can delay for sure until >>> all issues you report to me are fixed. >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>=20 >> Sigh, you still do not understand. It is your duty to identify all = pieces >> which break after your change. After that, we can argue whether each = of >> them is critical or not to allow the migration. But this must have = been >> done before the KPI change hit the tree. >>=20 >=20 > Hi, >=20 > Are you saying that pieces of code that runs completely unlocked using = "volatile" as only synchronization mechanism is better than what I would = call a temporary and hopefully short TCP stack performance loss? >=20 > I don't understand? How frequently do you reboot your boxes? Maybe one = every day? And you don't care? >=20 > --HPS >=20 >=20 >=20 ----- Randall Stewart randall@lakerest.net From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:29:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4EE2D56B; Thu, 22 Jan 2015 11:29:55 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0665F35C; Thu, 22 Jan 2015 11:29:54 +0000 (UTC) Received: from [192.168.1.134] (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t0MBSrUU093483 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jan 2015 06:28:55 -0500 (EST) (envelope-from rrs@lakerest.net) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.1\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Randall Stewart In-Reply-To: <54C0B75B.9070305@selasky.org> Date: Thu, 22 Jan 2015 06:29:46 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: <88A39F5F-A9F4-432F-8BAB-9393DAA8F36A@lakerest.net> References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2070.1) Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , "M. Warner Losh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:29:55 -0000 Hans Thats great, could you please open a project branch that we can look at it in too? I would very much appreciate that. Sometimes I like to look at the whole code with it all in place (not just patches) and a project branch really helps with that. R > On Jan 22, 2015, at 3:39 AM, Hans Petter Selasky = wrote: >=20 > On 01/22/15 09:10, Konstantin Belousov wrote: >> On Thu, Jan 22, 2015 at 08:14:26AM +0100, Hans Petter Selasky wrote: >>> On 01/22/15 06:26, Warner Losh wrote: >>> > >>>>> The code simply needs an update. It is not broken in any ways - = right? If it is not broken, fixing it is not that urgent. >>>>=20 >>>> Radically changing the performance characteristics is breaking the = code. Performance regression in the TCP stack is urgent to fix. >>=20 >>> Not being able to enumerate what all the consumers are that use this = and >>> provide an analysis about why they aren?t important to fix is a bug = in >>> your process, and in your interaction with the project. We simply do = not >>> operate that way. >> Right, I completely agree with this statement. >>=20 >>=20 >>> Hi, >>>=20 >>> My plan is to work out a patch for the TCP stack today, which only >>> change the callout_init() call or its function. This should not need = any >>> particular review. I'll let adrian test and review, because I think = he >>> is closer to me timezone wise and you're standing on my head saying = its >>> urgent. If he is still not happy, I can back my change out. Else it >>> remains in -current AS-IS. >> TCP regresssion was noted, so it is brought in front. There is = nothing >> else which makes TCP issue different from other (hidden) issues. >>=20 >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>> MFC to 10-stable I can delay for sure until >>> all issues you report to me are fixed. >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D >>=20 >> Sigh, you still do not understand. It is your duty to identify all = pieces >> which break after your change. After that, we can argue whether each = of >> them is critical or not to allow the migration. But this must have = been >> done before the KPI change hit the tree. >>=20 >=20 > Hi, >=20 > Are you saying that pieces of code that runs completely unlocked using = "volatile" as only synchronization mechanism is better than what I would = call a temporary and hopefully short TCP stack performance loss? >=20 > I don't understand? How frequently do you reboot your boxes? Maybe one = every day? And you don't care? >=20 > --HPS >=20 >=20 >=20 ------------------------------ Randall Stewart 803-317-4952 (cell) From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:49:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ED1719F6; Thu, 22 Jan 2015 11:49:27 +0000 (UTC) Received: from mail.turbocat.net (heidi.turbocat.net [88.198.202.214]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A32B67D9; Thu, 22 Jan 2015 11:49:27 +0000 (UTC) Received: from laptop015.home.selasky.org (cm-176.74.213.204.customer.telag.net [176.74.213.204]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.turbocat.net (Postfix) with ESMTPSA id 3709B1FE023; Thu, 22 Jan 2015 12:49:25 +0100 (CET) Message-ID: <54C0E3F7.9080403@selasky.org> Date: Thu, 22 Jan 2015 12:50:15 +0100 From: Hans Petter Selasky User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Randy Stewart Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys References: <201501151532.t0FFWV2Y037455@svn.freebsd.org> <54BDD9E1.6090505@selasky.org> <20150120075126.GA42409@kib.kiev.ua> <54BE0AAA.4050104@selasky.org> <20150120090057.GD42409@kib.kiev.ua> <54BE21F0.6010602@selasky.org> <7C692107-51CF-4DFA-BD6C-623D56893150@bsdimp.com> <54C0A352.8090701@selasky.org> <20150122081023.GT42409@kib.kiev.ua> <54C0B75B.9070305@selasky.org> <04866FE0-43BF-4569-9B67-7ED5F6F4F736@lakerest.net> In-Reply-To: <04866FE0-43BF-4569-9B67-7ED5F6F4F736@lakerest.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Cc: Adrian Chadd , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Konstantin Belousov , "M. Warner Losh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:49:28 -0000 On 01/22/15 12:26, Randy Stewart wrote: > Hans: > > We (netflix) run in production 35% of the internet with these very things > you identify no lock an all. We *do* have some issue we are looking at but so far > I have *never* connected the dots the way you were claiming that would > cause a crash. I can see where TCP would do incorrect retransmissions but > I did *not* see a crash. Now granted my look was quick at this, but that > was due to time constraints and the holidays. I am going to put myself full-time > on this to see if I can understand both how you got at there is a panic in tcp and > it must fully be the callout-subsystem thus we need to re-write large parts of it. > > You *may* be correct in a re-write is needed, you *may* be completely incorrect. > In either case I plan to dig into this and find out. > Hi, There are multiple issues in the bag here ... --HPS From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 05:19:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1C237620; Thu, 22 Jan 2015 05:19:33 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CCC4C8E6; Thu, 22 Jan 2015 05:19:32 +0000 (UTC) Received: from [192.168.1.134] (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t0M5IO0L086239 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jan 2015 00:18:25 -0500 (EST) (envelope-from randall@lakerest.net) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.1\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Randy Stewart In-Reply-To: Date: Thu, 22 Jan 2015 00:19:18 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2070.1) X-Mailman-Approved-At: Thu, 22 Jan 2015 12:30:40 +0000 Cc: Hans Petter Selasky , "src-committers@freebsd.org" , Kip Macy , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov , "M. Warner Losh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 05:19:33 -0000 All: I have finally pulled my head out of the sands of TLS and=20 had some time to look at this interesting long thread. I agree with Warner and Adrian on this.. Lets back it out and then in a branch chew this over piece by piece.. R > On Jan 21, 2015, at 7:10 PM, Adrian Chadd wrote: >=20 > On 21 January 2015 at 16:07, K. Macy wrote: >>>> HPS: Your change failed to meet these guidelines. Some of us are = upset >>>> because these guidelines are fairly fundamental for the on-going >>>> viability of FreeBSD. Due to linguistic / time zone / cultural >>>> differences these expectations have not been adequately = communicated >>>> to you. You are not in the USB sandbox where others need for your >>>> support outweighs the inconvenience of random breakage. >>>>=20 >>>> It sounds like you are making progress towards updating the = concerns >>>> that have been voiced. If kib's observations are in fact = comprehensive >>>> then adding a callout_init_cpu function and updating all clients so >>>> that their callouts continue to be scheduled on a CPU other than = the >>>> BSP will suffice and we can all move on. >>>=20 >>> Is there some reason that we can=E2=80=99t back things out, break = things down into >>> smaller pieces and have everything pass through phabric with a wide >>> ranging review? Given the fundamental nature of these changes, they >>> really need better review and doing it after the fact seems to be to = be >>> too risky. I=E2=80=99m not debating that this =E2=80=9Cfixes=E2=80=9D = some issues, but given the >>> performance regression, it sure seems like we may need a different >>> solution to be implemented and hashing that out in a branch might be >>> the best approach. >>=20 >> Thank you. A more incremental approach would be appreciated by many = of >> us. To avoid the bystander effect we can permit explicit timeouts for >> review-to-commit (72 hours?) so that we don't collectively end up >> sandbagging him. >=20 > I'm +1 for this. >=20 >=20 >=20 > -a >=20 >=20 ----- Randall Stewart randall@lakerest.net From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:19:02 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BAB7DEBF; Thu, 22 Jan 2015 11:19:02 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 778AD1F2; Thu, 22 Jan 2015 11:19:02 +0000 (UTC) Received: from [192.168.1.134] (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t0MBHvF0093229 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jan 2015 06:17:57 -0500 (EST) (envelope-from rrs@lakerest.net) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.1\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Randall Stewart In-Reply-To: Date: Thu, 22 Jan 2015 06:18:49 -0500 Content-Transfer-Encoding: quoted-printable Message-Id: References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> To: Adrian Chadd X-Mailer: Apple Mail (2.2070.1) X-Mailman-Approved-At: Thu, 22 Jan 2015 12:50:30 +0000 Cc: Hans Petter Selasky , "src-committers@freebsd.org" , Kip Macy , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov , "M. Warner Losh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:19:03 -0000 Let me re-send my email.. my silly mac sent my first try from the wrong = address.. sigh (sorry moderator where ever you are ;-o) All: I have finally pulled my head out of the sands of TLS and=20 had some time to look at this interesting long thread. I agree with Warner and Adrian on this.. Lets back it out and then in a branch chew this over piece by piece.. R As an addition I have decided to get my head back into this, I was one of the ones on Hann=E2=80=99s original email and I had asked him to wait until *after* the Holiday=E2=80=99s to do anything (thinking on continuing the discussion) I did *not* realize he planned on roto-tilling the callout system.. sigh =20 > On Jan 21, 2015, at 7:10 PM, Adrian Chadd wrote: >=20 > On 21 January 2015 at 16:07, K. Macy wrote: >>>> HPS: Your change failed to meet these guidelines. Some of us are = upset >>>> because these guidelines are fairly fundamental for the on-going >>>> viability of FreeBSD. Due to linguistic / time zone / cultural >>>> differences these expectations have not been adequately = communicated >>>> to you. You are not in the USB sandbox where others need for your >>>> support outweighs the inconvenience of random breakage. >>>>=20 >>>> It sounds like you are making progress towards updating the = concerns >>>> that have been voiced. If kib's observations are in fact = comprehensive >>>> then adding a callout_init_cpu function and updating all clients so >>>> that their callouts continue to be scheduled on a CPU other than = the >>>> BSP will suffice and we can all move on. >>>=20 >>> Is there some reason that we can=E2=80=99t back things out, break = things down into >>> smaller pieces and have everything pass through phabric with a wide >>> ranging review? Given the fundamental nature of these changes, they >>> really need better review and doing it after the fact seems to be to = be >>> too risky. I=E2=80=99m not debating that this =E2=80=9Cfixes=E2=80=9D = some issues, but given the >>> performance regression, it sure seems like we may need a different >>> solution to be implemented and hashing that out in a branch might be >>> the best approach. >>=20 >> Thank you. A more incremental approach would be appreciated by many = of >> us. To avoid the bystander effect we can permit explicit timeouts for >> review-to-commit (72 hours?) so that we don't collectively end up >> sandbagging him. >=20 > I'm +1 for this. >=20 >=20 >=20 > -a ------------------------------ Randall Stewart 803-317-4952 (cell) From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 11:22:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3A651EB; Thu, 22 Jan 2015 11:22:25 +0000 (UTC) Received: from lakerest.net (lakerest.net [162.235.35.161]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "lakerest.net", Issuer "Stewart" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B9C3D2F3; Thu, 22 Jan 2015 11:22:24 +0000 (UTC) Received: from [192.168.1.134] (173.64-138-239-net.sccoast.net [64.138.239.173]) (authenticated bits=0) by lakerest.net (8.14.4/8.14.3) with ESMTP id t0MBLKH4093292 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Thu, 22 Jan 2015 06:21:21 -0500 (EST) (envelope-from randall@lakerest.net) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2070.1\)) Subject: Re: svn commit: r277213 - in head: share/man/man9 sys/kern sys/ofed/include/linux sys/sys From: Randy Stewart In-Reply-To: Date: Thu, 22 Jan 2015 06:22:13 -0500 Content-Transfer-Encoding: 7bit Message-Id: <4E451459-6993-49E8-BB33-502DC0D82C19@lakerest.net> References: <20150120075126.GA42409@kib.kiev.ua> <20150120211137.GY15484@FreeBSD.org> <54BED6FB.8060401@selasky.org> <54BEE62D.2060703@ignoranthack.me> <54BEE8E6.3080009@ignoranthack.me> <54BEEA7F.1070301@ignoranthack.me> <54BEF154.3030606@ignoranthack.me> <20150121181512.GE15484@FreeBSD.org> To: Randall Ray Stewart X-Mailer: Apple Mail (2.2070.1) X-Mailman-Approved-At: Thu, 22 Jan 2015 12:50:48 +0000 Cc: Hans Petter Selasky , Adrian Chadd , "src-committers@freebsd.org" , Kip Macy , Jason Wolfe , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , Sean Bruno , Gleb Smirnoff , Konstantin Belousov , "M. Warner Losh" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 11:22:25 -0000 Hans: I think this is the wrong approach. You should: a) Back out the commit you did to head b) create a project branch and put your changes in there c) fix *everything* you break in these subtle ways d) Discuss through a review process if your changes are correct e) When consensus is reached then and only then put it into head with all the fixes. If you are not willing to do the above, then we need this taken up to core and have them act on it. I think enough folks have voiced concern that you should be willing to do the above steps. R > On Jan 22, 2015, at 12:19 AM, Randy Stewart wrote: > > All: > > I have finally pulled my head out of the sands of TLS and > had some time to look at this interesting long thread. I agree > with Warner and Adrian on this.. Lets back it out > and then in a branch chew this over piece by piece.. > > R ----- Randall Stewart randall@lakerest.net From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 14:49:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 802F231C; Thu, 22 Jan 2015 14:49:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6BEDCE06; Thu, 22 Jan 2015 14:49:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MEnbeq026762; Thu, 22 Jan 2015 14:49:37 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MEnbJm026761; Thu, 22 Jan 2015 14:49:37 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501221449.t0MEnbJm026761@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Thu, 22 Jan 2015 14:49:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277529 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 14:49:37 -0000 Author: mav Date: Thu Jan 22 14:49:36 2015 New Revision: 277529 URL: https://svnweb.freebsd.org/changeset/base/277529 Log: Don't count requests with status sent as overlapping. While those requests are still in target OOA queue, for initiator they are already completed, so tags can be reused. MFC after: 1 week Modified: head/sys/cam/ctl/ctl.c Modified: head/sys/cam/ctl/ctl.c ============================================================================== --- head/sys/cam/ctl/ctl.c Thu Jan 22 11:12:42 2015 (r277528) +++ head/sys/cam/ctl/ctl.c Thu Jan 22 14:49:36 2015 (r277529) @@ -10826,7 +10826,8 @@ ctl_check_for_blockage(struct ctl_lun *l ooa_io->io_hdr.nexus.targ_port) && (pending_io->io_hdr.nexus.initid.id == ooa_io->io_hdr.nexus.initid.id)) - && ((ooa_io->io_hdr.flags & CTL_FLAG_ABORT) == 0)) + && ((ooa_io->io_hdr.flags & (CTL_FLAG_ABORT | + CTL_FLAG_STATUS_SENT)) == 0)) return (CTL_ACTION_OVERLAP); /* @@ -10847,7 +10848,8 @@ ctl_check_for_blockage(struct ctl_lun *l ooa_io->io_hdr.nexus.targ_port) && (pending_io->io_hdr.nexus.initid.id == ooa_io->io_hdr.nexus.initid.id)) - && ((ooa_io->io_hdr.flags & CTL_FLAG_ABORT) == 0)) + && ((ooa_io->io_hdr.flags & (CTL_FLAG_ABORT | + CTL_FLAG_STATUS_SENT)) == 0)) return (CTL_ACTION_OVERLAP_TAG); /* From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 16:27:26 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A0C4DCBB; Thu, 22 Jan 2015 16:27:26 +0000 (UTC) Received: from mx1.sbone.de (mx1.sbone.de [IPv6:2a01:4f8:130:3ffc::401:25]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client CN "mx1.sbone.de", Issuer "SBone.DE" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 57E58C6F; Thu, 22 Jan 2015 16:27:26 +0000 (UTC) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:31::2013:587]) (using TLSv1 with cipher ADH-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by mx1.sbone.de (Postfix) with ESMTPS id 2A6AA25D3815; Thu, 22 Jan 2015 16:27:13 +0000 (UTC) Received: from content-filter.sbone.de (content-filter.sbone.de [IPv6:fde9:577b:c1a9:31::2013:2742]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D724FC7700C; Thu, 22 Jan 2015 16:27:12 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:31::2013:587]) by content-filter.sbone.de (content-filter.sbone.de [fde9:577b:c1a9:31::2013:2742]) (amavisd-new, port 10024) with ESMTP id Cvh6QVbohJBu; Thu, 22 Jan 2015 16:27:01 +0000 (UTC) Received: from [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6] (orange-tun0-ula.sbone.de [IPv6:fde9:577b:c1a9:4420:cabc:c8ff:fe8b:4fe6]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id D3509C76FFA; Thu, 22 Jan 2015 16:27:00 +0000 (UTC) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.1 \(1993\)) Subject: Re: svn commit: r277511 - head/sys/dev/firewire From: "Bjoern A. Zeeb" In-Reply-To: <201501212008.t0LK8PhR001309@svn.freebsd.org> Date: Thu, 22 Jan 2015 16:26:58 +0000 Content-Transfer-Encoding: quoted-printable Message-Id: References: <201501212008.t0LK8PhR001309@svn.freebsd.org> To: Will Andrews , gibbs@FreeBSD.org X-Mailer: Apple Mail (2.1993) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 16:27:26 -0000 > On 21 Jan 2015, at 20:08 , Will Andrews wrote: >=20 > Author: will > Date: Wed Jan 21 20:08:24 2015 > New Revision: 277511 > URL: https://svnweb.freebsd.org/changeset/base/277511 >=20 > Log: > Fix remote DMA based firewire debugging when targeting > systems with more than 4GB of physical memory. >=20 > To remotely debug the system 'stealthy' which has a kernel > with this change installed and firewire properly configured: >=20 > % fwcontrol -m stealthy (or stealthy's firewire EUI64) > % kgdb kernel /dev/fwmem0.0 >=20 > sys/dev/firewire/fwohci.c: > Rather than hard code the upper limit for hw based > automatic responses to remote DMA requests at 4GB, > program the hardware using Maxmem, the page number > one higher than the highest physical page detected > in the system. >=20 > While here, garbage collect more useless splfw() > calls. >=20 > Submitted by: gibbs > MFC after: 1 week > Sponsored by: Spectra Logic > MFSpectraBSD: 1110994 on 2015/01/06 arm doesn=E2=80=99t define a Maxmem; the kernel builds are thus = currently broken. converting beaglebone.dts -> = /storage/head/obj/arm.armv6/scratch/tmp/bz/head.svn/sys/BEAGLEBONE/beagleb= one.dtb = /scratch/tmp/bz/head.svn/sys/modules/firewire/firewire/../../../dev/firewi= re/fwohci.c:1856:28: error: use of undeclared identifier 'Maxmem' prequpper =3D ((uintmax_t)Maxmem << PAGE_SHIFT) = >> 16; ^ = /scratch/tmp/bz/head.svn/sys/modules/firewire/firewire/../../../dev/firewi= re/fwohci.c:1862:20: error: use of undeclared identifier 'Maxmem' (uintmax_t)Maxmem << PAGE_SHIFT, ^ 2 errors generated. =E2=80=94=20 Bjoern A. Zeeb Charles Haddon Spurgeon: "Friendship is one of the sweetest joys of life. Many might have failed beneath the bitterness of their trial had they not found a friend." From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 16:49:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 40A83434; Thu, 22 Jan 2015 16:49:18 +0000 (UTC) Received: from smtp6.ore.mailhop.org (smtp6.ore.mailhop.org [54.149.35.133]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EFAEEAC; Thu, 22 Jan 2015 16:49:17 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp6.ore.mailhop.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1YEKwX-00054F-5b; Thu, 22 Jan 2015 16:49:17 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0MGnDuI004093; Thu, 22 Jan 2015 09:49:14 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+Fuh8lLdULr5lfkMYFElGA Message-ID: <1421945353.14601.402.camel@freebsd.org> Subject: Re: svn commit: r277511 - head/sys/dev/firewire From: Ian Lepore To: "Bjoern A. Zeeb" Date: Thu, 22 Jan 2015 09:49:13 -0700 In-Reply-To: References: <201501212008.t0LK8PhR001309@svn.freebsd.org> Content-Type: text/plain; charset="iso-8859-7" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, gibbs@FreeBSD.org, src-committers , Will Andrews X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 16:49:18 -0000 On Thu, 2015-01-22 at 16:26 +0000, Bjoern A. Zeeb wrote: > > On 21 Jan 2015, at 20:08 , Will Andrews wrote: > > > > Author: will > > Date: Wed Jan 21 20:08:24 2015 > > New Revision: 277511 > > URL: https://svnweb.freebsd.org/changeset/base/277511 > > > > Log: > > Fix remote DMA based firewire debugging when targeting > > systems with more than 4GB of physical memory. > > > > To remotely debug the system 'stealthy' which has a kernel > > with this change installed and firewire properly configured: > > > > % fwcontrol -m stealthy (or stealthy's firewire EUI64) > > % kgdb kernel /dev/fwmem0.0 > > > > sys/dev/firewire/fwohci.c: > > Rather than hard code the upper limit for hw based > > automatic responses to remote DMA requests at 4GB, > > program the hardware using Maxmem, the page number > > one higher than the highest physical page detected > > in the system. > > > > While here, garbage collect more useless splfw() > > calls. > > > > Submitted by: gibbs > > MFC after: 1 week > > Sponsored by: Spectra Logic > > MFSpectraBSD: 1110994 on 2015/01/06 > > arm doesnt define a Maxmem; the kernel builds are thus currently broken. > > converting beaglebone.dts -> /storage/head/obj/arm.armv6/scratch/tmp/bz/head.svn/sys/BEAGLEBONE/beaglebone.dtb > /scratch/tmp/bz/head.svn/sys/modules/firewire/firewire/../../../dev/firewire/fwohci.c:1856:28: error: use of undeclared identifier 'Maxmem' > prequpper = ((uintmax_t)Maxmem << PAGE_SHIFT) >> 16; > ^ > /scratch/tmp/bz/head.svn/sys/modules/firewire/firewire/../../../dev/firewire/fwohci.c:1862:20: error: use of undeclared identifier 'Maxmem' > (uintmax_t)Maxmem << PAGE_SHIFT, > ^ > 2 errors generated. This is the first I've heard of Maxmem. I think I can get it added to arm pretty quickly. -- Ian From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 17:09:55 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0E247FB; Thu, 22 Jan 2015 17:09:55 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2A8B640; Thu, 22 Jan 2015 17:09:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MH9sDa093006; Thu, 22 Jan 2015 17:09:54 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MH9svg093005; Thu, 22 Jan 2015 17:09:54 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501221709.t0MH9svg093005@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Thu, 22 Jan 2015 17:09:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277530 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 17:09:55 -0000 Author: will Date: Thu Jan 22 17:09:54 2015 New Revision: 277530 URL: https://svnweb.freebsd.org/changeset/base/277530 Log: Improve CARP logging so that all state transitions are logged. sys/netinet/ip_carp.c: Add a "reason" string parameter to carp_set_state() and carp_master_down_locked() allowing more specific logging information to be passed into these apis. Refactor existing state transition logging into a single log call in carp_set_state(). Update all calls to carp_set_state() and carp_master_down_locked() to pass an appropriate reason string. For state transitions that were previously logged, the output should be unchanged. Submitted by: gibbs (original), asomers (updated) MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1039697 on 2014/02/11 (original) 1049992 on 2014/03/21 (updated) Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Thu Jan 22 14:49:36 2015 (r277529) +++ head/sys/netinet/ip_carp.c Thu Jan 22 17:09:54 2015 (r277530) @@ -304,11 +304,12 @@ static void carp_destroy(struct carp_sof static struct carp_if *carp_alloc_if(struct ifnet *); static void carp_free_if(struct carp_if *); -static void carp_set_state(struct carp_softc *, int); +static void carp_set_state(struct carp_softc *, int, const char* reason); static void carp_sc_state(struct carp_softc *); static void carp_setrun(struct carp_softc *, sa_family_t); static void carp_master_down(void *); -static void carp_master_down_locked(struct carp_softc *); +static void carp_master_down_locked(struct carp_softc *, + const char* reason); static void carp_send_ad(void *); static void carp_send_ad_locked(struct carp_softc *); static void carp_addroute(struct carp_softc *); @@ -654,11 +655,8 @@ carp_input_c(struct mbuf *m, struct carp if (timevalcmp(&sc_tv, &ch_tv, >) || timevalcmp(&sc_tv, &ch_tv, ==)) { callout_stop(&sc->sc_ad_tmo); - CARP_LOG("VHID %u@%s: MASTER -> BACKUP " - "(more frequent advertisement received)\n", - sc->sc_vhid, - sc->sc_carpdev->if_xname); - carp_set_state(sc, BACKUP); + carp_set_state(sc, BACKUP, + "more frequent advertisement received"); carp_setrun(sc, 0); carp_delroute(sc); } @@ -669,11 +667,8 @@ carp_input_c(struct mbuf *m, struct carp * and this one claims to be slower, treat him as down. */ if (V_carp_preempt && timevalcmp(&sc_tv, &ch_tv, <)) { - CARP_LOG("VHID %u@%s: BACKUP -> MASTER " - "(preempting a slower master)\n", - sc->sc_vhid, - sc->sc_carpdev->if_xname); - carp_master_down_locked(sc); + carp_master_down_locked(sc, + "preempting a slower master"); break; } @@ -684,11 +679,7 @@ carp_input_c(struct mbuf *m, struct carp */ sc_tv.tv_sec = sc->sc_advbase * 3; if (timevalcmp(&sc_tv, &ch_tv, <)) { - CARP_LOG("VHID %u@%s: BACKUP -> MASTER " - "(master timed out)\n", - sc->sc_vhid, - sc->sc_carpdev->if_xname); - carp_master_down_locked(sc); + carp_master_down_locked(sc, "master will time out"); break; } @@ -1153,10 +1144,7 @@ carp_master_down(void *v) CURVNET_SET(sc->sc_carpdev->if_vnet); if (sc->sc_state == BACKUP) { - CARP_LOG("VHID %u@%s: BACKUP -> MASTER (master down)\n", - sc->sc_vhid, - sc->sc_carpdev->if_xname); - carp_master_down_locked(sc); + carp_master_down_locked(sc, "master timed out"); } CURVNET_RESTORE(); @@ -1164,14 +1152,14 @@ carp_master_down(void *v) } static void -carp_master_down_locked(struct carp_softc *sc) +carp_master_down_locked(struct carp_softc *sc, const char *reason) { CARP_LOCK_ASSERT(sc); switch (sc->sc_state) { case BACKUP: - carp_set_state(sc, MASTER); + carp_set_state(sc, MASTER, reason); carp_send_ad_locked(sc); #ifdef INET carp_send_arp(sc); @@ -1212,10 +1200,7 @@ carp_setrun(struct carp_softc *sc, sa_fa switch (sc->sc_state) { case INIT: - CARP_LOG("VHID %u@%s: INIT -> BACKUP\n", - sc->sc_vhid, - sc->sc_carpdev->if_xname); - carp_set_state(sc, BACKUP); + carp_set_state(sc, BACKUP, "initialization complete"); carp_setrun(sc, 0); break; case BACKUP: @@ -1717,12 +1702,12 @@ carp_ioctl(struct ifreq *ifr, u_long cmd switch (carpr.carpr_state) { case BACKUP: callout_stop(&sc->sc_ad_tmo); - carp_set_state(sc, BACKUP); + carp_set_state(sc, BACKUP, "SIOCSVH"); carp_setrun(sc, 0); carp_delroute(sc); break; case MASTER: - carp_master_down_locked(sc); + carp_master_down_locked(sc, "SIOCSVH"); break; default: break; @@ -1964,7 +1949,7 @@ carp_detach_locked(struct ifaddr *ifa) } static void -carp_set_state(struct carp_softc *sc, int state) +carp_set_state(struct carp_softc *sc, int state, const char *reason) { CARP_LOCK_ASSERT(sc); @@ -1973,10 +1958,14 @@ carp_set_state(struct carp_softc *sc, in const char *carp_states[] = { CARP_STATES }; char subsys[IFNAMSIZ+5]; - sc->sc_state = state; - snprintf(subsys, IFNAMSIZ+5, "%u@%s", sc->sc_vhid, sc->sc_carpdev->if_xname); + + CARP_LOG("%s: %s -> %s (%s)\n", subsys, + carp_states[sc->sc_state], carp_states[state], reason); + + sc->sc_state = state; + devctl_notify("CARP", subsys, carp_states[state], NULL); } } @@ -2010,13 +1999,13 @@ carp_sc_state(struct carp_softc *sc) #ifdef INET6 callout_stop(&sc->sc_md6_tmo); #endif - carp_set_state(sc, INIT); + carp_set_state(sc, INIT, "hw interface down"); carp_setrun(sc, 0); if (!sc->sc_suppress) carp_demote_adj(V_carp_ifdown_adj, "interface down"); sc->sc_suppress = 1; } else { - carp_set_state(sc, INIT); + carp_set_state(sc, INIT, "hw interface up"); carp_setrun(sc, 0); if (sc->sc_suppress) carp_demote_adj(-V_carp_ifdown_adj, "interface up"); From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 17:13:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 537F5370; Thu, 22 Jan 2015 17:13:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3FD98767; Thu, 22 Jan 2015 17:13:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MHDi5c097092; Thu, 22 Jan 2015 17:13:44 GMT (envelope-from ume@FreeBSD.org) Received: (from ume@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MHDigO097091; Thu, 22 Jan 2015 17:13:44 GMT (envelope-from ume@FreeBSD.org) Message-Id: <201501221713.t0MHDigO097091@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ume set sender to ume@FreeBSD.org using -f From: Hajimu UMEMOTO Date: Thu, 22 Jan 2015 17:13:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277531 - head/bin/freebsd-version X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 17:13:44 -0000 Author: ume Date: Thu Jan 22 17:13:43 2015 New Revision: 277531 URL: https://svnweb.freebsd.org/changeset/base/277531 Log: Don't include newvers.sh into freebsd-version. Modified: head/bin/freebsd-version/Makefile Modified: head/bin/freebsd-version/Makefile ============================================================================== --- head/bin/freebsd-version/Makefile Thu Jan 22 17:09:54 2015 (r277530) +++ head/bin/freebsd-version/Makefile Thu Jan 22 17:13:43 2015 (r277531) @@ -11,7 +11,7 @@ freebsd-version.sh: ${.CURDIR}/freebsd-v s/@@TYPE@@/$${TYPE}/g; \ s/@@REVISION@@/$${REVISION}/g; \ s/@@BRANCH@@/$${BRANCH}/g; \ - " ${.ALLSRC} >${.TARGET} ; then \ + " ${.CURDIR}/freebsd-version.sh.in >${.TARGET} ; then \ rm -f ${.TARGET} ; \ exit 1 ; \ fi From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 17:42:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5FBA9D4D; Thu, 22 Jan 2015 17:42:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 335DCA81; Thu, 22 Jan 2015 17:42:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MHgVQb011519; Thu, 22 Jan 2015 17:42:31 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MHgV1t011518; Thu, 22 Jan 2015 17:42:31 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501221742.t0MHgV1t011518@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 22 Jan 2015 17:42:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277532 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 17:42:31 -0000 Author: ian Date: Thu Jan 22 17:42:30 2015 New Revision: 277532 URL: https://svnweb.freebsd.org/changeset/base/277532 Log: Add the Maxmem global and set it to the highest physical page number plus 1. Modified: head/sys/arm/arm/physmem.c Modified: head/sys/arm/arm/physmem.c ============================================================================== --- head/sys/arm/arm/physmem.c Thu Jan 22 17:13:43 2015 (r277531) +++ head/sys/arm/arm/physmem.c Thu Jan 22 17:42:30 2015 (r277532) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include /* @@ -86,8 +87,12 @@ static size_t excnt; vm_paddr_t phys_avail[MAX_AVAIL_ENTRIES + 2]; /* +2 to allow for a pair */ vm_paddr_t dump_avail[MAX_AVAIL_ENTRIES + 2]; /* of zeroes to terminate. */ -/* This is the total number of hardware pages, excluded or not. */ +/* + * realmem is the total number of hardware pages, excluded or not. + * Maxmem is one greater than the last physical page number. + */ long realmem; +long Maxmem; /* The address at which the kernel was loaded. Set early in initarm(). */ vm_paddr_t arm_physmem_kernaddr; @@ -152,8 +157,8 @@ arm_physmem_print_tables() * * Returns the number of pages of non-excluded memory added to the avail list. */ -static long -regions_to_avail(vm_paddr_t *avail, uint32_t exflags) +static size_t +regions_to_avail(vm_paddr_t *avail, uint32_t exflags, long *pavail) { size_t acnt, exi, hwi; vm_paddr_t end, start, xend, xstart; @@ -236,7 +241,9 @@ regions_to_avail(vm_paddr_t *avail, uint panic("Not enough space in the dump/phys_avail arrays"); } - return (availmem); + if (pavail) + *pavail = availmem; + return (acnt); } /* @@ -311,13 +318,23 @@ void arm_physmem_exclude_region(vm_paddr /* * Process all the regions added earlier into the global avail lists. + * + * Updates the kernel global 'physmem' with the number of physical pages + * available for use (all pages not in any exclusion region). + * + * Updates the kernel global 'Maxmem' with the page number one greater then the + * last page of physical memory in the system. */ void arm_physmem_init_kernel_globals(void) { + size_t nextidx; - regions_to_avail(dump_avail, EXFLAG_NODUMP); - physmem = regions_to_avail(phys_avail, EXFLAG_NOALLOC); + regions_to_avail(dump_avail, EXFLAG_NODUMP, NULL); + nextidx = regions_to_avail(phys_avail, EXFLAG_NOALLOC, &physmem); + if (nextidx == 0) + panic("No memory entries in phys_avail"); + Maxmem = atop(phys_avail[nextidx - 1]); } #ifdef DDB From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 17:46:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D002A89; Thu, 22 Jan 2015 17:46:07 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED0C5AE7; Thu, 22 Jan 2015 17:46:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MHk66t013665; Thu, 22 Jan 2015 17:46:06 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MHk6Ru013664; Thu, 22 Jan 2015 17:46:06 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501221746.t0MHk6Ru013664@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Thu, 22 Jan 2015 17:46:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277533 - head/sys/arm/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 17:46:07 -0000 Author: ian Date: Thu Jan 22 17:46:05 2015 New Revision: 277533 URL: https://svnweb.freebsd.org/changeset/base/277533 Log: Declare Maxmem on arm. This should have been part of r277532. Modified: head/sys/arm/include/md_var.h Modified: head/sys/arm/include/md_var.h ============================================================================== --- head/sys/arm/include/md_var.h Thu Jan 22 17:42:30 2015 (r277532) +++ head/sys/arm/include/md_var.h Thu Jan 22 17:46:05 2015 (r277533) @@ -33,6 +33,7 @@ #ifndef _MACHINE_MD_VAR_H_ #define _MACHINE_MD_VAR_H_ +extern long Maxmem; extern char sigcode[]; extern int szsigcode; extern uint32_t *vm_page_dump; From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 17:53:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BCB13E0; Thu, 22 Jan 2015 17:53:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A890AC1A; Thu, 22 Jan 2015 17:53:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MHrV5K018168; Thu, 22 Jan 2015 17:53:31 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MHrVWQ018167; Thu, 22 Jan 2015 17:53:31 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501221753.t0MHrVWQ018167@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Thu, 22 Jan 2015 17:53:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277534 - head/lib/libelftc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 17:53:31 -0000 Author: emaste Date: Thu Jan 22 17:53:30 2015 New Revision: 277534 URL: https://svnweb.freebsd.org/changeset/base/277534 Log: Update reported elftoolchain version The last elftoolchain update is upstream rev 3136. Update our reported version and add M (Modified) suffix as our elftoolchain contains additional fixes not yet committed upstream. Sponsored by: The FreeBSD Foundation Modified: head/lib/libelftc/elftc_version.c Modified: head/lib/libelftc/elftc_version.c ============================================================================== --- head/lib/libelftc/elftc_version.c Thu Jan 22 17:46:05 2015 (r277533) +++ head/lib/libelftc/elftc_version.c Thu Jan 22 17:53:30 2015 (r277534) @@ -6,5 +6,5 @@ const char * elftc_version(void) { - return "libelftc r3130"; + return "elftoolchain r3136M"; } From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 18:18:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DD86F968 for ; Thu, 22 Jan 2015 18:18:28 +0000 (UTC) Received: from mail-ig0-f177.google.com (mail-ig0-f177.google.com [209.85.213.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A5FB8ED4 for ; Thu, 22 Jan 2015 18:18:28 +0000 (UTC) Received: by mail-ig0-f177.google.com with SMTP id z20so1973925igj.4 for ; Thu, 22 Jan 2015 10:18:22 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=eAHXyqWAy4COCnrHVlVGCZnjyBVZxychxEF7SjAkyHM=; b=P86KWgmE0C/E11jXYBBSBuRvwI4H5/vnRmbMpGoSxA+7wosT8NszETma+x4g2BJMqh xMGuDo8ftBbOuzEG5ep9EdzoJskTkoj7AruzhNrj7R839/bbNbfALS4gllcPuwTiXGFy NzAvcrVaC5y4o5W9Fpq9W5dK41K2ZK8dA0LwQ03Nga802yF9+xzSm13QcHZ4VG25nbT4 ZO7aRELMysDVsRWiA+uQljmiXqGV+flhKcSeBqP5WWN67uUSxg/F8/1G8qdYKzw7mQc1 q1RXt1CFRsPhRFAEgSItXn6IWhzCZSUexpumsE1i4VgpmdU7QIEI305/CEnt0/wCZvHg ogBw== X-Gm-Message-State: ALoCoQltD83G76Xj0tfeICjXcSj0XV719YycaeKNkHL8cwNyW0JIgXR2JI/r25LhX+t+7I574mIW X-Received: by 10.50.55.98 with SMTP id r2mr5744103igp.6.1421950701928; Thu, 22 Jan 2015 10:18:21 -0800 (PST) Received: from sol.firepipe.net (c-50-183-92-30.hsd1.co.comcast.net. [50.183.92.30]) by mx.google.com with ESMTPSA id f1sm3364341igt.14.2015.01.22.10.18.21 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Jan 2015 10:18:21 -0800 (PST) Date: Thu, 22 Jan 2015 11:18:19 -0700 From: Will Andrews To: Ian Lepore Subject: Re: svn commit: r277532 - head/sys/arm/arm Message-ID: <20150122181818.GA49380@sol.firepipe.net> References: <201501221742.t0MHgV1t011518@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="d6Gm4EdcadzBjdND" Content-Disposition: inline In-Reply-To: <201501221742.t0MHgV1t011518@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 18:18:29 -0000 --d6Gm4EdcadzBjdND Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 22, 2015 at 05:42:31PM +0000, Ian Lepore wrote: > Log: > Add the Maxmem global and set it to the highest physical page number pl= us 1. Thanks! --=20 wca --d6Gm4EdcadzBjdND Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTBPuoACgkQF47idPgWcsXmlgCeORv7pzwjmooLib2hgZTuXdwY QGYAoIaJlSWMPqbKR3rTZP3rr+zx5pmX =4GU4 -----END PGP SIGNATURE----- --d6Gm4EdcadzBjdND-- From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 19:43:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A3188996; Thu, 22 Jan 2015 19:43:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 841CBAB1; Thu, 22 Jan 2015 19:43:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MJh6at072520; Thu, 22 Jan 2015 19:43:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MJh6HK072518; Thu, 22 Jan 2015 19:43:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501221943.t0MJh6HK072518@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Thu, 22 Jan 2015 19:43:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277536 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 19:43:06 -0000 Author: gjb Date: Thu Jan 22 19:43:05 2015 New Revision: 277536 URL: https://svnweb.freebsd.org/changeset/base/277536 Log: Rename the 'release' target to 'real-release', and add two targets, 'vm-release' and 'cloudware-release', that are invoked if WITH_VMIMAGES and WITH_CLOUDWARE are not empty. This fixes an issue where 'make release' would not build the cloud provider targets because CLOUDWARE was not yet set. [1] Move the WITH_VMIMAGES and WITH_CLOUDWARE targets to Makefile.vm. Note: There is no 'cloudware-install' target yet, since some of the disk image names may need to be specific to the provider, so this is probably best handled by the build scripts. Reported by: cperciva [1] MFC after: 1 month X-MFC-with: r277458 Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile head/release/Makefile.vm Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Thu Jan 22 19:03:43 2015 (r277535) +++ head/release/Makefile Thu Jan 22 19:43:05 2015 (r277536) @@ -8,7 +8,10 @@ # memstick: Builds memory stick image (memstick.img) # mini-memstick: Builds minimal memory stick image (mini-memstick.img) # ftp: Sets up FTP distribution area (ftp) -# release: Build all media and FTP distribution area +# release: Invokes real-release, vm-release, and cloudware-release targets +# real-release: Build all media and FTP distribution area +# vm-release: Build all virtual machine image targets +# cloudware-release: Build all cloud hosting provider targets # install: Invokes the release-install and vm-install targets # release-install: Copies all release installation media into ${DESTDIR} # vm-install: Copies all virtual machine images into ${DESTDIR} @@ -275,15 +278,11 @@ ftp: packagesystem mkdir -p ftp cp *.txz MANIFEST ftp -release: +release: real-release vm-release cloudware-release + +real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${RELEASE_TARGETS} -.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) - ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} -.endif -.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) - ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS} -.endif install: release-install vm-install Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Thu Jan 22 19:03:43 2015 (r277535) +++ head/release/Makefile.vm Thu Jan 22 19:43:05 2015 (r277536) @@ -109,3 +109,13 @@ vm-install: cd ${DESTDIR}/vmimages && md5 ${OSRELEASE}* > \ ${DESTDIR}/vmimages/CHECKSUM.MD5 .endif + +vm-release: +.if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${VMTARGETS} +.endif + +cloudware-release: +.if defined(WITH_CLOUDWARE) && !empty(WITH_CLOUDWARE) && !empty(CLOUDWARE) + ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} ${CLOUDTARGETS} +.endif From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 21:09:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E2B1DC20; Thu, 22 Jan 2015 21:09:52 +0000 (UTC) Received: from mout.gmx.net (mout.gmx.net [212.227.15.19]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mout.gmx.net", Issuer "TeleSec ServerPass DE-1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79A0D610; Thu, 22 Jan 2015 21:09:52 +0000 (UTC) Received: from moby.local ([91.89.177.101]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0M2ts6-1XPJpF1uze-00sb7B; Thu, 22 Jan 2015 22:09:47 +0100 Message-ID: <54C16715.6060701@gmx.com> Date: Thu, 22 Jan 2015 22:09:41 +0100 From: Nikos Vassiliadis User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Gleb Smirnoff , Craig Rodrigues Subject: Re: svn commit: r276747 - head/sys/netpfil/pf References: <201501060903.t06934qp081875@svn.freebsd.org> <20150122012709.GM15484@FreeBSD.org> In-Reply-To: <20150122012709.GM15484@FreeBSD.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:UiwhKkbDCweNofu3FvHAFs6cQti7PbSP5bweQMnDr2uPkaLW0Vf pia8RYpDbfzh3KrvGKG1qrDZ11mU+qWAxbt0AtZ7jVa7247l3ozidFRBpZI99zSeCwqZVjf pSfjBzHn76ea8kADyJTwePTxnc85GDwTQ89GdmSBvy/33Ozit4h5gbK1tpAjBJIZEVvteGj l2FAp92bDTk0Nqyb/7wxQ== X-UI-Out-Filterresults: notjunk:1; Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 21:09:53 -0000 On 01/22/15 02:27, Gleb Smirnoff wrote: > On Tue, Jan 06, 2015 at 09:03:04AM +0000, Craig Rodrigues wrote: > C> Author: rodrigc > C> Date: Tue Jan 6 09:03:03 2015 > C> New Revision: 276747 > C> URL: https://svnweb.freebsd.org/changeset/base/276747 > C> > C> Log: > C> Instead of creating a purge thread for every vnet, create > C> a single purge thread and clean up all vnets from this thread. > C> > C> PR: 194515 > C> Differential Revision: D1315 > C> Submitted by: Nikos Vassiliadis > > Sorry guys, I backed this out due to broken kldunload of pf module, which > is critical when you are working with pf bugs. For sure. 100% understood. > I had to backout r276746 as well, since it has numerous build breakages, > that are addressed by later revisions. > > That's my fault that I don't review in time, and I will try to improve > the situation. > > Can you please replay r276746 again, addressing all the build problems > and send the patch to me? You can user reviews.freebsd.org if you want. > > I'd like to get this in, but in a better quality. I'd like to get involved again and help you fixing pf. Craig could you replay 276746? I can try fixing the pf purge thread. Thanks, Nikos From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 21:17:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BBF6CEE9; Thu, 22 Jan 2015 21:17:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A623E75A; Thu, 22 Jan 2015 21:17:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MLHxHa015760; Thu, 22 Jan 2015 21:17:59 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MLHwDF015757; Thu, 22 Jan 2015 21:17:58 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201501222117.t0MLHwDF015757@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Thu, 22 Jan 2015 21:17:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277537 - in stable/10: lib/libc/mips/gen sys/mips/include X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 21:17:59 -0000 Author: brooks Date: Thu Jan 22 21:17:58 2015 New Revision: 277537 URL: https://svnweb.freebsd.org/changeset/base/277537 Log: MFC r274816: Add FPU support for MIPS setjmp(3)/longjmp(3). This change saves/restores the callee-saved MIPS floating point registers as documented by the o32/n32/n64 spec ("MIPSpro N32 ABI Handbook", Table 2-1) for the _setjmp(3), _longjmp(3), setjmp(3) and longjmp(3) C library functions. This is only included when the C library is built with hardware floating point support (or when "SOFTFLOAT" is not defined). Submitted by: sson Sponsored by: DARPA, AFRL Modified: stable/10/lib/libc/mips/gen/_setjmp.S stable/10/lib/libc/mips/gen/setjmp.S stable/10/sys/mips/include/asm.h Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libc/mips/gen/_setjmp.S ============================================================================== --- stable/10/lib/libc/mips/gen/_setjmp.S Thu Jan 22 19:43:05 2015 (r277536) +++ stable/10/lib/libc/mips/gen/_setjmp.S Thu Jan 22 21:17:58 2015 (r277537) @@ -61,9 +61,16 @@ __FBSDID("$FreeBSD$"); LEAF(_setjmp) REG_PROLOGUE - REG_LI v0, _JB_MAGIC__SETJMP + REG_LI v0, _JB_MAGIC__SETJMP # sigcontext magic number REG_S v0, (_JB_MAGIC * SZREG)(a0) REG_S ra, (_JB_REG_RA * SZREG)(a0) + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * Registers s0..s7 are callee-saved. + * The sp register is callee-saved. + * The fp (or s8) register is callee-saved. + * The gp register is callee-saved (for n32/n64). + */ REG_S s0, (_JB_REG_S0 * SZREG)(a0) REG_S s1, (_JB_REG_S1 * SZREG)(a0) REG_S s2, (_JB_REG_S2 * SZREG)(a0) @@ -72,11 +79,41 @@ LEAF(_setjmp) REG_S s5, (_JB_REG_S5 * SZREG)(a0) REG_S s6, (_JB_REG_S6 * SZREG)(a0) REG_S s7, (_JB_REG_S7 * SZREG)(a0) + REG_S sp, (_JB_REG_SP * SZREG)(a0) REG_S s8, (_JB_REG_S8 * SZREG)(a0) #if defined(__mips_n32) || defined(__mips_n64) REG_S gp, (_JB_REG_GP * SZREG)(a0) # newabi gp is callee-saved #endif - REG_S sp, (_JB_REG_SP * SZREG)(a0) + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. + * In N64, FP registers F24 .. F31 are callee-saved. + * In O32, FP registers F20 .. F23 are callee-saved. + */ +#ifndef SOFTFLOAT + cfc1 v0, $31 # too bad can't check if FP used +#if defined(__mips_n64) || defined(__mips_n32) + FP_S $f30, (_JB_FPREG_F30 * SZREG)(a0) + FP_S $f28, (_JB_FPREG_F28 * SZREG)(a0) + FP_S $f26, (_JB_FPREG_F26 * SZREG)(a0) + FP_S $f24, (_JB_FPREG_F24 * SZREG)(a0) +#endif +#if defined(__mips_n32) || defined(__mips_o32) || defined(__mips_o64) + FP_S $f22, (_JB_FPREG_F22 * SZREG)(a0) + FP_S $f20, (_JB_FPREG_F20 * SZREG)(a0) +#endif +#if defined(__mips_o32) || defined(__mips_o64) + FP_S $f21, (_JB_FPREG_F21 * SZREG)(a0) + FP_S $f23, (_JB_FPREG_F23 * SZREG)(a0) +#endif +#if defined(__mips_n64) + FP_S $f25, (_JB_FPREG_F25 * SZREG)(a0) + FP_S $f27, (_JB_FPREG_F27 * SZREG)(a0) + FP_S $f29, (_JB_FPREG_F29 * SZREG)(a0) + FP_S $f31, (_JB_FPREG_F31 * SZREG)(a0) +#endif + INT_S v0, (_JB_FPREG_FCSR * SZREG)(a0) +#endif /* ! SOFTFLOAT */ REG_EPILOGUE j ra @@ -94,6 +131,13 @@ LEAF(_longjmp) REG_LI t0, _JB_MAGIC__SETJMP bne v0, t0, botch # jump if error PTR_ADDU sp, sp, CALLFRAME_SIZ # does not matter, sanity + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * Registers s0..s7 are callee-saved. + * The sp register is callee-saved. + * The fp (or s8) register is callee-saved. + * The gp register is callee-saved (for n32/n64). + */ REG_L s0, (_JB_REG_S0 * SZREG)(a0) REG_L s1, (_JB_REG_S1 * SZREG)(a0) REG_L s2, (_JB_REG_S2 * SZREG)(a0) @@ -102,11 +146,42 @@ LEAF(_longjmp) REG_L s5, (_JB_REG_S5 * SZREG)(a0) REG_L s6, (_JB_REG_S6 * SZREG)(a0) REG_L s7, (_JB_REG_S7 * SZREG)(a0) + REG_L sp, (_JB_REG_SP * SZREG)(a0) + REG_L s8, (_JB_REG_S8 * SZREG)(a0) #if defined(__mips_n32) || defined(__mips_n64) REG_L gp, (_JB_REG_GP * SZREG)(a0) #endif - REG_L sp, (_JB_REG_SP * SZREG)(a0) - REG_L s8, (_JB_REG_S8 * SZREG)(a0) +#ifndef SOFTFLOAT + # get fpu status + INT_L v0, (_JB_FPREG_FCSR * SZREG)(a0) + ctc1 v0, $31 + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. + * In N64, FP registers F24 .. F31 are callee-saved. + * In O32, FP registers F20 .. F23 are callee-saved. + */ +#if defined(__mips_n64) || defined(__mips_n32) + FP_L $f30, (_JB_FPREG_F30 * SZREG)(a0) + FP_L $f28, (_JB_FPREG_F28 * SZREG)(a0) + FP_L $f26, (_JB_FPREG_F26 * SZREG)(a0) + FP_L $f24, (_JB_FPREG_F24 * SZREG)(a0) +#endif +#if defined(__mips_n32) || defined(__mips_o32) || defined(__mips_o64) + FP_L $f22, (_JB_FPREG_F22 * SZREG)(a0) + FP_L $f20, (_JB_FPREG_F20 * SZREG)(a0) +#endif +#if defined(__mips_o32) || defined(__mips_o64) + FP_L $f21, (_JB_FPREG_F21 * SZREG)(a0) + FP_L $f23, (_JB_FPREG_F23 * SZREG)(a0) +#endif +#if defined(__mips_n64) + FP_L $f25, (_JB_FPREG_F25 * SZREG)(a0) + FP_L $f27, (_JB_FPREG_F27 * SZREG)(a0) + FP_L $f29, (_JB_FPREG_F29 * SZREG)(a0) + FP_L $f31, (_JB_FPREG_F31 * SZREG)(a0) +#endif +#endif /* ! SOFTFLOAT */ REG_EPILOGUE move v0, a1 # get return value in 1st arg Modified: stable/10/lib/libc/mips/gen/setjmp.S ============================================================================== --- stable/10/lib/libc/mips/gen/setjmp.S Thu Jan 22 19:43:05 2015 (r277536) +++ stable/10/lib/libc/mips/gen/setjmp.S Thu Jan 22 21:17:58 2015 (r277537) @@ -86,6 +86,13 @@ NESTED(setjmp, SETJMP_FRAME_SIZE, ra) REG_LI v0, _JB_MAGIC_SETJMP REG_S v0, (_JB_MAGIC * SZREG)(a0) REG_S ra, (_JB_REG_RA * SZREG)(a0) + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * Registers s0..s7 are callee-saved. + * The sp register is callee-saved. + * The fp (or s8) register is callee-saved. + * The gp register is callee-saved (for n32/n64). + */ REG_S s0, (_JB_REG_S0 * SZREG)(a0) REG_S s1, (_JB_REG_S1 * SZREG)(a0) REG_S s2, (_JB_REG_S2 * SZREG)(a0) @@ -99,6 +106,36 @@ NESTED(setjmp, SETJMP_FRAME_SIZE, ra) #if defined(__mips_n32) || defined(__mips_n64) REG_S gp, (_JB_REG_GP * SZREG)(a0) #endif +#ifndef SOFTFLOAT + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. + * In N64, FP registers F24 .. F31 are callee-saved. + * In O32, FP registers F20 .. F23 are callee-saved. + */ + cfc1 v0, $31 + INT_S v0, (_JB_FPREG_FCSR * SZREG)(a0) +#if defined(__mips_o32) || defined(__mips_o64) || defined(__mips_n32) + FP_S $f20, (_JB_FPREG_F20 * SZREG)(a0) + FP_S $f22, (_JB_FPREG_F22 * SZREG)(a0) +#endif +#if defined(__mips_o32) || defined(__mips_o64) + FP_S $f21, (_JB_FPREG_F21 * SZREG)(a0) + FP_S $f23, (_JB_FPREG_F23 * SZREG)(a0) +#endif +#if defined(__mips_n32) || defined(__mips_n64) + FP_S $f24, (_JB_FPREG_F24 * SZREG)(a0) + FP_S $f26, (_JB_FPREG_F26 * SZREG)(a0) + FP_S $f28, (_JB_FPREG_F28 * SZREG)(a0) + FP_S $f30, (_JB_FPREG_F30 * SZREG)(a0) +#endif +#if defined(__mips_n64) + FP_S $f25, (_JB_FPREG_F25 * SZREG)(a0) + FP_S $f27, (_JB_FPREG_F27 * SZREG)(a0) + FP_S $f29, (_JB_FPREG_F29 * SZREG)(a0) + FP_S $f31, (_JB_FPREG_F31 * SZREG)(a0) +#endif +#endif /* ! SOFTFLOAT */ move v0, zero jr ra @@ -133,6 +170,13 @@ NESTED(longjmp, LONGJMP_FRAME_SIZE, ra) REG_L a1, (CALLFRAME_SIZ + SZREG)(sp) # restore return value REG_L ra, (_JB_REG_RA * SZREG)(a0) + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * Registers s0..s7 are callee-saved. + * The sp register is callee-saved. + * The fp (or s8) register is callee-saved. + * The gp register is callee-saved (for n32/n64). + */ REG_L s0, (_JB_REG_S0 * SZREG)(a0) REG_L s1, (_JB_REG_S1 * SZREG)(a0) REG_L s2, (_JB_REG_S2 * SZREG)(a0) @@ -146,6 +190,36 @@ NESTED(longjmp, LONGJMP_FRAME_SIZE, ra) #if defined(__mips_n32) || defined(__mips_n64) REG_L gp, (_JB_REG_GP * SZREG)(a0) #endif +#ifndef SOFTFLOAT + /* + * From "MIPSpro N32 ABI Handbook", Table 2-1: + * In N32, FP registers F20, F22, F24, F26, F28, F30 are callee-saved. + * In N64, FP registers F23 .. F31 are callee-saved. + * In O32, FP registers F20 .. F23 are callee-saved. + */ + INT_L v0, (_JB_FPREG_FCSR * SZREG)(a0) + ctc1 v0, $31 +#if defined(__mips_n64) || defined(__mips_n32) + FP_L $f30, (_JB_FPREG_F30 * SZREG)(a0) + FP_L $f28, (_JB_FPREG_F28 * SZREG)(a0) + FP_L $f26, (_JB_FPREG_F26 * SZREG)(a0) + FP_L $f24, (_JB_FPREG_F24 * SZREG)(a0) +#endif +#if defined(__mips_n32) || defined(__mips_o32) || defined(__mips_o64) + FP_L $f22, (_JB_FPREG_F22 * SZREG)(a0) + FP_L $f20, (_JB_FPREG_F20 * SZREG)(a0) +#endif +#if defined(__mips_o32) || defined(__mips_o64) + FP_L $f21, (_JB_FPREG_F21 * SZREG)(a0) + FP_L $f23, (_JB_FPREG_F23 * SZREG)(a0) +#endif +#if defined(__mips_n64) + FP_L $f25, (_JB_FPREG_F25 * SZREG)(a0) + FP_L $f27, (_JB_FPREG_F27 * SZREG)(a0) + FP_L $f29, (_JB_FPREG_F29 * SZREG)(a0) + FP_L $f31, (_JB_FPREG_F31 * SZREG)(a0) +#endif +#endif /* ! SOFTFLOAT */ move v0, a1 j ra Modified: stable/10/sys/mips/include/asm.h ============================================================================== --- stable/10/sys/mips/include/asm.h Thu Jan 22 19:43:05 2015 (r277536) +++ stable/10/sys/mips/include/asm.h Thu Jan 22 21:17:58 2015 (r277537) @@ -707,6 +707,20 @@ _C_LABEL(x): #define _JB_SIGMASK 13 +#define _JB_FPREG_F20 14 +#define _JB_FPREG_F21 15 +#define _JB_FPREG_F22 16 +#define _JB_FPREG_F23 17 +#define _JB_FPREG_F24 18 +#define _JB_FPREG_F25 19 +#define _JB_FPREG_F26 20 +#define _JB_FPREG_F27 21 +#define _JB_FPREG_F28 22 +#define _JB_FPREG_F29 23 +#define _JB_FPREG_F30 24 +#define _JB_FPREG_F31 25 +#define _JB_FPREG_FCSR 26 + /* * Various macros for dealing with TLB hazards * (a) why so many? From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 21:41:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CA232528; Thu, 22 Jan 2015 21:41:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B621896D; Thu, 22 Jan 2015 21:41:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MLfg6J029103; Thu, 22 Jan 2015 21:41:42 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MLfgU6029102; Thu, 22 Jan 2015 21:41:42 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501222141.t0MLfgU6029102@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Thu, 22 Jan 2015 21:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277538 - stable/10/usr.bin/sed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 21:41:42 -0000 Author: pfg Date: Thu Jan 22 21:41:41 2015 New Revision: 277538 URL: https://svnweb.freebsd.org/changeset/base/277538 Log: MFC r276832 (partial), r277099 Avoid a warning from gcc48. Replace __inline GNUism with the standard inline. Modified: stable/10/usr.bin/sed/process.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/sed/process.c ============================================================================== --- stable/10/usr.bin/sed/process.c Thu Jan 22 21:17:58 2015 (r277537) +++ stable/10/usr.bin/sed/process.c Thu Jan 22 21:41:41 2015 (r277538) @@ -66,11 +66,11 @@ static SPACE HS, PS, SS, YS; #define hs HS.space #define hsl HS.len -static __inline int applies(struct s_command *); +static inline int applies(struct s_command *); static void do_tr(struct s_tr *); static void flush_appends(void); static void lputs(char *, size_t); -static __inline int regexec_e(regex_t *, const char *, int, int, size_t); +static int regexec_e(regex_t *, const char *, int, int, size_t); static void regsub(SPACE *, char *, char *); static int substitute(struct s_command *); @@ -278,7 +278,7 @@ new: if (!nflag && !pd) * Return TRUE if the command applies to the current line. Sets the start * line for process ranges. Interprets the non-select (``!'') flag. */ -static __inline int +static inline int applies(struct s_command *cp) { int r; @@ -644,7 +644,7 @@ lputs(char *s, size_t len) errx(1, "%s: %s", outfname, strerror(errno ? errno : EIO)); } -static __inline int +static int regexec_e(regex_t *preg, const char *string, int eflags, int nomatch, size_t slen) { From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 22:04:44 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 29C7CBB9; Thu, 22 Jan 2015 22:04:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F0678C1D; Thu, 22 Jan 2015 22:04:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MM4hOm038875; Thu, 22 Jan 2015 22:04:43 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MM4hBx038874; Thu, 22 Jan 2015 22:04:43 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501222204.t0MM4hBx038874@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Thu, 22 Jan 2015 22:04:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277539 - head/sys/powerpc/ofw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 22:04:44 -0000 Author: nwhitehorn Date: Thu Jan 22 22:04:43 2015 New Revision: 277539 URL: https://svnweb.freebsd.org/changeset/base/277539 Log: Allow use of a pre-instantiated RTAS as well as a self-instantiated one. This lets the kernel boot on RTAS-based systems by being kexec'ed from Linux. Modified: head/sys/powerpc/ofw/rtas.c Modified: head/sys/powerpc/ofw/rtas.c ============================================================================== --- head/sys/powerpc/ofw/rtas.c Thu Jan 22 21:41:41 2015 (r277538) +++ head/sys/powerpc/ofw/rtas.c Thu Jan 22 22:04:43 2015 (r277539) @@ -86,12 +86,6 @@ rtas_setup(void *junk) return; } OF_package_to_path(rtas, path, sizeof(path)); - rtasi = OF_open(path); - if (rtasi == 0) { - rtas = 0; - printf("Error initializing RTAS: could not open node\n"); - return; - } mtx_init(&rtas_mtx, "RTAS", NULL, MTX_SPIN); @@ -110,7 +104,7 @@ rtas_setup(void *junk) * It must be 4KB-aligned and not cross a 256 MB boundary. */ - OF_getprop(rtas, "rtas-size", &rtas_size, sizeof(rtas_size)); + OF_getencprop(rtas, "rtas-size", &rtas_size, sizeof(rtas_size)); rtas_size = round_page(rtas_size); rtas_bounce_virt = contigmalloc(rtas_size + PAGE_SIZE, M_RTAS, 0, 0, ulmin(platform_real_maxaddr(), BUS_SPACE_MAXADDR_32BIT), @@ -125,15 +119,32 @@ rtas_setup(void *junk) * Instantiate RTAS. We always use the 32-bit version. */ - result = OF_call_method("instantiate-rtas", rtasi, 1, 1, - (cell_t)rtas_private_data, &rtas_ptr); - OF_close(rtasi); - - if (result != 0) { - rtas = 0; - rtas_ptr = 0; - printf("Error initializing RTAS (%d)\n", result); - return; + if (OF_hasprop(rtas, "linux,rtas-entry") && + OF_hasprop(rtas, "linux,rtas-base")) { + OF_getencprop(rtas, "linux,rtas-base", &rtas_ptr, + sizeof(rtas_ptr)); + rtas_private_data = rtas_ptr; + OF_getencprop(rtas, "linux,rtas-entry", &rtas_ptr, + sizeof(rtas_ptr)); + } else { + rtasi = OF_open(path); + if (rtasi == 0) { + rtas = 0; + printf("Error initializing RTAS: could not open " + "node\n"); + return; + } + + result = OF_call_method("instantiate-rtas", rtasi, 1, 1, + (cell_t)rtas_private_data, &rtas_ptr); + OF_close(rtasi); + + if (result != 0) { + rtas = 0; + rtas_ptr = 0; + printf("Error initializing RTAS (%d)\n", result); + return; + } } rtas_entry = (uintptr_t)(rtas_ptr); @@ -252,7 +263,7 @@ rtas_token_lookup(const char *method) if (!rtas_exists()) return (-1); - if (OF_getprop(rtas, method, &token, sizeof(token)) == -1) + if (OF_getencprop(rtas, method, &token, sizeof(token)) == -1) return (-1); return (token); From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 22:23:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1953923A; Thu, 22 Jan 2015 22:23:17 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 98C8AE0C; Thu, 22 Jan 2015 22:23:15 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0MMNE73087830 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Jan 2015 01:23:14 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0MMNEXK087829; Fri, 23 Jan 2015 01:23:14 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 23 Jan 2015 01:23:14 +0300 From: Gleb Smirnoff To: Nikos Vassiliadis Subject: Re: svn commit: r276747 - head/sys/netpfil/pf Message-ID: <20150122222314.GO15484@FreeBSD.org> References: <201501060903.t06934qp081875@svn.freebsd.org> <20150122012709.GM15484@FreeBSD.org> <54C16715.6060701@gmx.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <54C16715.6060701@gmx.com> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Craig Rodrigues , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 22:23:17 -0000 On Thu, Jan 22, 2015 at 10:09:41PM +0100, Nikos Vassiliadis wrote: N> > Sorry guys, I backed this out due to broken kldunload of pf module, which N> > is critical when you are working with pf bugs. N> N> For sure. 100% understood. N> N> > I had to backout r276746 as well, since it has numerous build breakages, N> > that are addressed by later revisions. N> > N> > That's my fault that I don't review in time, and I will try to improve N> > the situation. N> > N> > Can you please replay r276746 again, addressing all the build problems N> > and send the patch to me? You can user reviews.freebsd.org if you want. N> > N> > I'd like to get this in, but in a better quality. N> N> I'd like to get involved again and help you fixing pf. Craig could you N> replay 276746? Erm, I didn't mean replaying 276746 as svn commit. I meant: checkout head, reapply r276746, fix all build breakages, and submit the patch to me. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 23:03:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DE4C8F3D; Thu, 22 Jan 2015 23:03:56 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 654AE299; Thu, 22 Jan 2015 23:03:55 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0MN3rtx087989 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 23 Jan 2015 02:03:53 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0MN3r5R087988; Fri, 23 Jan 2015 02:03:53 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Fri, 23 Jan 2015 02:03:53 +0300 From: Gleb Smirnoff To: Will Andrews Subject: Re: svn commit: r277530 - head/sys/netinet Message-ID: <20150122230353.GQ15484@FreeBSD.org> References: <201501221709.t0MH9svg093005@svn.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201501221709.t0MH9svg093005@svn.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 23:03:57 -0000 On Thu, Jan 22, 2015 at 05:09:54PM +0000, Will Andrews wrote: W> Author: will W> Date: Thu Jan 22 17:09:54 2015 W> New Revision: 277530 W> URL: https://svnweb.freebsd.org/changeset/base/277530 W> W> Log: W> Improve CARP logging so that all state transitions are logged. W> W> sys/netinet/ip_carp.c: W> Add a "reason" string parameter to carp_set_state() and W> carp_master_down_locked() allowing more specific logging W> information to be passed into these apis. W> W> Refactor existing state transition logging into a single W> log call in carp_set_state(). W> W> Update all calls to carp_set_state() and W> carp_master_down_locked() to pass an appropriate reason W> string. For state transitions that were previously logged, W> the output should be unchanged. W> W> Submitted by: gibbs (original), asomers (updated) W> MFC after: 1 week W> Sponsored by: Spectra Logic W> MFSpectraBSD: 1039697 on 2014/02/11 (original) W> 1049992 on 2014/03/21 (updated) Very nice, thanks! The only thing I'd suggest to change is "SIOCSVH". You and me, we understand this enchantment word, but average user Joe doesn't. :) May be a text like "user requested" or something else. I don't insist on anything, as I am not native speaker, but anything except of SIOCSVH :) P.S. Abbreviation "hw" might also be improved. -- Totus tuus, Glebius. From owner-svn-src-all@FreeBSD.ORG Thu Jan 22 23:50:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C6C29F8; Thu, 22 Jan 2015 23:50:49 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 684B396A; Thu, 22 Jan 2015 23:50:49 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0MNonFl091655; Thu, 22 Jan 2015 23:50:49 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0MNomwm091649; Thu, 22 Jan 2015 23:50:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501222350.t0MNomwm091649@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Thu, 22 Jan 2015 23:50:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277541 - in head/etc: . newsyslog.conf.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2015 23:50:49 -0000 Author: ngie Date: Thu Jan 22 23:50:47 2015 New Revision: 277541 URL: https://svnweb.freebsd.org/changeset/base/277541 Log: Add sample log rotation support for opensm Up to 7 archives of the log will be kept (just for consistency with the other log rotation rules) PR: 196788 MFC after: 1 week Reviewed by: hselasky Sponsored by: EMC / Isilon Storage Division Added: head/etc/newsyslog.conf.d/ head/etc/newsyslog.conf.d/Makefile (contents, props changed) head/etc/newsyslog.conf.d/opensm.conf (contents, props changed) Modified: head/etc/Makefile Modified: head/etc/Makefile ============================================================================== --- head/etc/Makefile Thu Jan 22 23:45:38 2015 (r277540) +++ head/etc/Makefile Thu Jan 22 23:50:47 2015 (r277541) @@ -3,8 +3,11 @@ .include +SUBDIR= \ + newsyslog.conf.d + .if ${MK_SENDMAIL} != "no" -SUBDIR= sendmail +SUBDIR+=sendmail .endif .if ${MK_TESTS} != "no" Added: head/etc/newsyslog.conf.d/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/Makefile Thu Jan 22 23:50:47 2015 (r277541) @@ -0,0 +1,13 @@ +# $FreeBSD$ + +.include + +BINDIR= /etc/newsyslog.conf.d + +FILES= + +.if ${MK_OFED} != "no" +FILES+= opensm.conf +.endif + +.include Added: head/etc/newsyslog.conf.d/opensm.conf ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/newsyslog.conf.d/opensm.conf Thu Jan 22 23:50:47 2015 (r277541) @@ -0,0 +1,3 @@ +# $FreeBSD$ + +/var/log/opensm.log 600 7 * * Z /var/run/opensm.pid 30 From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:06:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9CCF2101; Fri, 23 Jan 2015 00:06:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7D343AC5; Fri, 23 Jan 2015 00:06:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N06aAl000572; Fri, 23 Jan 2015 00:06:36 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N06a2E000567; Fri, 23 Jan 2015 00:06:36 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501230006.t0N06a2E000567@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 00:06:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277544 - head/sys/net X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:06:36 -0000 Author: will Date: Fri Jan 23 00:06:35 2015 New Revision: 277544 URL: https://svnweb.freebsd.org/changeset/base/277544 Log: Improve the distribution of LAGG port traffic. I edited the original change to retain the use of arc4random() as a seed for the hashing as a very basic defense against intentional lagg port selection. The author's original commit message (edited slightly): sys/net/ieee8023ad_lacp.c sys/net/if_lagg.c In lagg_hashmbuf, use the FNV hash instead of the old hash32_buf. The hash32 family of functions operate one octet at a time, and when run on a string s of length n, their output is equivalent to : ----- i=n-1 \ n \ (n-i-1) 32 ( seed^ + / 33^ * s[i] ) % 2^ / ----- i=0 The problem is that the last five bytes of input don't get multiplied by sufficiently many powers of 33 to rollover 2^32. That means that changing the last few bytes (but obviously not the very last) of input will always change the value of the hash by a multiple of 33. In the case of lagg_hashmbuf() with ipv4 input, the last four bytes are the TCP or UDP port numbers. Since the output of lagg_hashmbuf is always taken modulo the port count, and 3 is a common port count for a lagg, that's bad. It means that the UDP or TCP source port will never affect which lagg member is selected on a 3-port lagg. At 10Gbps, I was not able to measure any difference in CPU consumption between the old and new hash. Submitted by: asomers (original commit) Reviewed by: emaste, glebius MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1001723 on 2013/08/28 (original) 1114258 on 2015/01/22 (edit) Modified: head/sys/net/ieee8023ad_lacp.c head/sys/net/if_lagg.c Modified: head/sys/net/ieee8023ad_lacp.c ============================================================================== --- head/sys/net/ieee8023ad_lacp.c Fri Jan 23 00:02:26 2015 (r277543) +++ head/sys/net/ieee8023ad_lacp.c Fri Jan 23 00:06:35 2015 (r277544) @@ -35,6 +35,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include /* hz */ #include /* for net/if.h */ @@ -757,13 +758,16 @@ void lacp_attach(struct lagg_softc *sc) { struct lacp_softc *lsc; + uint32_t seed; lsc = malloc(sizeof(struct lacp_softc), M_DEVBUF, M_WAITOK | M_ZERO); sc->sc_psc = lsc; lsc->lsc_softc = sc; - lsc->lsc_hashkey = arc4random(); + seed = arc4random(); + lsc->lsc_hashkey = FNV1_32_INIT; + lsc->lsc_hashkey = fnv_32_buf(&seed, sizeof(seed), lsc->lsc_hashkey); lsc->lsc_active_aggregator = NULL; lsc->lsc_strict_mode = 1; LACP_LOCK_INIT(lsc); Modified: head/sys/net/if_lagg.c ============================================================================== --- head/sys/net/if_lagg.c Fri Jan 23 00:02:26 2015 (r277543) +++ head/sys/net/if_lagg.c Fri Jan 23 00:06:35 2015 (r277544) @@ -36,7 +36,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include #include @@ -1853,13 +1853,13 @@ lagg_hashmbuf(struct lagg_softc *sc, str eh = mtod(m, struct ether_header *); etype = ntohs(eh->ether_type); if (sc->sc_flags & LAGG_F_HASHL2) { - p = hash32_buf(&eh->ether_shost, ETHER_ADDR_LEN, p); - p = hash32_buf(&eh->ether_dhost, ETHER_ADDR_LEN, p); + p = fnv_32_buf(&eh->ether_shost, ETHER_ADDR_LEN, p); + p = fnv_32_buf(&eh->ether_dhost, ETHER_ADDR_LEN, p); } /* Special handling for encapsulating VLAN frames */ if ((m->m_flags & M_VLANTAG) && (sc->sc_flags & LAGG_F_HASHL2)) { - p = hash32_buf(&m->m_pkthdr.ether_vtag, + p = fnv_32_buf(&m->m_pkthdr.ether_vtag, sizeof(m->m_pkthdr.ether_vtag), p); } else if (etype == ETHERTYPE_VLAN) { vlan = lagg_gethdr(m, off, sizeof(*vlan), &buf); @@ -1867,7 +1867,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str goto out; if (sc->sc_flags & LAGG_F_HASHL2) - p = hash32_buf(&vlan->evl_tag, sizeof(vlan->evl_tag), p); + p = fnv_32_buf(&vlan->evl_tag, sizeof(vlan->evl_tag), p); etype = ntohs(vlan->evl_proto); off += sizeof(*vlan) - sizeof(*eh); } @@ -1880,8 +1880,8 @@ lagg_hashmbuf(struct lagg_softc *sc, str goto out; if (sc->sc_flags & LAGG_F_HASHL3) { - p = hash32_buf(&ip->ip_src, sizeof(struct in_addr), p); - p = hash32_buf(&ip->ip_dst, sizeof(struct in_addr), p); + p = fnv_32_buf(&ip->ip_src, sizeof(struct in_addr), p); + p = fnv_32_buf(&ip->ip_dst, sizeof(struct in_addr), p); } if (!(sc->sc_flags & LAGG_F_HASHL4)) break; @@ -1896,7 +1896,7 @@ lagg_hashmbuf(struct lagg_softc *sc, str ports = lagg_gethdr(m, off, sizeof(*ports), &buf); if (ports == NULL) break; - p = hash32_buf(ports, sizeof(*ports), p); + p = fnv_32_buf(ports, sizeof(*ports), p); break; } break; @@ -1909,10 +1909,10 @@ lagg_hashmbuf(struct lagg_softc *sc, str if (ip6 == NULL) goto out; - p = hash32_buf(&ip6->ip6_src, sizeof(struct in6_addr), p); - p = hash32_buf(&ip6->ip6_dst, sizeof(struct in6_addr), p); + p = fnv_32_buf(&ip6->ip6_src, sizeof(struct in6_addr), p); + p = fnv_32_buf(&ip6->ip6_dst, sizeof(struct in6_addr), p); flow = ip6->ip6_flow & IPV6_FLOWLABEL_MASK; - p = hash32_buf(&flow, sizeof(flow), p); /* IPv6 flow label */ + p = fnv_32_buf(&flow, sizeof(flow), p); /* IPv6 flow label */ break; #endif } @@ -2087,12 +2087,15 @@ lagg_lb_attach(struct lagg_softc *sc) { struct lagg_port *lp; struct lagg_lb *lb; + uint32_t seed; lb = malloc(sizeof(struct lagg_lb), M_DEVBUF, M_WAITOK | M_ZERO); sc->sc_capabilities = IFCAP_LAGG_FULLDUPLEX; - lb->lb_key = arc4random(); + seed = arc4random(); + lb->lb_key = FNV1_32_INIT; + lb->lb_key = fnv_32_buf(&seed, sizeof(seed), lb->lb_key); sc->sc_psc = lb; SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:19:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C54B45B5; Fri, 23 Jan 2015 00:19:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B0133BD2; Fri, 23 Jan 2015 00:19:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0JxqC005882; Fri, 23 Jan 2015 00:19:59 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0JxjY005881; Fri, 23 Jan 2015 00:19:59 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230019.t0N0JxjY005881@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:19:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277545 - stable/10/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:19:59 -0000 Author: delphij Date: Fri Jan 23 00:19:58 2015 New Revision: 277545 URL: https://svnweb.freebsd.org/changeset/base/277545 Log: MFC r275533: Sync with Illumos. This have no effect to FreeBSD. Illumos issue: 5100 sparc build failed after 5004 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Fri Jan 23 00:06:35 2015 (r277544) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Fri Jan 23 00:19:58 2015 (r277545) @@ -21,6 +21,7 @@ /* * Copyright (c) 1989, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright 2014 Igor Kozhukhov . */ #ifndef _SYS_CPUVAR_H @@ -31,6 +32,7 @@ #include #include +#include #if (defined(_KERNEL) || defined(_KMEMUSER)) && defined(_MACHDEP) #include #endif @@ -52,15 +54,6 @@ extern "C" { struct squeue_set_s; #define CPU_CACHE_COHERENCE_SIZE 64 -#define S_LOADAVG_SZ 11 -#define S_MOVAVG_SZ 10 - -struct loadavg_s { - int lg_cur; /* current loadavg entry */ - unsigned int lg_len; /* number entries recorded */ - hrtime_t lg_total; /* used to temporarily hold load totals */ - hrtime_t lg_loads[S_LOADAVG_SZ]; /* table of recorded entries */ -}; /* * For fast event tracing. From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:23:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 013DB835; Fri, 23 Jan 2015 00:23:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E011DC8D; Fri, 23 Jan 2015 00:23:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0NmjH009964; Fri, 23 Jan 2015 00:23:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0NmFw009963; Fri, 23 Jan 2015 00:23:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230023.t0N0NmFw009963@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:23:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277546 - stable/10/sys/cddl/contrib/opensolaris/uts/common/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:23:49 -0000 Author: delphij Date: Fri Jan 23 00:23:48 2015 New Revision: 277546 URL: https://svnweb.freebsd.org/changeset/base/277546 Log: MFC r275561: MFV r275534: Sync with Illumos. This have no effect to FreeBSD. Illumos issue: 5285 pass in cpu_pause_func via pause_cpus Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Fri Jan 23 00:19:58 2015 (r277545) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/sys/cpuvar.h Fri Jan 23 00:23:48 2015 (r277546) @@ -648,7 +648,7 @@ void poke_cpu(int cpun); /* interrupt a void mach_cpu_pause(volatile char *); -void pause_cpus(cpu_t *off_cp); +void pause_cpus(cpu_t *off_cp, void *(*func)(void *)); void start_cpus(void); int cpus_paused(void); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:27:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D54DA1F; Fri, 23 Jan 2015 00:27:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EBD9FCE9; Fri, 23 Jan 2015 00:27:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0R92f010452; Fri, 23 Jan 2015 00:27:09 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0R91K010448; Fri, 23 Jan 2015 00:27:09 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230027.t0N0R91K010448@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:27:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277547 - in stable/10/sys/cddl/contrib/opensolaris/uts/common: dtrace fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:27:10 -0000 Author: delphij Date: Fri Jan 23 00:27:08 2015 New Revision: 277547 URL: https://svnweb.freebsd.org/changeset/base/277547 Log: MFC r275562: MFV r275535: Unexpand ISP2() and MSEC2NSEC(). Illumos issue: 5255 uts shouldn't open-code ISP2 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jan 23 00:23:48 2015 (r277546) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Fri Jan 23 00:27:08 2015 (r277547) @@ -176,7 +176,7 @@ dtrace_optval_t dtrace_ustackframes_defa dtrace_optval_t dtrace_jstackframes_default = 50; dtrace_optval_t dtrace_jstackstrsize_default = 512; int dtrace_msgdsize_max = 128; -hrtime_t dtrace_chill_max = 500 * (NANOSEC / MILLISEC); /* 500 ms */ +hrtime_t dtrace_chill_max = MSEC2NSEC(500); /* 500 ms */ hrtime_t dtrace_chill_interval = NANOSEC; /* 1000 ms */ int dtrace_devdepth_max = 32; int dtrace_err_verbose; @@ -13782,7 +13782,7 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_ if (!(sec->dofs_flags & DOF_SECF_LOAD)) continue; /* just ignore non-loadable sections */ - if (sec->dofs_align & (sec->dofs_align - 1)) { + if (!ISP2(sec->dofs_align)) { dtrace_dof_error(dof, "bad section alignment"); return (-1); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 23 00:23:48 2015 (r277546) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c Fri Jan 23 00:27:08 2015 (r277547) @@ -2479,7 +2479,7 @@ fasttrap_load(void) if (nent == 0 || nent > 0x1000000) nent = FASTTRAP_TPOINTS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_tpoints.fth_nent = nent; else fasttrap_tpoints.fth_nent = 1 << fasttrap_highbit(nent); @@ -2497,7 +2497,7 @@ fasttrap_load(void) * ... and the providers hash table... */ nent = FASTTRAP_PROVIDERS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_provs.fth_nent = nent; else fasttrap_provs.fth_nent = 1 << fasttrap_highbit(nent); @@ -2533,7 +2533,7 @@ fasttrap_load(void) * ... and the procs hash table. */ nent = FASTTRAP_PROCS_DEFAULT_SIZE; - if ((nent & (nent - 1)) == 0) + if (ISP2(nent)) fasttrap_procs.fth_nent = nent; else fasttrap_procs.fth_nent = 1 << fasttrap_highbit(nent); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 00:23:48 2015 (r277546) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 00:27:08 2015 (r277547) @@ -24,6 +24,7 @@ * Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved. */ +#include #include #include #include @@ -153,7 +154,7 @@ zio_init(void) size_t align = 0; size_t cflags = (size > zio_buf_debug_limit) ? KMC_NODEBUG : 0; - while (p2 & (p2 - 1)) + while (!ISP2(p2)) p2 &= p2 - 1; #ifdef illumos From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:27:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2983CB50; Fri, 23 Jan 2015 00:27:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED6EFCF6; Fri, 23 Jan 2015 00:27:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0Rb8M010566; Fri, 23 Jan 2015 00:27:37 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0RbID010565; Fri, 23 Jan 2015 00:27:37 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501230027.t0N0RbID010565@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 23 Jan 2015 00:27:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277548 - stable/10/tools/regression/lib/libc/stdio X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:27:38 -0000 Author: ngie Date: Fri Jan 23 00:27:37 2015 New Revision: 277548 URL: https://svnweb.freebsd.org/changeset/base/277548 Log: MFC r277453: r277453 (by ngie): Garbage collect a prove test wrapper Sponsored by: EMC / Isilon Storage Division Deleted: stable/10/tools/regression/lib/libc/stdio/test-fmemopen.t Modified: Directory Properties: stable/10/ (props changed) From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:34:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 33D8ADEB; Fri, 23 Jan 2015 00:34:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF27DC4; Fri, 23 Jan 2015 00:34:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0YJZP015021; Fri, 23 Jan 2015 00:34:19 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0YJEa015020; Fri, 23 Jan 2015 00:34:19 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501230034.t0N0YJEa015020@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 23 Jan 2015 00:34:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277549 - stable/10/contrib/netbsd-tests/bin/expr X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:34:20 -0000 Author: ngie Date: Fri Jan 23 00:34:19 2015 New Revision: 277549 URL: https://svnweb.freebsd.org/changeset/base/277549 Log: MFC r276671,r277357: r276671 (by ngie): Expect :arithmetic_ops_body to fail with syntax errors on FreeBSD Sponsored by: EMC / Isilon Storage Division r277357 (by ngie): Expect :overflow to fail with FreeBSD's expr as it doesn't have stringent overflow checks like NetBSD's expr does PR: 196867 Modified: stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh ============================================================================== --- stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh Fri Jan 23 00:27:37 2015 (r277548) +++ stable/10/contrib/netbsd-tests/bin/expr/t_expr.sh Fri Jan 23 00:34:19 2015 (r277549) @@ -54,6 +54,9 @@ overflow_head() { atf_set "descr" "Test overflow cases" } overflow_body() { + # Begin FreeBSD + atf_expect_fail "FreeBSD's expr does not check overflow to the same degree NetBSD's expr does; see bug 196867 for more details" + # End FreeBSD test_expr '4611686018427387904 + 4611686018427387903' \ '9223372036854775807' test_expr '4611686018427387904 + 4611686018427387904' \ @@ -105,6 +108,9 @@ arithmetic_ops_head() { atf_set "descr" "Dangling arithemtic operator" } arithmetic_ops_body() { + # Begin FreeBSD + atf_expect_fail "the following testcases fail with syntax errors on FreeBSD" + # End FreeBSD test_expr '.java_wrapper : /' '0' test_expr '4 : \*' '0' test_expr '4 : +' '0' From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:35:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E62C5CF; Fri, 23 Jan 2015 00:35:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D1A38DDD; Fri, 23 Jan 2015 00:35:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0Zmv5015372; Fri, 23 Jan 2015 00:35:48 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0ZmYL015371; Fri, 23 Jan 2015 00:35:48 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501230035.t0N0ZmYL015371@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 23 Jan 2015 00:35:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277550 - stable/10/contrib/ofed X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:35:49 -0000 Author: ngie Date: Fri Jan 23 00:35:47 2015 New Revision: 277550 URL: https://svnweb.freebsd.org/changeset/base/277550 Log: MFC r276806: r276806 (by ngie): Remove unnecessary .include of bsd.own.mk Sponsored by: EMC / Isilon Storage Division Modified: stable/10/contrib/ofed/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/ofed/Makefile ============================================================================== --- stable/10/contrib/ofed/Makefile Fri Jan 23 00:34:19 2015 (r277549) +++ stable/10/contrib/ofed/Makefile Fri Jan 23 00:35:47 2015 (r277550) @@ -1,5 +1,3 @@ -.include - SUBDIR = include usr.lib usr.bin .include From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:36:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4166C1F9; Fri, 23 Jan 2015 00:36:19 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2C24CDE6; Fri, 23 Jan 2015 00:36:19 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0aJoG015508; Fri, 23 Jan 2015 00:36:19 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0aJFQ015507; Fri, 23 Jan 2015 00:36:19 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230036.t0N0aJFQ015507@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:36:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277551 - stable/10/cddl/contrib/opensolaris/tools/ctf/cvt X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:36:19 -0000 Author: delphij Date: Fri Jan 23 00:36:17 2015 New Revision: 277551 URL: https://svnweb.freebsd.org/changeset/base/277551 Log: MFC r275563: MFV r275536: Illumos issue: 3363 Mark non-returning functions in ctftools Modified: stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h Fri Jan 23 00:35:47 2015 (r277550) +++ stable/10/cddl/contrib/opensolaris/tools/ctf/cvt/ctftools.h Fri Jan 23 00:36:17 2015 (r277551) @@ -26,8 +26,6 @@ #ifndef _CTFTOOLS_H #define _CTFTOOLS_H -#pragma ident "%Z%%M% %I% %E% SMI" - /* * Functions and data structures used in the manipulation of stabs and CTF data */ @@ -39,6 +37,8 @@ #include #include +#include + #ifdef __cplusplus extern "C" { #endif @@ -435,8 +435,8 @@ int streq(const char *, const char *); int findelfsecidx(Elf *, const char *, const char *); size_t elf_ptrsz(Elf *); char *mktmpname(const char *, const char *); -void terminate(const char *, ...); -void aborterr(const char *, ...); +void terminate(const char *, ...) __NORETURN; +void aborterr(const char *, ...) __NORETURN; void set_terminate_cleanup(void (*)(void)); void elfterminate(const char *, const char *, ...); void warning(const char *, ...); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:40:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0F262352; Fri, 23 Jan 2015 00:40:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EDD04E00; Fri, 23 Jan 2015 00:40:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0ei5v019227; Fri, 23 Jan 2015 00:40:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0eivG019225; Fri, 23 Jan 2015 00:40:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230040.t0N0eivG019225@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:40:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277552 - in stable/10/cddl/contrib/opensolaris: cmd/zfs lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:40:45 -0000 Author: delphij Date: Fri Jan 23 00:40:43 2015 New Revision: 277552 URL: https://svnweb.freebsd.org/changeset/base/277552 Log: MFC r275579: MFV r275537: Illumos issue: 5316 allow smbadm join to use RPC (Due to our lack of smbsrv this is mostly no-op on FreeBSD) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jan 23 00:36:17 2015 (r277551) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c Fri Jan 23 00:40:43 2015 (r277552) @@ -68,6 +68,7 @@ #ifdef sun #include #include +#include #endif #include "zfs_iter.h" @@ -2390,10 +2391,9 @@ userspace_cb(void *arg, const char *doma /* SMB */ char sid[ZFS_MAXNAMELEN + 32]; uid_t id; - uint64_t classes; #ifdef sun int err; - directory_error_t e; + int flag = IDMAP_REQ_FLG_USE_CACHE; #endif smbentity = B_TRUE; @@ -2416,10 +2416,13 @@ userspace_cb(void *arg, const char *doma if (err == 0) { rid = id; if (!cb->cb_sid2posix) { - e = directory_name_from_sid(NULL, sid, &name, - &classes); - if (e != NULL) - directory_error_free(e); + if (type == USTYPE_SMB_USR) { + (void) idmap_getwinnamebyuid(rid, flag, + &name, NULL); + } else { + (void) idmap_getwinnamebygid(rid, flag, + &name, NULL); + } if (name == NULL) name = sid; } Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Jan 23 00:36:17 2015 (r277551) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Fri Jan 23 00:40:43 2015 (r277552) @@ -2609,7 +2609,7 @@ userquota_propname_decode(const char *pr boolean_t isuser; domain[0] = '\0'; - + *ridp = 0; /* Figure out the property type ({user|group}{quota|space}) */ for (type = 0; type < ZFS_NUM_USERQUOTA_PROPS; type++) { if (strncmp(propname, zfs_userquota_prop_prefixes[type], @@ -2631,23 +2631,46 @@ userquota_propname_decode(const char *pr * It's a SID name (eg "user@domain") that needs to be * turned into S-1-domainID-RID. */ - directory_error_t e; + int flag = 0; + idmap_stat stat, map_stat; + uid_t pid; + idmap_rid_t rid; + idmap_get_handle_t *gh = NULL; + + stat = idmap_get_create(&gh); + if (stat != IDMAP_SUCCESS) { + idmap_get_destroy(gh); + return (ENOMEM); + } if (zoned && getzoneid() == GLOBAL_ZONEID) return (ENOENT); if (isuser) { - e = directory_sid_from_user_name(NULL, - cp, &numericsid); + stat = idmap_getuidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbyuid(gh, pid, flag, &numericsid, + &rid, &map_stat); } else { - e = directory_sid_from_group_name(NULL, - cp, &numericsid); + stat = idmap_getgidbywinname(cp, NULL, flag, &pid); + if (stat < 0) + return (ENOENT); + stat = idmap_get_sidbygid(gh, pid, flag, &numericsid, + &rid, &map_stat); + } + if (stat < 0) { + idmap_get_destroy(gh); + return (ENOENT); } - if (e != NULL) { - directory_error_free(e); + stat = idmap_get_mappings(gh); + idmap_get_destroy(gh); + + if (stat < 0) { return (ENOENT); } if (numericsid == NULL) return (ENOENT); cp = numericsid; + *ridp = rid; /* will be further decoded below */ #else /* !sun */ return (ENOENT); @@ -2657,12 +2680,15 @@ userquota_propname_decode(const char *pr if (strncmp(cp, "S-1-", 4) == 0) { /* It's a numeric SID (eg "S-1-234-567-89") */ (void) strlcpy(domain, cp, domainlen); - cp = strrchr(domain, '-'); - *cp = '\0'; - cp++; - errno = 0; - *ridp = strtoull(cp, &end, 10); + if (*ridp == 0) { + cp = strrchr(domain, '-'); + *cp = '\0'; + cp++; + *ridp = strtoull(cp, &end, 10); + } else { + end = ""; + } if (numericsid) { free(numericsid); numericsid = NULL; From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:44:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 65CF84A2; Fri, 23 Jan 2015 00:44:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 462B2EA3; Fri, 23 Jan 2015 00:44:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0iGwI020007; Fri, 23 Jan 2015 00:44:16 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0iFNq020002; Fri, 23 Jan 2015 00:44:15 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230044.t0N0iFNq020002@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:44:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277553 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:44:16 -0000 Author: delphij Date: Fri Jan 23 00:44:14 2015 New Revision: 277553 URL: https://svnweb.freebsd.org/changeset/base/277553 Log: MFC r275594: MFV r275540: When importing a pool, don't assume that the passed pool configuration at vdev_load is always vaild. It's possible that a stale configuration that comes with extra vdevs, where metaslab_init() would fail because of lower layer returns error. Change the code to make metaslab_init() handle and return errors from lower layer and pass it back to upper layer and handle it there. Illumos issue: 5213 panic in metaslab_init due to space_map_open returning ENXIO Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri Jan 23 00:40:43 2015 (r277552) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c Fri Jan 23 00:44:14 2015 (r277553) @@ -1318,28 +1318,36 @@ metaslab_unload(metaslab_t *msp) msp->ms_weight &= ~METASLAB_ACTIVE_MASK; } -metaslab_t * -metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg) +int +metaslab_init(metaslab_group_t *mg, uint64_t id, uint64_t object, uint64_t txg, + metaslab_t **msp) { vdev_t *vd = mg->mg_vd; objset_t *mos = vd->vdev_spa->spa_meta_objset; - metaslab_t *msp; + metaslab_t *ms; + int error; - msp = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP); - mutex_init(&msp->ms_lock, NULL, MUTEX_DEFAULT, NULL); - cv_init(&msp->ms_load_cv, NULL, CV_DEFAULT, NULL); - msp->ms_id = id; - msp->ms_start = id << vd->vdev_ms_shift; - msp->ms_size = 1ULL << vd->vdev_ms_shift; + ms = kmem_zalloc(sizeof (metaslab_t), KM_SLEEP); + mutex_init(&ms->ms_lock, NULL, MUTEX_DEFAULT, NULL); + cv_init(&ms->ms_load_cv, NULL, CV_DEFAULT, NULL); + ms->ms_id = id; + ms->ms_start = id << vd->vdev_ms_shift; + ms->ms_size = 1ULL << vd->vdev_ms_shift; /* * We only open space map objects that already exist. All others * will be opened when we finally allocate an object for it. */ if (object != 0) { - VERIFY0(space_map_open(&msp->ms_sm, mos, object, msp->ms_start, - msp->ms_size, vd->vdev_ashift, &msp->ms_lock)); - ASSERT(msp->ms_sm != NULL); + error = space_map_open(&ms->ms_sm, mos, object, ms->ms_start, + ms->ms_size, vd->vdev_ashift, &ms->ms_lock); + + if (error != 0) { + kmem_free(ms, sizeof (metaslab_t)); + return (error); + } + + ASSERT(ms->ms_sm != NULL); } /* @@ -1349,11 +1357,11 @@ metaslab_init(metaslab_group_t *mg, uint * addition of new space; and for debugging, it ensures that we'd * data fault on any attempt to use this metaslab before it's ready. */ - msp->ms_tree = range_tree_create(&metaslab_rt_ops, msp, &msp->ms_lock); - metaslab_group_add(mg, msp); + ms->ms_tree = range_tree_create(&metaslab_rt_ops, ms, &ms->ms_lock); + metaslab_group_add(mg, ms); - msp->ms_fragmentation = metaslab_fragmentation(msp); - msp->ms_ops = mg->mg_class->mc_ops; + ms->ms_fragmentation = metaslab_fragmentation(ms); + ms->ms_ops = mg->mg_class->mc_ops; /* * If we're opening an existing pool (txg == 0) or creating @@ -1362,25 +1370,27 @@ metaslab_init(metaslab_group_t *mg, uint * does not become available until after this txg has synced. */ if (txg <= TXG_INITIAL) - metaslab_sync_done(msp, 0); + metaslab_sync_done(ms, 0); /* * If metaslab_debug_load is set and we're initializing a metaslab * that has an allocated space_map object then load the its space * map so that can verify frees. */ - if (metaslab_debug_load && msp->ms_sm != NULL) { - mutex_enter(&msp->ms_lock); - VERIFY0(metaslab_load(msp)); - mutex_exit(&msp->ms_lock); + if (metaslab_debug_load && ms->ms_sm != NULL) { + mutex_enter(&ms->ms_lock); + VERIFY0(metaslab_load(ms)); + mutex_exit(&ms->ms_lock); } if (txg != 0) { vdev_dirty(vd, 0, NULL, txg); - vdev_dirty(vd, VDD_METASLAB, msp, txg); + vdev_dirty(vd, VDD_METASLAB, ms, txg); } - return (msp); + *msp = ms; + + return (0); } void Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h Fri Jan 23 00:40:43 2015 (r277552) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/metaslab.h Fri Jan 23 00:44:14 2015 (r277553) @@ -42,8 +42,8 @@ typedef struct metaslab_ops { extern metaslab_ops_t *zfs_metaslab_ops; -metaslab_t *metaslab_init(metaslab_group_t *, uint64_t, - uint64_t, uint64_t); +int metaslab_init(metaslab_group_t *, uint64_t, uint64_t, uint64_t, + metaslab_t **); void metaslab_fini(metaslab_t *); void metaslab_load_wait(metaslab_t *); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri Jan 23 00:40:43 2015 (r277552) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c Fri Jan 23 00:44:14 2015 (r277553) @@ -955,7 +955,11 @@ vdev_metaslab_init(vdev_t *vd, uint64_t if (error) return (error); } - vd->vdev_ms[m] = metaslab_init(vd->vdev_mg, m, object, txg); + + error = metaslab_init(vd->vdev_mg, m, object, txg, + &(vd->vdev_ms[m])); + if (error) + return (error); } if (txg == 0) From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 00:54:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8C43C6DE; Fri, 23 Jan 2015 00:54:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773EBF90; Fri, 23 Jan 2015 00:54:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N0svri024836; Fri, 23 Jan 2015 00:54:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N0svCZ024835; Fri, 23 Jan 2015 00:54:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501230054.t0N0svCZ024835@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 00:54:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277554 - stable/10/cddl/compat/opensolaris/misc X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 00:54:57 -0000 Author: delphij Date: Fri Jan 23 00:54:56 2015 New Revision: 277554 URL: https://svnweb.freebsd.org/changeset/base/277554 Log: MFC r275595: Use calloc() instead of malloc() + bzero(). This also gets rid of a warning because bzero is defined by strings.h which is not included in thread_pool.c. Modified: stable/10/cddl/compat/opensolaris/misc/thread_pool.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/compat/opensolaris/misc/thread_pool.c ============================================================================== --- stable/10/cddl/compat/opensolaris/misc/thread_pool.c Fri Jan 23 00:44:14 2015 (r277553) +++ stable/10/cddl/compat/opensolaris/misc/thread_pool.c Fri Jan 23 00:54:56 2015 (r277554) @@ -233,12 +233,11 @@ tpool_create(uint_t min_threads, uint_t return (NULL); } - tpool = malloc(sizeof (*tpool)); + tpool = calloc(1, sizeof (*tpool)); if (tpool == NULL) { errno = ENOMEM; return (NULL); } - bzero(tpool, sizeof(*tpool)); (void) pthread_mutex_init(&tpool->tp_mutex, NULL); (void) pthread_cond_init(&tpool->tp_busycv, NULL); (void) pthread_cond_init(&tpool->tp_workcv, NULL); @@ -267,9 +266,8 @@ tpool_dispatch(tpool_t *tpool, void (*fu { tpool_job_t *job; - if ((job = malloc(sizeof (*job))) == NULL) + if ((job = calloc(1, sizeof (*job))) == NULL) return (-1); - bzero(job, sizeof(*job)); job->tpj_next = NULL; job->tpj_func = func; job->tpj_arg = arg; From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 01:18:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3EAC696C; Fri, 23 Jan 2015 01:18:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A3681D3; Fri, 23 Jan 2015 01:18:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N1I99k034663; Fri, 23 Jan 2015 01:18:09 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N1I9C9034662; Fri, 23 Jan 2015 01:18:09 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501230118.t0N1I9C9034662@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 23 Jan 2015 01:18:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277555 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 01:18:09 -0000 Author: ian Date: Fri Jan 23 01:18:08 2015 New Revision: 277555 URL: https://svnweb.freebsd.org/changeset/base/277555 Log: Enable all the mmc/sd controllers, because there's no telling which ones any given board will be using. Yes, changing source is an unusually primitive power control implementation. Modified: head/sys/arm/freescale/imx/imx6_ccm.c Modified: head/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccm.c Fri Jan 23 00:54:56 2015 (r277554) +++ head/sys/arm/freescale/imx/imx6_ccm.c Fri Jan 23 01:18:08 2015 (r277555) @@ -95,7 +95,7 @@ ccm_init_gates(struct ccm_softc *sc) WR4(sc, CCM_CCGR3, 0x3ff00000); /* DDR memory controller */ WR4(sc, CCM_CCGR4, 0x0000f300); /* pl301 bus crossbar */ WR4(sc, CCM_CCGR5, 0x0f000000); /* uarts */ - WR4(sc, CCM_CCGR6, 0x000000cc); /* usdhc 1 & 3 */ + WR4(sc, CCM_CCGR6, 0x000000ff); /* usdhc 1-4 */ } static int From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 02:39:01 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 22E87316; Fri, 23 Jan 2015 02:39:01 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E39BAB5; Fri, 23 Jan 2015 02:39:01 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N2d0Iq072014; Fri, 23 Jan 2015 02:39:00 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N2d0jH072013; Fri, 23 Jan 2015 02:39:00 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501230239.t0N2d0jH072013@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jan 2015 02:39:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277557 - stable/10/usr.sbin/crunch/crunchide X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 02:39:01 -0000 Author: emaste Date: Fri Jan 23 02:39:00 2015 New Revision: 277557 URL: https://svnweb.freebsd.org/changeset/base/277557 Log: crunchide: Correct 64-bit section header offset For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44. Instead of using an incorrect hardcoded offset, let the compiler figure it out for us with offsetof(). MFC of r277259 Modified: stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/crunch/crunchide/exec_elf32.c ============================================================================== --- stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Fri Jan 23 01:39:04 2015 (r277556) +++ stable/10/usr.sbin/crunch/crunchide/exec_elf32.c Fri Jan 23 02:39:00 2015 (r277557) @@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -464,7 +465,7 @@ ELFNAMEEND(hide)(int fd, const char *fn) if (layoutp[i].shdr == &shdrshdr && ehdr.e_shoff != shdrshdr.sh_offset) { ehdr.e_shoff = shdrshdr.sh_offset; - off = (ELFSIZE == 32) ? 32 : 44; + off = offsetof(Elf_Ehdr, e_shoff); size = sizeof(Elf_Off); if ((size_t)xwriteatoff(fd, &ehdr.e_shoff, off, size, fn) != size) From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 04:07:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6BFD5F68; Fri, 23 Jan 2015 04:07:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5817F403; Fri, 23 Jan 2015 04:07:08 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N478Ff014911; Fri, 23 Jan 2015 04:07:08 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N478AM014910; Fri, 23 Jan 2015 04:07:08 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501230407.t0N478AM014910@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jan 2015 04:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277558 - stable/10/lib/libelf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 04:07:08 -0000 Author: emaste Date: Fri Jan 23 04:07:07 2015 New Revision: 277558 URL: https://svnweb.freebsd.org/changeset/base/277558 Log: libelf: Improve ELF header validation Avoid integer overflow and reading past EOF. MFC of r276427, r276443, r277249 from contrib/elftoolchain. Modified: stable/10/lib/libelf/elf_scn.c Modified: stable/10/lib/libelf/elf_scn.c ============================================================================== --- stable/10/lib/libelf/elf_scn.c Fri Jan 23 02:39:00 2015 (r277557) +++ stable/10/lib/libelf/elf_scn.c Fri Jan 23 04:07:07 2015 (r277558) @@ -31,6 +31,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "_libelf.h" @@ -55,8 +56,10 @@ _libelf_load_scn(Elf *e, void *ehdr) assert((e->e_flags & LIBELF_F_SHDRS_LOADED) == 0); #define CHECK_EHDR(E,EH) do { \ - if (fsz != (EH)->e_shentsize || \ - shoff + fsz * shnum > e->e_rawsize) { \ + if (shoff > e->e_rawsize || \ + fsz != (EH)->e_shentsize || \ + shnum > SIZE_MAX / fsz || \ + fsz * shnum > e->e_rawsize - shoff) { \ LIBELF_SET_ERROR(HEADER, 0); \ return (0); \ } \ From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 07:30:59 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BC4E875F; Fri, 23 Jan 2015 07:30:59 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A743999A; Fri, 23 Jan 2015 07:30:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N7UxYG008494; Fri, 23 Jan 2015 07:30:59 GMT (envelope-from danfe@FreeBSD.org) Received: (from danfe@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N7Uwta008490; Fri, 23 Jan 2015 07:30:58 GMT (envelope-from danfe@FreeBSD.org) Message-Id: <201501230730.t0N7Uwta008490@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: danfe set sender to danfe@FreeBSD.org using -f From: Alexey Dokuchaev Date: Fri, 23 Jan 2015 07:30:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277560 - in head: lib/libstand share/man/man9 sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 07:31:00 -0000 Author: danfe (ports committer) Date: Fri Jan 23 07:30:57 2015 New Revision: 277560 URL: https://svnweb.freebsd.org/changeset/base/277560 Log: Fix usage example in kvprintf(9) and its copy in libstand(3): trailing '\n' in bitfield argument is wrong, as it will be treated as bit 10, causing any code printing >=10 bits with bit 10 on as having a trailing comma. Newline (intended one) should be part of the format string (already present in the examples). Also fix grammar and kill EOL whitespace in comment while here. PR: 195005 Approved by: bdrewery Modified: head/lib/libstand/libstand.3 head/lib/libstand/printf.c head/share/man/man9/printf.9 head/sys/kern/subr_prf.c Modified: head/lib/libstand/libstand.3 ============================================================================== --- head/lib/libstand/libstand.3 Fri Jan 23 06:01:34 2015 (r277559) +++ head/lib/libstand/libstand.3 Fri Jan 23 07:30:57 2015 (r277560) @@ -288,7 +288,7 @@ Thus printf( .Qq reg=%b\en , 3, -.Qq \e10\e2BITTWO\e1BITONE\en +.Qq \e10\e2BITTWO\e1BITONE ); .Ed .Pp Modified: head/lib/libstand/printf.c ============================================================================== --- head/lib/libstand/printf.c Fri Jan 23 06:01:34 2015 (r277559) +++ head/lib/libstand/printf.c Fri Jan 23 07:30:57 2015 (r277560) @@ -187,7 +187,7 @@ ksprintn(char *nbuf, uintmax_t num, int * the next characters (up to a control character, i.e. a character <= 32), * give the name of the register. Thus: * - * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n"); + * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE"); * * would produce output: * @@ -500,7 +500,7 @@ number: while (percent < fmt) PCHAR(*percent++); /* - * Since we ignore an formatting argument it is no + * Since we ignore a formatting argument it is no * longer safe to obey the remaining formatting * arguments as the arguments will no longer match * the format specs. Modified: head/share/man/man9/printf.9 ============================================================================== --- head/share/man/man9/printf.9 Fri Jan 23 06:01:34 2015 (r277559) +++ head/share/man/man9/printf.9 Fri Jan 23 07:30:57 2015 (r277560) @@ -151,7 +151,7 @@ void printf_test(void) { - printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE\en"); + printf("reg=%b\en", 3, "\e10\e2BITTWO\e1BITONE"); printf("out: %4D\en", "AAAA", ":"); } .Ed Modified: head/sys/kern/subr_prf.c ============================================================================== --- head/sys/kern/subr_prf.c Fri Jan 23 06:01:34 2015 (r277559) +++ head/sys/kern/subr_prf.c Fri Jan 23 07:30:57 2015 (r277560) @@ -598,7 +598,7 @@ ksprintn(char *nbuf, uintmax_t num, int * the next characters (up to a control character, i.e. a character <= 32), * give the name of the register. Thus: * - * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE\n"); + * kvprintf("reg=%b\n", 3, "\10\2BITTWO\1BITONE"); * * would produce output: * @@ -911,7 +911,7 @@ number: while (percent < fmt) PCHAR(*percent++); /* - * Since we ignore a formatting argument it is no + * Since we ignore a formatting argument it is no * longer safe to obey the remaining formatting * arguments as the arguments will no longer match * the format specs. From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 07:36:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7F4D8949; Fri, 23 Jan 2015 07:36:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EE46A57; Fri, 23 Jan 2015 07:36:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0N7arSs011586; Fri, 23 Jan 2015 07:36:53 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0N7aqrV011578; Fri, 23 Jan 2015 07:36:52 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501230736.t0N7aqrV011578@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Fri, 23 Jan 2015 07:36:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277561 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 07:36:53 -0000 Author: nwhitehorn Date: Fri Jan 23 07:36:51 2015 New Revision: 277561 URL: https://svnweb.freebsd.org/changeset/base/277561 Log: Use relocation-safe methods to determine the sizes of the exception handlers. A "size" symbol with its address set to the length of handler would be shifted forward with all other addresses when relocations are processed. Instead, just note the end and do the subtraction at runtime. Modified: head/sys/powerpc/aim/machdep.c head/sys/powerpc/aim/trap_subr32.S head/sys/powerpc/aim/trap_subr64.S Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Fri Jan 23 07:30:57 2015 (r277560) +++ head/sys/powerpc/aim/machdep.c Fri Jan 23 07:36:51 2015 (r277561) @@ -237,14 +237,14 @@ extern void *rfid_patch, *rfi_patch1, *r extern void *trapcode64; #endif -extern void *rstcode, *rstsize; -extern void *trapcode, *trapsize, *trapcode2; -extern void *slbtrap, *slbtrapsize; -extern void *alitrap, *alisize; -extern void *dsitrap, *dsisize; +extern void *rstcode, *rstcodeend; +extern void *trapcode, *trapcodeend, *trapcode2; +extern void *slbtrap, *slbtrapend; +extern void *alitrap, *aliend; +extern void *dsitrap, *dsiend; extern void *decrint, *decrsize; extern void *extint, *extsize; -extern void *dblow, *dbsize; +extern void *dblow, *dbend; extern void *imisstrap, *imisssize; extern void *dlmisstrap, *dlmisssize; extern void *dsmisstrap, *dsmisssize; @@ -255,7 +255,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ struct pcpu *pc; vm_offset_t startkernel, endkernel; void *generictrap; - size_t trap_offset; + size_t trap_offset, trapsize; void *kmdp; char *env; register_t msr, scratch; @@ -513,35 +513,44 @@ powerpc_init(vm_offset_t fdt, vm_offset_ *((register_t *)TRAP_TOCBASE) = toc; #endif - bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstsize); + trapsize = (size_t)&trapcodeend - (size_t)&trapcode; + + bcopy(&rstcode, (void *)(EXC_RST + trap_offset), (size_t)&rstcodeend - + (size_t)&rstcode); #ifdef KDB - bcopy(&dblow, (void *)(EXC_MCHK + trap_offset), (size_t)&dbsize); - bcopy(&dblow, (void *)(EXC_PGM + trap_offset), (size_t)&dbsize); - bcopy(&dblow, (void *)(EXC_TRC + trap_offset), (size_t)&dbsize); - bcopy(&dblow, (void *)(EXC_BPT + trap_offset), (size_t)&dbsize); + bcopy(&dblow, (void *)(EXC_MCHK + trap_offset), (size_t)&dbend - + (size_t)&dblow); + bcopy(&dblow, (void *)(EXC_PGM + trap_offset), (size_t)&dbend - + (size_t)&dblow); + bcopy(&dblow, (void *)(EXC_TRC + trap_offset), (size_t)&dbend - + (size_t)&dblow); + bcopy(&dblow, (void *)(EXC_BPT + trap_offset), (size_t)&dbend - + (size_t)&dblow); #else - bcopy(generictrap, (void *)EXC_MCHK, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_PGM, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_TRC, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_BPT, (size_t)&trapsize); + bcopy(generictrap, (void *)EXC_MCHK, trapsize); + bcopy(generictrap, (void *)EXC_PGM, trapsize); + bcopy(generictrap, (void *)EXC_TRC, trapsize); + bcopy(generictrap, (void *)EXC_BPT, trapsize); #endif - bcopy(&alitrap, (void *)(EXC_ALI + trap_offset), (size_t)&alisize); - bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsisize); - bcopy(generictrap, (void *)EXC_ISI, (size_t)&trapsize); + bcopy(&alitrap, (void *)(EXC_ALI + trap_offset), (size_t)&aliend - + (size_t)&alitrap); + bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsitrap - + (size_t)&dsitrap); + bcopy(generictrap, (void *)EXC_ISI, trapsize); #ifdef __powerpc64__ - bcopy(&slbtrap, (void *)EXC_DSE, (size_t)&slbtrapsize); - bcopy(&slbtrap, (void *)EXC_ISE, (size_t)&slbtrapsize); + bcopy(&slbtrap, (void *)EXC_DSE,(size_t)&slbtrapend - (size_t)&slbtrap); + bcopy(&slbtrap, (void *)EXC_ISE,(size_t)&slbtrapend - (size_t)&slbtrap); #endif - bcopy(generictrap, (void *)EXC_EXI, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_FPU, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_DECR, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_SC, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_FPA, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_VEC, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_PERF, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_VECAST_G4, (size_t)&trapsize); - bcopy(generictrap, (void *)EXC_VECAST_G5, (size_t)&trapsize); + bcopy(generictrap, (void *)EXC_EXI, trapsize); + bcopy(generictrap, (void *)EXC_FPU, trapsize); + bcopy(generictrap, (void *)EXC_DECR, trapsize); + bcopy(generictrap, (void *)EXC_SC, trapsize); + bcopy(generictrap, (void *)EXC_FPA, trapsize); + bcopy(generictrap, (void *)EXC_VEC, trapsize); + bcopy(generictrap, (void *)EXC_PERF, trapsize); + bcopy(generictrap, (void *)EXC_VECAST_G4, trapsize); + bcopy(generictrap, (void *)EXC_VECAST_G5, trapsize); #ifndef __powerpc64__ /* G2-specific TLB miss helper handlers */ bcopy(&imisstrap, (void *)EXC_IMISS, (size_t)&imisssize); Modified: head/sys/powerpc/aim/trap_subr32.S ============================================================================== --- head/sys/powerpc/aim/trap_subr32.S Fri Jan 23 07:30:57 2015 (r277560) +++ head/sys/powerpc/aim/trap_subr32.S Fri Jan 23 07:36:51 2015 (r277561) @@ -299,10 +299,10 @@ CNAME(restorebridgesize) = .-CNAME(resto * not still hanging around in the trap handling region * once the MMU is turned on. */ - .globl CNAME(rstcode), CNAME(rstsize) + .globl CNAME(rstcode), CNAME(rstcodeend) CNAME(rstcode): ba cpu_reset -CNAME(rstsize) = . - CNAME(rstcode) +CNAME(rstcodeend): cpu_reset: bl 1f @@ -339,14 +339,14 @@ cpu_reset: * (except ISI/DSI, ALI, and the interrupts) */ - .globl CNAME(trapcode),CNAME(trapsize) + .globl CNAME(trapcode),CNAME(trapcodeend) CNAME(trapcode): mtsprg1 %r1 /* save SP */ mflr %r1 /* Save the old LR in r1 */ mtsprg2 %r1 /* And then in SPRG2 */ li %r1, 0x20 /* How to get the vector from LR */ bla generictrap /* LR & SPRG3 is exception # */ -CNAME(trapsize) = .-CNAME(trapcode) +CNAME(trapcodeend): /* * 64-bit version of trapcode. Identical, except it calls generictrap64. @@ -362,7 +362,7 @@ CNAME(trapcode64): /* * For ALI: has to save DSISR and DAR */ - .globl CNAME(alitrap),CNAME(alisize) + .globl CNAME(alitrap),CNAME(aliend) CNAME(alitrap): mtsprg1 %r1 /* save SP */ GET_CPUINFO(%r1) @@ -386,7 +386,7 @@ CNAME(alitrap): mfsrr1 %r31 mtcr %r31 bla s_trap -CNAME(alisize) = .-CNAME(alitrap) +CNAME(aliend): /* * G2 specific: instuction TLB miss. @@ -594,7 +594,7 @@ CNAME(dsmisssize) = .-CNAME(dsmisstrap) * Has to handle BAT spills * and standard pagetable spills */ - .globl CNAME(dsitrap),CNAME(dsisize) + .globl CNAME(dsitrap),CNAME(dsiend) CNAME(dsitrap): mtsprg1 %r1 /* save SP */ GET_CPUINFO(%r1) @@ -645,7 +645,7 @@ CNAME(dsitrap): 1: mflr %r28 /* save LR (SP already saved) */ bla disitrap -CNAME(dsisize) = .-CNAME(dsitrap) +CNAME(dsiend): /* * Preamble code for DSI/ISI traps @@ -883,7 +883,7 @@ CNAME(rfi_patch2): /* * In case of KDB we want a separate trap catcher for it */ - .globl CNAME(dblow),CNAME(dbsize) + .globl CNAME(dblow),CNAME(dbend) CNAME(dblow): mtsprg1 %r1 /* save SP */ mtsprg2 %r29 /* save r29 */ @@ -909,5 +909,5 @@ CNAME(dblow): stw %r31,(PC_DBSAVE+CPUSAVE_R31)(%r1) /* free r31 */ mflr %r28 /* save LR */ bla dbtrap -CNAME(dbsize) = .-CNAME(dblow) +CNAME(dbend): #endif /* KDB */ Modified: head/sys/powerpc/aim/trap_subr64.S ============================================================================== --- head/sys/powerpc/aim/trap_subr64.S Fri Jan 23 07:30:57 2015 (r277560) +++ head/sys/powerpc/aim/trap_subr64.S Fri Jan 23 07:36:51 2015 (r277561) @@ -294,7 +294,7 @@ dtrace_invop_calltrap_addr: * not still hanging around in the trap handling region * once the MMU is turned on. */ - .globl CNAME(rstcode), CNAME(rstsize) + .globl CNAME(rstcode), CNAME(rstcodeend) CNAME(rstcode): /* Explicitly set MSR[SF] */ mfmsr %r9 @@ -309,7 +309,7 @@ CNAME(rstcode): mtlr %r9 blr -CNAME(rstsize) = . - CNAME(rstcode) +CNAME(rstcodeend): cpu_reset: GET_TOCBASE(%r2) @@ -350,7 +350,7 @@ cpu_reset: * (except ISI/DSI, ALI, and the interrupts). Has to fit in 8 instructions! */ - .globl CNAME(trapcode),CNAME(trapsize) + .globl CNAME(trapcode),CNAME(trapcodeend) .p2align 3 CNAME(trapcode): mtsprg1 %r1 /* save SP */ @@ -361,7 +361,7 @@ CNAME(trapcode): mtlr %r1 li %r1, 0xA0 /* How to get the vector from LR */ blrl /* Branch to generictrap */ -CNAME(trapsize) = .-CNAME(trapcode) +CNAME(trapcodeend): /* * For SLB misses: do special things for the kernel @@ -369,7 +369,7 @@ CNAME(trapsize) = .-CNAME(trapcode) * Note: SPRG1 is always safe to overwrite any time the MMU is on, which is * the only time this can be called. */ - .globl CNAME(slbtrap),CNAME(slbtrapsize) + .globl CNAME(slbtrap),CNAME(slbtrapend) .p2align 3 CNAME(slbtrap): mtsprg1 %r1 /* save SP */ @@ -404,7 +404,7 @@ CNAME(slbtrap): mtlr %r1 GET_CPUINFO(%r1) blrl /* 124 bytes -- 4 to spare */ -CNAME(slbtrapsize) = .-CNAME(slbtrap) +CNAME(slbtrapend): kern_slbtrap: std %r2,(PC_SLBSAVE+136)(%r1) /* old LR */ @@ -525,7 +525,7 @@ kern_slbtrap: /* * For ALI: has to save DSISR and DAR */ - .globl CNAME(alitrap),CNAME(alisize) + .globl CNAME(alitrap),CNAME(aliend) CNAME(alitrap): mtsprg1 %r1 /* save SP */ GET_CPUINFO(%r1) @@ -560,13 +560,13 @@ CNAME(alitrap): mfsrr1 %r31 mtcr %r31 blrl -CNAME(alisize) = .-CNAME(alitrap) +CNAME(aliend): /* * Similar to the above for DSI * Has to handle standard pagetable spills */ - .globl CNAME(dsitrap),CNAME(dsisize) + .globl CNAME(dsitrap),CNAME(dsiend) CNAME(dsitrap): mtsprg1 %r1 /* save SP */ GET_CPUINFO(%r1) @@ -587,7 +587,7 @@ CNAME(dsitrap): ld %r1,0(%r1) mtlr %r1 blrl /* Branch to generictrap */ -CNAME(dsisize) = .-CNAME(dsitrap) +CNAME(dsiend): /* * Preamble code for DSI/ISI traps @@ -830,7 +830,7 @@ dbleave: /* * In case of KDB we want a separate trap catcher for it */ - .globl CNAME(dblow),CNAME(dbsize) + .globl CNAME(dblow),CNAME(dbend) CNAME(dblow): mtsprg1 %r1 /* save SP */ mtsprg2 %r29 /* save r29 */ @@ -869,5 +869,5 @@ CNAME(dblow): ld %r1,0(%r1) mtlr %r1 blrl /* Branch to generictrap */ -CNAME(dbsize) = .-CNAME(dblow) +CNAME(dbend): #endif /* KDB */ From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 13:26:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6E14E7A5; Fri, 23 Jan 2015 13:26:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B3DE3B4; Fri, 23 Jan 2015 13:26:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NDQaO8076312; Fri, 23 Jan 2015 13:26:36 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NDQaox076311; Fri, 23 Jan 2015 13:26:36 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201501231326.t0NDQaox076311@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Fri, 23 Jan 2015 13:26:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277562 - head/sbin/ping X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 13:26:36 -0000 Author: ae Date: Fri Jan 23 13:26:35 2015 New Revision: 277562 URL: https://svnweb.freebsd.org/changeset/base/277562 Log: After r270929 RAW IP code assumes that all IP fields are in network byte order. Fix ping(8) to pass an IP header with converted ip_off and ip_len fields, when IP_HDRINCL socket option used. Modified: head/sbin/ping/ping.c Modified: head/sbin/ping/ping.c ============================================================================== --- head/sbin/ping/ping.c Fri Jan 23 07:36:51 2015 (r277561) +++ head/sbin/ping/ping.c Fri Jan 23 13:26:35 2015 (r277562) @@ -713,7 +713,7 @@ main(int argc, char *const *argv) ip->ip_hl = sizeof(struct ip) >> 2; ip->ip_tos = tos; ip->ip_id = 0; - ip->ip_off = df ? IP_DF : 0; + ip->ip_off = htons(df ? IP_DF : 0); ip->ip_ttl = ttl; ip->ip_p = IPPROTO_ICMP; ip->ip_src.s_addr = source ? sock_in.sin_addr.s_addr : INADDR_ANY; @@ -1078,7 +1078,7 @@ pinger(void) if (options & F_HDRINCL) { cc += sizeof(struct ip); ip = (struct ip *)outpackhdr; - ip->ip_len = cc; + ip->ip_len = htons(cc); ip->ip_sum = in_cksum((u_short *)outpackhdr, cc); packet = outpackhdr; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 14:28:13 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A2C004D0; Fri, 23 Jan 2015 14:28:13 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F70CC4A; Fri, 23 Jan 2015 14:28:13 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NESDju004472; Fri, 23 Jan 2015 14:28:13 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NESDMl004471; Fri, 23 Jan 2015 14:28:13 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231428.t0NESDMl004471@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 14:28:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277563 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 14:28:13 -0000 Author: will Date: Fri Jan 23 14:28:12 2015 New Revision: 277563 URL: https://svnweb.freebsd.org/changeset/base/277563 Log: When a CARP state change is caused by an ifconfig request, log it accordingly. Suggested by: glebius MFC after: 1 week MFC with: 277530 Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Fri Jan 23 13:26:35 2015 (r277562) +++ head/sys/netinet/ip_carp.c Fri Jan 23 14:28:12 2015 (r277563) @@ -1702,12 +1702,14 @@ carp_ioctl(struct ifreq *ifr, u_long cmd switch (carpr.carpr_state) { case BACKUP: callout_stop(&sc->sc_ad_tmo); - carp_set_state(sc, BACKUP, "SIOCSVH"); + carp_set_state(sc, BACKUP, + "user requested via ifconfig"); carp_setrun(sc, 0); carp_delroute(sc); break; case MASTER: - carp_master_down_locked(sc, "SIOCSVH"); + carp_master_down_locked(sc, + "user requested via ifconfig"); break; default: break; From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 14:29:49 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 13F02655 for ; Fri, 23 Jan 2015 14:29:49 +0000 (UTC) Received: from mail-ie0-f179.google.com (mail-ie0-f179.google.com [209.85.223.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id D0CCAC69 for ; Fri, 23 Jan 2015 14:29:48 +0000 (UTC) Received: by mail-ie0-f179.google.com with SMTP id x19so7353017ier.10 for ; Fri, 23 Jan 2015 06:29:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=i7t9qiEpCF8t7mInRbyM7YeJrt9dYsoEn5OAOB/tBOc=; b=MOcQA3RbYlJRILF9VcsE9JuKVXQ/pr/TPvHs18sG23wxL8QxsjGfvqxZaVTiNuUne1 neKphMVEABDOXQO19LBP0fzoH9Qvey6s3Skv9zycw3ukybQplPImhD2hjJgr0vaNluV1 QM7tGgEsjx6VlMZLxDukJfhQ9DJ5tmmnSSuPh0sV/C9uV/NYXMnAvBw5IFMOaFkOXCUX 1EzEg/BD8Hd/3/xqcSwqI2rfBeqm22rWCMsP7exNGmvASukJS7LwBDtVAoEU8mN9PhZ8 858IN/Xw7W6KWIjK6+b2s/VNB5CLu9uGJpJHtukyDtKzukzukWq12MzSDtVy4O8p0cd7 t06g== X-Gm-Message-State: ALoCoQm0o2p4wWoz0UbYamxmHLu4cD+nTaktm3tpGBbm3ylWgXAENRKkLvWrzg5Q3otfFGAtkc4r X-Received: by 10.42.95.12 with SMTP id d12mr8925349icn.12.1422023382582; Fri, 23 Jan 2015 06:29:42 -0800 (PST) Received: from sol.firepipe.net (c-50-183-92-30.hsd1.co.comcast.net. [50.183.92.30]) by mx.google.com with ESMTPSA id c4sm723552igt.19.2015.01.23.06.29.41 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 06:29:41 -0800 (PST) Date: Fri, 23 Jan 2015 07:29:39 -0700 From: Will Andrews To: Gleb Smirnoff Subject: Re: svn commit: r277530 - head/sys/netinet Message-ID: <20150123142938.GC49380@sol.firepipe.net> References: <201501221709.t0MH9svg093005@svn.freebsd.org> <20150122230353.GQ15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="raC6veAxrt5nqIoY" Content-Disposition: inline In-Reply-To: <20150122230353.GQ15484@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Will Andrews X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 14:29:49 -0000 --raC6veAxrt5nqIoY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 23, 2015 at 02:03:53AM +0300, Gleb Smirnoff wrote: > Very nice, thanks! >=20 > The only thing I'd suggest to change is "SIOCSVH". You and me, we underst= and > this enchantment word, but average user Joe doesn't. :) May be a text like > "user requested" or something else. I don't insist on anything, as I am n= ot > native speaker, but anything except of SIOCSVH :) >=20 > P.S. Abbreviation "hw" might also be improved. Sounds good to me. Done. --=20 wca --raC6veAxrt5nqIoY Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTCWtEACgkQF47idPgWcsWkfQCdF4MyYZspr/iT0fX71YSiPp6x ZtcAn3CWcvDeQJ41BZoRTi2p6hF1Yu49 =VFGW -----END PGP SIGNATURE----- --raC6veAxrt5nqIoY-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 14:30:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C66F477B; Fri, 23 Jan 2015 14:30:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B30A4CFD; Fri, 23 Jan 2015 14:30:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NEUPrw007067; Fri, 23 Jan 2015 14:30:25 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NEUPFg007066; Fri, 23 Jan 2015 14:30:25 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231430.t0NEUPFg007066@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 14:30:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277564 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 14:30:25 -0000 Author: will Date: Fri Jan 23 14:30:24 2015 New Revision: 277564 URL: https://svnweb.freebsd.org/changeset/base/277564 Log: Log hardware interface up/down as "hardware" rather than just "hw". Suggested by: glebius MFC after: 1 week MFC with: 277530 Modified: head/sys/netinet/ip_carp.c Modified: head/sys/netinet/ip_carp.c ============================================================================== --- head/sys/netinet/ip_carp.c Fri Jan 23 14:28:12 2015 (r277563) +++ head/sys/netinet/ip_carp.c Fri Jan 23 14:30:24 2015 (r277564) @@ -2001,13 +2001,13 @@ carp_sc_state(struct carp_softc *sc) #ifdef INET6 callout_stop(&sc->sc_md6_tmo); #endif - carp_set_state(sc, INIT, "hw interface down"); + carp_set_state(sc, INIT, "hardware interface down"); carp_setrun(sc, 0); if (!sc->sc_suppress) carp_demote_adj(V_carp_ifdown_adj, "interface down"); sc->sc_suppress = 1; } else { - carp_set_state(sc, INIT, "hw interface up"); + carp_set_state(sc, INIT, "hardware interface up"); carp_setrun(sc, 0); if (sc->sc_suppress) carp_demote_adj(-V_carp_ifdown_adj, "interface up"); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 15:14:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B135315D; Fri, 23 Jan 2015 15:14:31 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 83542274; Fri, 23 Jan 2015 15:14:31 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NFEVM5027602; Fri, 23 Jan 2015 15:14:31 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NFEUlT027595; Fri, 23 Jan 2015 15:14:30 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201501231514.t0NFEUlT027595@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Fri, 23 Jan 2015 15:14:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277565 - in head/sys/dev: agp cx dc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 15:14:31 -0000 Author: kevlo Date: Fri Jan 23 15:14:30 2015 New Revision: 277565 URL: https://svnweb.freebsd.org/changeset/base/277565 Log: Remove break after return. Modified: head/sys/dev/agp/agp_nvidia.c head/sys/dev/cx/cxddk.c head/sys/dev/dc/if_dc.c Modified: head/sys/dev/agp/agp_nvidia.c ============================================================================== --- head/sys/dev/agp/agp_nvidia.c Fri Jan 23 14:30:24 2015 (r277564) +++ head/sys/dev/agp/agp_nvidia.c Fri Jan 23 15:14:30 2015 (r277565) @@ -274,11 +274,11 @@ static u_int32_t agp_nvidia_get_aperture(device_t dev) { switch (pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1) & 0x0f) { - case 0: return (512 * 1024 * 1024); break; - case 8: return (256 * 1024 * 1024); break; - case 12: return (128 * 1024 * 1024); break; - case 14: return (64 * 1024 * 1024); break; - case 15: return (32 * 1024 * 1024); break; + case 0: return (512 * 1024 * 1024); + case 8: return (256 * 1024 * 1024); + case 12: return (128 * 1024 * 1024); + case 14: return (64 * 1024 * 1024); + case 15: return (32 * 1024 * 1024); default: device_printf(dev, "Invalid aperture setting 0x%x\n", pci_read_config(dev, AGP_NVIDIA_0_APSIZE, 1)); Modified: head/sys/dev/cx/cxddk.c ============================================================================== --- head/sys/dev/cx/cxddk.c Fri Jan 23 14:30:24 2015 (r277564) +++ head/sys/dev/cx/cxddk.c Fri Jan 23 15:14:30 2015 (r277565) @@ -875,9 +875,9 @@ int cx_get_port (cx_chan_t *c) if (iftype) switch (c->type) { - case T_UNIV_V35: return 1; break; - case T_UNIV_RS449: return 2; break; - default: return -1; break; + case T_UNIV_V35: return 1; + case T_UNIV_RS449: return 2; + default: return -1; } else return 0; Modified: head/sys/dev/dc/if_dc.c ============================================================================== --- head/sys/dev/dc/if_dc.c Fri Jan 23 14:30:24 2015 (r277564) +++ head/sys/dev/dc/if_dc.c Fri Jan 23 15:14:30 2015 (r277565) @@ -671,20 +671,16 @@ dc_miibus_readreg(device_t dev, int phy, * code think there's a PHY here. */ return (BMSR_MEDIAMASK); - break; case MII_PHYIDR1: if (DC_IS_PNIC(sc)) return (DC_VENDORID_LO); return (DC_VENDORID_DEC); - break; case MII_PHYIDR2: if (DC_IS_PNIC(sc)) return (DC_DEVICEID_82C168); return (DC_DEVICEID_21143); - break; default: return (0); - break; } } else return (0); @@ -748,7 +744,6 @@ dc_miibus_readreg(device_t dev, int phy, device_printf(dev, "phy_read: bad phy register %x\n", reg); return (0); - break; } rval = CSR_READ_4(sc, phy_reg) & 0x0000FFFF; From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 15:55:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5CAF3BF4; Fri, 23 Jan 2015 15:55:04 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 48993920; Fri, 23 Jan 2015 15:55:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NFt4SD046753; Fri, 23 Jan 2015 15:55:04 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NFt420046752; Fri, 23 Jan 2015 15:55:04 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231555.t0NFt420046752@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 15:55:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277566 - head/usr.sbin/iostat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 15:55:04 -0000 Author: will Date: Fri Jan 23 15:55:03 2015 New Revision: 277566 URL: https://svnweb.freebsd.org/changeset/base/277566 Log: Print transfer times for read, write, & overall independently. Round up calculated values for iops and average time per io to avoid a shifting display if there are 1000+ (or even 10000+) iops, or if an average time per io column is 1000+ ms. Reviewed by: ken MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1089947 on 2014/09/26 1093625 on 2014/09/29 1093650 on 2014/09/29 1095662 on 2014/10/09 Modified: head/usr.sbin/iostat/iostat.c Modified: head/usr.sbin/iostat/iostat.c ============================================================================== --- head/usr.sbin/iostat/iostat.c Fri Jan 23 15:14:30 2015 (r277565) +++ head/usr.sbin/iostat/iostat.c Fri Jan 23 15:55:03 2015 (r277566) @@ -726,15 +726,17 @@ static void devstats(int perf_select, long double etime, int havelast) { int dn; - long double transfers_per_second, transfers_per_second_read, transfers_per_second_write; - long double kb_per_transfer, mb_per_second, mb_per_second_read, mb_per_second_write; + long double transfers_per_second, transfers_per_second_read; + long double transfers_per_second_write; + long double kb_per_transfer, mb_per_second, mb_per_second_read; + long double mb_per_second_write; u_int64_t total_bytes, total_transfers, total_blocks; u_int64_t total_bytes_read, total_transfers_read; u_int64_t total_bytes_write, total_transfers_write; long double busy_pct, busy_time; u_int64_t queue_len; - long double total_mb; - long double blocks_per_second, ms_per_transaction, total_duration; + long double total_mb, blocks_per_second, total_duration; + long double ms_per_other, ms_per_read, ms_per_write, ms_per_transaction; int firstline = 1; char *devname; @@ -746,8 +748,8 @@ devstats(int perf_select, long double et printf(" cpu "); printf("\n"); if (Iflag == 0) { - printf("device r/s w/s kr/s kw/s qlen " - "svc_t %%b "); + printf("device r/s w/s kr/s kw/s " + " ms/r ms/w ms/o ms/t qlen %%b "); } else { printf("device r/i w/i kr/i" " kw/i qlen tsvc_t/i sb/i "); @@ -786,6 +788,9 @@ devstats(int perf_select, long double et DSM_MB_PER_SECOND_WRITE, &mb_per_second_write, DSM_BLOCKS_PER_SECOND, &blocks_per_second, DSM_MS_PER_TRANSACTION, &ms_per_transaction, + DSM_MS_PER_TRANSACTION_READ, &ms_per_read, + DSM_MS_PER_TRANSACTION_WRITE, &ms_per_write, + DSM_MS_PER_TRANSACTION_OTHER, &ms_per_other, DSM_BUSY_PCT, &busy_pct, DSM_QUEUE_LENGTH, &queue_len, DSM_TOTAL_DURATION, &total_duration, @@ -820,13 +825,18 @@ devstats(int perf_select, long double et mb_per_second_write > ((long double).0005)/1024 || busy_pct > 0.5) { if (Iflag == 0) - printf("%-8.8s %5.1Lf %5.1Lf %7.1Lf %7.1Lf %4" PRIu64 " %5.1Lf %3.0Lf ", - devname, transfers_per_second_read, - transfers_per_second_write, + printf("%-8.8s %5d %5d %8.1Lf " + "%8.1Lf %5d %5d %5d %5d " + "%4" PRIu64 " %3.0Lf ", + devname, + (int)transfers_per_second_read, + (int)transfers_per_second_write, mb_per_second_read * 1024, mb_per_second_write * 1024, - queue_len, - ms_per_transaction, busy_pct); + (int)ms_per_read, (int)ms_per_write, + (int)ms_per_other, + (int)ms_per_transaction, + queue_len, busy_pct); else printf("%-8.8s %11.1Lf %11.1Lf " "%12.1Lf %12.1Lf %4" PRIu64 From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 16:03:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C6976CF; Fri, 23 Jan 2015 16:03:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2CD8A3D; Fri, 23 Jan 2015 16:03:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NG33W9051363; Fri, 23 Jan 2015 16:03:03 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NG33Y3051362; Fri, 23 Jan 2015 16:03:03 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231603.t0NG33Y3051362@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 16:03:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277567 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 16:03:03 -0000 Author: will Date: Fri Jan 23 16:03:02 2015 New Revision: 277567 URL: https://svnweb.freebsd.org/changeset/base/277567 Log: Allow lists for "nooption" and "nooptions" keywords. usr.sbin/config/config.y According to config(5), the "device", "devices", "nodevice", "nodevices", "option", "options", "nooption", and "nooptions" keywords can all take a comma-separated list of values. However, the yacc code did not allow lists for "nooption" and "nooptions", only single values. This commit fixes the yacc code to allow comma separated values for all the above keywords. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1095296 on 2014/10/07 Modified: head/usr.sbin/config/config.y Modified: head/usr.sbin/config/config.y ============================================================================== --- head/usr.sbin/config/config.y Fri Jan 23 15:55:03 2015 (r277566) +++ head/usr.sbin/config/config.y Fri Jan 23 16:03:02 2015 (r277567) @@ -178,7 +178,7 @@ Config_spec: } | OPTIONS Opt_list | - NOOPTION Save_id { rmopt_schedule(&opt, $2); } | + NOOPTION NoOpt_list | MAKEOPTIONS Mkopt_list | NOMAKEOPTION Save_id { rmopt_schedule(&mkopt, $2); } | @@ -225,6 +225,11 @@ Opt_list: Option ; +NoOpt_list: + NoOpt_list COMMA NoOption + | + NoOption + ; Option: Save_id { newopt(&opt, $1, NULL, 0); @@ -236,6 +241,11 @@ Option: newopt(&opt, $1, $3, 0); } ; +NoOption: + Save_id { + rmopt_schedule(&opt, $1); + }; + Opt_value: ID { $$ = $1; } | NUMBER { From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 16:05:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 35B56620; Fri, 23 Jan 2015 16:05:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07E41AC2; Fri, 23 Jan 2015 16:05:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NG5lns052905; Fri, 23 Jan 2015 16:05:47 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NG5lND052904; Fri, 23 Jan 2015 16:05:47 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501231605.t0NG5lND052904@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Fri, 23 Jan 2015 16:05:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277568 - head/sys/arm/freescale/imx X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 16:05:48 -0000 Author: ian Date: Fri Jan 23 16:05:47 2015 New Revision: 277568 URL: https://svnweb.freebsd.org/changeset/base/277568 Log: Add pinctrl driver support for the encoded input register config words that the linux guys made up on the fly (but didn't document) last August. This type of encoded config now appears in the imx6 fdt data. Modified: head/sys/arm/freescale/imx/imx_iomux.c Modified: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Fri Jan 23 16:03:02 2015 (r277567) +++ head/sys/arm/freescale/imx/imx_iomux.c Fri Jan 23 16:05:47 2015 (r277568) @@ -117,10 +117,36 @@ WR4(struct iomux_softc *sc, bus_size_t o bus_write_4(sc->mem_res, off, val); } +static void +iomux_configure_input(struct iomux_softc *sc, uint32_t reg, uint32_t val) +{ + u_int select, mask, shift, width; + + /* If register and value are zero, there is nothing to configure. */ + if (reg == 0 && val == 0) + return; + + /* + * If the config value has 0xff in the high byte it is encoded: + * 31 23 15 7 0 + * | 0xff | shift | width | select | + * We need to mask out the old select value and OR in the new, using a + * mask of the given width and shifting the values up by shift. + */ + if ((val & 0xff000000) == 0xff000000) { + select = val & 0x000000ff; + width = (val & 0x0000ff00) >> 8; + shift = (val & 0x00ff0000) >> 16; + mask = ((1u << width) - 1) << shift; + val = (RD4(sc, reg) & ~mask) | (select << shift); + } + WR4(sc, reg, val); +} + static int iomux_configure_pins(device_t dev, phandle_t cfgxref) { - struct iomux_softc * sc; + struct iomux_softc *sc; struct pincfg *cfgtuples, *cfg; phandle_t cfgnode; int i, ntuples; @@ -137,8 +163,7 @@ iomux_configure_pins(device_t dev, phand for (i = 0, cfg = cfgtuples; i < ntuples; i++, cfg++) { sion = (cfg->padconf_val & PADCONF_SION) ? PADMUX_SION : 0; WR4(sc, cfg->mux_reg, cfg->mux_val | sion); - if (cfg->input_reg != 0) - WR4(sc, cfg->input_reg, cfg->input_val); + iomux_configure_input(sc, cfg->input_reg, cfg->input_val); if ((cfg->padconf_val & PADCONF_NONE) == 0) WR4(sc, cfg->padconf_reg, cfg->padconf_val); if (bootverbose) { From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 16:15:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD604A34; Fri, 23 Jan 2015 16:15:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AE0A8C03; Fri, 23 Jan 2015 16:15:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NGFuAn057627; Fri, 23 Jan 2015 16:15:56 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NGFuQW057626; Fri, 23 Jan 2015 16:15:56 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231615.t0NGFuQW057626@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 16:15:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277569 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 16:15:56 -0000 Author: will Date: Fri Jan 23 16:15:55 2015 New Revision: 277569 URL: https://svnweb.freebsd.org/changeset/base/277569 Log: Make "vmstat -i" respect the -c and -i options together. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1066735 on 2014/06/04 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Fri Jan 23 16:05:47 2015 (r277568) +++ head/usr.bin/vmstat/vmstat.c Fri Jan 23 16:15:55 2015 (r277569) @@ -148,7 +148,7 @@ static void cpustats(void); static void pcpustats(int, u_long, int); static void devstats(void); static void doforkst(void); -static void dointr(void); +static void dointr(unsigned int, int); static void dosum(void); static void dovmstat(unsigned int, int); static void domemstat_malloc(void); @@ -325,7 +325,7 @@ retry_nlist: dotimes(); #endif if (todo & INTRSTAT) - dointr(); + dointr(interval, reps); if (todo & VMSTAT) dovmstat(interval, reps); exit(0); @@ -1165,61 +1165,132 @@ pcpustats(int ncpus, u_long cpumask, int } } -static void -dointr(void) +static unsigned int +read_intrcnts(unsigned long **intrcnts) { - unsigned long *intrcnt, uptime; - uint64_t inttotal; - size_t clen, inamlen, intrcntlen, istrnamlen; - unsigned int i, nintr; - char *intrname, *tintrname; + size_t intrcntlen; - uptime = getuptime(); if (kd != NULL) { kread(X_SINTRCNT, &intrcntlen, sizeof(intrcntlen)); - kread(X_SINTRNAMES, &inamlen, sizeof(inamlen)); - if ((intrcnt = malloc(intrcntlen)) == NULL || - (intrname = malloc(inamlen)) == NULL) + if ((*intrcnts = malloc(intrcntlen)) == NULL) err(1, "malloc()"); - kread(X_INTRCNT, intrcnt, intrcntlen); - kread(X_INTRNAMES, intrname, inamlen); + kread(X_INTRCNT, *intrcnts, intrcntlen); } else { - for (intrcnt = NULL, intrcntlen = 1024; ; intrcntlen *= 2) { - if ((intrcnt = reallocf(intrcnt, intrcntlen)) == NULL) + for (*intrcnts = NULL, intrcntlen = 1024; ; intrcntlen *= 2) { + *intrcnts = reallocf(*intrcnts, intrcntlen); + if (*intrcnts == NULL) err(1, "reallocf()"); if (mysysctl("hw.intrcnt", - intrcnt, &intrcntlen, NULL, 0) == 0) + *intrcnts, &intrcntlen, NULL, 0) == 0) break; } - for (intrname = NULL, inamlen = 1024; ; inamlen *= 2) { - if ((intrname = reallocf(intrname, inamlen)) == NULL) + } + + return (intrcntlen / sizeof(unsigned long)); +} + +static void +print_intrcnts(unsigned long *intrcnts, unsigned long *old_intrcnts, + char *intrnames, unsigned int nintr, + size_t istrnamlen, unsigned long long period) +{ + unsigned long *intrcnt, *old_intrcnt; + uint64_t inttotal, old_inttotal, total_count, total_rate; + char* intrname; + unsigned int i; + + inttotal = 0; + old_inttotal = 0; + intrname = intrnames; + for (i = 0, intrcnt=intrcnts, old_intrcnt=old_intrcnts; i < nintr; i++) { + if (intrname[0] != '\0' && (*intrcnt != 0 || aflag)) { + unsigned long count, rate; + + count = *intrcnt - *old_intrcnt; + rate = (count * 1000 + period/2) / period; + (void)printf("%-*s %20lu %10lu\n", (int)istrnamlen, + intrname, count, rate); + } + intrname += strlen(intrname) + 1; + inttotal += *intrcnt++; + old_inttotal += *old_intrcnt++; + } + total_count = inttotal - old_inttotal; + total_rate = (total_count * 1000 + period/2) / period; + (void)printf("%-*s %20" PRIu64 " %10" PRIu64 "\n", (int)istrnamlen, + "Total", total_count, total_rate); +} + +static void +dointr(unsigned int interval, int reps) +{ + unsigned long *intrcnts; + unsigned long long uptime, period; + unsigned long *old_intrcnts = NULL; + size_t clen, inamlen, istrnamlen; + unsigned int rep; + char *intrnames, *intrname; + + uptime = getuptime(); + + /* Get the names of each interrupt source */ + if (kd != NULL) { + kread(X_SINTRNAMES, &inamlen, sizeof(inamlen)); + if ((intrnames = malloc(inamlen)) == NULL) + err(1, "malloc()"); + kread(X_INTRNAMES, intrnames, inamlen); + } else { + for (intrnames = NULL, inamlen = 1024; ; inamlen *= 2) { + if ((intrnames = reallocf(intrnames, inamlen)) == NULL) err(1, "reallocf()"); if (mysysctl("hw.intrnames", - intrname, &inamlen, NULL, 0) == 0) + intrnames, &inamlen, NULL, 0) == 0) break; } } - nintr = intrcntlen / sizeof(unsigned long); - tintrname = intrname; + + /* Determine the length of the longest interrupt name */ + intrname = intrnames; istrnamlen = strlen("interrupt"); - for (i = 0; i < nintr; i++) { - clen = strlen(tintrname); + while(*intrname != '\0') { + clen = strlen(intrname); if (clen > istrnamlen) istrnamlen = clen; - tintrname += clen + 1; + intrname += strlen(intrname) + 1; } (void)printf("%-*s %20s %10s\n", (int)istrnamlen, "interrupt", "total", "rate"); - inttotal = 0; - for (i = 0; i < nintr; i++) { - if (intrname[0] != '\0' && (*intrcnt != 0 || aflag)) - (void)printf("%-*s %20lu %10lu\n", (int)istrnamlen, - intrname, *intrcnt, *intrcnt / uptime); - intrname += strlen(intrname) + 1; - inttotal += *intrcnt++; + + /* + * Loop reps times printing differential interrupt counts. If reps is + * zero, then run just once, printing total counts + */ + period = uptime * 1000; + while(1) { + char *intrname; + unsigned int nintr; + + nintr = read_intrcnts(&intrcnts); + /* + * Initialize old_intrcnts to 0 for the first pass, so + * print_intrcnts will print total interrupts since boot + */ + if (old_intrcnts == NULL) { + old_intrcnts = calloc(nintr, sizeof(unsigned long)); + if (old_intrcnts == NULL) + err(1, "calloc()"); + } + + print_intrcnts(intrcnts, old_intrcnts, intrnames, nintr, + istrnamlen, period); + + free(old_intrcnts); + old_intrcnts = intrcnts; + if (reps >= 0 && --reps <= 0) + break; + usleep(interval * 1000); + period = interval; } - (void)printf("%-*s %20" PRIu64 " %10" PRIu64 "\n", (int)istrnamlen, - "Total", inttotal, inttotal / uptime); } static void From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 16:18:40 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6377C0C; Fri, 23 Jan 2015 16:18:40 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92983C42; Fri, 23 Jan 2015 16:18:40 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NGIebQ057993; Fri, 23 Jan 2015 16:18:40 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NGIeDv057991; Fri, 23 Jan 2015 16:18:40 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231618.t0NGIeDv057991@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 16:18:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277570 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 16:18:40 -0000 Author: will Date: Fri Jan 23 16:18:39 2015 New Revision: 277570 URL: https://svnweb.freebsd.org/changeset/base/277570 Log: Use CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1066740 on 2014/06/04 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Fri Jan 23 16:15:55 2015 (r277569) +++ head/usr.bin/vmstat/vmstat.c Fri Jan 23 16:18:39 2015 (r277570) @@ -411,7 +411,7 @@ getuptime(void) { struct timespec sp; - (void)clock_gettime(CLOCK_MONOTONIC, &sp); + (void)clock_gettime(CLOCK_UPTIME, &sp); return(sp.tv_sec); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 16:21:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C16B2E0F; Fri, 23 Jan 2015 16:21:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AC83DD03; Fri, 23 Jan 2015 16:21:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NGLWi0061336; Fri, 23 Jan 2015 16:21:32 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NGLWtE061335; Fri, 23 Jan 2015 16:21:32 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501231621.t0NGLWtE061335@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 16:21:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277571 - head/usr.bin/vmstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 16:21:33 -0000 Author: will Date: Fri Jan 23 16:21:31 2015 New Revision: 277571 URL: https://svnweb.freebsd.org/changeset/base/277571 Log: Use clock_gettime to measure the time that we spent asleep during "vmstat -i" instead of assuming it's what we asked for. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1066751 on 2014/06/04 Modified: head/usr.bin/vmstat/vmstat.c Modified: head/usr.bin/vmstat/vmstat.c ============================================================================== --- head/usr.bin/vmstat/vmstat.c Fri Jan 23 16:18:39 2015 (r277570) +++ head/usr.bin/vmstat/vmstat.c Fri Jan 23 16:21:31 2015 (r277571) @@ -163,7 +163,7 @@ static void printhdr(int, u_long); static void usage(void); static long pct(long, long); -static long getuptime(void); +static long long getuptime(void); static char **getdrivedata(char **); @@ -406,14 +406,15 @@ getdrivedata(char **argv) return(argv); } -static long +/* Return system uptime in nanoseconds */ +static long long getuptime(void) { struct timespec sp; (void)clock_gettime(CLOCK_UPTIME, &sp); - return(sp.tv_sec); + return((long long)sp.tv_sec * 1000000000LL + sp.tv_nsec); } static void @@ -654,7 +655,7 @@ dovmstat(unsigned int interval, int reps u_long cpumask; int rate_adj; - uptime = getuptime(); + uptime = getuptime() / 1000000000LL; halfuptime = uptime / 2; rate_adj = 1; ncpus = 1; @@ -1192,7 +1193,7 @@ read_intrcnts(unsigned long **intrcnts) static void print_intrcnts(unsigned long *intrcnts, unsigned long *old_intrcnts, char *intrnames, unsigned int nintr, - size_t istrnamlen, unsigned long long period) + size_t istrnamlen, long long period_ms) { unsigned long *intrcnt, *old_intrcnt; uint64_t inttotal, old_inttotal, total_count, total_rate; @@ -1207,7 +1208,7 @@ print_intrcnts(unsigned long *intrcnts, unsigned long count, rate; count = *intrcnt - *old_intrcnt; - rate = (count * 1000 + period/2) / period; + rate = (count * 1000 + period_ms / 2) / period_ms; (void)printf("%-*s %20lu %10lu\n", (int)istrnamlen, intrname, count, rate); } @@ -1216,7 +1217,7 @@ print_intrcnts(unsigned long *intrcnts, old_inttotal += *old_intrcnt++; } total_count = inttotal - old_inttotal; - total_rate = (total_count * 1000 + period/2) / period; + total_rate = (total_count * 1000 + period_ms / 2) / period_ms; (void)printf("%-*s %20" PRIu64 " %10" PRIu64 "\n", (int)istrnamlen, "Total", total_count, total_rate); } @@ -1225,10 +1226,9 @@ static void dointr(unsigned int interval, int reps) { unsigned long *intrcnts; - unsigned long long uptime, period; + long long uptime, period_ms; unsigned long *old_intrcnts = NULL; size_t clen, inamlen, istrnamlen; - unsigned int rep; char *intrnames, *intrname; uptime = getuptime(); @@ -1265,10 +1265,10 @@ dointr(unsigned int interval, int reps) * Loop reps times printing differential interrupt counts. If reps is * zero, then run just once, printing total counts */ - period = uptime * 1000; + period_ms = uptime / 1000000; while(1) { - char *intrname; unsigned int nintr; + long long old_uptime; nintr = read_intrcnts(&intrcnts); /* @@ -1282,14 +1282,16 @@ dointr(unsigned int interval, int reps) } print_intrcnts(intrcnts, old_intrcnts, intrnames, nintr, - istrnamlen, period); + istrnamlen, period_ms); free(old_intrcnts); old_intrcnts = intrcnts; if (reps >= 0 && --reps <= 0) break; usleep(interval * 1000); - period = interval; + old_uptime = uptime; + uptime = getuptime(); + period_ms = (uptime - old_uptime) / 1000000; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 17:16:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B27729FB; Fri, 23 Jan 2015 17:16:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9D399321; Fri, 23 Jan 2015 17:16:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NHGRZ4086088; Fri, 23 Jan 2015 17:16:27 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NHGRaT086087; Fri, 23 Jan 2015 17:16:27 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231716.t0NHGRaT086087@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 17:16:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277572 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 17:16:27 -0000 Author: delphij Date: Fri Jan 23 17:16:26 2015 New Revision: 277572 URL: https://svnweb.freebsd.org/changeset/base/277572 Log: MFC r275734: MFV r275542: If a dnode has a spill block and there is an error while accessing a data block then traverse_dnode() loses information about that error and returns a status of visiting the spill block. This issue is discovered by Spectra Logic. Illumos issue: 5311 traverse_dnode may report success when it should not Original author: gibbs Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri Jan 23 16:21:31 2015 (r277571) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri Jan 23 17:16:26 2015 (r277572) @@ -429,7 +429,7 @@ traverse_dnode(traverse_data_t *td, cons break; } - if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { + if (err == 0 && dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) { SET_BOOKMARK(&czb, objset, object, 0, DMU_SPILL_BLKID); err = traverse_visitbp(td, dnp, &dnp->dn_spill, &czb); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 17:21:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA20EB66; Fri, 23 Jan 2015 17:21:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9F8347; Fri, 23 Jan 2015 17:21:12 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NHLCB6089702; Fri, 23 Jan 2015 17:21:12 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NHLC6f089700; Fri, 23 Jan 2015 17:21:12 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231721.t0NHLC6f089700@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 17:21:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277573 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 17:21:13 -0000 Author: delphij Date: Fri Jan 23 17:21:11 2015 New Revision: 277573 URL: https://svnweb.freebsd.org/changeset/base/277573 Log: MFC r275735: MFV r275543: Remove always true tests for ds->ds_phys' presence. Clean up assertions in dsl_dataset_disown. Remove unreachable code in dsl_dataset_disown(). Illumos issue: 5310 Remove always true tests for non-NULL ds->ds_phys Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jan 23 17:16:26 2015 (r277572) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jan 23 17:21:11 2015 (r277573) @@ -644,16 +644,14 @@ dsl_dataset_rele(dsl_dataset_t *ds, void void dsl_dataset_disown(dsl_dataset_t *ds, void *tag) { - ASSERT(ds->ds_owner == tag && ds->ds_dbuf != NULL); + ASSERT3P(ds->ds_owner, ==, tag); + ASSERT(ds->ds_dbuf != NULL); mutex_enter(&ds->ds_lock); ds->ds_owner = NULL; mutex_exit(&ds->ds_lock); dsl_dataset_long_rele(ds, tag); - if (ds->ds_dbuf != NULL) - dsl_dataset_rele(ds, tag); - else - dsl_dataset_evict(NULL, ds); + dsl_dataset_rele(ds, tag); } boolean_t Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Fri Jan 23 17:16:26 2015 (r277572) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c Fri Jan 23 17:21:11 2015 (r277573) @@ -167,8 +167,8 @@ dsl_prop_get_ds(dsl_dataset_t *ds, const ASSERT(dsl_pool_config_held(ds->ds_dir->dd_pool)); inheritable = (prop == ZPROP_INVAL || zfs_prop_inheritable(prop)); - snapshot = (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)); - zapobj = (ds->ds_phys == NULL ? 0 : ds->ds_phys->ds_props_obj); + snapshot = dsl_dataset_is_snapshot(ds); + zapobj = ds->ds_phys->ds_props_obj; if (zapobj != 0) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; @@ -543,7 +543,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds isint = (dodefault(propname, 8, 1, &intval) == 0); - if (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds)) { ASSERT(version >= SPA_VERSION_SNAP_PROPS); if (ds->ds_phys->ds_props_obj == 0) { dmu_buf_will_dirty(ds->ds_dbuf, tx); @@ -640,7 +640,7 @@ dsl_prop_set_sync_impl(dsl_dataset_t *ds if (isint) { VERIFY0(dsl_prop_get_int_ds(ds, propname, &intval)); - if (ds->ds_phys != NULL && dsl_dataset_is_snapshot(ds)) { + if (dsl_dataset_is_snapshot(ds)) { dsl_prop_cb_record_t *cbr; /* * It's a snapshot; nothing can inherit this From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 17:24:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EA8CD6F; Fri, 23 Jan 2015 17:24:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 59FDC5F5; Fri, 23 Jan 2015 17:24:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NHOvmb090677; Fri, 23 Jan 2015 17:24:57 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NHOvCo090676; Fri, 23 Jan 2015 17:24:57 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231724.t0NHOvCo090676@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 17:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277574 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 17:24:57 -0000 Author: delphij Date: Fri Jan 23 17:24:56 2015 New Revision: 277574 URL: https://svnweb.freebsd.org/changeset/base/277574 Log: MFC r275736: MFV r275544: Clean up some duplicated code in dnode_sync() around freeing spill blocks. Illumos issue: 5350 clean up code in dnode_sync() Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Fri Jan 23 17:21:11 2015 (r277573) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode_sync.c Fri Jan 23 17:24:56 2015 (r277574) @@ -633,12 +633,11 @@ dnode_sync(dnode_t *dn, dmu_tx_t *tx) dn->dn_free_txg <= tx->tx_txg; /* - * We will either remove a spill block when a file is being removed - * or we have been asked to remove it. + * Remove the spill block if we have been explicitly asked to + * remove it, or if the object is being removed. */ - if (dn->dn_rm_spillblk[txgoff] || - ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) && freeing_dnode)) { - if ((dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR)) + if (dn->dn_rm_spillblk[txgoff] || freeing_dnode) { + if (dnp->dn_flags & DNODE_FLAG_SPILL_BLKPTR) kill_spill = B_TRUE; dn->dn_rm_spillblk[txgoff] = 0; } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 17:31:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 81A0EFB2; Fri, 23 Jan 2015 17:31:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C57B6E8; Fri, 23 Jan 2015 17:31:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NHVgIa095050; Fri, 23 Jan 2015 17:31:42 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NHVgIF095049; Fri, 23 Jan 2015 17:31:42 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231731.t0NHVgIF095049@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 17:31:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277575 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 17:31:42 -0000 Author: delphij Date: Fri Jan 23 17:31:41 2015 New Revision: 277575 URL: https://svnweb.freebsd.org/changeset/base/277575 Log: MFC r275737: MFV r275545: If zio_checksum_error() returns other than ECKSUM (e.g. EINVAL), it does not fill in the "zio_bad_cksum_t *info" parameter. Caller should not attempt to use it in this case. Illumos issue: 5348 zio_checksum_error() only fills in info if ECKSUM Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 17:24:56 2015 (r277574) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 17:31:41 2015 (r277575) @@ -2950,7 +2950,8 @@ zio_checksum_verify(zio_t *zio) if ((error = zio_checksum_error(zio, &info)) != 0) { zio->io_error = error; - if (!(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { + if (error == ECKSUM && + !(zio->io_flags & ZIO_FLAG_SPECULATIVE)) { zfs_ereport_start_checksum(zio->io_spa, zio->io_vd, zio, zio->io_offset, zio->io_size, NULL, &info); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 17:41:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DF9FB23F; Fri, 23 Jan 2015 17:41:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C0404825; Fri, 23 Jan 2015 17:41:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NHfYa8097858; Fri, 23 Jan 2015 17:41:34 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NHfY7u097857; Fri, 23 Jan 2015 17:41:34 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231741.t0NHfY7u097857@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 17:41:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277576 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 17:41:35 -0000 Author: delphij Date: Fri Jan 23 17:41:34 2015 New Revision: 277576 URL: https://svnweb.freebsd.org/changeset/base/277576 Log: MFC r275738: MFV r275546: Reduce scrub activities when system there is enough dirty data, namely when dirty data is more than zfs_vdev_async_write_active_min_dirty_percent (once we start to increase the number of concurrent async writes). While there also correct rounding error which would make scrub end up pausing for (zfs_txg_timeout + 1) seconds instead of the desired zfs_txg_timeout seconds. Illumos issue: 5351 scrub goes for an extra second each txg 5352 scrub should pause when there is some dirty data Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Jan 23 17:31:41 2015 (r277575) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Jan 23 17:41:34 2015 (r277576) @@ -423,12 +423,11 @@ dsl_scan_sync_state(dsl_scan_t *scn, dmu &scn->scn_phys, tx)); } +extern int zfs_vdev_async_write_active_min_dirty_percent; + static boolean_t dsl_scan_check_pause(dsl_scan_t *scn, const zbookmark_phys_t *zb) { - uint64_t elapsed_nanosecs; - unsigned int mintime; - /* we never skip user/group accounting objects */ if (zb && (int64_t)zb->zb_object < 0) return (B_FALSE); @@ -443,12 +442,28 @@ dsl_scan_check_pause(dsl_scan_t *scn, co if (zb && zb->zb_level != 0) return (B_FALSE); - mintime = (scn->scn_phys.scn_func == POOL_SCAN_RESILVER) ? + /* + * We pause if: + * - we have scanned for the maximum time: an entire txg + * timeout (default 5 sec) + * or + * - we have scanned for at least the minimum time (default 1 sec + * for scrub, 3 sec for resilver), and either we have sufficient + * dirty data that we are starting to write more quickly + * (default 30%), or someone is explicitly waiting for this txg + * to complete. + * or + * - the spa is shutting down because this pool is being exported + * or the machine is rebooting. + */ + int mintime = (scn->scn_phys.scn_func == POOL_SCAN_RESILVER) ? zfs_resilver_min_time_ms : zfs_scan_min_time_ms; - elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; - if (elapsed_nanosecs / NANOSEC > zfs_txg_timeout || + uint64_t elapsed_nanosecs = gethrtime() - scn->scn_sync_start_time; + int dirty_pct = scn->scn_dp->dp_dirty_total * 100 / zfs_dirty_data_max; + if (elapsed_nanosecs / NANOSEC >= zfs_txg_timeout || (NSEC2MSEC(elapsed_nanosecs) > mintime && - txg_sync_waiting(scn->scn_dp)) || + (txg_sync_waiting(scn->scn_dp) || + dirty_pct >= zfs_vdev_async_write_active_min_dirty_percent)) || spa_shutting_down(scn->scn_dp->dp_spa)) { if (zb) { dprintf("pausing at bookmark %llx/%llx/%llx/%llx\n", From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 17:49:17 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 782335AD; Fri, 23 Jan 2015 17:49:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6300E874; Fri, 23 Jan 2015 17:49:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NHnHGq001039; Fri, 23 Jan 2015 17:49:17 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NHnHsP001038; Fri, 23 Jan 2015 17:49:17 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501231749.t0NHnHsP001038@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 23 Jan 2015 17:49:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277577 - stable/10/usr.sbin/ngctl X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 17:49:17 -0000 Author: glebius Date: Fri Jan 23 17:49:16 2015 New Revision: 277577 URL: https://svnweb.freebsd.org/changeset/base/277577 Log: Merge r277258: plug mutex leak in ngctl(8). Modified: stable/10/usr.sbin/ngctl/main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/ngctl/main.c ============================================================================== --- stable/10/usr.sbin/ngctl/main.c Fri Jan 23 17:41:34 2015 (r277576) +++ stable/10/usr.sbin/ngctl/main.c Fri Jan 23 17:49:16 2015 (r277577) @@ -324,8 +324,10 @@ DoInteractive(void) history(hist, &hev, H_ENTER, buf); pthread_kill(monitor, SIGUSR1); pthread_mutex_lock(&mutex); - if (DoParseCommand(buf) == CMDRTN_QUIT) + if (DoParseCommand(buf) == CMDRTN_QUIT) { + pthread_mutex_unlock(&mutex); break; + } pthread_cond_signal(&cond); pthread_mutex_unlock(&mutex); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:11:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D929FD4B; Fri, 23 Jan 2015 18:11:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C373FB2B; Fri, 23 Jan 2015 18:11:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIBmCO015036; Fri, 23 Jan 2015 18:11:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIBmVq015035; Fri, 23 Jan 2015 18:11:48 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231811.t0NIBmVq015035@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:11:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277578 - stable/10/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:11:49 -0000 Author: delphij Date: Fri Jan 23 18:11:48 2015 New Revision: 277578 URL: https://svnweb.freebsd.org/changeset/base/277578 Log: MFC r274418 (gjb): Fix an mdoc(7) macro that is not an option in the provided description. Bump Dd. As CDDL License dictates, update the Copyright accordingly. Sponsored by: The FreeBSD Foundation Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Jan 23 17:49:16 2015 (r277577) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Jan 23 18:11:48 2015 (r277578) @@ -27,10 +27,11 @@ .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2013, Steven Hartland .\" Copyright (c) 2014, Xin LI +.\" Copyright (c) 2014, The FreeBSD Foundation, All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 10, 2014 +.Dd November 12, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -1791,7 +1792,7 @@ descendent file systems. Recursively destroy all clones of these snapshots, including the clones, snapshots, and children. If this flag is specified, the -.Op fl d +.Fl d flag will have no effect. .It Fl n Do a dry-run ("No-op") deletion. No data will be deleted. This is useful in From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:12:45 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1AA14E83; Fri, 23 Jan 2015 18:12:45 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E1BD3B38; Fri, 23 Jan 2015 18:12:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NICi3f015232; Fri, 23 Jan 2015 18:12:44 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NICiMO015231; Fri, 23 Jan 2015 18:12:44 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501231812.t0NICiMO015231@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Jan 2015 18:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277579 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:12:45 -0000 Author: jkim Date: Fri Jan 23 18:12:44 2015 New Revision: 277579 URL: https://svnweb.freebsd.org/changeset/base/277579 Log: Revert r216942. This commit was premature and caused too many complaints. PR: 162859 MFC after: 3 days Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Fri Jan 23 18:11:48 2015 (r277578) +++ head/sys/dev/acpica/acpi_ec.c Fri Jan 23 18:12:44 2015 (r277579) @@ -620,7 +620,7 @@ EcGpeQueryHandler(void *Context) struct acpi_ec_softc *sc = (struct acpi_ec_softc *)Context; UINT8 Data; ACPI_STATUS Status; - int retry, sci_enqueued; + int retry; char qxx[5]; ACPI_FUNCTION_TRACE((char *)(uintptr_t)__func__); @@ -641,7 +641,6 @@ EcGpeQueryHandler(void *Context) * that may arise from running the query from causing another query * to be queued, we clear the pending flag only after running it. */ - sci_enqueued = sc->ec_sci_pend; for (retry = 0; retry < 2; retry++) { Status = EcCommand(sc, EC_COMMAND_QUERY); if (ACPI_SUCCESS(Status)) @@ -681,14 +680,6 @@ EcGpeQueryHandler(void *Context) device_printf(sc->ec_dev, "evaluation of query method %s failed: %s\n", qxx, AcpiFormatException(Status)); } - - /* Reenable runtime GPE if its execution was deferred. */ - if (sci_enqueued) { - Status = AcpiFinishGpe(sc->ec_gpehandle, sc->ec_gpebit); - if (ACPI_FAILURE(Status)) - device_printf(sc->ec_dev, "reenabling runtime GPE failed: %s\n", - AcpiFormatException(Status)); - } } /* @@ -722,10 +713,9 @@ EcGpeHandler(ACPI_HANDLE GpeDevice, UINT if ((EcStatus & EC_EVENT_SCI) && !sc->ec_sci_pend) { CTR0(KTR_ACPI, "ec gpe queueing query handler"); Status = AcpiOsExecute(OSL_GPE_HANDLER, EcGpeQueryHandler, Context); - if (ACPI_SUCCESS(Status)) { + if (ACPI_SUCCESS(Status)) sc->ec_sci_pend = TRUE; - return (0); - } else + else printf("EcGpeHandler: queuing GPE query handler failed\n"); } return (ACPI_REENABLE_GPE); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:14:30 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3E835FEA; Fri, 23 Jan 2015 18:14:30 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EAD3B5A; Fri, 23 Jan 2015 18:14:30 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIEUBC015558; Fri, 23 Jan 2015 18:14:30 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIETtO015557; Fri, 23 Jan 2015 18:14:29 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231814.t0NIETtO015557@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:14:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277580 - stable/10/cddl/contrib/opensolaris/cmd/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:14:30 -0000 Author: delphij Date: Fri Jan 23 18:14:29 2015 New Revision: 277580 URL: https://svnweb.freebsd.org/changeset/base/277580 Log: MFC r275739: MFV r275547: Port Illumos 'zfs allow' examples update. While I'm there also fix a typo. Illumos issue: 4181 zfs(1m): 'zfs allow' examples in the man page are outdated Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Jan 23 18:12:44 2015 (r277579) +++ stable/10/cddl/contrib/opensolaris/cmd/zfs/zfs.8 Fri Jan 23 18:14:29 2015 (r277580) @@ -23,15 +23,15 @@ .\" Copyright (c) 2012, Glen Barber .\" Copyright (c) 2012, Bryan Drewery .\" Copyright (c) 2013 by Saso Kiselkov. All rights reserved. -.\" Copyright (c) 2013 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2014, Joyent, Inc. All rights reserved. .\" Copyright (c) 2013, Steven Hartland +.\" Copyright (c) 2014 Nexenta Systems, Inc. All Rights Reserved. .\" Copyright (c) 2014, Xin LI .\" Copyright (c) 2014, The FreeBSD Foundation, All Rights Reserved. .\" .\" $FreeBSD$ .\" -.Dd November 12, 2014 +.Dd December 12, 2014 .Dt ZFS 8 .Os .Sh NAME @@ -3505,10 +3505,9 @@ are also displayed. .Bd -literal -offset 2n .Li # Ic zfs allow cindys create,destroy,mount,snapshot tank/cindys .Li # Ic zfs allow tank/cindys -------------------------------------------------------------- -Local+Descendent permissions on (tank/cindys) - user cindys create,destroy,mount,snapshot -------------------------------------------------------------- +---- Permissions on tank/cindys -------------------------------------- +Local+Descendent permissions: + user cindys create,destroy,mount,snapshot .Ed .It Sy Example 18 No Delegating Create Time Permissions on a Tn ZFS No Dataset .Pp @@ -3524,12 +3523,11 @@ are also displayed. .Li # Ic zfs allow staff create,mount tank/users .Li # Ic zfs allow -c destroy tank/users .Li # Ic zfs allow tank/users -------------------------------------------------------------- -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff create,mount -------------------------------------------------------------- +---- Permissions on tank/users --------------------------------------- +Permission sets: + destroy +Local+Descendent permissions: + group staff create,mount .Ed .It Xo .Sy Example 19 @@ -3547,14 +3545,11 @@ are also displayed. .Li # Ic zfs allow -s @pset create,destroy,snapshot,mount tank/users .Li # Ic zfs allow staff @pset tank/users .Li # Ic zfs allow tank/users -------------------------------------------------------------- -Permission sets on (tank/users) +---- Permissions on tank/users --------------------------------------- +Permission sets: @pset create,destroy,mount,snapshot -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff @pset,create,mount -------------------------------------------------------------- +Local+Descendent permissions: + group staff @pset .Ed .It Sy Example 20 No Delegating Property Permissions on a Tn ZFS No Dataset .Pp @@ -3566,16 +3561,15 @@ file system. The permissions on are also displayed. .Bd -literal -offset 2n .Li # Ic zfs allow cindys quota,reservation users/home -.Li # Ic zfs allow cindys -------------------------------------------------------------- -Local+Descendent permissions on (users/home) +.Li # Ic zfs allow users/home +---- Permissions on users/home --------------------------------------- +Local+Descendent permissions: user cindys quota,reservation -------------------------------------------------------------- .Li # Ic su - cindys .Li cindys% Ic zfs set quota=10G users/home/marks .Li cindys% Ic zfs get quota users/home/marks -NAME PROPERTY VALUE SOURCE -users/home/marks quota 10G local +NAME PROPERTY VALUE SOURCE +users/home/marks quota 10G local .Ed .It Sy Example 21 No Removing ZFS Delegated Permissions on a Tn ZFS No Dataset .Pp @@ -3589,14 +3583,11 @@ are also displayed. .Bd -literal -offset 2n .Li # Ic zfs unallow staff snapshot tank/users .Li # Ic zfs allow tank/users -------------------------------------------------------------- -Permission sets on (tank/users) +---- Permissions on tank/users --------------------------------------- +Permission sets: @pset create,destroy,mount,snapshot -Create time permissions on (tank/users) - create,destroy -Local+Descendent permissions on (tank/users) - group staff @pset,create,mount -------------------------------------------------------------- +Local+Descendent permissions: + group staff @pset .Ed .It Sy Example 22 Showing the differences between a snapshot and a ZFS Dataset .Pp From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:15:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 474CA190; Fri, 23 Jan 2015 18:15:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 31E40B65; Fri, 23 Jan 2015 18:15:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIFGiT015754; Fri, 23 Jan 2015 18:15:16 GMT (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIFGUR015753; Fri, 23 Jan 2015 18:15:16 GMT (envelope-from glebius@FreeBSD.org) Message-Id: <201501231815.t0NIFGUR015753@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: glebius set sender to glebius@FreeBSD.org using -f From: Gleb Smirnoff Date: Fri, 23 Jan 2015 18:15:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277581 - stable/10/sys/netpfil/pf X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:15:16 -0000 Author: glebius Date: Fri Jan 23 18:15:15 2015 New Revision: 277581 URL: https://svnweb.freebsd.org/changeset/base/277581 Log: Merge r274709 by eri@: deal with IPv6 same way as we IPv4 and calculate the checksum before entering pf_test6(). PR: 172648, 179392 Modified: stable/10/sys/netpfil/pf/pf_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/netpfil/pf/pf_ioctl.c ============================================================================== --- stable/10/sys/netpfil/pf/pf_ioctl.c Fri Jan 23 18:14:29 2015 (r277580) +++ stable/10/sys/netpfil/pf/pf_ioctl.c Fri Jan 23 18:15:15 2015 (r277581) @@ -72,6 +72,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #ifdef INET6 @@ -3616,12 +3617,11 @@ pf_check6_out(void *arg, struct mbuf **m int chk; /* We need a proper CSUM before we start (s. OpenBSD ip_output) */ - if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA) { -#ifdef INET - /* XXX-BZ copy&paste error from r126261? */ - in_delayed_cksum(*m); -#endif - (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA; + if ((*m)->m_pkthdr.csum_flags & CSUM_DELAY_DATA_IPV6) { + in6_delayed_cksum(*m, + (*m)->m_pkthdr.len - sizeof(struct ip6_hdr), + sizeof(struct ip6_hdr)); + (*m)->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; } CURVNET_SET(ifp->if_vnet); chk = pf_test6(PF_OUT, ifp, m, inp); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:16:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2772B2F1; Fri, 23 Jan 2015 18:16:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 11625B8E; Fri, 23 Jan 2015 18:16:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIGap6016007; Fri, 23 Jan 2015 18:16:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIGa3R016004; Fri, 23 Jan 2015 18:16:36 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231816.t0NIGa3R016004@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:16:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277582 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:16:37 -0000 Author: delphij Date: Fri Jan 23 18:16:36 2015 New Revision: 277582 URL: https://svnweb.freebsd.org/changeset/base/277582 Log: MFC r275740: MFV r275548: Verify that the block pointer is structurally valid, before attempting to read it in. It can only be invalid in the case of a ZFS bug, but this change will help identify such bugs in a more transparent way, by panic'ing with a relevant message, rather than indexing off the end of an array or something. Illumos issue: 5349 verify that block pointer is plausible before reading Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Fri Jan 23 18:15:15 2015 (r277581) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h Fri Jan 23 18:16:36 2015 (r277582) @@ -811,6 +811,7 @@ extern boolean_t spa_is_root(spa_t *spa) extern boolean_t spa_writeable(spa_t *spa); extern boolean_t spa_has_pending_synctask(spa_t *spa); extern int spa_maxblocksize(spa_t *spa); +extern void zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp); extern int spa_mode(spa_t *spa); extern uint64_t zfs_strtonum(const char *str, char **nptr); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 18:15:15 2015 (r277581) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 18:16:36 2015 (r277582) @@ -267,7 +267,7 @@ zio_buf_alloc(size_t size) size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; int flags = zio_exclude_metadata ? KM_NODEBUG : 0; - ASSERT3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); if (zio_use_uma) return (kmem_cache_alloc(zio_buf_cache[c], KM_PUSHPAGE)); @@ -286,7 +286,7 @@ zio_data_buf_alloc(size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); if (zio_use_uma) return (kmem_cache_alloc(zio_data_buf_cache[c], KM_PUSHPAGE)); @@ -299,7 +299,7 @@ zio_buf_free(void *buf, size_t size) { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); if (zio_use_uma) kmem_cache_free(zio_buf_cache[c], buf); @@ -312,7 +312,7 @@ zio_data_buf_free(void *buf, size_t size { size_t c = (size - 1) >> SPA_MINBLOCKSHIFT; - ASSERT(c < SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); + VERIFY3U(c, <, SPA_MAXBLOCKSIZE >> SPA_MINBLOCKSHIFT); if (zio_use_uma) kmem_cache_free(zio_data_buf_cache[c], buf); @@ -659,6 +659,86 @@ zio_root(spa_t *spa, zio_done_func_t *do return (zio_null(NULL, spa, NULL, done, private, flags)); } +void +zfs_blkptr_verify(spa_t *spa, const blkptr_t *bp) +{ + if (!DMU_OT_IS_VALID(BP_GET_TYPE(bp))) { + zfs_panic_recover("blkptr at %p has invalid TYPE %llu", + bp, (longlong_t)BP_GET_TYPE(bp)); + } + if (BP_GET_CHECKSUM(bp) >= ZIO_CHECKSUM_FUNCTIONS || + BP_GET_CHECKSUM(bp) <= ZIO_CHECKSUM_ON) { + zfs_panic_recover("blkptr at %p has invalid CHECKSUM %llu", + bp, (longlong_t)BP_GET_CHECKSUM(bp)); + } + if (BP_GET_COMPRESS(bp) >= ZIO_COMPRESS_FUNCTIONS || + BP_GET_COMPRESS(bp) <= ZIO_COMPRESS_ON) { + zfs_panic_recover("blkptr at %p has invalid COMPRESS %llu", + bp, (longlong_t)BP_GET_COMPRESS(bp)); + } + if (BP_GET_LSIZE(bp) > SPA_MAXBLOCKSIZE) { + zfs_panic_recover("blkptr at %p has invalid LSIZE %llu", + bp, (longlong_t)BP_GET_LSIZE(bp)); + } + if (BP_GET_PSIZE(bp) > SPA_MAXBLOCKSIZE) { + zfs_panic_recover("blkptr at %p has invalid PSIZE %llu", + bp, (longlong_t)BP_GET_PSIZE(bp)); + } + + if (BP_IS_EMBEDDED(bp)) { + if (BPE_GET_ETYPE(bp) > NUM_BP_EMBEDDED_TYPES) { + zfs_panic_recover("blkptr at %p has invalid ETYPE %llu", + bp, (longlong_t)BPE_GET_ETYPE(bp)); + } + } + + /* + * Pool-specific checks. + * + * Note: it would be nice to verify that the blk_birth and + * BP_PHYSICAL_BIRTH() are not too large. However, spa_freeze() + * allows the birth time of log blocks (and dmu_sync()-ed blocks + * that are in the log) to be arbitrarily large. + */ + for (int i = 0; i < BP_GET_NDVAS(bp); i++) { + uint64_t vdevid = DVA_GET_VDEV(&bp->blk_dva[i]); + if (vdevid >= spa->spa_root_vdev->vdev_children) { + zfs_panic_recover("blkptr at %p DVA %u has invalid " + "VDEV %llu", + bp, i, (longlong_t)vdevid); + } + vdev_t *vd = spa->spa_root_vdev->vdev_child[vdevid]; + if (vd == NULL) { + zfs_panic_recover("blkptr at %p DVA %u has invalid " + "VDEV %llu", + bp, i, (longlong_t)vdevid); + } + if (vd->vdev_ops == &vdev_hole_ops) { + zfs_panic_recover("blkptr at %p DVA %u has hole " + "VDEV %llu", + bp, i, (longlong_t)vdevid); + + } + if (vd->vdev_ops == &vdev_missing_ops) { + /* + * "missing" vdevs are valid during import, but we + * don't have their detailed info (e.g. asize), so + * we can't perform any more checks on them. + */ + continue; + } + uint64_t offset = DVA_GET_OFFSET(&bp->blk_dva[i]); + uint64_t asize = DVA_GET_ASIZE(&bp->blk_dva[i]); + if (BP_IS_GANG(bp)) + asize = vdev_psize_to_asize(vd, SPA_GANGBLOCKSIZE); + if (offset + asize > vd->vdev_asize) { + zfs_panic_recover("blkptr at %p DVA %u has invalid " + "OFFSET %llu", + bp, i, (longlong_t)offset); + } + } +} + zio_t * zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data, uint64_t size, zio_done_func_t *done, void *private, @@ -666,6 +746,8 @@ zio_read(zio_t *pio, spa_t *spa, const b { zio_t *zio; + zfs_blkptr_verify(spa, bp); + zio = zio_create(pio, spa, BP_PHYSICAL_BIRTH(bp), bp, data, size, done, private, ZIO_TYPE_READ, priority, flags, NULL, 0, zb, From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:23:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9D3704C2; Fri, 23 Jan 2015 18:23:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78B66C71; Fri, 23 Jan 2015 18:23:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NINKQV020315; Fri, 23 Jan 2015 18:23:20 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NINKCc020314; Fri, 23 Jan 2015 18:23:20 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231823.t0NINKCc020314@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:23:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277583 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:23:20 -0000 Author: delphij Date: Fri Jan 23 18:23:19 2015 New Revision: 277583 URL: https://svnweb.freebsd.org/changeset/base/277583 Log: MFC r275748: MFV r247174: Expose arc_meta_limit, et al via kstats. Note that as a result, vfs.zfs.arc_meta_used is removed. The existing vfs.zfs.arc_meta_limit sysctl/tunable is retained with a SYSCTL_PROC wrapper. Illumos ZFS issues: 3561 arc_meta_limit should be exposed via kstats Relnotes: yes Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jan 23 18:16:36 2015 (r277582) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jan 23 18:23:19 2015 (r277583) @@ -205,6 +205,7 @@ uint64_t zfs_arc_average_blocksize = 8 * u_int zfs_arc_free_target = 0; static int sysctl_vfs_zfs_arc_free_target(SYSCTL_HANDLER_ARGS); +static int sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS); #ifdef _KERNEL static void @@ -262,6 +263,15 @@ sysctl_vfs_zfs_arc_free_target(SYSCTL_HA return (0); } + +/* + * Must be declared here, before the definition of corresponding kstat + * macro which uses the same names will confuse the compiler. + */ +SYSCTL_PROC(_vfs_zfs, OID_AUTO, arc_meta_limit, + CTLTYPE_U64 | CTLFLAG_MPSAFE | CTLFLAG_RW, 0, sizeof(uint64_t), + sysctl_vfs_zfs_arc_meta_limit, "QU", + "ARC metadata limit"); #endif /* @@ -416,6 +426,9 @@ typedef struct arc_stats { kstat_named_t arcstat_duplicate_buffers; kstat_named_t arcstat_duplicate_buffers_size; kstat_named_t arcstat_duplicate_reads; + kstat_named_t arcstat_meta_used; + kstat_named_t arcstat_meta_limit; + kstat_named_t arcstat_meta_max; } arc_stats_t; static arc_stats_t arc_stats = { @@ -493,7 +506,10 @@ static arc_stats_t arc_stats = { { "memory_throttle_count", KSTAT_DATA_UINT64 }, { "duplicate_buffers", KSTAT_DATA_UINT64 }, { "duplicate_buffers_size", KSTAT_DATA_UINT64 }, - { "duplicate_reads", KSTAT_DATA_UINT64 } + { "duplicate_reads", KSTAT_DATA_UINT64 }, + { "arc_meta_used", KSTAT_DATA_UINT64 }, + { "arc_meta_limit", KSTAT_DATA_UINT64 }, + { "arc_meta_max", KSTAT_DATA_UINT64 } }; #define ARCSTAT(stat) (arc_stats.stat.value.ui64) @@ -555,6 +571,9 @@ static arc_state_t *arc_l2c_only; #define arc_c ARCSTAT(arcstat_c) /* target size of cache */ #define arc_c_min ARCSTAT(arcstat_c_min) /* min target cache size */ #define arc_c_max ARCSTAT(arcstat_c_max) /* max target cache size */ +#define arc_meta_limit ARCSTAT(arcstat_meta_limit) /* max size for metadata */ +#define arc_meta_used ARCSTAT(arcstat_meta_used) /* size of metadata */ +#define arc_meta_max ARCSTAT(arcstat_meta_max) /* max size of metadata */ #define L2ARC_IS_VALID_COMPRESS(_c_) \ ((_c_) == ZIO_COMPRESS_LZ4 || (_c_) == ZIO_COMPRESS_EMPTY) @@ -562,13 +581,6 @@ static arc_state_t *arc_l2c_only; static int arc_no_grow; /* Don't try to grow cache size */ static uint64_t arc_tempreserve; static uint64_t arc_loaned_bytes; -static uint64_t arc_meta_used; -static uint64_t arc_meta_limit; -static uint64_t arc_meta_max = 0; -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_used, CTLFLAG_RD, &arc_meta_used, 0, - "ARC metadata used"); -SYSCTL_UQUAD(_vfs_zfs, OID_AUTO, arc_meta_limit, CTLFLAG_RW, &arc_meta_limit, 0, - "ARC metadata limit"); typedef struct l2arc_buf_hdr l2arc_buf_hdr_t; @@ -629,6 +641,26 @@ struct arc_buf_hdr { list_node_t b_l2node; }; +#ifdef _KERNEL +static int +sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HANDLER_ARGS) +{ + uint64_t val; + int err; + + val = arc_meta_limit; + err = sysctl_handle_64(oidp, &val, 0, req); + if (err != 0 || req->newptr == NULL) + return (err); + + if (val <= 0 || val > arc_c_max) + return (EINVAL); + + arc_meta_limit = val; + return (0); +} +#endif + static arc_buf_t *arc_eviction_list; static kmutex_t arc_eviction_mtx; static arc_buf_hdr_t arc_eviction_hdr; @@ -1482,7 +1514,7 @@ arc_space_consume(uint64_t space, arc_sp break; } - atomic_add_64(&arc_meta_used, space); + ARCSTAT_INCR(arcstat_meta_used, space); atomic_add_64(&arc_size, space); } @@ -1509,7 +1541,7 @@ arc_space_return(uint64_t space, arc_spa ASSERT(arc_meta_used >= space); if (arc_meta_max < arc_meta_used) arc_meta_max = arc_meta_used; - atomic_add_64(&arc_meta_used, -space); + ARCSTAT_INCR(arcstat_meta_used, -space); ASSERT(arc_size >= space); atomic_add_64(&arc_size, -space); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:28:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B22A770; Fri, 23 Jan 2015 18:28:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 246ACCC4; Fri, 23 Jan 2015 18:28:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NISdCH021003; Fri, 23 Jan 2015 18:28:39 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIScoQ020999; Fri, 23 Jan 2015 18:28:38 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231828.t0NIScoQ020999@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:28:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277584 - in stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:28:39 -0000 Author: delphij Date: Fri Jan 23 18:28:37 2015 New Revision: 277584 URL: https://svnweb.freebsd.org/changeset/base/277584 Log: MFC r275781: MFV r275550: In addition to r273158, make the code in spa_sync() that checks if the current TXG is a no-op TXG less fragile. Illumos issue: 5347 idle pool may run itself out of space Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Jan 23 18:23:19 2015 (r277583) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c Fri Jan 23 18:28:37 2015 (r277584) @@ -1495,11 +1495,15 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t * dp->dp_bptree_obj, tx)); dp->dp_bptree_obj = 0; scn->scn_async_destroying = B_FALSE; + scn->scn_async_stalled = B_FALSE; } else { /* - * If we didn't make progress, mark the async destroy as - * stalled, so that we will not initiate a spa_sync() on - * its behalf. + * If we didn't make progress, mark the async + * destroy as stalled, so that we will not initiate + * a spa_sync() on its behalf. Note that we only + * check this if we are not finished, because if the + * bptree had no blocks for us to visit, we can + * finish without "making progress". */ scn->scn_async_stalled = (scn->scn_visited_this_txg == 0); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Jan 23 18:23:19 2015 (r277583) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c Fri Jan 23 18:28:37 2015 (r277584) @@ -6605,21 +6605,6 @@ spa_sync(spa_t *spa, uint64_t txg) } /* - * If anything has changed in this txg, or if someone is waiting - * for this txg to sync (eg, spa_vdev_remove()), push the - * deferred frees from the previous txg. If not, leave them - * alone so that we don't generate work on an otherwise idle - * system. - */ - if (!txg_list_empty(&dp->dp_dirty_datasets, txg) || - !txg_list_empty(&dp->dp_dirty_dirs, txg) || - !txg_list_empty(&dp->dp_sync_tasks, txg) || - ((dsl_scan_active(dp->dp_scan) || - txg_sync_waiting(dp)) && !spa_shutting_down(spa))) { - spa_sync_deferred_frees(spa, tx); - } - - /* * Iterate to convergence. */ do { @@ -6636,6 +6621,11 @@ spa_sync(spa_t *spa, uint64_t txg) if (pass < zfs_sync_pass_deferred_free) { spa_sync_frees(spa, free_bpl, tx); } else { + /* + * We can not defer frees in pass 1, because + * we sync the deferred frees later in pass 1. + */ + ASSERT3U(pass, >, 1); bplist_iterate(free_bpl, bpobj_enqueue_cb, &spa->spa_deferred_bpobj, tx); } @@ -6646,8 +6636,37 @@ spa_sync(spa_t *spa, uint64_t txg) while (vd = txg_list_remove(&spa->spa_vdev_txg_list, txg)) vdev_sync(vd, txg); - if (pass == 1) + if (pass == 1) { spa_sync_upgrades(spa, tx); + ASSERT3U(txg, >=, + spa->spa_uberblock.ub_rootbp.blk_birth); + /* + * Note: We need to check if the MOS is dirty + * because we could have marked the MOS dirty + * without updating the uberblock (e.g. if we + * have sync tasks but no dirty user data). We + * need to check the uberblock's rootbp because + * it is updated if we have synced out dirty + * data (though in this case the MOS will most + * likely also be dirty due to second order + * effects, we don't want to rely on that here). + */ + if (spa->spa_uberblock.ub_rootbp.blk_birth < txg && + !dmu_objset_is_dirty(mos, txg)) { + /* + * Nothing changed on the first pass, + * therefore this TXG is a no-op. Avoid + * syncing deferred frees, so that we + * can keep this TXG as a no-op. + */ + ASSERT(txg_list_empty(&dp->dp_dirty_datasets, + txg)); + ASSERT(txg_list_empty(&dp->dp_dirty_dirs, txg)); + ASSERT(txg_list_empty(&dp->dp_sync_tasks, txg)); + break; + } + spa_sync_deferred_frees(spa, tx); + } } while (dmu_objset_is_dirty(mos, txg)); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock.h ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock.h Fri Jan 23 18:23:19 2015 (r277583) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/uberblock.h Fri Jan 23 18:28:37 2015 (r277584) @@ -22,6 +22,9 @@ * Copyright 2009 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ +/* + * Copyright (c) 2014 by Delphix. All rights reserved. + */ #ifndef _SYS_UBERBLOCK_H #define _SYS_UBERBLOCK_H @@ -36,8 +39,8 @@ extern "C" { typedef struct uberblock uberblock_t; -extern int uberblock_verify(uberblock_t *ub); -extern int uberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg); +extern int uberblock_verify(uberblock_t *); +extern boolean_t uberblock_update(uberblock_t *, vdev_t *, uint64_t); #ifdef __cplusplus } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c Fri Jan 23 18:23:19 2015 (r277583) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/uberblock.c Fri Jan 23 18:28:37 2015 (r277584) @@ -20,7 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2013 by Delphix. All rights reserved. + * Copyright (c) 2013, 2014 by Delphix. All rights reserved. */ #include @@ -40,10 +40,10 @@ uberblock_verify(uberblock_t *ub) } /* - * Update the uberblock and return a boolean value indicating whether - * anything changed in this transaction group. + * Update the uberblock and return TRUE if anything changed in this + * transaction group. */ -int +boolean_t uberblock_update(uberblock_t *ub, vdev_t *rvd, uint64_t txg) { ASSERT(ub->ub_txg < txg); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:30:36 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3C9259F2; Fri, 23 Jan 2015 18:30:36 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F6F3CE8; Fri, 23 Jan 2015 18:30:36 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIUaKk021418; Fri, 23 Jan 2015 18:30:36 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIUXVL021401; Fri, 23 Jan 2015 18:30:33 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231830.t0NIUXVL021401@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:30:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277585 - in stable/10: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:30:36 -0000 Author: delphij Date: Fri Jan 23 18:30:32 2015 New Revision: 277585 URL: https://svnweb.freebsd.org/changeset/base/277585 Log: MFC r275782: MFV r275551: Remove "dbuf phys" db->db_data pointer aliases. Use function accessors that cast db->db_data to the appropriate "phys" type, removing the need for clients of the dmu buf user API to keep properly typed pointer aliases to db->db_data in order to conveniently access their data. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c: In zap_leaf() and zap_leaf_byteswap, now that the pointer alias field l_phys has been removed, use the db_data field in an on stack dmu_buf_t to point to the leaf's phys data. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c: Remove the db_user_data_ptr_ptr field from dbuf and all logic to maintain it. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c: Modify the DMU buf user API to remove the ability to specify a db_data aliasing pointer (db_user_data_ptr_ptr). cddl/contrib/opensolaris/cmd/zdb/zdb.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h: Create and use the new "phys data" accessor functions dsl_dir_phys(), dsl_dataset_phys(), zap_m_phys(), zap_f_phys(), and zap_leaf_phys(). sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h: Remove now unused "phys pointer" aliases to db->db_data from clients of the DMU buf user API. Illumos issue: 5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Jan 23 18:30:32 2015 (r277585) @@ -1884,8 +1884,8 @@ dump_dir(objset_t *os) if (dds.dds_type == DMU_OST_META) { dds.dds_creation_txg = TXG_INITIAL; usedobjs = BP_GET_FILL(os->os_rootbp); - refdbytes = os->os_spa->spa_dsl_pool-> - dp_mos_dir->dd_phys->dd_used_bytes; + refdbytes = dsl_dir_phys(os->os_spa->spa_dsl_pool->dp_mos_dir)-> + dd_used_bytes; } else { dmu_objset_space(os, &refdbytes, &scratch, &usedobjs, &scratch); } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c Fri Jan 23 18:30:32 2015 (r277585) @@ -223,11 +223,8 @@ dbuf_evict_user(dmu_buf_impl_t *db) if (db->db_level != 0 || db->db_evict_func == NULL) return; - if (db->db_user_data_ptr_ptr) - *db->db_user_data_ptr_ptr = db->db.db_data; db->db_evict_func(&db->db, db->db_user_ptr); db->db_user_ptr = NULL; - db->db_user_data_ptr_ptr = NULL; db->db_evict_func = NULL; } @@ -418,16 +415,6 @@ dbuf_verify(dmu_buf_impl_t *db) #endif static void -dbuf_update_data(dmu_buf_impl_t *db) -{ - ASSERT(MUTEX_HELD(&db->db_mtx)); - if (db->db_level == 0 && db->db_user_data_ptr_ptr) { - ASSERT(!refcount_is_zero(&db->db_holds)); - *db->db_user_data_ptr_ptr = db->db.db_data; - } -} - -static void dbuf_set_data(dmu_buf_impl_t *db, arc_buf_t *buf) { ASSERT(MUTEX_HELD(&db->db_mtx)); @@ -437,7 +424,6 @@ dbuf_set_data(dmu_buf_impl_t *db, arc_bu db->db.db_data = buf->b_data; if (!arc_released(buf)) arc_set_callback(buf, dbuf_do_evict, db); - dbuf_update_data(db); } else { dbuf_evict_user(db); db->db.db_data = NULL; @@ -543,7 +529,6 @@ dbuf_read_impl(dmu_buf_impl_t *db, zio_t if (bonuslen) bcopy(DN_BONUS(dn->dn_phys), db->db.db_data, bonuslen); DB_DNODE_EXIT(db); - dbuf_update_data(db); db->db_state = DB_CACHED; mutex_exit(&db->db_mtx); return; @@ -1726,7 +1711,6 @@ dbuf_create(dnode_t *dn, uint8_t level, db->db_blkptr = blkptr; db->db_user_ptr = NULL; - db->db_user_data_ptr_ptr = NULL; db->db_evict_func = NULL; db->db_immediate_evict = 0; db->db_freed_in_flight = 0; @@ -1971,7 +1955,6 @@ top: } (void) refcount_add(&db->db_holds, tag); - dbuf_update_data(db); DBUF_VERIFY(db); mutex_exit(&db->db_mtx); @@ -2182,27 +2165,25 @@ dbuf_refcount(dmu_buf_impl_t *db) } void * -dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, void *user_data_ptr_ptr, +dmu_buf_set_user(dmu_buf_t *db_fake, void *user_ptr, dmu_buf_evict_func_t *evict_func) { - return (dmu_buf_update_user(db_fake, NULL, user_ptr, - user_data_ptr_ptr, evict_func)); + return (dmu_buf_update_user(db_fake, NULL, user_ptr, evict_func)); } void * -dmu_buf_set_user_ie(dmu_buf_t *db_fake, void *user_ptr, void *user_data_ptr_ptr, +dmu_buf_set_user_ie(dmu_buf_t *db_fake, void *user_ptr, dmu_buf_evict_func_t *evict_func) { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; db->db_immediate_evict = TRUE; - return (dmu_buf_update_user(db_fake, NULL, user_ptr, - user_data_ptr_ptr, evict_func)); + return (dmu_buf_update_user(db_fake, NULL, user_ptr, evict_func)); } void * dmu_buf_update_user(dmu_buf_t *db_fake, void *old_user_ptr, void *user_ptr, - void *user_data_ptr_ptr, dmu_buf_evict_func_t *evict_func) + dmu_buf_evict_func_t *evict_func) { dmu_buf_impl_t *db = (dmu_buf_impl_t *)db_fake; ASSERT(db->db_level == 0); @@ -2213,10 +2194,7 @@ dmu_buf_update_user(dmu_buf_t *db_fake, if (db->db_user_ptr == old_user_ptr) { db->db_user_ptr = user_ptr; - db->db_user_data_ptr_ptr = user_data_ptr_ptr; db->db_evict_func = evict_func; - - dbuf_update_data(db); } else { old_user_ptr = db->db_user_ptr; } Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c Fri Jan 23 18:30:32 2015 (r277585) @@ -221,7 +221,7 @@ dmu_diff(const char *tosnap_name, const return (SET_ERROR(EXDEV)); } - fromtxg = fromsnap->ds_phys->ds_creation_txg; + fromtxg = dsl_dataset_phys(fromsnap)->ds_creation_txg; dsl_dataset_rele(fromsnap, FTAG); dsl_dataset_long_hold(tosnap, FTAG); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c Fri Jan 23 18:30:32 2015 (r277585) @@ -1479,12 +1479,12 @@ dmu_snapshot_realname(objset_t *os, char dsl_dataset_t *ds = os->os_dsl_dataset; uint64_t ignored; - if (ds->ds_phys->ds_snapnames_zapobj == 0) + if (dsl_dataset_phys(ds)->ds_snapnames_zapobj == 0) 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, - real, maxlen, conflict)); + dsl_dataset_phys(ds)->ds_snapnames_zapobj, name, 8, 1, &ignored, + MT_FIRST, real, maxlen, conflict)); } int @@ -1497,12 +1497,12 @@ 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) + if (dsl_dataset_phys(ds)->ds_snapnames_zapobj == 0) return (SET_ERROR(ENOENT)); zap_cursor_init_serialized(&cursor, ds->ds_dir->dd_pool->dp_meta_objset, - ds->ds_phys->ds_snapnames_zapobj, *offp); + dsl_dataset_phys(ds)->ds_snapnames_zapobj, *offp); if (zap_cursor_retrieve(&cursor, &attr) != 0) { zap_cursor_fini(&cursor); @@ -1536,12 +1536,12 @@ 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) + dsl_dir_phys(dd)->dd_head_dataset_obj) return (SET_ERROR(ENOENT)); zap_cursor_init_serialized(&cursor, dd->dd_pool->dp_meta_objset, - dd->dd_phys->dd_child_dir_zapobj, *offp); + dsl_dir_phys(dd)->dd_child_dir_zapobj, *offp); if (zap_cursor_retrieve(&cursor, &attr) != 0) { zap_cursor_fini(&cursor); @@ -1589,7 +1589,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 return (0); } - thisobj = dd->dd_phys->dd_head_dataset_obj; + thisobj = dsl_dir_phys(dd)->dd_head_dataset_obj; attr = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP); /* @@ -1597,7 +1597,7 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 */ if (flags & DS_FIND_CHILDREN) { for (zap_cursor_init(&zc, dp->dp_meta_objset, - dd->dd_phys->dd_child_dir_zapobj); + dsl_dir_phys(dd)->dd_child_dir_zapobj); zap_cursor_retrieve(&zc, attr) == 0; (void) zap_cursor_advance(&zc)) { ASSERT3U(attr->za_integer_length, ==, @@ -1626,7 +1626,9 @@ dmu_objset_find_dp(dsl_pool_t *dp, uint6 err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds); if (err == 0) { - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj; + + snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; dsl_dataset_rele(ds, FTAG); for (zap_cursor_init(&zc, dp->dp_meta_objset, snapobj); @@ -1701,7 +1703,7 @@ dmu_objset_find_impl(spa_t *spa, const c return (0); } - thisobj = dd->dd_phys->dd_head_dataset_obj; + thisobj = dsl_dir_phys(dd)->dd_head_dataset_obj; attr = kmem_alloc(sizeof (zap_attribute_t), KM_SLEEP); /* @@ -1709,7 +1711,7 @@ dmu_objset_find_impl(spa_t *spa, const c */ if (flags & DS_FIND_CHILDREN) { for (zap_cursor_init(&zc, dp->dp_meta_objset, - dd->dd_phys->dd_child_dir_zapobj); + dsl_dir_phys(dd)->dd_child_dir_zapobj); zap_cursor_retrieve(&zc, attr) == 0; (void) zap_cursor_advance(&zc)) { ASSERT3U(attr->za_integer_length, ==, @@ -1742,7 +1744,9 @@ dmu_objset_find_impl(spa_t *spa, const c err = dsl_dataset_hold_obj(dp, thisobj, FTAG, &ds); if (err == 0) { - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj; + + snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; dsl_dataset_rele(ds, FTAG); for (zap_cursor_init(&zc, dp->dp_meta_objset, snapobj); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c Fri Jan 23 18:30:32 2015 (r277585) @@ -623,12 +623,12 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, featureflags); drr->drr_u.drr_begin.drr_creation_time = - ds->ds_phys->ds_creation_time; + dsl_dataset_phys(ds)->ds_creation_time; drr->drr_u.drr_begin.drr_type = dmu_objset_type(os); if (is_clone) drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CLONE; - drr->drr_u.drr_begin.drr_toguid = ds->ds_phys->ds_guid; - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + drr->drr_u.drr_begin.drr_toguid = dsl_dataset_phys(ds)->ds_guid; + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CI_DATA; if (fromzb != NULL) { @@ -650,7 +650,7 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsp->dsa_fp = fp; dsp->dsa_os = os; dsp->dsa_off = off; - dsp->dsa_toguid = ds->ds_phys->ds_guid; + dsp->dsa_toguid = dsl_dataset_phys(ds)->ds_guid; ZIO_SET_CHECKSUM(&dsp->dsa_zc, 0, 0, 0, 0); dsp->dsa_pending_op = PENDING_NONE; dsp->dsa_incremental = (fromzb != NULL); @@ -740,9 +740,10 @@ dmu_send_obj(const char *pool, uint64_t } if (!dsl_dataset_is_before(ds, fromds, 0)) err = SET_ERROR(EXDEV); - zb.zbm_creation_time = fromds->ds_phys->ds_creation_time; - zb.zbm_creation_txg = fromds->ds_phys->ds_creation_txg; - zb.zbm_guid = fromds->ds_phys->ds_guid; + zb.zbm_creation_time = + dsl_dataset_phys(fromds)->ds_creation_time; + zb.zbm_creation_txg = dsl_dataset_phys(fromds)->ds_creation_txg; + zb.zbm_guid = dsl_dataset_phys(fromds)->ds_guid; is_clone = (fromds->ds_dir != ds->ds_dir); dsl_dataset_rele(fromds, FTAG); err = dmu_send_impl(FTAG, dp, ds, &zb, is_clone, @@ -813,10 +814,10 @@ dmu_send(const char *tosnap, const char if (!dsl_dataset_is_before(ds, fromds, 0)) err = SET_ERROR(EXDEV); zb.zbm_creation_time = - fromds->ds_phys->ds_creation_time; + dsl_dataset_phys(fromds)->ds_creation_time; zb.zbm_creation_txg = - fromds->ds_phys->ds_creation_txg; - zb.zbm_guid = fromds->ds_phys->ds_guid; + dsl_dataset_phys(fromds)->ds_creation_txg; + zb.zbm_guid = dsl_dataset_phys(fromds)->ds_guid; is_clone = (ds->ds_dir != fromds->ds_dir); dsl_dataset_rele(fromds, FTAG); } @@ -863,7 +864,7 @@ dmu_send_estimate(dsl_dataset_t *ds, dsl /* Get uncompressed size estimate of changed data. */ if (fromds == NULL) { - size = ds->ds_phys->ds_uncompressed_bytes; + size = dsl_dataset_phys(ds)->ds_uncompressed_bytes; } else { uint64_t used, comp; err = dsl_dataset_space_written(fromds, ds, @@ -918,15 +919,15 @@ recv_begin_check_existing_impl(dmu_recv_ /* temporary clone name must not exist */ error = zap_lookup(dp->dp_meta_objset, - ds->ds_dir->dd_phys->dd_child_dir_zapobj, recv_clone_name, + dsl_dir_phys(ds->ds_dir)->dd_child_dir_zapobj, recv_clone_name, 8, 1, &val); if (error != ENOENT) return (error == 0 ? EBUSY : error); /* new snapshot name must not exist */ error = zap_lookup(dp->dp_meta_objset, - ds->ds_phys->ds_snapnames_zapobj, drba->drba_cookie->drc_tosnap, - 8, 1, &val); + dsl_dataset_phys(ds)->ds_snapnames_zapobj, + drba->drba_cookie->drc_tosnap, 8, 1, &val); if (error != ENOENT) return (error == 0 ? EEXIST : error); @@ -946,7 +947,7 @@ recv_begin_check_existing_impl(dmu_recv_ if (fromguid != 0) { dsl_dataset_t *snap; - uint64_t obj = ds->ds_phys->ds_prev_snap_obj; + uint64_t obj = dsl_dataset_phys(ds)->ds_prev_snap_obj; /* Find snapshot in this dir that matches fromguid. */ while (obj != 0) { @@ -958,9 +959,9 @@ recv_begin_check_existing_impl(dmu_recv_ dsl_dataset_rele(snap, FTAG); return (SET_ERROR(ENODEV)); } - if (snap->ds_phys->ds_guid == fromguid) + if (dsl_dataset_phys(snap)->ds_guid == fromguid) break; - obj = snap->ds_phys->ds_prev_snap_obj; + obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_dataset_rele(snap, FTAG); } if (obj == 0) @@ -983,9 +984,9 @@ recv_begin_check_existing_impl(dmu_recv_ dsl_dataset_rele(snap, FTAG); } else { /* if full, most recent snapshot must be $ORIGIN */ - if (ds->ds_phys->ds_prev_snap_txg >= TXG_INITIAL) + if (dsl_dataset_phys(ds)->ds_prev_snap_txg >= TXG_INITIAL) return (SET_ERROR(ENODEV)); - drba->drba_snapobj = ds->ds_phys->ds_prev_snap_obj; + drba->drba_snapobj = dsl_dataset_phys(ds)->ds_prev_snap_obj; } return (0); @@ -1103,7 +1104,7 @@ dmu_recv_begin_check(void *arg, dmu_tx_t dsl_dataset_rele(ds, FTAG); return (SET_ERROR(EINVAL)); } - if (origin->ds_phys->ds_guid != fromguid) { + if (dsl_dataset_phys(origin)->ds_guid != fromguid) { dsl_dataset_rele(origin, FTAG); dsl_dataset_rele(ds, FTAG); return (SET_ERROR(ENODEV)); @@ -1174,7 +1175,7 @@ dmu_recv_begin_sync(void *arg, dmu_tx_t } dmu_buf_will_dirty(newds->ds_dbuf, tx); - newds->ds_phys->ds_flags |= DS_FLAG_INCONSISTENT; + dsl_dataset_phys(newds)->ds_flags |= DS_FLAG_INCONSISTENT; /* * If we actually created a non-clone, we need to create the @@ -1837,7 +1838,7 @@ dmu_recv_stream(dmu_recv_cookie_t *drc, */ VERIFY0(dmu_objset_from_ds(drc->drc_ds, &os)); - ASSERT(drc->drc_ds->ds_phys->ds_flags & DS_FLAG_INCONSISTENT); + ASSERT(dsl_dataset_phys(drc->drc_ds)->ds_flags & DS_FLAG_INCONSISTENT); featureflags = DMU_GET_FEATUREFLAGS(drc->drc_drrb->drr_versioninfo); @@ -2000,8 +2001,11 @@ dmu_recv_end_check(void *arg, dmu_tx_t * * the snap before drc_ds, because drc_ds can not * have any snaps of its own). */ - uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; - while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + uint64_t obj; + + obj = dsl_dataset_phys(origin_head)->ds_prev_snap_obj; + while (obj != + dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj) { dsl_dataset_t *snap; error = dsl_dataset_hold_obj(dp, obj, FTAG, &snap); @@ -2013,7 +2017,7 @@ dmu_recv_end_check(void *arg, dmu_tx_t * error = dsl_destroy_snapshot_check_impl( snap, B_FALSE); } - obj = snap->ds_phys->ds_prev_snap_obj; + obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_dataset_rele(snap, FTAG); if (error != 0) return (error); @@ -2059,13 +2063,16 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t * Destroy any snapshots of drc_tofs (origin_head) * after the origin (the snap before drc_ds). */ - uint64_t obj = origin_head->ds_phys->ds_prev_snap_obj; - while (obj != drc->drc_ds->ds_phys->ds_prev_snap_obj) { + uint64_t obj; + + obj = dsl_dataset_phys(origin_head)->ds_prev_snap_obj; + while (obj != + dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj) { dsl_dataset_t *snap; VERIFY0(dsl_dataset_hold_obj(dp, obj, FTAG, &snap)); ASSERT3P(snap->ds_dir, ==, origin_head->ds_dir); - obj = snap->ds_phys->ds_prev_snap_obj; + obj = dsl_dataset_phys(snap)->ds_prev_snap_obj; dsl_destroy_snapshot_sync_impl(snap, B_FALSE, tx); dsl_dataset_rele(snap, FTAG); @@ -2081,15 +2088,16 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t /* set snapshot's creation time and guid */ dmu_buf_will_dirty(origin_head->ds_prev->ds_dbuf, tx); - origin_head->ds_prev->ds_phys->ds_creation_time = + dsl_dataset_phys(origin_head->ds_prev)->ds_creation_time = drc->drc_drrb->drr_creation_time; - origin_head->ds_prev->ds_phys->ds_guid = + dsl_dataset_phys(origin_head->ds_prev)->ds_guid = drc->drc_drrb->drr_toguid; - origin_head->ds_prev->ds_phys->ds_flags &= + dsl_dataset_phys(origin_head->ds_prev)->ds_flags &= ~DS_FLAG_INCONSISTENT; dmu_buf_will_dirty(origin_head->ds_dbuf, tx); - origin_head->ds_phys->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsl_dataset_phys(origin_head)->ds_flags &= + ~DS_FLAG_INCONSISTENT; dsl_dataset_rele(origin_head, FTAG); dsl_destroy_head_sync_impl(drc->drc_ds, tx); @@ -2103,15 +2111,17 @@ dmu_recv_end_sync(void *arg, dmu_tx_t *t /* set snapshot's creation time and guid */ dmu_buf_will_dirty(ds->ds_prev->ds_dbuf, tx); - ds->ds_prev->ds_phys->ds_creation_time = + dsl_dataset_phys(ds->ds_prev)->ds_creation_time = drc->drc_drrb->drr_creation_time; - ds->ds_prev->ds_phys->ds_guid = drc->drc_drrb->drr_toguid; - ds->ds_prev->ds_phys->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsl_dataset_phys(ds->ds_prev)->ds_guid = + drc->drc_drrb->drr_toguid; + dsl_dataset_phys(ds->ds_prev)->ds_flags &= + ~DS_FLAG_INCONSISTENT; dmu_buf_will_dirty(ds->ds_dbuf, tx); - ds->ds_phys->ds_flags &= ~DS_FLAG_INCONSISTENT; + dsl_dataset_phys(ds)->ds_flags &= ~DS_FLAG_INCONSISTENT; } - drc->drc_newsnapobj = drc->drc_ds->ds_phys->ds_prev_snap_obj; + drc->drc_newsnapobj = dsl_dataset_phys(drc->drc_ds)->ds_prev_snap_obj; /* * Release the hold from dmu_recv_begin. This must be done before * we return to open context, so that when we free the dataset's dnode, @@ -2137,7 +2147,7 @@ add_ds_to_guidmap(const char *name, avl_ gmep = kmem_alloc(sizeof (*gmep), KM_SLEEP); err = dsl_dataset_hold_obj(dp, snapobj, gmep, &snapds); if (err == 0) { - gmep->guid = snapds->ds_phys->ds_guid; + gmep->guid = dsl_dataset_phys(snapds)->ds_guid; gmep->gme_ds = snapds; avl_add(guid_map, gmep); dsl_dataset_long_hold(snapds, gmep); Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c Fri Jan 23 18:30:32 2015 (r277585) @@ -579,7 +579,7 @@ traverse_dataset(dsl_dataset_t *ds, uint blkptr_cb_t func, void *arg) { return (traverse_impl(ds->ds_dir->dd_pool->dp_spa, ds, ds->ds_object, - &ds->ds_phys->ds_bp, txg_start, NULL, flags, func, arg)); + &dsl_dataset_phys(ds)->ds_bp, txg_start, NULL, flags, func, arg)); } int @@ -634,8 +634,8 @@ traverse_pool(spa_t *spa, uint64_t txg_s continue; break; } - if (ds->ds_phys->ds_prev_snap_txg > txg) - txg = ds->ds_phys->ds_prev_snap_txg; + if (dsl_dataset_phys(ds)->ds_prev_snap_txg > txg) + txg = dsl_dataset_phys(ds)->ds_prev_snap_txg; err = traverse_dataset(ds, txg, flags, func, arg); dsl_dataset_rele(ds, FTAG); if (err != 0) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c Fri Jan 23 18:30:32 2015 (r277585) @@ -714,6 +714,7 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o { dmu_tx_hold_t *txh; dnode_t *dn; + dsl_dataset_phys_t *ds_phys; uint64_t nblocks; int epbs, err; @@ -788,8 +789,9 @@ dmu_tx_hold_zap(dmu_tx_t *tx, uint64_t o * we'll have to modify an indirect twig for each. */ epbs = dn->dn_indblkshift - SPA_BLKPTRSHIFT; + ds_phys = dsl_dataset_phys(dn->dn_objset->os_dsl_dataset); for (nblocks = dn->dn_maxblkid >> epbs; nblocks != 0; nblocks >>= epbs) - if (dn->dn_objset->os_dsl_dataset->ds_phys->ds_prev_snap_obj) + if (ds_phys->ds_prev_snap_obj) txh->txh_space_towrite += 3 << dn->dn_indblkshift; else txh->txh_space_tooverwrite += 3 << dn->dn_indblkshift; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Jan 23 18:30:32 2015 (r277585) @@ -1121,7 +1121,7 @@ dnode_hold_impl(objset_t *os, uint64_t o zrl_init(&dnh[i].dnh_zrlock); dnh[i].dnh_dnode = NULL; } - if (winner = dmu_buf_set_user(&db->db, children_dnodes, NULL, + if (winner = dmu_buf_set_user(&db->db, children_dnodes, dnode_buf_pageout)) { for (i = 0; i < epb; i++) { Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c Fri Jan 23 18:30:32 2015 (r277585) @@ -65,7 +65,7 @@ dsl_dataset_bmark_lookup(dsl_dataset_t * if (bmark_zapobj == 0) return (SET_ERROR(ESRCH)); - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; @@ -208,10 +208,11 @@ dsl_bookmark_create_sync(void *arg, dmu_ &bmark_fs->ds_bookmarks, tx)); } - bmark_phys.zbm_guid = snapds->ds_phys->ds_guid; - bmark_phys.zbm_creation_txg = snapds->ds_phys->ds_creation_txg; + bmark_phys.zbm_guid = dsl_dataset_phys(snapds)->ds_guid; + bmark_phys.zbm_creation_txg = + dsl_dataset_phys(snapds)->ds_creation_txg; bmark_phys.zbm_creation_time = - snapds->ds_phys->ds_creation_time; + dsl_dataset_phys(snapds)->ds_creation_time; VERIFY0(zap_add(mos, bmark_fs->ds_bookmarks, shortname, sizeof (uint64_t), @@ -340,7 +341,7 @@ dsl_dataset_bookmark_remove(dsl_dataset_ uint64_t bmark_zapobj = ds->ds_bookmarks; matchtype_t mt; - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jan 23 18:28:37 2015 (r277584) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Fri Jan 23 18:30:32 2015 (r277585) @@ -76,6 +76,9 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recor #define DS_REF_MAX (1ULL << 62) +extern inline dsl_dataset_phys_t *dsl_dataset_phys(dsl_dataset_t *ds); +extern inline boolean_t dsl_dataset_is_snapshot(dsl_dataset_t *ds); + /* * Figure out how much of this delta should be propogated to the dsl_dir * layer. If there's a refreservation, that space has already been @@ -84,13 +87,15 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recor static int64_t parent_delta(dsl_dataset_t *ds, int64_t delta) { + dsl_dataset_phys_t *ds_phys; uint64_t old_bytes, new_bytes; if (ds->ds_reserved == 0) return (delta); - old_bytes = MAX(ds->ds_phys->ds_unique_bytes, ds->ds_reserved); - new_bytes = MAX(ds->ds_phys->ds_unique_bytes + delta, ds->ds_reserved); + ds_phys = dsl_dataset_phys(ds); + old_bytes = MAX(ds_phys->ds_unique_bytes, ds->ds_reserved); + new_bytes = MAX(ds_phys->ds_unique_bytes + delta, ds->ds_reserved); ASSERT3U(ABS((int64_t)(new_bytes - old_bytes)), <=, ABS(delta)); return (new_bytes - old_bytes); @@ -121,10 +126,10 @@ dsl_dataset_block_born(dsl_dataset_t *ds dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); - ds->ds_phys->ds_referenced_bytes += used; - ds->ds_phys->ds_compressed_bytes += compressed; - ds->ds_phys->ds_uncompressed_bytes += uncompressed; - ds->ds_phys->ds_unique_bytes += used; + dsl_dataset_phys(ds)->ds_referenced_bytes += used; + dsl_dataset_phys(ds)->ds_compressed_bytes += compressed; + dsl_dataset_phys(ds)->ds_uncompressed_bytes += uncompressed; + dsl_dataset_phys(ds)->ds_unique_bytes += used; if (BP_GET_LSIZE(bp) > SPA_OLD_MAXBLOCKSIZE) ds->ds_need_large_blocks = B_TRUE; mutex_exit(&ds->ds_lock); @@ -159,17 +164,17 @@ dsl_dataset_block_kill(dsl_dataset_t *ds ASSERT(!dsl_dataset_is_snapshot(ds)); dmu_buf_will_dirty(ds->ds_dbuf, tx); - if (bp->blk_birth > ds->ds_phys->ds_prev_snap_txg) { + if (bp->blk_birth > dsl_dataset_phys(ds)->ds_prev_snap_txg) { int64_t delta; dprintf_bp(bp, "freeing ds=%llu", ds->ds_object); dsl_free(tx->tx_pool, tx->tx_txg, bp); mutex_enter(&ds->ds_lock); - ASSERT(ds->ds_phys->ds_unique_bytes >= used || + ASSERT(dsl_dataset_phys(ds)->ds_unique_bytes >= used || !DS_UNIQUE_IS_ACCURATE(ds)); delta = parent_delta(ds, -used); - ds->ds_phys->ds_unique_bytes -= used; + dsl_dataset_phys(ds)->ds_unique_bytes -= used; mutex_exit(&ds->ds_lock); dsl_dir_diduse_space(ds->ds_dir, DD_USED_HEAD, delta, -compressed, -uncompressed, tx); @@ -190,15 +195,15 @@ dsl_dataset_block_kill(dsl_dataset_t *ds dsl_deadlist_insert(&ds->ds_deadlist, bp, tx); } ASSERT3U(ds->ds_prev->ds_object, ==, - ds->ds_phys->ds_prev_snap_obj); - ASSERT(ds->ds_prev->ds_phys->ds_num_children > 0); + dsl_dataset_phys(ds)->ds_prev_snap_obj); + ASSERT(dsl_dataset_phys(ds->ds_prev)->ds_num_children > 0); /* if (bp->blk_birth > prev prev snap txg) prev unique += bs */ - if (ds->ds_prev->ds_phys->ds_next_snap_obj == + if (dsl_dataset_phys(ds->ds_prev)->ds_next_snap_obj == ds->ds_object && bp->blk_birth > - ds->ds_prev->ds_phys->ds_prev_snap_txg) { + dsl_dataset_phys(ds->ds_prev)->ds_prev_snap_txg) { dmu_buf_will_dirty(ds->ds_prev->ds_dbuf, tx); mutex_enter(&ds->ds_prev->ds_lock); - ds->ds_prev->ds_phys->ds_unique_bytes += used; + dsl_dataset_phys(ds->ds_prev)->ds_unique_bytes += used; mutex_exit(&ds->ds_prev->ds_lock); } if (bp->blk_birth > ds->ds_dir->dd_origin_txg) { @@ -207,12 +212,12 @@ dsl_dataset_block_kill(dsl_dataset_t *ds } } mutex_enter(&ds->ds_lock); - ASSERT3U(ds->ds_phys->ds_referenced_bytes, >=, used); - ds->ds_phys->ds_referenced_bytes -= used; - ASSERT3U(ds->ds_phys->ds_compressed_bytes, >=, compressed); - ds->ds_phys->ds_compressed_bytes -= compressed; - ASSERT3U(ds->ds_phys->ds_uncompressed_bytes, >=, uncompressed); - ds->ds_phys->ds_uncompressed_bytes -= uncompressed; + ASSERT3U(dsl_dataset_phys(ds)->ds_referenced_bytes, >=, used); + dsl_dataset_phys(ds)->ds_referenced_bytes -= used; + ASSERT3U(dsl_dataset_phys(ds)->ds_compressed_bytes, >=, compressed); + dsl_dataset_phys(ds)->ds_compressed_bytes -= compressed; + ASSERT3U(dsl_dataset_phys(ds)->ds_uncompressed_bytes, >=, uncompressed); + dsl_dataset_phys(ds)->ds_uncompressed_bytes -= uncompressed; mutex_exit(&ds->ds_lock); return (used); @@ -238,7 +243,7 @@ dsl_dataset_prev_snap_txg(dsl_dataset_t if (ds->ds_trysnap_txg > spa_last_synced_txg(ds->ds_dir->dd_pool->dp_spa)) trysnap = ds->ds_trysnap_txg; - return (MAX(ds->ds_phys->ds_prev_snap_txg, trysnap)); + return (MAX(dsl_dataset_phys(ds)->ds_prev_snap_txg, trysnap)); } boolean_t @@ -273,7 +278,7 @@ dsl_dataset_evict(dmu_buf_t *db, void *d } bplist_destroy(&ds->ds_pending_deadlist); - if (ds->ds_phys->ds_deadlist_obj != 0) + if (dsl_dataset_phys(ds)->ds_deadlist_obj != 0) dsl_deadlist_close(&ds->ds_deadlist); if (ds->ds_dir) dsl_dir_rele(ds->ds_dir, ds); @@ -303,10 +308,10 @@ dsl_dataset_get_snapname(dsl_dataset_t * if (ds->ds_snapname[0]) return (0); - if (ds->ds_phys->ds_next_snap_obj == 0) + if (dsl_dataset_phys(ds)->ds_next_snap_obj == 0) return (0); - err = dmu_bonus_hold(mos, ds->ds_dir->dd_phys->dd_head_dataset_obj, + err = dmu_bonus_hold(mos, dsl_dir_phys(ds->ds_dir)->dd_head_dataset_obj, FTAG, &headdbuf); if (err != 0) return (err); @@ -321,11 +326,11 @@ int dsl_dataset_snap_lookup(dsl_dataset_t *ds, const char *name, uint64_t *value) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; matchtype_t mt; int err; - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; @@ -342,13 +347,13 @@ dsl_dataset_snap_remove(dsl_dataset_t *d boolean_t adj_cnt) { objset_t *mos = ds->ds_dir->dd_pool->dp_meta_objset; - uint64_t snapobj = ds->ds_phys->ds_snapnames_zapobj; + uint64_t snapobj = dsl_dataset_phys(ds)->ds_snapnames_zapobj; matchtype_t mt; int err; dsl_dir_snap_cmtime_update(ds->ds_dir); - if (ds->ds_phys->ds_flags & DS_FLAG_CI_DATASET) + if (dsl_dataset_phys(ds)->ds_flags & DS_FLAG_CI_DATASET) mt = MT_FIRST; else mt = MT_EXACT; @@ -394,7 +399,6 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds = kmem_zalloc(sizeof (dsl_dataset_t), KM_SLEEP); ds->ds_dbuf = dbuf; ds->ds_object = dsobj; - ds->ds_phys = dbuf->db_data; mutex_init(&ds->ds_lock, NULL, MUTEX_DEFAULT, NULL); mutex_init(&ds->ds_opening_lock, NULL, MUTEX_DEFAULT, NULL); @@ -403,7 +407,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin bplist_create(&ds->ds_pending_deadlist); dsl_deadlist_open(&ds->ds_deadlist, - mos, ds->ds_phys->ds_deadlist_obj); + mos, dsl_dataset_phys(ds)->ds_deadlist_obj); list_create(&ds->ds_sendstreams, sizeof (dmu_sendarg_t), offsetof(dmu_sendarg_t, dsa_link)); @@ -418,7 +422,8 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin if (err == 0) { err = dsl_dir_hold_obj(dp, - ds->ds_phys->ds_dir_obj, NULL, ds, &ds->ds_dir); + dsl_dataset_phys(ds)->ds_dir_obj, NULL, ds, + &ds->ds_dir); } if (err != 0) { mutex_destroy(&ds->ds_lock); @@ -434,9 +439,9 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin if (!dsl_dataset_is_snapshot(ds)) { ds->ds_snapname[0] = '\0'; - if (ds->ds_phys->ds_prev_snap_obj != 0) { + if (dsl_dataset_phys(ds)->ds_prev_snap_obj != 0) { err = dsl_dataset_hold_obj(dp, - ds->ds_phys->ds_prev_snap_obj, + dsl_dataset_phys(ds)->ds_prev_snap_obj, ds, &ds->ds_prev); } if (doi.doi_type == DMU_OTN_ZAP_METADATA) { @@ -450,10 +455,11 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } else { if (zfs_flags & ZFS_DEBUG_SNAPNAMES) err = dsl_dataset_get_snapname(ds); - if (err == 0 && ds->ds_phys->ds_userrefs_obj != 0) { + if (err == 0 && + dsl_dataset_phys(ds)->ds_userrefs_obj != 0) { err = zap_count( ds->ds_dir->dd_pool->dp_meta_objset, - ds->ds_phys->ds_userrefs_obj, + dsl_dataset_phys(ds)->ds_userrefs_obj, &ds->ds_userrefs); } } @@ -472,7 +478,7 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin } if (err != 0 || (winner = dmu_buf_set_user_ie(dbuf, ds, - &ds->ds_phys, dsl_dataset_evict)) != NULL) { + dsl_dataset_evict)) != NULL) { bplist_destroy(&ds->ds_pending_deadlist); dsl_deadlist_close(&ds->ds_deadlist); if (ds->ds_prev) @@ -490,12 +496,12 @@ dsl_dataset_hold_obj(dsl_pool_t *dp, uin ds = winner; } else { ds->ds_fsid_guid = - unique_insert(ds->ds_phys->ds_fsid_guid); + unique_insert(dsl_dataset_phys(ds)->ds_fsid_guid); } } ASSERT3P(ds->ds_dbuf, ==, dbuf); - ASSERT3P(ds->ds_phys, ==, dbuf->db_data); - ASSERT(ds->ds_phys->ds_prev_snap_obj != 0 || + ASSERT3P(dsl_dataset_phys(ds), ==, dbuf->db_data); + ASSERT(dsl_dataset_phys(ds)->ds_prev_snap_obj != 0 || spa_version(dp->dp_spa) < SPA_VERSION_ORIGIN || dp->dp_origin_snap == NULL || ds == dp->dp_origin_snap); *dsp = ds; @@ -516,7 +522,7 @@ dsl_dataset_hold(dsl_pool_t *dp, const c return (err); ASSERT(dsl_pool_config_held(dp)); - obj = dd->dd_phys->dd_head_dataset_obj; + obj = dsl_dir_phys(dd)->dd_head_dataset_obj; if (obj != 0) err = dsl_dataset_hold_obj(dp, obj, tag, dsp); else @@ -683,9 +689,9 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd origin = dp->dp_origin_snap; ASSERT(origin == NULL || origin->ds_dir->dd_pool == dp); - ASSERT(origin == NULL || origin->ds_phys->ds_num_children > 0); + ASSERT(origin == NULL || dsl_dataset_phys(origin)->ds_num_children > 0); ASSERT(dmu_tx_is_syncing(tx)); - ASSERT(dd->dd_phys->dd_head_dataset_obj == 0); + ASSERT(dsl_dir_phys(dd)->dd_head_dataset_obj == 0); dsobj = dmu_object_alloc(mos, DMU_OT_DSL_DATASET, 0, DMU_OT_DSL_DATASET, sizeof (dsl_dataset_phys_t), tx); @@ -713,55 +719,58 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dsphys->ds_prev_snap_obj = origin->ds_object; dsphys->ds_prev_snap_txg = - origin->ds_phys->ds_creation_txg; + dsl_dataset_phys(origin)->ds_creation_txg; dsphys->ds_referenced_bytes = - origin->ds_phys->ds_referenced_bytes; + dsl_dataset_phys(origin)->ds_referenced_bytes; dsphys->ds_compressed_bytes = - origin->ds_phys->ds_compressed_bytes; + dsl_dataset_phys(origin)->ds_compressed_bytes; dsphys->ds_uncompressed_bytes = - origin->ds_phys->ds_uncompressed_bytes; - dsphys->ds_bp = origin->ds_phys->ds_bp; + dsl_dataset_phys(origin)->ds_uncompressed_bytes; + dsphys->ds_bp = dsl_dataset_phys(origin)->ds_bp; /* * Inherit flags that describe the dataset's contents * (INCONSISTENT) or properties (Case Insensitive). */ - dsphys->ds_flags |= origin->ds_phys->ds_flags & + dsphys->ds_flags |= dsl_dataset_phys(origin)->ds_flags & (DS_FLAG_INCONSISTENT | DS_FLAG_CI_DATASET); if (origin->ds_large_blocks) dsl_dataset_activate_large_blocks_sync_impl(dsobj, tx); dmu_buf_will_dirty(origin->ds_dbuf, tx); - origin->ds_phys->ds_num_children++; + dsl_dataset_phys(origin)->ds_num_children++; VERIFY0(dsl_dataset_hold_obj(dp, - origin->ds_dir->dd_phys->dd_head_dataset_obj, FTAG, &ohds)); + dsl_dir_phys(origin->ds_dir)->dd_head_dataset_obj, + FTAG, &ohds)); dsphys->ds_deadlist_obj = dsl_deadlist_clone(&ohds->ds_deadlist, dsphys->ds_prev_snap_txg, dsphys->ds_prev_snap_obj, tx); dsl_dataset_rele(ohds, FTAG); if (spa_version(dp->dp_spa) >= SPA_VERSION_NEXT_CLONES) { - if (origin->ds_phys->ds_next_clones_obj == 0) { - origin->ds_phys->ds_next_clones_obj = + if (dsl_dataset_phys(origin)->ds_next_clones_obj == 0) { + dsl_dataset_phys(origin)->ds_next_clones_obj = zap_create(mos, DMU_OT_NEXT_CLONES, DMU_OT_NONE, 0, tx); } VERIFY0(zap_add_int(mos, - origin->ds_phys->ds_next_clones_obj, dsobj, tx)); + dsl_dataset_phys(origin)->ds_next_clones_obj, + dsobj, tx)); } dmu_buf_will_dirty(dd->dd_dbuf, tx); - dd->dd_phys->dd_origin_obj = origin->ds_object; + dsl_dir_phys(dd)->dd_origin_obj = origin->ds_object; if (spa_version(dp->dp_spa) >= SPA_VERSION_DIR_CLONES) { - if (origin->ds_dir->dd_phys->dd_clones == 0) { + if (dsl_dir_phys(origin->ds_dir)->dd_clones == 0) { dmu_buf_will_dirty(origin->ds_dir->dd_dbuf, tx); - origin->ds_dir->dd_phys->dd_clones = + dsl_dir_phys(origin->ds_dir)->dd_clones = zap_create(mos, DMU_OT_DSL_CLONES, DMU_OT_NONE, 0, tx); } VERIFY0(zap_add_int(mos, - origin->ds_dir->dd_phys->dd_clones, dsobj, tx)); + dsl_dir_phys(origin->ds_dir)->dd_clones, + dsobj, tx)); } } @@ -771,7 +780,7 @@ dsl_dataset_create_sync_dd(dsl_dir_t *dd dmu_buf_rele(dbuf, FTAG); dmu_buf_will_dirty(dd->dd_dbuf, tx); - dd->dd_phys->dd_head_dataset_obj = dsobj; + dsl_dir_phys(dd)->dd_head_dataset_obj = dsobj; return (dsobj); } @@ -893,20 +902,20 @@ dsl_dataset_recalc_head_uniq(dsl_dataset ASSERT(!dsl_dataset_is_snapshot(ds)); - if (ds->ds_phys->ds_prev_snap_obj != 0) - mrs_used = ds->ds_prev->ds_phys->ds_referenced_bytes; + if (dsl_dataset_phys(ds)->ds_prev_snap_obj != 0) + mrs_used = dsl_dataset_phys(ds->ds_prev)->ds_referenced_bytes; else mrs_used = 0; dsl_deadlist_space(&ds->ds_deadlist, &dlused, &dlcomp, &dluncomp); ASSERT3U(dlused, <=, mrs_used); - ds->ds_phys->ds_unique_bytes = - ds->ds_phys->ds_referenced_bytes - (mrs_used - dlused); + dsl_dataset_phys(ds)->ds_unique_bytes = + dsl_dataset_phys(ds)->ds_referenced_bytes - (mrs_used - dlused); if (spa_version(ds->ds_dir->dd_pool->dp_spa) >= SPA_VERSION_UNIQUE_ACCURATE) - ds->ds_phys->ds_flags |= DS_FLAG_UNIQUE_ACCURATE; + dsl_dataset_phys(ds)->ds_flags |= DS_FLAG_UNIQUE_ACCURATE; } void @@ -917,8 +926,9 @@ dsl_dataset_remove_from_next_clones(dsl_ uint64_t count; int err; - ASSERT(ds->ds_phys->ds_num_children >= 2); - err = zap_remove_int(mos, ds->ds_phys->ds_next_clones_obj, obj, tx); + ASSERT(dsl_dataset_phys(ds)->ds_num_children >= 2); + err = zap_remove_int(mos, dsl_dataset_phys(ds)->ds_next_clones_obj, + obj, tx); /* * The err should not be ENOENT, but a bug in a previous version * of the code could cause upgrade_clones_cb() to not set @@ -931,16 +941,16 @@ dsl_dataset_remove_from_next_clones(dsl_ */ if (err != ENOENT) VERIFY0(err); - ASSERT0(zap_count(mos, ds->ds_phys->ds_next_clones_obj, + ASSERT0(zap_count(mos, dsl_dataset_phys(ds)->ds_next_clones_obj, &count)); - ASSERT3U(count, <=, ds->ds_phys->ds_num_children - 2); + ASSERT3U(count, <=, dsl_dataset_phys(ds)->ds_num_children - 2); } blkptr_t * dsl_dataset_get_blkptr(dsl_dataset_t *ds) { - return (&ds->ds_phys->ds_bp); + return (&dsl_dataset_phys(ds)->ds_bp); } void @@ -952,7 +962,7 @@ dsl_dataset_set_blkptr(dsl_dataset_t *ds tx->tx_pool->dp_meta_rootbp = *bp; } else { dmu_buf_will_dirty(ds->ds_dbuf, tx); - ds->ds_phys->ds_bp = *bp; + dsl_dataset_phys(ds)->ds_bp = *bp; } } @@ -972,7 +982,7 @@ dsl_dataset_dirty(dsl_dataset_t *ds, dmu ASSERT(ds->ds_objset != NULL); - if (ds->ds_phys->ds_next_snap_obj != 0) + if (dsl_dataset_phys(ds)->ds_next_snap_obj != 0) panic("dirtying snapshot!"); dp = ds->ds_dir->dd_pool; @@ -1008,7 +1018,7 @@ dsl_dataset_snapshot_reserve_space(dsl_d * outside of the reservation. */ ASSERT(ds->ds_reserved == 0 || DS_UNIQUE_IS_ACCURATE(ds)); - asize = MIN(ds->ds_phys->ds_unique_bytes, ds->ds_reserved); + asize = MIN(dsl_dataset_phys(ds)->ds_unique_bytes, ds->ds_reserved); if (asize > dsl_dir_space_available(ds->ds_dir, NULL, 0, TRUE)) return (SET_ERROR(ENOSPC)); @@ -1045,7 +1055,7 @@ dsl_dataset_snapshot_check_impl(dsl_data *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:33:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE499B96; Fri, 23 Jan 2015 18:33:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A6717DBA; Fri, 23 Jan 2015 18:33:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIXpiW025267; Fri, 23 Jan 2015 18:33:51 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIXpxM025259; Fri, 23 Jan 2015 18:33:51 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231833.t0NIXpxM025259@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:33:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277586 - in stable/10: cddl/contrib/opensolaris/cmd/zdb sys/cddl/contrib/opensolaris/uts/common/fs/zfs sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:33:52 -0000 Author: delphij Date: Fri Jan 23 18:33:50 2015 New Revision: 277586 URL: https://svnweb.freebsd.org/changeset/base/277586 Log: MFC r275811: MFV r275783: Convert ARC flags to use enum. Previously, public flags are defined in arc.h and private flags are defined in arc.c which can lead to confusion and programming errors. Consistently use 'hdr' (when referencing arc_buf_hdr_t) instead of 'buf' or 'ab' because arc_buf_t are often named 'buf' as well. Illumos issue: 5369 arc flags should be an enum 5370 consistent arc_buf_hdr_t naming scheme Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/arc.h stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Jan 23 18:30:32 2015 (r277585) +++ stable/10/cddl/contrib/opensolaris/cmd/zdb/zdb.c Fri Jan 23 18:33:50 2015 (r277586) @@ -1184,7 +1184,7 @@ visit_indirect(spa_t *spa, const dnode_p print_indirect(bp, zb, dnp); if (BP_GET_LEVEL(bp) > 0 && !BP_IS_HOLE(bp)) { - uint32_t flags = ARC_WAIT; + arc_flags_t flags = ARC_FLAG_WAIT; int i; blkptr_t *cbp; int epb = BP_GET_LSIZE(bp) >> SPA_BLKPTRSHIFT; Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jan 23 18:30:32 2015 (r277585) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c Fri Jan 23 18:33:50 2015 (r277586) @@ -616,7 +616,7 @@ struct arc_buf_hdr { arc_buf_hdr_t *b_hash_next; arc_buf_t *b_buf; - uint32_t b_flags; + arc_flags_t b_flags; uint32_t b_datacnt; arc_callback_t *b_acb; @@ -664,52 +664,26 @@ sysctl_vfs_zfs_arc_meta_limit(SYSCTL_HAN static arc_buf_t *arc_eviction_list; static kmutex_t arc_eviction_mtx; static arc_buf_hdr_t arc_eviction_hdr; -static void arc_get_data_buf(arc_buf_t *buf); -static void arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock); -static int arc_evict_needed(arc_buf_contents_t type); -static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes); -#ifdef illumos -static void arc_buf_watch(arc_buf_t *buf); -#endif /* illumos */ - -static boolean_t l2arc_write_eligible(uint64_t spa_guid, arc_buf_hdr_t *ab); #define GHOST_STATE(state) \ ((state) == arc_mru_ghost || (state) == arc_mfu_ghost || \ (state) == arc_l2c_only) -/* - * Private ARC flags. These flags are private ARC only flags that will show up - * in b_flags in the arc_hdr_buf_t. Some flags are publicly declared, and can - * be passed in as arc_flags in things like arc_read. However, these flags - * should never be passed and should only be set by ARC code. When adding new - * public flags, make sure not to smash the private ones. - */ - -#define ARC_IN_HASH_TABLE (1 << 9) /* this buffer is hashed */ -#define ARC_IO_IN_PROGRESS (1 << 10) /* I/O in progress for buf */ -#define ARC_IO_ERROR (1 << 11) /* I/O failed for buf */ -#define ARC_FREED_IN_READ (1 << 12) /* buf freed while in read */ -#define ARC_BUF_AVAILABLE (1 << 13) /* block not in active use */ -#define ARC_INDIRECT (1 << 14) /* this is an indirect block */ -#define ARC_FREE_IN_PROGRESS (1 << 15) /* hdr about to be freed */ -#define ARC_L2_WRITING (1 << 16) /* L2ARC write in progress */ -#define ARC_L2_EVICTED (1 << 17) /* evicted during I/O */ -#define ARC_L2_WRITE_HEAD (1 << 18) /* head of write list */ - -#define HDR_IN_HASH_TABLE(hdr) ((hdr)->b_flags & ARC_IN_HASH_TABLE) -#define HDR_IO_IN_PROGRESS(hdr) ((hdr)->b_flags & ARC_IO_IN_PROGRESS) -#define HDR_IO_ERROR(hdr) ((hdr)->b_flags & ARC_IO_ERROR) -#define HDR_PREFETCH(hdr) ((hdr)->b_flags & ARC_PREFETCH) -#define HDR_FREED_IN_READ(hdr) ((hdr)->b_flags & ARC_FREED_IN_READ) -#define HDR_BUF_AVAILABLE(hdr) ((hdr)->b_flags & ARC_BUF_AVAILABLE) -#define HDR_FREE_IN_PROGRESS(hdr) ((hdr)->b_flags & ARC_FREE_IN_PROGRESS) -#define HDR_L2CACHE(hdr) ((hdr)->b_flags & ARC_L2CACHE) -#define HDR_L2_READING(hdr) ((hdr)->b_flags & ARC_IO_IN_PROGRESS && \ - (hdr)->b_l2hdr != NULL) -#define HDR_L2_WRITING(hdr) ((hdr)->b_flags & ARC_L2_WRITING) -#define HDR_L2_EVICTED(hdr) ((hdr)->b_flags & ARC_L2_EVICTED) -#define HDR_L2_WRITE_HEAD(hdr) ((hdr)->b_flags & ARC_L2_WRITE_HEAD) +#define HDR_IN_HASH_TABLE(hdr) ((hdr)->b_flags & ARC_FLAG_IN_HASH_TABLE) +#define HDR_IO_IN_PROGRESS(hdr) ((hdr)->b_flags & ARC_FLAG_IO_IN_PROGRESS) +#define HDR_IO_ERROR(hdr) ((hdr)->b_flags & ARC_FLAG_IO_ERROR) +#define HDR_PREFETCH(hdr) ((hdr)->b_flags & ARC_FLAG_PREFETCH) +#define HDR_FREED_IN_READ(hdr) ((hdr)->b_flags & ARC_FLAG_FREED_IN_READ) +#define HDR_BUF_AVAILABLE(hdr) ((hdr)->b_flags & ARC_FLAG_BUF_AVAILABLE) +#define HDR_FREE_IN_PROGRESS(hdr) \ + ((hdr)->b_flags & ARC_FLAG_FREE_IN_PROGRESS) +#define HDR_L2CACHE(hdr) ((hdr)->b_flags & ARC_FLAG_L2CACHE) +#define HDR_L2_READING(hdr) \ + ((hdr)->b_flags & ARC_FLAG_IO_IN_PROGRESS && \ + (hdr)->b_l2hdr != NULL) +#define HDR_L2_WRITING(hdr) ((hdr)->b_flags & ARC_FLAG_L2_WRITING) +#define HDR_L2_EVICTED(hdr) ((hdr)->b_flags & ARC_FLAG_L2_EVICTED) +#define HDR_L2_WRITE_HEAD(hdr) ((hdr)->b_flags & ARC_FLAG_L2_WRITE_HEAD) /* * Other sizes @@ -901,14 +875,20 @@ static kmutex_t l2arc_feed_thr_lock; static kcondvar_t l2arc_feed_thr_cv; static uint8_t l2arc_thread_exit; -static void l2arc_read_done(zio_t *zio); +static void arc_get_data_buf(arc_buf_t *); +static void arc_access(arc_buf_hdr_t *, kmutex_t *); +static int arc_evict_needed(arc_buf_contents_t); +static void arc_evict_ghost(arc_state_t *, uint64_t, int64_t); +static void arc_buf_watch(arc_buf_t *); + +static boolean_t l2arc_write_eligible(uint64_t, arc_buf_hdr_t *); +static void l2arc_read_done(zio_t *); static void l2arc_hdr_stat_add(void); static void l2arc_hdr_stat_remove(void); -static boolean_t l2arc_compress_buf(l2arc_buf_hdr_t *l2hdr); -static void l2arc_decompress_zio(zio_t *zio, arc_buf_hdr_t *hdr, - enum zio_compress c); -static void l2arc_release_cdata_buf(arc_buf_hdr_t *ab); +static boolean_t l2arc_compress_buf(l2arc_buf_hdr_t *); +static void l2arc_decompress_zio(zio_t *, arc_buf_hdr_t *, enum zio_compress); +static void l2arc_release_cdata_buf(arc_buf_hdr_t *); static uint64_t buf_hash(uint64_t spa, const dva_t *dva, uint64_t birth) @@ -953,14 +933,14 @@ buf_hash_find(uint64_t spa, const blkptr uint64_t birth = BP_PHYSICAL_BIRTH(bp); uint64_t idx = BUF_HASH_INDEX(spa, dva, birth); kmutex_t *hash_lock = BUF_HASH_LOCK(idx); - arc_buf_hdr_t *buf; + arc_buf_hdr_t *hdr; mutex_enter(hash_lock); - for (buf = buf_hash_table.ht_table[idx]; buf != NULL; - buf = buf->b_hash_next) { - if (BUF_EQUAL(spa, dva, birth, buf)) { + for (hdr = buf_hash_table.ht_table[idx]; hdr != NULL; + hdr = hdr->b_hash_next) { + if (BUF_EQUAL(spa, dva, birth, hdr)) { *lockp = hash_lock; - return (buf); + return (hdr); } } mutex_exit(hash_lock); @@ -975,27 +955,27 @@ buf_hash_find(uint64_t spa, const blkptr * Otherwise returns NULL. */ static arc_buf_hdr_t * -buf_hash_insert(arc_buf_hdr_t *buf, kmutex_t **lockp) +buf_hash_insert(arc_buf_hdr_t *hdr, kmutex_t **lockp) { - uint64_t idx = BUF_HASH_INDEX(buf->b_spa, &buf->b_dva, buf->b_birth); + uint64_t idx = BUF_HASH_INDEX(hdr->b_spa, &hdr->b_dva, hdr->b_birth); kmutex_t *hash_lock = BUF_HASH_LOCK(idx); - arc_buf_hdr_t *fbuf; + arc_buf_hdr_t *fhdr; uint32_t i; - ASSERT(!DVA_IS_EMPTY(&buf->b_dva)); - ASSERT(buf->b_birth != 0); - ASSERT(!HDR_IN_HASH_TABLE(buf)); + ASSERT(!DVA_IS_EMPTY(&hdr->b_dva)); + ASSERT(hdr->b_birth != 0); + ASSERT(!HDR_IN_HASH_TABLE(hdr)); *lockp = hash_lock; mutex_enter(hash_lock); - for (fbuf = buf_hash_table.ht_table[idx], i = 0; fbuf != NULL; - fbuf = fbuf->b_hash_next, i++) { - if (BUF_EQUAL(buf->b_spa, &buf->b_dva, buf->b_birth, fbuf)) - return (fbuf); + for (fhdr = buf_hash_table.ht_table[idx], i = 0; fhdr != NULL; + fhdr = fhdr->b_hash_next, i++) { + if (BUF_EQUAL(hdr->b_spa, &hdr->b_dva, hdr->b_birth, fhdr)) + return (fhdr); } - buf->b_hash_next = buf_hash_table.ht_table[idx]; - buf_hash_table.ht_table[idx] = buf; - buf->b_flags |= ARC_IN_HASH_TABLE; + hdr->b_hash_next = buf_hash_table.ht_table[idx]; + buf_hash_table.ht_table[idx] = hdr; + hdr->b_flags |= ARC_FLAG_IN_HASH_TABLE; /* collect some hash table performance data */ if (i > 0) { @@ -1013,22 +993,22 @@ buf_hash_insert(arc_buf_hdr_t *buf, kmut } static void -buf_hash_remove(arc_buf_hdr_t *buf) +buf_hash_remove(arc_buf_hdr_t *hdr) { - arc_buf_hdr_t *fbuf, **bufp; - uint64_t idx = BUF_HASH_INDEX(buf->b_spa, &buf->b_dva, buf->b_birth); + arc_buf_hdr_t *fhdr, **hdrp; + uint64_t idx = BUF_HASH_INDEX(hdr->b_spa, &hdr->b_dva, hdr->b_birth); ASSERT(MUTEX_HELD(BUF_HASH_LOCK(idx))); - ASSERT(HDR_IN_HASH_TABLE(buf)); + ASSERT(HDR_IN_HASH_TABLE(hdr)); - bufp = &buf_hash_table.ht_table[idx]; - while ((fbuf = *bufp) != buf) { - ASSERT(fbuf != NULL); - bufp = &fbuf->b_hash_next; - } - *bufp = buf->b_hash_next; - buf->b_hash_next = NULL; - buf->b_flags &= ~ARC_IN_HASH_TABLE; + hdrp = &buf_hash_table.ht_table[idx]; + while ((fhdr = *hdrp) != hdr) { + ASSERT(fhdr != NULL); + hdrp = &fhdr->b_hash_next; + } + *hdrp = hdr->b_hash_next; + hdr->b_hash_next = NULL; + hdr->b_flags &= ~ARC_FLAG_IN_HASH_TABLE; /* collect some hash table performance data */ ARCSTAT_BUMPDOWN(arcstat_hash_elements); @@ -1065,12 +1045,12 @@ buf_fini(void) static int hdr_cons(void *vbuf, void *unused, int kmflag) { - arc_buf_hdr_t *buf = vbuf; + arc_buf_hdr_t *hdr = vbuf; - bzero(buf, sizeof (arc_buf_hdr_t)); - refcount_create(&buf->b_refcnt); - cv_init(&buf->b_cv, NULL, CV_DEFAULT, NULL); - mutex_init(&buf->b_freeze_lock, NULL, MUTEX_DEFAULT, NULL); + bzero(hdr, sizeof (arc_buf_hdr_t)); + refcount_create(&hdr->b_refcnt); + cv_init(&hdr->b_cv, NULL, CV_DEFAULT, NULL); + mutex_init(&hdr->b_freeze_lock, NULL, MUTEX_DEFAULT, NULL); arc_space_consume(sizeof (arc_buf_hdr_t), ARC_SPACE_HDRS); return (0); @@ -1097,12 +1077,12 @@ buf_cons(void *vbuf, void *unused, int k static void hdr_dest(void *vbuf, void *unused) { - arc_buf_hdr_t *buf = vbuf; + arc_buf_hdr_t *hdr = vbuf; - ASSERT(BUF_EMPTY(buf)); - refcount_destroy(&buf->b_refcnt); - cv_destroy(&buf->b_cv); - mutex_destroy(&buf->b_freeze_lock); + ASSERT(BUF_EMPTY(hdr)); + refcount_destroy(&hdr->b_refcnt); + cv_destroy(&hdr->b_cv); + mutex_destroy(&hdr->b_freeze_lock); arc_space_return(sizeof (arc_buf_hdr_t), ARC_SPACE_HDRS); } @@ -1184,7 +1164,7 @@ arc_cksum_verify(arc_buf_t *buf) mutex_enter(&buf->b_hdr->b_freeze_lock); if (buf->b_hdr->b_freeze_cksum == NULL || - (buf->b_hdr->b_flags & ARC_IO_ERROR)) { + (buf->b_hdr->b_flags & ARC_FLAG_IO_ERROR)) { mutex_exit(&buf->b_hdr->b_freeze_lock); return; } @@ -1279,7 +1259,7 @@ arc_buf_thaw(arc_buf_t *buf) if (zfs_flags & ZFS_DEBUG_MODIFY) { if (buf->b_hdr->b_state != arc_anon) panic("modifying non-anon buffer!"); - if (buf->b_hdr->b_flags & ARC_IO_IN_PROGRESS) + if (buf->b_hdr->b_flags & ARC_FLAG_IO_IN_PROGRESS) panic("modifying buffer while i/o in progress!"); arc_cksum_verify(buf); } @@ -1322,11 +1302,11 @@ arc_buf_freeze(arc_buf_t *buf) } static void -get_buf_info(arc_buf_hdr_t *ab, arc_state_t *state, list_t **list, kmutex_t **lock) +get_buf_info(arc_buf_hdr_t *hdr, arc_state_t *state, list_t **list, kmutex_t **lock) { - uint64_t buf_hashid = buf_hash(ab->b_spa, &ab->b_dva, ab->b_birth); + uint64_t buf_hashid = buf_hash(hdr->b_spa, &hdr->b_dva, hdr->b_birth); - if (ab->b_type == ARC_BUFC_METADATA) + if (hdr->b_type == ARC_BUFC_METADATA) buf_hashid &= (ARC_BUFC_NUMMETADATALISTS - 1); else { buf_hashid &= (ARC_BUFC_NUMDATALISTS - 1); @@ -1339,59 +1319,59 @@ get_buf_info(arc_buf_hdr_t *ab, arc_stat static void -add_reference(arc_buf_hdr_t *ab, kmutex_t *hash_lock, void *tag) +add_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, void *tag) { ASSERT(MUTEX_HELD(hash_lock)); - if ((refcount_add(&ab->b_refcnt, tag) == 1) && - (ab->b_state != arc_anon)) { - uint64_t delta = ab->b_size * ab->b_datacnt; - uint64_t *size = &ab->b_state->arcs_lsize[ab->b_type]; + if ((refcount_add(&hdr->b_refcnt, tag) == 1) && + (hdr->b_state != arc_anon)) { + uint64_t delta = hdr->b_size * hdr->b_datacnt; + uint64_t *size = &hdr->b_state->arcs_lsize[hdr->b_type]; list_t *list; kmutex_t *lock; - get_buf_info(ab, ab->b_state, &list, &lock); + get_buf_info(hdr, hdr->b_state, &list, &lock); ASSERT(!MUTEX_HELD(lock)); mutex_enter(lock); - ASSERT(list_link_active(&ab->b_arc_node)); - list_remove(list, ab); - if (GHOST_STATE(ab->b_state)) { - ASSERT0(ab->b_datacnt); - ASSERT3P(ab->b_buf, ==, NULL); - delta = ab->b_size; + ASSERT(list_link_active(&hdr->b_arc_node)); + list_remove(list, hdr); + if (GHOST_STATE(hdr->b_state)) { + ASSERT0(hdr->b_datacnt); + ASSERT3P(hdr->b_buf, ==, NULL); + delta = hdr->b_size; } ASSERT(delta > 0); ASSERT3U(*size, >=, delta); atomic_add_64(size, -delta); mutex_exit(lock); /* remove the prefetch flag if we get a reference */ - if (ab->b_flags & ARC_PREFETCH) - ab->b_flags &= ~ARC_PREFETCH; + if (hdr->b_flags & ARC_FLAG_PREFETCH) + hdr->b_flags &= ~ARC_FLAG_PREFETCH; } } static int -remove_reference(arc_buf_hdr_t *ab, kmutex_t *hash_lock, void *tag) +remove_reference(arc_buf_hdr_t *hdr, kmutex_t *hash_lock, void *tag) { int cnt; - arc_state_t *state = ab->b_state; + arc_state_t *state = hdr->b_state; ASSERT(state == arc_anon || MUTEX_HELD(hash_lock)); ASSERT(!GHOST_STATE(state)); - if (((cnt = refcount_remove(&ab->b_refcnt, tag)) == 0) && + if (((cnt = refcount_remove(&hdr->b_refcnt, tag)) == 0) && (state != arc_anon)) { - uint64_t *size = &state->arcs_lsize[ab->b_type]; + uint64_t *size = &state->arcs_lsize[hdr->b_type]; list_t *list; kmutex_t *lock; - get_buf_info(ab, state, &list, &lock); + get_buf_info(hdr, state, &list, &lock); ASSERT(!MUTEX_HELD(lock)); mutex_enter(lock); - ASSERT(!list_link_active(&ab->b_arc_node)); - list_insert_head(list, ab); - ASSERT(ab->b_datacnt > 0); - atomic_add_64(size, ab->b_size * ab->b_datacnt); + ASSERT(!list_link_active(&hdr->b_arc_node)); + list_insert_head(list, hdr); + ASSERT(hdr->b_datacnt > 0); + atomic_add_64(size, hdr->b_size * hdr->b_datacnt); mutex_exit(lock); } return (cnt); @@ -1402,21 +1382,22 @@ remove_reference(arc_buf_hdr_t *ab, kmut * for the buffer must be held by the caller. */ static void -arc_change_state(arc_state_t *new_state, arc_buf_hdr_t *ab, kmutex_t *hash_lock) +arc_change_state(arc_state_t *new_state, arc_buf_hdr_t *hdr, + kmutex_t *hash_lock) { - arc_state_t *old_state = ab->b_state; - int64_t refcnt = refcount_count(&ab->b_refcnt); + arc_state_t *old_state = hdr->b_state; + int64_t refcnt = refcount_count(&hdr->b_refcnt); uint64_t from_delta, to_delta; list_t *list; kmutex_t *lock; ASSERT(MUTEX_HELD(hash_lock)); ASSERT3P(new_state, !=, old_state); - ASSERT(refcnt == 0 || ab->b_datacnt > 0); - ASSERT(ab->b_datacnt == 0 || !GHOST_STATE(new_state)); - ASSERT(ab->b_datacnt <= 1 || old_state != arc_anon); + ASSERT(refcnt == 0 || hdr->b_datacnt > 0); + ASSERT(hdr->b_datacnt == 0 || !GHOST_STATE(new_state)); + ASSERT(hdr->b_datacnt <= 1 || old_state != arc_anon); - from_delta = to_delta = ab->b_datacnt * ab->b_size; + from_delta = to_delta = hdr->b_datacnt * hdr->b_size; /* * If this buffer is evictable, transfer it from the @@ -1425,24 +1406,24 @@ arc_change_state(arc_state_t *new_state, if (refcnt == 0) { if (old_state != arc_anon) { int use_mutex; - uint64_t *size = &old_state->arcs_lsize[ab->b_type]; + uint64_t *size = &old_state->arcs_lsize[hdr->b_type]; - get_buf_info(ab, old_state, &list, &lock); + get_buf_info(hdr, old_state, &list, &lock); use_mutex = !MUTEX_HELD(lock); if (use_mutex) mutex_enter(lock); - ASSERT(list_link_active(&ab->b_arc_node)); - list_remove(list, ab); + ASSERT(list_link_active(&hdr->b_arc_node)); + list_remove(list, hdr); /* * If prefetching out of the ghost cache, * we will have a non-zero datacnt. */ - if (GHOST_STATE(old_state) && ab->b_datacnt == 0) { + if (GHOST_STATE(old_state) && hdr->b_datacnt == 0) { /* ghost elements have a ghost size */ - ASSERT(ab->b_buf == NULL); - from_delta = ab->b_size; + ASSERT(hdr->b_buf == NULL); + from_delta = hdr->b_size; } ASSERT3U(*size, >=, from_delta); atomic_add_64(size, -from_delta); @@ -1452,20 +1433,20 @@ arc_change_state(arc_state_t *new_state, } if (new_state != arc_anon) { int use_mutex; - uint64_t *size = &new_state->arcs_lsize[ab->b_type]; + uint64_t *size = &new_state->arcs_lsize[hdr->b_type]; - get_buf_info(ab, new_state, &list, &lock); + get_buf_info(hdr, new_state, &list, &lock); use_mutex = !MUTEX_HELD(lock); if (use_mutex) mutex_enter(lock); - list_insert_head(list, ab); + list_insert_head(list, hdr); /* ghost elements have a ghost size */ if (GHOST_STATE(new_state)) { - ASSERT(ab->b_datacnt == 0); - ASSERT(ab->b_buf == NULL); - to_delta = ab->b_size; + ASSERT(hdr->b_datacnt == 0); + ASSERT(hdr->b_buf == NULL); + to_delta = hdr->b_size; } atomic_add_64(size, to_delta); @@ -1474,9 +1455,9 @@ arc_change_state(arc_state_t *new_state, } } - ASSERT(!BUF_EMPTY(ab)); - if (new_state == arc_anon && HDR_IN_HASH_TABLE(ab)) - buf_hash_remove(ab); + ASSERT(!BUF_EMPTY(hdr)); + if (new_state == arc_anon && HDR_IN_HASH_TABLE(hdr)) + buf_hash_remove(hdr); /* adjust state sizes */ if (to_delta) @@ -1485,7 +1466,7 @@ arc_change_state(arc_state_t *new_state, ASSERT3U(old_state->arcs_size, >=, from_delta); atomic_add_64(&old_state->arcs_size, -from_delta); } - ab->b_state = new_state; + hdr->b_state = new_state; /* adjust l2arc hdr stats */ if (new_state == arc_l2c_only) @@ -1687,7 +1668,7 @@ arc_buf_add_ref(arc_buf_t *buf, void* ta arc_access(hdr, hash_lock); mutex_exit(hash_lock); ARCSTAT_BUMP(arcstat_hits); - ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_PREFETCH), + ARCSTAT_CONDSTAT(!(hdr->b_flags & ARC_FLAG_PREFETCH), demand, prefetch, hdr->b_type != ARC_BUFC_METADATA, data, metadata, hits); } @@ -1918,7 +1899,7 @@ arc_buf_free(arc_buf_t *buf, void *tag) } else { ASSERT(buf == hdr->b_buf); ASSERT(buf->b_efunc == NULL); - hdr->b_flags |= ARC_BUF_AVAILABLE; + hdr->b_flags |= ARC_FLAG_BUF_AVAILABLE; } mutex_exit(hash_lock); } else if (HDR_IO_IN_PROGRESS(hdr)) { @@ -1969,7 +1950,7 @@ arc_buf_remove_ref(arc_buf_t *buf, void* } else if (no_callback) { ASSERT(hdr->b_buf == buf && buf->b_next == NULL); ASSERT(buf->b_efunc == NULL); - hdr->b_flags |= ARC_BUF_AVAILABLE; + hdr->b_flags |= ARC_FLAG_BUF_AVAILABLE; } ASSERT(no_callback || hdr->b_datacnt > 1 || refcount_is_zero(&hdr->b_refcnt)); @@ -2045,7 +2026,7 @@ arc_evict(arc_state_t *state, uint64_t s arc_state_t *evicted_state; uint64_t bytes_evicted = 0, skipped = 0, missed = 0; int64_t bytes_remaining; - arc_buf_hdr_t *ab, *ab_prev = NULL; + arc_buf_hdr_t *hdr, *hdr_prev = NULL; list_t *evicted_list, *list, *evicted_list_start, *list_start; kmutex_t *lock, *evicted_lock; kmutex_t *hash_lock; @@ -2085,25 +2066,25 @@ evict_start: mutex_enter(lock); mutex_enter(evicted_lock); - for (ab = list_tail(list); ab; ab = ab_prev) { - ab_prev = list_prev(list, ab); - bytes_remaining -= (ab->b_size * ab->b_datacnt); + for (hdr = list_tail(list); hdr; hdr = hdr_prev) { + hdr_prev = list_prev(list, hdr); + bytes_remaining -= (hdr->b_size * hdr->b_datacnt); /* prefetch buffers have a minimum lifespan */ - if (HDR_IO_IN_PROGRESS(ab) || - (spa && ab->b_spa != spa) || - (ab->b_flags & (ARC_PREFETCH|ARC_INDIRECT) && - ddi_get_lbolt() - ab->b_arc_access < + if (HDR_IO_IN_PROGRESS(hdr) || + (spa && hdr->b_spa != spa) || + (hdr->b_flags & (ARC_FLAG_PREFETCH | ARC_FLAG_INDIRECT) && + ddi_get_lbolt() - hdr->b_arc_access < arc_min_prefetch_lifespan)) { skipped++; continue; } /* "lookahead" for better eviction candidate */ - if (recycle && ab->b_size != bytes && - ab_prev && ab_prev->b_size == bytes) + if (recycle && hdr->b_size != bytes && + hdr_prev && hdr_prev->b_size == bytes) continue; /* ignore markers */ - if (ab->b_spa == 0) + if (hdr->b_spa == 0) continue; /* @@ -2116,34 +2097,34 @@ evict_start: * the hot code path, so don't sleep. */ if (!recycle && count++ > arc_evict_iterations) { - list_insert_after(list, ab, &marker); + list_insert_after(list, hdr, &marker); mutex_exit(evicted_lock); mutex_exit(lock); kpreempt(KPREEMPT_SYNC); mutex_enter(lock); mutex_enter(evicted_lock); - ab_prev = list_prev(list, &marker); + hdr_prev = list_prev(list, &marker); list_remove(list, &marker); count = 0; continue; } - hash_lock = HDR_LOCK(ab); + hash_lock = HDR_LOCK(hdr); have_lock = MUTEX_HELD(hash_lock); if (have_lock || mutex_tryenter(hash_lock)) { - ASSERT0(refcount_count(&ab->b_refcnt)); - ASSERT(ab->b_datacnt > 0); - while (ab->b_buf) { - arc_buf_t *buf = ab->b_buf; + ASSERT0(refcount_count(&hdr->b_refcnt)); + ASSERT(hdr->b_datacnt > 0); + while (hdr->b_buf) { + arc_buf_t *buf = hdr->b_buf; if (!mutex_tryenter(&buf->b_evict_lock)) { missed += 1; break; } if (buf->b_data) { - bytes_evicted += ab->b_size; - if (recycle && ab->b_type == type && - ab->b_size == bytes && - !HDR_L2_WRITING(ab)) { + bytes_evicted += hdr->b_size; + if (recycle && hdr->b_type == type && + hdr->b_size == bytes && + !HDR_L2_WRITING(hdr)) { stolen = buf->b_data; recycle = FALSE; } @@ -2152,7 +2133,7 @@ evict_start: mutex_enter(&arc_eviction_mtx); arc_buf_destroy(buf, buf->b_data == stolen, FALSE); - ab->b_buf = buf->b_next; + hdr->b_buf = buf->b_next; buf->b_hdr = &arc_eviction_hdr; buf->b_next = arc_eviction_list; arc_eviction_list = buf; @@ -2165,26 +2146,26 @@ evict_start: } } - if (ab->b_l2hdr) { + if (hdr->b_l2hdr) { ARCSTAT_INCR(arcstat_evict_l2_cached, - ab->b_size); + hdr->b_size); } else { - if (l2arc_write_eligible(ab->b_spa, ab)) { + if (l2arc_write_eligible(hdr->b_spa, hdr)) { ARCSTAT_INCR(arcstat_evict_l2_eligible, - ab->b_size); + hdr->b_size); } else { ARCSTAT_INCR( arcstat_evict_l2_ineligible, - ab->b_size); + hdr->b_size); } } - if (ab->b_datacnt == 0) { - arc_change_state(evicted_state, ab, hash_lock); - ASSERT(HDR_IN_HASH_TABLE(ab)); - ab->b_flags |= ARC_IN_HASH_TABLE; - ab->b_flags &= ~ARC_BUF_AVAILABLE; - DTRACE_PROBE1(arc__evict, arc_buf_hdr_t *, ab); + if (hdr->b_datacnt == 0) { + arc_change_state(evicted_state, hdr, hash_lock); + ASSERT(HDR_IN_HASH_TABLE(hdr)); + hdr->b_flags |= ARC_FLAG_IN_HASH_TABLE; + hdr->b_flags &= ~ARC_FLAG_BUF_AVAILABLE; + DTRACE_PROBE1(arc__evict, arc_buf_hdr_t *, hdr); } if (!have_lock) mutex_exit(hash_lock); @@ -2245,7 +2226,7 @@ evict_start: static void arc_evict_ghost(arc_state_t *state, uint64_t spa, int64_t bytes) { - arc_buf_hdr_t *ab, *ab_prev; + arc_buf_hdr_t *hdr, *hdr_prev; arc_buf_hdr_t marker = { 0 }; list_t *list, *list_start; kmutex_t *hash_lock, *lock; @@ -2270,18 +2251,18 @@ evict_start: lock = ARCS_LOCK(state, idx + offset); mutex_enter(lock); - for (ab = list_tail(list); ab; ab = ab_prev) { - ab_prev = list_prev(list, ab); - if (ab->b_type > ARC_BUFC_NUMTYPES) - panic("invalid ab=%p", (void *)ab); - if (spa && ab->b_spa != spa) + for (hdr = list_tail(list); hdr; hdr = hdr_prev) { + hdr_prev = list_prev(list, hdr); + if (hdr->b_type > ARC_BUFC_NUMTYPES) + panic("invalid hdr=%p", (void *)hdr); + if (spa && hdr->b_spa != spa) continue; /* ignore markers */ - if (ab->b_spa == 0) + if (hdr->b_spa == 0) continue; - hash_lock = HDR_LOCK(ab); + hash_lock = HDR_LOCK(hdr); /* caller may be trying to modify this buffer, skip it */ if (MUTEX_HELD(hash_lock)) continue; @@ -2293,35 +2274,35 @@ evict_start: * before reacquiring the lock. */ if (count++ > arc_evict_iterations) { - list_insert_after(list, ab, &marker); + list_insert_after(list, hdr, &marker); mutex_exit(lock); kpreempt(KPREEMPT_SYNC); mutex_enter(lock); - ab_prev = list_prev(list, &marker); + hdr_prev = list_prev(list, &marker); list_remove(list, &marker); count = 0; continue; } if (mutex_tryenter(hash_lock)) { - ASSERT(!HDR_IO_IN_PROGRESS(ab)); - ASSERT(ab->b_buf == NULL); + ASSERT(!HDR_IO_IN_PROGRESS(hdr)); + ASSERT(hdr->b_buf == NULL); ARCSTAT_BUMP(arcstat_deleted); - bytes_deleted += ab->b_size; + bytes_deleted += hdr->b_size; - if (ab->b_l2hdr != NULL) { + if (hdr->b_l2hdr != NULL) { /* * This buffer is cached on the 2nd Level ARC; * don't destroy the header. */ - arc_change_state(arc_l2c_only, ab, hash_lock); + arc_change_state(arc_l2c_only, hdr, hash_lock); mutex_exit(hash_lock); } else { - arc_change_state(arc_anon, ab, hash_lock); + arc_change_state(arc_anon, hdr, hash_lock); mutex_exit(hash_lock); - arc_hdr_destroy(ab); + arc_hdr_destroy(hdr); } - DTRACE_PROBE1(arc__delete, arc_buf_hdr_t *, ab); + DTRACE_PROBE1(arc__delete, arc_buf_hdr_t *, hdr); if (bytes >= 0 && bytes_deleted >= bytes) break; } else if (bytes < 0) { @@ -2330,12 +2311,12 @@ evict_start: * hash lock to become available. Once its * available, restart from where we left off. */ - list_insert_after(list, ab, &marker); + list_insert_after(list, hdr, &marker); mutex_exit(lock); mutex_enter(hash_lock); mutex_exit(hash_lock); mutex_enter(lock); - ab_prev = list_prev(list, &marker); + hdr_prev = list_prev(list, &marker); list_remove(list, &marker); } else { bufs_skipped += 1; @@ -2920,7 +2901,8 @@ arc_get_data_buf(arc_buf_t *buf) * will end up on the mru list; so steal space from there. */ if (state == arc_mfu_ghost) - state = buf->b_hdr->b_flags & ARC_PREFETCH ? arc_mru : arc_mfu; + state = buf->b_hdr->b_flags & ARC_FLAG_PREFETCH ? + arc_mru : arc_mfu; else if (state == arc_mru_ghost) state = arc_mru; @@ -2976,25 +2958,25 @@ out: * NOTE: the hash lock is dropped in this function. */ static void -arc_access(arc_buf_hdr_t *buf, kmutex_t *hash_lock) +arc_access(arc_buf_hdr_t *hdr, kmutex_t *hash_lock) { clock_t now; ASSERT(MUTEX_HELD(hash_lock)); - if (buf->b_state == arc_anon) { + if (hdr->b_state == arc_anon) { /* * This buffer is not in the cache, and does not * appear in our "ghost" list. Add the new buffer * to the MRU state. */ - ASSERT(buf->b_arc_access == 0); - buf->b_arc_access = ddi_get_lbolt(); - DTRACE_PROBE1(new_state__mru, arc_buf_hdr_t *, buf); - arc_change_state(arc_mru, buf, hash_lock); + ASSERT(hdr->b_arc_access == 0); + hdr->b_arc_access = ddi_get_lbolt(); + DTRACE_PROBE1(new_state__mru, arc_buf_hdr_t *, hdr); + arc_change_state(arc_mru, hdr, hash_lock); - } else if (buf->b_state == arc_mru) { + } else if (hdr->b_state == arc_mru) { now = ddi_get_lbolt(); /* @@ -3005,14 +2987,14 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t * - move the buffer to the head of the list if this is * another prefetch (to make it less likely to be evicted). */ - if ((buf->b_flags & ARC_PREFETCH) != 0) { - if (refcount_count(&buf->b_refcnt) == 0) { - ASSERT(list_link_active(&buf->b_arc_node)); + if ((hdr->b_flags & ARC_FLAG_PREFETCH) != 0) { + if (refcount_count(&hdr->b_refcnt) == 0) { + ASSERT(list_link_active(&hdr->b_arc_node)); } else { - buf->b_flags &= ~ARC_PREFETCH; + hdr->b_flags &= ~ARC_FLAG_PREFETCH; ARCSTAT_BUMP(arcstat_mru_hits); } - buf->b_arc_access = now; + hdr->b_arc_access = now; return; } @@ -3021,18 +3003,18 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t * but it is still in the cache. Move it to the MFU * state. */ - if (now > buf->b_arc_access + ARC_MINTIME) { + if (now > hdr->b_arc_access + ARC_MINTIME) { /* * More than 125ms have passed since we * instantiated this buffer. Move it to the * most frequently used state. */ - buf->b_arc_access = now; - DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, buf); - arc_change_state(arc_mfu, buf, hash_lock); + hdr->b_arc_access = now; + DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, hdr); + arc_change_state(arc_mfu, hdr, hash_lock); } ARCSTAT_BUMP(arcstat_mru_hits); - } else if (buf->b_state == arc_mru_ghost) { + } else if (hdr->b_state == arc_mru_ghost) { arc_state_t *new_state; /* * This buffer has been "accessed" recently, but @@ -3040,21 +3022,21 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t * MFU state. */ - if (buf->b_flags & ARC_PREFETCH) { + if (hdr->b_flags & ARC_FLAG_PREFETCH) { new_state = arc_mru; - if (refcount_count(&buf->b_refcnt) > 0) - buf->b_flags &= ~ARC_PREFETCH; - DTRACE_PROBE1(new_state__mru, arc_buf_hdr_t *, buf); + if (refcount_count(&hdr->b_refcnt) > 0) + hdr->b_flags &= ~ARC_FLAG_PREFETCH; + DTRACE_PROBE1(new_state__mru, arc_buf_hdr_t *, hdr); } else { new_state = arc_mfu; - DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, buf); + DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, hdr); } - buf->b_arc_access = ddi_get_lbolt(); - arc_change_state(new_state, buf, hash_lock); + hdr->b_arc_access = ddi_get_lbolt(); + arc_change_state(new_state, hdr, hash_lock); ARCSTAT_BUMP(arcstat_mru_ghost_hits); - } else if (buf->b_state == arc_mfu) { + } else if (hdr->b_state == arc_mfu) { /* * This buffer has been accessed more than once and is * still in the cache. Keep it in the MFU state. @@ -3064,13 +3046,13 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t * If it was a prefetch, we will explicitly move it to * the head of the list now. */ - if ((buf->b_flags & ARC_PREFETCH) != 0) { - ASSERT(refcount_count(&buf->b_refcnt) == 0); - ASSERT(list_link_active(&buf->b_arc_node)); + if ((hdr->b_flags & ARC_FLAG_PREFETCH) != 0) { + ASSERT(refcount_count(&hdr->b_refcnt) == 0); + ASSERT(list_link_active(&hdr->b_arc_node)); } ARCSTAT_BUMP(arcstat_mfu_hits); - buf->b_arc_access = ddi_get_lbolt(); - } else if (buf->b_state == arc_mfu_ghost) { + hdr->b_arc_access = ddi_get_lbolt(); + } else if (hdr->b_state == arc_mfu_ghost) { arc_state_t *new_state = arc_mfu; /* * This buffer has been accessed more than once but has @@ -3078,28 +3060,28 @@ arc_access(arc_buf_hdr_t *buf, kmutex_t * MFU state. */ - if (buf->b_flags & ARC_PREFETCH) { + if (hdr->b_flags & ARC_FLAG_PREFETCH) { /* * This is a prefetch access... * move this block back to the MRU state. */ - ASSERT0(refcount_count(&buf->b_refcnt)); + ASSERT0(refcount_count(&hdr->b_refcnt)); new_state = arc_mru; } - buf->b_arc_access = ddi_get_lbolt(); - DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, buf); - arc_change_state(new_state, buf, hash_lock); + hdr->b_arc_access = ddi_get_lbolt(); + DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, hdr); + arc_change_state(new_state, hdr, hash_lock); ARCSTAT_BUMP(arcstat_mfu_ghost_hits); - } else if (buf->b_state == arc_l2c_only) { + } else if (hdr->b_state == arc_l2c_only) { /* * This buffer is on the 2nd Level ARC. */ - buf->b_arc_access = ddi_get_lbolt(); - DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, buf); - arc_change_state(arc_mfu, buf, hash_lock); + hdr->b_arc_access = ddi_get_lbolt(); + DTRACE_PROBE1(new_state__mfu, arc_buf_hdr_t *, hdr); + arc_change_state(arc_mfu, hdr, hash_lock); } else { ASSERT(!"invalid arc state"); } @@ -3167,9 +3149,9 @@ arc_read_done(zio_t *zio) (found == hdr && HDR_L2_READING(hdr))); } - hdr->b_flags &= ~ARC_L2_EVICTED; - if (l2arc_noprefetch && (hdr->b_flags & ARC_PREFETCH)) - hdr->b_flags &= ~ARC_L2CACHE; + hdr->b_flags &= ~ARC_FLAG_L2_EVICTED; + if (l2arc_noprefetch && (hdr->b_flags & ARC_FLAG_PREFETCH)) + hdr->b_flags &= ~ARC_FLAG_L2CACHE; /* byteswap if necessary */ callback_list = hdr->b_acb; @@ -3211,18 +3193,18 @@ arc_read_done(zio_t *zio) } } hdr->b_acb = NULL; - hdr->b_flags &= ~ARC_IO_IN_PROGRESS; + hdr->b_flags &= ~ARC_FLAG_IO_IN_PROGRESS; ASSERT(!HDR_BUF_AVAILABLE(hdr)); if (abuf == buf) { ASSERT(buf->b_efunc == NULL); ASSERT(hdr->b_datacnt == 1); - hdr->b_flags |= ARC_BUF_AVAILABLE; + hdr->b_flags |= ARC_FLAG_BUF_AVAILABLE; } ASSERT(refcount_is_zero(&hdr->b_refcnt) || callback_list != NULL); if (zio->io_error != 0) { - hdr->b_flags |= ARC_IO_ERROR; + hdr->b_flags |= ARC_FLAG_IO_ERROR; if (hdr->b_state != arc_anon) arc_change_state(arc_anon, hdr, hash_lock); if (HDR_IN_HASH_TABLE(hdr)) @@ -3288,8 +3270,8 @@ arc_read_done(zio_t *zio) */ int arc_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, arc_done_func_t *done, - void *private, zio_priority_t priority, int zio_flags, uint32_t *arc_flags, - const zbookmark_phys_t *zb) + void *private, zio_priority_t priority, int zio_flags, + arc_flags_t *arc_flags, const zbookmark_phys_t *zb) { arc_buf_hdr_t *hdr = NULL; arc_buf_t *buf = NULL; @@ -3311,16 +3293,16 @@ top: if (hdr != NULL && hdr->b_datacnt > 0) { - *arc_flags |= ARC_CACHED; + *arc_flags |= ARC_FLAG_CACHED; if (HDR_IO_IN_PROGRESS(hdr)) { - if (*arc_flags & ARC_WAIT) { + if (*arc_flags & ARC_FLAG_WAIT) { cv_wait(&hdr->b_cv, hash_lock); mutex_exit(hash_lock); goto top; } - ASSERT(*arc_flags & ARC_NOWAIT); + ASSERT(*arc_flags & ARC_FLAG_NOWAIT); if (done) { arc_callback_t *acb = NULL; @@ -3358,24 +3340,24 @@ top: ASSERT(buf->b_data); if (HDR_BUF_AVAILABLE(hdr)) { ASSERT(buf->b_efunc == NULL); - hdr->b_flags &= ~ARC_BUF_AVAILABLE; + hdr->b_flags &= ~ARC_FLAG_BUF_AVAILABLE; } else { buf = arc_buf_clone(buf); } - } else if (*arc_flags & ARC_PREFETCH && + } else if (*arc_flags & ARC_FLAG_PREFETCH && refcount_count(&hdr->b_refcnt) == 0) { - hdr->b_flags |= ARC_PREFETCH; + hdr->b_flags |= ARC_FLAG_PREFETCH; } DTRACE_PROBE1(arc__hit, arc_buf_hdr_t *, hdr); arc_access(hdr, hash_lock); - if (*arc_flags & ARC_L2CACHE) - hdr->b_flags |= ARC_L2CACHE; - if (*arc_flags & ARC_L2COMPRESS) - hdr->b_flags |= ARC_L2COMPRESS; + if (*arc_flags & ARC_FLAG_L2CACHE) + hdr->b_flags |= ARC_FLAG_L2CACHE; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:36:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 58AC3D2C; Fri, 23 Jan 2015 18:36:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43329DE4; Fri, 23 Jan 2015 18:36:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIaMC0025651; Fri, 23 Jan 2015 18:36:22 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIaMSr025650; Fri, 23 Jan 2015 18:36:22 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231836.t0NIaMSr025650@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:36:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277587 - stable/10/cddl/contrib/opensolaris/lib/libzfs/common X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:36:22 -0000 Author: delphij Date: Fri Jan 23 18:36:21 2015 New Revision: 277587 URL: https://svnweb.freebsd.org/changeset/base/277587 Log: MFC r275812: MFV r275784: Plug a memory leak in libzfs. In zfs_iter_bookmarks, an nvlist is allocated before calling lzc_get_bookmarks, which allocates the nvlist again (and overwrites the pointer to previously allocated list). Illumos issue: 5427 memory leak in libzfs when doing rollback Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Fri Jan 23 18:33:50 2015 (r277586) +++ stable/10/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_iter.c Fri Jan 23 18:36:21 2015 (r277587) @@ -24,7 +24,7 @@ * Copyright (c) 2013 by Delphix. All rights reserved. * Copyright (c) 2012 Pawel Jakub Dawidek . * All rights reserved. - * Copyright 2013 Nexenta Systems, Inc. All rights reserved. + * Copyright 2014 Nexenta Systems, Inc. All rights reserved. */ #include @@ -193,9 +193,6 @@ zfs_iter_bookmarks(zfs_handle_t *zhp, zf fnvlist_add_boolean(props, zfs_prop_to_name(ZFS_PROP_CREATETXG)); fnvlist_add_boolean(props, zfs_prop_to_name(ZFS_PROP_CREATION)); - /* Allocate an nvlist to hold the bookmarks. */ - bmarks = fnvlist_alloc(); - if ((err = lzc_get_bookmarks(zhp->zfs_name, props, &bmarks)) != 0) goto out; From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:39:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4DB6AEC8; Fri, 23 Jan 2015 18:39:27 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EA3CE22; Fri, 23 Jan 2015 18:39:27 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIdQJQ026051; Fri, 23 Jan 2015 18:39:26 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIdQhU026050; Fri, 23 Jan 2015 18:39:26 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231839.t0NIdQhU026050@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:39:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277588 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:39:27 -0000 Author: delphij Date: Fri Jan 23 18:39:26 2015 New Revision: 277588 URL: https://svnweb.freebsd.org/changeset/base/277588 Log: MFC r275922: MFV r275914: As of r270383, the dbuf_compare comparator compares the dbuf attributes in the following order: db_level (indirect level) db_blkid (block number) db_state (current state) the address of the element Because db_state is being considered before the element's state, changing of db_state would affect balancedness of the AVL tree, even when the address of element compares differently. For instance, in dbuf_create, db_state may be altered after the node is inserted into the AVL tree and may break AVL tree balancedness. Instead of using db_state as a comparision critera (introduced in r270383), consider it only when we are doing a lookup, that is one of the two dbuf pointers contains DB_SEARCH. Illumos issue: 5422 preserve AVL invariants in dn_dbufs Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Jan 23 18:36:21 2015 (r277587) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c Fri Jan 23 18:39:26 2015 (r277588) @@ -81,16 +81,14 @@ dbuf_compare(const void *x1, const void return (1); } - if (d1->db_state < d2->db_state) { + if (d1->db_state == DB_SEARCH) { + ASSERT3S(d2->db_state, !=, DB_SEARCH); return (-1); - } - if (d1->db_state > d2->db_state) { + } else if (d2->db_state == DB_SEARCH) { + ASSERT3S(d1->db_state, !=, DB_SEARCH); return (1); } - ASSERT3S(d1->db_state, !=, DB_SEARCH); - ASSERT3S(d2->db_state, !=, DB_SEARCH); - if ((uintptr_t)d1 < (uintptr_t)d2) { return (-1); } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:40:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9DC978F; Fri, 23 Jan 2015 18:40:48 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E14AEC4; Fri, 23 Jan 2015 18:40:48 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIemKJ027202; Fri, 23 Jan 2015 18:40:48 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIelLa027132; Fri, 23 Jan 2015 18:40:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231840.t0NIelLa027132@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:40:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277589 - in stable/10/cddl: contrib/opensolaris/lib/libnvpair lib/libnvpair X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:40:48 -0000 Author: delphij Date: Fri Jan 23 18:40:47 2015 New Revision: 277589 URL: https://svnweb.freebsd.org/changeset/base/277589 Log: MFC r275552: MFV r260710 + 275532: Add a new method, nvlist_print_json to allow libnvpair to emit JSON. Added: stable/10/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c - copied unchanged from r275552, head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h stable/10/cddl/lib/libnvpair/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h ============================================================================== --- stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h Fri Jan 23 18:39:26 2015 (r277588) +++ stable/10/cddl/contrib/opensolaris/lib/libnvpair/libnvpair.h Fri Jan 23 18:40:47 2015 (r277589) @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2013, Joyent, Inc. All rights reserved. */ #ifndef _LIBNVPAIR_H @@ -46,6 +47,7 @@ extern int nvpair_value_match_regex(nvpa char **); extern void nvlist_print(FILE *, nvlist_t *); +extern int nvlist_print_json(FILE *, nvlist_t *); extern void dump_nvlist(nvlist_t *, int); /* Copied: stable/10/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c (from r275552, head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c Fri Jan 23 18:40:47 2015 (r277589, copy of r275552, head/cddl/contrib/opensolaris/lib/libnvpair/nvpair_json.c) @@ -0,0 +1,403 @@ +/* + * This file and its contents are supplied under the terms of the + * Common Development and Distribution License ("CDDL"), version 1.0. + * You may only use this file in accordance with the terms of version + * 1.0 of the CDDL. + * + * A full copy of the text of the CDDL should have accompanied this + * source. A copy of the CDDL is also available via the Internet at + * http://www.illumos.org/license/CDDL. + */ +/* + * Copyright (c) 2014, Joyent, Inc. + */ + +#include +#include +#include +#include +#include + +#include "libnvpair.h" + +#define FPRINTF(fp, ...) \ + do { \ + if (fprintf(fp, __VA_ARGS__) < 0) \ + return (-1); \ + } while (0) + +/* + * When formatting a string for JSON output we must escape certain characters, + * as described in RFC4627. This applies to both member names and + * DATA_TYPE_STRING values. + * + * This function will only operate correctly if the following conditions are + * met: + * + * 1. The input String is encoded in the current locale. + * + * 2. The current locale includes the Basic Multilingual Plane (plane 0) + * as defined in the Unicode standard. + * + * The output will be entirely 7-bit ASCII (as a subset of UTF-8) with all + * representable Unicode characters included in their escaped numeric form. + */ +static int +nvlist_print_json_string(FILE *fp, const char *input) +{ + mbstate_t mbr; + wchar_t c; + size_t sz; + + bzero(&mbr, sizeof (mbr)); + + FPRINTF(fp, "\""); + while ((sz = mbrtowc(&c, input, MB_CUR_MAX, &mbr)) > 0) { + switch (c) { + case '"': + FPRINTF(fp, "\\\""); + break; + case '\n': + FPRINTF(fp, "\\n"); + break; + case '\r': + FPRINTF(fp, "\\r"); + break; + case '\\': + FPRINTF(fp, "\\\\"); + break; + case '\f': + FPRINTF(fp, "\\f"); + break; + case '\t': + FPRINTF(fp, "\\t"); + break; + case '\b': + FPRINTF(fp, "\\b"); + break; + default: + if ((c >= 0x00 && c <= 0x1f) || + (c > 0x7f && c <= 0xffff)) { + /* + * Render both Control Characters and Unicode + * characters in the Basic Multilingual Plane + * as JSON-escaped multibyte characters. + */ + FPRINTF(fp, "\\u%04x", (int)(0xffff & c)); + } else if (c >= 0x20 && c <= 0x7f) { + /* + * Render other 7-bit ASCII characters directly + * and drop other, unrepresentable characters. + */ + FPRINTF(fp, "%c", (int)(0xff & c)); + } + break; + } + input += sz; + } + + if (sz == (size_t)-1 || sz == (size_t)-2) { + /* + * We last read an invalid multibyte character sequence, + * so return an error. + */ + return (-1); + } + + FPRINTF(fp, "\""); + return (0); +} + +/* + * Dump a JSON-formatted representation of an nvlist to the provided FILE *. + * This routine does not output any new-lines or additional whitespace other + * than that contained in strings, nor does it call fflush(3C). + */ +int +nvlist_print_json(FILE *fp, nvlist_t *nvl) +{ + nvpair_t *curr; + boolean_t first = B_TRUE; + + FPRINTF(fp, "{"); + + for (curr = nvlist_next_nvpair(nvl, NULL); curr; + curr = nvlist_next_nvpair(nvl, curr)) { + data_type_t type = nvpair_type(curr); + + if (!first) + FPRINTF(fp, ","); + else + first = B_FALSE; + + if (nvlist_print_json_string(fp, nvpair_name(curr)) == -1) + return (-1); + FPRINTF(fp, ":"); + + switch (type) { + case DATA_TYPE_STRING: { + char *string = fnvpair_value_string(curr); + if (nvlist_print_json_string(fp, string) == -1) + return (-1); + break; + } + + case DATA_TYPE_BOOLEAN: { + FPRINTF(fp, "true"); + break; + } + + case DATA_TYPE_BOOLEAN_VALUE: { + FPRINTF(fp, "%s", fnvpair_value_boolean_value(curr) == + B_TRUE ? "true" : "false"); + break; + } + + case DATA_TYPE_BYTE: { + FPRINTF(fp, "%hhu", fnvpair_value_byte(curr)); + break; + } + + case DATA_TYPE_INT8: { + FPRINTF(fp, "%hhd", fnvpair_value_int8(curr)); + break; + } + + case DATA_TYPE_UINT8: { + FPRINTF(fp, "%hhu", fnvpair_value_uint8_t(curr)); + break; + } + + case DATA_TYPE_INT16: { + FPRINTF(fp, "%hd", fnvpair_value_int16(curr)); + break; + } + + case DATA_TYPE_UINT16: { + FPRINTF(fp, "%hu", fnvpair_value_uint16(curr)); + break; + } + + case DATA_TYPE_INT32: { + FPRINTF(fp, "%d", fnvpair_value_int32(curr)); + break; + } + + case DATA_TYPE_UINT32: { + FPRINTF(fp, "%u", fnvpair_value_uint32(curr)); + break; + } + + case DATA_TYPE_INT64: { + FPRINTF(fp, "%lld", + (long long)fnvpair_value_int64(curr)); + break; + } + + case DATA_TYPE_UINT64: { + FPRINTF(fp, "%llu", + (unsigned long long)fnvpair_value_uint64(curr)); + break; + } + + case DATA_TYPE_HRTIME: { + hrtime_t val; + VERIFY0(nvpair_value_hrtime(curr, &val)); + FPRINTF(fp, "%llu", (unsigned long long)val); + break; + } + + case DATA_TYPE_DOUBLE: { + double val; + VERIFY0(nvpair_value_double(curr, &val)); + FPRINTF(fp, "%f", val); + break; + } + + case DATA_TYPE_NVLIST: { + if (nvlist_print_json(fp, + fnvpair_value_nvlist(curr)) == -1) + return (-1); + break; + } + + case DATA_TYPE_STRING_ARRAY: { + char **val; + uint_t valsz, i; + VERIFY0(nvpair_value_string_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + if (nvlist_print_json_string(fp, val[i]) == -1) + return (-1); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_NVLIST_ARRAY: { + nvlist_t **val; + uint_t valsz, i; + VERIFY0(nvpair_value_nvlist_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + if (nvlist_print_json(fp, val[i]) == -1) + return (-1); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_BOOLEAN_ARRAY: { + boolean_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_boolean_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, val[i] == B_TRUE ? + "true" : "false"); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_BYTE_ARRAY: { + uchar_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_byte_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hhu", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT8_ARRAY: { + uint8_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint8_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hhu", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT8_ARRAY: { + int8_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int8_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hhd", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT16_ARRAY: { + uint16_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint16_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hu", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT16_ARRAY: { + int16_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int16_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%hd", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT32_ARRAY: { + uint32_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint32_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%u", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT32_ARRAY: { + int32_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int32_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%d", val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UINT64_ARRAY: { + uint64_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_uint64_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%llu", + (unsigned long long)val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_INT64_ARRAY: { + int64_t *val; + uint_t valsz, i; + VERIFY0(nvpair_value_int64_array(curr, &val, &valsz)); + FPRINTF(fp, "["); + for (i = 0; i < valsz; i++) { + if (i > 0) + FPRINTF(fp, ","); + FPRINTF(fp, "%lld", (long long)val[i]); + } + FPRINTF(fp, "]"); + break; + } + + case DATA_TYPE_UNKNOWN: + return (-1); + } + } + + FPRINTF(fp, "}"); + return (0); +} Modified: stable/10/cddl/lib/libnvpair/Makefile ============================================================================== --- stable/10/cddl/lib/libnvpair/Makefile Fri Jan 23 18:39:26 2015 (r277588) +++ stable/10/cddl/lib/libnvpair/Makefile Fri Jan 23 18:40:47 2015 (r277589) @@ -9,6 +9,7 @@ SRCS= libnvpair.c \ nvpair_alloc_system.c \ nvpair_alloc_fixed.c \ nvpair.c \ + nvpair_json.c \ fnvpair.c WARNS?= 0 From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:42:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 9BFFD1EF; Fri, 23 Jan 2015 18:42:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 866D7ED6; Fri, 23 Jan 2015 18:42:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIg68f029939; Fri, 23 Jan 2015 18:42:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIg6hl029936; Fri, 23 Jan 2015 18:42:06 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231842.t0NIg6hl029936@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:42:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277590 - stable/10/usr.bin/seq X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:42:06 -0000 Author: delphij Date: Fri Jan 23 18:42:05 2015 New Revision: 277590 URL: https://svnweb.freebsd.org/changeset/base/277590 Log: MFC r275918: Sync with NetBSD, mainly address NetBSD bug #43355: Fix valid_format() to be more careful about allowing only valid printf formats. Obtained from: NetBSD Modified: stable/10/usr.bin/seq/seq.1 stable/10/usr.bin/seq/seq.c Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.bin/seq/seq.1 ============================================================================== --- stable/10/usr.bin/seq/seq.1 Fri Jan 23 18:40:47 2015 (r277589) +++ stable/10/usr.bin/seq/seq.1 Fri Jan 23 18:42:05 2015 (r277590) @@ -1,4 +1,4 @@ -.\" $NetBSD: seq.1,v 1.6 2008/11/26 15:03:47 ginsbach Exp $ +.\" $NetBSD: seq.1,v 1.8 2013/04/07 17:37:45 jdf Exp $ .\" .\" Copyright (c) 2005 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd February 19, 2010 +.Dd September 10, 2013 .Dt SEQ 1 .Os .Sh NAME @@ -59,7 +59,7 @@ as possible, in increments of When .Ar first is larger than -.Ar last +.Ar last , the default .Ar incr is -1. @@ -79,8 +79,11 @@ style .Ar format to print each number. Only the +.Cm A , +.Cm a , .Cm E , .Cm e , +.Cm F , .Cm f , .Cm G , .Cm g , Modified: stable/10/usr.bin/seq/seq.c ============================================================================== --- stable/10/usr.bin/seq/seq.c Fri Jan 23 18:40:47 2015 (r277589) +++ stable/10/usr.bin/seq/seq.c Fri Jan 23 18:42:05 2015 (r277590) @@ -1,4 +1,4 @@ -/* $NetBSD: seq.c,v 1.5 2008/07/21 14:19:26 lukem Exp $ */ +/* $NetBSD: seq.c,v 1.7 2010/05/27 08:40:19 dholland Exp $ */ /* * Copyright (c) 2005 The NetBSD Foundation, Inc. * All rights reserved. @@ -158,6 +158,8 @@ main(int argc, char *argv[]) if (!valid_format(fmt)) errx(1, "invalid format string: `%s'", fmt); fmt = unescape(fmt); + if (!valid_format(fmt)) + errx(1, "invalid format string"); /* * XXX to be bug for bug compatible with Plan 9 add a * newline if none found at the end of the format string. @@ -225,39 +227,56 @@ numeric(const char *s) static int valid_format(const char *fmt) { - int conversions = 0; + unsigned conversions = 0; while (*fmt != '\0') { /* scan for conversions */ - if (*fmt != '\0' && *fmt != '%') { - do { - fmt++; - } while (*fmt != '\0' && *fmt != '%'); + if (*fmt != '%') { + fmt++; + continue; } - /* scan a conversion */ - if (*fmt != '\0') { - do { - fmt++; + fmt++; - /* ok %% */ - if (*fmt == '%') { - fmt++; - break; - } - /* valid conversions */ - if (strchr("eEfgG", *fmt) && - conversions++ < 1) { - fmt++; - break; - } - /* flags, width and precision */ - if (isdigit((unsigned char)*fmt) || - strchr("+- 0#.", *fmt)) - continue; + /* allow %% but not things like %10% */ + if (*fmt == '%') { + fmt++; + continue; + } - /* oops! bad conversion format! */ - return (0); - } while (*fmt != '\0'); + /* flags */ + while (*fmt != '\0' && strchr("#0- +'", *fmt)) { + fmt++; + } + + /* field width */ + while (*fmt != '\0' && strchr("0123456789", *fmt)) { + fmt++; + } + + /* precision */ + if (*fmt == '.') { + fmt++; + while (*fmt != '\0' && strchr("0123456789", *fmt)) { + fmt++; + } + } + + /* conversion */ + switch (*fmt) { + case 'A': + case 'a': + case 'E': + case 'e': + case 'F': + case 'f': + case 'G': + case 'g': + /* floating point formats are accepted */ + conversions++; + break; + default: + /* anything else is not */ + return 0; } } From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:45:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7553B395; Fri, 23 Jan 2015 18:45:23 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5FD5AEFA; Fri, 23 Jan 2015 18:45:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIjNuq030451; Fri, 23 Jan 2015 18:45:23 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIjNtd030450; Fri, 23 Jan 2015 18:45:23 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231845.t0NIjNtd030450@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:45:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277591 - stable/10/usr.sbin/nfsd X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:45:23 -0000 Author: delphij Date: Fri Jan 23 18:45:22 2015 New Revision: 277591 URL: https://svnweb.freebsd.org/changeset/base/277591 Log: MFC r276495: Fix markup for minthreads and maxthreads. PR: 196403 Modified: stable/10/usr.sbin/nfsd/nfsd.8 Directory Properties: stable/10/ (props changed) Modified: stable/10/usr.sbin/nfsd/nfsd.8 ============================================================================== --- stable/10/usr.sbin/nfsd/nfsd.8 Fri Jan 23 18:42:05 2015 (r277590) +++ stable/10/usr.sbin/nfsd/nfsd.8 Fri Jan 23 18:45:22 2015 (r277591) @@ -28,7 +28,7 @@ .\" @(#)nfsd.8 8.4 (Berkeley) 3/29/95 .\" $FreeBSD$ .\" -.Dd August 10, 2014 +.Dd January 1, 2015 .Dt NFSD 8 .Os .Sh NAME @@ -41,8 +41,8 @@ server .Op Fl arduteo .Op Fl n Ar num_servers .Op Fl h Ar bindip -.Op Fl maxthreads Ar max_threads -.Op Fl minthreads Ar min_threads +.Op Fl Fl maxthreads Ar max_threads +.Op Fl Fl minthreads Ar min_threads .Sh DESCRIPTION The .Nm @@ -78,14 +78,14 @@ service with without creating any servers. .It Fl n Ar threads Specifies how many servers to create. This option is equivalent to specifying -.Fl maxthreads +.Fl Fl maxthreads and -.Fl minthreads +.Fl Fl minthreads with their respective arguments to .Ar threads . -.It Fl maxthreads Ar threads +.It Fl Fl maxthreads Ar threads Specifies the maximum servers that will be kept around to service requests. -.It Fl minthreads Ar threads +.It Fl Fl minthreads Ar threads Specifies the minimum servers that will be kept around to service requests. .It Fl h Ar bindip Specifies which IP address or hostname to bind to on the local host. From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:49:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2356D55D; Fri, 23 Jan 2015 18:49:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A9F3F39; Fri, 23 Jan 2015 18:49:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIn6Z1031030; Fri, 23 Jan 2015 18:49:06 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIn0G2030971; Fri, 23 Jan 2015 18:49:00 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231849.t0NIn0G2030971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277592 - in stable/10: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:49:06 -0000 Author: delphij Date: Fri Jan 23 18:48:59 2015 New Revision: 277592 URL: https://svnweb.freebsd.org/changeset/base/277592 Log: MFC r276577: MFV r276568: Update file to 5.22. Added: stable/10/contrib/file/magic/Magdir/qt - copied unchanged from r276577, head/contrib/file/magic/Magdir/qt Modified: stable/10/contrib/file/ChangeLog stable/10/contrib/file/Makefile.in stable/10/contrib/file/README stable/10/contrib/file/aclocal.m4 stable/10/contrib/file/configure stable/10/contrib/file/configure.ac stable/10/contrib/file/doc/Makefile.in stable/10/contrib/file/doc/file.man stable/10/contrib/file/doc/libmagic.man stable/10/contrib/file/doc/magic.man stable/10/contrib/file/magic/Localstuff stable/10/contrib/file/magic/Magdir/cafebabe stable/10/contrib/file/magic/Magdir/filesystems stable/10/contrib/file/magic/Magdir/images stable/10/contrib/file/magic/Magdir/jpeg stable/10/contrib/file/magic/Makefile.am stable/10/contrib/file/magic/Makefile.in stable/10/contrib/file/missing stable/10/contrib/file/python/Makefile.in stable/10/contrib/file/src/Makefile.in stable/10/contrib/file/src/apprentice.c stable/10/contrib/file/src/compress.c stable/10/contrib/file/src/elfclass.h stable/10/contrib/file/src/file.c stable/10/contrib/file/src/file.h stable/10/contrib/file/src/file_opts.h stable/10/contrib/file/src/funcs.c stable/10/contrib/file/src/getline.c stable/10/contrib/file/src/magic.c stable/10/contrib/file/src/magic.h stable/10/contrib/file/src/magic.h.in stable/10/contrib/file/src/readelf.c stable/10/contrib/file/src/softmagic.c stable/10/contrib/file/tests/Makefile.in stable/10/lib/libmagic/config.h Directory Properties: stable/10/ (props changed) Modified: stable/10/contrib/file/ChangeLog ============================================================================== --- stable/10/contrib/file/ChangeLog Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/ChangeLog Fri Jan 23 18:48:59 2015 (r277592) @@ -1,3 +1,29 @@ +2015-01-02 15:15 Christos Zoulas + + * release 5.22 + +2015-01-01 12:01 Christos Zoulas + + * add indirect relative for TIFF/Exif + +2014-12-16 18:10 Christos Zoulas + + * restructure elf note printing to avoid repeated messages + * add note limit, suggested by Alexander Cherepanov + +2014-12-16 16:53 Christos Zoulas + + * Bail out on partial pread()'s (Alexander Cherepanov) + * Fix incorrect bounds check in file_printable (Alexander Cherepanov) + +2014-12-11 20:01 Christos Zoulas + + * PR/405: ignore SIGPIPE from uncompress programs + * change printable -> file_printable and use it in + more places for safety + * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP + is present print the interpreter name. + 2014-12-10 20:01 Christos Zoulas * release 5.21 @@ -23,6 +49,8 @@ - reduce the number of recursion levels from 20 to 10 - preserve error messages in indirect magic handling + This is tracked as CVE-2014-8116 and CVE-2014-8117 + 2014-11-12 10:30 Christos Zoulas * fix bogus free in the user buffer case. Modified: stable/10/contrib/file/Makefile.in ============================================================================== --- stable/10/contrib/file/Makefile.in Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -618,10 +618,9 @@ distcheck: dist && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ Modified: stable/10/contrib/file/README ============================================================================== --- stable/10/contrib/file/README Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/README Fri Jan 23 18:48:59 2015 (r277592) @@ -1,6 +1,6 @@ ## README for file(1) Command ## - @(#) $File: README,v 1.48 2014/03/07 13:55:30 christos Exp $ + @(#) $File: README,v 1.49 2015/01/02 20:23:04 christos Exp $ Mailing List: file@mx.gw.com Mailing List archives: http://mx.gw.com/pipermail/file/ @@ -25,8 +25,8 @@ A public read-only git repository of the https://github.com/file/file -The major changes for 5.x are CDF file parsing, indirect magic, and -overhaul in mime and ascii encoding handling. +The major changes for 5.x are CDF file parsing, indirect magic, name/use +(recursion) and overhaul in mime and ascii encoding handling. The major feature of 4.x is the refactoring of the code into a library, and the re-write of the file command in terms of that library. The library @@ -67,33 +67,41 @@ in magic(5) format please, to the mainta COPYING - read this first. README - read this second (you are currently reading this file). INSTALL - read on how to install - src/apprentice.c - parses /etc/magic to learn magic +src/asctime_r.c - replacement for OS's that don't have it. src/apptype.c - used for OS/2 specific application type magic src/asprintf.c - replacement for OS's that don't have it. src/ascmagic.c - third & last set of tests, based on hardwired assumptions. -src/asctime_r.c - for systems that don't have it. -src/asprintf.c - for systems that don't have it. -src/cdf.c - parser for Microsoft Compound Document Files +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. +src/cdf.[ch] - parser for Microsoft Compound Document Files src/cdf_time.c - time converter for CDF. src/compress.c - handles decompressing files to look inside. -src/ctime_r.c - for systems that don't have it. +src/ctime_r.c - replacement for OS's that don't have it. +src/elfclass.h - common code for elf 32/64. src/encoding.c - handles unicode encodings src/file.c - the main program src/file.h - header file +src/file_opts.h - list of options +src/fmtcheck.c - replacement for OS's that don't have it. src/fsmagic.c - first set of tests the program runs, based on filesystem info src/funcs.c - utilility functions -src/getopt_long.c - for systems that don't have it. -src/getline.c - for systems that don't have it. +src/getline.c - replacement for OS's that don't have it. +src/getopt_long.c - replacement for OS's that don't have it. src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore). src/names.h - header file for ascmagic.c +src/magic.h.in - source file for magic.h src/magic.c - the libmagic api +src/pread.c - replacement for OS's that don't have it. src/print.c - print results, errors, warnings. src/readcdf.c - CDF wrapper. src/readelf.[ch] - Stand-alone elf parsing code. src/softmagic.c - 2nd set of tests, based on /etc/magic -src/strlcat.c - for systems that don't have it. -src/strlcpy.c - for systems that don't have it. +src/mygetopt.h - replacement for OS's that don't have it. +src/strcasestr.c - replacement for OS's that don't have it. +src/strlcat.c - replacement for OS's that don't have it. +src/strlcpy.c - replacement for OS's that don't have it. +src/tar.h - tar file definitions src/vasprintf.c - for systems that don't have it. doc/file.man - man page for the command doc/magic.man - man page for the magic file, courtesy Guy Harris. Modified: stable/10/contrib/file/aclocal.m4 ============================================================================== --- stable/10/contrib/file/aclocal.m4 Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/aclocal.m4 Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.14 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -21,7 +21,7 @@ If you have problems, you may need to re To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -113,7 +113,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.14], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -129,7 +129,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.14])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) Modified: stable/10/contrib/file/configure ============================================================================== --- stable/10/contrib/file/configure Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/configure Fri Jan 23 18:48:59 2015 (r277592) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.21. +# Generated by GNU Autoconf 2.69 for file 5.22. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.21' -PACKAGE_STRING='file 5.21' +PACKAGE_VERSION='5.22' +PACKAGE_STRING='file 5.22' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.21 to adapt to many kinds of systems. +\`configure' configures file 5.22 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.21:";; + short | recursive ) echo "Configuration of file 5.22:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.21 +file configure 5.22 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.21, which was +It was created by file $as_me 5.22, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3029,7 +3029,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.21' + VERSION='5.22' cat >>confdefs.h <<_ACEOF @@ -14998,7 +14998,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.21, which was +This file was extended by file $as_me 5.22, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15064,7 +15064,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.21 +file config.status 5.22 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/10/contrib/file/configure.ac ============================================================================== --- stable/10/contrib/file/configure.ac Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/configure.ac Fri Jan 23 18:48:59 2015 (r277592) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.21],[christos@astron.com]) +AC_INIT([file],[5.22],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) Modified: stable/10/contrib/file/doc/Makefile.in ============================================================================== --- stable/10/contrib/file/doc/Makefile.in Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/doc/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. Modified: stable/10/contrib/file/doc/file.man ============================================================================== --- stable/10/contrib/file/doc/file.man Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/doc/file.man Fri Jan 23 18:48:59 2015 (r277592) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.106 2014/03/07 23:11:51 christos Exp $ -.Dd December 3, 2014 +.\" $File: file.man,v 1.111 2014/12/16 23:18:40 christos Exp $ +.Dd December 16, 2014 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -310,6 +310,7 @@ Set various parameter limits. .It Sy "Name" Ta Sy "Default" Ta Sy "Explanation" .It Li indir Ta 15 Ta recursion limit for indirect magic .It Li name Ta 30 Ta use count limit for name/use magic +.It Li elf_notes Ta 256 Ta max ELF notes processed .It Li elf_phnum Ta 128 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed .El Modified: stable/10/contrib/file/doc/libmagic.man ============================================================================== --- stable/10/contrib/file/doc/libmagic.man Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/doc/libmagic.man Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.33 2014/11/28 02:46:39 christos Exp $ +.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 27, 2014 +.Dd December 16, 2014 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -284,6 +284,7 @@ library. .It Sy "Parameter" Ta Sy "Type" Ta Sy "Default" .It Li MAGIC_PARAM_INDIR_MAX Ta size_t Ta 15 .It Li MAGIC_PARAM_NAME_MAX Ta size_t Ta 30 +.It Li MAGIC_PARAM_ELF_NOTES_MAX Ta size_t Ta 256 .It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128 .It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768 .El @@ -303,12 +304,16 @@ The parameter controls the maximum number of calls for name/use. .Pp The +.Dv MAGIC_PARAM_NOTES_MAX +parameter controls how many ELF notes will be processed. +.Pp +The .Dv MAGIC_PARAM_PHNUM_MAX -parameter controls how many elf program sections will be processed. +parameter controls how many ELF program sections will be processed. .Pp The .Dv MAGIC_PARAM_SHNUM_MAX -parameter controls how many elf sections will be processed. +parameter controls how many ELF sections will be processed. .Pp The .Fn magic_version Modified: stable/10/contrib/file/doc/magic.man ============================================================================== --- stable/10/contrib/file/doc/magic.man Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/doc/magic.man Fri Jan 23 18:48:59 2015 (r277592) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.84 2014/06/03 19:01:34 christos Exp $ -.Dd June 3, 2014 +.\" $File: magic.man,v 1.85 2015/01/01 17:07:34 christos Exp $ +.Dd January 1, 2015 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -200,6 +200,11 @@ interpreted as a UNIX-style date, but in than UTC. .It Dv indirect Starting at the given offset, consult the magic database again. +The offset of th +.Dv indirect +magic is by default absolute in the file, but one can specify +.Dv /r +to indicate that the offset is relative from the beginning of the entry. .It Dv name Define a .Dq named Modified: stable/10/contrib/file/magic/Localstuff ============================================================================== --- stable/10/contrib/file/magic/Localstuff Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Localstuff Fri Jan 23 18:48:59 2015 (r277592) @@ -2,6 +2,6 @@ #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # -# $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $ +# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $ # Add any locally observed files here. Remember: # text if readable, executable if runnable binary, data if unreadable. Modified: stable/10/contrib/file/magic/Magdir/cafebabe ============================================================================== --- stable/10/contrib/file/magic/Magdir/cafebabe Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Magdir/cafebabe Fri Jan 23 18:48:59 2015 (r277592) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: cafebabe,v 1.16 2014/04/30 21:41:02 christos Exp $ +# $File: cafebabe,v 1.17 2015/01/01 17:07:00 christos Exp $ # Cafe Babes unite! # # Since Java bytecode and Mach-O universal binaries have the same magic number, @@ -45,7 +45,7 @@ 0 name mach-o \b [ >0 use mach-o-cpu \b ->&(8.L) indirect \b: +>(8.L) indirect \b: >0 belong x \b] 0 belong 0xcafebabe Modified: stable/10/contrib/file/magic/Magdir/filesystems ============================================================================== --- stable/10/contrib/file/magic/Magdir/filesystems Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Magdir/filesystems Fri Jan 23 18:48:59 2015 (r277592) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: filesystems,v 1.107 2014/12/03 18:02:52 christos Exp $ +# $File: filesystems,v 1.108 2015/01/01 17:43:47 christos Exp $ # filesystems: file(1) magic for different filesystems # 0 name partid @@ -260,6 +260,13 @@ >>(11.s-2) uleshort 0xAA55 DOS/MBR boot sector # for sector sizes with 512 or more Bytes >0x1FE leshort 0xAA55 DOS/MBR boot sector + +# keep old DOS/MBR boot sector as dummy for mbr and bootloader displaying +# only for sector sizes with 512 or more Bytes +0x1FE leshort 0xAA55 DOS/MBR boot sector +# +# to display information (50) before DOS BPB (strength=70) and after DOS floppy (120) like in old file version +!:strength +65 >2 string OSBS OS/BS MBR # added by Joerg Jenderek at Feb 2013 according to http://thestarman.pcministry.com/asm/mbr/ # and http://en.wikipedia.org/wiki/Master_Boot_Record Modified: stable/10/contrib/file/magic/Magdir/images ============================================================================== --- stable/10/contrib/file/magic/Magdir/images Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Magdir/images Fri Jan 23 18:48:59 2015 (r277592) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: images,v 1.97 2014/12/08 16:06:19 christos Exp $ +# $File: images,v 1.102 2015/01/02 02:36:35 christos Exp $ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # @@ -115,7 +115,7 @@ # never changed. The TIFF specification recommends testing for it. 0 string MM\x00\x2a TIFF image data, big-endian !:mime image/tiff ->(4.L) use tiff_ifd +>(4.L) use \^tiff_ifd 0 string II\x2a\x00 TIFF image data, little-endian !:mime image/tiff >(4.l) use tiff_ifd @@ -125,54 +125,57 @@ >2 use tiff_entry 0 name tiff_entry +# NewSubFileType +>0 leshort 0xfe +>>12 use tiff_entry >0 leshort 0x100 >>4 lelong 1 >>>12 use tiff_entry ->>>8 lelong x \b, width=%d +>>>8 leshort x \b, width=%d >0 leshort 0x101 >>4 lelong 1 ->>>8 lelong x \b, height=%d +>>>8 leshort x \b, height=%d >>>12 use tiff_entry >0 leshort 0x102 ->>8 lelong x \b, bps=%d +>>8 leshort x \b, bps=%d >>12 use tiff_entry >0 leshort 0x103 >>4 lelong 1 \b, compression= ->>>8 lelong 1 \bnone ->>>8 lelong 2 \bhuffman ->>>8 lelong 3 \bbi-level group 3 ->>>8 lelong 4 \bbi-level group 4 ->>>8 lelong 5 \bLZW ->>>8 lelong 6 \bJPEG (old) ->>>8 lelong 7 \bJPEG ->>>8 lelong 8 \bdeflate ->>>8 lelong 9 \bJBIG, ITU-T T.85 ->>>8 lelong 0xa \bJBIG, ITU-T T.43 ->>>8 lelong 0x7ffe \bNeXT RLE 2-bit ->>>8 lelong 0x8005 \bPackBits (Macintosh RLE) ->>>8 lelong 0x8029 \bThunderscan RLE ->>>8 lelong 0x807f \bRasterPadding (CT or MP) ->>>8 lelong 0x8080 \bRLE (Line Work) ->>>8 lelong 0x8081 \bRLE (High-Res Cont-Tone) ->>>8 lelong 0x8082 \bRLE (Binary Line Work) ->>>8 lelong 0x80b2 \bDeflate (PKZIP) ->>>8 lelong 0x80b3 \bKodak DCS ->>>8 lelong 0x8765 \bJBIG ->>>8 lelong 0x8798 \bJPEG2000 ->>>8 lelong 0x8799 \bNikon NEF Compressed +>>>8 leshort 1 \bnone +>>>8 leshort 2 \bhuffman +>>>8 leshort 3 \bbi-level group 3 +>>>8 leshort 4 \bbi-level group 4 +>>>8 leshort 5 \bLZW +>>>8 leshort 6 \bJPEG (old) +>>>8 leshort 7 \bJPEG +>>>8 leshort 8 \bdeflate +>>>8 leshort 9 \bJBIG, ITU-T T.85 +>>>8 leshort 0xa \bJBIG, ITU-T T.43 +>>>8 leshort 0x7ffe \bNeXT RLE 2-bit +>>>8 leshort 0x8005 \bPackBits (Macintosh RLE) +>>>8 leshort 0x8029 \bThunderscan RLE +>>>8 leshort 0x807f \bRasterPadding (CT or MP) +>>>8 leshort 0x8080 \bRLE (Line Work) +>>>8 leshort 0x8081 \bRLE (High-Res Cont-Tone) +>>>8 leshort 0x8082 \bRLE (Binary Line Work) +>>>8 leshort 0x80b2 \bDeflate (PKZIP) +>>>8 leshort 0x80b3 \bKodak DCS +>>>8 leshort 0x8765 \bJBIG +>>>8 leshort 0x8798 \bJPEG2000 +>>>8 leshort 0x8799 \bNikon NEF Compressed >>>8 default x ->>>>8 lelong x \b(unknown 0x%x) +>>>>8 leshort x \b(unknown 0x%x) >>>12 use tiff_entry >0 leshort 0x106 \b, PhotometricIntepretation= ->>8 lelong 0 \bWhiteIsZero ->>8 lelong 1 \bBlackIsZero ->>8 lelong 2 \bRGB ->>8 lelong 3 \bRGB Palette ->>8 lelong 4 \bTransparency Mask ->>8 lelong 5 \bCMYK ->>8 lelong 6 \bYCbCr ->>8 lelong 8 \bCIELab ->>>8 lelong x \b(unknown=0x%x) +>>8 leshort 0 \bWhiteIsZero +>>8 leshort 1 \bBlackIsZero +>>8 leshort 2 \bRGB +>>8 leshort 3 \bRGB Palette +>>8 leshort 4 \bTransparency Mask +>>8 leshort 5 \bCMYK +>>8 leshort 6 \bYCbCr +>>8 leshort 8 \bCIELab +>>>8 leshort x \b(unknown=0x%x) >>12 use tiff_entry # FillOrder >0 leshort 0x10a @@ -186,21 +189,79 @@ >0 leshort 0x10e >>(8.l) string x \b, description=%s >>>12 use tiff_entry +# Make +>0 leshort 0x10f +>>(8.l) string x \b, manufacturer=%s +>>>12 use tiff_entry +# Model +>0 leshort 0x110 +>>(8.l) string x \b, model=%s +>>>12 use tiff_entry # StripOffsets >0 leshort 0x111 >>12 use tiff_entry -# NewSubFileType ->0 leshort 0xfe +# Orientation +>0 leshort 0x112 \b, orientation= +>>8 leshort 1 \bupper-left +>>8 leshort 3 \blower-right +>>8 leshort 6 \bupper-right +>>8 leshort 8 \blower-left +>>8 leshort 9 \bundefined +>>8 default x +>>>8 leshort x \b[*%d*] +>>12 use tiff_entry +# XResolution +>0 leshort 0x11a +>>8 lelong x \b, xresolution=%d +>>12 use tiff_entry +# YResolution +>0 leshort 0x11b +>>8 lelong x \b, yresolution=%d +>>12 use tiff_entry +# ResolutionUnit +>0 leshort 0x128 +>>8 leshort x \b, resolutionunit=%d +>>12 use tiff_entry +# Software +>0 leshort 0x131 +>>(8.l) string x \b, software=%s >>12 use tiff_entry # Datetime >0 leshort 0x132 >>(8.l) string x \b, datetime=%s ->>>12 use tiff_entry +>>12 use tiff_entry # HostComputer >0 leshort 0x13c >>(8.l) string x \b, hostcomputer=%s ->>>12 use tiff_entry +>>12 use tiff_entry +# WhitePoint +>0 leshort 0x13e +>>12 use tiff_entry +# PrimaryChromaticities +>0 leshort 0x13f +>>12 use tiff_entry +# YCbCrCoefficients +>0 leshort 0x211 +>>12 use tiff_entry +# YCbCrPositioning +>0 leshort 0x213 +>>12 use tiff_entry +# ReferenceBlackWhite +>0 leshort 0x214 +>>12 use tiff_entry +# Copyright +>0 leshort 0x8298 +>>(8.l) string x \b, copyright=%s +>>12 use tiff_entry +# ExifOffset +>0 leshort 0x8769 +>>12 use tiff_entry +# GPS IFD +>0 leshort 0x8825 \b, GPS-Data +>>12 use tiff_entry + #>0 leshort x \b, unknown=0x%x +#>>12 use tiff_entry 0 string MM\x00\x2b Big TIFF image data, big-endian !:mime image/tiff Modified: stable/10/contrib/file/magic/Magdir/jpeg ============================================================================== --- stable/10/contrib/file/magic/Magdir/jpeg Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Magdir/jpeg Fri Jan 23 18:48:59 2015 (r277592) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: jpeg,v 1.21 2014/09/12 20:47:00 christos Exp $ +# $File: jpeg,v 1.25 2015/01/02 16:56:50 christos Exp $ # JPEG images # SunOS 5.5.1 had # @@ -31,98 +31,9 @@ # Next, show thumbnail info, if it exists: >>18 byte !0 \b, thumbnail %dx >>>19 byte x \b%d - -# EXIF moved down here to avoid reporting a bogus version number, -# and EXIF version number printing added. -# - Patrik R=E5dman ->6 string Exif \b, EXIF standard -# Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD. -# All possible combinations of entries have to be enumerated, since no looping -# is possible. And both endians are possible... -# The combinations included below are from real-world JPEGs. -# Little-endian ->>12 string II -# IFD 0 Entry #5: ->>>70 leshort 0x8769 -# EXIF IFD Entry #1: ->>>>(78.l+14) leshort 0x9000 ->>>>>(78.l+23) byte x %c ->>>>>(78.l+24) byte x \b.%c ->>>>>(78.l+25) byte !0x30 \b%c -# IFD 0 Entry #9: ->>>118 leshort 0x8769 -# EXIF IFD Entry #3: ->>>>(126.l+38) leshort 0x9000 ->>>>>(126.l+47) byte x %c ->>>>>(126.l+48) byte x \b.%c ->>>>>(126.l+49) byte !0x30 \b%c -# IFD 0 Entry #10 ->>>130 leshort 0x8769 -# EXIF IFD Entry #3: ->>>>(138.l+38) leshort 0x9000 ->>>>>(138.l+47) byte x %c ->>>>>(138.l+48) byte x \b.%c ->>>>>(138.l+49) byte !0x30 \b%c -# EXIF IFD Entry #4: ->>>>(138.l+50) leshort 0x9000 ->>>>>(138.l+59) byte x %c ->>>>>(138.l+60) byte x \b.%c ->>>>>(138.l+61) byte !0x30 \b%c -# EXIF IFD Entry #5: ->>>>(138.l+62) leshort 0x9000 ->>>>>(138.l+71) byte x %c ->>>>>(138.l+72) byte x \b.%c ->>>>>(138.l+73) byte !0x30 \b%c -# IFD 0 Entry #11 ->>>142 leshort 0x8769 -# EXIF IFD Entry #3: ->>>>(150.l+38) leshort 0x9000 ->>>>>(150.l+47) byte x %c ->>>>>(150.l+48) byte x \b.%c ->>>>>(150.l+49) byte !0x30 \b%c -# EXIF IFD Entry #4: ->>>>(150.l+50) leshort 0x9000 ->>>>>(150.l+59) byte x %c ->>>>>(150.l+60) byte x \b.%c ->>>>>(150.l+61) byte !0x30 \b%c -# EXIF IFD Entry #5: ->>>>(150.l+62) leshort 0x9000 ->>>>>(150.l+71) byte x %c ->>>>>(150.l+72) byte x \b.%c ->>>>>(150.l+73) byte !0x30 \b%c -# Big-endian ->>12 string MM -# IFD 0 Entry #9: ->>>118 beshort 0x8769 -# EXIF IFD Entry #1: ->>>>(126.L+14) beshort 0x9000 ->>>>>(126.L+23) byte x %c ->>>>>(126.L+24) byte x \b.%c ->>>>>(126.L+25) byte !0x30 \b%c -# EXIF IFD Entry #3: ->>>>(126.L+38) beshort 0x9000 ->>>>>(126.L+47) byte x %c ->>>>>(126.L+48) byte x \b.%c ->>>>>(126.L+49) byte !0x30 \b%c -# IFD 0 Entry #10 ->>>130 beshort 0x8769 -# EXIF IFD Entry #3: ->>>>(138.L+38) beshort 0x9000 ->>>>>(138.L+47) byte x %c ->>>>>(138.L+48) byte x \b.%c ->>>>>(138.L+49) byte !0x30 \b%c -# EXIF IFD Entry #5: ->>>>(138.L+62) beshort 0x9000 ->>>>>(138.L+71) byte x %c ->>>>>(138.L+72) byte x \b.%c ->>>>>(138.L+73) byte !0x30 \b%c -# IFD 0 Entry #11 ->>>142 beshort 0x8769 -# EXIF IFD Entry #4: ->>>>(150.L+50) beshort 0x9000 ->>>>>(150.L+59) byte x %c ->>>>>(150.L+60) byte x \b.%c ->>>>>(150.L+61) byte !0x30 \b%c +>6 string Exif \b, Exif standard: [ +>>12 indirect/r x +>>12 string x \b] # Jump to the first segment >(4.S+4) use jpeg_segment @@ -158,6 +69,12 @@ >0 beshort 0xFFC4 >>(2.S+2) use jpeg_segment +>0 beshort 0xFFE1 +#>>(2.S+2) use jpeg_segment +>>4 string Exif \b, Exif Standard: [ +>>>10 indirect/r x +>>>10 string x \b] + # Application specific markers >0 beshort&0xFFE0 =0xFFE0 >>(2.S+2) use jpeg_segment @@ -170,6 +87,9 @@ >0 beshort&0xFFD0 =0xFFD0 >>(2.S+2) use jpeg_segment +#>0 beshort x unknown 0x%x +#>>(2.S+2) use jpeg_segment + # HSI is Handmade Software's proprietary JPEG encoding scheme 0 string hsi1 JPEG image data, HSI proprietary Copied: stable/10/contrib/file/magic/Magdir/qt (from r276577, head/contrib/file/magic/Magdir/qt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/10/contrib/file/magic/Magdir/qt Fri Jan 23 18:48:59 2015 (r277592, copy of r276577, head/contrib/file/magic/Magdir/qt) @@ -0,0 +1,19 @@ + +#------------------------------------------------------------------------------ +# $File: qt,v 1.2 2014/12/16 19:49:29 christos Exp $ +# qt: file(1) magic for Qt + +# http://doc.qt.io/qt-5/resources.html +0 string \ Qt Resource Collection file + +# https://qt.gitorious.org/qt/qtbase/source/\ +# 5367fa356233da4c0f28172a8f817791525f5457:\ +# src/tools/rcc/rcc.cpp#L840 +0 string qres\0\0 Qt Binary Resource file +0 search/1024 The\040Resource\040Compiler\040for\040Qt Qt C-code resource file + +# https://qt.gitorious.org/qt/qtbase/source/\ +# 5367fa356233da4c0f28172a8f817791525f5457:\ +# src/corelib/kernel/qtranslator.cpp#L62 +0 string \x3c\xb8\x64\x18\xca\xef\x9c\x95 +>8 string \xcd\x21\x1c\xbf\x60\xa1\xbd\xdd Qt Translation file Modified: stable/10/contrib/file/magic/Makefile.am ============================================================================== --- stable/10/contrib/file/magic/Makefile.am Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Makefile.am Fri Jan 23 18:48:59 2015 (r277592) @@ -1,5 +1,5 @@ # -# $File: Makefile.am,v 1.100 2014/12/10 18:45:43 christos Exp $ +# $File: Makefile.am,v 1.101 2014/12/12 16:48:39 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -198,6 +198,7 @@ $(MAGIC_FRAGMENT_DIR)/pulsar \ $(MAGIC_FRAGMENT_DIR)/pwsafe \ $(MAGIC_FRAGMENT_DIR)/pyramid \ $(MAGIC_FRAGMENT_DIR)/python \ +$(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/rpm \ Modified: stable/10/contrib/file/magic/Makefile.in ============================================================================== --- stable/10/contrib/file/magic/Makefile.in Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/magic/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -262,7 +262,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # -# $File: Makefile.am,v 1.100 2014/12/10 18:45:43 christos Exp $ +# $File: Makefile.am,v 1.101 2014/12/12 16:48:39 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -459,6 +459,7 @@ $(MAGIC_FRAGMENT_DIR)/pulsar \ $(MAGIC_FRAGMENT_DIR)/pwsafe \ $(MAGIC_FRAGMENT_DIR)/pyramid \ $(MAGIC_FRAGMENT_DIR)/python \ +$(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/rpm \ Modified: stable/10/contrib/file/missing ============================================================================== --- stable/10/contrib/file/missing Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/missing Fri Jan 23 18:48:59 2015 (r277592) @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." + echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) Modified: stable/10/contrib/file/python/Makefile.in ============================================================================== --- stable/10/contrib/file/python/Makefile.in Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/python/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. Modified: stable/10/contrib/file/src/Makefile.in ============================================================================== --- stable/10/contrib/file/src/Makefile.in Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/src/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -81,9 +81,9 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = file$(EXEEXT) subdir = src -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am strcasestr.c \ - pread.c strlcpy.c vasprintf.c getopt_long.c asctime_r.c \ - strlcat.c ctime_r.c getline.c asprintf.c fmtcheck.c \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ctime_r.c \ + vasprintf.c asctime_r.c asprintf.c strcasestr.c pread.c \ + getline.c strlcpy.c strlcat.c fmtcheck.c getopt_long.c \ $(top_srcdir)/depcomp $(include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ Modified: stable/10/contrib/file/src/apprentice.c ============================================================================== --- stable/10/contrib/file/src/apprentice.c Fri Jan 23 18:45:22 2015 (r277591) +++ stable/10/contrib/file/src/apprentice.c Fri Jan 23 18:48:59 2015 (r277592) @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.227 2014/11/28 02:46:39 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.229 2015/01/01 17:07:34 christos Exp $") #endif /* lint */ #include "magic.h" @@ -528,6 +528,7 @@ file_ms_alloc(int flags) ms->name_max = FILE_NAME_MAX; ms->elf_shnum_max = FILE_ELF_SHNUM_MAX; ms->elf_phnum_max = FILE_ELF_PHNUM_MAX; + ms->elf_notes_max = FILE_ELF_NOTES_MAX; return ms; free: free(ms); @@ -1604,6 +1605,145 @@ check_cond(struct magic_set *ms, int con } #endif /* ENABLE_CONDITIONALS */ +private int +parse_indirect_modifier(struct magic_set *ms, struct magic *m, const char **lp) +{ + const char *l = *lp; + + while (!isspace((unsigned char)*++l)) + switch (*l) { + case CHAR_INDIRECT_RELATIVE: + m->str_flags |= INDIRECT_RELATIVE; + break; + default: + if (ms->flags & MAGIC_CHECK) + file_magwarn(ms, "indirect modifier `%c' " + "invalid", *l); + *lp = l; + return -1; + } + *lp = l; + return 0; +} + +private void +parse_op_modifier(struct magic_set *ms, struct magic *m, const char **lp, + int op) +{ + const char *l = *lp; + char *t; + uint64_t val; + + ++l; + m->mask_op |= op; + val = (uint64_t)strtoull(l, &t, 0); + l = t; + m->num_mask = file_signextend(ms, m, val); + eatsize(&l); + *lp = l; +} + +private int +parse_string_modifier(struct magic_set *ms, struct magic *m, const char **lp) +{ + const char *l = *lp; + char *t; + int have_range = 0; + + while (!isspace((unsigned char)*++l)) { + switch (*l) { + case '0': case '1': case '2': + case '3': case '4': case '5': + case '6': case '7': case '8': + case '9': + if (have_range && (ms->flags & MAGIC_CHECK)) + file_magwarn(ms, "multiple ranges"); + have_range = 1; + m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); + if (m->str_range == 0) + file_magwarn(ms, "zero range"); + l = t - 1; + break; + case CHAR_COMPACT_WHITESPACE: + m->str_flags |= STRING_COMPACT_WHITESPACE; + break; + case CHAR_COMPACT_OPTIONAL_WHITESPACE: + m->str_flags |= STRING_COMPACT_OPTIONAL_WHITESPACE; + break; + case CHAR_IGNORE_LOWERCASE: + m->str_flags |= STRING_IGNORE_LOWERCASE; + break; + case CHAR_IGNORE_UPPERCASE: + m->str_flags |= STRING_IGNORE_UPPERCASE; + break; + case CHAR_REGEX_OFFSET_START: + m->str_flags |= REGEX_OFFSET_START; + break; + case CHAR_BINTEST: + m->str_flags |= STRING_BINTEST; + break; + case CHAR_TEXTTEST: + m->str_flags |= STRING_TEXTTEST; + break; + case CHAR_TRIM: + m->str_flags |= STRING_TRIM; + break; + case CHAR_PSTRING_1_LE: +#define SET_LENGTH(a) m->str_flags = (m->str_flags & ~PSTRING_LEN) | (a) + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_1_LE); + break; + case CHAR_PSTRING_2_BE: + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_2_BE); + break; + case CHAR_PSTRING_2_LE: + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_2_LE); + break; + case CHAR_PSTRING_4_BE: + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_4_BE); + break; + case CHAR_PSTRING_4_LE: + switch (m->type) { + case FILE_PSTRING: + case FILE_REGEX: + break; + default: + goto bad; + } + SET_LENGTH(PSTRING_4_LE); + break; + case CHAR_PSTRING_LENGTH_INCLUDES_ITSELF: + if (m->type != FILE_PSTRING) + goto bad; + m->str_flags |= PSTRING_LENGTH_INCLUDES_ITSELF; + break; + default: + bad: + if (ms->flags & MAGIC_CHECK) + file_magwarn(ms, "string modifier `%c' " + "invalid", *l); + goto out; + } + /* allow multiple '/' for readability */ + if (l[1] == '/' && !isspace((unsigned char)l[2])) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:50:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AB7326AA; Fri, 23 Jan 2015 18:50:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 92E28F4E; Fri, 23 Jan 2015 18:50:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIohHn031806; Fri, 23 Jan 2015 18:50:43 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIobup031775; Fri, 23 Jan 2015 18:50:37 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231850.t0NIobup031775@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:50:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277593 - in stable/9: contrib/file contrib/file/doc contrib/file/magic contrib/file/magic/Magdir contrib/file/python contrib/file/src contrib/file/tests lib/libmagic X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:50:43 -0000 Author: delphij Date: Fri Jan 23 18:50:36 2015 New Revision: 277593 URL: https://svnweb.freebsd.org/changeset/base/277593 Log: MFC r276577: MFV r276568: Update file to 5.22. Added: stable/9/contrib/file/magic/Magdir/qt - copied unchanged from r276577, head/contrib/file/magic/Magdir/qt Modified: stable/9/contrib/file/ChangeLog stable/9/contrib/file/Makefile.in stable/9/contrib/file/README stable/9/contrib/file/aclocal.m4 stable/9/contrib/file/configure stable/9/contrib/file/configure.ac stable/9/contrib/file/doc/Makefile.in stable/9/contrib/file/doc/file.man stable/9/contrib/file/doc/libmagic.man stable/9/contrib/file/doc/magic.man stable/9/contrib/file/magic/Localstuff stable/9/contrib/file/magic/Magdir/cafebabe stable/9/contrib/file/magic/Magdir/filesystems stable/9/contrib/file/magic/Magdir/images stable/9/contrib/file/magic/Magdir/jpeg stable/9/contrib/file/magic/Makefile.am stable/9/contrib/file/magic/Makefile.in stable/9/contrib/file/missing stable/9/contrib/file/python/Makefile.in stable/9/contrib/file/src/Makefile.in stable/9/contrib/file/src/apprentice.c stable/9/contrib/file/src/compress.c stable/9/contrib/file/src/elfclass.h stable/9/contrib/file/src/file.c stable/9/contrib/file/src/file.h stable/9/contrib/file/src/file_opts.h stable/9/contrib/file/src/funcs.c stable/9/contrib/file/src/getline.c stable/9/contrib/file/src/magic.c stable/9/contrib/file/src/magic.h stable/9/contrib/file/src/magic.h.in stable/9/contrib/file/src/readelf.c stable/9/contrib/file/src/softmagic.c stable/9/contrib/file/tests/Makefile.in stable/9/lib/libmagic/config.h Directory Properties: stable/9/contrib/file/ (props changed) stable/9/lib/libmagic/ (props changed) Modified: stable/9/contrib/file/ChangeLog ============================================================================== --- stable/9/contrib/file/ChangeLog Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/ChangeLog Fri Jan 23 18:50:36 2015 (r277593) @@ -1,3 +1,29 @@ +2015-01-02 15:15 Christos Zoulas + + * release 5.22 + +2015-01-01 12:01 Christos Zoulas + + * add indirect relative for TIFF/Exif + +2014-12-16 18:10 Christos Zoulas + + * restructure elf note printing to avoid repeated messages + * add note limit, suggested by Alexander Cherepanov + +2014-12-16 16:53 Christos Zoulas + + * Bail out on partial pread()'s (Alexander Cherepanov) + * Fix incorrect bounds check in file_printable (Alexander Cherepanov) + +2014-12-11 20:01 Christos Zoulas + + * PR/405: ignore SIGPIPE from uncompress programs + * change printable -> file_printable and use it in + more places for safety + * in ELF, instead of "(uses dynamic libraries)" when PT_INTERP + is present print the interpreter name. + 2014-12-10 20:01 Christos Zoulas * release 5.21 @@ -23,6 +49,8 @@ - reduce the number of recursion levels from 20 to 10 - preserve error messages in indirect magic handling + This is tracked as CVE-2014-8116 and CVE-2014-8117 + 2014-11-12 10:30 Christos Zoulas * fix bogus free in the user buffer case. Modified: stable/9/contrib/file/Makefile.in ============================================================================== --- stable/9/contrib/file/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/Makefile.in Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -618,10 +618,9 @@ distcheck: dist && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ Modified: stable/9/contrib/file/README ============================================================================== --- stable/9/contrib/file/README Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/README Fri Jan 23 18:50:36 2015 (r277593) @@ -1,6 +1,6 @@ ## README for file(1) Command ## - @(#) $File: README,v 1.48 2014/03/07 13:55:30 christos Exp $ + @(#) $File: README,v 1.49 2015/01/02 20:23:04 christos Exp $ Mailing List: file@mx.gw.com Mailing List archives: http://mx.gw.com/pipermail/file/ @@ -25,8 +25,8 @@ A public read-only git repository of the https://github.com/file/file -The major changes for 5.x are CDF file parsing, indirect magic, and -overhaul in mime and ascii encoding handling. +The major changes for 5.x are CDF file parsing, indirect magic, name/use +(recursion) and overhaul in mime and ascii encoding handling. The major feature of 4.x is the refactoring of the code into a library, and the re-write of the file command in terms of that library. The library @@ -67,33 +67,41 @@ in magic(5) format please, to the mainta COPYING - read this first. README - read this second (you are currently reading this file). INSTALL - read on how to install - src/apprentice.c - parses /etc/magic to learn magic +src/asctime_r.c - replacement for OS's that don't have it. src/apptype.c - used for OS/2 specific application type magic src/asprintf.c - replacement for OS's that don't have it. src/ascmagic.c - third & last set of tests, based on hardwired assumptions. -src/asctime_r.c - for systems that don't have it. -src/asprintf.c - for systems that don't have it. -src/cdf.c - parser for Microsoft Compound Document Files +src/asctime_r.c - replacement for OS's that don't have it. +src/asprintf.c - replacement for OS's that don't have it. +src/cdf.[ch] - parser for Microsoft Compound Document Files src/cdf_time.c - time converter for CDF. src/compress.c - handles decompressing files to look inside. -src/ctime_r.c - for systems that don't have it. +src/ctime_r.c - replacement for OS's that don't have it. +src/elfclass.h - common code for elf 32/64. src/encoding.c - handles unicode encodings src/file.c - the main program src/file.h - header file +src/file_opts.h - list of options +src/fmtcheck.c - replacement for OS's that don't have it. src/fsmagic.c - first set of tests the program runs, based on filesystem info src/funcs.c - utilility functions -src/getopt_long.c - for systems that don't have it. -src/getline.c - for systems that don't have it. +src/getline.c - replacement for OS's that don't have it. +src/getopt_long.c - replacement for OS's that don't have it. src/is_tar.c, tar.h - knows about tarchives (courtesy John Gilmore). src/names.h - header file for ascmagic.c +src/magic.h.in - source file for magic.h src/magic.c - the libmagic api +src/pread.c - replacement for OS's that don't have it. src/print.c - print results, errors, warnings. src/readcdf.c - CDF wrapper. src/readelf.[ch] - Stand-alone elf parsing code. src/softmagic.c - 2nd set of tests, based on /etc/magic -src/strlcat.c - for systems that don't have it. -src/strlcpy.c - for systems that don't have it. +src/mygetopt.h - replacement for OS's that don't have it. +src/strcasestr.c - replacement for OS's that don't have it. +src/strlcat.c - replacement for OS's that don't have it. +src/strlcpy.c - replacement for OS's that don't have it. +src/tar.h - tar file definitions src/vasprintf.c - for systems that don't have it. doc/file.man - man page for the command doc/magic.man - man page for the magic file, courtesy Guy Harris. Modified: stable/9/contrib/file/aclocal.m4 ============================================================================== --- stable/9/contrib/file/aclocal.m4 Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/aclocal.m4 Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.14 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -21,7 +21,7 @@ If you have problems, you may need to re To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # visibility.m4 serial 5 (gettext-0.18.2) -dnl Copyright (C) 2005, 2008, 2010-2014 Free Software Foundation, Inc. +dnl Copyright (C) 2005, 2008, 2010-2013 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. @@ -113,7 +113,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.14.1], [], +m4_if([$1], [1.14], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -129,7 +129,7 @@ m4_define([_AM_AUTOCONF_VERSION], []) # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.14.1])dnl +[AM_AUTOMAKE_VERSION([1.14])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) Modified: stable/9/contrib/file/configure ============================================================================== --- stable/9/contrib/file/configure Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/configure Fri Jan 23 18:50:36 2015 (r277593) @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for file 5.21. +# Generated by GNU Autoconf 2.69 for file 5.22. # # Report bugs to . # @@ -590,8 +590,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='file' PACKAGE_TARNAME='file' -PACKAGE_VERSION='5.21' -PACKAGE_STRING='file 5.21' +PACKAGE_VERSION='5.22' +PACKAGE_STRING='file 5.22' PACKAGE_BUGREPORT='christos@astron.com' PACKAGE_URL='' @@ -1327,7 +1327,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures file 5.21 to adapt to many kinds of systems. +\`configure' configures file 5.22 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1397,7 +1397,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of file 5.21:";; + short | recursive ) echo "Configuration of file 5.22:";; esac cat <<\_ACEOF @@ -1507,7 +1507,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -file configure 5.21 +file configure 5.22 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2163,7 +2163,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by file $as_me 5.21, which was +It was created by file $as_me 5.22, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3029,7 +3029,7 @@ fi # Define the identity of the package. PACKAGE='file' - VERSION='5.21' + VERSION='5.22' cat >>confdefs.h <<_ACEOF @@ -14998,7 +14998,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_wri # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by file $as_me 5.21, which was +This file was extended by file $as_me 5.22, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -15064,7 +15064,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -file config.status 5.21 +file config.status 5.22 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Modified: stable/9/contrib/file/configure.ac ============================================================================== --- stable/9/contrib/file/configure.ac Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/configure.ac Fri Jan 23 18:50:36 2015 (r277593) @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([file],[5.21],[christos@astron.com]) +AC_INIT([file],[5.22],[christos@astron.com]) AM_INIT_AUTOMAKE([subdir-objects foreign]) m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) Modified: stable/9/contrib/file/doc/Makefile.in ============================================================================== --- stable/9/contrib/file/doc/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/doc/Makefile.in Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. Modified: stable/9/contrib/file/doc/file.man ============================================================================== --- stable/9/contrib/file/doc/file.man Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/doc/file.man Fri Jan 23 18:50:36 2015 (r277593) @@ -1,5 +1,5 @@ -.\" $File: file.man,v 1.110 2014/11/28 02:46:39 christos Exp $ -.Dd November 27, 2014 +.\" $File: file.man,v 1.111 2014/12/16 23:18:40 christos Exp $ +.Dd December 16, 2014 .Dt FILE __CSECTION__ .Os .Sh NAME @@ -310,6 +310,7 @@ Set various parameter limits. .It Sy "Name" Ta Sy "Default" Ta Sy "Explanation" .It Li indir Ta 15 Ta recursion limit for indirect magic .It Li name Ta 30 Ta use count limit for name/use magic +.It Li elf_notes Ta 256 Ta max ELF notes processed .It Li elf_phnum Ta 128 Ta max ELF program sections processed .It Li elf_shnum Ta 32768 Ta max ELF sections processed .El Modified: stable/9/contrib/file/doc/libmagic.man ============================================================================== --- stable/9/contrib/file/doc/libmagic.man Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/doc/libmagic.man Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -.\" $File: libmagic.man,v 1.33 2014/11/28 02:46:39 christos Exp $ +.\" $File: libmagic.man,v 1.34 2014/12/16 23:18:40 christos Exp $ .\" .\" Copyright (c) Christos Zoulas 2003. .\" All Rights Reserved. @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 27, 2014 +.Dd December 16, 2014 .Dt LIBMAGIC 3 .Os .Sh NAME @@ -284,6 +284,7 @@ library. .It Sy "Parameter" Ta Sy "Type" Ta Sy "Default" .It Li MAGIC_PARAM_INDIR_MAX Ta size_t Ta 15 .It Li MAGIC_PARAM_NAME_MAX Ta size_t Ta 30 +.It Li MAGIC_PARAM_ELF_NOTES_MAX Ta size_t Ta 256 .It Li MAGIC_PARAM_ELF_PHNUM_MAX Ta size_t Ta 128 .It Li MAGIC_PARAM_ELF_SHNUM_MAX Ta size_t Ta 32768 .El @@ -303,12 +304,16 @@ The parameter controls the maximum number of calls for name/use. .Pp The +.Dv MAGIC_PARAM_NOTES_MAX +parameter controls how many ELF notes will be processed. +.Pp +The .Dv MAGIC_PARAM_PHNUM_MAX -parameter controls how many elf program sections will be processed. +parameter controls how many ELF program sections will be processed. .Pp The .Dv MAGIC_PARAM_SHNUM_MAX -parameter controls how many elf sections will be processed. +parameter controls how many ELF sections will be processed. .Pp The .Fn magic_version Modified: stable/9/contrib/file/doc/magic.man ============================================================================== --- stable/9/contrib/file/doc/magic.man Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/doc/magic.man Fri Jan 23 18:50:36 2015 (r277593) @@ -1,5 +1,5 @@ -.\" $File: magic.man,v 1.84 2014/06/03 19:01:34 christos Exp $ -.Dd June 3, 2014 +.\" $File: magic.man,v 1.85 2015/01/01 17:07:34 christos Exp $ +.Dd January 1, 2015 .Dt MAGIC __FSECTION__ .Os .\" install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems. @@ -200,6 +200,11 @@ interpreted as a UNIX-style date, but in than UTC. .It Dv indirect Starting at the given offset, consult the magic database again. +The offset of th +.Dv indirect +magic is by default absolute in the file, but one can specify +.Dv /r +to indicate that the offset is relative from the beginning of the entry. .It Dv name Define a .Dq named Modified: stable/9/contrib/file/magic/Localstuff ============================================================================== --- stable/9/contrib/file/magic/Localstuff Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Localstuff Fri Jan 23 18:50:36 2015 (r277593) @@ -2,6 +2,6 @@ #------------------------------------------------------------------------------ # Localstuff: file(1) magic for locally observed files # -# $File: Localstuff,v 1.5 2007/01/12 17:38:27 christos Exp $ +# $File: Localstuff,v 1.4 2003/03/23 04:17:27 christos Exp $ # Add any locally observed files here. Remember: # text if readable, executable if runnable binary, data if unreadable. Modified: stable/9/contrib/file/magic/Magdir/cafebabe ============================================================================== --- stable/9/contrib/file/magic/Magdir/cafebabe Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Magdir/cafebabe Fri Jan 23 18:50:36 2015 (r277593) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: cafebabe,v 1.16 2014/04/30 21:41:02 christos Exp $ +# $File: cafebabe,v 1.17 2015/01/01 17:07:00 christos Exp $ # Cafe Babes unite! # # Since Java bytecode and Mach-O universal binaries have the same magic number, @@ -45,7 +45,7 @@ 0 name mach-o \b [ >0 use mach-o-cpu \b ->&(8.L) indirect \b: +>(8.L) indirect \b: >0 belong x \b] 0 belong 0xcafebabe Modified: stable/9/contrib/file/magic/Magdir/filesystems ============================================================================== --- stable/9/contrib/file/magic/Magdir/filesystems Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Magdir/filesystems Fri Jan 23 18:50:36 2015 (r277593) @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------ -# $File: filesystems,v 1.107 2014/12/03 18:02:52 christos Exp $ +# $File: filesystems,v 1.108 2015/01/01 17:43:47 christos Exp $ # filesystems: file(1) magic for different filesystems # 0 name partid @@ -260,6 +260,13 @@ >>(11.s-2) uleshort 0xAA55 DOS/MBR boot sector # for sector sizes with 512 or more Bytes >0x1FE leshort 0xAA55 DOS/MBR boot sector + +# keep old DOS/MBR boot sector as dummy for mbr and bootloader displaying +# only for sector sizes with 512 or more Bytes +0x1FE leshort 0xAA55 DOS/MBR boot sector +# +# to display information (50) before DOS BPB (strength=70) and after DOS floppy (120) like in old file version +!:strength +65 >2 string OSBS OS/BS MBR # added by Joerg Jenderek at Feb 2013 according to http://thestarman.pcministry.com/asm/mbr/ # and http://en.wikipedia.org/wiki/Master_Boot_Record Modified: stable/9/contrib/file/magic/Magdir/images ============================================================================== --- stable/9/contrib/file/magic/Magdir/images Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Magdir/images Fri Jan 23 18:50:36 2015 (r277593) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: images,v 1.97 2014/12/08 16:06:19 christos Exp $ +# $File: images,v 1.102 2015/01/02 02:36:35 christos Exp $ # images: file(1) magic for image formats (see also "iff", and "c-lang" for # XPM bitmaps) # @@ -115,7 +115,7 @@ # never changed. The TIFF specification recommends testing for it. 0 string MM\x00\x2a TIFF image data, big-endian !:mime image/tiff ->(4.L) use tiff_ifd +>(4.L) use \^tiff_ifd 0 string II\x2a\x00 TIFF image data, little-endian !:mime image/tiff >(4.l) use tiff_ifd @@ -125,54 +125,57 @@ >2 use tiff_entry 0 name tiff_entry +# NewSubFileType +>0 leshort 0xfe +>>12 use tiff_entry >0 leshort 0x100 >>4 lelong 1 >>>12 use tiff_entry ->>>8 lelong x \b, width=%d +>>>8 leshort x \b, width=%d >0 leshort 0x101 >>4 lelong 1 ->>>8 lelong x \b, height=%d +>>>8 leshort x \b, height=%d >>>12 use tiff_entry >0 leshort 0x102 ->>8 lelong x \b, bps=%d +>>8 leshort x \b, bps=%d >>12 use tiff_entry >0 leshort 0x103 >>4 lelong 1 \b, compression= ->>>8 lelong 1 \bnone ->>>8 lelong 2 \bhuffman ->>>8 lelong 3 \bbi-level group 3 ->>>8 lelong 4 \bbi-level group 4 ->>>8 lelong 5 \bLZW ->>>8 lelong 6 \bJPEG (old) ->>>8 lelong 7 \bJPEG ->>>8 lelong 8 \bdeflate ->>>8 lelong 9 \bJBIG, ITU-T T.85 ->>>8 lelong 0xa \bJBIG, ITU-T T.43 ->>>8 lelong 0x7ffe \bNeXT RLE 2-bit ->>>8 lelong 0x8005 \bPackBits (Macintosh RLE) ->>>8 lelong 0x8029 \bThunderscan RLE ->>>8 lelong 0x807f \bRasterPadding (CT or MP) ->>>8 lelong 0x8080 \bRLE (Line Work) ->>>8 lelong 0x8081 \bRLE (High-Res Cont-Tone) ->>>8 lelong 0x8082 \bRLE (Binary Line Work) ->>>8 lelong 0x80b2 \bDeflate (PKZIP) ->>>8 lelong 0x80b3 \bKodak DCS ->>>8 lelong 0x8765 \bJBIG ->>>8 lelong 0x8798 \bJPEG2000 ->>>8 lelong 0x8799 \bNikon NEF Compressed +>>>8 leshort 1 \bnone +>>>8 leshort 2 \bhuffman +>>>8 leshort 3 \bbi-level group 3 +>>>8 leshort 4 \bbi-level group 4 +>>>8 leshort 5 \bLZW +>>>8 leshort 6 \bJPEG (old) +>>>8 leshort 7 \bJPEG +>>>8 leshort 8 \bdeflate +>>>8 leshort 9 \bJBIG, ITU-T T.85 +>>>8 leshort 0xa \bJBIG, ITU-T T.43 +>>>8 leshort 0x7ffe \bNeXT RLE 2-bit +>>>8 leshort 0x8005 \bPackBits (Macintosh RLE) +>>>8 leshort 0x8029 \bThunderscan RLE +>>>8 leshort 0x807f \bRasterPadding (CT or MP) +>>>8 leshort 0x8080 \bRLE (Line Work) +>>>8 leshort 0x8081 \bRLE (High-Res Cont-Tone) +>>>8 leshort 0x8082 \bRLE (Binary Line Work) +>>>8 leshort 0x80b2 \bDeflate (PKZIP) +>>>8 leshort 0x80b3 \bKodak DCS +>>>8 leshort 0x8765 \bJBIG +>>>8 leshort 0x8798 \bJPEG2000 +>>>8 leshort 0x8799 \bNikon NEF Compressed >>>8 default x ->>>>8 lelong x \b(unknown 0x%x) +>>>>8 leshort x \b(unknown 0x%x) >>>12 use tiff_entry >0 leshort 0x106 \b, PhotometricIntepretation= ->>8 lelong 0 \bWhiteIsZero ->>8 lelong 1 \bBlackIsZero ->>8 lelong 2 \bRGB ->>8 lelong 3 \bRGB Palette ->>8 lelong 4 \bTransparency Mask ->>8 lelong 5 \bCMYK ->>8 lelong 6 \bYCbCr ->>8 lelong 8 \bCIELab ->>>8 lelong x \b(unknown=0x%x) +>>8 leshort 0 \bWhiteIsZero +>>8 leshort 1 \bBlackIsZero +>>8 leshort 2 \bRGB +>>8 leshort 3 \bRGB Palette +>>8 leshort 4 \bTransparency Mask +>>8 leshort 5 \bCMYK +>>8 leshort 6 \bYCbCr +>>8 leshort 8 \bCIELab +>>>8 leshort x \b(unknown=0x%x) >>12 use tiff_entry # FillOrder >0 leshort 0x10a @@ -186,21 +189,79 @@ >0 leshort 0x10e >>(8.l) string x \b, description=%s >>>12 use tiff_entry +# Make +>0 leshort 0x10f +>>(8.l) string x \b, manufacturer=%s +>>>12 use tiff_entry +# Model +>0 leshort 0x110 +>>(8.l) string x \b, model=%s +>>>12 use tiff_entry # StripOffsets >0 leshort 0x111 >>12 use tiff_entry -# NewSubFileType ->0 leshort 0xfe +# Orientation +>0 leshort 0x112 \b, orientation= +>>8 leshort 1 \bupper-left +>>8 leshort 3 \blower-right +>>8 leshort 6 \bupper-right +>>8 leshort 8 \blower-left +>>8 leshort 9 \bundefined +>>8 default x +>>>8 leshort x \b[*%d*] +>>12 use tiff_entry +# XResolution +>0 leshort 0x11a +>>8 lelong x \b, xresolution=%d +>>12 use tiff_entry +# YResolution +>0 leshort 0x11b +>>8 lelong x \b, yresolution=%d +>>12 use tiff_entry +# ResolutionUnit +>0 leshort 0x128 +>>8 leshort x \b, resolutionunit=%d +>>12 use tiff_entry +# Software +>0 leshort 0x131 +>>(8.l) string x \b, software=%s >>12 use tiff_entry # Datetime >0 leshort 0x132 >>(8.l) string x \b, datetime=%s ->>>12 use tiff_entry +>>12 use tiff_entry # HostComputer >0 leshort 0x13c >>(8.l) string x \b, hostcomputer=%s ->>>12 use tiff_entry +>>12 use tiff_entry +# WhitePoint +>0 leshort 0x13e +>>12 use tiff_entry +# PrimaryChromaticities +>0 leshort 0x13f +>>12 use tiff_entry +# YCbCrCoefficients +>0 leshort 0x211 +>>12 use tiff_entry +# YCbCrPositioning +>0 leshort 0x213 +>>12 use tiff_entry +# ReferenceBlackWhite +>0 leshort 0x214 +>>12 use tiff_entry +# Copyright +>0 leshort 0x8298 +>>(8.l) string x \b, copyright=%s +>>12 use tiff_entry +# ExifOffset +>0 leshort 0x8769 +>>12 use tiff_entry +# GPS IFD +>0 leshort 0x8825 \b, GPS-Data +>>12 use tiff_entry + #>0 leshort x \b, unknown=0x%x +#>>12 use tiff_entry 0 string MM\x00\x2b Big TIFF image data, big-endian !:mime image/tiff Modified: stable/9/contrib/file/magic/Magdir/jpeg ============================================================================== --- stable/9/contrib/file/magic/Magdir/jpeg Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Magdir/jpeg Fri Jan 23 18:50:36 2015 (r277593) @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------ -# $File: jpeg,v 1.21 2014/09/12 20:47:00 christos Exp $ +# $File: jpeg,v 1.25 2015/01/02 16:56:50 christos Exp $ # JPEG images # SunOS 5.5.1 had # @@ -31,98 +31,9 @@ # Next, show thumbnail info, if it exists: >>18 byte !0 \b, thumbnail %dx >>>19 byte x \b%d - -# EXIF moved down here to avoid reporting a bogus version number, -# and EXIF version number printing added. -# - Patrik R=E5dman ->6 string Exif \b, EXIF standard -# Look for EXIF IFD offset in IFD 0, and then look for EXIF version tag in EXIF IFD. -# All possible combinations of entries have to be enumerated, since no looping -# is possible. And both endians are possible... -# The combinations included below are from real-world JPEGs. -# Little-endian ->>12 string II -# IFD 0 Entry #5: ->>>70 leshort 0x8769 -# EXIF IFD Entry #1: ->>>>(78.l+14) leshort 0x9000 ->>>>>(78.l+23) byte x %c ->>>>>(78.l+24) byte x \b.%c ->>>>>(78.l+25) byte !0x30 \b%c -# IFD 0 Entry #9: ->>>118 leshort 0x8769 -# EXIF IFD Entry #3: ->>>>(126.l+38) leshort 0x9000 ->>>>>(126.l+47) byte x %c ->>>>>(126.l+48) byte x \b.%c ->>>>>(126.l+49) byte !0x30 \b%c -# IFD 0 Entry #10 ->>>130 leshort 0x8769 -# EXIF IFD Entry #3: ->>>>(138.l+38) leshort 0x9000 ->>>>>(138.l+47) byte x %c ->>>>>(138.l+48) byte x \b.%c ->>>>>(138.l+49) byte !0x30 \b%c -# EXIF IFD Entry #4: ->>>>(138.l+50) leshort 0x9000 ->>>>>(138.l+59) byte x %c ->>>>>(138.l+60) byte x \b.%c ->>>>>(138.l+61) byte !0x30 \b%c -# EXIF IFD Entry #5: ->>>>(138.l+62) leshort 0x9000 ->>>>>(138.l+71) byte x %c ->>>>>(138.l+72) byte x \b.%c ->>>>>(138.l+73) byte !0x30 \b%c -# IFD 0 Entry #11 ->>>142 leshort 0x8769 -# EXIF IFD Entry #3: ->>>>(150.l+38) leshort 0x9000 ->>>>>(150.l+47) byte x %c ->>>>>(150.l+48) byte x \b.%c ->>>>>(150.l+49) byte !0x30 \b%c -# EXIF IFD Entry #4: ->>>>(150.l+50) leshort 0x9000 ->>>>>(150.l+59) byte x %c ->>>>>(150.l+60) byte x \b.%c ->>>>>(150.l+61) byte !0x30 \b%c -# EXIF IFD Entry #5: ->>>>(150.l+62) leshort 0x9000 ->>>>>(150.l+71) byte x %c ->>>>>(150.l+72) byte x \b.%c ->>>>>(150.l+73) byte !0x30 \b%c -# Big-endian ->>12 string MM -# IFD 0 Entry #9: ->>>118 beshort 0x8769 -# EXIF IFD Entry #1: ->>>>(126.L+14) beshort 0x9000 ->>>>>(126.L+23) byte x %c ->>>>>(126.L+24) byte x \b.%c ->>>>>(126.L+25) byte !0x30 \b%c -# EXIF IFD Entry #3: ->>>>(126.L+38) beshort 0x9000 ->>>>>(126.L+47) byte x %c ->>>>>(126.L+48) byte x \b.%c ->>>>>(126.L+49) byte !0x30 \b%c -# IFD 0 Entry #10 ->>>130 beshort 0x8769 -# EXIF IFD Entry #3: ->>>>(138.L+38) beshort 0x9000 ->>>>>(138.L+47) byte x %c ->>>>>(138.L+48) byte x \b.%c ->>>>>(138.L+49) byte !0x30 \b%c -# EXIF IFD Entry #5: ->>>>(138.L+62) beshort 0x9000 ->>>>>(138.L+71) byte x %c ->>>>>(138.L+72) byte x \b.%c ->>>>>(138.L+73) byte !0x30 \b%c -# IFD 0 Entry #11 ->>>142 beshort 0x8769 -# EXIF IFD Entry #4: ->>>>(150.L+50) beshort 0x9000 ->>>>>(150.L+59) byte x %c ->>>>>(150.L+60) byte x \b.%c ->>>>>(150.L+61) byte !0x30 \b%c +>6 string Exif \b, Exif standard: [ +>>12 indirect/r x +>>12 string x \b] # Jump to the first segment >(4.S+4) use jpeg_segment @@ -158,6 +69,12 @@ >0 beshort 0xFFC4 >>(2.S+2) use jpeg_segment +>0 beshort 0xFFE1 +#>>(2.S+2) use jpeg_segment +>>4 string Exif \b, Exif Standard: [ +>>>10 indirect/r x +>>>10 string x \b] + # Application specific markers >0 beshort&0xFFE0 =0xFFE0 >>(2.S+2) use jpeg_segment @@ -170,6 +87,9 @@ >0 beshort&0xFFD0 =0xFFD0 >>(2.S+2) use jpeg_segment +#>0 beshort x unknown 0x%x +#>>(2.S+2) use jpeg_segment + # HSI is Handmade Software's proprietary JPEG encoding scheme 0 string hsi1 JPEG image data, HSI proprietary Copied: stable/9/contrib/file/magic/Magdir/qt (from r276577, head/contrib/file/magic/Magdir/qt) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ stable/9/contrib/file/magic/Magdir/qt Fri Jan 23 18:50:36 2015 (r277593, copy of r276577, head/contrib/file/magic/Magdir/qt) @@ -0,0 +1,19 @@ + +#------------------------------------------------------------------------------ +# $File: qt,v 1.2 2014/12/16 19:49:29 christos Exp $ +# qt: file(1) magic for Qt + +# http://doc.qt.io/qt-5/resources.html +0 string \ Qt Resource Collection file + +# https://qt.gitorious.org/qt/qtbase/source/\ +# 5367fa356233da4c0f28172a8f817791525f5457:\ +# src/tools/rcc/rcc.cpp#L840 +0 string qres\0\0 Qt Binary Resource file +0 search/1024 The\040Resource\040Compiler\040for\040Qt Qt C-code resource file + +# https://qt.gitorious.org/qt/qtbase/source/\ +# 5367fa356233da4c0f28172a8f817791525f5457:\ +# src/corelib/kernel/qtranslator.cpp#L62 +0 string \x3c\xb8\x64\x18\xca\xef\x9c\x95 +>8 string \xcd\x21\x1c\xbf\x60\xa1\xbd\xdd Qt Translation file Modified: stable/9/contrib/file/magic/Makefile.am ============================================================================== --- stable/9/contrib/file/magic/Makefile.am Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Makefile.am Fri Jan 23 18:50:36 2015 (r277593) @@ -1,5 +1,5 @@ # -# $File: Makefile.am,v 1.100 2014/12/10 18:45:43 christos Exp $ +# $File: Makefile.am,v 1.101 2014/12/12 16:48:39 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -198,6 +198,7 @@ $(MAGIC_FRAGMENT_DIR)/pulsar \ $(MAGIC_FRAGMENT_DIR)/pwsafe \ $(MAGIC_FRAGMENT_DIR)/pyramid \ $(MAGIC_FRAGMENT_DIR)/python \ +$(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/rpm \ Modified: stable/9/contrib/file/magic/Makefile.in ============================================================================== --- stable/9/contrib/file/magic/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/magic/Makefile.in Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -262,7 +262,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # -# $File: Makefile.am,v 1.100 2014/12/10 18:45:43 christos Exp $ +# $File: Makefile.am,v 1.101 2014/12/12 16:48:39 christos Exp $ # MAGIC_FRAGMENT_BASE = Magdir MAGIC_DIR = $(top_srcdir)/magic @@ -459,6 +459,7 @@ $(MAGIC_FRAGMENT_DIR)/pulsar \ $(MAGIC_FRAGMENT_DIR)/pwsafe \ $(MAGIC_FRAGMENT_DIR)/pyramid \ $(MAGIC_FRAGMENT_DIR)/python \ +$(MAGIC_FRAGMENT_DIR)/qt \ $(MAGIC_FRAGMENT_DIR)/revision \ $(MAGIC_FRAGMENT_DIR)/riff \ $(MAGIC_FRAGMENT_DIR)/rpm \ Modified: stable/9/contrib/file/missing ============================================================================== --- stable/9/contrib/file/missing Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/missing Fri Jan 23 18:50:36 2015 (r277593) @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. @@ -160,7 +160,7 @@ give_advice () ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." + echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) Modified: stable/9/contrib/file/python/Makefile.in ============================================================================== --- stable/9/contrib/file/python/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/python/Makefile.in Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. Modified: stable/9/contrib/file/src/Makefile.in ============================================================================== --- stable/9/contrib/file/src/Makefile.in Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/src/Makefile.in Fri Jan 23 18:50:36 2015 (r277593) @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.14 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -81,9 +81,9 @@ build_triplet = @build@ host_triplet = @host@ bin_PROGRAMS = file$(EXEEXT) subdir = src -DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am strcasestr.c \ - pread.c strlcpy.c vasprintf.c getopt_long.c asctime_r.c \ - strlcat.c ctime_r.c getline.c asprintf.c fmtcheck.c \ +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ctime_r.c \ + vasprintf.c asctime_r.c asprintf.c strcasestr.c pread.c \ + getline.c strlcpy.c strlcat.c fmtcheck.c getopt_long.c \ $(top_srcdir)/depcomp $(include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ Modified: stable/9/contrib/file/src/apprentice.c ============================================================================== --- stable/9/contrib/file/src/apprentice.c Fri Jan 23 18:48:59 2015 (r277592) +++ stable/9/contrib/file/src/apprentice.c Fri Jan 23 18:50:36 2015 (r277593) @@ -32,7 +32,7 @@ #include "file.h" #ifndef lint -FILE_RCSID("@(#)$File: apprentice.c,v 1.227 2014/11/28 02:46:39 christos Exp $") +FILE_RCSID("@(#)$File: apprentice.c,v 1.229 2015/01/01 17:07:34 christos Exp $") #endif /* lint */ #include "magic.h" @@ -528,6 +528,7 @@ file_ms_alloc(int flags) ms->name_max = FILE_NAME_MAX; ms->elf_shnum_max = FILE_ELF_SHNUM_MAX; ms->elf_phnum_max = FILE_ELF_PHNUM_MAX; + ms->elf_notes_max = FILE_ELF_NOTES_MAX; return ms; free: free(ms); @@ -1604,6 +1605,145 @@ check_cond(struct magic_set *ms, int con } #endif /* ENABLE_CONDITIONALS */ +private int +parse_indirect_modifier(struct magic_set *ms, struct magic *m, const char **lp) +{ + const char *l = *lp; + + while (!isspace((unsigned char)*++l)) + switch (*l) { + case CHAR_INDIRECT_RELATIVE: + m->str_flags |= INDIRECT_RELATIVE; + break; + default: + if (ms->flags & MAGIC_CHECK) + file_magwarn(ms, "indirect modifier `%c' " + "invalid", *l); + *lp = l; + return -1; + } + *lp = l; + return 0; +} + +private void +parse_op_modifier(struct magic_set *ms, struct magic *m, const char **lp, + int op) +{ + const char *l = *lp; + char *t; + uint64_t val; + + ++l; + m->mask_op |= op; + val = (uint64_t)strtoull(l, &t, 0); + l = t; + m->num_mask = file_signextend(ms, m, val); + eatsize(&l); + *lp = l; +} + +private int +parse_string_modifier(struct magic_set *ms, struct magic *m, const char **lp) +{ + const char *l = *lp; + char *t; + int have_range = 0; + + while (!isspace((unsigned char)*++l)) { + switch (*l) { + case '0': case '1': case '2': + case '3': case '4': case '5': + case '6': case '7': case '8': + case '9': + if (have_range && (ms->flags & MAGIC_CHECK)) + file_magwarn(ms, "multiple ranges"); + have_range = 1; + m->str_range = CAST(uint32_t, strtoul(l, &t, 0)); + if (m->str_range == 0) + file_magwarn(ms, "zero range"); + l = t - 1; + break; + case CHAR_COMPACT_WHITESPACE: + m->str_flags |= STRING_COMPACT_WHITESPACE; + break; + case CHAR_COMPACT_OPTIONAL_WHITESPACE: + m->str_flags |= STRING_COMPACT_OPTIONAL_WHITESPACE; + break; + case CHAR_IGNORE_LOWERCASE: + m->str_flags |= STRING_IGNORE_LOWERCASE; + break; + case CHAR_IGNORE_UPPERCASE: + m->str_flags |= STRING_IGNORE_UPPERCASE; + break; + case CHAR_REGEX_OFFSET_START: + m->str_flags |= REGEX_OFFSET_START; + break; + case CHAR_BINTEST: + m->str_flags |= STRING_BINTEST; + break; + case CHAR_TEXTTEST: + m->str_flags |= STRING_TEXTTEST; + break; + case CHAR_TRIM: + m->str_flags |= STRING_TRIM; + break; + case CHAR_PSTRING_1_LE: +#define SET_LENGTH(a) m->str_flags = (m->str_flags & ~PSTRING_LEN) | (a) + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_1_LE); + break; + case CHAR_PSTRING_2_BE: + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_2_BE); + break; + case CHAR_PSTRING_2_LE: + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_2_LE); + break; + case CHAR_PSTRING_4_BE: + if (m->type != FILE_PSTRING) + goto bad; + SET_LENGTH(PSTRING_4_BE); + break; + case CHAR_PSTRING_4_LE: + switch (m->type) { + case FILE_PSTRING: + case FILE_REGEX: + break; + default: + goto bad; + } + SET_LENGTH(PSTRING_4_LE); + break; + case CHAR_PSTRING_LENGTH_INCLUDES_ITSELF: + if (m->type != FILE_PSTRING) + goto bad; + m->str_flags |= PSTRING_LENGTH_INCLUDES_ITSELF; + break; + default: + bad: + if (ms->flags & MAGIC_CHECK) + file_magwarn(ms, "string modifier `%c' " + "invalid", *l); + goto out; + } + /* allow multiple '/' for readability */ + if (l[1] == '/' && !isspace((unsigned char)l[2])) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:55:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5128BB29; Fri, 23 Jan 2015 18:55:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CE388C; Fri, 23 Jan 2015 18:55:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIt5bQ036109; Fri, 23 Jan 2015 18:55:05 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIt5KM036108; Fri, 23 Jan 2015 18:55:05 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501231855.t0NIt5KM036108@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Jan 2015 18:55:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277594 - head/sys/dev/acpica X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:55:05 -0000 Author: jkim Date: Fri Jan 23 18:55:04 2015 New Revision: 277594 URL: https://svnweb.freebsd.org/changeset/base/277594 Log: Simplify retry loops. No functional change. Modified: head/sys/dev/acpica/acpi_ec.c Modified: head/sys/dev/acpica/acpi_ec.c ============================================================================== --- head/sys/dev/acpica/acpi_ec.c Fri Jan 23 18:50:36 2015 (r277593) +++ head/sys/dev/acpica/acpi_ec.c Fri Jan 23 18:55:04 2015 (r277594) @@ -645,10 +645,8 @@ EcGpeQueryHandler(void *Context) Status = EcCommand(sc, EC_COMMAND_QUERY); if (ACPI_SUCCESS(Status)) break; - if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check", + if (ACPI_FAILURE(EcCheckStatus(sc, "retr_check", EC_EVENT_INPUT_BUFFER_EMPTY))) - continue; - else break; } sc->ec_sci_pend = FALSE; @@ -963,15 +961,13 @@ EcRead(struct acpi_ec_softc *sc, UINT8 A gen_count = sc->ec_gencount; EC_SET_DATA(sc, Address); status = EcWaitEvent(sc, EC_EVENT_OUTPUT_BUFFER_FULL, gen_count); - if (ACPI_FAILURE(status)) { - if (ACPI_SUCCESS(EcCheckStatus(sc, "retr_check", - EC_EVENT_INPUT_BUFFER_EMPTY))) - continue; - else - break; + if (ACPI_SUCCESS(status)) { + *Data = EC_GET_DATA(sc); + return (AE_OK); } - *Data = EC_GET_DATA(sc); - return (AE_OK); + if (ACPI_FAILURE(EcCheckStatus(sc, "retr_check", + EC_EVENT_INPUT_BUFFER_EMPTY))) + break; } device_printf(sc->ec_dev, "EcRead: failed waiting to get data\n"); return (status); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:55:25 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CD58BDF5; Fri, 23 Jan 2015 18:55:25 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B848398; Fri, 23 Jan 2015 18:55:25 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NItPVf036205; Fri, 23 Jan 2015 18:55:25 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NItP0I036204; Fri, 23 Jan 2015 18:55:25 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231855.t0NItP0I036204@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:55:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277595 - stable/10/sys/dev/syscons/daemon X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:55:25 -0000 Author: delphij Date: Fri Jan 23 18:55:24 2015 New Revision: 277595 URL: https://svnweb.freebsd.org/changeset/base/277595 Log: MFC r276795: Fix sos@'s name. Modified: stable/10/sys/dev/syscons/daemon/daemon_saver.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/dev/syscons/daemon/daemon_saver.c ============================================================================== --- stable/10/sys/dev/syscons/daemon/daemon_saver.c Fri Jan 23 18:55:04 2015 (r277594) +++ stable/10/sys/dev/syscons/daemon/daemon_saver.c Fri Jan 23 18:55:24 2015 (r277595) @@ -1,7 +1,7 @@ /*- * Copyright (c) 1997 Sandro Sigala, Brescia, Italy. * Copyright (c) 1997 Chris Shenton - * Copyright (c) 1995 S ren Schmidt + * Copyright (c) 1995 Søren Schmidt * All rights reserved. * * Redistribution and use in source and binary forms, with or without From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 18:56:32 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 38421F26; Fri, 23 Jan 2015 18:56:32 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 23594A4; Fri, 23 Jan 2015 18:56:32 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NIuWTQ036428; Fri, 23 Jan 2015 18:56:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NIuVI5036427; Fri, 23 Jan 2015 18:56:31 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231856.t0NIuVI5036427@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 18:56:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277596 - stable/10 X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 18:56:32 -0000 Author: delphij Date: Fri Jan 23 18:56:31 2015 New Revision: 277596 URL: https://svnweb.freebsd.org/changeset/base/277596 Log: MFC r276891: var/named/etc/namedb/working should be removed as part of namedb. Modified: stable/10/ObsoleteFiles.inc Directory Properties: stable/10/ (props changed) Modified: stable/10/ObsoleteFiles.inc ============================================================================== --- stable/10/ObsoleteFiles.inc Fri Jan 23 18:55:24 2015 (r277595) +++ stable/10/ObsoleteFiles.inc Fri Jan 23 18:56:31 2015 (r277596) @@ -440,6 +440,7 @@ OLD_FILES+=var/named/etc/namedb/master/l OLD_FILES+=var/named/etc/namedb/master/localhost-reverse.db #OLD_FILES+=var/named/etc/namedb/named.conf # intentionally left out OLD_FILES+=var/named/etc/namedb/named.root +OLD_DIRS+=var/named/etc/namedb/working OLD_DIRS+=var/named/etc/namedb/slave OLD_DIRS+=var/named/var OLD_DIRS+=var/named/var/dump From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:15:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0C83947D; Fri, 23 Jan 2015 19:15:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E726F30F; Fri, 23 Jan 2015 19:15:02 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJF2sI045918; Fri, 23 Jan 2015 19:15:02 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJEbWd045726; Fri, 23 Jan 2015 19:14:37 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501231914.t0NJEbWd045726@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Jan 2015 19:14:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277597 - in stable/10: crypto/openssl crypto/openssl/crypto crypto/openssl/crypto/ecdsa crypto/openssl/crypto/x509v3 crypto/openssl/util secure/lib/libcrypto secure/lib/libcrypto/man s... X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:15:03 -0000 Author: jkim Date: Fri Jan 23 19:14:36 2015 New Revision: 277597 URL: https://svnweb.freebsd.org/changeset/base/277597 Log: MFC: r277270 Merge OpenSSL 1.0.1l. Relnotes: yes Modified: stable/10/crypto/openssl/CHANGES stable/10/crypto/openssl/Makefile stable/10/crypto/openssl/NEWS stable/10/crypto/openssl/README stable/10/crypto/openssl/crypto/Makefile stable/10/crypto/openssl/crypto/ecdsa/Makefile stable/10/crypto/openssl/crypto/ecdsa/ecs_vrf.c stable/10/crypto/openssl/crypto/opensslv.h stable/10/crypto/openssl/crypto/x509v3/v3_ncons.c stable/10/crypto/openssl/e_os.h stable/10/crypto/openssl/util/mk1mf.pl stable/10/secure/lib/libcrypto/Makefile.inc stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 stable/10/secure/lib/libcrypto/man/BIO_f_md.3 stable/10/secure/lib/libcrypto/man/BIO_f_null.3 stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 stable/10/secure/lib/libcrypto/man/BIO_find_type.3 stable/10/secure/lib/libcrypto/man/BIO_new.3 stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 stable/10/secure/lib/libcrypto/man/BIO_push.3 stable/10/secure/lib/libcrypto/man/BIO_read.3 stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 stable/10/secure/lib/libcrypto/man/BIO_s_file.3 stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 stable/10/secure/lib/libcrypto/man/BIO_s_null.3 stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 stable/10/secure/lib/libcrypto/man/BN_add.3 stable/10/secure/lib/libcrypto/man/BN_add_word.3 stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 stable/10/secure/lib/libcrypto/man/BN_cmp.3 stable/10/secure/lib/libcrypto/man/BN_copy.3 stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 stable/10/secure/lib/libcrypto/man/BN_new.3 stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 stable/10/secure/lib/libcrypto/man/BN_rand.3 stable/10/secure/lib/libcrypto/man/BN_set_bit.3 stable/10/secure/lib/libcrypto/man/BN_swap.3 stable/10/secure/lib/libcrypto/man/BN_zero.3 stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 stable/10/secure/lib/libcrypto/man/CMS_compress.3 stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 stable/10/secure/lib/libcrypto/man/CMS_final.3 stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 stable/10/secure/lib/libcrypto/man/CMS_sign.3 stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 stable/10/secure/lib/libcrypto/man/CMS_verify.3 stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 stable/10/secure/lib/libcrypto/man/DH_generate_key.3 stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DH_new.3 stable/10/secure/lib/libcrypto/man/DH_set_method.3 stable/10/secure/lib/libcrypto/man/DH_size.3 stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/DSA_new.3 stable/10/secure/lib/libcrypto/man/DSA_set_method.3 stable/10/secure/lib/libcrypto/man/DSA_sign.3 stable/10/secure/lib/libcrypto/man/DSA_size.3 stable/10/secure/lib/libcrypto/man/ERR_GET_LIB.3 stable/10/secure/lib/libcrypto/man/ERR_clear_error.3 stable/10/secure/lib/libcrypto/man/ERR_error_string.3 stable/10/secure/lib/libcrypto/man/ERR_get_error.3 stable/10/secure/lib/libcrypto/man/ERR_load_crypto_strings.3 stable/10/secure/lib/libcrypto/man/ERR_load_strings.3 stable/10/secure/lib/libcrypto/man/ERR_print_errors.3 stable/10/secure/lib/libcrypto/man/ERR_put_error.3 stable/10/secure/lib/libcrypto/man/ERR_remove_state.3 stable/10/secure/lib/libcrypto/man/ERR_set_mark.3 stable/10/secure/lib/libcrypto/man/EVP_BytesToKey.3 stable/10/secure/lib/libcrypto/man/EVP_DigestInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestSignInit.3 stable/10/secure/lib/libcrypto/man/EVP_DigestVerifyInit.3 stable/10/secure/lib/libcrypto/man/EVP_EncryptInit.3 stable/10/secure/lib/libcrypto/man/EVP_OpenInit.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_ctrl.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_CTX_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_cmp.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_decrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_derive.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_encrypt.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_get_default_digest.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_keygen.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_new.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_print_private.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_set1_RSA.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_sign.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify.3 stable/10/secure/lib/libcrypto/man/EVP_PKEY_verify_recover.3 stable/10/secure/lib/libcrypto/man/EVP_SealInit.3 stable/10/secure/lib/libcrypto/man/EVP_SignInit.3 stable/10/secure/lib/libcrypto/man/EVP_VerifyInit.3 stable/10/secure/lib/libcrypto/man/OBJ_nid2obj.3 stable/10/secure/lib/libcrypto/man/OPENSSL_Applink.3 stable/10/secure/lib/libcrypto/man/OPENSSL_VERSION_NUMBER.3 stable/10/secure/lib/libcrypto/man/OPENSSL_config.3 stable/10/secure/lib/libcrypto/man/OPENSSL_ia32cap.3 stable/10/secure/lib/libcrypto/man/OPENSSL_load_builtin_modules.3 stable/10/secure/lib/libcrypto/man/OpenSSL_add_all_algorithms.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_CMS_stream.3 stable/10/secure/lib/libcrypto/man/PEM_write_bio_PKCS7_stream.3 stable/10/secure/lib/libcrypto/man/PKCS12_create.3 stable/10/secure/lib/libcrypto/man/PKCS12_parse.3 stable/10/secure/lib/libcrypto/man/PKCS7_decrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_encrypt.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign.3 stable/10/secure/lib/libcrypto/man/PKCS7_sign_add_signer.3 stable/10/secure/lib/libcrypto/man/PKCS7_verify.3 stable/10/secure/lib/libcrypto/man/RAND_add.3 stable/10/secure/lib/libcrypto/man/RAND_bytes.3 stable/10/secure/lib/libcrypto/man/RAND_cleanup.3 stable/10/secure/lib/libcrypto/man/RAND_egd.3 stable/10/secure/lib/libcrypto/man/RAND_load_file.3 stable/10/secure/lib/libcrypto/man/RAND_set_rand_method.3 stable/10/secure/lib/libcrypto/man/RSA_blinding_on.3 stable/10/secure/lib/libcrypto/man/RSA_check_key.3 stable/10/secure/lib/libcrypto/man/RSA_generate_key.3 stable/10/secure/lib/libcrypto/man/RSA_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/RSA_new.3 stable/10/secure/lib/libcrypto/man/RSA_padding_add_PKCS1_type_1.3 stable/10/secure/lib/libcrypto/man/RSA_print.3 stable/10/secure/lib/libcrypto/man/RSA_private_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_public_encrypt.3 stable/10/secure/lib/libcrypto/man/RSA_set_method.3 stable/10/secure/lib/libcrypto/man/RSA_sign.3 stable/10/secure/lib/libcrypto/man/RSA_sign_ASN1_OCTET_STRING.3 stable/10/secure/lib/libcrypto/man/RSA_size.3 stable/10/secure/lib/libcrypto/man/SMIME_read_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_read_PKCS7.3 stable/10/secure/lib/libcrypto/man/SMIME_write_CMS.3 stable/10/secure/lib/libcrypto/man/SMIME_write_PKCS7.3 stable/10/secure/lib/libcrypto/man/X509_NAME_ENTRY_get_object.3 stable/10/secure/lib/libcrypto/man/X509_NAME_add_entry_by_txt.3 stable/10/secure/lib/libcrypto/man/X509_NAME_get_index_by_NID.3 stable/10/secure/lib/libcrypto/man/X509_NAME_print_ex.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_error.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_get_ex_new_index.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_new.3 stable/10/secure/lib/libcrypto/man/X509_STORE_CTX_set_verify_cb.3 stable/10/secure/lib/libcrypto/man/X509_STORE_set_verify_cb_func.3 stable/10/secure/lib/libcrypto/man/X509_VERIFY_PARAM_set_flags.3 stable/10/secure/lib/libcrypto/man/X509_new.3 stable/10/secure/lib/libcrypto/man/X509_verify_cert.3 stable/10/secure/lib/libcrypto/man/bio.3 stable/10/secure/lib/libcrypto/man/blowfish.3 stable/10/secure/lib/libcrypto/man/bn.3 stable/10/secure/lib/libcrypto/man/bn_internal.3 stable/10/secure/lib/libcrypto/man/buffer.3 stable/10/secure/lib/libcrypto/man/crypto.3 stable/10/secure/lib/libcrypto/man/d2i_ASN1_OBJECT.3 stable/10/secure/lib/libcrypto/man/d2i_DHparams.3 stable/10/secure/lib/libcrypto/man/d2i_DSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_PKCS8PrivateKey.3 stable/10/secure/lib/libcrypto/man/d2i_RSAPublicKey.3 stable/10/secure/lib/libcrypto/man/d2i_X509.3 stable/10/secure/lib/libcrypto/man/d2i_X509_ALGOR.3 stable/10/secure/lib/libcrypto/man/d2i_X509_CRL.3 stable/10/secure/lib/libcrypto/man/d2i_X509_NAME.3 stable/10/secure/lib/libcrypto/man/d2i_X509_REQ.3 stable/10/secure/lib/libcrypto/man/d2i_X509_SIG.3 stable/10/secure/lib/libcrypto/man/des.3 stable/10/secure/lib/libcrypto/man/dh.3 stable/10/secure/lib/libcrypto/man/dsa.3 stable/10/secure/lib/libcrypto/man/ecdsa.3 stable/10/secure/lib/libcrypto/man/engine.3 stable/10/secure/lib/libcrypto/man/err.3 stable/10/secure/lib/libcrypto/man/evp.3 stable/10/secure/lib/libcrypto/man/hmac.3 stable/10/secure/lib/libcrypto/man/i2d_CMS_bio_stream.3 stable/10/secure/lib/libcrypto/man/i2d_PKCS7_bio_stream.3 stable/10/secure/lib/libcrypto/man/lh_stats.3 stable/10/secure/lib/libcrypto/man/lhash.3 stable/10/secure/lib/libcrypto/man/md5.3 stable/10/secure/lib/libcrypto/man/mdc2.3 stable/10/secure/lib/libcrypto/man/pem.3 stable/10/secure/lib/libcrypto/man/rand.3 stable/10/secure/lib/libcrypto/man/rc4.3 stable/10/secure/lib/libcrypto/man/ripemd.3 stable/10/secure/lib/libcrypto/man/rsa.3 stable/10/secure/lib/libcrypto/man/sha.3 stable/10/secure/lib/libcrypto/man/threads.3 stable/10/secure/lib/libcrypto/man/ui.3 stable/10/secure/lib/libcrypto/man/ui_compat.3 stable/10/secure/lib/libcrypto/man/x509.3 stable/10/secure/lib/libssl/man/SSL_CIPHER_get_name.3 stable/10/secure/lib/libssl/man/SSL_COMP_add_compression_method.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_extra_chain_cert.3 stable/10/secure/lib/libssl/man/SSL_CTX_add_session.3 stable/10/secure/lib/libssl/man/SSL_CTX_ctrl.3 stable/10/secure/lib/libssl/man/SSL_CTX_flush_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_free.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_CTX_get_verify_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_load_verify_locations.3 stable/10/secure/lib/libssl/man/SSL_CTX_new.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_number.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_cache_size.3 stable/10/secure/lib/libssl/man/SSL_CTX_sess_set_get_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_sessions.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_store.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cert_verify_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_cipher_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_client_cert_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_default_passwd_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_generate_session_id.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_info_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_max_cert_list.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_msg_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_options.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_psk_client_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_quiet_shutdown.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_cache_mode.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_session_id_context.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_ssl_version.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_timeout.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tlsext_ticket_key_cb.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_dh_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_tmp_rsa_callback.3 stable/10/secure/lib/libssl/man/SSL_CTX_set_verify.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_certificate.3 stable/10/secure/lib/libssl/man/SSL_CTX_use_psk_identity_hint.3 stable/10/secure/lib/libssl/man/SSL_SESSION_free.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_SESSION_get_time.3 stable/10/secure/lib/libssl/man/SSL_accept.3 stable/10/secure/lib/libssl/man/SSL_alert_type_string.3 stable/10/secure/lib/libssl/man/SSL_clear.3 stable/10/secure/lib/libssl/man/SSL_connect.3 stable/10/secure/lib/libssl/man/SSL_do_handshake.3 stable/10/secure/lib/libssl/man/SSL_free.3 stable/10/secure/lib/libssl/man/SSL_get_SSL_CTX.3 stable/10/secure/lib/libssl/man/SSL_get_ciphers.3 stable/10/secure/lib/libssl/man/SSL_get_client_CA_list.3 stable/10/secure/lib/libssl/man/SSL_get_current_cipher.3 stable/10/secure/lib/libssl/man/SSL_get_default_timeout.3 stable/10/secure/lib/libssl/man/SSL_get_error.3 stable/10/secure/lib/libssl/man/SSL_get_ex_data_X509_STORE_CTX_idx.3 stable/10/secure/lib/libssl/man/SSL_get_ex_new_index.3 stable/10/secure/lib/libssl/man/SSL_get_fd.3 stable/10/secure/lib/libssl/man/SSL_get_peer_cert_chain.3 stable/10/secure/lib/libssl/man/SSL_get_peer_certificate.3 stable/10/secure/lib/libssl/man/SSL_get_psk_identity.3 stable/10/secure/lib/libssl/man/SSL_get_rbio.3 stable/10/secure/lib/libssl/man/SSL_get_session.3 stable/10/secure/lib/libssl/man/SSL_get_verify_result.3 stable/10/secure/lib/libssl/man/SSL_get_version.3 stable/10/secure/lib/libssl/man/SSL_library_init.3 stable/10/secure/lib/libssl/man/SSL_load_client_CA_file.3 stable/10/secure/lib/libssl/man/SSL_new.3 stable/10/secure/lib/libssl/man/SSL_pending.3 stable/10/secure/lib/libssl/man/SSL_read.3 stable/10/secure/lib/libssl/man/SSL_rstate_string.3 stable/10/secure/lib/libssl/man/SSL_session_reused.3 stable/10/secure/lib/libssl/man/SSL_set_bio.3 stable/10/secure/lib/libssl/man/SSL_set_connect_state.3 stable/10/secure/lib/libssl/man/SSL_set_fd.3 stable/10/secure/lib/libssl/man/SSL_set_session.3 stable/10/secure/lib/libssl/man/SSL_set_shutdown.3 stable/10/secure/lib/libssl/man/SSL_set_verify_result.3 stable/10/secure/lib/libssl/man/SSL_shutdown.3 stable/10/secure/lib/libssl/man/SSL_state_string.3 stable/10/secure/lib/libssl/man/SSL_want.3 stable/10/secure/lib/libssl/man/SSL_write.3 stable/10/secure/lib/libssl/man/d2i_SSL_SESSION.3 stable/10/secure/lib/libssl/man/ssl.3 stable/10/secure/usr.bin/openssl/man/CA.pl.1 stable/10/secure/usr.bin/openssl/man/asn1parse.1 stable/10/secure/usr.bin/openssl/man/c_rehash.1 stable/10/secure/usr.bin/openssl/man/ca.1 stable/10/secure/usr.bin/openssl/man/ciphers.1 stable/10/secure/usr.bin/openssl/man/cms.1 stable/10/secure/usr.bin/openssl/man/crl.1 stable/10/secure/usr.bin/openssl/man/crl2pkcs7.1 stable/10/secure/usr.bin/openssl/man/dgst.1 stable/10/secure/usr.bin/openssl/man/dhparam.1 stable/10/secure/usr.bin/openssl/man/dsa.1 stable/10/secure/usr.bin/openssl/man/dsaparam.1 stable/10/secure/usr.bin/openssl/man/ec.1 stable/10/secure/usr.bin/openssl/man/ecparam.1 stable/10/secure/usr.bin/openssl/man/enc.1 stable/10/secure/usr.bin/openssl/man/errstr.1 stable/10/secure/usr.bin/openssl/man/gendsa.1 stable/10/secure/usr.bin/openssl/man/genpkey.1 stable/10/secure/usr.bin/openssl/man/genrsa.1 stable/10/secure/usr.bin/openssl/man/nseq.1 stable/10/secure/usr.bin/openssl/man/ocsp.1 stable/10/secure/usr.bin/openssl/man/openssl.1 stable/10/secure/usr.bin/openssl/man/passwd.1 stable/10/secure/usr.bin/openssl/man/pkcs12.1 stable/10/secure/usr.bin/openssl/man/pkcs7.1 stable/10/secure/usr.bin/openssl/man/pkcs8.1 stable/10/secure/usr.bin/openssl/man/pkey.1 stable/10/secure/usr.bin/openssl/man/pkeyparam.1 stable/10/secure/usr.bin/openssl/man/pkeyutl.1 stable/10/secure/usr.bin/openssl/man/rand.1 stable/10/secure/usr.bin/openssl/man/req.1 stable/10/secure/usr.bin/openssl/man/rsa.1 stable/10/secure/usr.bin/openssl/man/rsautl.1 stable/10/secure/usr.bin/openssl/man/s_client.1 stable/10/secure/usr.bin/openssl/man/s_server.1 stable/10/secure/usr.bin/openssl/man/s_time.1 stable/10/secure/usr.bin/openssl/man/sess_id.1 stable/10/secure/usr.bin/openssl/man/smime.1 stable/10/secure/usr.bin/openssl/man/speed.1 stable/10/secure/usr.bin/openssl/man/spkac.1 stable/10/secure/usr.bin/openssl/man/ts.1 stable/10/secure/usr.bin/openssl/man/tsget.1 stable/10/secure/usr.bin/openssl/man/verify.1 stable/10/secure/usr.bin/openssl/man/version.1 stable/10/secure/usr.bin/openssl/man/x509.1 stable/10/secure/usr.bin/openssl/man/x509v3_config.1 Directory Properties: stable/10/ (props changed) Modified: stable/10/crypto/openssl/CHANGES ============================================================================== --- stable/10/crypto/openssl/CHANGES Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/CHANGES Fri Jan 23 19:14:36 2015 (r277597) @@ -2,6 +2,11 @@ OpenSSL CHANGES _______________ + Changes between 1.0.1k and 1.0.1l [15 Jan 2015] + + *) Build fixes for the Windows and OpenVMS platforms + [Matt Caswell and Richard Levitte] + Changes between 1.0.1j and 1.0.1k [8 Jan 2015] *) Fix DTLS segmentation fault in dtls1_get_record. A carefully crafted DTLS Modified: stable/10/crypto/openssl/Makefile ============================================================================== --- stable/10/crypto/openssl/Makefile Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/Makefile Fri Jan 23 19:14:36 2015 (r277597) @@ -4,7 +4,7 @@ ## Makefile for OpenSSL ## -VERSION=1.0.1k +VERSION=1.0.1l MAJOR=1 MINOR=0.1 SHLIB_VERSION_NUMBER=1.0.0 Modified: stable/10/crypto/openssl/NEWS ============================================================================== --- stable/10/crypto/openssl/NEWS Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/NEWS Fri Jan 23 19:14:36 2015 (r277597) @@ -5,6 +5,10 @@ This file gives a brief overview of the major changes between each OpenSSL release. For more details please read the CHANGES file. + Major changes between OpenSSL 1.0.1k and OpenSSL 1.0.1l [15 Jan 2015] + + o Build fixes for the Windows and OpenVMS platforms + Major changes between OpenSSL 1.0.1j and OpenSSL 1.0.1k [8 Jan 2015] o Fix for CVE-2014-3571 Modified: stable/10/crypto/openssl/README ============================================================================== --- stable/10/crypto/openssl/README Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/README Fri Jan 23 19:14:36 2015 (r277597) @@ -1,5 +1,5 @@ - OpenSSL 1.0.1k 8 Jan 2015 + OpenSSL 1.0.1l 15 Jan 2015 Copyright (c) 1998-2011 The OpenSSL Project Copyright (c) 1995-1998 Eric A. Young, Tim J. Hudson Modified: stable/10/crypto/openssl/crypto/Makefile ============================================================================== --- stable/10/crypto/openssl/crypto/Makefile Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/crypto/Makefile Fri Jan 23 19:14:36 2015 (r277597) @@ -56,7 +56,7 @@ top: all: shared buildinf.h: ../Makefile - $(PERL) $(TOP)/util/mkbuildinf.pl "$(CFLAGS)" "$(PLATFORM)" >buildinf.h + $(PERL) $(TOP)/util/mkbuildinf.pl "$(CC) $(CFLAGS)" "$(PLATFORM)" >buildinf.h x86cpuid.s: x86cpuid.pl perlasm/x86asm.pl $(PERL) x86cpuid.pl $(PERLASM_SCHEME) $(CFLAGS) $(PROCESSOR) > $@ Modified: stable/10/crypto/openssl/crypto/ecdsa/Makefile ============================================================================== --- stable/10/crypto/openssl/crypto/ecdsa/Makefile Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/crypto/ecdsa/Makefile Fri Jan 23 19:14:36 2015 (r277597) @@ -126,16 +126,15 @@ ecs_sign.o: ../../include/openssl/safest ecs_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h ecs_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h ecs_sign.o: ecs_locl.h ecs_sign.c -ecs_vrf.o: ../../e_os.h ../../include/openssl/asn1.h -ecs_vrf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h -ecs_vrf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h -ecs_vrf.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h -ecs_vrf.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h -ecs_vrf.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ecs_vrf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h +ecs_vrf.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h +ecs_vrf.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h +ecs_vrf.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h +ecs_vrf.o: ../../include/openssl/engine.h ../../include/openssl/evp.h ecs_vrf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h ecs_vrf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ecs_vrf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ecs_vrf.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h ecs_vrf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h ecs_vrf.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h -ecs_vrf.o: ../../include/openssl/x509_vfy.h ../cryptlib.h ecs_locl.h ecs_vrf.c +ecs_vrf.o: ../../include/openssl/x509_vfy.h ecs_locl.h ecs_vrf.c Modified: stable/10/crypto/openssl/crypto/ecdsa/ecs_vrf.c ============================================================================== --- stable/10/crypto/openssl/crypto/ecdsa/ecs_vrf.c Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/crypto/ecdsa/ecs_vrf.c Fri Jan 23 19:14:36 2015 (r277597) @@ -57,7 +57,7 @@ */ #include "ecs_locl.h" -#include "cryptlib.h" +#include #ifndef OPENSSL_NO_ENGINE #include #endif Modified: stable/10/crypto/openssl/crypto/opensslv.h ============================================================================== --- stable/10/crypto/openssl/crypto/opensslv.h Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/crypto/opensslv.h Fri Jan 23 19:14:36 2015 (r277597) @@ -29,11 +29,11 @@ extern "C" { * (Prior to 0.9.5a beta1, a different scheme was used: MMNNFFRBB for * major minor fix final patch/beta) */ -#define OPENSSL_VERSION_NUMBER 0x100010bfL +#define OPENSSL_VERSION_NUMBER 0x100010cfL #ifdef OPENSSL_FIPS -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-fips 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-fips 15 Jan 2015" #else -#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1k-freebsd 8 Jan 2015" +#define OPENSSL_VERSION_TEXT "OpenSSL 1.0.1l-freebsd 15 Jan 2015" #endif #define OPENSSL_VERSION_PTEXT " part of " OPENSSL_VERSION_TEXT Modified: stable/10/crypto/openssl/crypto/x509v3/v3_ncons.c ============================================================================== --- stable/10/crypto/openssl/crypto/x509v3/v3_ncons.c Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/crypto/x509v3/v3_ncons.c Fri Jan 23 19:14:36 2015 (r277597) @@ -401,7 +401,7 @@ static int nc_dns(ASN1_IA5STRING *dns, A if (dns->length > base->length) { dnsptr += dns->length - base->length; - if (dnsptr[-1] != '.') + if (*baseptr != '.' && dnsptr[-1] != '.') return X509_V_ERR_PERMITTED_VIOLATION; } Modified: stable/10/crypto/openssl/e_os.h ============================================================================== --- stable/10/crypto/openssl/e_os.h Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/e_os.h Fri Jan 23 19:14:36 2015 (r277597) @@ -368,11 +368,13 @@ static __inline unsigned int _strlen31(c # define DEFAULT_HOME "C:" # endif -/* Avoid Windows 8 SDK GetVersion deprecated problems */ +/* Avoid Visual Studio 13 GetVersion deprecated problems */ #if defined(_MSC_VER) && _MSC_VER>=1800 # define check_winnt() (1) +# define check_win_minplat(x) (1) #else # define check_winnt() (GetVersion() < 0x80000000) +# define check_win_minplat(x) (LOBYTE(LOWORD(GetVersion())) >= (x)) #endif #else /* The non-microsoft world */ Modified: stable/10/crypto/openssl/util/mk1mf.pl ============================================================================== --- stable/10/crypto/openssl/util/mk1mf.pl Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/crypto/openssl/util/mk1mf.pl Fri Jan 23 19:14:36 2015 (r277597) @@ -625,7 +625,7 @@ open (OUT,">>crypto/buildinf.h") || die printf OUT < # OpenSSL version used for manual page generation -OPENSSL_VER= 1.0.1k -OPENSSL_DATE= 2015-01-08 +OPENSSL_VER= 1.0.1l +OPENSSL_DATE= 2015-01-15 LCRYPTO_SRC= ${.CURDIR}/../../../crypto/openssl LCRYPTO_DOC= ${.CURDIR}/../../../crypto/openssl/doc Modified: stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/ASN1_OBJECT_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_OBJECT_new 3" -.TH ASN1_OBJECT_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_OBJECT_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/ASN1_STRING_length.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_length 3" -.TH ASN1_STRING_length 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_length 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/ASN1_STRING_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_new 3" -.TH ASN1_STRING_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/ASN1_STRING_print_ex.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_STRING_print_ex 3" -.TH ASN1_STRING_print_ex 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_STRING_print_ex 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/ASN1_generate_nconf.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "ASN1_generate_nconf 3" -.TH ASN1_generate_nconf 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH ASN1_generate_nconf 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_ctrl.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_ctrl 3" -.TH BIO_ctrl 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_ctrl 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_f_base64.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_base64 3" -.TH BIO_f_base64 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_base64 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_f_buffer.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_buffer 3" -.TH BIO_f_buffer 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_buffer 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_f_cipher.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_cipher 3" -.TH BIO_f_cipher 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_cipher 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_f_md.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_f_md.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_md 3" -.TH BIO_f_md 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_md 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_f_null.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_f_null.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_null 3" -.TH BIO_f_null 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_null 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_f_ssl.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_f_ssl 3" -.TH BIO_f_ssl 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_f_ssl 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_find_type.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_find_type.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_find_type 3" -.TH BIO_find_type 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_find_type 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new 3" -.TH BIO_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_new_CMS.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_new_CMS 3" -.TH BIO_new_CMS 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_new_CMS 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_push.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_push.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_push.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_push 3" -.TH BIO_push 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_push 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_read.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_read.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_read.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_read 3" -.TH BIO_read 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_read 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_accept.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_accept 3" -.TH BIO_s_accept 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_accept 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_bio.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_bio 3" -.TH BIO_s_bio 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_bio 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_connect.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_connect 3" -.TH BIO_s_connect 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_connect 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_fd.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_fd 3" -.TH BIO_s_fd 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_fd 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_file.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_file.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_file 3" -.TH BIO_s_file 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_file 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_mem.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_mem 3" -.TH BIO_s_mem 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_mem 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_null.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_null.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_null 3" -.TH BIO_s_null 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_null 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_s_socket.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_s_socket 3" -.TH BIO_s_socket 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_s_socket 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_set_callback.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_set_callback 3" -.TH BIO_set_callback 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_set_callback 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BIO_should_retry.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BIO_should_retry 3" -.TH BIO_should_retry 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BIO_should_retry 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_BLINDING_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_BLINDING_new 3" -.TH BN_BLINDING_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_BLINDING_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_CTX_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_new 3" -.TH BN_CTX_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_CTX_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_CTX_start.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_CTX_start 3" -.TH BN_CTX_start 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_CTX_start 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_add.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_add.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_add.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add 3" -.TH BN_add 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_add 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_add_word.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_add_word.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_add_word.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_add_word 3" -.TH BN_add_word 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_add_word 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_bn2bin.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_bn2bin 3" -.TH BN_bn2bin 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_bn2bin 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_cmp.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_cmp.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_cmp.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_cmp 3" -.TH BN_cmp 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_cmp 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_copy.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_copy.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_copy.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_copy 3" -.TH BN_copy 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_copy 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_generate_prime.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_generate_prime 3" -.TH BN_generate_prime 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_generate_prime 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_mod_inverse.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_inverse 3" -.TH BN_mod_inverse 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_inverse 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_mod_mul_montgomery.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_montgomery 3" -.TH BN_mod_mul_montgomery 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_mul_montgomery 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_mod_mul_reciprocal.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_mod_mul_reciprocal 3" -.TH BN_mod_mul_reciprocal 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_mod_mul_reciprocal 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_new 3" -.TH BN_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_num_bytes.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_num_bytes 3" -.TH BN_num_bytes 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_num_bytes 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_rand.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_rand.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_rand.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_rand 3" -.TH BN_rand 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_rand 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_set_bit.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_set_bit.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_set_bit 3" -.TH BN_set_bit 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_set_bit 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_swap.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_swap.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_swap.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_swap 3" -.TH BN_swap 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_swap 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/BN_zero.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/BN_zero.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/BN_zero.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "BN_zero 3" -.TH BN_zero 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH BN_zero 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_add0_cert.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add0_cert 3" -.TH CMS_add0_cert 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add0_cert 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_add1_recipient_cert.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_recipient_cert 3" -.TH CMS_add1_recipient_cert 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add1_recipient_cert 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_add1_signer.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_add1_signer 3" -.TH CMS_add1_signer 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_add1_signer 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_compress.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_compress.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_compress.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_compress 3" -.TH CMS_compress 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_compress 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_decrypt.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_decrypt 3" -.TH CMS_decrypt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_decrypt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_encrypt.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_encrypt 3" -.TH CMS_encrypt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_encrypt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_final.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_final.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_final.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_final 3" -.TH CMS_final 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_final 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_get0_RecipientInfos.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_RecipientInfos 3" -.TH CMS_get0_RecipientInfos 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_RecipientInfos 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_get0_SignerInfos.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_SignerInfos 3" -.TH CMS_get0_SignerInfos 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_SignerInfos 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_get0_type.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get0_type 3" -.TH CMS_get0_type 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get0_type 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_get1_ReceiptRequest.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_get1_ReceiptRequest 3" -.TH CMS_get1_ReceiptRequest 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_get1_ReceiptRequest 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_sign.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_sign.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_sign.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign 3" -.TH CMS_sign 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_sign 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_sign_receipt.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_sign_receipt 3" -.TH CMS_sign_receipt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_sign_receipt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_uncompress.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_uncompress 3" -.TH CMS_uncompress 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_uncompress 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_verify.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_verify.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_verify.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify 3" -.TH CMS_verify 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_verify 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CMS_verify_receipt.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CMS_verify_receipt 3" -.TH CMS_verify_receipt 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CMS_verify_receipt 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CONF_modules_free.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_free 3" -.TH CONF_modules_free 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CONF_modules_free 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CONF_modules_load_file.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CONF_modules_load_file 3" -.TH CONF_modules_load_file 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CONF_modules_load_file 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/CRYPTO_set_ex_data.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "CRYPTO_set_ex_data 3" -.TH CRYPTO_set_ex_data 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH CRYPTO_set_ex_data 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DH_generate_key.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DH_generate_key.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_key 3" -.TH DH_generate_key 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_generate_key 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DH_generate_parameters.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_generate_parameters 3" -.TH DH_generate_parameters 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_generate_parameters 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DH_get_ex_new_index.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_get_ex_new_index 3" -.TH DH_get_ex_new_index 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_get_ex_new_index 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DH_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DH_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DH_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_new 3" -.TH DH_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DH_set_method.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DH_set_method.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DH_set_method.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_set_method 3" -.TH DH_set_method 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_set_method 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DH_size.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DH_size.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DH_size.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DH_size 3" -.TH DH_size 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DH_size 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DSA_SIG_new.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_SIG_new 3" -.TH DSA_SIG_new 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_SIG_new 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DSA_do_sign.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_do_sign 3" -.TH DSA_do_sign 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_do_sign 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DSA_dup_DH.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_dup_DH 3" -.TH DSA_dup_DH 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_dup_DH 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DSA_generate_key.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_key 3" -.TH DSA_generate_key 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_generate_key 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DSA_generate_parameters.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_generate_parameters 3" -.TH DSA_generate_parameters 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_generate_parameters 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Fri Jan 23 18:56:31 2015 (r277596) +++ stable/10/secure/lib/libcrypto/man/DSA_get_ex_new_index.3 Fri Jan 23 19:14:36 2015 (r277597) @@ -133,7 +133,7 @@ .\" ======================================================================== .\" .IX Title "DSA_get_ex_new_index 3" -.TH DSA_get_ex_new_index 3 "2015-01-08" "1.0.1k" "OpenSSL" +.TH DSA_get_ex_new_index 3 "2015-01-15" "1.0.1l" "OpenSSL" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l Modified: stable/10/secure/lib/libcrypto/man/DSA_new.3 ============================================================================== --- stable/10/secure/lib/libcrypto/man/DSA_new.3 Fri Jan 23 18:56:31 2015 (r277596) *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:17:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3B1146ED; Fri, 23 Jan 2015 19:17:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2612E34E; Fri, 23 Jan 2015 19:17:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJH5iQ046228; Fri, 23 Jan 2015 19:17:05 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJH5mV046227; Fri, 23 Jan 2015 19:17:05 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201501231917.t0NJH5mV046227@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Fri, 23 Jan 2015 19:17:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277598 - stable/10/secure/lib/libcrypto X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:17:05 -0000 Author: jkim Date: Fri Jan 23 19:17:04 2015 New Revision: 277598 URL: https://svnweb.freebsd.org/changeset/base/277598 Log: MFC: r277274 Update buildinf.h to make SSLeay_version(3) little bit more useful. Modified: stable/10/secure/lib/libcrypto/Makefile Directory Properties: stable/10/ (props changed) Modified: stable/10/secure/lib/libcrypto/Makefile ============================================================================== --- stable/10/secure/lib/libcrypto/Makefile Fri Jan 23 19:14:36 2015 (r277597) +++ stable/10/secure/lib/libcrypto/Makefile Fri Jan 23 19:17:04 2015 (r277598) @@ -390,9 +390,9 @@ CLEANFILES= buildinf.h opensslconf.h buildinf.h: ${.CURDIR}/Makefile ( echo "#ifndef MK1MF_BUILD"; \ - echo " /* auto-generated by crypto/Makefile.ssl for crypto/cversion.c */"; \ - echo " #define CFLAGS \"$(CC)\""; \ - echo " #define PLATFORM \"FreeBSD-${MACHINE_ARCH}\""; \ + echo " /* auto-generated by util/mkbuildinf.pl for crypto/cversion.c */"; \ + echo " #define CFLAGS \"compiler: ${COMPILER_TYPE}\""; \ + echo " #define PLATFORM \"platform: FreeBSD-${MACHINE_ARCH}\""; \ echo "#endif" ) > ${.TARGET} .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:19:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C494AA49; Fri, 23 Jan 2015 19:19:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AF3DF385; Fri, 23 Jan 2015 19:19:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJJZAS046814; Fri, 23 Jan 2015 19:19:35 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJJZl9046813; Fri, 23 Jan 2015 19:19:35 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501231919.t0NJJZl9046813@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 19:19:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277599 - stable/10/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:19:35 -0000 Author: delphij Date: Fri Jan 23 19:19:34 2015 New Revision: 277599 URL: https://svnweb.freebsd.org/changeset/base/277599 Log: Note OpenSSL MFC. This is a direct commit to stable/10. Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:17:04 2015 (r277598) +++ stable/10/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:19:34 2015 (r277599) @@ -223,7 +223,8 @@ Contributed Software -   + OpenSSL has + been updated to version 1.0.1l. From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:24:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id D5790D34; Fri, 23 Jan 2015 19:24:00 +0000 (UTC) Received: from mail-lb0-x231.google.com (mail-lb0-x231.google.com [IPv6:2a00:1450:4010:c04::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 55D25643; Fri, 23 Jan 2015 19:24:00 +0000 (UTC) Received: by mail-lb0-f177.google.com with SMTP id p9so8719601lbv.8; Fri, 23 Jan 2015 11:23:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=CAtFbY/Y+t7L7OgfXmXb/avOUY16s2F1hHYO3Xlv0RQ=; b=vL/w08JR/7arHSnS56J7vNnCZpRj/Ny4oHQHKG/8o//DnGWvgu44L/sZoDtkWPO6IS cFZW8i5DYdXbEwQsMR610O9zQYp/buqUpduveDYlXzU3S80a4r9O755E1JmIoVtam61K iTJPjBSn6dISgnuscNy1e4ZEIjHascTCOngM0n82xPe78LIzaQfIFI8p/S2/52lVmRxE exzSrm5aAGlN+PKML2Zu/OyhMsWp7nGEQKNrFt2hklKGC0rP9atH7LTT7neb3NHsyLE5 c0zUfyhiRGBaH1aZht9Kotm2tuITFK/ZSh8pv7mjwSzQfF6LVbIxqbDLfPz+/V+ox0vo btfw== MIME-Version: 1.0 X-Received: by 10.152.44.228 with SMTP id h4mr8029868lam.31.1422041038014; Fri, 23 Jan 2015 11:23:58 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.155.4 with HTTP; Fri, 23 Jan 2015 11:23:57 -0800 (PST) In-Reply-To: <201501231618.t0NGIeDv057991@svn.freebsd.org> References: <201501231618.t0NGIeDv057991@svn.freebsd.org> Date: Fri, 23 Jan 2015 11:23:57 -0800 X-Google-Sender-Auth: 2fcIne5tbTux4fHZspg-UurFxsg Message-ID: Subject: Re: svn commit: r277570 - head/usr.bin/vmstat From: Davide Italiano To: Will Andrews Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:24:00 -0000 On Fri, Jan 23, 2015 at 8:18 AM, Will Andrews wrote: > Author: will > Date: Fri Jan 23 16:18:39 2015 > New Revision: 277570 > URL: https://svnweb.freebsd.org/changeset/base/277570 > > Log: > Use CLOCK_UPTIME to get the uptime instead of CLOCK_MONOTONIC. > > Submitted by: asomers > MFC after: 1 week > Sponsored by: Spectra Logic > MFSpectraBSD: 1066740 on 2014/06/04 > > Modified: > head/usr.bin/vmstat/vmstat.c > What's the rationale behind this change? Thanks, -- Davide From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:33:04 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F39F897; Fri, 23 Jan 2015 19:33:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEC1279E; Fri, 23 Jan 2015 19:33:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJX3D3055691; Fri, 23 Jan 2015 19:33:03 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJX3DZ055690; Fri, 23 Jan 2015 19:33:03 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501231933.t0NJX3DZ055690@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jan 2015 19:33:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277601 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:33:04 -0000 Author: gjb Date: Fri Jan 23 19:33:03 2015 New Revision: 277601 URL: https://svnweb.freebsd.org/changeset/base/277601 Log: Document r276881, libedit UTF-8 support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:22:18 2015 (r277600) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:03 2015 (r277601) @@ -791,6 +791,11 @@ strings were switched to the versions from the ELF Tool Chain project. + The libedit library + has been updated to include UTF-8 support, + adding UTF-8 support to the &man.sh.1; + shell. + OpenSSL has been updated to version 1.0.1l. From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:33:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B92E51B0; Fri, 23 Jan 2015 19:33:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5B4E7A0; Fri, 23 Jan 2015 19:33:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJX60D055739; Fri, 23 Jan 2015 19:33:06 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJX6m0055738; Fri, 23 Jan 2015 19:33:06 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501231933.t0NJX6m0055738@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jan 2015 19:33:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277602 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:33:06 -0000 Author: gjb Date: Fri Jan 23 19:33:05 2015 New Revision: 277602 URL: https://svnweb.freebsd.org/changeset/base/277602 Log: Document r277166, ptrace(2) Altivec register support. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:03 2015 (r277601) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:05 2015 (r277602) @@ -691,6 +691,10 @@ has been updated to support UTF-8, which additionally provides unicode support to &man.sh.1;. + The &man.ptrace.2; system + call has been updated include support for Altivec registers on + &os;/&arch.powerpc;. + <acronym>ABI</acronym> Compatibility From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:33:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 73747302; Fri, 23 Jan 2015 19:33:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5F34B7A4; Fri, 23 Jan 2015 19:33:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJX9U8055789; Fri, 23 Jan 2015 19:33:09 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJX9Wv055788; Fri, 23 Jan 2015 19:33:09 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501231933.t0NJX9Wv055788@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jan 2015 19:33:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277603 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:33:09 -0000 Author: gjb Date: Fri Jan 23 19:33:08 2015 New Revision: 277603 URL: https://svnweb.freebsd.org/changeset/base/277603 Log: Document r277458, support for cloud hosting providers added to the Release Engineering build tools. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:05 2015 (r277602) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:08 2015 (r277603) @@ -813,7 +813,10 @@ Release Engineering and Integration -   + The + Release Engineering build tools have been updated to include + support for producing virtual machine disk images for various + cloud hosting providers. From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 19:33:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 85015447; Fri, 23 Jan 2015 19:33:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 710A17B1; Fri, 23 Jan 2015 19:33:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NJXlv7055908; Fri, 23 Jan 2015 19:33:47 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NJXlON055907; Fri, 23 Jan 2015 19:33:47 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501231933.t0NJXlON055907@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jan 2015 19:33:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277604 - head/release/doc/en_US.ISO8859-1/relnotes X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 19:33:47 -0000 Author: gjb Date: Fri Jan 23 19:33:46 2015 New Revision: 277604 URL: https://svnweb.freebsd.org/changeset/base/277604 Log: Update the latest revision. Sponsored by: The FreeBSD Foundation Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml Modified: head/release/doc/en_US.ISO8859-1/relnotes/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:08 2015 (r277603) +++ head/release/doc/en_US.ISO8859-1/relnotes/article.xml Fri Jan 23 19:33:46 2015 (r277604) @@ -20,7 +20,7 @@ $FreeBSD$ - + 2015 From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 20:24:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 226FDFA4; Fri, 23 Jan 2015 20:24:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0C464D31; Fri, 23 Jan 2015 20:24:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NKODlM079973; Fri, 23 Jan 2015 20:24:13 GMT (envelope-from cperciva@FreeBSD.org) Received: (from cperciva@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NKODZq079972; Fri, 23 Jan 2015 20:24:13 GMT (envelope-from cperciva@FreeBSD.org) Message-Id: <201501232024.t0NKODZq079972@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: cperciva set sender to cperciva@FreeBSD.org using -f From: Colin Percival Date: Fri, 23 Jan 2015 20:24:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277606 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 20:24:14 -0000 Author: cperciva Date: Fri Jan 23 20:24:13 2015 New Revision: 277606 URL: https://svnweb.freebsd.org/changeset/base/277606 Log: Provide a recipe of "true" for building the "release" target once its prerequisites are satisfied, in order to avoid having an implicit rule triggered by the presence of release.sh. Approved by: gjb Modified: head/release/Makefile Modified: head/release/Makefile ============================================================================== --- head/release/Makefile Fri Jan 23 19:43:57 2015 (r277605) +++ head/release/Makefile Fri Jan 23 20:24:13 2015 (r277606) @@ -279,6 +279,7 @@ ftp: packagesystem cp *.txz MANIFEST ftp release: real-release vm-release cloudware-release + @true real-release: ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 20:32:20 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8E8262AB; Fri, 23 Jan 2015 20:32:20 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60252E35; Fri, 23 Jan 2015 20:32:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NKWK1o084507; Fri, 23 Jan 2015 20:32:20 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NKWJg0084505; Fri, 23 Jan 2015 20:32:19 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501232032.t0NKWJg0084505@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 23 Jan 2015 20:32:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277607 - vendor/gdb/dist/gdb X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 20:32:20 -0000 Author: pfg Date: Fri Jan 23 20:32:19 2015 New Revision: 277607 URL: https://svnweb.freebsd.org/changeset/base/277607 Log: GDB: Fix memset thinkos. 2005-03-25 Anthony Green * remote.c (remote_store_registers): Fix memset usage. * std-regs.c (value_of_builtin_frame_reg): Ditto. (value_of_builtin_frame_fp_reg): Ditto. (value_of_builtin_frame_reg): Ditto. Sourceware commit: 170cd118a9e2169798247e70160f5a638b516661 Modified: vendor/gdb/dist/gdb/remote.c vendor/gdb/dist/gdb/std-regs.c Modified: vendor/gdb/dist/gdb/remote.c ============================================================================== --- vendor/gdb/dist/gdb/remote.c Fri Jan 23 20:24:13 2015 (r277606) +++ vendor/gdb/dist/gdb/remote.c Fri Jan 23 20:32:19 2015 (r277607) @@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) { int i; regs = alloca (rs->sizeof_g_packet); - memset (regs, rs->sizeof_g_packet, 0); + memset (regs, 0, rs->sizeof_g_packet); for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) { struct packet_reg *r = &rs->regs[i]; Modified: vendor/gdb/dist/gdb/std-regs.c ============================================================================== --- vendor/gdb/dist/gdb/std-regs.c Fri Jan 23 20:24:13 2015 (r277606) +++ vendor/gdb/dist/gdb/std-regs.c Fri Jan 23 20:32:19 2015 (r277607) @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; buf = VALUE_CONTENTS_RAW (val); - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); /* frame.base. */ if (frame != NULL) ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_base_address (frame)); @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_pc (frame)); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 20:40:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 681A9555; Fri, 23 Jan 2015 20:40:33 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A568F13; Fri, 23 Jan 2015 20:40:33 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NKeW09086750; Fri, 23 Jan 2015 20:40:32 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NKeWqB086747; Fri, 23 Jan 2015 20:40:32 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501232040.t0NKeWqB086747@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Fri, 23 Jan 2015 20:40:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277608 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 20:40:33 -0000 Author: pfg Date: Fri Jan 23 20:40:31 2015 New Revision: 277608 URL: https://svnweb.freebsd.org/changeset/base/277608 Log: MFV r277607: GDB: Fix memset thinkos. 2005-03-25 Anthony Green * remote.c (remote_store_registers): Fix memset usage. * std-regs.c (value_of_builtin_frame_reg): Ditto. (value_of_builtin_frame_fp_reg): Ditto. (value_of_builtin_frame_reg): Ditto. Reported by: Dirk Engling CID: 604160, 604161, 604162, 604163 MFC after: 5 days Modified: head/contrib/gdb/gdb/remote.c head/contrib/gdb/gdb/std-regs.c Directory Properties: head/contrib/gdb/ (props changed) Modified: head/contrib/gdb/gdb/remote.c ============================================================================== --- head/contrib/gdb/gdb/remote.c Fri Jan 23 20:32:19 2015 (r277607) +++ head/contrib/gdb/gdb/remote.c Fri Jan 23 20:40:31 2015 (r277608) @@ -3463,7 +3463,7 @@ remote_store_registers (int regnum) { int i; regs = alloca (rs->sizeof_g_packet); - memset (regs, rs->sizeof_g_packet, 0); + memset (regs, 0, rs->sizeof_g_packet); for (i = 0; i < NUM_REGS + NUM_PSEUDO_REGS; i++) { struct packet_reg *r = &rs->regs[i]; Modified: head/contrib/gdb/gdb/std-regs.c ============================================================================== --- head/contrib/gdb/gdb/std-regs.c Fri Jan 23 20:32:19 2015 (r277607) +++ head/contrib/gdb/gdb/std-regs.c Fri Jan 23 20:40:31 2015 (r277608) @@ -61,7 +61,7 @@ value_of_builtin_frame_reg (struct frame val = allocate_value (builtin_type_frame_reg); VALUE_LVAL (val) = not_lval; buf = VALUE_CONTENTS_RAW (val); - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); /* frame.base. */ if (frame != NULL) ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, @@ -87,7 +87,7 @@ value_of_builtin_frame_fp_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_base_address (frame)); @@ -105,7 +105,7 @@ value_of_builtin_frame_pc_reg (struct fr struct value *val = allocate_value (builtin_type_void_data_ptr); char *buf = VALUE_CONTENTS_RAW (val); if (frame == NULL) - memset (buf, TYPE_LENGTH (VALUE_TYPE (val)), 0); + memset (buf, 0, TYPE_LENGTH (VALUE_TYPE (val))); else ADDRESS_TO_POINTER (builtin_type_void_data_ptr, buf, get_frame_pc (frame)); From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 20:56:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B4D169DA for ; Fri, 23 Jan 2015 20:56:33 +0000 (UTC) Received: from mail-ie0-f176.google.com (mail-ie0-f176.google.com [209.85.223.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7AC66C8 for ; Fri, 23 Jan 2015 20:56:33 +0000 (UTC) Received: by mail-ie0-f176.google.com with SMTP id rd18so9343028iec.7 for ; Fri, 23 Jan 2015 12:56:26 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=xJw6+SNLaJdvi5zk5ZlQAkt+2oN3sH3sS5Erc2YsWrc=; b=LZHYwBwC4L9GuXGJa4JDhfKetiskgkp/RHsh/R85LmUL+WUqfOGF1hDjZPFfWKZN2k 9ughMCKmmhS0OrEh5CDxP87a05geG6iHwt4kGgJdAyFa3g7mJL7wq7oNjqsFaSnrWiuv i8rmy9IOYIzjwc9/FKDdAleO72XqCoUpTz+tBPatuZmyNfAX/qXT6+DiFHxvX97vx6Rj 0jqJvehLVjC+yAB3fZkLLrPVxsbQM9Ae2XDvKwJrv8LV6ryFlGgJ4vibEkUuGP6tMY7D t4f88QKuzg67C43swQ2zXyOvdW8+peVJpFEVRBfYstIdVBbtxll/gSUJzfKLvEarOiDN 65Lg== X-Gm-Message-State: ALoCoQn+lLY1W8yFPKyEEUPOWoIbRwMZrNRs9RQnGMsHN05IeYIUjLZ4v3wXX4PDnl3T7r8oWVYT X-Received: by 10.42.62.71 with SMTP id x7mr10221644ich.61.1422046585865; Fri, 23 Jan 2015 12:56:25 -0800 (PST) Received: from sol.firepipe.net (c-50-183-92-30.hsd1.co.comcast.net. [50.183.92.30]) by mx.google.com with ESMTPSA id b89sm1424086iod.32.2015.01.23.12.56.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 23 Jan 2015 12:56:25 -0800 (PST) Sender: Will Andrews Date: Fri, 23 Jan 2015 13:56:23 -0700 From: Will Andrews To: Davide Italiano Subject: Re: svn commit: r277570 - head/usr.bin/vmstat Message-ID: <20150123205617.GB56104@sol.firepipe.net> References: <201501231618.t0NGIeDv057991@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MW5yreqqjyrRcusr" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 20:56:33 -0000 --MW5yreqqjyrRcusr Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 23, 2015 at 11:23:57AM -0800, Davide Italiano wrote: > What's the rationale behind this change? The rationale was to match the clock used to the name (and implied intent) of the variables used to store/manipulate the data. It's possible that 'uptime' is entirely the wrong term in vmstat, in which case the naming used elsewhere in vmstat needs to be changed too. --=20 wca --MW5yreqqjyrRcusr Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTCtXEACgkQF47idPgWcsX8kQCfQQqHYo7buDDiEjv+ylkoQ5vo 1/QAnRqsG/LutbaBUqzgbLMwuda61vuk =X/YX -----END PGP SIGNATURE----- --MW5yreqqjyrRcusr-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:05:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7298AAF0; Fri, 23 Jan 2015 21:05:00 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5EF031DD; Fri, 23 Jan 2015 21:05:00 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NL50aq099392; Fri, 23 Jan 2015 21:05:00 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NL50B2099391; Fri, 23 Jan 2015 21:05:00 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201501232105.t0NL50B2099391@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Fri, 23 Jan 2015 21:05:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277609 - head/release X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:05:00 -0000 Author: gjb Date: Fri Jan 23 21:04:59 2015 New Revision: 277609 URL: https://svnweb.freebsd.org/changeset/base/277609 Log: When iterating through VMFORMATS, the VMBASE file is not removed or truncated to a zero-size file, which if used to create more than one disk image format, can result in accidental pollution of the target formatted disk image. Instead of using a single VMBASE image (vm.img, by default), use a single base file for each format, named as VMFORMAT.img, which produces VMBASE.VMFORMAT as the final formatted image. Reported by: cperciva MFC after: 1 month X-MFC-with: r277458, r277536 Sponsored by: The FreeBSD Foundation Modified: head/release/Makefile.vm Modified: head/release/Makefile.vm ============================================================================== --- head/release/Makefile.vm Fri Jan 23 20:40:31 2015 (r277608) +++ head/release/Makefile.vm Fri Jan 23 21:04:59 2015 (r277609) @@ -50,8 +50,8 @@ vm-${_CW:tl}: .if defined(WITH_VMIMAGES) && !empty(WITH_VMIMAGES) CLEANDIRS+= ${VMTARGETS} -CLEANFILES+= ${VMBASE}.img . for FORMAT in ${VMFORMATS} +CLEANFILES+= ${FORMAT}.img CLEANFILES+= ${VMBASE}.${FORMAT} . endfor .endif @@ -65,7 +65,7 @@ vm-image: env TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ ${.CURDIR}/scripts/mk-vmimage.sh \ -C ${.CURDIR}/tools/vmimage.subr -d ${.OBJDIR}/${.TARGET} \ - -i ${.OBJDIR}/${VMBASE}.img -s ${VMSIZE} -f ${FORMAT} \ + -i ${.OBJDIR}/${FORMAT}.img -s ${VMSIZE} -f ${FORMAT} \ -S ${WORLDDIR} -o ${.OBJDIR}/${VMBASE}.${FORMAT} . endfor .endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:06:00 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E15CEC4B; Fri, 23 Jan 2015 21:06:00 +0000 (UTC) Received: from smtp5.ore.mailhop.org (smtp5.ore.mailhop.org [54.186.10.118]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD9B31F6; Fri, 23 Jan 2015 21:06:00 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp5.ore.mailhop.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1YElQP-0006jB-Gr; Fri, 23 Jan 2015 21:05:53 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0NL5q0E018065; Fri, 23 Jan 2015 14:05:52 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18AGm9qMkLHXui13aybAPZQ Message-ID: <1422047152.1038.25.camel@freebsd.org> Subject: Re: svn commit: r277570 - head/usr.bin/vmstat From: Ian Lepore To: Will Andrews Date: Fri, 23 Jan 2015 14:05:52 -0700 In-Reply-To: <20150123205617.GB56104@sol.firepipe.net> References: <201501231618.t0NGIeDv057991@svn.freebsd.org> <20150123205617.GB56104@sol.firepipe.net> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Davide Italiano , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:06:01 -0000 On Fri, 2015-01-23 at 13:56 -0700, Will Andrews wrote: > On Fri, Jan 23, 2015 at 11:23:57AM -0800, Davide Italiano wrote: > > What's the rationale behind this change? > > The rationale was to match the clock used to the name (and implied intent) > of the variables used to store/manipulate the data. > > It's possible that 'uptime' is entirely the wrong term in vmstat, in which > case the naming used elsewhere in vmstat needs to be changed too. > It seems like there's a good chance this is a step backwards. In the old days if you wanted a monotonic clock, uptime was your only option. Eventually we implemented clock_gettime() and CLOCK_MONOTONIC and likely someone changed the calls in vmstat but perhaps not related variable names. So now we've gone back to the wrong clock to match the old variable names. (I don't see anything in the vmstat manpage about actually displaying or using uptime values at all.) -- Ian From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:06:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 918CBDA5; Fri, 23 Jan 2015 21:06:46 +0000 (UTC) Received: from smtp7.ore.mailhop.org (smtp7.ore.mailhop.org [54.149.250.69]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 725DE212; Fri, 23 Jan 2015 21:06:46 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp7.ore.mailhop.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.82) (envelope-from ) id 1YEkqd-0004WP-7A; Fri, 23 Jan 2015 20:28:55 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0NKSqhG017742; Fri, 23 Jan 2015 13:28:52 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1+DjbeZKBOMhuye/tvfO2wF Message-ID: <1422044932.1038.3.camel@freebsd.org> Subject: Re: svn commit: r277606 - head/release From: Ian Lepore To: Colin Percival Date: Fri, 23 Jan 2015 13:28:52 -0700 In-Reply-To: <201501232024.t0NKODZq079972@svn.freebsd.org> References: <201501232024.t0NKODZq079972@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:06:46 -0000 On Fri, 2015-01-23 at 20:24 +0000, Colin Percival wrote: > Author: cperciva > Date: Fri Jan 23 20:24:13 2015 > New Revision: 277606 > URL: https://svnweb.freebsd.org/changeset/base/277606 > > Log: > Provide a recipe of "true" for building the "release" target once its > prerequisites are satisfied, in order to avoid having an implicit rule > triggered by the presence of release.sh. > > Approved by: gjb > > Modified: > head/release/Makefile > > Modified: head/release/Makefile > ============================================================================== > --- head/release/Makefile Fri Jan 23 19:43:57 2015 (r277605) > +++ head/release/Makefile Fri Jan 23 20:24:13 2015 (r277606) > @@ -279,6 +279,7 @@ ftp: packagesystem > cp *.txz MANIFEST ftp > > release: real-release vm-release cloudware-release > + @true > > real-release: > ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj > Wouldn't '.PHONY: release' be a better/more-correct fix? -- Ian From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:07:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B04F0EE0; Fri, 23 Jan 2015 21:07:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98B3321D; Fri, 23 Jan 2015 21:07:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NL7EHw099763; Fri, 23 Jan 2015 21:07:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NL79a8099736; Fri, 23 Jan 2015 21:07:09 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501232107.t0NL79a8099736@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 23 Jan 2015 21:07:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277610 - in head: bin/ln lib/libc/include lib/libc/sys share/man/man4 sys/compat/freebsd32 sys/kern sys/sys usr.bin/kdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:07:14 -0000 Author: jilles Date: Fri Jan 23 21:07:08 2015 New Revision: 277610 URL: https://svnweb.freebsd.org/changeset/base/277610 Log: Add futimens and utimensat system calls. The core kernel part is patch file utimes.2008.4.diff from pluknet@FreeBSD.org. I updated the code for API changes, added the manual page and added compatibility code for old kernels. There is also audit and Capsicum support. A new UTIME_* constant might allow setting birthtimes in future. Differential Revision: https://reviews.freebsd.org/D1426 Submitted by: pluknet (partially) Reviewed by: delphij, pluknet, rwatson Relnotes: yes Added: head/lib/libc/sys/futimens.c (contents, props changed) head/lib/libc/sys/utimensat.2 (contents, props changed) head/lib/libc/sys/utimensat.c (contents, props changed) Modified: head/bin/ln/symlink.7 head/lib/libc/include/libc_private.h head/lib/libc/sys/Makefile.inc head/lib/libc/sys/Symbol.map head/share/man/man4/rights.4 head/sys/compat/freebsd32/freebsd32_misc.c head/sys/compat/freebsd32/syscalls.master head/sys/kern/capabilities.conf head/sys/kern/syscalls.master head/sys/kern/vfs_syscalls.c head/sys/sys/capsicum.h head/sys/sys/param.h head/sys/sys/stat.h head/sys/sys/syscallsubr.h head/usr.bin/kdump/kdump.c Modified: head/bin/ln/symlink.7 ============================================================================== --- head/bin/ln/symlink.7 Fri Jan 23 21:04:59 2015 (r277609) +++ head/bin/ln/symlink.7 Fri Jan 23 21:07:08 2015 (r277610) @@ -29,7 +29,7 @@ .\" @(#)symlink.7 8.3 (Berkeley) 3/31/94 .\" $FreeBSD$ .\" -.Dd December 29, 2014 +.Dd January 23, 2015 .Dt SYMLINK 7 .Os .Sh NAME @@ -147,9 +147,10 @@ unless given the .Dv AT_SYMLINK_NOFOLLOW flag: .Xr fchmodat 2 , -.Xr fchownat 2 +.Xr fchownat 2 , +.Xr fstatat 2 and -.Xr fstatat 2 . +.Xr utimensat 2 . .Pp The owner and group of an existing symbolic link can be changed by means of the Modified: head/lib/libc/include/libc_private.h ============================================================================== --- head/lib/libc/include/libc_private.h Fri Jan 23 21:04:59 2015 (r277609) +++ head/lib/libc/include/libc_private.h Fri Jan 23 21:07:08 2015 (r277610) @@ -357,6 +357,10 @@ int __libc_system(const char *); int __libc_tcdrain(int); int __fcntl_compat(int fd, int cmd, ...); +int __sys_futimens(int fd, const struct timespec *times) __hidden; +int __sys_utimensat(int fd, const char *path, + const struct timespec *times, int flag) __hidden; + /* execve() with PATH processing to implement posix_spawnp() */ int _execvpe(const char *, char * const *, char * const *); Modified: head/lib/libc/sys/Makefile.inc ============================================================================== --- head/lib/libc/sys/Makefile.inc Fri Jan 23 21:04:59 2015 (r277609) +++ head/lib/libc/sys/Makefile.inc Fri Jan 23 21:07:08 2015 (r277610) @@ -38,6 +38,10 @@ SRCS+= ${SYSCALL_COMPAT_SRCS} NOASM+= ${SYSCALL_COMPAT_SRCS:S/.c/.o/} .endif +SRCS+= futimens.c utimensat.c +NOASM+= futimens.o utimensat.o +PSEUDO+= _futimens.o _utimensat.o + INTERPOSED = \ accept \ accept4 \ @@ -310,6 +314,7 @@ MAN+= sctp_generic_recvmsg.2 \ umask.2 \ undelete.2 \ unlink.2 \ + utimensat.2 \ utimes.2 \ utrace.2 \ uuidgen.2 \ @@ -442,6 +447,7 @@ MLINKS+=timer_settime.2 timer_getoverrun timer_settime.2 timer_gettime.2 MLINKS+=truncate.2 ftruncate.2 MLINKS+=unlink.2 unlinkat.2 +MLINKS+=utimensat.2 futimens.2 MLINKS+=utimes.2 futimes.2 \ utimes.2 futimesat.2 \ utimes.2 lutimes.2 Modified: head/lib/libc/sys/Symbol.map ============================================================================== --- head/lib/libc/sys/Symbol.map Fri Jan 23 21:04:59 2015 (r277609) +++ head/lib/libc/sys/Symbol.map Fri Jan 23 21:07:08 2015 (r277610) @@ -397,7 +397,9 @@ FBSD_1.3 { }; FBSD_1.4 { + futimens; ppoll; + utimensat; }; FBSDprivate_1.0 { Added: head/lib/libc/sys/futimens.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/futimens.c Fri Jan 23 21:07:08 2015 (r277610) @@ -0,0 +1,97 @@ +/*- + * Copyright (c) 2015 Jilles Tjoelker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "namespace.h" +#include + +#include +#include +#include +#include "un-namespace.h" + +#include "libc_private.h" + +int +futimens(int fd, const struct timespec times[2]) +{ + struct timeval now, tv[2], *tvp; + struct stat sb; + + if (__getosreldate() >= 1100056) + return (__sys_futimens(fd, times)); + + if (times == NULL || (times[0].tv_nsec == UTIME_NOW && + times[1].tv_nsec == UTIME_NOW)) + tvp = NULL; + else if (times[0].tv_nsec == UTIME_OMIT && + times[1].tv_nsec == UTIME_OMIT) + return (0); + else { + if ((times[0].tv_nsec < 0 || times[0].tv_nsec > 999999999) && + times[0].tv_nsec != UTIME_NOW && + times[0].tv_nsec != UTIME_OMIT) { + errno = EINVAL; + return (-1); + } + if ((times[1].tv_nsec < 0 || times[1].tv_nsec > 999999999) && + times[1].tv_nsec != UTIME_NOW && + times[1].tv_nsec != UTIME_OMIT) { + errno = EINVAL; + return (-1); + } + tv[0].tv_sec = times[0].tv_sec; + tv[0].tv_usec = times[0].tv_nsec / 1000; + tv[1].tv_sec = times[1].tv_sec; + tv[1].tv_usec = times[1].tv_nsec / 1000; + tvp = tv; + if (times[0].tv_nsec == UTIME_OMIT || + times[1].tv_nsec == UTIME_OMIT) { + if (_fstat(fd, &sb) == -1) + return (-1); + if (times[0].tv_nsec == UTIME_OMIT) { + tv[0].tv_sec = sb.st_atim.tv_sec; + tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; + } + if (times[1].tv_nsec == UTIME_OMIT) { + tv[1].tv_sec = sb.st_mtim.tv_sec; + tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; + } + } + if (times[0].tv_nsec == UTIME_NOW || + times[1].tv_nsec == UTIME_NOW) { + if (gettimeofday(&now, NULL) == -1) + return (-1); + if (times[0].tv_nsec == UTIME_NOW) + tv[0] = now; + if (times[1].tv_nsec == UTIME_NOW) + tv[1] = now; + } + } + return (futimes(fd, tvp)); +} Added: head/lib/libc/sys/utimensat.2 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/utimensat.2 Fri Jan 23 21:07:08 2015 (r277610) @@ -0,0 +1,292 @@ +.\" $NetBSD: utimes.2,v 1.13 1999/03/22 19:45:11 garbled Exp $ +.\" +.\" Copyright (c) 1990, 1993 +.\" The Regents of the University of California. All rights reserved. +.\" Copyright (c) 2012, Jilles Tjoelker +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" 4. Neither the name of the University nor the names of its contributors +.\" may be used to endorse or promote products derived from this software +.\" without specific prior written permission. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" @(#)utimes.2 8.1 (Berkeley) 6/4/93 +.\" $FreeBSD$ +.\" +.Dd January 23, 2015 +.Dt UTIMENSAT 2 +.Os +.Sh NAME +.Nm futimens , +.Nm utimensat +.Nd set file access and modification times +.Sh LIBRARY +.Lb libc +.Sh SYNOPSIS +.In sys/stat.h +.Ft int +.Fn futimens "int fd" "const struct timespec times[2]" +.Ft int +.Fo utimensat +.Fa "int fd" +.Fa "const char *path" +.Fa "const struct timespec times[2]" +.Fa "int flag" +.Fc +.Sh DESCRIPTION +The access and modification times of the file named by +.Fa path +or referenced by +.Fa fd +are changed as specified by the argument +.Fa times . +The inode-change-time of the file is set to the current time. +.Pp +If +.Fa path +specifies a relative path, +it is relative to the current working directory if +.Fa fd +is +.Dv AT_FDCWD +and otherwise relative to the directory associated with the file descriptor +.Fa fd . +.Pp +The +.Va tv_nsec +field of a +.Vt timespec +structure +can be set to the special value +.Dv UTIME_NOW +to set the current time, or to +.Dv UTIME_OMIT +to leave the time unchanged. +In either case, the +.Va tv_sec +field is ignored. +.Pp +If +.Fa times +is +.No non- Ns Dv NULL , +it is assumed to point to an array of two timespec structures. +The access time is set to the value of the first element, and the +modification time is set to the value of the second element. +For file systems that support file birth (creation) times (such as +.Dv UFS2 ) , +the birth time will be set to the value of the second element +if the second element is older than the currently set birth time. +To set both a birth time and a modification time, +two calls are required; the first to set the birth time +and the second to set the (presumably newer) modification time. +Ideally a new system call will be added that allows the setting +of all three times at once. +If +.Fa times +is +.Dv NULL , +this is equivalent to passing +a pointer to an array of two timespec structures +with both +.Va tv_nsec +fields set to +.Dv UTIME_NOW . +.Pp +If both +.Va tv_nsec +fields are +.Dv UTIME_OMIT , +the timestamps remain unchanged and +no permissions are needed for the file itself, +although search permissions may be required for the path prefix. +The call may or may not succeed if the named file does not exist. +.Pp +If both +.Va tv_nsec +fields are +.Dv UTIME_NOW , +the caller must be the owner of the file, have permission to +write the file, or be the super-user. +.Pp +For all other values of the timestamps, +the caller must be the owner of the file or be the super-user. +.Pp +The values for the +.Fa flag +argument of the +.Fn utimensat +system call +are constructed by a bitwise-inclusive OR of flags from the following list, +defined in +.In fcntl.h : +.Bl -tag -width indent +.It Dv AT_SYMLINK_NOFOLLOW +If +.Fa path +names a symbolic link, the symbolic link's times are changed. +By default, +.Fn utimensat +changes the times of the file referenced by the symbolic link. +.El +.Sh RETURN VALUES +.Rv -std +.Sh COMPATIBILITY +If the running kernel does not support this system call, +a wrapper emulates it using +.Xr fstatat 2 , +.Xr futimesat 2 +and +.Xr lutimes 2 . +As a result, timestamps will be rounded down to the nearest microsecond, +.Dv UTIME_OMIT +is not atomic and +.Dv AT_SYMLINK_NOFOLLOW +is not available with a path relative to a file descriptor. +.Sh ERRORS +These system calls will fail if: +.Bl -tag -width Er +.It Bq Er EACCES +The +.Fa times +argument is +.Dv NULL , +or both +.Va tv_nsec +values are +.Dv UTIME_NOW , +and the effective user ID of the process does not +match the owner of the file, and is not the super-user, and write +access is denied. +.It Bq Er EFAULT +The +.Fa times +argument +points outside the process's allocated address space. +.It Bq Er EINVAL +The +.Va tv_usec +component of at least one of the values specified by the +.Fa times +argument has a value less than 0 or greater than 999999. +.It Bq Er EIO +An I/O error occurred while reading or writing the affected inode. +.It Bq Er EPERM +The +.Fa times +argument is not +.Dv NULL +nor are both +.Va tv_nsec +values +.Dv UTIME_NOW , +nor are both +.Va tv_nsec +values +.Dv UTIME_OMIT +and the calling process's effective user ID +does not match the owner of the file and is not the super-user. +.It Bq Er EPERM +The named file has its immutable or append-only flag set, see the +.Xr chflags 2 +manual page for more information. +.It Bq Er EROFS +The file system containing the file is mounted read-only. +.El +.Pp +The +.Fn futimens +system call +will fail if: +.Bl -tag -width Er +.It Bq Er EBADF +The +.Fa fd +argument +does not refer to a valid descriptor. +.El +.Pp +The +.Fn utimensat +system call +will fail if: +.Bl -tag -width Er +.It Bq Er EACCES +Search permission is denied for a component of the path prefix. +.It Bq Er EBADF +The +.Fa path +argument does not specify an absolute path and the +.Fa fd +argument is neither +.Dv AT_FDCWD +nor a valid file descriptor. +.It Bq Er EFAULT +The +.Fa path +argument +points outside the process's allocated address space. +.It Bq Er ELOOP +Too many symbolic links were encountered in translating the pathname. +.It Bq Er ENAMETOOLONG +A component of a pathname exceeded +.Dv NAME_MAX +characters, or an entire path name exceeded +.Dv PATH_MAX +characters. +.It Bq Er ENOENT +The named file does not exist. +.It Bq Er ENOTDIR +A component of the path prefix is not a directory. +.It Bq Er ENOTDIR +The +.Fa path +argument is not an absolute path and +.Fa fd +is neither +.Dv AT_FDCWD +nor a file descriptor associated with a directory. +.It Bq Er ENOTSUP +The running kernel does not support this system call and +.Dv AT_SYMLINK_NOFOLLOW +is used with a path relative to a file descriptor. +.El +.Sh SEE ALSO +.Xr chflags 2 , +.Xr stat 2 , +.Xr symlink 2 , +.Xr utimes 2 , +.Xr utime 3 , +.Xr symlink 7 +.Sh STANDARDS +The +.Fn futimens +and +.Fn utimensat +system calls are expected to conform to +.St -p1003.1-2008 . +.Sh HISTORY +The +.Fn futimens +and +.Fn utimensat +system calls appeared in +.Fx 11.0 . Added: head/lib/libc/sys/utimensat.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libc/sys/utimensat.c Fri Jan 23 21:07:08 2015 (r277610) @@ -0,0 +1,109 @@ +/*- + * Copyright (c) 2015 Jilles Tjoelker + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "namespace.h" +#include + +#include +#include +#include +#include "un-namespace.h" + +#include "libc_private.h" + +int +utimensat(int fd, const char *path, const struct timespec times[2], int flag) +{ + struct timeval now, tv[2], *tvp; + struct stat sb; + + if (__getosreldate() >= 1100056) + return (__sys_utimensat(fd, path, times, flag)); + + if ((flag & ~AT_SYMLINK_NOFOLLOW) != 0) { + errno = EINVAL; + return (-1); + } + if (times == NULL || (times[0].tv_nsec == UTIME_NOW && + times[1].tv_nsec == UTIME_NOW)) + tvp = NULL; + else if (times[0].tv_nsec == UTIME_OMIT && + times[1].tv_nsec == UTIME_OMIT) + return (0); + else { + if ((times[0].tv_nsec < 0 || times[0].tv_nsec > 999999999) && + times[0].tv_nsec != UTIME_NOW && + times[0].tv_nsec != UTIME_OMIT) { + errno = EINVAL; + return (-1); + } + if ((times[1].tv_nsec < 0 || times[1].tv_nsec > 999999999) && + times[1].tv_nsec != UTIME_NOW && + times[1].tv_nsec != UTIME_OMIT) { + errno = EINVAL; + return (-1); + } + tv[0].tv_sec = times[0].tv_sec; + tv[0].tv_usec = times[0].tv_nsec / 1000; + tv[1].tv_sec = times[1].tv_sec; + tv[1].tv_usec = times[1].tv_nsec / 1000; + tvp = tv; + if (times[0].tv_nsec == UTIME_OMIT || + times[1].tv_nsec == UTIME_OMIT) { + if (fstatat(fd, path, &sb, flag) == -1) + return (-1); + if (times[0].tv_nsec == UTIME_OMIT) { + tv[0].tv_sec = sb.st_atim.tv_sec; + tv[0].tv_usec = sb.st_atim.tv_nsec / 1000; + } + if (times[1].tv_nsec == UTIME_OMIT) { + tv[1].tv_sec = sb.st_mtim.tv_sec; + tv[1].tv_usec = sb.st_mtim.tv_nsec / 1000; + } + } + if (times[0].tv_nsec == UTIME_NOW || + times[1].tv_nsec == UTIME_NOW) { + if (gettimeofday(&now, NULL) == -1) + return (-1); + if (times[0].tv_nsec == UTIME_NOW) + tv[0] = now; + if (times[1].tv_nsec == UTIME_NOW) + tv[1] = now; + } + } + if ((flag & AT_SYMLINK_NOFOLLOW) == 0) + return (futimesat(fd, path, tvp)); + else if ((flag & AT_SYMLINK_NOFOLLOW) != 0 && + (fd == AT_FDCWD || path[0] == '/')) + return (lutimes(path, tvp)); + else { + errno = ENOTSUP; + return (-1); + } +} Modified: head/share/man/man4/rights.4 ============================================================================== --- head/share/man/man4/rights.4 Fri Jan 23 21:04:59 2015 (r277609) +++ head/share/man/man4/rights.4 Fri Jan 23 21:07:08 2015 (r277610) @@ -32,7 +32,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 23, 2013 +.Dd January 23, 2015 .Dt RIGHTS 4 .Os .Sh NAME @@ -272,9 +272,13 @@ with the flag. .It Dv CAP_FUTIMES Permit -.Xr futimes 2 +.Xr futimens 2 and +.Xr futimes 2 , +and permit .Xr futimesat 2 +and +.Xr utimensat 2 if the .Dv CAP_LOOKUP right is also present. Modified: head/sys/compat/freebsd32/freebsd32_misc.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_misc.c Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/compat/freebsd32/freebsd32_misc.c Fri Jan 23 21:07:08 2015 (r277610) @@ -1300,6 +1300,49 @@ freebsd32_futimesat(struct thread *td, s } int +freebsd32_futimens(struct thread *td, struct freebsd32_futimens_args *uap) +{ + struct timespec32 ts32[2]; + struct timespec ts[2], *tsp; + int error; + + if (uap->times != NULL) { + error = copyin(uap->times, ts32, sizeof(ts32)); + if (error) + return (error); + CP(ts32[0], ts[0], tv_sec); + CP(ts32[0], ts[0], tv_nsec); + CP(ts32[1], ts[1], tv_sec); + CP(ts32[1], ts[1], tv_nsec); + tsp = ts; + } else + tsp = NULL; + return (kern_futimens(td, uap->fd, tsp, UIO_SYSSPACE)); +} + +int +freebsd32_utimensat(struct thread *td, struct freebsd32_utimensat_args *uap) +{ + struct timespec32 ts32[2]; + struct timespec ts[2], *tsp; + int error; + + if (uap->times != NULL) { + error = copyin(uap->times, ts32, sizeof(ts32)); + if (error) + return (error); + CP(ts32[0], ts[0], tv_sec); + CP(ts32[0], ts[0], tv_nsec); + CP(ts32[1], ts[1], tv_sec); + CP(ts32[1], ts[1], tv_nsec); + tsp = ts; + } else + tsp = NULL; + return (kern_utimensat(td, uap->fd, uap->path, UIO_USERSPACE, + tsp, UIO_SYSSPACE, uap->flag)); +} + +int freebsd32_adjtime(struct thread *td, struct freebsd32_adjtime_args *uap) { struct timeval32 tv32; Modified: head/sys/compat/freebsd32/syscalls.master ============================================================================== --- head/sys/compat/freebsd32/syscalls.master Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/compat/freebsd32/syscalls.master Fri Jan 23 21:07:08 2015 (r277610) @@ -1069,3 +1069,8 @@ 545 AUE_POLL STD { int freebsd32_ppoll(struct pollfd *fds, \ u_int nfds, const struct timespec32 *ts, \ const sigset_t *set); } +546 AUE_FUTIMES STD { int freebsd32_futimens(int fd, \ + struct timespec *times); } +547 AUE_FUTIMESAT STD { int freebsd32_utimensat(int fd, \ + char *path, \ + struct timespec *times, int flag); } Modified: head/sys/kern/capabilities.conf ============================================================================== --- head/sys/kern/capabilities.conf Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/kern/capabilities.conf Fri Jan 23 21:07:08 2015 (r277610) @@ -220,8 +220,9 @@ fsync ftruncate ## -## Allow futimes(2), subject to capability rights. +## Allow futimens(2) and futimes(2), subject to capability rights. ## +futimens futimes ## @@ -453,6 +454,7 @@ readlinkat renameat symlinkat unlinkat +utimensat ## ## Allow entry into open(2). This system call will fail, since access to the Modified: head/sys/kern/syscalls.master ============================================================================== --- head/sys/kern/syscalls.master Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/kern/syscalls.master Fri Jan 23 21:07:08 2015 (r277610) @@ -983,5 +983,10 @@ 545 AUE_POLL STD { int ppoll(struct pollfd *fds, u_int nfds, \ const struct timespec *ts, \ const sigset_t *set); } +546 AUE_FUTIMES STD { int futimens(int fd, \ + struct timespec *times); } +547 AUE_FUTIMESAT STD { int utimensat(int fd, \ + char *path, \ + struct timespec *times, int flag); } ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master Modified: head/sys/kern/vfs_syscalls.c ============================================================================== --- head/sys/kern/vfs_syscalls.c Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/kern/vfs_syscalls.c Fri Jan 23 21:07:08 2015 (r277610) @@ -95,10 +95,12 @@ SDT_PROBE_DEFINE2(vfs, , stat, mode, "ch SDT_PROBE_DEFINE2(vfs, , stat, reg, "char *", "int"); static int chroot_refuse_vdir_fds(struct filedesc *fdp); -static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); static int kern_chflagsat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, u_long flags, int atflag); static int setfflags(struct thread *td, struct vnode *, u_long); +static int getutimes(const struct timeval *, enum uio_seg, struct timespec *); +static int getutimens(const struct timespec *, enum uio_seg, + struct timespec *, int *); static int setutimes(struct thread *td, struct vnode *, const struct timespec *, int, int); static int vn_access(struct vnode *vp, int user_flags, struct ucred *cred, @@ -3007,7 +3009,53 @@ getutimes(usrtvp, tvpseg, tsp) } /* - * Common implementation code for utimes(), lutimes(), and futimes(). + * Common implementation code for futimens(), utimensat(). + */ +#define UTIMENS_NULL 0x1 +#define UTIMENS_EXIT 0x2 +static int +getutimens(const struct timespec *usrtsp, enum uio_seg tspseg, + struct timespec *tsp, int *retflags) +{ + struct timespec tsnow; + int error; + + vfs_timestamp(&tsnow); + *retflags = 0; + if (usrtsp == NULL) { + tsp[0] = tsnow; + tsp[1] = tsnow; + *retflags |= UTIMENS_NULL; + return (0); + } + if (tspseg == UIO_SYSSPACE) { + tsp[0] = usrtsp[0]; + tsp[1] = usrtsp[1]; + } else if ((error = copyin(usrtsp, tsp, sizeof(*tsp) * 2)) != 0) + return (error); + if (tsp[0].tv_nsec == UTIME_OMIT && tsp[1].tv_nsec == UTIME_OMIT) + *retflags |= UTIMENS_EXIT; + if (tsp[0].tv_nsec == UTIME_NOW && tsp[1].tv_nsec == UTIME_NOW) + *retflags |= UTIMENS_NULL; + if (tsp[0].tv_nsec == UTIME_OMIT) + tsp[0].tv_sec = VNOVAL; + else if (tsp[0].tv_nsec == UTIME_NOW) + tsp[0] = tsnow; + else if (tsp[0].tv_nsec < 0 || tsp[0].tv_nsec >= 1000000000L) + return (EINVAL); + if (tsp[1].tv_nsec == UTIME_OMIT) + tsp[1].tv_sec = VNOVAL; + else if (tsp[1].tv_nsec == UTIME_NOW) + tsp[1] = tsnow; + else if (tsp[1].tv_nsec < 0 || tsp[1].tv_nsec >= 1000000000L) + return (EINVAL); + + return (0); +} + +/* + * Common implementation code for utimes(), lutimes(), futimes(), futimens(), + * and utimensat(). */ static int setutimes(td, vp, ts, numtimes, nullflag) @@ -3196,6 +3244,80 @@ kern_futimes(struct thread *td, int fd, return (error); } +int +sys_futimens(struct thread *td, struct futimens_args *uap) +{ + + return (kern_futimens(td, uap->fd, uap->times, UIO_USERSPACE)); +} + +int +kern_futimens(struct thread *td, int fd, struct timespec *tptr, + enum uio_seg tptrseg) +{ + struct timespec ts[2]; + struct file *fp; + cap_rights_t rights; + int error, flags; + + AUDIT_ARG_FD(fd); + error = getutimens(tptr, tptrseg, ts, &flags); + if (error != 0) + return (error); + if (flags & UTIMENS_EXIT) + return (0); + error = getvnode(td->td_proc->p_fd, fd, + cap_rights_init(&rights, CAP_FUTIMES), &fp); + if (error != 0) + return (error); +#ifdef AUDIT + vn_lock(fp->f_vnode, LK_SHARED | LK_RETRY); + AUDIT_ARG_VNODE1(fp->f_vnode); + VOP_UNLOCK(fp->f_vnode, 0); +#endif + error = setutimes(td, fp->f_vnode, ts, 2, flags & UTIMENS_NULL); + fdrop(fp, td); + return (error); +} + +int +sys_utimensat(struct thread *td, struct utimensat_args *uap) +{ + + return (kern_utimensat(td, uap->fd, uap->path, UIO_USERSPACE, + uap->times, UIO_USERSPACE, uap->flag)); +} + +int +kern_utimensat(struct thread *td, int fd, char *path, enum uio_seg pathseg, + struct timespec *tptr, enum uio_seg tptrseg, int flag) +{ + struct nameidata nd; + struct timespec ts[2]; + int error, flags; + + if (flag & ~AT_SYMLINK_NOFOLLOW) + return (EINVAL); + + if ((error = getutimens(tptr, tptrseg, ts, &flags)) != 0) + return (error); + NDINIT_AT(&nd, LOOKUP, ((flag & AT_SYMLINK_NOFOLLOW) ? NOFOLLOW : + FOLLOW) | AUDITVNODE1, pathseg, path, fd, td); + if ((error = namei(&nd)) != 0) + return (error); + /* + * We are allowed to call namei() regardless of 2xUTIME_OMIT. + * POSIX states: + * "If both tv_nsec fields are UTIME_OMIT... EACCESS may be detected." + * "Search permission is denied by a component of the path prefix." + */ + NDFREE(&nd, NDF_ONLY_PNBUF); + if ((flags & UTIMENS_EXIT) == 0) + error = setutimes(td, nd.ni_vp, ts, 2, flags & UTIMENS_NULL); + vrele(nd.ni_vp); + return (error); +} + /* * Truncate a file given its path name. */ Modified: head/sys/sys/capsicum.h ============================================================================== --- head/sys/sys/capsicum.h Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/sys/capsicum.h Fri Jan 23 21:07:08 2015 (r277610) @@ -146,9 +146,9 @@ #define CAP_FSTATAT (CAP_FSTAT | CAP_LOOKUP) /* Allows for fstatfs(2). */ #define CAP_FSTATFS CAPRIGHT(0, 0x0000000000100000ULL) -/* Allows for futimes(2). */ +/* Allows for futimens(2) and futimes(2). */ #define CAP_FUTIMES CAPRIGHT(0, 0x0000000000200000ULL) -/* Allows for futimes(2) and futimesat(2). */ +/* Allows for futimens(2), futimes(2), futimesat(2) and utimensat(2). */ #define CAP_FUTIMESAT (CAP_FUTIMES | CAP_LOOKUP) /* Allows for linkat(2) and renameat(2) (destination directory descriptor). */ #define CAP_LINKAT (CAP_LOOKUP | 0x0000000000400000ULL) Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/sys/param.h Fri Jan 23 21:07:08 2015 (r277610) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1100055 /* Master, propagated to newvers */ +#define __FreeBSD_version 1100056 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/stat.h ============================================================================== --- head/sys/sys/stat.h Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/sys/stat.h Fri Jan 23 21:07:08 2015 (r277610) @@ -307,6 +307,11 @@ struct nstat { #endif /* __BSD_VISIBLE */ +#if __POSIX_VISIBLE >= 200809 +#define UTIME_NOW -1 +#define UTIME_OMIT -2 +#endif + #ifndef _KERNEL __BEGIN_DECLS #if __BSD_VISIBLE @@ -322,6 +327,9 @@ int fchmod(int, mode_t); #endif #if __POSIX_VISIBLE >= 200809 int fchmodat(int, const char *, mode_t, int); +int futimens(int fd, const struct timespec times[2]); +int utimensat(int fd, const char *path, const struct timespec times[2], + int flag); #endif int fstat(int, struct stat *); #if __BSD_VISIBLE Modified: head/sys/sys/syscallsubr.h ============================================================================== --- head/sys/sys/syscallsubr.h Fri Jan 23 21:04:59 2015 (r277609) +++ head/sys/sys/syscallsubr.h Fri Jan 23 21:07:08 2015 (r277610) @@ -99,6 +99,8 @@ int kern_fstatfs(struct thread *td, int int kern_ftruncate(struct thread *td, int fd, off_t length); int kern_futimes(struct thread *td, int fd, struct timeval *tptr, enum uio_seg tptrseg); +int kern_futimens(struct thread *td, int fd, struct timespec *tptr, + enum uio_seg tptrseg); int kern_getdirentries(struct thread *td, int fd, char *buf, u_int count, long *basep, ssize_t *residp, enum uio_seg bufseg); int kern_getfsstat(struct thread *td, struct statfs **buf, size_t bufsize, @@ -220,6 +222,9 @@ int kern_unlinkat(struct thread *td, int enum uio_seg pathseg, ino_t oldinum); int kern_utimesat(struct thread *td, int fd, char *path, enum uio_seg pathseg, struct timeval *tptr, enum uio_seg tptrseg); +int kern_utimensat(struct thread *td, int fd, char *path, + enum uio_seg pathseg, struct timespec *tptr, enum uio_seg tptrseg, + int follow); int kern_wait(struct thread *td, pid_t pid, int *status, int options, struct rusage *rup); int kern_wait6(struct thread *td, enum idtype idtype, id_t id, int *status, Modified: head/usr.bin/kdump/kdump.c ============================================================================== --- head/usr.bin/kdump/kdump.c Fri Jan 23 21:04:59 2015 (r277609) +++ head/usr.bin/kdump/kdump.c Fri Jan 23 21:07:08 2015 (r277610) @@ -714,6 +714,7 @@ ktrsyscall(struct ktr_syscall *ktr, u_in case SYS_readlinkat: case SYS_renameat: case SYS_unlinkat: + case SYS_utimensat: putchar('('); atfdname(*ip, decimal); c = ','; From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:07:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7E7BD7D; Fri, 23 Jan 2015 21:07:37 +0000 (UTC) Received: from mail-pd0-x236.google.com (mail-pd0-x236.google.com [IPv6:2607:f8b0:400e:c02::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 45781224; Fri, 23 Jan 2015 21:07:37 +0000 (UTC) Received: by mail-pd0-f182.google.com with SMTP id z10so8440493pdj.13; Fri, 23 Jan 2015 13:07:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=xNn3H/3RIUUxD55Pfz45BzsxddVYWJU/HZQfp/sMhNE=; b=u3CtqkdF9C+/MnposBvdLOI9ifmM4kpEU6VywlmFqV4lk8uR1NSz3VO9cfNMcdkdEO 0EVp5YqeU3+DNuUID2KoSkHxrCvbEUVQAQIMN+yWjT35qDFcCfI1MPvKFfGR0n9mXq7U 962yJLV2YlXeiMubGH1hP7qr5/F4eEZWGTuQVvY/qPK0M8G6CRhHW8VkbihtutNp6NgG P83Ijpa3h+p5l3Ru5KznrJ+MqIX9bFERDMokhR6YSsvryrHhYyYZvSIWJkVyzVqPUmIV iujM6Qsgsikcmh+GatEXYAALq3pE1Tsr2lg8kf5dIojryHAXnvLbx2AkXPnszg87TCSo h8BA== X-Received: by 10.68.68.201 with SMTP id y9mr14318896pbt.110.1422047256941; Fri, 23 Jan 2015 13:07:36 -0800 (PST) Received: from [192.168.20.5] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id ua7sm2825993pab.37.2015.01.23.13.07.35 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Jan 2015 13:07:36 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_E5ED9687-BCE0-41C5-9DB4-D90B6B0E0FB2"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r277606 - head/release From: Garrett Cooper In-Reply-To: <1422044932.1038.3.camel@freebsd.org> Date: Fri, 23 Jan 2015 13:07:33 -0800 Message-Id: <1E8B88AF-4661-47D3-A51D-1671381D51B4@gmail.com> References: <201501232024.t0NKODZq079972@svn.freebsd.org> <1422044932.1038.3.camel@freebsd.org> To: Ian Lepore X-Mailer: Apple Mail (2.1878.6) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers , Colin Percival X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:07:37 -0000 --Apple-Mail=_E5ED9687-BCE0-41C5-9DB4-D90B6B0E0FB2 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Jan 23, 2015, at 12:28, Ian Lepore wrote: > On Fri, 2015-01-23 at 20:24 +0000, Colin Percival wrote: >> Author: cperciva >> Date: Fri Jan 23 20:24:13 2015 >> New Revision: 277606 >> URL: https://svnweb.freebsd.org/changeset/base/277606 >>=20 >> Log: >> Provide a recipe of "true" for building the "release" target once = its >> prerequisites are satisfied, in order to avoid having an implicit = rule >> triggered by the presence of release.sh. >>=20 >> Approved by: gjb >>=20 >> Modified: >> head/release/Makefile >>=20 >> Modified: head/release/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/release/Makefile Fri Jan 23 19:43:57 2015 = (r277605) >> +++ head/release/Makefile Fri Jan 23 20:24:13 2015 = (r277606) >> @@ -279,6 +279,7 @@ ftp: packagesystem >> cp *.txz MANIFEST ftp >>=20 >> release: real-release vm-release cloudware-release >> + @true >>=20 >> real-release: >> ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj >>=20 >=20 > Wouldn't '.PHONY: release' be a better/more-correct fix? +1 . Thanks for being me to the comment... --Apple-Mail=_E5ED9687-BCE0-41C5-9DB4-D90B6B0E0FB2 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUwrgWAAoJEMZr5QU6S73ewkgH/0DjMEVnY+4ioGuYNAcGrGXV G64t0aLxVmBR283rDfok8W/YGpzAT7o0lWi+WG50TqOmYnRUMi4upw7glDKX8pLV XSQsqAujnZHMV9ZxseybFf/+nMVrtG7CwqD+wigD35FU1vaHsgtwT1uE97qTnUXm HGagQE3EGn6zSpzyT+gQUrrSJCqhJTnQdUVUjnirWWVB1KmzV6JwPk3PFZQE8VBw Y1e46S5dQCo4O05AfNzLGbDZ99Ud3ql7Ha5AGUt0gUg0Sbtf//Y2bbWKoJ+DDkQS SB1xhiOTJ9ONZQ1eGXX+YTq8R6s/Kooj89YMArsIHr6Cdu8aL6CW0rEJ8PXVGP4= =WrJA -----END PGP SIGNATURE----- --Apple-Mail=_E5ED9687-BCE0-41C5-9DB4-D90B6B0E0FB2-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:08:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7C6031DD; Fri, 23 Jan 2015 21:08:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6775F234; Fri, 23 Jan 2015 21:08:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NL8Scp099986; Fri, 23 Jan 2015 21:08:28 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NL8PH3099971; Fri, 23 Jan 2015 21:08:25 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501232108.t0NL8PH3099971@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Fri, 23 Jan 2015 21:08:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277611 - in head/sys: compat/freebsd32 kern sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:08:28 -0000 Author: jilles Date: Fri Jan 23 21:08:24 2015 New Revision: 277611 URL: https://svnweb.freebsd.org/changeset/base/277611 Log: Run make sysent. 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 Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/compat/freebsd32/freebsd32_proto.h Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ #ifndef _FREEBSD32_SYSPROTO_H_ @@ -693,6 +693,16 @@ struct freebsd32_ppoll_args { char ts_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * ts; char ts_r_[PADR_(const struct timespec32 *)]; char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; }; +struct freebsd32_futimens_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; +}; +struct freebsd32_utimensat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; +}; #if !defined(PAD64_REQUIRED) && (defined(__powerpc__) || defined(__mips__)) #define PAD64_REQUIRED #endif @@ -825,6 +835,8 @@ int freebsd32_procctl(struct thread *, s int freebsd32_procctl(struct thread *, struct freebsd32_procctl_args *); #endif int freebsd32_ppoll(struct thread *, struct freebsd32_ppoll_args *); +int freebsd32_futimens(struct thread *, struct freebsd32_futimens_args *); +int freebsd32_utimensat(struct thread *, struct freebsd32_utimensat_args *); #ifdef COMPAT_43 @@ -1240,6 +1252,8 @@ int freebsd7_freebsd32_shmctl(struct thr #define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_procctl AUE_NULL #define FREEBSD32_SYS_AUE_freebsd32_ppoll AUE_POLL +#define FREEBSD32_SYS_AUE_freebsd32_futimens AUE_FUTIMES +#define FREEBSD32_SYS_AUE_freebsd32_utimensat AUE_FUTIMESAT #undef PAD_ #undef PADL_ Modified: head/sys/compat/freebsd32/freebsd32_syscall.h ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscall.h Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/compat/freebsd32/freebsd32_syscall.h Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ #define FREEBSD32_SYS_syscall 0 @@ -453,4 +453,6 @@ #define FREEBSD32_SYS_freebsd32_procctl 544 #define FREEBSD32_SYS_freebsd32_procctl 544 #define FREEBSD32_SYS_freebsd32_ppoll 545 -#define FREEBSD32_SYS_MAXSYSCALL 546 +#define FREEBSD32_SYS_freebsd32_futimens 546 +#define FREEBSD32_SYS_freebsd32_utimensat 547 +#define FREEBSD32_SYS_MAXSYSCALL 548 Modified: head/sys/compat/freebsd32/freebsd32_syscalls.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/compat/freebsd32/freebsd32_syscalls.c Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ const char *freebsd32_syscallnames[] = { @@ -579,4 +579,6 @@ const char *freebsd32_syscallnames[] = { "freebsd32_procctl", /* 544 = freebsd32_procctl */ #endif "freebsd32_ppoll", /* 545 = freebsd32_ppoll */ + "freebsd32_futimens", /* 546 = freebsd32_futimens */ + "freebsd32_utimensat", /* 547 = freebsd32_utimensat */ }; Modified: head/sys/compat/freebsd32/freebsd32_sysent.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_sysent.c Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/compat/freebsd32/freebsd32_sysent.c Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ #include "opt_compat.h" @@ -616,4 +616,6 @@ struct sysent freebsd32_sysent[] = { { AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */ #endif { AS(freebsd32_ppoll_args), (sy_call_t *)freebsd32_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = freebsd32_ppoll */ + { AS(freebsd32_futimens_args), (sy_call_t *)freebsd32_futimens, AUE_FUTIMES, NULL, 0, 0, 0, SY_THR_STATIC }, /* 546 = freebsd32_futimens */ + { AS(freebsd32_utimensat_args), (sy_call_t *)freebsd32_utimensat, AUE_FUTIMESAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 547 = freebsd32_utimensat */ }; Modified: head/sys/compat/freebsd32/freebsd32_systrace_args.c ============================================================================== --- head/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/compat/freebsd32/freebsd32_systrace_args.c Fri Jan 23 21:08:24 2015 (r277611) @@ -3309,6 +3309,24 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* freebsd32_futimens */ + case 546: { + struct freebsd32_futimens_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->times; /* struct timespec * */ + *n_args = 2; + break; + } + /* freebsd32_utimensat */ + case 547: { + struct freebsd32_utimensat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* char * */ + uarg[2] = (intptr_t) p->times; /* struct timespec * */ + iarg[3] = p->flag; /* int */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -8873,6 +8891,38 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* freebsd32_futimens */ + case 546: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct timespec *"; + break; + default: + break; + }; + break; + /* freebsd32_utimensat */ + case 547: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "struct timespec *"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -10751,6 +10801,16 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* freebsd32_futimens */ + case 546: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* freebsd32_utimensat */ + case 547: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/kern/init_sysent.c ============================================================================== --- head/sys/kern/init_sysent.c Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/kern/init_sysent.c Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ #include "opt_compat.h" @@ -580,4 +580,6 @@ struct sysent sysent[] = { { AS(aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = aio_mlock */ { AS(procctl_args), (sy_call_t *)sys_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = procctl */ { AS(ppoll_args), (sy_call_t *)sys_ppoll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 545 = ppoll */ + { AS(futimens_args), (sy_call_t *)sys_futimens, AUE_FUTIMES, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 546 = futimens */ + { AS(utimensat_args), (sy_call_t *)sys_utimensat, AUE_FUTIMESAT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 547 = utimensat */ }; Modified: head/sys/kern/syscalls.c ============================================================================== --- head/sys/kern/syscalls.c Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/kern/syscalls.c Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ const char *syscallnames[] = { @@ -553,4 +553,6 @@ const char *syscallnames[] = { "aio_mlock", /* 543 = aio_mlock */ "procctl", /* 544 = procctl */ "ppoll", /* 545 = ppoll */ + "futimens", /* 546 = futimens */ + "utimensat", /* 547 = utimensat */ }; Modified: head/sys/kern/systrace_args.c ============================================================================== --- head/sys/kern/systrace_args.c Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/kern/systrace_args.c Fri Jan 23 21:08:24 2015 (r277611) @@ -3382,6 +3382,24 @@ systrace_args(int sysnum, void *params, *n_args = 4; break; } + /* futimens */ + case 546: { + struct futimens_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->times; /* struct timespec * */ + *n_args = 2; + break; + } + /* utimensat */ + case 547: { + struct utimensat_args *p = params; + iarg[0] = p->fd; /* int */ + uarg[1] = (intptr_t) p->path; /* char * */ + uarg[2] = (intptr_t) p->times; /* struct timespec * */ + iarg[3] = p->flag; /* int */ + *n_args = 4; + break; + } default: *n_args = 0; break; @@ -9019,6 +9037,38 @@ systrace_entry_setargdesc(int sysnum, in break; }; break; + /* futimens */ + case 546: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "struct timespec *"; + break; + default: + break; + }; + break; + /* utimensat */ + case 547: + switch(ndx) { + case 0: + p = "int"; + break; + case 1: + p = "char *"; + break; + case 2: + p = "struct timespec *"; + break; + case 3: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -10962,6 +11012,16 @@ systrace_return_setargdesc(int sysnum, i if (ndx == 0 || ndx == 1) p = "int"; break; + /* futimens */ + case 546: + if (ndx == 0 || ndx == 1) + p = "int"; + break; + /* utimensat */ + case 547: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; Modified: head/sys/sys/syscall.h ============================================================================== --- head/sys/sys/syscall.h Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/sys/syscall.h Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ #define SYS_syscall 0 @@ -463,4 +463,6 @@ #define SYS_aio_mlock 543 #define SYS_procctl 544 #define SYS_ppoll 545 -#define SYS_MAXSYSCALL 546 +#define SYS_futimens 546 +#define SYS_utimensat 547 +#define SYS_MAXSYSCALL 548 Modified: head/sys/sys/syscall.mk ============================================================================== --- head/sys/sys/syscall.mk Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/sys/syscall.mk Fri Jan 23 21:08:24 2015 (r277611) @@ -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 276654 2015-01-04 10:34:02Z dchagin +# created from FreeBSD: head/sys/kern/syscalls.master 277610 2015-01-23 21:07:08Z jilles MIASM = \ syscall.o \ exit.o \ @@ -410,4 +410,6 @@ MIASM = \ pipe2.o \ aio_mlock.o \ procctl.o \ - ppoll.o + ppoll.o \ + futimens.o \ + utimensat.o Modified: head/sys/sys/sysproto.h ============================================================================== --- head/sys/sys/sysproto.h Fri Jan 23 21:07:08 2015 (r277610) +++ head/sys/sys/sysproto.h Fri Jan 23 21:08:24 2015 (r277611) @@ -3,7 +3,7 @@ * * DO NOT EDIT-- this file is automatically generated. * $FreeBSD$ - * created from FreeBSD: head/sys/kern/syscalls.master 276654 2015-01-04 10:34:02Z dchagin + * created from FreeBSD: head/sys/kern/syscalls.master 277610 2015-01-23 21:07:08Z jilles */ #ifndef _SYS_SYSPROTO_H_ @@ -1819,6 +1819,16 @@ struct ppoll_args { char ts_l_[PADL_(const struct timespec *)]; const struct timespec * ts; char ts_r_[PADR_(const struct timespec *)]; char set_l_[PADL_(const sigset_t *)]; const sigset_t * set; char set_r_[PADR_(const sigset_t *)]; }; +struct futimens_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; +}; +struct utimensat_args { + char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)]; + char path_l_[PADL_(char *)]; char * path; char path_r_[PADR_(char *)]; + char times_l_[PADL_(struct timespec *)]; struct timespec * times; char times_r_[PADR_(struct timespec *)]; + char flag_l_[PADL_(int)]; int flag; char flag_r_[PADR_(int)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2211,6 +2221,8 @@ int sys_pipe2(struct thread *, struct pi int sys_aio_mlock(struct thread *, struct aio_mlock_args *); int sys_procctl(struct thread *, struct procctl_args *); int sys_ppoll(struct thread *, struct ppoll_args *); +int sys_futimens(struct thread *, struct futimens_args *); +int sys_utimensat(struct thread *, struct utimensat_args *); #ifdef COMPAT_43 @@ -2917,6 +2929,8 @@ int freebsd7_shmctl(struct thread *, str #define SYS_AUE_aio_mlock AUE_NULL #define SYS_AUE_procctl AUE_NULL #define SYS_AUE_ppoll AUE_POLL +#define SYS_AUE_futimens AUE_FUTIMES +#define SYS_AUE_utimensat AUE_FUTIMESAT #undef PAD_ #undef PADL_ From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:12:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0A5AE369 for ; Fri, 23 Jan 2015 21:12:54 +0000 (UTC) Received: from o1.l99.sendgrid.net (o1.l99.sendgrid.net [198.37.153.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9F18131D for ; Fri, 23 Jan 2015 21:12:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h=from:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding; s=smtpapi; bh=4rKD3WRhBFxw+9UBN4m+QDEuo6Q=; b=h4reBvAfPab1ORfZN+ lthwpVoO+kg2zkj8qgS2BrbIATEshQwEhgbgxSqbxXcKYg7MOPVshGvyf3FlxUrG hLHqAXM6xsHKbkxNZE2qJqm2G1VFTEnsyOL4PBKNzxsqnjnjqyEGm4DRjjEM29wH 29izrEASTnPLvnEmGf04QfvVE= Received: by filter0025p1mdw1.sendgrid.net with SMTP id filter0025p1mdw1.14981.54C2B94810 2015-01-23 21:12:49.878434728 +0000 UTC Received: from mail.tarsnap.com (ec2-54-86-246-204.compute-1.amazonaws.com [54.86.246.204]) by ismtpd-009 (SG) with ESMTP id 14b18a3e79a.7f79.42dcc4 for ; Fri, 23 Jan 2015 21:12:49 +0000 (UTC) Received: (qmail 59311 invoked from network); 23 Jan 2015 21:12:13 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by ec2-107-20-205-189.compute-1.amazonaws.com with ESMTP; 23 Jan 2015 21:12:13 -0000 Received: (qmail 5362 invoked from network); 23 Jan 2015 21:12:01 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 23 Jan 2015 21:12:01 -0000 Message-ID: <54C2B921.3090007@freebsd.org> Date: Fri, 23 Jan 2015 13:12:01 -0800 From: Colin Percival User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Ian Lepore Subject: Re: svn commit: r277606 - head/release References: <201501232024.t0NKODZq079972@svn.freebsd.org> <1422044932.1038.3.camel@freebsd.org> In-Reply-To: <1422044932.1038.3.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SG-EID: A6W2xSVPHetogaU8rnzccWwgBYtN+QvIzXyjfe/10PHNlK6NRk/bdCtK2zayg/4Kq9wcm2oEFOMgCx cUdy6TDj7pLbs46f3qXbYXBYa/b4qApMCgyFR8svFUAELAn8PgUxGH8sHCNKWARnJpJ+9gqzOYxSvr g3KAVsIsjVo65mz8cG/nVAXosqjVD6KU1ijk Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:12:54 -0000 On 01/23/15 12:28, Ian Lepore wrote: > On Fri, 2015-01-23 at 20:24 +0000, Colin Percival wrote: >> release: real-release vm-release cloudware-release >> + @true >> >> real-release: >> ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj >> > > Wouldn't '.PHONY: release' be a better/more-correct fix? Could be. I was inspired by the use of ${DO_NADA} in ports Makefiles, but perhaps that's for targets which truly do nothing rather than targets which serve only to activate their dependencies... if anyone else has opinions on this please email me directly; no point clogging up the mailing list. I'll adjust based on feedback (which is currently leaning in favour of .PHONY). -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:18:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DB69850C; Fri, 23 Jan 2015 21:18:05 +0000 (UTC) Received: from mail-lb0-x233.google.com (mail-lb0-x233.google.com [IPv6:2a00:1450:4010:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 5B444348; Fri, 23 Jan 2015 21:18:05 +0000 (UTC) Received: by mail-lb0-f179.google.com with SMTP id 10so7954657lbg.10; Fri, 23 Jan 2015 13:18:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=w6UB5727e1ZlEFG93tudy2gDmw3ZNNoYYvOKkTY+wno=; b=xootc1VLfaGroURUvESbbijrSywsWNV0nFygVnp+DJGKlGxQlM5umCtkqgCF5G5RxE kj5XD3qwHCZwK+ldkNgpyh9XzktQ8ArmnO331/ByzJRs5PtPErbFxn7YDirz1t7qQPDM uugLNBIE4Rg+YnAsVNuWfF121KlAQH6ARsoyE+ZSdCoZJq5AcqmtgT6lsGCctkhl+caW 0Uieuj0YpbHO3RkPaiGigzNm/O+eTowsv4oIIU9q6EhLiUm4HLOsi3ZDBjtMijrX6e8B 2/0vm9g7XucfDv3Hv5apkhB4sIm3tqQqntqSXfNeNoHNP2+pq/ZBRuc7ORFe+pnKIEGy LxTw== MIME-Version: 1.0 X-Received: by 10.152.44.228 with SMTP id h4mr8454209lam.31.1422047883459; Fri, 23 Jan 2015 13:18:03 -0800 (PST) Sender: davide.italiano@gmail.com Received: by 10.25.155.4 with HTTP; Fri, 23 Jan 2015 13:18:03 -0800 (PST) In-Reply-To: <20150123205617.GB56104@sol.firepipe.net> References: <201501231618.t0NGIeDv057991@svn.freebsd.org> <20150123205617.GB56104@sol.firepipe.net> Date: Fri, 23 Jan 2015 13:18:03 -0800 X-Google-Sender-Auth: -Nx1CTRrJSCQsFeVl9v1RakdKDM Message-ID: Subject: Re: svn commit: r277570 - head/usr.bin/vmstat From: Davide Italiano To: Will Andrews Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:18:06 -0000 On Fri, Jan 23, 2015 at 12:56 PM, Will Andrews wrote: > On Fri, Jan 23, 2015 at 11:23:57AM -0800, Davide Italiano wrote: >> What's the rationale behind this change? > > The rationale was to match the clock used to the name (and implied intent) > of the variables used to store/manipulate the data. > > It's possible that 'uptime' is entirely the wrong term in vmstat, in which > case the naming used elsewhere in vmstat needs to be changed too. > > -- > wca I don't think this is a reason strong enough, we should rather go the other way around as already suggested. I would like to see this reverted. Thanks, -- Davide "There are no solved problems; there are only problems that are more or less solved" -- Henri Poincare From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:34:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 659E3C29; Fri, 23 Jan 2015 21:34:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 51924779; Fri, 23 Jan 2015 21:34:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NLY90U013704; Fri, 23 Jan 2015 21:34:09 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NLY9if013703; Fri, 23 Jan 2015 21:34:09 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201501232134.t0NLY9if013703@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 23 Jan 2015 21:34:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277612 - head X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:34:09 -0000 Author: emaste Date: Fri Jan 23 21:34:08 2015 New Revision: 277612 URL: https://svnweb.freebsd.org/changeset/base/277612 Log: Restore addr2line to cross tools Addr2line is not required for the build, and a per-arch binary is no longer required with the switch to the ELF Tool Chain. However, building these tools during the cross tools stage can be useful for developers who cross build HEAD from stable/10, and adds very little to the build time. Reviewed by: ian, imp Differential Revision: https://reviews.freebsd.org/D1583 Modified: head/Makefile.inc1 Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Jan 23 21:08:24 2015 (r277611) +++ head/Makefile.inc1 Fri Jan 23 21:34:08 2015 (r277612) @@ -1437,6 +1437,9 @@ _elftctools= lib/libelftc \ usr.bin/nm \ usr.bin/size \ usr.bin/strings +# These are not required by the build, but can be useful for developers who +# cross-build on a FreeBSD 10 host: +_elftctools+= usr.bin/addr2line .endif .endif From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 21:49:07 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ACAB82E8; Fri, 23 Jan 2015 21:49:07 +0000 (UTC) Received: from mail-wg0-x22f.google.com (mail-wg0-x22f.google.com [IPv6:2a00:1450:400c:c00::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4E9158D0; Fri, 23 Jan 2015 21:49:07 +0000 (UTC) Received: by mail-wg0-f47.google.com with SMTP id n12so9826353wgh.6; Fri, 23 Jan 2015 13:49:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=8uxXlsVFcubfqVG2HelUTxmqDMmS/tELOOMkfCP8v+0=; b=CBV/1EPuALh292SaFwprOajAuY3IqP6IN2ckwarOdMQJaojVJeu5rnh0h8iRHpmvUO IqkugO8r0jLkxezsygXgerHGp3wteR5gsIuuMw+TemgrOUeMec7HpU2VywXLst3WXesM Af8Xs+KTkzjFp4QOtVRdYbaZplx5gRg2B/hR+VGn8eoRGB0ipkpuloMNTSJos9tPrQnZ Z8YdQzgD44H01nwWrzs+QVjxr1c6cCGR3+iF/Hn4VnA9/6+m3IAFJ2MAt56SDWYMKmel tsICB3KRPXUAqFxh//Evlq5nk6ChsQ0pPsmy7fy6IgjnX9FgHNJVypz/bO+SjhqCNnrI zJAQ== MIME-Version: 1.0 X-Received: by 10.180.211.176 with SMTP id nd16mr7690935wic.23.1422049745804; Fri, 23 Jan 2015 13:49:05 -0800 (PST) Sender: asomers@gmail.com Received: by 10.194.17.129 with HTTP; Fri, 23 Jan 2015 13:49:05 -0800 (PST) In-Reply-To: References: <201501231618.t0NGIeDv057991@svn.freebsd.org> <20150123205617.GB56104@sol.firepipe.net> Date: Fri, 23 Jan 2015 14:49:05 -0700 X-Google-Sender-Auth: 9JScbwcbmzkiNI2PEEHN_E0e5ZE Message-ID: Subject: Re: svn commit: r277570 - head/usr.bin/vmstat From: Alan Somers To: Davide Italiano Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Will Andrews X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 21:49:07 -0000 On Fri, Jan 23, 2015 at 2:18 PM, Davide Italiano wrote: > On Fri, Jan 23, 2015 at 12:56 PM, Will Andrews wrote: >> On Fri, Jan 23, 2015 at 11:23:57AM -0800, Davide Italiano wrote: >>> What's the rationale behind this change? >> >> The rationale was to match the clock used to the name (and implied intent) >> of the variables used to store/manipulate the data. >> >> It's possible that 'uptime' is entirely the wrong term in vmstat, in which >> case the naming used elsewhere in vmstat needs to be changed too. >> >> -- >> wca > > I don't think this is a reason strong enough, we should rather go the > other way around as already suggested. > I would like to see this reverted. > > Thanks, > > -- > Davide > I agree with Ian that vmstat ought to be using a monotonic clock, and that the ideal change would be to rename all of its "uptime" variables accordingly. But reverting this change would be the worst possible outcome because we'd be back in the original situation of wrong variable names that are wrongly set. As is, the change has no functional effect because CLOCK_MONOTONIC and CLOCK_UPTIME are identical (see kern_clock_gettime). -Alan From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 22:24:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from hub.FreeBSD.org (hub.freebsd.org [IPv6:2001:1900:2254:206c::16:88]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4043BA10; Fri, 23 Jan 2015 22:24:02 +0000 (UTC) Date: Fri, 23 Jan 2015 22:23:57 +0000 From: Glen Barber To: Ian Lepore Subject: Re: svn commit: r277606 - head/release Message-ID: <20150123222357.GD1264@hub.FreeBSD.org> References: <201501232024.t0NKODZq079972@svn.freebsd.org> <1422044932.1038.3.camel@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TybLhxa8M7aNoW+V" Content-Disposition: inline In-Reply-To: <1422044932.1038.3.camel@freebsd.org> X-Operating-System: FreeBSD 11.0-CURRENT amd64 X-SCUD-Definition: Sudden Completely Unexpected Dataloss X-SULE-Definition: Sudden Unexpected Learning Event User-Agent: Mutt/1.5.23 (2014-03-12) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Colin Percival X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 22:24:03 -0000 --TybLhxa8M7aNoW+V Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jan 23, 2015 at 01:28:52PM -0700, Ian Lepore wrote: > On Fri, 2015-01-23 at 20:24 +0000, Colin Percival wrote: > > Author: cperciva > > Date: Fri Jan 23 20:24:13 2015 > > New Revision: 277606 > > URL: https://svnweb.freebsd.org/changeset/base/277606 > >=20 > > Log: > > Provide a recipe of "true" for building the "release" target once its > > prerequisites are satisfied, in order to avoid having an implicit rule > > triggered by the presence of release.sh. > > =20 > > Approved by: gjb > >=20 > > Modified: > > head/release/Makefile > >=20 > > Modified: head/release/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/release/Makefile Fri Jan 23 19:43:57 2015 (r277605) > > +++ head/release/Makefile Fri Jan 23 20:24:13 2015 (r277606) > > @@ -279,6 +279,7 @@ ftp: packagesystem > > cp *.txz MANIFEST ftp > > =20 > > release: real-release vm-release cloudware-release > > + @true > > =20 > > real-release: > > ${MAKE} -C ${.CURDIR} ${.MAKEFLAGS} obj > >=20 >=20 > Wouldn't '.PHONY: release' be a better/more-correct fix? >=20 I'm not sure this is a more proper fix in how this Makefile is set up currently. Prior to my recent changes, 'release' invoked each RELEASE_TARGETS entry individually, which in turn invoke 'system' and 'packagesystem', if needed. The disc1.iso target uses the literal 'release' directory to populate the CDROM image, which after success, 'make release' will not do anything because the 'release' target is up-to-date. This is the intended behavior, which with Colin's '@true' addition, keeps the behavior consistent with what previously happened. I do want to change where the disc1.iso bits get installed, after which adding 'touch ${.TARGET}' to the release target should continue to do the right thing. Glen --TybLhxa8M7aNoW+V Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJUwsn9AAoJEAMUWKVHj+KTQDQQAIN1msJZZ2QNHk6G1bIYHJX1 VcnTy3vvHjNnD/Zu9DhCpnenc0Uy5laFH/04ncXAkaAtdmZh9TycKttS/JMihgr1 s5XpjnyWOxhtkatvarI7EyBHC/frEVMv1B/iQQmi1CGwKpbMIctIzsk7DB5nOMRP 3kUFT6/dFPkhCcFnI0d9zIp+SbQDEfPkAQyqEd9cWvfWHkKJPNs2dzruSnZfVuef nWShXga0BG+ilB2ZFQQNC5kh0PQowHoIcYz0F2Lm6EL8xz45t9s23iY3oQe76VW4 pj8ctBuzbwC2p6fPaHV9me098bAnRoNXZrYwiz2sD+vNXOP0LpLNdY0aHNYlDcQ4 eWGO5EEaw3uE/veZNcv7JH9bLZ4lqtq778JNvn83IJ2DkrFVLZYKpcBg6ql7nyWJ quFZK2iXmIbbxk1sX53xYnQqmk2lgTPlUHK+aQ1ixR+AMqElWIk9P29tLbujphWT EYF/KSgr+KnyqzwchJGjZOVplIlN9SQ5jbA4FfuZc/kfCXEvSpGMEjcpFH3pqsSo zsWCtkRNVTX+wSNn/KJsZ/QlYlK20KPNnx6Mvqv9CjS2cHAbhwfYxTIpkKQTZWOX 8OVj45hdd/OIebrqTCtj0qSoMKmbn1N7BKI1MLz/hH0ynNv83zsDEE3VDmeRYdUv vgwPFvC1WWlW9Pi/ScXB =oBur -----END PGP SIGNATURE----- --TybLhxa8M7aNoW+V-- From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 22:39:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A474A98; Fri, 23 Jan 2015 22:39:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FAF0DB2; Fri, 23 Jan 2015 22:39:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NMdSkp043770; Fri, 23 Jan 2015 22:39:28 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NMdS69043769; Fri, 23 Jan 2015 22:39:28 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501232239.t0NMdS69043769@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 23 Jan 2015 22:39:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277617 - stable/9/contrib/ofed X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 22:39:28 -0000 Author: ngie Date: Fri Jan 23 22:39:27 2015 New Revision: 277617 URL: https://svnweb.freebsd.org/changeset/base/277617 Log: MFC r276806: Remove unnecessary .include of bsd.own.mk Sponsored by: EMC / Isilon Storage Division Modified: stable/9/contrib/ofed/Makefile Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/Makefile ============================================================================== --- stable/9/contrib/ofed/Makefile Fri Jan 23 22:35:55 2015 (r277616) +++ stable/9/contrib/ofed/Makefile Fri Jan 23 22:39:27 2015 (r277617) @@ -1,5 +1,3 @@ -.include - SUBDIR = include usr.lib usr.bin .include From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 22:46:08 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 1091540C; Fri, 23 Jan 2015 22:46:08 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EEF0CE88; Fri, 23 Jan 2015 22:46:07 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NMk7xs048417; Fri, 23 Jan 2015 22:46:07 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NMk76s048416; Fri, 23 Jan 2015 22:46:07 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501232246.t0NMk76s048416@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Fri, 23 Jan 2015 22:46:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277618 - stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 22:46:08 -0000 Author: delphij Date: Fri Jan 23 22:46:07 2015 New Revision: 277618 URL: https://svnweb.freebsd.org/changeset/base/277618 Log: MFC r275923: Add missing continue: we can't proceed further if the kernel does not panic with zfs_panic_recover. Illumos issue: 5438 zfs_blkptr_verify should continue after zfs_panic_recover Reported by: Coverity CID: 1232014 Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c ============================================================================== --- stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 22:39:27 2015 (r277617) +++ stable/10/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c Fri Jan 23 22:46:07 2015 (r277618) @@ -706,18 +706,20 @@ zfs_blkptr_verify(spa_t *spa, const blkp zfs_panic_recover("blkptr at %p DVA %u has invalid " "VDEV %llu", bp, i, (longlong_t)vdevid); + continue; } vdev_t *vd = spa->spa_root_vdev->vdev_child[vdevid]; if (vd == NULL) { zfs_panic_recover("blkptr at %p DVA %u has invalid " "VDEV %llu", bp, i, (longlong_t)vdevid); + continue; } if (vd->vdev_ops == &vdev_hole_ops) { zfs_panic_recover("blkptr at %p DVA %u has hole " "VDEV %llu", bp, i, (longlong_t)vdevid); - + continue; } if (vd->vdev_ops == &vdev_missing_ops) { /* From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 23:09:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BA734AD6; Fri, 23 Jan 2015 23:09:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A5511142; Fri, 23 Jan 2015 23:09:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NN9dlX063522; Fri, 23 Jan 2015 23:09:39 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NN9d44063521; Fri, 23 Jan 2015 23:09:39 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501232309.t0NN9d44063521@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Fri, 23 Jan 2015 23:09:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277619 - stable/9/contrib/ofed/usr.lib/libibcm X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 23:09:39 -0000 Author: ngie Date: Fri Jan 23 23:09:38 2015 New Revision: 277619 URL: https://svnweb.freebsd.org/changeset/base/277619 Log: MFC r276804: Fix 'make depend' before infiniband headers have been installed to build host by removing space between -I and the header directory Sponsored by: EMC / Isilon Storage Division Modified: stable/9/contrib/ofed/usr.lib/libibcm/Makefile Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/usr.lib/libibcm/Makefile ============================================================================== --- stable/9/contrib/ofed/usr.lib/libibcm/Makefile Fri Jan 23 22:46:07 2015 (r277618) +++ stable/9/contrib/ofed/usr.lib/libibcm/Makefile Fri Jan 23 23:09:38 2015 (r277619) @@ -15,7 +15,7 @@ SHLIB_MAJOR= 1 NO_PROFILE= SRCS= cm.c -CFLAGS+= -I ${IBCMDIR}/include +CFLAGS+= -I${IBCMDIR}/include MAN= VERSION_MAP= ${IBSRCDIR}/libibcm.map From owner-svn-src-all@FreeBSD.ORG Fri Jan 23 23:53:57 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE6C050B; Fri, 23 Jan 2015 23:53:57 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9053380A; Fri, 23 Jan 2015 23:53:57 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0NNrvHB086575; Fri, 23 Jan 2015 23:53:57 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0NNrvpq086574; Fri, 23 Jan 2015 23:53:57 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501232353.t0NNrvpq086574@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Fri, 23 Jan 2015 23:53:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277622 - head/sys/boot/i386/libfirewire X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 23 Jan 2015 23:53:57 -0000 Author: will Date: Fri Jan 23 23:53:56 2015 New Revision: 277622 URL: https://svnweb.freebsd.org/changeset/base/277622 Log: Fix panic in firewire and creation of invalid config ROM. (This change was supposed to be included in r277508.) sys/boot/i386/libfirewire/firewire.c: Fix configuration ROM generation count wrapping logic so that the generation count is never outside of allowed limits (0x2 -> 0xF). Submitted by: gibbs MFC after: 1 week MFC with: 277508 Sponsored by: Spectra Logic MFSpectraBSD: 1110685 on 2015/01/05 Modified: head/sys/boot/i386/libfirewire/firewire.c Modified: head/sys/boot/i386/libfirewire/firewire.c ============================================================================== --- head/sys/boot/i386/libfirewire/firewire.c Fri Jan 23 23:52:33 2015 (r277621) +++ head/sys/boot/i386/libfirewire/firewire.c Fri Jan 23 23:53:56 2015 (r277622) @@ -233,7 +233,8 @@ fw_init_crom(struct fwohci_softc *sc) src->businfo.cyc_clk_acc = 100; src->businfo.max_rec = sc->maxrec; src->businfo.max_rom = MAXROM_4; - src->businfo.generation = 1; +#define FW_GENERATION_CHANGEABLE 2 + src->businfo.generation = FW_GENERATION_CHANGEABLE; src->businfo.link_spd = sc->speed; src->businfo.eui64.hi = sc->eui.hi; @@ -313,11 +314,14 @@ fw_crom(struct fwohci_softc *sc) src = &sc->crom_src_buf->src; crom_load(src, (uint32_t *)newrom, CROMSIZE); if (bcmp(newrom, sc->config_rom, CROMSIZE) != 0) { - /* bump generation and reload */ - src->businfo.generation ++; - /* generation must be between 0x2 and 0xF */ + /* Bump generation and reload. */ + src->businfo.generation++; + + /* Handle generation count wraps. */ if (src->businfo.generation < 2) - src->businfo.generation ++; + src->businfo.generation = 2; + + /* Recalculate CRC to account for generation change. */ crom_load(src, (uint32_t *)newrom, CROMSIZE); bcopy(newrom, (void *)sc->config_rom, CROMSIZE); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 00:04:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 001388FB; Sat, 24 Jan 2015 00:04:34 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DFC8F90C; Sat, 24 Jan 2015 00:04:34 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O04Y4r092669; Sat, 24 Jan 2015 00:04:34 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O04YDf092668; Sat, 24 Jan 2015 00:04:34 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501240004.t0O04YDf092668@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sat, 24 Jan 2015 00:04:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277624 - head/usr.sbin/config X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 00:04:35 -0000 Author: will Date: Sat Jan 24 00:04:34 2015 New Revision: 277624 URL: https://svnweb.freebsd.org/changeset/base/277624 Log: Bump config(8) minor version for r277567. Config files built using this version that take advantage of the bugfix won't be buildable using older config(8). Submitted by: imp MFC after: 1 week MFC with: 277567 Modified: head/usr.sbin/config/configvers.h Modified: head/usr.sbin/config/configvers.h ============================================================================== --- head/usr.sbin/config/configvers.h Fri Jan 23 23:54:55 2015 (r277623) +++ head/usr.sbin/config/configvers.h Sat Jan 24 00:04:34 2015 (r277624) @@ -49,5 +49,5 @@ * * $FreeBSD$ */ -#define CONFIGVERS 600013 +#define CONFIGVERS 600014 #define MAJOR_VERS(x) ((x) / 100000) From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 00:27:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 31CCCC85; Sat, 24 Jan 2015 00:27:51 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1D205AEB; Sat, 24 Jan 2015 00:27:51 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O0RoKg002641; Sat, 24 Jan 2015 00:27:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O0Roxu002640; Sat, 24 Jan 2015 00:27:50 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501240027.t0O0Roxu002640@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 24 Jan 2015 00:27:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277625 - stable/10/sys/kern X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 00:27:51 -0000 Author: delphij Date: Sat Jan 24 00:27:50 2015 New Revision: 277625 URL: https://svnweb.freebsd.org/changeset/base/277625 Log: MFC r276904: Improve style and fix a possible use-after-free case introduced in r268384 by reinitializing the 'freestate' pointer after freeing the memory. Obtained from: HardenedBSD (71fab80c5dd3034b71a29a61064625018671bbeb) PR: 194525 Submitted by: Oliver Pinter Modified: stable/10/sys/kern/kern_lockf.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/kern/kern_lockf.c ============================================================================== --- stable/10/sys/kern/kern_lockf.c Sat Jan 24 00:04:34 2015 (r277624) +++ stable/10/sys/kern/kern_lockf.c Sat Jan 24 00:27:50 2015 (r277625) @@ -740,12 +740,13 @@ retry_setlock: VI_UNLOCK(vp); - if (freestate) { + if (freestate != NULL) { sx_xlock(&lf_lock_states_lock); LIST_REMOVE(freestate, ls_link); sx_xunlock(&lf_lock_states_lock); sx_destroy(&freestate->ls_lock); free(freestate, M_LOCKF); + freestate = NULL; } if (error == EDOOFUS) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 00:35:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 94A1C165; Sat, 24 Jan 2015 00:35:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8039CBE4; Sat, 24 Jan 2015 00:35:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O0Zofj007195; Sat, 24 Jan 2015 00:35:50 GMT (envelope-from neel@FreeBSD.org) Received: (from neel@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O0Zopt007194; Sat, 24 Jan 2015 00:35:50 GMT (envelope-from neel@FreeBSD.org) Message-Id: <201501240035.t0O0Zopt007194@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: neel set sender to neel@FreeBSD.org using -f From: Neel Natu Date: Sat, 24 Jan 2015 00:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277626 - head/sys/amd64/vmm/amd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 00:35:50 -0000 Author: neel Date: Sat Jan 24 00:35:49 2015 New Revision: 277626 URL: https://svnweb.freebsd.org/changeset/base/277626 Log: Add macro to identify AVIC capability (advanced virtual interrupt controller) in AMD processors. Submitted by: Dmitry Luhtionov (dmitryluhtionov@gmail.com) Modified: head/sys/amd64/vmm/amd/svm.c Modified: head/sys/amd64/vmm/amd/svm.c ============================================================================== --- head/sys/amd64/vmm/amd/svm.c Sat Jan 24 00:27:50 2015 (r277625) +++ head/sys/amd64/vmm/amd/svm.c Sat Jan 24 00:35:49 2015 (r277626) @@ -80,6 +80,7 @@ SYSCTL_NODE(_hw_vmm, OID_AUTO, svm, CTLF #define AMD_CPUID_SVM_DECODE_ASSIST BIT(7) /* Decode assist */ #define AMD_CPUID_SVM_PAUSE_INC BIT(10) /* Pause intercept filter. */ #define AMD_CPUID_SVM_PAUSE_FTH BIT(12) /* Pause filter threshold */ +#define AMD_CPUID_SVM_AVIC BIT(13) /* AVIC present */ #define VMCB_CACHE_DEFAULT (VMCB_CACHE_ASID | \ VMCB_CACHE_IOPM | \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 00:37:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B8DEF2DA; Sat, 24 Jan 2015 00:37:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A721C07; Sat, 24 Jan 2015 00:37:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O0bgOX007470; Sat, 24 Jan 2015 00:37:42 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O0bfmf007467; Sat, 24 Jan 2015 00:37:41 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501240037.t0O0bfmf007467@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sat, 24 Jan 2015 00:37:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277627 - in head/etc/tests: . rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 00:37:42 -0000 Author: will Date: Sat Jan 24 00:37:41 2015 New Revision: 277627 URL: https://svnweb.freebsd.org/changeset/base/277627 Log: Add routing_test:static_ipv6_loopback_route_for_each_fib. It tests that all FIBs get a static IPv6 loopback route. Submitted by: asomers MFC after: 1 week Sponsored by: Spectra Logic MFSpectraBSD: 1048456 on 2014/03/13 1114523 on 2015/01/23 Added: head/etc/tests/rc.d/ head/etc/tests/rc.d/Makefile (contents, props changed) head/etc/tests/rc.d/routing_test.sh (contents, props changed) Modified: head/etc/tests/Makefile Modified: head/etc/tests/Makefile ============================================================================== --- head/etc/tests/Makefile Sat Jan 24 00:35:49 2015 (r277626) +++ head/etc/tests/Makefile Sat Jan 24 00:37:41 2015 (r277627) @@ -7,4 +7,6 @@ TESTSDIR= ${TESTSBASE}/etc .PATH: ${.CURDIR:H:H}/tests KYUAFILE= yes +TESTS_SUBDIRS+= rc.d + .include Added: head/etc/tests/rc.d/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/tests/rc.d/Makefile Sat Jan 24 00:37:41 2015 (r277627) @@ -0,0 +1,7 @@ +# $FreeBSD$ + +TESTSDIR= ${TESTSBASE}/etc/rc.d + +ATF_TESTS_SH+= routing_test + +.include Added: head/etc/tests/rc.d/routing_test.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/etc/tests/rc.d/routing_test.sh Sat Jan 24 00:37:41 2015 (r277627) @@ -0,0 +1,138 @@ +# +# Copyright (c) 2014 Spectra Logic Corporation +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions, and the following disclaimer, +# without modification. +# 2. Redistributions in binary form must reproduce at minimum a disclaimer +# substantially similar to the "NO WARRANTY" disclaimer below +# ("Disclaimer") and any redistribution must be conditioned upon +# including a substantially similar Disclaimer requirement for further +# binary redistribution. +# +# NO WARRANTY +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGES. +# +# Authors: Alan Somers (Spectra Logic Corporation) +# +# $FreeBSD$ + +atf_test_case static_ipv6_loopback_route_for_each_fib cleanup +static_ipv6_loopback_route_for_each_fib_head() +{ + atf_set "descr" "Every FIB should have a static IPv6 loopback route" + atf_set "require.user" "root" + atf_set "require.config" "fibs" + atf_set "require.progs" "sysrc" +} +static_ipv6_loopback_route_for_each_fib_body() +{ + # Configure the TAP interface to use an RFC5737 nonrouteable address + # and a non-default fib + ADDR="192.0.2.2" + SUBNET="192.0.2.0" + MASK="24" + + # Check system configuration + if [ 0 != `sysctl -n net.add_addr_allfibs` ]; then + atf_skip "This test requires net.add_addr_allfibs=0" + fi + + get_fibs 1 + get_tap + + # Configure a TAP interface in /etc/rc.conf. Register the sysrc + # variable for cleanup. + echo "ifconfig_${TAP}" >> "sysrc_vars_to_cleanup" + sysrc ifconfig_${TAP}="${ADDR}/${MASK} fib ${FIB0}" + + # Start the interface + service netif start ${TAP} + # Check for an IPv6 loopback route + setfib ${FIB0} netstat -rn -f inet6 | grep -q "^::1.*lo0$" + if [ 0 -eq $? ]; then + atf_pass + else + setfib ${FIB0} netstat -rn -f inet6 + atf_fail "Did not find an IPv6 loopback route" + fi +} +static_ipv6_loopback_route_for_each_fib_cleanup() +{ + cleanup_sysrc + cleanup_tap +} + +atf_init_test_cases() +{ + atf_add_test_case static_ipv6_loopback_route_for_each_fib +} + +# Looks up one or more fibs from the configuration data and validates them. +# Returns the results in the env varilables FIB0, FIB1, etc. +# parameter numfibs The number of fibs to lookup +get_fibs() +{ + NUMFIBS=$1 + net_fibs=`sysctl -n net.fibs` + i=0 + while [ $i -lt "$NUMFIBS" ]; do + fib=`atf_config_get "fibs" | \ + awk -v i=$(( i + 1 )) '{print $i}'` + echo "fib is ${fib}" + eval FIB${i}=${fib} + if [ "$fib" -ge "$net_fibs" ]; then + msg="The ${i}th configured fib is ${fub}, which is " + msg="$msg not less than net.fibs (${net_fibs})" + atf_skip "$msg" + fi + i=$(( $i + 1 )) + done +} + + +# Creates a new tap(4) interface, registers it for cleanup, and returns the +# name via the environment variable TAP +get_tap() +{ + local TAPN=0 + while ! ifconfig tap${TAPN} create > /dev/null 2>&1; do + if [ "$TAPN" -ge 8 ]; then + atf_skip "Could not create a tap(4) interface" + else + TAPN=$(($TAPN + 1)) + fi + done + local TAPD=tap${TAPN} + # Record the TAP device so we can clean it up later + echo ${TAPD} >> "tap_devices_to_cleanup" + TAP=${TAPD} +} + +cleanup_sysrc() +{ + for var in `cat "sysrc_vars_to_cleanup"`; do + sysrc -x $var + done +} + +cleanup_tap() +{ + for TAPD in `cat "tap_devices_to_cleanup"`; do + ifconfig ${TAPD} destroy + done +} From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 00:40:42 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id E23B050D; Sat, 24 Jan 2015 00:40:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CCD8FCAC; Sat, 24 Jan 2015 00:40:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O0eg28010700; Sat, 24 Jan 2015 00:40:42 GMT (envelope-from smh@FreeBSD.org) Received: (from smh@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O0egQV010698; Sat, 24 Jan 2015 00:40:42 GMT (envelope-from smh@FreeBSD.org) Message-Id: <201501240040.t0O0egQV010698@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: smh set sender to smh@FreeBSD.org using -f From: Steven Hartland Date: Sat, 24 Jan 2015 00:40:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277628 - stable/10/cddl/contrib/opensolaris/cmd/zpool X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 00:40:43 -0000 Author: smh Date: Sat Jan 24 00:40:42 2015 New Revision: 277628 URL: https://svnweb.freebsd.org/changeset/base/277628 Log: MFC r276194: Prevent zpool upgrade failing due to unavailable pools Sponsored by: Multiplay Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Directory Properties: stable/10/ (props changed) Modified: stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c ============================================================================== --- stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sat Jan 24 00:37:41 2015 (r277627) +++ stable/10/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c Sat Jan 24 00:40:42 2015 (r277628) @@ -4629,6 +4629,13 @@ upgrade_cb(zpool_handle_t *zhp, void *ar boolean_t printnl = B_FALSE; int ret; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + (void) fprintf(stderr, gettext("cannot upgrade '%s': pool is " + "currently unavailable\n\n"), zpool_get_name(zhp)); + /* Allow iteration to continue. */ + return (0); + } + config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); @@ -4729,6 +4736,14 @@ upgrade_list_disabled_cb(zpool_handle_t nvlist_t *config; uint64_t version; + if (zpool_get_state(zhp) == POOL_STATE_UNAVAIL) { + (void) fprintf(stderr, gettext("cannot check supported " + "features on '%s': pool is currently unavailable\n\n"), + zpool_get_name(zhp)); + /* Allow iteration to continue. */ + return (0); + } + config = zpool_get_config(zhp, NULL); verify(nvlist_lookup_uint64(config, ZPOOL_CONFIG_VERSION, &version) == 0); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 00:43:03 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 24D13646; Sat, 24 Jan 2015 00:43:03 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 10262CBC; Sat, 24 Jan 2015 00:43:03 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O0h2S8011636; Sat, 24 Jan 2015 00:43:02 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O0h21i011635; Sat, 24 Jan 2015 00:43:02 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501240043.t0O0h21i011635@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sat, 24 Jan 2015 00:43:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277629 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 00:43:03 -0000 Author: will Date: Sat Jan 24 00:43:02 2015 New Revision: 277629 URL: https://svnweb.freebsd.org/changeset/base/277629 Log: When creating or updating a node, use vfs_timestamp() for "now" instead of gethrestime(), to allow the administrator to decide the appropriate timestamp precision instead of always using nanosecond precision. Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Jan 24 00:40:42 2015 (r277628) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sat Jan 24 00:43:02 2015 (r277629) @@ -794,7 +794,7 @@ zfs_mknode(znode_t *dzp, vattr_t *vap, d gen = vap->va_nblocks; /* ditto */ } else { obj = 0; - gethrestime(&now); + vfs_timestamp(&now); gen = dmu_tx_get_txg(tx); } @@ -1426,7 +1426,7 @@ zfs_tstamp_update_setup(znode_t *zp, uin { timestruc_t now; - gethrestime(&now); + vfs_timestamp(&now); if (have_tx) { /* will sa_bulk_update happen really soon? */ zp->z_atime_dirty = 0; From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 01:53:29 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6FD14E6; Sat, 24 Jan 2015 01:53:29 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5B91C362; Sat, 24 Jan 2015 01:53:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O1rTkC046941; Sat, 24 Jan 2015 01:53:29 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O1rTGa046939; Sat, 24 Jan 2015 01:53:29 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201501240153.t0O1rTGa046939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sat, 24 Jan 2015 01:53:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277632 - head/sys/arm/ti/am335x X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 01:53:29 -0000 Author: gonzo Date: Sat Jan 24 01:53:28 2015 New Revision: 277632 URL: https://svnweb.freebsd.org/changeset/base/277632 Log: After interrupt read value from register to make sure it reached hardware. This should fix "Spurious inteerupt" message Suggested by ian@ Modified: head/sys/arm/ti/am335x/am335x_lcd.c Modified: head/sys/arm/ti/am335x/am335x_lcd.c ============================================================================== --- head/sys/arm/ti/am335x/am335x_lcd.c Sat Jan 24 01:50:52 2015 (r277631) +++ head/sys/arm/ti/am335x/am335x_lcd.c Sat Jan 24 01:53:28 2015 (r277632) @@ -356,6 +356,8 @@ am335x_lcd_intr(void *arg) reg = LCD_READ4(sc, LCD_IRQSTATUS); LCD_WRITE4(sc, LCD_IRQSTATUS, reg); + /* Read value back to make sure it reached the hardware */ + reg = LCD_READ4(sc, LCD_IRQSTATUS); if (reg & IRQ_SYNC_LOST) { reg = LCD_READ4(sc, LCD_RASTER_CTRL); @@ -401,6 +403,8 @@ am335x_lcd_intr(void *arg) done: LCD_WRITE4(sc, LCD_END_OF_INT_IND, 0); + /* Read value back to make sure it reached the hardware */ + reg = LCD_READ4(sc, LCD_END_OF_INT_IND); } static int From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 01:58:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B444126B; Sat, 24 Jan 2015 01:58:16 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9FA2A390; Sat, 24 Jan 2015 01:58:16 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O1wGkE047725; Sat, 24 Jan 2015 01:58:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Received: (from nwhitehorn@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O1wGu3047724; Sat, 24 Jan 2015 01:58:16 GMT (envelope-from nwhitehorn@FreeBSD.org) Message-Id: <201501240158.t0O1wGu3047724@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: nwhitehorn set sender to nwhitehorn@FreeBSD.org using -f From: Nathan Whitehorn Date: Sat, 24 Jan 2015 01:58:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277633 - head/sys/powerpc/aim X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 01:58:16 -0000 Author: nwhitehorn Date: Sat Jan 24 01:58:15 2015 New Revision: 277633 URL: https://svnweb.freebsd.org/changeset/base/277633 Log: Fix typo in r277561. Modified: head/sys/powerpc/aim/machdep.c Modified: head/sys/powerpc/aim/machdep.c ============================================================================== --- head/sys/powerpc/aim/machdep.c Sat Jan 24 01:53:28 2015 (r277632) +++ head/sys/powerpc/aim/machdep.c Sat Jan 24 01:58:15 2015 (r277633) @@ -535,7 +535,7 @@ powerpc_init(vm_offset_t fdt, vm_offset_ #endif bcopy(&alitrap, (void *)(EXC_ALI + trap_offset), (size_t)&aliend - (size_t)&alitrap); - bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsitrap - + bcopy(&dsitrap, (void *)(EXC_DSI + trap_offset), (size_t)&dsiend - (size_t)&dsitrap); bcopy(generictrap, (void *)EXC_ISI, trapsize); #ifdef __powerpc64__ From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 03:04:09 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 62CCEF38; Sat, 24 Jan 2015 03:04:09 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4E265CB0; Sat, 24 Jan 2015 03:04:09 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O349bL081178; Sat, 24 Jan 2015 03:04:09 GMT (envelope-from ngie@FreeBSD.org) Received: (from ngie@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O349UZ081177; Sat, 24 Jan 2015 03:04:09 GMT (envelope-from ngie@FreeBSD.org) Message-Id: <201501240304.t0O349UZ081177@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ngie set sender to ngie@FreeBSD.org using -f From: Garrett Cooper Date: Sat, 24 Jan 2015 03:04:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277636 - stable/9/contrib/ofed/management/opensm/osmtest X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 03:04:09 -0000 Author: ngie Date: Sat Jan 24 03:04:08 2015 New Revision: 277636 URL: https://svnweb.freebsd.org/changeset/base/277636 Log: MFC r277272: Don't call abort on usage errors; print out the usage message instead PR: 196793 Sponsored by: EMC / Isilon Storage Division Modified: stable/9/contrib/ofed/management/opensm/osmtest/main.c Directory Properties: stable/9/ (props changed) stable/9/contrib/ (props changed) Modified: stable/9/contrib/ofed/management/opensm/osmtest/main.c ============================================================================== --- stable/9/contrib/ofed/management/opensm/osmtest/main.c Sat Jan 24 02:16:53 2015 (r277635) +++ stable/9/contrib/ofed/management/opensm/osmtest/main.c Sat Jan 24 03:04:08 2015 (r277636) @@ -565,8 +565,9 @@ int main(int argc, char *argv[]) printf("Done with args\n"); break; - default: /* something wrong */ - abort(); + default: + show_usage(); + return 1; } } From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 04:41:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DA49EE23; Sat, 24 Jan 2015 04:41:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5997A83; Sat, 24 Jan 2015 04:41:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O4fFH0025930; Sat, 24 Jan 2015 04:41:15 GMT (envelope-from np@FreeBSD.org) Received: (from np@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O4fFG3025928; Sat, 24 Jan 2015 04:41:15 GMT (envelope-from np@FreeBSD.org) Message-Id: <201501240441.t0O4fFG3025928@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: np set sender to np@FreeBSD.org using -f From: Navdeep Parhar Date: Sat, 24 Jan 2015 04:41:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277637 - in head/sys: conf modules/cxgbe/if_cxgbe X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 04:41:16 -0000 Author: np Date: Sat Jan 24 04:41:14 2015 New Revision: 277637 URL: https://svnweb.freebsd.org/changeset/base/277637 Log: Make sure the compiler flag to get cxgbe(4) to compile with gcc is used only when gcc is being used. This is what r277225 should have been. Suggested by: dim@ Modified: head/sys/conf/files head/sys/modules/cxgbe/if_cxgbe/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Jan 24 03:04:08 2015 (r277636) +++ head/sys/conf/files Sat Jan 24 04:41:14 2015 (r277637) @@ -1141,7 +1141,7 @@ dev/cxgb/sys/uipc_mvec.c optional cxgb p dev/cxgb/cxgb_t3fw.c optional cxgb cxgb_t3fw \ compile-with "${NORMAL_C} -I$S/dev/cxgb" dev/cxgbe/t4_mp_ring.c optional cxgbe pci \ - compile-with "${NORMAL_C} -I$S/dev/cxgbe -fms-extensions" + compile-with "${NORMAL_C} -I$S/dev/cxgbe ${GCC_MS_EXTENSIONS}" dev/cxgbe/t4_main.c optional cxgbe pci \ compile-with "${NORMAL_C} -I$S/dev/cxgbe" dev/cxgbe/t4_netmap.c optional cxgbe pci \ Modified: head/sys/modules/cxgbe/if_cxgbe/Makefile ============================================================================== --- head/sys/modules/cxgbe/if_cxgbe/Makefile Sat Jan 24 03:04:08 2015 (r277636) +++ head/sys/modules/cxgbe/if_cxgbe/Makefile Sat Jan 24 04:41:14 2015 (r277637) @@ -23,6 +23,7 @@ SRCS+= t4_tracer.c # Provide the timestamp of a packet in its header mbuf. #CFLAGS+= -DT4_PKT_TIMESTAMP -CFLAGS+= -I${CXGBE} -fms-extensions +CFLAGS+= -I${CXGBE} .include +CFLAGS+= ${GCC_MS_EXTENSIONS} From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 04:52:21 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 16AF3D9; Sat, 24 Jan 2015 04:52:21 +0000 (UTC) Received: from mail-la0-x22d.google.com (mail-la0-x22d.google.com [IPv6:2a00:1450:4010:c03::22d]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A82B3B88; Sat, 24 Jan 2015 04:52:20 +0000 (UTC) Received: by mail-la0-f45.google.com with SMTP id gd6so814325lab.4; Fri, 23 Jan 2015 20:52:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:cc:content-type; bh=GLHW3I4jbIDVexj1XfybSNxEgkkbSXOiA/vqXELpJF4=; b=o5zN4rxnksH6sCm47+sdfBtTkpszqNgPkKBaMd3mSxm3XygAeGZNTQzpPln1T3LFwM mPcTvgLkYU+VPV5I5OTzpPJHZyTK7g77CW93V0K/r5AWX1/Q5Hin7VHp9gZFH/kSjqWu 80HZ9lYTNcVqxjhGzQjtDZPzAW+PdNx7+QgQsUPqm3lURezDGYGTP/XocLTFFEiVW9Vd xlEh0pD7s+n87WSQLK6ZJxIkfJuCuAi1NAtUtSKL5O120xEZNGwvSwD5yPJpEp7O2xdH xx9N2c+UF0ZkBuH7T1BazHjcv34p5vygoKoUNQ6zeQ0i47kzez3ghoTOoXg0MB/ddzCg 9rog== MIME-Version: 1.0 X-Received: by 10.112.12.134 with SMTP id y6mr10943491lbb.34.1422075138663; Fri, 23 Jan 2015 20:52:18 -0800 (PST) Sender: rizzo.unipi@gmail.com Received: by 10.114.10.168 with HTTP; Fri, 23 Jan 2015 20:52:18 -0800 (PST) Date: Fri, 23 Jan 2015 20:52:18 -0800 X-Google-Sender-Auth: VfjbERBOOmglkLVuB9n0i5aFc3s Message-ID: Subject: WITHOUT_CASPER not working anymore ? Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump From: Luigi Rizzo To: Xin LI Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 04:52:21 -0000 Not that i mind if it is intentional (though it seems not), but after this commit tcpdump does not build anymore with -DWITHOUT_CASPER. To be precise, the failure is when you do a buildworld with WITHOUT_CASPER, which does not install the libcapsicum headers. I understand that there is a change in the macro that defines support (from HAVE_LIBCAPSICUM to HAVE_CAPSICUM), but it seems to me that in the chunk below (for tcpdump.c, but other sources are affected too) the #ifdef HAVE_CAPSICUM / #endif block contains headers that are totally unrelated to capsicum: you should probably protect the headers. @@ -70,25 +76,24 @@ #include #ifdef __FreeBSD__ #include -#include -#include #include -#include -#include -#include -#ifdef HAVE_LIBCAPSICUM #include #include #include #include -#endif /* HAVE_LIBCAPSICUM */ -#endif /* __FreeBSD__ */ +#endif /* __FreeBSD__ */ +#ifdef HAVE_CAPSICUM +#include +#include +#include +#include +#include +#endif /* HAVE_CAPSICUM */ #ifndef WIN32 #include #include #include #include -#include #endif /* WIN32 */ /* capabilities convinience library */ I am happy to send a patch but would be more comfortable if you could review/deal with it yourself. cheers luigi On Wed, Jan 7, 2015 at 11:55 AM, Xin LI wrote: > Author: delphij > Date: Wed Jan 7 19:55:18 2015 > New Revision: 276788 > URL: https://svnweb.freebsd.org/changeset/base/276788 > > Log: > MFV r276761: tcpdump 4.6.2. From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 04:53:27 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 059A821D; Sat, 24 Jan 2015 04:53:27 +0000 (UTC) Received: from mail-pd0-x22e.google.com (mail-pd0-x22e.google.com [IPv6:2607:f8b0:400e:c02::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BEA2EB92; Sat, 24 Jan 2015 04:53:26 +0000 (UTC) Received: by mail-pd0-f174.google.com with SMTP id ft15so1645896pdb.5; Fri, 23 Jan 2015 20:53:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=CCXWDjaQTwAeUKqxHkTn/t6SdRRbTYUYgRf9vRFonwM=; b=J2Rd3+4HtllWtEqefrBW7vXeum1Cka/x/9A9AKwhSeMH3qqXcSUCUDpOnMRNC4nbcO N37NFiHmqnQetQRDDmogFYRc/W6dzdIlM+xUXECaGj9m3SqCZmJWZuivprrPaH581Kd0 VDYikaSb1H/kuai47HvqbaeneGPcCiXy1/AYq5fzcgaMrf8LMIfb6S4XkNCgiH1CW/FL m1bAVzQ83eAGD3xDN8A1X+yhgkqqPdt9j4a9v/jzKHI4YhWtLeAvOJ19lw61esGWUaId gl7Bs++8f6/1vcuGFjth9t0L5b5cAzp2s5iQTKBVDS+wCnuUAn0tQ4huSyWh5XKnWbzG 8p9w== X-Received: by 10.68.129.6 with SMTP id ns6mr16419401pbb.137.1422075206382; Fri, 23 Jan 2015 20:53:26 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:ecbe:280c:8546:4daf? ([2601:8:ab80:7d6:ecbe:280c:8546:4daf]) by mx.google.com with ESMTPSA id v2sm3411959pdm.77.2015.01.23.20.53.25 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Jan 2015 20:53:25 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_AE487524-55E1-4D84-AE02-C22C6B5AB13A"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: WITHOUT_CASPER not working anymore ? Re: svn commit: r276788 - in head: contrib/tcpdump contrib/tcpdump/lbl contrib/tcpdump/missing usr.sbin/tcpdump/tcpdump From: Garrett Cooper In-Reply-To: Date: Fri, 23 Jan 2015 20:53:22 -0800 Message-Id: References: To: Luigi Rizzo X-Mailer: Apple Mail (2.1878.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Xin LI X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 04:53:27 -0000 --Apple-Mail=_AE487524-55E1-4D84-AE02-C22C6B5AB13A Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii On Jan 23, 2015, at 20:52, Luigi Rizzo wrote: > Not that i mind if it is intentional (though it seems not), but after this > commit tcpdump does not build anymore with -DWITHOUT_CASPER. > > To be precise, the failure is when you do a buildworld with WITHOUT_CASPER, > which does not install the libcapsicum headers. > > I understand that there is a change in the macro that defines support > (from HAVE_LIBCAPSICUM to HAVE_CAPSICUM), but it seems to me > that in the chunk below (for tcpdump.c, but other sources are affected too) > the #ifdef HAVE_CAPSICUM / #endif block contains headers > that are totally unrelated to capsicum: > you should probably protect the headers. > > > @@ -70,25 +76,24 @@ > #include > #ifdef __FreeBSD__ > #include > -#include > -#include > #include > -#include > -#include > -#include > -#ifdef HAVE_LIBCAPSICUM > #include > #include > #include > #include > -#endif /* HAVE_LIBCAPSICUM */ > -#endif /* __FreeBSD__ */ > +#endif /* __FreeBSD__ */ > +#ifdef HAVE_CAPSICUM > +#include > +#include > +#include > +#include > +#include > +#endif /* HAVE_CAPSICUM */ > #ifndef WIN32 > #include > #include > #include > #include > -#include > #endif /* WIN32 */ > > /* capabilities convinience library */ > > I am happy to send a patch but would be more comfortable if you could > review/deal with it yourself. Someone else reported this too on the mailing lists... --Apple-Mail=_AE487524-55E1-4D84-AE02-C22C6B5AB13A Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUwyVDAAoJEMZr5QU6S73e8zgH/1dwxJqLJDNXKdlc8D3toZY1 +amno/ZKfev766s1uOT6Nw1B0eEvYLWzai6za1p9ugrTR+TMvtII5mADDXg41XBQ vBS4ohgftCs8Ro7Ld2HUUBHY9UKxCgkIsENI3YQq+SpG8CeLq2lcWb2IGmj7OuzQ S6JHtAn35Xht7L/gZ/N/q0RzNweod6fpSQcvio27ao8bXSGNsSrGNvpqKlNoa2SH gdpojI4oseBWMLZzwdu5vhgnpgTfJLwrcuBN6LffmA7kOZJYLwKZ7sgqQg5lEs8X IPAgPf1ite6//hTqB1+nl5wKrBQK3v9PIwtI/FxkK3f9DpCDxlLCxpyGBByGVaM= =OGV1 -----END PGP SIGNATURE----- --Apple-Mail=_AE487524-55E1-4D84-AE02-C22C6B5AB13A-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 06:06:47 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B710475D; Sat, 24 Jan 2015 06:06:47 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A38CB1FA; Sat, 24 Jan 2015 06:06:47 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O66lZE065808; Sat, 24 Jan 2015 06:06:47 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O66lpm065807; Sat, 24 Jan 2015 06:06:47 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201501240606.t0O66lpm065807@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 24 Jan 2015 06:06:47 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277638 - head/contrib/tcpdump X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 06:06:47 -0000 Author: delphij Date: Sat Jan 24 06:06:46 2015 New Revision: 277638 URL: https://svnweb.freebsd.org/changeset/base/277638 Log: Don't include libcapsicum headers when requested. Reported by: luigi MFC after: 14 days X-MFC-with: r276788 Modified: head/contrib/tcpdump/tcpdump.c Modified: head/contrib/tcpdump/tcpdump.c ============================================================================== --- head/contrib/tcpdump/tcpdump.c Sat Jan 24 04:41:14 2015 (r277637) +++ head/contrib/tcpdump/tcpdump.c Sat Jan 24 06:06:46 2015 (r277638) @@ -77,12 +77,12 @@ extern int SIZE_BUF; #ifdef __FreeBSD__ #include #include +#endif /* __FreeBSD__ */ +#ifdef HAVE_CAPSICUM #include #include #include #include -#endif /* __FreeBSD__ */ -#ifdef HAVE_CAPSICUM #include #include #include @@ -966,8 +966,8 @@ main(int argc, char **argv) FILE *VFile; #ifdef HAVE_CAPSICUM cap_rights_t rights; - int cansandbox; #endif /* HAVE_CAPSICUM */ + int cansandbox; #ifdef WIN32 if(wsockinit() != 0) return 1; From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 06:11:14 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4092E8C3; Sat, 24 Jan 2015 06:11:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2BCF5214; Sat, 24 Jan 2015 06:11:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O6BExh067532; Sat, 24 Jan 2015 06:11:14 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O6BEfe067531; Sat, 24 Jan 2015 06:11:14 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201501240611.t0O6BEfe067531@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 24 Jan 2015 06:11:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277639 - stable/10/release/picobsd/build X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 06:11:14 -0000 Author: luigi Date: Sat Jan 24 06:11:13 2015 New Revision: 277639 URL: https://svnweb.freebsd.org/changeset/base/277639 Log: use the same version as in HEAD (among other things, the -v flag to make is long since unsupported) Modified: stable/10/release/picobsd/build/picobsd Modified: stable/10/release/picobsd/build/picobsd ============================================================================== --- stable/10/release/picobsd/build/picobsd Sat Jan 24 06:06:46 2015 (r277638) +++ stable/10/release/picobsd/build/picobsd Sat Jan 24 06:11:13 2015 (r277639) @@ -91,7 +91,7 @@ log() { # message # unconditionally log and wait for input logverbose() { # message local foo - printf "\n*** %s\n" "$*" + printf "\n*** %s\n" "$*" >&2 read -p "=== Press enter to continue" foo return 0 } @@ -164,12 +164,11 @@ set_defaults() { # no arguments create_includes_and_libraries2() { # opt_dir opt_target local no log "create_includes_and_libraries2() for ${SRC} $1" - if [ ${OSVERSION} -ge 600000 ] ; then - no="-DNO_CLEAN -DNO_PROFILE -DNO_GAMES -DNO_LIBC_R" # WITHOUT_CDDL=1" - no="$no -DWITHOUT_CLANG -DMALLOC_PRODUCTION" - else - no="-DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R" - fi + + no="-DNO_CLEAN -DNO_PROFILE -DNO_GAMES -DNO_LIBC_R" # WITHOUT_CDDL=1" + no="$no -DWITHOUT_CASPER" + no="$no -DMALLOC_PRODUCTION" + ( cd ${SRC}; # make -DNOCLEAN -DNOPROFILE -DNOGAMES -DNOLIBC_R -DPICOBSD buildworld if [ -d "$1" ] ; then @@ -177,6 +176,7 @@ create_includes_and_libraries2() { # opt else export MAKEOBJDIRPREFIX=${l_objtree} make ${o_par} $no toolchain + # XXX do we need any of these ? eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` [ ${o_arch} != `uname -m` ] && \ @@ -185,48 +185,6 @@ create_includes_and_libraries2() { # opt ) } -# entry for 4.x and earlier trees -create_includes_and_libraries() { - local e i - - log "create_includes_and_libraries() for ${SRC}" - # Optionally creates include directory and libraries. - mkdir -p ${l_usrtree}/include # the include directory... - mkdir -p ${l_usrtree}/share/misc # a few things go here - mkdir -p ${l_usrtree}/lib # libraries - mkdir -p ${l_usrtree}/sbin # some binaries - # override variables for ownershiip and destinations - # BINOWN:BINGRP are also used for include files - (cd ${SRC}; \ - BINOWN=`id -un` BINGRP=`id -gn` \ - DESTDIR=${l_usrtree}/.. \ - make -m ${SRC}/share/mk includes ) || fail $? includes - # Pick up the correct headers for libraries. - CFLAGS="-nostdinc -I${l_usrtree}/include" ; export CFLAGS - - (cd ${SRC} - # $e is the invocation of make with correct environment - # XXX check the NO* options below, maybe system dependent. - e="MAKEOBJDIRPREFIX=${l_objtree}/picobsd/libraries \ - BINOWN=`id -un` BINGRP=`id -gn` \ - DESTDIR=${l_usrtree}/.. \ - make -m ${SRC}/share/mk \ - -DNOHTML -DNOINFO -DNOMAN -DNOSHARE -DNOFSCHG " - log "do a 'make obj' in a few places." - # This is very version-specific... The following works for 5.0 - for i in lib secure/lib gnu/lib \ - gnu/usr.bin/perl usr.bin/lex usr.sbin/config ; do - (cd ${i}; eval $e obj) - done - log "now make the static libraries" - eval $e -DNOPROFILE -DNOPIC libraries - (cd ${SRC}/usr.sbin/config - eval $e # build binary - eval $e install # install it - ) - ) || fail $? "libraries" - log "Libraries done" -} # set_type [the_site] looks in user or system directories # for the directory named as the first argument, reads the configuration @@ -437,7 +395,7 @@ do_kernel() { # OK [ "${o_do_modules}" = "yes" ] && export MODULES="" # kernel build not parallelizable yet ${BINMAKE} KERNCONF=${l_kernconf} \ - -v -f ${PICO_TREE}/build/Makefile.conf ) || \ + -f ${PICO_TREE}/build/Makefile.conf ) || \ fail $? missing_kernel } @@ -570,71 +528,89 @@ do_links() { # rootdir varname # cp -p ${u_progs} ${dst}/libexec # ignore errors # } +# find programs and required libraries. Accept -L libs -P path +# if no argument default to objdir/SHLIBDIRPREFIX for both find_progs() { # programs - local pass i old_libs="" tmp o="" - if [ x"$1" = "x-L" -a -d "$2" ] ; then # set lib search path - o="-P $2"; shift; shift - fi - # Result returned in global variables - u_libs="" ; u_progs="`find_progs_helper $*`" + # logverbose "find_progs: called with $*" + local i=`realpath ${o_objdir:-${_SHLIBDIRPREFIX}/..}` + # default values for -L and -P + local dir="-P $i" + local ldir="-L $i" + + while [ "$1" != "" ] ; do + if [ x"$1" = "x-L" -a -d "$2" ] ; then # set lib search path + ldir="-L $2"; shift; shift + elif [ x"$1" = "x-P" -a -d "$2" ] ; then # set prog search path + dir="-P $2"; shift; shift + else + break + fi + done + + # Results are returned in global variables + u_libs="" + u_progs="`find_progs_helper $dir $*`" [ -z "${u_progs}" ] && return 1 # not found, error - # use objdump to find libraries. Iterate to fetch recursive - # dependencies. - tmp="${u_progs}" ; pass=1 + + # use objdump to find libraries. + # Iterate to fetch recursive dependencies. + local tmp="${u_progs}" + local old_libs="" + local pass=1 while [ $pass -lt 10 ] ; do pass=$(($pass + 1)) i="`objdump -x ${tmp} | \ - awk '$1 == "NEEDED" { print $2 }' | sort | uniq`" + awk '$1 == "NEEDED" { print $2 }' | sort | uniq | tr '\n' ' '`" if [ "$old_libs" = "$i" ] ; then - log "libraries for: $my_progs ($u_progs) are ($i) $u_libs" - log "--- done find_progs ---" + # logverbose "find_progs: have `echo ${u_libs} | wc -w`/`echo ${i} | wc -w` libraries for: $my_progs ($u_progs)" + # logverbose "they are ($i) $u_libs" return 0 else # logverbose "old--- $old_libs --- new +++ $i +++" fi - u_libs="`find_progs_helper $o $i`" + u_libs="`find_progs_helper $ldir $i`" old_libs="$i" tmp="$tmp $u_libs" done log "WARNING: Too many passes, giving up" } -find_progs_helper() { # programs - local dir=${o_objdir:-${_SHLIBDIRPREFIX}/..} - local ldir="" - if [ x"$1" = "x-P" -a -d "$2" ] ; then # set path - ldir=$2; shift; shift - fi - local progs="$*" - local subdirs=". local/bin local/sbin local/lib local/libexec \ - bin sbin usr.bin usr.sbin libexec lib \ - gnu/usr.bin gnu/lib \ - secure/usr.bin secure/usr.sbin secure/libexec secure/lib" - local names="" # files to search - local o="" +# prints to stdout files and libs in the search paths +find_progs_helper() { # first arg is either -P or -L + local ty=$1 dir=$2 ; shift; shift + local progs="`echo $* | tr ' ' '\n' | sort -u | tr '\n' ' '`" + # first, extract absolute pathnames or files in this directory + + # accumulate others in $names + local names="" local i for i in $progs ; do - # full pathnames are just listed - [ -f "$i" ] && echo $i && continue - names="${names} ${o} -name $i" - o="-o" + [ -f "$i" ] && echo `realpath $i` && continue + names="${names} $i" done + # if nothing left, we are done [ -z "${names}" ] && return 0 - local places="" # places to search - for i in $subdirs ; do - [ -d "${dir}/${i}" ] && places="${places} ${dir}/${i}" - done - if [ -n "${ldir}" ] ; then - for i in $subdirs ; do - [ -d "${ldir}/${i}" ] && places="${places} ${ldir}/${i}" - done + + local depth p + local places="" # places to search + if [ x-P = "x$ty" ] ; then # search programs + depth=2 + p=". local/bin local/sbin local/libexec \ + bin sbin usr/bin usr/sbin libexec gnu/usr.bin \ + secure/usr.bin secure/usr.sbin secure/libexec " + else + depth=3 + p="lib usr/lib gnu/lib secure/lib" fi - for i in $progs ; do - # full pathnames are just listed - [ -f "$i" ] && echo $i && continue - find ${places} -maxdepth 3 -type f -name ${i} | head -1 + for i in $p ; do + i="${dir}/${i}" + [ -d "${i}" ] && places="${places} `realpath ${i}`" + done + # logverbose "--- looking into $places" + places=`echo ${places} | tr ' ' '\n' | sort -u` + for i in $names ; do + find ${places} -maxdepth $depth -type f -name ${i} | head -1 done - # use maxdepth 3 because some libs are way down } # Populate the memory filesystem with binaries and non-variable @@ -677,7 +653,7 @@ populate_mfs_tree() { a=${BUILDDIR}/crunch1.conf ( export BUILDDIR SRC MY_TREE PICO_OBJ ; ${BINMAKE} \ - -v -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk ) + -f ${PICO_TREE}/build/Makefile.conf ${BUILDDIR}/crunch.mk ) log "Libs are ${LIBS} " export SRC # used by crunch.mk # export LIBS CFLAGS @@ -746,6 +722,7 @@ populate_mfs_tree() { fi log "for a shared 'crunch' take libraries and dynamic loader as well" + # /stand/crunch is our main binary, we extract its libs find_progs ${dst}/stand/crunch if [ -n "${u_libs}" ] ; then mkdir -p ${dst}/lib && cp -p ${u_libs} ${dst}/lib @@ -881,7 +858,7 @@ fill_floppy_image() { else log "not loading mfs, size ${mfs_size} img ${imgsize}" fi - log "Compress with kgzip and copy to floppy image" + log "Compress with gzip and copy to floppy image" mkdir -p ${dst}/boot/kernel # XXX loader.conf does not work unless we also load the .4th files @@ -944,11 +921,11 @@ fill_floppy_image() { dd of=${BUILDDIR}/${c_img} oseek=1 obs=788 conv=notrunc 2>/dev/null log "done disk image" # XXX (log "Fixing permissions"; cd ${dst}; chown -R root *) + df -ik ${dst} | colrm 70 > .build.reply # leave build stuff if verbose [ ${o_verbose} -gt 0 ] && return rm -rf ${BUILDDIR}/floppy.tree || true # cleanup - # df -ik ${dst} | colrm 70 > .build.reply rm -rf ${dst} rm ${BUILDDIR}/${c_fs} # rm ${BUILDDIR}/kernel.gz @@ -971,36 +948,31 @@ set_build_parameters() { set `grep "#define[\t ]__FreeBSD_version" ${SRC}/sys/sys/param.h` OSVERSION=$3 log "OSVERSION is ${OSVERSION}" - if [ ${OSVERSION} -ge 500035 ] ; then + export MAKEOBJDIRPREFIX=${l_objtree} export TARGET_ARCH=${o_arch} TARGET=${o_arch} - export WITHOUT_CLANG_IS_CC=1 + # XXX 20131001 see if CLANG fixes the build + export WITHOUT_CLANG_IS_CC=yes + export WITHOUT_CLANG_BOOTSTRAP=yes + export WITH_GCC=yes + export WITH_GCC_BOOTSTRAP=yes + export WITH_GNUCXX=yes + export WITHOUT_CLANG=yes + export WITHOUT_ICONV=yes + # XXX why change machine_arch ? #-- export MACHINE_ARCH=`uname -m` MACHINE=`uname -m` # export CWARNFLAGS="-Wextra -Wno-sign-compare -Wno-missing-field-initializers" + # XXX BINMAKE does not really exist anymore eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V BINMAKE`\"" [ "$BINMAKE" = "" ] && \ eval "export BINMAKE=\"`cd ${SRC}; make -f Makefile -V SUB_MAKE`\"" - fi if [ "${o_init_src}" != "" ] ; then - if [ ${OSVERSION} -lt 500035 ] ; then - create_includes_and_libraries - else - create_includes_and_libraries2 - fi + create_includes_and_libraries2 else eval export `cd ${SRC}; ${BINMAKE} -f Makefile.inc1 -V WMAKEENV` fi - if [ ${OSVERSION} -lt 500035 ] ; then - # Create the right LIBS and CFLAGS for further builds. - # and build the config program - LIBS="-L${l_usrtree}/lib" - CFLAGS="-nostdinc -I${l_usrtree}/include" - export LIBS CFLAGS - CONFIG=${l_usrtree}/sbin/config - export CONFIG - fi # if we have o_objdir, find where bin/ is if [ ! -z "${o_objdir}" ] ; then @@ -1020,14 +992,18 @@ set_build_parameters() { # Main entry of the script. Initialize variables, parse command line # arguments. -# o_par="-j 8" # parallel make and other make options set_defaults while [ true ]; do log "Parsing $1" case $1 in + -j) + o_par="-j $2" + shift + ;; + --par) - o_par="-j 8" + o_par="-j 8" # watch out, this might be too large ;; --src) # set the source path instead of /usr/src From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 08:35:50 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CFB32BB7; Sat, 24 Jan 2015 08:35:50 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB6BB24C; Sat, 24 Jan 2015 08:35:50 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O8Zoi8035012; Sat, 24 Jan 2015 08:35:50 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O8ZoX5035011; Sat, 24 Jan 2015 08:35:50 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501240835.t0O8ZoX5035011@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jan 2015 08:35:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277640 - stable/10/lib/libthr/thread X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 08:35:50 -0000 Author: kib Date: Sat Jan 24 08:35:49 2015 New Revision: 277640 URL: https://svnweb.freebsd.org/changeset/base/277640 Log: MFC r277488: Do not allow pthread_sigmask() to block SIGCANCEL. Modified: stable/10/lib/libthr/thread/thr_sig.c Directory Properties: stable/10/ (props changed) Modified: stable/10/lib/libthr/thread/thr_sig.c ============================================================================== --- stable/10/lib/libthr/thread/thr_sig.c Sat Jan 24 06:11:13 2015 (r277639) +++ stable/10/lib/libthr/thread/thr_sig.c Sat Jan 24 08:35:49 2015 (r277640) @@ -604,7 +604,8 @@ __weak_reference(_pthread_sigmask, pthre int _pthread_sigmask(int how, const sigset_t *set, sigset_t *oset) { - if (_sigprocmask(how, set, oset)) + + if (__thr_sigprocmask(how, set, oset)) return (errno); return (0); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 08:48:06 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C709BD5D; Sat, 24 Jan 2015 08:48:06 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B2B1A359; Sat, 24 Jan 2015 08:48:06 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0O8m6iE039965; Sat, 24 Jan 2015 08:48:06 GMT (envelope-from luigi@FreeBSD.org) Received: (from luigi@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0O8m6dN039964; Sat, 24 Jan 2015 08:48:06 GMT (envelope-from luigi@FreeBSD.org) Message-Id: <201501240848.t0O8m6dN039964@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: luigi set sender to luigi@FreeBSD.org using -f From: Luigi Rizzo Date: Sat, 24 Jan 2015 08:48:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277641 - head/release/picobsd/build X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 08:48:06 -0000 Author: luigi Date: Sat Jan 24 08:48:05 2015 New Revision: 277641 URL: https://svnweb.freebsd.org/changeset/base/277641 Log: do not strip /stand This is a temporary workaround until the elftoolchain's version of strip is fixed: The previous (GNU) strip, when acting on a file with multiple links, would modify the one and only file in place (which means creating a new stripped copy, and then writing it back to the original). The new version from elftoolchain creates the new file and then unlinks the old one and renames the new. With multiple hard links, the original remains alive. In the /stand directory, this ends up creating 80+ copies of the same file. Modified: head/release/picobsd/build/picobsd Modified: head/release/picobsd/build/picobsd ============================================================================== --- head/release/picobsd/build/picobsd Sat Jan 24 08:35:49 2015 (r277640) +++ head/release/picobsd/build/picobsd Sat Jan 24 08:48:05 2015 (r277641) @@ -734,8 +734,8 @@ populate_mfs_tree() { [ -n "${copy_files}" ] && do_copyfiles ${dst} copy_files do_copyfiles_user ${dst} || true [ -n "${links}" ] && do_links ${dst} links - strip ${dst}/libexec/* ${dst}/lib/* ${dst}/stand/* 2> /dev/null || true - + strip ${dst}/libexec/* ${dst}/lib/* 2> /dev/null || true + # strip ${dst}/stand/* 2> /dev/null || true # The 'import_files' mechanism is deprecated, as it requires # root permissions to follow the symlinks, and also does # not let you rename the entries. @@ -756,7 +756,7 @@ populate_mfs_tree() { # override the owner echo "/set uid=0 gid=0" > mtree.out mtree -ic -p ${dst} -k "" >> mtree.out - log "mtre.out at ${BUILDDIR}/mtree.out" + log "mtree.out at ${BUILDDIR}/mtree.out size ${MFS_SIZE}k" makefs -t ffs -o bsize=4096 -o fsize=512 \ -s ${MFS_SIZE}k -f 1000 -F mtree.out ${c_fs} ${dst} ls -l ${c_fs} ) From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 12:43:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 7BEF0C2; Sat, 24 Jan 2015 12:43:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 676FCC53; Sat, 24 Jan 2015 12:43:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OChb71051243; Sat, 24 Jan 2015 12:43:37 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OChaqf051241; Sat, 24 Jan 2015 12:43:36 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501241243.t0OChaqf051241@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jan 2015 12:43:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277642 - in head: share/man/man3 sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 12:43:37 -0000 Author: kib Date: Sat Jan 24 12:43:36 2015 New Revision: 277642 URL: https://svnweb.freebsd.org/changeset/base/277642 Log: Provide individual prototype and generate macros for the red-black tree. This helps to reduce code size in statically linked applications. Submitted by: Sebastian Huber MFC after: 2 weeks Modified: head/share/man/man3/tree.3 head/sys/sys/tree.h Modified: head/share/man/man3/tree.3 ============================================================================== --- head/share/man/man3/tree.3 Sat Jan 24 08:48:05 2015 (r277641) +++ head/share/man/man3/tree.3 Sat Jan 24 12:43:36 2015 (r277642) @@ -30,7 +30,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 10, 2013 +.Dd January 24, 2015 .Dt TREE 3 .Os .Sh NAME @@ -53,8 +53,26 @@ .Nm SPLAY_REMOVE , .Nm RB_PROTOTYPE , .Nm RB_PROTOTYPE_STATIC , +.Nm RB_PROTOTYPE_INSERT , +.Nm RB_PROTOTYPE_INSERT_COLOR , +.Nm RB_PROTOTYPE_REMOVE , +.Nm RB_PROTOTYPE_REMOVE_COLOR , +.Nm RB_PROTOTYPE_FIND , +.Nm RB_PROTOTYPE_NFIND , +.Nm RB_PROTOTYPE_NEXT , +.Nm RB_PROTOTYPE_PREV , +.Nm RB_PROTOTYPE_MINMAX , .Nm RB_GENERATE , .Nm RB_GENERATE_STATIC , +.Nm RB_GENERATE_INSERT , +.Nm RB_GENERATE_INSERT_COLOR , +.Nm RB_GENERATE_REMOVE , +.Nm RB_GENERATE_REMOVE_COLOR , +.Nm RB_GENERATE_FIND , +.Nm RB_GENERATE_NFIND , +.Nm RB_GENERATE_NEXT , +.Nm RB_GENERATE_PREV , +.Nm RB_GENERATE_MINMAX , .Nm RB_ENTRY , .Nm RB_HEAD , .Nm RB_INITIALIZER , @@ -111,8 +129,26 @@ .Fn SPLAY_REMOVE NAME "SPLAY_HEAD *head" "struct TYPE *elm" .Fn RB_PROTOTYPE NAME TYPE FIELD CMP .Fn RB_PROTOTYPE_STATIC NAME TYPE FIELD CMP +.Fn RB_PROTOTYPE_INSERT NAME TYPE ATTR +.Fn RB_PROTOTYPE_INSERT_COLOR NAME TYPE ATTR +.Fn RB_PROTOTYPE_REMOVE NAME TYPE ATTR +.Fn RB_PROTOTYPE_REMOVE_COLOR NAME TYPE ATTR +.Fn RB_PROTOTYPE_FIND NAME TYPE ATTR +.Fn RB_PROTOTYPE_NFIND NAME TYPE ATTR +.Fn RB_PROTOTYPE_NEXT NAME TYPE ATTR +.Fn RB_PROTOTYPE_PREV NAME TYPE ATTR +.Fn RB_PROTOTYPE_MINMAX NAME TYPE ATTR .Fn RB_GENERATE NAME TYPE FIELD CMP .Fn RB_GENERATE_STATIC NAME TYPE FIELD CMP +.Fn RB_GENERATE_INSERT NAME TYPE FIELD CMP ATTR +.Fn RB_GENERATE_INSERT_COLOR NAME TYPE FIELD ATTR +.Fn RB_GENERATE_REMOVE NAME TYPE FIELD ATTR +.Fn RB_GENERATE_REMOVE_COLOR NAME TYPE FIELD ATTR +.Fn RB_GENERATE_FIND NAME TYPE FIELD CMP ATTR +.Fn RB_GENERATE_NFIND NAME TYPE FIELD CMP ATTR +.Fn RB_GENERATE_NEXT NAME TYPE FIELD ATTR +.Fn RB_GENERATE_PREV NAME TYPE FIELD ATTR +.Fn RB_GENERATE_MINMAX NAME TYPE FIELD ATTR .Fn RB_ENTRY TYPE .Fn RB_HEAD HEADNAME TYPE .Fn RB_INITIALIZER "RB_HEAD *head" @@ -377,6 +413,27 @@ The .Fa FIELD argument is the name of the element defined by .Fn RB_ENTRY . +Individual prototypes can be declared with +.Fn RB_PROTOTYPE_INSERT , +.Fn RB_PROTOTYPE_INSERT_COLOR , +.Fn RB_PROTOTYPE_REMOVE , +.Fn RB_PROTOTYPE_REMOVE_COLOR , +.Fn RB_PROTOTYPE_FIND , +.Fn RB_PROTOTYPE_NFIND , +.Fn RB_PROTOTYPE_NEXT , +.Fn RB_PROTOTYPE_PREV , +and +.Fn RB_PROTOTYPE_MINMAX +in case not all functions are required. The individual prototype macros expect +.Fa NAME , +.Fa TYPE , +and +.Fa ATTR +arguments. The +.Fa ATTR +argument must be empty for global functions or +.Fa static +for static functions. .Pp The function bodies are generated with the .Fn RB_GENERATE @@ -388,6 +445,18 @@ These macros take the same arguments as and .Fn RB_PROTOTYPE_STATIC macros, but should be used only once. +As an alternative individual function bodies are generated with the +.Fn RB_GENERATE_INSERT , +.Fn RB_GENERATE_INSERT_COLOR , +.Fn RB_GENERATE_REMOVE , +.Fn RB_GENERATE_REMOVE_COLOR , +.Fn RB_GENERATE_FIND , +.Fn RB_GENERATE_NFIND , +.Fn RB_GENERATE_NEXT , +.Fn RB_GENERATE_PREV , +and +.Fn RB_GENERATE_MINMAX +macros. .Pp Finally, the Modified: head/sys/sys/tree.h ============================================================================== --- head/sys/sys/tree.h Sat Jan 24 08:48:05 2015 (r277641) +++ head/sys/sys/tree.h Sat Jan 24 12:43:36 2015 (r277642) @@ -383,16 +383,33 @@ struct { \ #define RB_PROTOTYPE_STATIC(name, type, field, cmp) \ RB_PROTOTYPE_INTERNAL(name, type, field, cmp, __unused static) #define RB_PROTOTYPE_INTERNAL(name, type, field, cmp, attr) \ -attr void name##_RB_INSERT_COLOR(struct name *, struct type *); \ -attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *);\ -attr struct type *name##_RB_REMOVE(struct name *, struct type *); \ -attr struct type *name##_RB_INSERT(struct name *, struct type *); \ -attr struct type *name##_RB_FIND(struct name *, struct type *); \ -attr struct type *name##_RB_NFIND(struct name *, struct type *); \ -attr struct type *name##_RB_NEXT(struct type *); \ -attr struct type *name##_RB_PREV(struct type *); \ -attr struct type *name##_RB_MINMAX(struct name *, int); \ - \ + RB_PROTOTYPE_INSERT_COLOR(name, type, attr); \ + RB_PROTOTYPE_REMOVE_COLOR(name, type, attr); \ + RB_PROTOTYPE_INSERT(name, type, attr); \ + RB_PROTOTYPE_REMOVE(name, type, attr); \ + RB_PROTOTYPE_FIND(name, type, attr); \ + RB_PROTOTYPE_NFIND(name, type, attr); \ + RB_PROTOTYPE_NEXT(name, type, attr); \ + RB_PROTOTYPE_PREV(name, type, attr); \ + RB_PROTOTYPE_MINMAX(name, type, attr); +#define RB_PROTOTYPE_INSERT_COLOR(name, type, attr) \ + attr void name##_RB_INSERT_COLOR(struct name *, struct type *) +#define RB_PROTOTYPE_REMOVE_COLOR(name, type, attr) \ + attr void name##_RB_REMOVE_COLOR(struct name *, struct type *, struct type *) +#define RB_PROTOTYPE_REMOVE(name, type, attr) \ + attr struct type *name##_RB_REMOVE(struct name *, struct type *) +#define RB_PROTOTYPE_INSERT(name, type, attr) \ + attr struct type *name##_RB_INSERT(struct name *, struct type *) +#define RB_PROTOTYPE_FIND(name, type, attr) \ + attr struct type *name##_RB_FIND(struct name *, struct type *) +#define RB_PROTOTYPE_NFIND(name, type, attr) \ + attr struct type *name##_RB_NFIND(struct name *, struct type *) +#define RB_PROTOTYPE_NEXT(name, type, attr) \ + attr struct type *name##_RB_NEXT(struct type *) +#define RB_PROTOTYPE_PREV(name, type, attr) \ + attr struct type *name##_RB_PREV(struct type *) +#define RB_PROTOTYPE_MINMAX(name, type, attr) \ + attr struct type *name##_RB_MINMAX(struct name *, int) /* Main rb operation. * Moves node close to the key of elm to top @@ -402,6 +419,17 @@ attr struct type *name##_RB_MINMAX(struc #define RB_GENERATE_STATIC(name, type, field, cmp) \ RB_GENERATE_INTERNAL(name, type, field, cmp, __unused static) #define RB_GENERATE_INTERNAL(name, type, field, cmp, attr) \ + RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ + RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ + RB_GENERATE_INSERT(name, type, field, cmp, attr) \ + RB_GENERATE_REMOVE(name, type, field, attr) \ + RB_GENERATE_FIND(name, type, field, cmp, attr) \ + RB_GENERATE_NFIND(name, type, field, cmp, attr) \ + RB_GENERATE_NEXT(name, type, field, attr) \ + RB_GENERATE_PREV(name, type, field, attr) \ + RB_GENERATE_MINMAX(name, type, field, attr) + +#define RB_GENERATE_INSERT_COLOR(name, type, field, attr) \ attr void \ name##_RB_INSERT_COLOR(struct name *head, struct type *elm) \ { \ @@ -444,8 +472,9 @@ name##_RB_INSERT_COLOR(struct name *head } \ } \ RB_COLOR(head->rbh_root, field) = RB_BLACK; \ -} \ - \ +} + +#define RB_GENERATE_REMOVE_COLOR(name, type, field, attr) \ attr void \ name##_RB_REMOVE_COLOR(struct name *head, struct type *parent, struct type *elm) \ { \ @@ -522,8 +551,9 @@ name##_RB_REMOVE_COLOR(struct name *head } \ if (elm) \ RB_COLOR(elm, field) = RB_BLACK; \ -} \ - \ +} + +#define RB_GENERATE_REMOVE(name, type, field, attr) \ attr struct type * \ name##_RB_REMOVE(struct name *head, struct type *elm) \ { \ @@ -590,7 +620,8 @@ color: \ name##_RB_REMOVE_COLOR(head, parent, child); \ return (old); \ } \ - \ + +#define RB_GENERATE_INSERT(name, type, field, cmp, attr) \ /* Inserts a node into the RB tree */ \ attr struct type * \ name##_RB_INSERT(struct name *head, struct type *elm) \ @@ -620,8 +651,9 @@ name##_RB_INSERT(struct name *head, stru RB_ROOT(head) = elm; \ name##_RB_INSERT_COLOR(head, elm); \ return (NULL); \ -} \ - \ +} + +#define RB_GENERATE_FIND(name, type, field, cmp, attr) \ /* Finds the node with the same key as elm */ \ attr struct type * \ name##_RB_FIND(struct name *head, struct type *elm) \ @@ -638,8 +670,9 @@ name##_RB_FIND(struct name *head, struct return (tmp); \ } \ return (NULL); \ -} \ - \ +} + +#define RB_GENERATE_NFIND(name, type, field, cmp, attr) \ /* Finds the first node greater than or equal to the search key */ \ attr struct type * \ name##_RB_NFIND(struct name *head, struct type *elm) \ @@ -659,8 +692,9 @@ name##_RB_NFIND(struct name *head, struc return (tmp); \ } \ return (res); \ -} \ - \ +} + +#define RB_GENERATE_NEXT(name, type, field, attr) \ /* ARGSUSED */ \ attr struct type * \ name##_RB_NEXT(struct type *elm) \ @@ -681,8 +715,9 @@ name##_RB_NEXT(struct type *elm) \ } \ } \ return (elm); \ -} \ - \ +} + +#define RB_GENERATE_PREV(name, type, field, attr) \ /* ARGSUSED */ \ attr struct type * \ name##_RB_PREV(struct type *elm) \ @@ -703,8 +738,9 @@ name##_RB_PREV(struct type *elm) \ } \ } \ return (elm); \ -} \ - \ +} + +#define RB_GENERATE_MINMAX(name, type, field, attr) \ attr struct type * \ name##_RB_MINMAX(struct name *head, int val) \ { \ From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 12:51:18 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id DCC024AB; Sat, 24 Jan 2015 12:51:17 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE959C98; Sat, 24 Jan 2015 12:51:17 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OCpHBO053456; Sat, 24 Jan 2015 12:51:17 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OCpGa8053192; Sat, 24 Jan 2015 12:51:16 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501241251.t0OCpGa8053192@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jan 2015 12:51:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 12:51:18 -0000 Author: kib Date: Sat Jan 24 12:51:15 2015 New Revision: 277643 URL: https://svnweb.freebsd.org/changeset/base/277643 Log: Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed for i386, and from the code inspection, nothing in the arm/mips/sparc64 implementations depends on it. Discussed with: imp, nwhitehorn Sponsored by: The FreeBSD Foundation MFC after: 3 weeks Modified: head/sys/arm/arm/mem.c head/sys/dev/mem/memdev.c head/sys/i386/i386/mem.c head/sys/mips/mips/mem.c head/sys/sparc64/sparc64/mem.c Modified: head/sys/arm/arm/mem.c ============================================================================== --- head/sys/arm/arm/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/arm/arm/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -82,8 +82,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr, eaddr; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { Modified: head/sys/dev/mem/memdev.c ============================================================================== --- head/sys/dev/mem/memdev.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/dev/mem/memdev.c Sat Jan 24 12:51:15 2015 (r277643) @@ -52,7 +52,7 @@ static struct cdev *memdev, *kmemdev; static struct cdevsw mem_cdevsw = { .d_version = D_VERSION, - .d_flags = D_MEM|D_NEEDGIANT, + .d_flags = D_MEM, .d_open = memopen, .d_read = memrw, .d_write = memrw, Modified: head/sys/i386/i386/mem.c ============================================================================== --- head/sys/i386/i386/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/i386/i386/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -86,10 +86,6 @@ memrw(struct cdev *dev, struct uio *uio, int error = 0; vm_offset_t addr; - /* XXX UPS Why ? */ - GIANT_REQUIRED; - - if (dev2unit(dev) != CDEV_MINOR_MEM && dev2unit(dev) != CDEV_MINOR_KMEM) return EIO; Modified: head/sys/mips/mips/mem.c ============================================================================== --- head/sys/mips/mips/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/mips/mips/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -85,8 +85,6 @@ memrw(struct cdev *dev, struct uio *uio, cnt = 0; error = 0; - GIANT_REQUIRED; - pmap_page_init(&m); while (uio->uio_resid > 0 && !error) { iov = uio->uio_iov; Modified: head/sys/sparc64/sparc64/mem.c ============================================================================== --- head/sys/sparc64/sparc64/mem.c Sat Jan 24 12:43:36 2015 (r277642) +++ head/sys/sparc64/sparc64/mem.c Sat Jan 24 12:51:15 2015 (r277643) @@ -99,8 +99,6 @@ memrw(struct cdev *dev, struct uio *uio, error = 0; ova = 0; - GIANT_REQUIRED; - while (uio->uio_resid > 0 && error == 0) { iov = uio->uio_iov; if (iov->iov_len == 0) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 13:07:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8902280A; Sat, 24 Jan 2015 13:07:10 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74724E38; Sat, 24 Jan 2015 13:07:10 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OD7AeQ061261; Sat, 24 Jan 2015 13:07:10 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OD78D2061246; Sat, 24 Jan 2015 13:07:08 GMT (envelope-from br@FreeBSD.org) Message-Id: <201501241307.t0OD78D2061246@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 24 Jan 2015 13:07:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277644 - in head/sys: arm/freescale/imx boot/fdt/dts/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 13:07:10 -0000 Author: br Date: Sat Jan 24 13:07:07 2015 New Revision: 277644 URL: https://svnweb.freebsd.org/changeset/base/277644 Log: Add support for audio transmitting, include drivers for: o Digital Audio Multiplexer (AUDMUX) o Smart Direct Memory Access Controller (SDMA) o Synchronous Serial Interface (SSI) Disable by default as it depends on SDMA firmware. Sponsored by: Machdep, Inc. Added: head/sys/arm/freescale/imx/imx6_audmux.c (contents, props changed) head/sys/arm/freescale/imx/imx6_sdma.c (contents, props changed) head/sys/arm/freescale/imx/imx6_sdma.h (contents, props changed) head/sys/arm/freescale/imx/imx6_ssi.c (contents, props changed) Modified: head/sys/arm/freescale/imx/files.imx6 head/sys/arm/freescale/imx/imx6_anatop.c head/sys/arm/freescale/imx/imx6_anatopreg.h head/sys/arm/freescale/imx/imx6_anatopvar.h head/sys/arm/freescale/imx/imx6_ccm.c head/sys/arm/freescale/imx/imx6_ccmreg.h head/sys/arm/freescale/imx/imx_ccmvar.h head/sys/boot/fdt/dts/arm/apalis-imx6.dts head/sys/boot/fdt/dts/arm/imx6.dtsi Modified: head/sys/arm/freescale/imx/files.imx6 ============================================================================== --- head/sys/arm/freescale/imx/files.imx6 Sat Jan 24 12:51:15 2015 (r277643) +++ head/sys/arm/freescale/imx/files.imx6 Sat Jan 24 13:07:07 2015 (r277644) @@ -28,6 +28,9 @@ arm/freescale/imx/imx_machdep.c standar arm/freescale/imx/imx_gpt.c standard arm/freescale/imx/imx_gpio.c optional gpio arm/freescale/imx/imx_i2c.c optional fsliic +arm/freescale/imx/imx6_sdma.c optional sdma +arm/freescale/imx/imx6_audmux.c optional sound +arm/freescale/imx/imx6_ssi.c optional sound # # Optional devices. @@ -52,3 +55,19 @@ arm/freescale/imx/imx6_usbphy.c optiona # Not ready yet... # #arm/freescale/imx/imx51_ipuv3.c optional sc + +# SDMA firmware +sdma_fw.c optional sdma_fw \ + compile-with "${AWK} -f $S/tools/fw_stub.awk sdma-imx6q-to1.bin:sdma_fw -msdma -c${.TARGET}" \ + no-implicit-rule before-depend local \ + clean "sdma_fw.c" +sdma-imx6q-to1.fwo optional sdma_fw \ + dependency "sdma-imx6q-to1.bin" \ + compile-with "${LD} -b binary -d -warn-common -r -d -o ${.TARGET} sdma-imx6q-to1.bin" \ + no-implicit-rule \ + clean "sdma-imx6q-to1.fwo" +sdma-imx6q-to1.bin optional sdma_fw \ + dependency "$S/contrib/dev/imx/sdma-imx6q-to1.bin.uu" \ + compile-with "uudecode < $S/contrib/dev/imx/sdma-imx6q-to1.bin.uu" \ + no-obj no-implicit-rule \ + clean "sdma-imx6q-to1.bin" Modified: head/sys/arm/freescale/imx/imx6_anatop.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatop.c Sat Jan 24 12:51:15 2015 (r277643) +++ head/sys/arm/freescale/imx/imx6_anatop.c Sat Jan 24 13:07:07 2015 (r277644) @@ -710,6 +710,27 @@ out: return (err); } +uint32_t +pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd) +{ + int reg; + + /* + * Audio PLL (PLL4). + * PLL output frequency = Fref * (DIV_SELECT + NUM/DENOM) + */ + + reg = (IMX6_ANALOG_CCM_PLL_AUDIO_ENABLE); + reg &= ~(IMX6_ANALOG_CCM_PLL_AUDIO_DIV_SELECT_MASK << \ + IMX6_ANALOG_CCM_PLL_AUDIO_DIV_SELECT_SHIFT); + reg |= (mfi << IMX6_ANALOG_CCM_PLL_AUDIO_DIV_SELECT_SHIFT); + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_AUDIO, reg); + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_AUDIO_NUM, mfn); + imx6_anatop_write_4(IMX6_ANALOG_CCM_PLL_AUDIO_DENOM, mfd); + + return (0); +} + static int imx6_anatop_probe(device_t dev) { Modified: head/sys/arm/freescale/imx/imx6_anatopreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatopreg.h Sat Jan 24 12:51:15 2015 (r277643) +++ head/sys/arm/freescale/imx/imx6_anatopreg.h Sat Jan 24 13:07:07 2015 (r277644) @@ -58,6 +58,9 @@ #define IMX6_ANALOG_CCM_PLL_SYS_NUM 0x050 #define IMX6_ANALOG_CCM_PLL_SYS_DENOM 0x060 #define IMX6_ANALOG_CCM_PLL_AUDIO 0x070 +#define IMX6_ANALOG_CCM_PLL_AUDIO_ENABLE (1 << 13) +#define IMX6_ANALOG_CCM_PLL_AUDIO_DIV_SELECT_SHIFT 0 +#define IMX6_ANALOG_CCM_PLL_AUDIO_DIV_SELECT_MASK 0x7f #define IMX6_ANALOG_CCM_PLL_AUDIO_SET 0x074 #define IMX6_ANALOG_CCM_PLL_AUDIO_CLR 0x078 #define IMX6_ANALOG_CCM_PLL_AUDIO_TOG 0x07C Modified: head/sys/arm/freescale/imx/imx6_anatopvar.h ============================================================================== --- head/sys/arm/freescale/imx/imx6_anatopvar.h Sat Jan 24 12:51:15 2015 (r277643) +++ head/sys/arm/freescale/imx/imx6_anatopvar.h Sat Jan 24 13:07:07 2015 (r277644) @@ -42,4 +42,6 @@ void imx6_anatop_write_4(bus_size_t _off uint32_t imx6_get_cpu_clock(void); +uint32_t pll4_configure_output(uint32_t mfi, uint32_t mfn, uint32_t mfd); + #endif Added: head/sys/arm/freescale/imx/imx6_audmux.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_audmux.c Sat Jan 24 13:07:07 2015 (r277644) @@ -0,0 +1,159 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * 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. + */ + +/* + * i.MX6 Digital Audio Multiplexer (AUDMUX) + * Chapter 16, i.MX 6Dual/6Quad Applications Processor Reference Manual, + * Rev. 1, 04/2013 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#define READ4(_sc, _reg) \ + bus_space_read_4(_sc->bst, _sc->bsh, _reg) +#define WRITE4(_sc, _reg, _val) \ + bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) + +#define AUDMUX_PTCR(n) (0x8 * (n - 1)) /* Port Timing Control Register */ +#define PTCR_TFS_DIR (1 << 31) /* Transmit Frame Sync Direction Control */ +#define PTCR_TFSEL_S 27 /* Transmit Frame Sync Select */ +#define PTCR_TFSEL_M 0xf +#define PTCR_TCLKDIR (1 << 26) /* Transmit Clock Direction Control */ +#define PTCR_TCSEL_S 22 /* Transmit Clock Select. */ +#define PTCR_TCSEL_M 0xf +#define PTCR_RFS_DIR (1 << 21) /* Receive Frame Sync Direction Control */ +#define PTCR_SYN (1 << 11) +#define AUDMUX_PDCR(n) (0x8 * (n - 1) + 0x4) /* Port Data Control Reg */ +#define PDCR_RXDSEL_S 13 /* Receive Data Select */ +#define PDCR_RXDSEL_M 0x3 +#define PDCR_RXDSEL_PORT(n) (n - 1) + +struct audmux_softc { + struct resource *res[1]; + bus_space_tag_t bst; + bus_space_handle_t bsh; + void *ih; +}; + +static struct resource_spec audmux_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static int +audmux_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,imx6q-audmux")) + return (ENXIO); + + device_set_desc(dev, "i.MX6 Digital Audio Multiplexer"); + return (BUS_PROBE_DEFAULT); +} + +static int +audmux_configure(struct audmux_softc *sc, + int ssi_port, int audmux_port) +{ + uint32_t reg; + + /* Direction: output */ + reg = (PTCR_TFS_DIR | PTCR_TCLKDIR | PTCR_SYN); + WRITE4(sc, AUDMUX_PTCR(audmux_port), reg); + + /* Select source */ + reg = (PDCR_RXDSEL_PORT(ssi_port) << PDCR_RXDSEL_S); + WRITE4(sc, AUDMUX_PDCR(audmux_port), reg); + + return (0); +} + +static int +audmux_attach(device_t dev) +{ + struct audmux_softc *sc; + + sc = device_get_softc(dev); + + if (bus_alloc_resources(dev, audmux_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + /* + * Direct SSI1 output to AUDMUX5 pins. + * TODO: dehardcore this. + */ + audmux_configure(sc, 1, 5); + + return (0); +}; + +static device_method_t audmux_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, audmux_probe), + DEVMETHOD(device_attach, audmux_attach), + { 0, 0 } +}; + +static driver_t audmux_driver = { + "audmux", + audmux_methods, + sizeof(struct audmux_softc), +}; + +static devclass_t audmux_devclass; + +DRIVER_MODULE(audmux, simplebus, audmux_driver, audmux_devclass, 0, 0); Modified: head/sys/arm/freescale/imx/imx6_ccm.c ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccm.c Sat Jan 24 12:51:15 2015 (r277643) +++ head/sys/arm/freescale/imx/imx6_ccm.c Sat Jan 24 13:07:07 2015 (r277644) @@ -94,7 +94,7 @@ ccm_init_gates(struct ccm_softc *sc) WR4(sc, CCM_CCGR2, 0x0fffffc0); /* ipmux & ipsync (bridges), iomux, i2c */ WR4(sc, CCM_CCGR3, 0x3ff00000); /* DDR memory controller */ WR4(sc, CCM_CCGR4, 0x0000f300); /* pl301 bus crossbar */ - WR4(sc, CCM_CCGR5, 0x0f000000); /* uarts */ + WR4(sc, CCM_CCGR5, 0x0ffc00c0); /* uarts, ssi, sdma */ WR4(sc, CCM_CCGR6, 0x000000ff); /* usdhc 1-4 */ } @@ -180,6 +180,58 @@ ccm_probe(device_t dev) } void +imx_ccm_ssi_configure(device_t _ssidev) +{ + struct ccm_softc *sc; + uint32_t reg; + + sc = ccm_sc; + + /* + * Select PLL4 (Audio PLL) clock multiplexer as source. + * PLL output frequency = Fref * (DIV_SELECT + NUM/DENOM). + */ + + reg = RD4(sc, CCM_CSCMR1); + reg &= ~(SSI_CLK_SEL_M << SSI1_CLK_SEL_S); + reg |= (SSI_CLK_SEL_PLL4 << SSI1_CLK_SEL_S); + reg &= ~(SSI_CLK_SEL_M << SSI2_CLK_SEL_S); + reg |= (SSI_CLK_SEL_PLL4 << SSI2_CLK_SEL_S); + reg &= ~(SSI_CLK_SEL_M << SSI3_CLK_SEL_S); + reg |= (SSI_CLK_SEL_PLL4 << SSI3_CLK_SEL_S); + WR4(sc, CCM_CSCMR1, reg); + + /* + * Ensure we have set hardware-default values + * for pre and post dividers. + */ + + /* SSI1 and SSI3 */ + reg = RD4(sc, CCM_CS1CDR); + /* Divide by 2 */ + reg &= ~(SSI_CLK_PODF_MASK << SSI1_CLK_PODF_SHIFT); + reg &= ~(SSI_CLK_PODF_MASK << SSI3_CLK_PODF_SHIFT); + reg |= (0x1 << SSI1_CLK_PODF_SHIFT); + reg |= (0x1 << SSI3_CLK_PODF_SHIFT); + /* Divide by 4 */ + reg &= ~(SSI_CLK_PRED_MASK << SSI1_CLK_PRED_SHIFT); + reg &= ~(SSI_CLK_PRED_MASK << SSI3_CLK_PRED_SHIFT); + reg |= (0x3 << SSI1_CLK_PRED_SHIFT); + reg |= (0x3 << SSI3_CLK_PRED_SHIFT); + WR4(sc, CCM_CS1CDR, reg); + + /* SSI2 */ + reg = RD4(sc, CCM_CS2CDR); + /* Divide by 2 */ + reg &= ~(SSI_CLK_PODF_MASK << SSI2_CLK_PODF_SHIFT); + reg |= (0x1 << SSI2_CLK_PODF_SHIFT); + /* Divide by 4 */ + reg &= ~(SSI_CLK_PRED_MASK << SSI2_CLK_PRED_SHIFT); + reg |= (0x3 << SSI2_CLK_PRED_SHIFT); + WR4(sc, CCM_CS2CDR, reg); +} + +void imx_ccm_usb_enable(device_t _usbdev) { Modified: head/sys/arm/freescale/imx/imx6_ccmreg.h ============================================================================== --- head/sys/arm/freescale/imx/imx6_ccmreg.h Sat Jan 24 12:51:15 2015 (r277643) +++ head/sys/arm/freescale/imx/imx6_ccmreg.h Sat Jan 24 13:07:07 2015 (r277644) @@ -29,6 +29,26 @@ #ifndef IMX6_CCMREG_H #define IMX6_CCMREG_H +#define CCM_CSCMR1 0x01C +#define SSI1_CLK_SEL_S 10 +#define SSI2_CLK_SEL_S 12 +#define SSI3_CLK_SEL_S 14 +#define SSI_CLK_SEL_M 0x3 +#define SSI_CLK_SEL_508_PFD 0 +#define SSI_CLK_SEL_454_PFD 1 +#define SSI_CLK_SEL_PLL4 2 +#define CCM_CSCMR2 0x020 +#define CCM_CS1CDR 0x028 +#define SSI1_CLK_PODF_SHIFT 0 +#define SSI1_CLK_PRED_SHIFT 6 +#define SSI3_CLK_PODF_SHIFT 16 +#define SSI3_CLK_PRED_SHIFT 22 +#define SSI_CLK_PODF_MASK 0x3f +#define SSI_CLK_PRED_MASK 0x7 +#define CCM_CS2CDR 0x02C +#define SSI2_CLK_PODF_SHIFT 0 +#define SSI2_CLK_PRED_SHIFT 6 +#define CCM_CSCDR2 0x038 #define CCM_CLPCR 0x054 #define CCM_CLPCR_LPM_MASK 0x03 #define CCM_CLPCR_LPM_RUN 0x00 Added: head/sys/arm/freescale/imx/imx6_sdma.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_sdma.c Sat Jan 24 13:07:07 2015 (r277644) @@ -0,0 +1,518 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * 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. + */ + +/* + * i.MX6 Smart Direct Memory Access Controller (sDMA) + * Chapter 41, i.MX 6Dual/6Quad Applications Processor Reference Manual, + * Rev. 1, 04/2013 + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +#include + +#define MAX_BD (PAGE_SIZE / sizeof(struct sdma_buffer_descriptor)) + +#define READ4(_sc, _reg) \ + bus_space_read_4(_sc->bst, _sc->bsh, _reg) +#define WRITE4(_sc, _reg, _val) \ + bus_space_write_4(_sc->bst, _sc->bsh, _reg, _val) + +struct sdma_softc *sdma_sc; + +static struct resource_spec sdma_spec[] = { + { SYS_RES_MEMORY, 0, RF_ACTIVE }, + { SYS_RES_IRQ, 0, RF_ACTIVE }, + { -1, 0 } +}; + +static void +sdma_intr(void *arg) +{ + struct sdma_buffer_descriptor *bd; + struct sdma_channel *channel; + struct sdma_conf *conf; + struct sdma_softc *sc; + int pending; + int i; + int j; + + sc = arg; + + pending = READ4(sc, SDMAARM_INTR); + + /* Ack intr */ + WRITE4(sc, SDMAARM_INTR, pending); + + for (i = 0; i < SDMA_N_CHANNELS; i++) { + if ((pending & (1 << i)) == 0) + continue; + channel = &sc->channel[i]; + conf = channel->conf; + if (!conf) + continue; + for (j = 0; j < conf->num_bd; j++) { + bd = &channel->bd[j]; + bd->mode.status |= BD_DONE; + if (bd->mode.status & BD_RROR) + printf("sDMA error\n"); + } + + conf->ih(conf->ih_user, 1); + + WRITE4(sc, SDMAARM_HSTART, (1 << i)); + } +} + +static int +sdma_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (!ofw_bus_is_compatible(dev, "fsl,imx6q-sdma")) + return (ENXIO); + + device_set_desc(dev, "i.MX6 Smart Direct Memory Access Controller"); + return (BUS_PROBE_DEFAULT); +} + +int +sdma_start(int chn) +{ + struct sdma_softc *sc; + + sc = sdma_sc; + + WRITE4(sc, SDMAARM_HSTART, (1 << chn)); + + return (0); +} + +int +sdma_stop(int chn) +{ + struct sdma_softc *sc; + + sc = sdma_sc; + + WRITE4(sc, SDMAARM_STOP_STAT, (1 << chn)); + + return (0); +} + +int +sdma_alloc(void) +{ + struct sdma_channel *channel; + struct sdma_softc *sc; + int found; + int chn; + int i; + + sc = sdma_sc; + found = 0; + + /* Channel 0 can't be used */ + for (i = 1; i < SDMA_N_CHANNELS; i++) { + channel = &sc->channel[i]; + if (channel->in_use == 0) { + channel->in_use = 1; + found = 1; + break; + } + } + + if (!found) + return (-1); + + chn = i; + + /* Allocate area for buffer descriptors */ + channel->bd = (void *)kmem_alloc_contig(kernel_arena, + PAGE_SIZE, M_ZERO, 0, ~0, PAGE_SIZE, 0, + VM_MEMATTR_UNCACHEABLE); + + return (chn); +} + +int +sdma_free(int chn) +{ + struct sdma_channel *channel; + struct sdma_softc *sc; + + sc = sdma_sc; + + channel = &sc->channel[chn]; + channel->in_use = 0; + + kmem_free(kernel_arena, (vm_offset_t)channel->bd, + PAGE_SIZE); + + return (0); +} + +static int +sdma_overrides(struct sdma_softc *sc, int chn, + int evt, int host, int dsp) +{ + int reg; + + /* Ignore sDMA requests */ + reg = READ4(sc, SDMAARM_EVTOVR); + if (evt) + reg |= (1 << chn); + else + reg &= ~(1 << chn); + WRITE4(sc, SDMAARM_EVTOVR, reg); + + /* Ignore enable bit (HE) */ + reg = READ4(sc, SDMAARM_HOSTOVR); + if (host) + reg |= (1 << chn); + else + reg &= ~(1 << chn); + WRITE4(sc, SDMAARM_HOSTOVR, reg); + + /* Prevent sDMA channel from starting */ + reg = READ4(sc, SDMAARM_DSPOVR); + if (!dsp) + reg |= (1 << chn); + else + reg &= ~(1 << chn); + WRITE4(sc, SDMAARM_DSPOVR, reg); + + return (0); +} + +int +sdma_configure(int chn, struct sdma_conf *conf) +{ + struct sdma_buffer_descriptor *bd0; + struct sdma_buffer_descriptor *bd; + struct sdma_context_data *context; + struct sdma_channel *channel; + struct sdma_softc *sc; +#if 0 + int timeout; + int ret; +#endif + int i; + + sc = sdma_sc; + + channel = &sc->channel[chn]; + channel->conf = conf; + + /* Ensure operation has stopped */ + sdma_stop(chn); + + /* Set priority and enable the channel */ + WRITE4(sc, SDMAARM_SDMA_CHNPRI(chn), 1); + WRITE4(sc, SDMAARM_CHNENBL(conf->event), (1 << chn)); + + sdma_overrides(sc, chn, 0, 0, 0); + + if (conf->num_bd > MAX_BD) { + device_printf(sc->dev, "Error: too much buffer" + " descriptors requested\n"); + return (-1); + } + + for (i = 0; i < conf->num_bd; i++) { + bd = &channel->bd[i]; + bd->mode.command = conf->command; + bd->mode.status = BD_DONE | BD_EXTD | BD_CONT | BD_INTR; + if (i == (conf->num_bd - 1)) + bd->mode.status |= BD_WRAP; + bd->mode.count = conf->period; + bd->buffer_addr = conf->saddr + (conf->period * i); + bd->ext_buffer_addr = 0; + } + + sc->ccb[chn].base_bd_ptr = vtophys(channel->bd); + sc->ccb[chn].current_bd_ptr = vtophys(channel->bd); + + /* + * Load context. + * + * i.MX6 Reference Manual: Appendix A SDMA Scripts + * A.3.1.7.1 (mcu_2_app) + */ + + /* + * TODO: allow using other scripts + */ + context = sc->context; + memset(context, 0, sizeof(*context)); + context->channel_state.pc = sc->fw_scripts->mcu_2_app_addr; + + /* + * Tx FIFO 0 address (r6) + * Event_mask (r1) + * Event2_mask (r0) + * Watermark level (r7) + */ + + if (conf->event > 32) { + context->gReg[0] = (1 << (conf->event % 32)); + context->gReg[1] = 0; + } else { + context->gReg[0] = 0; + context->gReg[1] = (1 << conf->event); + } + + context->gReg[6] = conf->daddr; + context->gReg[7] = conf->word_length; + + bd0 = sc->bd0; + bd0->mode.command = C0_SETDM; + bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD; + bd0->mode.count = sizeof(*context) / 4; + bd0->buffer_addr = sc->context_phys; + bd0->ext_buffer_addr = 2048 + (sizeof(*context) / 4) * chn; + + WRITE4(sc, SDMAARM_HSTART, 1); + +#if 0 + /* Debug purposes */ + + timeout = 1000; + while (!(ret = READ4(sc, SDMAARM_INTR) & 1)) { + if (timeout-- <= 0) + break; + DELAY(10); + }; + + if (!ret) { + device_printf(sc->dev, "Failed to load context.\n"); + return (-1); + } + + WRITE4(sc, SDMAARM_INTR, ret); + + device_printf(sc->dev, "Context loaded successfully.\n"); +#endif + + return (0); +} + +static int +load_firmware(struct sdma_softc *sc) +{ + struct sdma_firmware_header *header; + const struct firmware *fp; + + fp = firmware_get("sdma_fw"); + if (fp == NULL) { + device_printf(sc->dev, "Can't get firmware.\n"); + return (-1); + } + + header = (struct sdma_firmware_header *)fp->data; + if (header->magic != FW_HEADER_MAGIC) { + device_printf(sc->dev, "Can't use firmware.\n"); + return (-1); + } + + sc->fw_header = header; + sc->fw_scripts = (void *)((char *)header + + header->script_addrs_start); + + return (0); +} + +static int +boot_firmware(struct sdma_softc *sc) +{ + struct sdma_buffer_descriptor *bd0; + uint32_t *ram_code; + int timeout; + int ret; + int chn; + int sz; + int i; + + ram_code = (void *)((char *)sc->fw_header + + sc->fw_header->ram_code_start); + + /* Make sure SDMA has not started yet */ + WRITE4(sc, SDMAARM_MC0PTR, 0); + + sz = SDMA_N_CHANNELS * sizeof(struct sdma_channel_control) + \ + sizeof(struct sdma_context_data); + sc->ccb = (void *)kmem_alloc_contig(kernel_arena, + sz, M_ZERO, 0, ~0, PAGE_SIZE, 0, VM_MEMATTR_UNCACHEABLE); + sc->ccb_phys = vtophys(sc->ccb); + + sc->context = (void *)((char *)sc->ccb + \ + SDMA_N_CHANNELS * sizeof(struct sdma_channel_control)); + sc->context_phys = vtophys(sc->context); + + /* Disable all the channels */ + for (i = 0; i < SDMA_N_EVENTS; i++) + WRITE4(sc, SDMAARM_CHNENBL(i), 0); + + /* All channels have priority 0 */ + for (i = 0; i < SDMA_N_CHANNELS; i++) + WRITE4(sc, SDMAARM_SDMA_CHNPRI(i), 0); + + /* Channel 0 is used for booting firmware */ + chn = 0; + + sc->bd0 = (void *)kmem_alloc_contig(kernel_arena, + PAGE_SIZE, M_ZERO, 0, ~0, PAGE_SIZE, 0, + VM_MEMATTR_UNCACHEABLE); + bd0 = sc->bd0; + sc->ccb[chn].base_bd_ptr = vtophys(bd0); + sc->ccb[chn].current_bd_ptr = vtophys(bd0); + + WRITE4(sc, SDMAARM_SDMA_CHNPRI(chn), 1); + + sdma_overrides(sc, chn, 1, 0, 0); + + /* XXX: not sure what is that */ + WRITE4(sc, SDMAARM_CHN0ADDR, 0x4050); + + WRITE4(sc, SDMAARM_CONFIG, 0); + WRITE4(sc, SDMAARM_MC0PTR, sc->ccb_phys); + WRITE4(sc, SDMAARM_CONFIG, CONFIG_CSM); + WRITE4(sc, SDMAARM_SDMA_CHNPRI(chn), 1); + + bd0->mode.command = C0_SETPM; + bd0->mode.status = BD_DONE | BD_INTR | BD_WRAP | BD_EXTD; + bd0->mode.count = sc->fw_header->ram_code_size / 2; + bd0->buffer_addr = vtophys(ram_code); + bd0->ext_buffer_addr = sc->fw_scripts->ram_code_start_addr; + + WRITE4(sc, SDMAARM_HSTART, 1); + + timeout = 100; + while (!(ret = READ4(sc, SDMAARM_INTR) & 1)) { + if (timeout-- <= 0) + break; + DELAY(10); + }; + + if (ret == 0) { + device_printf(sc->dev, "SDMA failed to boot\n"); + return (-1); + } + + WRITE4(sc, SDMAARM_INTR, ret); + +#if 0 + device_printf(sc->dev, "SDMA booted successfully.\n"); +#endif + + /* Debug is disabled */ + WRITE4(sc, SDMAARM_ONCE_ENB, 0); + + return (0); +} + +static int +sdma_attach(device_t dev) +{ + struct sdma_softc *sc; + int err; + + sc = device_get_softc(dev); + sc->dev = dev; + + if (bus_alloc_resources(dev, sdma_spec, sc->res)) { + device_printf(dev, "could not allocate resources\n"); + return (ENXIO); + } + + /* Memory interface */ + sc->bst = rman_get_bustag(sc->res[0]); + sc->bsh = rman_get_bushandle(sc->res[0]); + + sdma_sc = sc; + + /* Setup interrupt handler */ + err = bus_setup_intr(dev, sc->res[1], INTR_TYPE_MISC | INTR_MPSAFE, + NULL, sdma_intr, sc, &sc->ih); + if (err) { + device_printf(dev, "Unable to alloc interrupt resource.\n"); + return (ENXIO); + } + + if (load_firmware(sc) == -1) + return (ENXIO); + + if (boot_firmware(sc) == -1) + return (ENXIO); + + return (0); +}; + +static device_method_t sdma_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, sdma_probe), + DEVMETHOD(device_attach, sdma_attach), + { 0, 0 } +}; + +static driver_t sdma_driver = { + "sdma", + sdma_methods, + sizeof(struct sdma_softc), +}; + +static devclass_t sdma_devclass; + +DRIVER_MODULE(sdma, simplebus, sdma_driver, sdma_devclass, 0, 0); Added: head/sys/arm/freescale/imx/imx6_sdma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/arm/freescale/imx/imx6_sdma.h Sat Jan 24 13:07:07 2015 (r277644) @@ -0,0 +1,245 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * 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$ + */ + +#define SDMAARM_MC0PTR 0x00 /* ARM platform Channel 0 Pointer */ +#define SDMAARM_INTR 0x04 /* Channel Interrupts */ +#define SDMAARM_STOP_STAT 0x08 /* Channel Stop/Channel Status */ +#define SDMAARM_HSTART 0x0C /* Channel Start */ +#define SDMAARM_EVTOVR 0x10 /* Channel Event Override */ +#define SDMAARM_DSPOVR 0x14 /* Channel BP Override */ +#define SDMAARM_HOSTOVR 0x18 /* Channel ARM platform Override */ +#define SDMAARM_EVTPEND 0x1C /* Channel Event Pending */ +#define SDMAARM_RESET 0x24 /* Reset Register */ +#define SDMAARM_EVTERR 0x28 /* DMA Request Error Register */ +#define SDMAARM_INTRMASK 0x2C /* Channel ARM platform Interrupt Mask */ +#define SDMAARM_PSW 0x30 /* Schedule Status */ +#define SDMAARM_EVTERRDBG 0x34 /* DMA Request Error Register */ +#define SDMAARM_CONFIG 0x38 /* Configuration Register */ +#define CONFIG_CSM 0x3 +#define SDMAARM_SDMA_LOCK 0x3C /* SDMA LOCK */ +#define SDMAARM_ONCE_ENB 0x40 /* OnCE Enable */ +#define SDMAARM_ONCE_DATA 0x44 /* OnCE Data Register */ +#define SDMAARM_ONCE_INSTR 0x48 /* OnCE Instruction Register */ +#define SDMAARM_ONCE_STAT 0x4C /* OnCE Status Register */ +#define SDMAARM_ONCE_CMD 0x50 /* OnCE Command Register */ +#define SDMAARM_ILLINSTADDR 0x58 /* Illegal Instruction Trap Address */ +#define SDMAARM_CHN0ADDR 0x5C /* Channel 0 Boot Address */ +#define SDMAARM_EVT_MIRROR 0x60 /* DMA Requests */ +#define SDMAARM_EVT_MIRROR2 0x64 /* DMA Requests 2 */ +#define SDMAARM_XTRIG_CONF1 0x70 /* Cross-Trigger Events Configuration Register 1 */ +#define SDMAARM_XTRIG_CONF2 0x74 /* Cross-Trigger Events Configuration Register 2 */ +#define SDMAARM_SDMA_CHNPRI(n) (0x100 + 0x4 * n) /* Channel Priority Registers */ +#define SDMAARM_CHNENBL(n) (0x200 + 0x4 * n) /* Channel Enable RAM */ + +/* SDMA Event Mappings */ +#define SSI1_RX_1 35 +#define SSI1_TX_1 36 +#define SSI1_RX_0 37 +#define SSI1_TX_0 38 +#define SSI2_RX_1 39 +#define SSI2_TX_1 40 +#define SSI2_RX_0 41 +#define SSI2_TX_0 42 +#define SSI3_RX_1 43 +#define SSI3_TX_1 44 +#define SSI3_RX_0 45 +#define SSI3_TX_0 46 + +#define C0_ADDR 0x01 +#define C0_LOAD 0x02 +#define C0_DUMP 0x03 +#define C0_SETCTX 0x07 +#define C0_GETCTX 0x03 +#define C0_SETDM 0x01 +#define C0_SETPM 0x04 +#define C0_GETDM 0x02 +#define C0_GETPM 0x08 + +#define BD_DONE 0x01 +#define BD_WRAP 0x02 +#define BD_CONT 0x04 +#define BD_INTR 0x08 +#define BD_RROR 0x10 +#define BD_LAST 0x20 +#define BD_EXTD 0x80 + +/* sDMA data transfer length */ +#define CMD_4BYTES 0 +#define CMD_3BYTES 3 +#define CMD_2BYTES 2 +#define CMD_1BYTES 1 + +struct sdma_firmware_header { + uint32_t magic; + uint32_t version_major; + uint32_t version_minor; + uint32_t script_addrs_start; + uint32_t num_script_addrs; + uint32_t ram_code_start; + uint32_t ram_code_size; +}; + +struct sdma_mode_count { + uint16_t count; + uint8_t status; + uint8_t command; +}; + +struct sdma_buffer_descriptor { + struct sdma_mode_count mode; + uint32_t buffer_addr; + uint32_t ext_buffer_addr; +} __packed; + +struct sdma_channel_control { + uint32_t current_bd_ptr; + uint32_t base_bd_ptr; + uint32_t unused[2]; +} __packed; + +struct sdma_state_registers { + uint32_t pc :14; + uint32_t unused1: 1; + uint32_t t : 1; + uint32_t rpc :14; + uint32_t unused0: 1; + uint32_t sf : 1; + uint32_t spc :14; *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 13:50:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 27405E2D; Sat, 24 Jan 2015 13:50:15 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 085691DF; Sat, 24 Jan 2015 13:50:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0ODoE0j080356; Sat, 24 Jan 2015 13:50:14 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0ODoEFD080352; Sat, 24 Jan 2015 13:50:14 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501241350.t0ODoEFD080352@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 24 Jan 2015 13:50:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277645 - in head: bin/cp bin/mv usr.bin/touch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 13:50:15 -0000 Author: jilles Date: Sat Jan 24 13:50:13 2015 New Revision: 277645 URL: https://svnweb.freebsd.org/changeset/base/277645 Log: cp,mv,touch: Set timestamps with nanosecond precision. This uses utimensat(). Modified: head/bin/cp/utils.c head/bin/mv/mv.c head/usr.bin/touch/touch.c Modified: head/bin/cp/utils.c ============================================================================== --- head/bin/cp/utils.c Sat Jan 24 13:07:07 2015 (r277644) +++ head/bin/cp/utils.c Sat Jan 24 13:50:13 2015 (r277645) @@ -330,7 +330,7 @@ copy_special(struct stat *from_stat, int int setfile(struct stat *fs, int fd) { - static struct timeval tv[2]; + static struct timespec tspec[2]; struct stat ts; int rval, gotstat, islink, fdval; @@ -340,10 +340,11 @@ setfile(struct stat *fs, int fd) fs->st_mode &= S_ISUID | S_ISGID | S_ISVTX | S_IRWXU | S_IRWXG | S_IRWXO; - TIMESPEC_TO_TIMEVAL(&tv[0], &fs->st_atim); - TIMESPEC_TO_TIMEVAL(&tv[1], &fs->st_mtim); - if (islink ? lutimes(to.p_path, tv) : utimes(to.p_path, tv)) { - warn("%sutimes: %s", islink ? "l" : "", to.p_path); + tspec[0] = fs->st_atim; + tspec[1] = fs->st_mtim; + if (utimensat(AT_FDCWD, to.p_path, tspec, + islink ? AT_SYMLINK_NOFOLLOW : 0)) { + warn("utimensat: %s", to.p_path); rval = 1; } if (fdval ? fstat(fd, &ts) : Modified: head/bin/mv/mv.c ============================================================================== --- head/bin/mv/mv.c Sat Jan 24 13:07:07 2015 (r277644) +++ head/bin/mv/mv.c Sat Jan 24 13:50:13 2015 (r277645) @@ -273,7 +273,7 @@ do_move(const char *from, const char *to static int fastcopy(const char *from, const char *to, struct stat *sbp) { - struct timeval tval[2]; + struct timespec ts[2]; static u_int blen = MAXPHYS; static char *bp = NULL; mode_t oldmode; @@ -350,10 +350,9 @@ err: if (unlink(to)) } else warn("%s: cannot stat", to); - tval[0].tv_sec = sbp->st_atime; - tval[1].tv_sec = sbp->st_mtime; - tval[0].tv_usec = tval[1].tv_usec = 0; - if (utimes(to, tval)) + ts[0] = sbp->st_atim; + ts[1] = sbp->st_mtim; + if (utimensat(AT_FDCWD, to, ts, 0)) warn("%s: set times", to); if (close(to_fd)) { Modified: head/usr.bin/touch/touch.c ============================================================================== --- head/usr.bin/touch/touch.c Sat Jan 24 13:07:07 2015 (r277644) +++ head/usr.bin/touch/touch.c Sat Jan 24 13:50:13 2015 (r277645) @@ -56,10 +56,10 @@ static const char sccsid[] = "@(#)touch. #include #include -static void stime_arg1(const char *, struct timeval *); -static void stime_arg2(const char *, int, struct timeval *); -static void stime_darg(const char *, struct timeval *); -static void stime_file(const char *, struct timeval *); +static void stime_arg1(const char *, struct timespec *); +static void stime_arg2(const char *, int, struct timespec *); +static void stime_darg(const char *, struct timespec *); +static void stime_file(const char *, struct timespec *); static int timeoffset(const char *); static void usage(const char *); @@ -67,19 +67,17 @@ int main(int argc, char *argv[]) { struct stat sb; - struct timeval tv[2]; - int (*stat_f)(const char *, struct stat *); - int (*utimes_f)(const char *, const struct timeval *); + struct timespec ts[2]; + int atflag; int Aflag, aflag, cflag, mflag, ch, fd, len, rval, timeset; char *p; char *myname; myname = basename(argv[0]); Aflag = aflag = cflag = mflag = timeset = 0; - stat_f = stat; - utimes_f = utimes; - if (gettimeofday(&tv[0], NULL) == -1) - err(1, "gettimeofday"); + atflag = 0; + if (clock_gettime(CLOCK_REALTIME, &ts[0]) == -1) + err(1, "clock_gettime(CLOCK_REALTIME)"); while ((ch = getopt(argc, argv, "A:acd:fhmr:t:")) != -1) switch(ch) { @@ -94,26 +92,25 @@ main(int argc, char *argv[]) break; case 'd': timeset = 1; - stime_darg(optarg, tv); + stime_darg(optarg, ts); break; case 'f': /* No-op for compatibility. */ break; case 'h': cflag = 1; - stat_f = lstat; - utimes_f = lutimes; + atflag = AT_SYMLINK_NOFOLLOW; break; case 'm': mflag = 1; break; case 'r': timeset = 1; - stime_file(optarg, tv); + stime_file(optarg, ts); break; case 't': timeset = 1; - stime_arg1(optarg, tv); + stime_arg1(optarg, ts); break; default: usage(myname); @@ -132,9 +129,9 @@ main(int argc, char *argv[]) * that time once and for all here. */ if (aflag) - tv[0].tv_sec += Aflag; + ts[0].tv_sec += Aflag; if (mflag) - tv[1].tv_sec += Aflag; + ts[1].tv_sec += Aflag; Aflag = 0; /* done our job */ } } else { @@ -148,11 +145,11 @@ main(int argc, char *argv[]) len = p - argv[0]; if (*p == '\0' && (len == 8 || len == 10)) { timeset = 1; - stime_arg2(*argv++, len == 10, tv); + stime_arg2(*argv++, len == 10, ts); } } /* Both times default to the same. */ - tv[1] = tv[0]; + ts[1] = ts[0]; } if (*argv == NULL) @@ -163,7 +160,7 @@ main(int argc, char *argv[]) for (rval = 0; *argv; ++argv) { /* See if the file exists. */ - if (stat_f(*argv, &sb) != 0) { + if (fstatat(AT_FDCWD, *argv, &sb, atflag) != 0) { if (errno != ENOENT) { rval = 1; warn("%s", *argv); @@ -187,9 +184,9 @@ main(int argc, char *argv[]) } if (!aflag) - TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atim); + ts[0] = sb.st_atim; if (!mflag) - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); + ts[1] = sb.st_mtim; /* * We're adjusting the times based on the file times, not a @@ -197,17 +194,17 @@ main(int argc, char *argv[]) */ if (Aflag) { if (aflag) { - TIMESPEC_TO_TIMEVAL(&tv[0], &sb.st_atim); - tv[0].tv_sec += Aflag; + ts[0] = sb.st_atim; + ts[0].tv_sec += Aflag; } if (mflag) { - TIMESPEC_TO_TIMEVAL(&tv[1], &sb.st_mtim); - tv[1].tv_sec += Aflag; + ts[1] = sb.st_mtim; + ts[1].tv_sec += Aflag; } } - /* Try utimes(2). */ - if (!utimes_f(*argv, tv)) + /* Try utimensat(2). */ + if (!utimensat(AT_FDCWD, *argv, ts, atflag)) continue; /* If the user specified a time, nothing else we can do. */ @@ -223,7 +220,7 @@ main(int argc, char *argv[]) * The permission checks are different, too, in that the * ability to write the file is sufficient. Take a shot. */ - if (!utimes_f(*argv, NULL)) + if (!utimensat(AT_FDCWD, *argv, NULL, atflag)) continue; rval = 1; @@ -235,7 +232,7 @@ main(int argc, char *argv[]) #define ATOI2(ar) ((ar)[0] - '0') * 10 + ((ar)[1] - '0'); (ar) += 2; static void -stime_arg1(const char *arg, struct timeval *tvp) +stime_arg1(const char *arg, struct timespec *tvp) { time_t now; struct tm *t; @@ -291,7 +288,7 @@ stime_arg1(const char *arg, struct timev if (tvp[0].tv_sec == -1) goto terr; - tvp[0].tv_usec = tvp[1].tv_usec = 0; + tvp[0].tv_nsec = tvp[1].tv_nsec = 0; return; terr: @@ -299,7 +296,7 @@ terr: } static void -stime_arg2(const char *arg, int year, struct timeval *tvp) +stime_arg2(const char *arg, int year, struct timespec *tvp) { time_t now; struct tm *t; @@ -325,18 +322,18 @@ stime_arg2(const char *arg, int year, st errx(1, "out of range or illegal time specification: MMDDhhmm[yy]"); - tvp[0].tv_usec = tvp[1].tv_usec = 0; + tvp[0].tv_nsec = tvp[1].tv_nsec = 0; } static void -stime_darg(const char *arg, struct timeval *tvp) +stime_darg(const char *arg, struct timespec *tvp) { struct tm t = { .tm_sec = 0 }; const char *fmt, *colon; char *p; int val, isutc = 0; - tvp[0].tv_usec = 0; + tvp[0].tv_nsec = 0; t.tm_isdst = -1; colon = strchr(arg, ':'); if (colon == NULL || strchr(colon + 1, ':') == NULL) @@ -349,9 +346,9 @@ stime_darg(const char *arg, struct timev /* POSIX: must have at least one digit after dot */ if ((*p == '.' || *p == ',') && isdigit((unsigned char)p[1])) { p++; - val = 100000; + val = 100000000; while (isdigit((unsigned char)*p)) { - tvp[0].tv_usec += val * (*p - '0'); + tvp[0].tv_nsec += val * (*p - '0'); p++; val /= 10; } @@ -403,14 +400,14 @@ timeoffset(const char *arg) } static void -stime_file(const char *fname, struct timeval *tvp) +stime_file(const char *fname, struct timespec *tsp) { struct stat sb; if (stat(fname, &sb)) err(1, "%s", fname); - TIMESPEC_TO_TIMEVAL(tvp, &sb.st_atim); - TIMESPEC_TO_TIMEVAL(tvp + 1, &sb.st_mtim); + tsp[0] = sb.st_atim; + tsp[1] = sb.st_mtim; } static void From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 15:25:37 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 4A9A4F83; Sat, 24 Jan 2015 15:25:37 +0000 (UTC) Received: from smtp3.ore.mailhop.org (smtp3.ore.mailhop.org [54.149.88.251]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2A956C6B; Sat, 24 Jan 2015 15:25:37 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp3.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YF28e-0002G5-2o; Sat, 24 Jan 2015 14:56:40 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0OEub74026935; Sat, 24 Jan 2015 07:56:37 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX19pLfVgL+8Oo5lSp1/4cQn9 Message-ID: <1422111397.1038.53.camel@freebsd.org> Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 From: Ian Lepore To: Konstantin Belousov Date: Sat, 24 Jan 2015 07:56:37 -0700 In-Reply-To: <201501241251.t0OCpGa8053192@svn.freebsd.org> References: <201501241251.t0OCpGa8053192@svn.freebsd.org> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 15:25:37 -0000 On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: > Author: kib > Date: Sat Jan 24 12:51:15 2015 > New Revision: 277643 > URL: https://svnweb.freebsd.org/changeset/base/277643 > > Log: > Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed > for i386, and from the code inspection, nothing in the > arm/mips/sparc64 implementations depends on it. > I'm not sure I agree with that. On arm the memrw() implementation uses a single statically-allocated page of kva space into which it maps each physical page in turn in the main loop. What prevents preemption or multicore access to /dev/mem from trying to use that single page for multiple operations at once? -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 15:33:43 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6E5A255; Sat, 24 Jan 2015 15:33:43 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 76372D30; Sat, 24 Jan 2015 15:33:43 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OFXhPj032390; Sat, 24 Jan 2015 15:33:43 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OFXh2w032389; Sat, 24 Jan 2015 15:33:43 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201501241533.t0OFXh2w032389@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 24 Jan 2015 15:33:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277646 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 15:33:43 -0000 Author: kib Date: Sat Jan 24 15:33:42 2015 New Revision: 277646 URL: https://svnweb.freebsd.org/changeset/base/277646 Log: Avoid calling vmspace_free() while owning the process lock. Freeing of an vm space may require obtaining sleepable locks. Hold the process to keep the pointer valid, and change trylock to lock, since there is no longer two process locks owned simultaneously in vm_pageout_oom(). Note that after the process lock is dropped, process might exec, and no longer qualify as the owner of biggest vm space. In collaboration with: rstone Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Jan 24 13:50:13 2015 (r277645) +++ head/sys/vm/vm_pageout.c Sat Jan 24 15:33:42 2015 (r277646) @@ -1516,15 +1516,15 @@ vm_pageout_oom(int shortage) FOREACH_PROC_IN_SYSTEM(p) { int breakout; - if (PROC_TRYLOCK(p) == 0) - continue; + PROC_LOCK(p); + /* * If this is a system, protected or killed process, skip it. */ - if (p->p_state != PRS_NORMAL || - (p->p_flag & (P_INEXEC | P_PROTECTED | P_SYSTEM)) || - (p->p_pid == 1) || P_KILLED(p) || - ((p->p_pid < 48) && (swap_pager_avail != 0))) { + if (p->p_state != PRS_NORMAL || (p->p_flag & (P_INEXEC | + P_PROTECTED | P_SYSTEM | P_WEXIT)) != 0 || + p->p_pid == 1 || P_KILLED(p) || + (p->p_pid < 48 && swap_pager_avail != 0)) { PROC_UNLOCK(p); continue; } @@ -1557,11 +1557,14 @@ vm_pageout_oom(int shortage) PROC_UNLOCK(p); continue; } + _PHOLD(p); if (!vm_map_trylock_read(&vm->vm_map)) { - vmspace_free(vm); + _PRELE(p); PROC_UNLOCK(p); + vmspace_free(vm); continue; } + PROC_UNLOCK(p); size = vmspace_swap_count(vm); vm_map_unlock_read(&vm->vm_map); if (shortage == VM_OOM_MEM) @@ -1573,16 +1576,19 @@ vm_pageout_oom(int shortage) */ if (size > bigsize) { if (bigproc != NULL) - PROC_UNLOCK(bigproc); + PRELE(bigproc); bigproc = p; bigsize = size; - } else - PROC_UNLOCK(p); + } else { + PRELE(p); + } } sx_sunlock(&allproc_lock); if (bigproc != NULL) { + PROC_LOCK(bigproc); killproc(bigproc, "out of swap space"); sched_nice(bigproc, PRIO_MIN); + _PRELE(bigproc); PROC_UNLOCK(bigproc); wakeup(&vm_cnt.v_free_count); } From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 15:40:53 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 69A434C1; Sat, 24 Jan 2015 15:40:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 55D93D63; Sat, 24 Jan 2015 15:40:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OFerLw034512; Sat, 24 Jan 2015 15:40:53 GMT (envelope-from mav@FreeBSD.org) Received: (from mav@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OFerWa034511; Sat, 24 Jan 2015 15:40:53 GMT (envelope-from mav@FreeBSD.org) Message-Id: <201501241540.t0OFerWa034511@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: mav set sender to mav@FreeBSD.org using -f From: Alexander Motin Date: Sat, 24 Jan 2015 15:40:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277647 - head/sys/cam/ctl X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 15:40:53 -0000 Author: mav Date: Sat Jan 24 15:40:52 2015 New Revision: 277647 URL: https://svnweb.freebsd.org/changeset/base/277647 Log: Fix wrong LUN reference in XCOPY block-to-block operation. This could cause data corruption due to accessing wrong LUN in case of retries on write errors. Failed writes were retried to read LUN. MFC after: 3 days Modified: head/sys/cam/ctl/ctl_tpc.c Modified: head/sys/cam/ctl/ctl_tpc.c ============================================================================== --- head/sys/cam/ctl/ctl_tpc.c Sat Jan 24 15:33:42 2015 (r277646) +++ head/sys/cam/ctl/ctl_tpc.c Sat Jan 24 15:40:52 2015 (r277647) @@ -916,7 +916,7 @@ tpc_process_b2b(struct tpc_list *list) /*control*/ 0); tiow->io->io_hdr.retries = 3; tiow->lun = dl; - tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tior; + tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); TAILQ_INSERT_TAIL(prun, tior, rlinks); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 15:42:51 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5999860A; Sat, 24 Jan 2015 15:42:51 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BEF94E02; Sat, 24 Jan 2015 15:42:50 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0OFgeuw051880 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 24 Jan 2015 17:42:40 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0OFgeuw051880 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0OFgesv051879; Sat, 24 Jan 2015 17:42:40 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 24 Jan 2015 17:42:40 +0200 From: Konstantin Belousov To: Ian Lepore Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 Message-ID: <20150124154240.GV42409@kib.kiev.ua> References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1422111397.1038.53.camel@freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 15:42:51 -0000 On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: > On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: > > Author: kib > > Date: Sat Jan 24 12:51:15 2015 > > New Revision: 277643 > > URL: https://svnweb.freebsd.org/changeset/base/277643 > > > > Log: > > Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed > > for i386, and from the code inspection, nothing in the > > arm/mips/sparc64 implementations depends on it. > > > > I'm not sure I agree with that. On arm the memrw() implementation uses > a single statically-allocated page of kva space into which it maps each > physical page in turn in the main loop. What prevents preemption or > multicore access to /dev/mem from trying to use that single page for > multiple operations at once? I see, thank you for noting this. But, I do not think that Giant is a solution for the problem. uiomove() call accesses userspace, which may fault and cause sleep. If the thread sleeps, the Giant is automatically dropped, so there is no real protection. I think dump exclusive sx around whole memrw() should be enough. I can revert the commit for now, or I can leave it as is while writing the patch with sx and waiting for somebody review. What would you prefer ? P.S. mips uses uiomove_fromphys(), avoiding transient mapping, and sparc allocates KVA when needed. From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 15:49:41 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C154C79B; Sat, 24 Jan 2015 15:49:41 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACD00E26; Sat, 24 Jan 2015 15:49:41 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OFnfPT037941; Sat, 24 Jan 2015 15:49:41 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OFnfHK037939; Sat, 24 Jan 2015 15:49:41 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201501241549.t0OFnfHK037939@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sat, 24 Jan 2015 15:49:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277648 - in head: contrib/netbsd-tests/lib/libc/c063 lib/libc/tests/c063 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 15:49:41 -0000 Author: jilles Date: Sat Jan 24 15:49:40 2015 New Revision: 277648 URL: https://svnweb.freebsd.org/changeset/base/277648 Log: Enable utimensat tests from NetBSD. As with other tests from c063, a required #include was missing. Modified: head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c head/lib/libc/tests/c063/Makefile Modified: head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c ============================================================================== --- head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Jan 24 15:40:52 2015 (r277647) +++ head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Jan 24 15:49:40 2015 (r277648) @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 20 #include #include #include +#ifdef __FreeBSD__ +#include +#endif #include #define DIR "dir" Modified: head/lib/libc/tests/c063/Makefile ============================================================================== --- head/lib/libc/tests/c063/Makefile Sat Jan 24 15:40:52 2015 (r277647) +++ head/lib/libc/tests/c063/Makefile Sat Jan 24 15:49:40 2015 (r277648) @@ -2,7 +2,7 @@ TESTSDIR= ${TESTSBASE}/lib/libc/c063 -#TODO: t_o_search, t_utimensat +#TODO: t_o_search NETBSD_ATF_TESTS_C= faccessat NETBSD_ATF_TESTS_C+= fchmodat @@ -18,6 +18,7 @@ NETBSD_ATF_TESTS_C+= readlinkat NETBSD_ATF_TESTS_C+= renameat NETBSD_ATF_TESTS_C+= symlinkat NETBSD_ATF_TESTS_C+= unlinkat +NETBSD_ATF_TESTS_C+= utimensat CFLAGS+= -D_INCOMPLETE_XOPEN_C063 From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 15:51:23 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A48E7906; Sat, 24 Jan 2015 15:51:23 +0000 (UTC) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46031EC5; Sat, 24 Jan 2015 15:51:23 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.9/8.14.9) with ESMTP id t0OFpH0c054117 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 24 Jan 2015 17:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.9.2 kib.kiev.ua t0OFpH0c054117 Received: (from kostik@localhost) by tom.home (8.14.9/8.14.9/Submit) id t0OFpHIC054116; Sat, 24 Jan 2015 17:51:17 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 24 Jan 2015 17:51:17 +0200 From: Konstantin Belousov To: Ian Lepore Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 Message-ID: <20150124155117.GW42409@kib.kiev.ua> References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150124154240.GV42409@kib.kiev.ua> User-Agent: Mutt/1.5.23 (2014-03-12) 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 autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 15:51:23 -0000 On Sat, Jan 24, 2015 at 05:42:40PM +0200, Konstantin Belousov wrote: > On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: > > On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Sat Jan 24 12:51:15 2015 > > > New Revision: 277643 > > > URL: https://svnweb.freebsd.org/changeset/base/277643 > > > > > > Log: > > > Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed > > > for i386, and from the code inspection, nothing in the > > > arm/mips/sparc64 implementations depends on it. > > > > > > > I'm not sure I agree with that. On arm the memrw() implementation uses > > a single statically-allocated page of kva space into which it maps each > > physical page in turn in the main loop. What prevents preemption or > > multicore access to /dev/mem from trying to use that single page for > > multiple operations at once? > > I see, thank you for noting this. > > But, I do not think that Giant is a solution for the problem. uiomove() > call accesses userspace, which may fault and cause sleep. If the > thread sleeps, the Giant is automatically dropped, so there is no real > protection. > > I think dump exclusive sx around whole memrw() should be enough. > > I can revert the commit for now, or I can leave it as is while > writing the patch with sx and waiting for somebody review. What > would you prefer ? > > P.S. mips uses uiomove_fromphys(), avoiding transient mapping, > and sparc allocates KVA when needed. Like this. diff --git a/sys/arm/arm/mem.c b/sys/arm/arm/mem.c index 30d4b1d..58b0d25 100644 --- a/sys/arm/arm/mem.c +++ b/sys/arm/arm/mem.c @@ -55,6 +55,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -72,6 +73,9 @@ MALLOC_DEFINE(M_MEMDESC, "memdesc", "memory range descriptors"); struct mem_range_softc mem_range_softc; +static struct sx tmppt_lock; +SX_SYSINIT(tmppt, &tmppt_lock, "mem4map"); + /* ARGSUSED */ int memrw(struct cdev *dev, struct uio *uio, int flags) @@ -107,6 +111,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags) } if (!address_valid) return (EINVAL); + sx_xlock(&tmppt_lock); pmap_kenter((vm_offset_t)_tmppt, v); o = (int)uio->uio_offset & PAGE_MASK; c = (u_int)(PAGE_SIZE - ((int)iov->iov_base & PAGE_MASK)); @@ -114,6 +119,7 @@ memrw(struct cdev *dev, struct uio *uio, int flags) c = min(c, (u_int)iov->iov_len); error = uiomove((caddr_t)&_tmppt[o], (int)c, uio); pmap_qremove((vm_offset_t)_tmppt, 1); + sx_xunlock(&tmppt_lock); continue; } else if (dev2unit(dev) == CDEV_MINOR_KMEM) { From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 16:21:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B5B07FB6; Sat, 24 Jan 2015 16:21:16 +0000 (UTC) Received: from smtp2.ore.mailhop.org (smtp2.ore.mailhop.org [54.186.57.195]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 948B41C0; Sat, 24 Jan 2015 16:21:16 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp2.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YF39G-0005T9-Tv; Sat, 24 Jan 2015 16:01:23 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0OG1LMX027462; Sat, 24 Jan 2015 09:01:21 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX18iK+Wh6yD0LjWl746IcYuo Message-ID: <1422115281.1038.57.camel@freebsd.org> Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 From: Ian Lepore To: Konstantin Belousov Date: Sat, 24 Jan 2015 09:01:21 -0700 In-Reply-To: <20150124154240.GV42409@kib.kiev.ua> References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 16:21:16 -0000 On Sat, 2015-01-24 at 17:42 +0200, Konstantin Belousov wrote: > On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: > > On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: > > > Author: kib > > > Date: Sat Jan 24 12:51:15 2015 > > > New Revision: 277643 > > > URL: https://svnweb.freebsd.org/changeset/base/277643 > > > > > > Log: > > > Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed > > > for i386, and from the code inspection, nothing in the > > > arm/mips/sparc64 implementations depends on it. > > > > > > > I'm not sure I agree with that. On arm the memrw() implementation uses > > a single statically-allocated page of kva space into which it maps each > > physical page in turn in the main loop. What prevents preemption or > > multicore access to /dev/mem from trying to use that single page for > > multiple operations at once? > > I see, thank you for noting this. > > But, I do not think that Giant is a solution for the problem. uiomove() > call accesses userspace, which may fault and cause sleep. If the > thread sleeps, the Giant is automatically dropped, so there is no real > protection. > > I think dump exclusive sx around whole memrw() should be enough. > > I can revert the commit for now, or I can leave it as is while > writing the patch with sx and waiting for somebody review. What > would you prefer ? > > P.S. mips uses uiomove_fromphys(), avoiding transient mapping, > and sparc allocates KVA when needed. I had planned to look into this today or tomorrow, so no need to revert. I'll study the other implementations and see what works well for arm. -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 16:59:39 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 18768724; Sat, 24 Jan 2015 16:59:39 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 053916AF; Sat, 24 Jan 2015 16:59:39 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OGxcxP071105; Sat, 24 Jan 2015 16:59:38 GMT (envelope-from rstone@FreeBSD.org) Received: (from rstone@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OGxcxC071104; Sat, 24 Jan 2015 16:59:38 GMT (envelope-from rstone@FreeBSD.org) Message-Id: <201501241659.t0OGxcxC071104@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: rstone set sender to rstone@FreeBSD.org using -f From: Ryan Stone Date: Sat, 24 Jan 2015 16:59:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277649 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 16:59:39 -0000 Author: rstone Date: Sat Jan 24 16:59:38 2015 New Revision: 277649 URL: https://svnweb.freebsd.org/changeset/base/277649 Log: vmspace_release() may sleep if the last reference is being released, so add a WITNESS_WARN() to catch cases where it is called with a non-sleepable lock held. MFC after: 1 month Sponsored by: Sandvine Inc. Modified: head/sys/vm/vm_map.c Modified: head/sys/vm/vm_map.c ============================================================================== --- head/sys/vm/vm_map.c Sat Jan 24 15:49:40 2015 (r277648) +++ head/sys/vm/vm_map.c Sat Jan 24 16:59:38 2015 (r277649) @@ -344,6 +344,9 @@ void vmspace_free(struct vmspace *vm) { + WITNESS_WARN(WARN_GIANTOK | WARN_SLEEPOK, NULL, + "vmspace_free() called with non-sleepable lock held"); + if (vm->vm_refcnt == 0) panic("vmspace_free: attempt to free already freed vmspace"); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 17:11:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0FD54983; Sat, 24 Jan 2015 17:11:12 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id F10137EC; Sat, 24 Jan 2015 17:11:11 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OHBB2h079587; Sat, 24 Jan 2015 17:11:11 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OHBB2C079586; Sat, 24 Jan 2015 17:11:11 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501241711.t0OHBB2C079586@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sat, 24 Jan 2015 17:11:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277650 - head/etc/mtree X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 17:11:12 -0000 Author: will Date: Sat Jan 24 17:11:11 2015 New Revision: 277650 URL: https://svnweb.freebsd.org/changeset/base/277650 Log: Add tests/etc/rc.d to mtree. Submitted by: stefanf MFC after: 1 week MFC with: 277627 Modified: head/etc/mtree/BSD.tests.dist Modified: head/etc/mtree/BSD.tests.dist ============================================================================== --- head/etc/mtree/BSD.tests.dist Sat Jan 24 16:59:38 2015 (r277649) +++ head/etc/mtree/BSD.tests.dist Sat Jan 24 17:11:11 2015 (r277650) @@ -52,6 +52,8 @@ .. .. etc + rc.d + .. .. games .. From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 17:32:46 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AE0D1D0B; Sat, 24 Jan 2015 17:32:46 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 819F0A34; Sat, 24 Jan 2015 17:32:46 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OHWkhc089057; Sat, 24 Jan 2015 17:32:46 GMT (envelope-from will@FreeBSD.org) Received: (from will@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OHWkD3089056; Sat, 24 Jan 2015 17:32:46 GMT (envelope-from will@FreeBSD.org) Message-Id: <201501241732.t0OHWkD3089056@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: will set sender to will@FreeBSD.org using -f From: Will Andrews Date: Sat, 24 Jan 2015 17:32:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277651 - head/sys/vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 17:32:46 -0000 Author: will Date: Sat Jan 24 17:32:45 2015 New Revision: 277651 URL: https://svnweb.freebsd.org/changeset/base/277651 Log: Add vm.panic_on_oom sysctl, which enables those who would rather panic than kill a process, when the system runs out of memory. Defaults to off. Usually, this is most useful when the OOM condition is due to mismanagement of memory, on a system where the applications in question don't respond well to being killed. In theory, if the system is properly managed, it shouldn't be possible to hit this condition. If it does, the panic can be more desirable for some users (since it can be a good means of finding the root cause) rather than killing the largest process and continuing on its merry way. As kib@ mentions in the differential, there is also protect(1), which uses procctl(PROC_SPROTECT) to ensure that some processes are immune. However, a panic approach is still useful in some environments. This is primarily intended as a development/debugging tool. Differential Revision: D1627 Reviewed by: kib MFC after: 1 week Modified: head/sys/vm/vm_pageout.c Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Sat Jan 24 17:11:11 2015 (r277650) +++ head/sys/vm/vm_pageout.c Sat Jan 24 17:32:45 2015 (r277651) @@ -180,6 +180,12 @@ static int vm_swap_enabled = 1; static int vm_swap_idle_enabled = 0; #endif +static int vm_panic_on_oom = 0; + +SYSCTL_INT(_vm, OID_AUTO, panic_on_oom, + CTLFLAG_RWTUN, &vm_panic_on_oom, 0, + "panic on out of memory instead of killing the largest process"); + SYSCTL_INT(_vm, OID_AUTO, pageout_wakeup_thresh, CTLFLAG_RW, &vm_pageout_wakeup_thresh, 0, "free page threshold for waking up the pageout daemon"); @@ -1585,6 +1591,8 @@ vm_pageout_oom(int shortage) } sx_sunlock(&allproc_lock); if (bigproc != NULL) { + if (vm_panic_on_oom != 0) + panic("out of swap space"); PROC_LOCK(bigproc); killproc(bigproc, "out of swap space"); sched_nice(bigproc, PRIO_MIN); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 18:33:10 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BD4E3BAE; Sat, 24 Jan 2015 18:33:10 +0000 (UTC) Received: from pp2.rice.edu (proofpoint2.mail.rice.edu [128.42.201.101]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7CE9FF81; Sat, 24 Jan 2015 18:33:09 +0000 (UTC) Received: from pps.filterd (pp2.rice.edu [127.0.0.1]) by pp2.rice.edu (8.14.5/8.14.5) with SMTP id t0OIWd7L021376; Sat, 24 Jan 2015 12:33:08 -0600 Received: from mh11.mail.rice.edu (mh11.mail.rice.edu [128.42.199.30]) by pp2.rice.edu with ESMTP id 1s3b7hrvft-1; Sat, 24 Jan 2015 12:33:08 -0600 X-Virus-Scanned: by amavis-2.7.0 at mh11.mail.rice.edu, auth channel Received: from 108-254-203-201.lightspeed.hstntx.sbcglobal.net (108-254-203-201.lightspeed.hstntx.sbcglobal.net [108.254.203.201]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh11.mail.rice.edu (Postfix) with ESMTPSA id 1B5E24C0282; Sat, 24 Jan 2015 12:33:08 -0600 (CST) Message-ID: <54C3E563.4070903@rice.edu> Date: Sat, 24 Jan 2015 12:33:07 -0600 From: Alan Cox User-Agent: Mozilla/5.0 (X11; FreeBSD i386; rv:31.0) Gecko/20100101 Thunderbird/31.3.0 MIME-Version: 1.0 To: Konstantin Belousov , Ian Lepore Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> In-Reply-To: <20150124154240.GV42409@kib.kiev.ua> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 suspectscore=3 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=7.0.1-1402240000 definitions=main-1501240198 Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 18:33:10 -0000 On 01/24/2015 09:42, Konstantin Belousov wrote: > On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: >> On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: >>> Author: kib >>> Date: Sat Jan 24 12:51:15 2015 >>> New Revision: 277643 >>> URL: https://svnweb.freebsd.org/changeset/base/277643 >>> >>> Log: >>> Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed >>> for i386, and from the code inspection, nothing in the >>> arm/mips/sparc64 implementations depends on it. >>> >> I'm not sure I agree with that. On arm the memrw() implementation uses >> a single statically-allocated page of kva space into which it maps each >> physical page in turn in the main loop. What prevents preemption or >> multicore access to /dev/mem from trying to use that single page for >> multiple operations at once? > I see, thank you for noting this. > > But, I do not think that Giant is a solution for the problem. uiomove() > call accesses userspace, which may fault and cause sleep. If the > thread sleeps, the Giant is automatically dropped, so there is no real > protection. > > I think dump exclusive sx around whole memrw() should be enough. > > I can revert the commit for now, or I can leave it as is while > writing the patch with sx and waiting for somebody review. What > would you prefer ? > > P.S. mips uses uiomove_fromphys(), avoiding transient mapping, > and sparc allocates KVA when needed. > > While we're here, it's worth noting that the arm version of /dev/mem is not functionally equivalent to that of amd64 or i386. Arm disallows access to non-DRAM addresses through /dev/mem. From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 18:53:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8993514; Sat, 24 Jan 2015 18:53:52 +0000 (UTC) Received: from smtp6.ore.mailhop.org (smtp6.ore.mailhop.org [54.149.35.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 669891B3; Sat, 24 Jan 2015 18:53:52 +0000 (UTC) Received: from [73.34.117.227] (helo=ilsoft.org) by smtp6.ore.mailhop.org with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82) (envelope-from ) id 1YF5q5-0001Ea-Vp; Sat, 24 Jan 2015 18:53:46 +0000 Received: from revolution.hippie.lan (revolution.hippie.lan [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t0OIrhSx028822; Sat, 24 Jan 2015 11:53:43 -0700 (MST) (envelope-from ian@freebsd.org) X-Mail-Handler: DuoCircle Outbound SMTP X-Originating-IP: 73.34.117.227 X-Report-Abuse-To: abuse@duocircle.com (see https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information for abuse reporting information) X-MHO-User: U2FsdGVkX1/8g6knC+8vHA0Y0eqVwyNl Message-ID: <1422125623.1038.68.camel@freebsd.org> Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 From: Ian Lepore To: Alan Cox Date: Sat, 24 Jan 2015 11:53:43 -0700 In-Reply-To: <54C3E563.4070903@rice.edu> References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> <54C3E563.4070903@rice.edu> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.8 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 18:53:52 -0000 On Sat, 2015-01-24 at 12:33 -0600, Alan Cox wrote: > On 01/24/2015 09:42, Konstantin Belousov wrote: > > On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: > >> On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: > >>> Author: kib > >>> Date: Sat Jan 24 12:51:15 2015 > >>> New Revision: 277643 > >>> URL: https://svnweb.freebsd.org/changeset/base/277643 > >>> > >>> Log: > >>> Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed > >>> for i386, and from the code inspection, nothing in the > >>> arm/mips/sparc64 implementations depends on it. > >>> > >> I'm not sure I agree with that. On arm the memrw() implementation uses > >> a single statically-allocated page of kva space into which it maps each > >> physical page in turn in the main loop. What prevents preemption or > >> multicore access to /dev/mem from trying to use that single page for > >> multiple operations at once? > > I see, thank you for noting this. > > > > But, I do not think that Giant is a solution for the problem. uiomove() > > call accesses userspace, which may fault and cause sleep. If the > > thread sleeps, the Giant is automatically dropped, so there is no real > > protection. > > > > I think dump exclusive sx around whole memrw() should be enough. > > > > I can revert the commit for now, or I can leave it as is while > > writing the patch with sx and waiting for somebody review. What > > would you prefer ? > > > > P.S. mips uses uiomove_fromphys(), avoiding transient mapping, > > and sparc allocates KVA when needed. > > > > > > While we're here, it's worth noting that the arm version of /dev/mem is > not functionally equivalent to that of amd64 or i386. Arm disallows > access to non-DRAM addresses through /dev/mem. That's true for the read/write interface, but not for mmap(). In fact, we have users insisting that mmap() on /dev/mem should provide userland access to memory-mapped devices, and we have ARM architecture rules that say you can't map the same physical address multiple times with different attributes, such as being Device memory in the kernel and Strongly Ordered when mapped into userland. But if the memory isn't mapped S-O for userland, they have no hope of usefully accessing the devices (because they don't have access to cache and buffer maintenance). Even "normal" memory has a variety of attributes that make the temporary mappings done in memrw() a bit iffy, although I'm not sure we're doing anything right now that could lead to trouble. Trouble lurks though if we ever start using some of the more subtle features of the arm memory architecture, such as turning off the sharable attribute on pages that are inherently per-cpu to avoid the overhead of hardware cache coherence when we know only one core can access the pages. -- Ian From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 19:13:05 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 60DCD6A5; Sat, 24 Jan 2015 19:13:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4C9423A0; Sat, 24 Jan 2015 19:13:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OJD5Vb039194; Sat, 24 Jan 2015 19:13:05 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OJD4xT039188; Sat, 24 Jan 2015 19:13:04 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201501241913.t0OJD4xT039188@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 24 Jan 2015 19:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277652 - in head/usr.sbin/pw: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 19:13:05 -0000 Author: bapt Date: Sat Jan 24 19:13:03 2015 New Revision: 277652 URL: https://svnweb.freebsd.org/changeset/base/277652 Log: Allow negative numbers in -u and -g options PR: 196514 MFC after: 1 week Added: head/usr.sbin/pw/tests/pw_groupshow.sh (contents, props changed) head/usr.sbin/pw/tests/pw_usershow.sh (contents, props changed) Modified: head/usr.sbin/pw/pw_group.c head/usr.sbin/pw/pw_user.c head/usr.sbin/pw/tests/Makefile Modified: head/usr.sbin/pw/pw_group.c ============================================================================== --- head/usr.sbin/pw/pw_group.c Sat Jan 24 17:32:45 2015 (r277651) +++ head/usr.sbin/pw/pw_group.c Sat Jan 24 19:13:03 2015 (r277652) @@ -68,7 +68,11 @@ pw_group(struct userconf * cnf, int mode }; if (a_gid != NULL) { - if (strspn(a_gid->val, "0123456789") != strlen(a_gid->val)) + const char *teststr; + teststr = a_gid->val; + if (*teststr == '-') + teststr++; + if (strspn(teststr, "0123456789") != strlen(teststr)) errx(EX_USAGE, "-g expects a number"); } Modified: head/usr.sbin/pw/pw_user.c ============================================================================== --- head/usr.sbin/pw/pw_user.c Sat Jan 24 17:32:45 2015 (r277651) +++ head/usr.sbin/pw/pw_user.c Sat Jan 24 19:13:03 2015 (r277652) @@ -322,7 +322,10 @@ pw_user(struct userconf * cnf, int mode, a_name = NULL; } } else { - if (strspn(a_uid->val, "0123456789") != strlen(a_uid->val)) + const char *teststr = a_uid->val; + if (*teststr == '-') + teststr++; + if (strspn(teststr, "0123456789") != strlen(teststr)) errx(EX_USAGE, "-u expects a number"); } Modified: head/usr.sbin/pw/tests/Makefile ============================================================================== --- head/usr.sbin/pw/tests/Makefile Sat Jan 24 17:32:45 2015 (r277651) +++ head/usr.sbin/pw/tests/Makefile Sat Jan 24 19:13:03 2015 (r277652) @@ -9,9 +9,11 @@ ATF_TESTS_SH= pw_etcdir \ pw_lock \ pw_groupdel \ pw_groupmod \ + pw_groupshow \ pw_useradd \ pw_userdel \ - pw_usermod + pw_usermod \ + pw_usershow .for tp in ${ATF_TESTS_SH} TEST_METADATA.${tp}+= required_user="root" Added: head/usr.sbin/pw/tests/pw_groupshow.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_groupshow.sh Sat Jan 24 19:13:03 2015 (r277652) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + + +# Test negative uid are still valid +# PR: 196514 +atf_test_case show_group_with_negative_number +show_group_with_negative_number_body() { + populate_etc_skel + atf_check -s exit:0 \ + -o inline:"wheel:*:0:root\n" \ + ${PW} groupshow -n wheel -g -1 +} + +atf_init_test_cases() { + atf_add_test_case show_group_with_negative_number +} Added: head/usr.sbin/pw/tests/pw_usershow.sh ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/usr.sbin/pw/tests/pw_usershow.sh Sat Jan 24 19:13:03 2015 (r277652) @@ -0,0 +1,19 @@ +# $FreeBSD$ + +# Import helper functions +. $(atf_get_srcdir)/helper_functions.shin + + +# Test negative uid are still valid +# PR: 196514 +atf_test_case show_user_with_negative_number +show_user_with_negative_number_body() { + populate_etc_skel + atf_check -s exit:0 \ + -o inline:"root:*:0:0::0:0:Charlie &:/root:/bin/csh\n" \ + ${PW} usershow -n root -u -1 +} + +atf_init_test_cases() { + atf_add_test_case show_user_with_negative_number +} From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 19:27:48 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 521A7B61; Sat, 24 Jan 2015 19:27:48 +0000 (UTC) Received: from mail-pa0-x231.google.com (mail-pa0-x231.google.com [IPv6:2607:f8b0:400e:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1C89668E; Sat, 24 Jan 2015 19:27:48 +0000 (UTC) Received: by mail-pa0-f49.google.com with SMTP id fa1so3741093pad.8; Sat, 24 Jan 2015 11:27:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=FxM8tyfjVWQYeAek09eDEOMkYLFKcnjLUQcYSs+TgCA=; b=MSEklTIYx4Hy1copbKvCd4cnbfvDY1P47sC3tKixmi+ll6J3KKrNgDDVegNEGnuWZ/ Qu1TM5QfSiZDBoKlSefHON8HT+VxqgW16sIcATYBIlTOZQ1eW/kdYo00rtrJxa5U6kOP BNaApHHXPu2IrztWNBwtJj/6GvG9+k63zxYg+hjSUW+34esK6WA8JvZl7YEkAw8ui+el NkkwPn0aDU1NNREKGbBV8utAQQgkcFSNH84l2TG7Ne1m3r2P0Y+8rXRGkBBTJeC7ICWo N1p0HAkzC13uL2ebUMBCPe9a+mYFGFjg8NK5bSP5/ndV8BLjEOB1X6/aWxdkDBSYva3J xKpg== X-Received: by 10.68.226.69 with SMTP id rq5mr21970833pbc.116.1422127667583; Sat, 24 Jan 2015 11:27:47 -0800 (PST) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id kr10sm5503540pdb.42.2015.01.24.11.27.46 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 Jan 2015 11:27:46 -0800 (PST) References: <201501241549.t0OFnfHK037939@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201501241549.t0OFnfHK037939@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (12B440) From: Garrett Cooper Subject: Re: svn commit: r277648 - in head: contrib/netbsd-tests/lib/libc/c063 lib/libc/tests/c063 Date: Sat, 24 Jan 2015 11:27:45 -0800 To: Jilles Tjoelker Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 19:27:48 -0000 > On Jan 24, 2015, at 07:49, Jilles Tjoelker wrote: >=20 > Author: jilles > Date: Sat Jan 24 15:49:40 2015 > New Revision: 277648 > URL: https://svnweb.freebsd.org/changeset/base/277648 >=20 > Log: > Enable utimensat tests from NetBSD. >=20 > As with other tests from c063, a required #include was missi= ng. >=20 > Modified: > head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c > head/lib/libc/tests/c063/Makefile >=20 > Modified: head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D > --- head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Jan 24 15= :40:52 2015 (r277647) > +++ head/contrib/netbsd-tests/lib/libc/c063/t_utimensat.c Sat Jan 24 15= :49:40 2015 (r277648) > @@ -40,6 +40,9 @@ __RCSID("$NetBSD: t_utimensat.c,v 1.5 20 > #include > #include > #include > +#ifdef __FreeBSD__ > +#include > +#endif > #include >=20 > #define DIR "dir" Thanks jilles!= From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 19:34:12 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C436DD33; Sat, 24 Jan 2015 19:34:12 +0000 (UTC) Received: from mail-pa0-x22f.google.com (mail-pa0-x22f.google.com [IPv6:2607:f8b0:400e:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8FE6A7B8; Sat, 24 Jan 2015 19:34:12 +0000 (UTC) Received: by mail-pa0-f47.google.com with SMTP id lj1so3770313pab.6; Sat, 24 Jan 2015 11:34:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=6QqjdjotDJ0ig3AlBdasUbYmTCveORG6OJjAq2pcpPM=; b=kNdg7yxAy73vIJvPvTD7wQPlj868bXoDf1z157V019LIOkYBwTVAuIaP7+JILWV3Nz niGML9kvZicfoTWqx5Y2ScbjiZB97XlGQhwBJx1f066/qiOeO3CaptwaPtL7jeNsjVnU GWu4NxYes27xHsGrsELwztZgVVDYzCNOgHxe6Sm/acyJyQOtstFYXHD+Oo4oB0CRQR/5 SCIryw0UD4PldvEzu+4tKuvrVHqtVmxZSAAjrY22SOI22EseL4APsbn0AqP6c3hjvPRs fmJx1N6KwmNk61rMsk3mULWRTsT76v3A1NhDx3qlIbs2s0JU4btnFESF3lxx2bgZ5d1L oMfw== X-Received: by 10.70.103.5 with SMTP id fs5mr22163297pdb.16.1422128051886; Sat, 24 Jan 2015 11:34:11 -0800 (PST) Received: from [192.168.20.11] (c-98-247-240-204.hsd1.wa.comcast.net. [98.247.240.204]) by mx.google.com with ESMTPSA id kl11sm5466056pbd.89.2015.01.24.11.34.11 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 Jan 2015 11:34:11 -0800 (PST) References: <201501241732.t0OHWkD3089056@svn.freebsd.org> Mime-Version: 1.0 (1.0) In-Reply-To: <201501241732.t0OHWkD3089056@svn.freebsd.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Message-Id: X-Mailer: iPhone Mail (12B440) From: Garrett Cooper Subject: Re: svn commit: r277651 - head/sys/vm Date: Sat, 24 Jan 2015 11:34:10 -0800 To: Will Andrews Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 19:34:12 -0000 > On Janc 24, 2015, at 09:32, Will Andrews wrote: >=20 > Author: will > Date: Sat Jan 24 17:32:45 2015 > New Revision: 277651 > URL: https://svnweb.freebsd.org/changeset/base/277651 >=20 > Log: > Add vm.panic_on_oom sysctl, which enables those who would rather panic th= an > kill a process, when the system runs out of memory. Defaults to off. >=20 > Usually, this is most useful when the OOM condition is due to mismanageme= nt > of memory, on a system where the applications in question don't respond w= ell > to being killed. >=20 > In theory, if the system is properly managed, it shouldn't be possible to= > hit this condition. If it does, the panic can be more desirable for some > users (since it can be a good means of finding the root cause) rather tha= n > killing the largest process and continuing on its merry way. >=20 > As kib@ mentions in the differential, there is also protect(1), which use= s > procctl(PROC_SPROTECT) to ensure that some processes are immune. However= , > a panic approach is still useful in some environments. This is primarily= > intended as a development/debugging tool. Hi Will! Could you please add a kernel option to set the default from 0 to 1, or p= rovide a tunable so the value could be set in loader.conf? Thanks!= From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 19:49:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 6EA432D8; Sat, 24 Jan 2015 19:49:28 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5A55C8E8; Sat, 24 Jan 2015 19:49:28 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OJnSuW054827; Sat, 24 Jan 2015 19:49:28 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OJnSCI054826; Sat, 24 Jan 2015 19:49:28 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201501241949.t0OJnSCI054826@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Sat, 24 Jan 2015 19:49:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277653 - head/sys/dev/netmap X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 19:49:28 -0000 Author: adrian Date: Sat Jan 24 19:49:27 2015 New Revision: 277653 URL: https://svnweb.freebsd.org/changeset/base/277653 Log: Change the permissions from 0660 to 0600. Otherwise people in wheel can do things with netmap, including but not limited to promisc transmit/receive. Approved by: luigi MFC after: 1 week Modified: head/sys/dev/netmap/netmap.c Modified: head/sys/dev/netmap/netmap.c ============================================================================== --- head/sys/dev/netmap/netmap.c Sat Jan 24 19:13:03 2015 (r277652) +++ head/sys/dev/netmap/netmap.c Sat Jan 24 19:49:27 2015 (r277653) @@ -3075,10 +3075,10 @@ netmap_init(void) #ifdef __FreeBSD__ /* support for the 'eternal' flag */ netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, - &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0660, + &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, "netmap"); #else - netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0660, + netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, "netmap"); #endif if (!netmap_dev) From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 19:50:28 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3DD3C41A; Sat, 24 Jan 2015 19:50:28 +0000 (UTC) Received: from elvis.mu.org (elvis.mu.org [IPv6:2001:470:1f05:b76::196]) by mx1.freebsd.org (Postfix) with ESMTP id 2A91F8F1; Sat, 24 Jan 2015 19:50:28 +0000 (UTC) Received: from AlfredMacbookAir.local (c-76-21-10-192.hsd1.ca.comcast.net [76.21.10.192]) by elvis.mu.org (Postfix) with ESMTPSA id D4F71341F85E; Sat, 24 Jan 2015 11:50:27 -0800 (PST) Message-ID: <54C3F7F1.90808@freebsd.org> Date: Sat, 24 Jan 2015 11:52:17 -0800 From: Alfred Perlstein Organization: FreeBSD User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r277653 - head/sys/dev/netmap References: <201501241949.t0OJnSCI054826@svn.freebsd.org> In-Reply-To: <201501241949.t0OJnSCI054826@svn.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 19:50:28 -0000 Wasn't this pointed out by James K? On 1/24/15 11:49 AM, Adrian Chadd wrote: > Author: adrian > Date: Sat Jan 24 19:49:27 2015 > New Revision: 277653 > URL: https://svnweb.freebsd.org/changeset/base/277653 > > Log: > Change the permissions from 0660 to 0600. > > Otherwise people in wheel can do things with netmap, including > but not limited to promisc transmit/receive. > > Approved by: luigi > MFC after: 1 week > > Modified: > head/sys/dev/netmap/netmap.c > > Modified: head/sys/dev/netmap/netmap.c > ============================================================================== > --- head/sys/dev/netmap/netmap.c Sat Jan 24 19:13:03 2015 (r277652) > +++ head/sys/dev/netmap/netmap.c Sat Jan 24 19:49:27 2015 (r277653) > @@ -3075,10 +3075,10 @@ netmap_init(void) > #ifdef __FreeBSD__ > /* support for the 'eternal' flag */ > netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, > - &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0660, > + &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, > "netmap"); > #else > - netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0660, > + netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600, > "netmap"); > #endif > if (!netmap_dev) > From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 20:16:35 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 90553C17; Sat, 24 Jan 2015 20:16:35 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7BC33B7F; Sat, 24 Jan 2015 20:16:35 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OKGZAg069007; Sat, 24 Jan 2015 20:16:35 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OKGZkl069006; Sat, 24 Jan 2015 20:16:35 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501242016.t0OKGZkl069006@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 24 Jan 2015 20:16:35 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277654 - vendor/gdb/dist/gdb X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 20:16:35 -0000 Author: pfg Date: Sat Jan 24 20:16:34 2015 New Revision: 277654 URL: https://svnweb.freebsd.org/changeset/base/277654 Log: gdb: Add missing break statements 2004-05-21 Jim Blandy * dwarf2expr.c (execute_stack_op): Add 'break' statements after cases for DW_OP_div and DW_OP_shr. (Thanks to Reva Cuthbertson.) Sourceware commit 99c87dab95747d380392a3698740507a21ad3236 Modified: vendor/gdb/dist/gdb/dwarf2expr.c Modified: vendor/gdb/dist/gdb/dwarf2expr.c ============================================================================== --- vendor/gdb/dist/gdb/dwarf2expr.c Sat Jan 24 19:49:27 2015 (r277653) +++ vendor/gdb/dist/gdb/dwarf2expr.c Sat Jan 24 20:16:34 2015 (r277654) @@ -575,6 +575,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_div: binop = BINOP_DIV; + break; case DW_OP_minus: binop = BINOP_SUB; break; @@ -595,6 +596,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_shr: binop = BINOP_RSH; + break; case DW_OP_shra: binop = BINOP_RSH; val1 = value_from_longest (signed_address_type (), first); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 20:18:31 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C0A3AE4D for ; Sat, 24 Jan 2015 20:18:31 +0000 (UTC) Received: from mail-ie0-f172.google.com (mail-ie0-f172.google.com [209.85.223.172]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 869F3B96 for ; Sat, 24 Jan 2015 20:18:31 +0000 (UTC) Received: by mail-ie0-f172.google.com with SMTP id rd18so2886152iec.3 for ; Sat, 24 Jan 2015 12:18:24 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-type:content-disposition :in-reply-to:user-agent; bh=g35Dlg0p67k34RbuLlNOUuUICGCp6nTcTDIHFCP2yzc=; b=VJ99PdxP+zsHrwqUNjs7Zi98Edkx65WhNEpC6biNvj1WrO5i42gsGGY2Mr/seZRm24 dgjaNqyEvcgWpZjKyUIwbyDVcMFmsPtdKk4oA8F9qlgJBxSPZ3/WsUnWtkQP66bb4J7c 3GqXWZs4gBmyPXeqexJipBBDwqhGUNJskou+vDMpPA6jrywL6FlxL+BaP/nmKXJM3VUm O6pkaTwalwOxMrI2zhtX3hf2GtbbvLCNj91s0C1jXgODU80f/WY1EQS4UqzHHLbTvIbi +VixINj7SjPz0hmYQyLgBhqTyy62A+LqJoZg5ilCXipjDzg4Uf7BYb+/iwF9wWfVGS/4 spxA== X-Gm-Message-State: ALoCoQn6pi+8GvaEd1CLtVPLcuw2u4a5IcbjnsicKXTfm+5Gh/C04SwzRQ0Sv0yh4xqTo2+QPDpv X-Received: by 10.42.169.197 with SMTP id c5mr14128475icz.72.1422130704508; Sat, 24 Jan 2015 12:18:24 -0800 (PST) Received: from sol.firepipe.net (c-50-183-92-30.hsd1.co.comcast.net. [50.183.92.30]) by mx.google.com with ESMTPSA id m10sm3122758ioi.28.2015.01.24.12.18.23 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Jan 2015 12:18:23 -0800 (PST) Sender: Will Andrews Date: Sat, 24 Jan 2015 13:18:22 -0700 From: Will Andrews To: Garrett Cooper Subject: Re: svn commit: r277651 - head/sys/vm Message-ID: <20150124201820.GD57177@sol.firepipe.net> References: <201501241732.t0OHWkD3089056@svn.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bajzpZikUji1w+G9" Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 20:18:31 -0000 --bajzpZikUji1w+G9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 24, 2015 at 11:34:10AM -0800, Garrett Cooper wrote: > Could you please add a kernel option to set the default from > 0 to 1, or provide a tunable so the value could be set in loader.conf? Hi Garrett, The sysctl is configured as a CTLFLAG_RWTUN, so it can be configured in loader.conf or sysctl.conf already. I don't see a need for an option. --=20 wca --bajzpZikUji1w+G9 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iEYEARECAAYFAlTD/gsACgkQF47idPgWcsUheACfe++B/f2Uggp9Zvm7oztfX6cB foQAmwcz3zdh/jjIVdOrhj85BEHQN+PT =Xrp9 -----END PGP SIGNATURE----- --bajzpZikUji1w+G9-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 20:18:38 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 742E0F6B; Sat, 24 Jan 2015 20:18:38 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60421B9B; Sat, 24 Jan 2015 20:18:38 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OKIcBM069294; Sat, 24 Jan 2015 20:18:38 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OKIc1o069293; Sat, 24 Jan 2015 20:18:38 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201501242018.t0OKIc1o069293@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 24 Jan 2015 20:18:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277655 - head/sys/dev/fdt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 20:18:38 -0000 Author: ian Date: Sat Jan 24 20:18:37 2015 New Revision: 277655 URL: https://svnweb.freebsd.org/changeset/base/277655 Log: Reimplement fdt_clock_register_provider() correctly. It turns out you can't use OF_xref_from_device() to implement the function that registers the xref association with the device. Pointy hat: ian Submitted by: loos Modified: head/sys/dev/fdt/fdt_clock.c Modified: head/sys/dev/fdt/fdt_clock.c ============================================================================== --- head/sys/dev/fdt/fdt_clock.c Sat Jan 24 20:16:34 2015 (r277654) +++ head/sys/dev/fdt/fdt_clock.c Sat Jan 24 20:18:37 2015 (r277655) @@ -149,7 +149,8 @@ void fdt_clock_register_provider(device_t provider) { - OF_device_register_xref(OF_xref_from_device(provider), provider); + OF_device_register_xref( + OF_xref_from_node(ofw_bus_get_node(provider)), provider); } void From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 20:21:15 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 96DDB154; Sat, 24 Jan 2015 20:21:15 +0000 (UTC) Received: from c.mail.sonic.net (c.mail.sonic.net [64.142.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 74F6BC42; Sat, 24 Jan 2015 20:21:15 +0000 (UTC) Received: from zeppelin.tachypleus.net (polaris.tachypleus.net [75.101.50.44]) (authenticated bits=0) by c.mail.sonic.net (8.14.9/8.14.9) with ESMTP id t0OKL5Io016166 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Sat, 24 Jan 2015 12:21:06 -0800 Message-ID: <54C3FEB1.5020808@freebsd.org> Date: Sat, 24 Jan 2015 12:21:05 -0800 From: Nathan Whitehorn User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: Ian Lepore , Alan Cox Subject: Re: svn commit: r277643 - in head/sys: arm/arm dev/mem i386/i386 mips/mips sparc64/sparc64 References: <201501241251.t0OCpGa8053192@svn.freebsd.org> <1422111397.1038.53.camel@freebsd.org> <20150124154240.GV42409@kib.kiev.ua> <54C3E563.4070903@rice.edu> <1422125623.1038.68.camel@freebsd.org> In-Reply-To: <1422125623.1038.68.camel@freebsd.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Sonic-CAuth: UmFuZG9tSVbyUfPry+xI+SjU5ef9Y5120FqyWUK8x98idyvBpxDidr1sqMj0007Kv1rJVfzIdRgo51RzJzpnLTUNiNla1VnObpGuC0lQOfA= X-Sonic-ID: C;BFUmhgak5BGeL6nrCx1YGw== M;Whubhgak5BGeL6nrCx1YGw== X-Spam-Flag: No X-Sonic-Spam-Details: 0.0/5.0 by cerberusd Cc: Konstantin Belousov , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 20:21:15 -0000 On 01/24/15 10:53, Ian Lepore wrote: > On Sat, 2015-01-24 at 12:33 -0600, Alan Cox wrote: >> On 01/24/2015 09:42, Konstantin Belousov wrote: >>> On Sat, Jan 24, 2015 at 07:56:37AM -0700, Ian Lepore wrote: >>>> On Sat, 2015-01-24 at 12:51 +0000, Konstantin Belousov wrote: >>>>> Author: kib >>>>> Date: Sat Jan 24 12:51:15 2015 >>>>> New Revision: 277643 >>>>> URL: https://svnweb.freebsd.org/changeset/base/277643 >>>>> >>>>> Log: >>>>> Remove Giant from /dev/mem and /dev/kmem. It is definitely not needed >>>>> for i386, and from the code inspection, nothing in the >>>>> arm/mips/sparc64 implementations depends on it. >>>>> >>>> I'm not sure I agree with that. On arm the memrw() implementation uses >>>> a single statically-allocated page of kva space into which it maps each >>>> physical page in turn in the main loop. What prevents preemption or >>>> multicore access to /dev/mem from trying to use that single page for >>>> multiple operations at once? >>> I see, thank you for noting this. >>> >>> But, I do not think that Giant is a solution for the problem. uiomove() >>> call accesses userspace, which may fault and cause sleep. If the >>> thread sleeps, the Giant is automatically dropped, so there is no real >>> protection. >>> >>> I think dump exclusive sx around whole memrw() should be enough. >>> >>> I can revert the commit for now, or I can leave it as is while >>> writing the patch with sx and waiting for somebody review. What >>> would you prefer ? >>> >>> P.S. mips uses uiomove_fromphys(), avoiding transient mapping, >>> and sparc allocates KVA when needed. >>> >>> >> While we're here, it's worth noting that the arm version of /dev/mem is >> not functionally equivalent to that of amd64 or i386. Arm disallows >> access to non-DRAM addresses through /dev/mem. > That's true for the read/write interface, but not for mmap(). In fact, > we have users insisting that mmap() on /dev/mem should provide userland > access to memory-mapped devices, and we have ARM architecture rules that > say you can't map the same physical address multiple times with > different attributes, such as being Device memory in the kernel and > Strongly Ordered when mapped into userland. But if the memory isn't > mapped S-O for userland, they have no hope of usefully accessing the > devices (because they don't have access to cache and buffer > maintenance). > > Even "normal" memory has a variety of attributes that make the temporary > mappings done in memrw() a bit iffy, although I'm not sure we're doing > anything right now that could lead to trouble. Trouble lurks though if > we ever start using some of the more subtle features of the arm memory > architecture, such as turning off the sharable attribute on pages that > are inherently per-cpu to avoid the overhead of hardware cache coherence > when we know only one core can access the pages. sparc64 also does not allow mmap() of device memory through /dev/mem for this reason. This leads to a whole bunch of #ifdef in X drivers. -Nathan From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 20:25:22 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id BE3132BE; Sat, 24 Jan 2015 20:25:22 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A986AC62; Sat, 24 Jan 2015 20:25:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OKPMbh073666; Sat, 24 Jan 2015 20:25:22 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OKPM1p073665; Sat, 24 Jan 2015 20:25:22 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501242025.t0OKPM1p073665@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 24 Jan 2015 20:25:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277656 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 20:25:22 -0000 Author: pfg Date: Sat Jan 24 20:25:21 2015 New Revision: 277656 URL: https://svnweb.freebsd.org/changeset/base/277656 Log: MFV: r277654 gdb: Add missing break statements 2004-05-21 Jim Blandy * dwarf2expr.c (execute_stack_op): Add 'break' statements after cases for DW_OP_div and DW_OP_shr. (Thanks to Reva Cuthbertson.) Sourceware commit 99c87dab95747d380392a3698740507a21ad3236 CID: 1008254 MFC after: 4 days Modified: head/contrib/gdb/gdb/dwarf2expr.c Directory Properties: head/contrib/gdb/ (props changed) Modified: head/contrib/gdb/gdb/dwarf2expr.c ============================================================================== --- head/contrib/gdb/gdb/dwarf2expr.c Sat Jan 24 20:18:37 2015 (r277655) +++ head/contrib/gdb/gdb/dwarf2expr.c Sat Jan 24 20:25:21 2015 (r277656) @@ -575,6 +575,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_div: binop = BINOP_DIV; + break; case DW_OP_minus: binop = BINOP_SUB; break; @@ -595,6 +596,7 @@ execute_stack_op (struct dwarf_expr_cont break; case DW_OP_shr: binop = BINOP_RSH; + break; case DW_OP_shra: binop = BINOP_RSH; val1 = value_from_longest (signed_address_type (), first); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 20:27:33 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 02ADA40C; Sat, 24 Jan 2015 20:27:33 +0000 (UTC) Received: from mail-pd0-x230.google.com (mail-pd0-x230.google.com [IPv6:2607:f8b0:400e:c02::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BBCBCC73; Sat, 24 Jan 2015 20:27:32 +0000 (UTC) Received: by mail-pd0-f176.google.com with SMTP id y10so4349597pdj.7; Sat, 24 Jan 2015 12:27:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=3KcHtZxUJJF6A2j0kY126/SGaoT83fh9XcFgYh+yIr0=; b=FeyB/fvsgBGju1vXQlZO4f21o7ThN2SbSkaGoFE4Bg8C7mIKcMB+kFg+5gPG5HWYQR 8jR4VuxlLy88gPGdGrYbmZUSngIwc7t/vGoKwcWf39+/LigMpMjXymNfPYVsSwSSCpyw nXgBv87mXBVtWhhEXDmbI5slg/UJnwUc8nzhk1OYZ3eIEz1wLqJBPkDGKYWJaFxP/0G5 +5gR1waLRRJHkNZgQbfjNtyXA+BHdb4EwFkk/XJIYw+0lvuB22X43CekPmSqfC+p/ns6 TGl60hWht6ItZQSz9lSRIQawn8hs83rp93LiR4jUMnear/DCalKSfboSckR0FGGUcnv6 JSyg== X-Received: by 10.68.202.98 with SMTP id kh2mr22342243pbc.6.1422131252267; Sat, 24 Jan 2015 12:27:32 -0800 (PST) Received: from ?IPv6:2601:8:ab80:7d6:d4ec:854d:6b4d:4d67? ([2601:8:ab80:7d6:d4ec:854d:6b4d:4d67]) by mx.google.com with ESMTPSA id kp1sm5563062pbd.54.2015.01.24.12.27.31 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 24 Jan 2015 12:27:31 -0800 (PST) Content-Type: multipart/signed; boundary="Apple-Mail=_02029983-C99A-40C6-A56A-77CE2DF96B11"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: svn commit: r277651 - head/sys/vm From: Garrett Cooper In-Reply-To: <20150124201820.GD57177@sol.firepipe.net> Date: Sat, 24 Jan 2015 12:27:29 -0800 Message-Id: <22E1D4B7-D83F-4D62-8C28-3473E98AE6BC@gmail.com> References: <201501241732.t0OHWkD3089056@svn.freebsd.org> <20150124201820.GD57177@sol.firepipe.net> To: Will Andrews X-Mailer: Apple Mail (2.1878.6) Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 20:27:33 -0000 --Apple-Mail=_02029983-C99A-40C6-A56A-77CE2DF96B11 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=windows-1252 On Jan 24, 2015, at 12:18, Will Andrews wrote: > On Sat, Jan 24, 2015 at 11:34:10AM -0800, Garrett Cooper wrote: >> Could you please add a kernel option to set the default from >> 0 to 1, or provide a tunable so the value could be set in = loader.conf? >=20 > Hi Garrett, >=20 > The sysctl is configured as a CTLFLAG_RWTUN, so it can be configured = in > loader.conf or sysctl.conf already. I don't see a need for an option. Ah, missed that part of the diff =97 carry on :). Thanks! --Apple-Mail=_02029983-C99A-40C6-A56A-77CE2DF96B11 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQEcBAEBCgAGBQJUxAAyAAoJEMZr5QU6S73esGkH/2T/SIs6Xv7WLHs4+pfgppgO SKO9UXg3hfZPR5oboK4g9IzqkBH6QRSAqoEMJVUsA5rQ87GaBCAbzfho75lZp7zt eCRmopr/q4nJF4ylKKmu0Zy9juWn4nmmrw5m1kp11A78h43JGX/Vu9/MFOIFyAxb RTrv/4h3xreZ5XgCCqZy+qsGoHgqy4weViWFJID1VDjJGbKGBSP3CTKwyJ2lwt7O 1kZ5Rp4Ycs+1W94tUFB9fVeYJ2+5+DEp4VwOvKt3jpQIHmZhh60FgU3tWu+zOMxG ULZ5FVkFScPKsf/uBhDIGNSSpuWuGW4zqk4Y142muRuA7pYbYeDNk2lbpLiLJyQ= =yITB -----END PGP SIGNATURE----- --Apple-Mail=_02029983-C99A-40C6-A56A-77CE2DF96B11-- From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 21:00:52 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A88DFDB; Sat, 24 Jan 2015 21:00:52 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 93FBFF31; Sat, 24 Jan 2015 21:00:52 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OL0qXk090868; Sat, 24 Jan 2015 21:00:52 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OL0q1g090867; Sat, 24 Jan 2015 21:00:52 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501242100.t0OL0q1g090867@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 24 Jan 2015 21:00:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r277658 - vendor/gdb/dist/gdb X-SVN-Group: vendor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 21:00:52 -0000 Author: pfg Date: Sat Jan 24 21:00:51 2015 New Revision: 277658 URL: https://svnweb.freebsd.org/changeset/base/277658 Log: GDB: Replace use of sprintf. 2005-03-17 Mark Kettenis * corelow.c (get_core_register_section): Replace usage of sprintf and strcpy with xstrprintf and xstrdup. Sourceware commit: 3ecda4574edb38ad12fb491ccaf6d9b0caa3a07a Modified: vendor/gdb/dist/gdb/corelow.c Modified: vendor/gdb/dist/gdb/corelow.c ============================================================================== --- vendor/gdb/dist/gdb/corelow.c Sat Jan 24 20:34:15 2015 (r277657) +++ vendor/gdb/dist/gdb/corelow.c Sat Jan 24 21:00:51 2015 (r277658) @@ -432,15 +432,16 @@ get_core_register_section (char *name, char *human_name, int required) { - char section_name[100]; + static char *section_name = NULL; struct bfd_section *section; bfd_size_type size; char *contents; + xfree (section_name); if (PIDGET (inferior_ptid)) - sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid)); + section_name = xstrprintf ("%s/%d", name, PIDGET (inferior_ptid)); else - strcpy (section_name, name); + section_name = xstrdup (name); section = bfd_get_section_by_name (core_bfd, section_name); if (! section) From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 21:04:16 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 15228217; Sat, 24 Jan 2015 21:04:16 +0000 (UTC) Received: from mail-ie0-x231.google.com (mail-ie0-x231.google.com [IPv6:2607:f8b0:4001:c03::231]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id CF242FCE; Sat, 24 Jan 2015 21:04:15 +0000 (UTC) Received: by mail-ie0-f177.google.com with SMTP id vy18so2957567iec.8; Sat, 24 Jan 2015 13:04:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=ANP9sepwb63CGc6xLerlFzacynRbq72cH7vMS7TnWsU=; b=Mtm7/tyb7U5edCJRB/OUeCt1tnKqIhUQyXSrmdlElx7oxjtc4IUfNIgAmpsNexHyaC BMlteVEyrD46qtLt3OIRUgI7jQcuCjoTcvdfEhT2ysNxsWNSl1iNoeSFq4piXk3ROtYz ePQCfbDBZoEoLcAgDIxRdgB+CIKpSLdRYzDUNJ7ZAuei1FReaDQmzMlo40HptmbfMxnH /Bi4M036FKQ+R8k83fOkYSfaCZEmDQ52Sn3IuCJWNeqDSkD42lvCpZNh6thaFYIugJr3 sZCbjYvFwbpMtdZagFAb3UUKpLo6cS37IyqEZz5Jwa5P90tRmr2jYeymZGjTucj/7k5w YA6Q== MIME-Version: 1.0 X-Received: by 10.107.136.158 with SMTP id s30mr10653656ioi.8.1422133455261; Sat, 24 Jan 2015 13:04:15 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.78.14 with HTTP; Sat, 24 Jan 2015 13:04:15 -0800 (PST) In-Reply-To: <54C3F7F1.90808@freebsd.org> References: <201501241949.t0OJnSCI054826@svn.freebsd.org> <54C3F7F1.90808@freebsd.org> Date: Sat, 24 Jan 2015 13:04:15 -0800 X-Google-Sender-Auth: DpJbpg8LBWg8PPWUQdt-KA0z180 Message-ID: Subject: Re: svn commit: r277653 - head/sys/dev/netmap From: Adrian Chadd To: Alfred Perlstein Content-Type: text/plain; charset=UTF-8 Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 21:04:16 -0000 Eep, I'll make sure I add that to the next commit / MFC. Thanks, -adrian On 24 January 2015 at 11:52, Alfred Perlstein wrote: > Wasn't this pointed out by James K? > > > On 1/24/15 11:49 AM, Adrian Chadd wrote: >> >> Author: adrian >> Date: Sat Jan 24 19:49:27 2015 >> New Revision: 277653 >> URL: https://svnweb.freebsd.org/changeset/base/277653 >> >> Log: >> Change the permissions from 0660 to 0600. >> Otherwise people in wheel can do things with netmap, including >> but not limited to promisc transmit/receive. >> Approved by: luigi >> MFC after: 1 week >> >> Modified: >> head/sys/dev/netmap/netmap.c >> >> Modified: head/sys/dev/netmap/netmap.c >> >> ============================================================================== >> --- head/sys/dev/netmap/netmap.c Sat Jan 24 19:13:03 2015 >> (r277652) >> +++ head/sys/dev/netmap/netmap.c Sat Jan 24 19:49:27 2015 >> (r277653) >> @@ -3075,10 +3075,10 @@ netmap_init(void) >> #ifdef __FreeBSD__ >> /* support for the 'eternal' flag */ >> netmap_dev = make_dev_credf(MAKEDEV_ETERNAL_KLD, >> - &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0660, >> + &netmap_cdevsw, 0, NULL, UID_ROOT, GID_WHEEL, 0600, >> "netmap"); >> #else >> - netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, >> 0660, >> + netmap_dev = make_dev(&netmap_cdevsw, 0, UID_ROOT, GID_WHEEL, >> 0600, >> "netmap"); >> #endif >> if (!netmap_dev) >> > From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 21:05:19 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 018D2356; Sat, 24 Jan 2015 21:05:18 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF2DFFD5; Sat, 24 Jan 2015 21:05:18 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OL5IAH094104; Sat, 24 Jan 2015 21:05:18 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OL5IYq094103; Sat, 24 Jan 2015 21:05:18 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501242105.t0OL5IYq094103@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 24 Jan 2015 21:05:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r277659 - head/contrib/gdb/gdb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 21:05:19 -0000 Author: pfg Date: Sat Jan 24 21:05:18 2015 New Revision: 277659 URL: https://svnweb.freebsd.org/changeset/base/277659 Log: MFV r277658: GDB: Replace use of sprintf. 2005-03-17 Mark Kettenis * corelow.c (get_core_register_section): Replace usage of sprintf and strcpy with xstrprintf and xstrdup. Sourceware commit: 3ecda4574edb38ad12fb491ccaf6d9b0caa3a07a CID: 1006819 MFC after: 4 days Modified: head/contrib/gdb/gdb/corelow.c Directory Properties: head/contrib/gdb/ (props changed) Modified: head/contrib/gdb/gdb/corelow.c ============================================================================== --- head/contrib/gdb/gdb/corelow.c Sat Jan 24 21:00:51 2015 (r277658) +++ head/contrib/gdb/gdb/corelow.c Sat Jan 24 21:05:18 2015 (r277659) @@ -432,15 +432,16 @@ get_core_register_section (char *name, char *human_name, int required) { - char section_name[100]; + static char *section_name = NULL; struct bfd_section *section; bfd_size_type size; char *contents; + xfree (section_name); if (PIDGET (inferior_ptid)) - sprintf (section_name, "%s/%d", name, PIDGET (inferior_ptid)); + section_name = xstrprintf ("%s/%d", name, PIDGET (inferior_ptid)); else - strcpy (section_name, name); + section_name = xstrdup (name); section = bfd_get_section_by_name (core_bfd, section_name); if (! section) From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 21:23:54 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 30434980; Sat, 24 Jan 2015 21:23:54 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B4A2219; Sat, 24 Jan 2015 21:23:54 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OLNr5a004455; Sat, 24 Jan 2015 21:23:53 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OLNreL004454; Sat, 24 Jan 2015 21:23:53 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501242123.t0OLNreL004454@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 24 Jan 2015 21:23:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r277661 - stable/10/sys/fs/ext2fs X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 21:23:54 -0000 Author: pfg Date: Sat Jan 24 21:23:53 2015 New Revision: 277661 URL: https://svnweb.freebsd.org/changeset/base/277661 Log: MFC r277301: ext2: cosmetical issues Minor sorting and note when the cases are expected to fall through. Modified: stable/10/sys/fs/ext2fs/ext2_hash.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- stable/10/sys/fs/ext2fs/ext2_hash.c Sat Jan 24 21:21:39 2015 (r277660) +++ stable/10/sys/fs/ext2fs/ext2_hash.c Sat Jan 24 21:23:53 2015 (r277661) @@ -196,10 +196,10 @@ ext2_prep_hashbuf(const char *src, int s { uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24); uint32_t buf_val; - int len, i; - int buf_byte; const unsigned char *ubuf = (const unsigned char *)src; const signed char *sbuf = (const signed char *)src; + int len, i; + int buf_byte; if (slen > dlen) len = dlen; @@ -265,6 +265,7 @@ ext2_htree_hash(const char *name, int le switch (hash_version) { case EXT2_HTREE_TEA_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_TEA: while (len > 0) { ext2_prep_hashbuf(name, len, data, 16, unsigned_char); @@ -277,11 +278,13 @@ ext2_htree_hash(const char *name, int le break; case EXT2_HTREE_LEGACY_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_LEGACY: major = ext2_legacy_hash(name, len, unsigned_char); break; case EXT2_HTREE_HALF_MD4_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_HALF_MD4: while (len > 0) { ext2_prep_hashbuf(name, len, data, 32, unsigned_char); From owner-svn-src-all@FreeBSD.ORG Sat Jan 24 21:25:56 2015 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AC242AED; Sat, 24 Jan 2015 21:25:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9732A22B; Sat, 24 Jan 2015 21:25:56 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id t0OLPufa004878; Sat, 24 Jan 2015 21:25:56 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id t0OLPuc9004877; Sat, 24 Jan 2015 21:25:56 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201501242125.t0OLPuc9004877@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 24 Jan 2015 21:25:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r277662 - stable/9/sys/fs/ext2fs X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 24 Jan 2015 21:25:56 -0000 Author: pfg Date: Sat Jan 24 21:25:55 2015 New Revision: 277662 URL: https://svnweb.freebsd.org/changeset/base/277662 Log: MFC r277301: ext2: cosmetical issues Minor sorting and note when the cases are expected to fall through. Modified: stable/9/sys/fs/ext2fs/ext2_hash.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/fs/ (props changed) Modified: stable/9/sys/fs/ext2fs/ext2_hash.c ============================================================================== --- stable/9/sys/fs/ext2fs/ext2_hash.c Sat Jan 24 21:23:53 2015 (r277661) +++ stable/9/sys/fs/ext2fs/ext2_hash.c Sat Jan 24 21:25:55 2015 (r277662) @@ -196,10 +196,10 @@ ext2_prep_hashbuf(const char *src, int s { uint32_t padding = slen | (slen << 8) | (slen << 16) | (slen << 24); uint32_t buf_val; - int len, i; - int buf_byte; const unsigned char *ubuf = (const unsigned char *)src; const signed char *sbuf = (const signed char *)src; + int len, i; + int buf_byte; if (slen > dlen) len = dlen; @@ -265,6 +265,7 @@ ext2_htree_hash(const char *name, int le switch (hash_version) { case EXT2_HTREE_TEA_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_TEA: while (len > 0) { ext2_prep_hashbuf(name, len, data, 16, unsigned_char); @@ -277,11 +278,13 @@ ext2_htree_hash(const char *name, int le break; case EXT2_HTREE_LEGACY_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_LEGACY: major = ext2_legacy_hash(name, len, unsigned_char); break; case EXT2_HTREE_HALF_MD4_UNSIGNED: unsigned_char = 1; + /* FALLTHROUGH */ case EXT2_HTREE_HALF_MD4: while (len > 0) { ext2_prep_hashbuf(name, len, data, 32, unsigned_char);