From owner-svn-src-head@freebsd.org Sun Nov 20 01:59:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C87E1C3E234; Sun, 20 Nov 2016 01:59:23 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A9E5812; Sun, 20 Nov 2016 01:59:23 +0000 (UTC) (envelope-from kan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAK1xM8w093388; Sun, 20 Nov 2016 01:59:22 GMT (envelope-from kan@FreeBSD.org) Received: (from kan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAK1xMWx093387; Sun, 20 Nov 2016 01:59:22 GMT (envelope-from kan@FreeBSD.org) Message-Id: <201611200159.uAK1xMWx093387@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kan set sender to kan@FreeBSD.org using -f From: Alexander Kabaev Date: Sun, 20 Nov 2016 01:59:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308872 - head/sys/mips/ingenic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 01:59:23 -0000 Author: kan Date: Sun Nov 20 01:59:22 2016 New Revision: 308872 URL: https://svnweb.freebsd.org/changeset/base/308872 Log: Use ofw_gpiobus instead of plain gpiobus for CI20 Requesed by: mmel Modified: head/sys/mips/ingenic/jz4780_gpio.c Modified: head/sys/mips/ingenic/jz4780_gpio.c ============================================================================== --- head/sys/mips/ingenic/jz4780_gpio.c Sat Nov 19 23:58:50 2016 (r308871) +++ head/sys/mips/ingenic/jz4780_gpio.c Sun Nov 20 01:59:22 2016 (r308872) @@ -786,6 +786,13 @@ jz4780_gpio_intr(void *arg) return (FILTER_HANDLED); } +static phandle_t +jz4780_gpio_bus_get_node(device_t bus, device_t dev) +{ + + return (ofw_bus_get_node(bus)); +} + static device_method_t jz4780_gpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, jz4780_gpio_probe), @@ -815,6 +822,9 @@ static device_method_t jz4780_gpio_metho DEVMETHOD(pic_post_ithread, jz4780_gpio_pic_post_ithread), DEVMETHOD(pic_pre_ithread, jz4780_gpio_pic_pre_ithread), + /* ofw_bus interface */ + DEVMETHOD(ofw_bus_get_node, jz4780_gpio_bus_get_node), + DEVMETHOD_END }; From owner-svn-src-head@freebsd.org Sun Nov 20 02:19:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 15C06C3E6ED for ; Sun, 20 Nov 2016 02:19:47 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-36.reflexion.net [208.70.210.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C104DF09 for ; Sun, 20 Nov 2016 02:19:45 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 4397 invoked from network); 20 Nov 2016 02:19:40 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 02:19:40 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 21:19:24 -0500 (EST) Received: (qmail 13650 invoked from network); 20 Nov 2016 02:19:24 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 02:19:24 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 4E2FCEC8FDE; Sat, 19 Nov 2016 18:19:38 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Message-Id: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> Date: Sat, 19 Nov 2016 18:19:37 -0800 To: Justin Hibbits , svn-src-head@freebsd.org, FreeBSD Current X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 02:19:47 -0000 > Author: jhibbits > Date: Fri Nov 18 22:59:33 2016 > New Revision: 308817 > URL: https://svnweb.freebsd.org/changeset/base/308817 >=20 > Log: > Fix buildworld > =20 > Change the pv_tracked flag to an int, just in case userspace decides = to include > this file and defines BOOKE. > =20 > Guard this block from unintentional inclusion with ifdef BOOKE. > =20 > Reported by: emaste . . . (Later quotes are not from the list or from E-mail but from files.) I'm not targeting BOOKE but GENERIC64 (via include, with AIM but not ps3). I'm at head -r308860 yet for TARGET_ARCH=3Dpowerpc64 I get the following that did not happen with my older -r308247 builds: > --- kinfo_getallproc.o --- . . . > In file included from /usr/src/sys/sys/user.h:53:0, > from q:34: > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > pmap_t pmap; /* (c) Physical map */ > ^ > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete = type > struct pmap vm_pmap; /* private physical map */ > ^ > --- kinfo_getfile.o --- > In file included from /usr/src/sys/sys/user.h:53:0, > from /usr/src/lib/libutil/kinfo_getfile.c:5: > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > pmap_t pmap; /* (c) Physical map */ > ^ > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete = type > struct pmap vm_pmap; /* private physical map */ It is almost like a machine/pmap.h include is missing now so that the types are not defined. But I've not yet found where the relevant difference(s) are from -r308247. Showing a compile command (with -v) with its failure. . . > --- kinfo_getallproc.o --- > Using built-in specs. > COLLECT_GCC=3D/usr/local/bin/powerpc64-portbld-freebsd12.0-gcc > Target: powerpc64-portbld-freebsd12.0 > Configured with: = /usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.3.0/configure = --target=3Dpowerpc64-portbld-freebsd12.0 --disable-nls = --enable-languages=3Dc,c++ --without-headers --with-gmp=3D/usr/local = --with-pkgversion=3D'FreeBSD Ports Collection for powerpc64' = --with-system-zlib --with-as=3D/usr/local/bin/powerpc64-freebsd-as = --with-ld=3D/usr/local/bin/powerpc64-freebsd-ld --prefix=3D/usr/local = --localstatedir=3D/var --mandir=3D/usr/local/man = --infodir=3D/usr/local/info/ --build=3Dx86_64-portbld-freebsd12.0 > Thread model: posix > gcc version 5.3.0 (FreeBSD Ports Collection for powerpc64)=20 > COLLECT_GCC_OPTIONS=3D'-isystem' = '/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/inclu= de' = '-L/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib= ' '-B' = '/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib' = '-B' '/usr/local/powerpc64-freebsd/bin/' '-O2' '-pipe' '-D' 'LIBC_SCCS' = '-D' 'INET6' '-I' '/usr/src/lib/libutil' '-I' = '/usr/src/lib/libutil/../libc/gen/' '-std=3Dgnu99' = '-fstack-protector-strong' '-Wsystem-headers' '-Wall' '-Wno-format-y2k' = '-Wextra' '-Wstrict-prototypes' '-Wmissing-prototypes' '-Wpointer-arith' = '-Wreturn-type' '-Wcast-qual' '-Wwrite-strings' '-Wswitch' '-Wshadow' = '-Wunused-parameter' '-Wcast-align' '-Wchar-subscripts' '-Winline' = '-Wnested-externs' '-Wredundant-decls' '-Wold-style-definition' = '-Wno-pointer-sign' '-Wno-error=3Daddress' '-Wno-error=3Darray-bounds' = '-Wno-error=3Dattributes' '-Wno-error=3Dbool-compare' = '-Wno-error=3Dcast-align' '-Wno-error=3Dclobbered' = '-Wno-error=3Denum-compare' '-Wno-error=3Dextra' '-Wno-error=3Dinline' = '-Wno-error=3Dlogical-not-parentheses' '-Wno-error=3Dstrict-aliasing' = '-Wno-error=3Duninitialized' '-Wno-error=3Dunused-but-set-variable' = '-Wno-error=3Dunused-function' '-Wno-error=3Dunused-value' = '-Wno-error=3Dstrict-overflow' '-v' '-c' '-o' 'kinfo_getallproc.o' > /usr/local/libexec/gcc/powerpc64-portbld-freebsd12.0/5.3.0/cc1 -quiet = -v -I /usr/src/lib/libutil -I /usr/src/lib/libutil/../libc/gen/ = -isysroot = /usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp -D = LIBC_SCCS -D INET6 -isystem = /usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/includ= e /usr/src/lib/libutil/kinfo_getallproc.c -quiet -dumpbase = kinfo_getallproc.c -auxbase-strip kinfo_getallproc.o -O2 = -Wsystem-headers -Wall -Wno-format-y2k -Wextra -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual = -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align = -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls = -Wold-style-definition -Wno-pointer-sign -Wno-error=3Daddress = -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dstrict-overflow -std=3Dgnu99 -version = -fstack-protector-strong -o - | > /usr/local/bin/powerpc64-freebsd-as -v -I /usr/src/lib/libutil -I = /usr/src/lib/libutil/../libc/gen/ --traditional-format -a64 -mppc64 = -many -o kinfo_getallproc.o > GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 = (powerpc64-portbld-freebsd12.0) > compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 = (tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, = MPC version 1.0.3 > GGC heuristics: --param ggc-min-expand=3D100 --param = ggc-min-heapsize=3D131072 > ignoring nonexistent directory = "/usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/../../../../powerp= c64-portbld-freebsd12.0/sys-include" > ignoring nonexistent directory = "/usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/../../../../powerp= c64-portbld-freebsd12.0/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/src/lib/libutil > /usr/src/lib/libutil/../libc/gen/ > = /usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/includ= e > /usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/include > /usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/include-fixed > End of search list. > GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 = (powerpc64-portbld-freebsd12.0) > compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 = (tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, = MPC version 1.0.3 > GGC heuristics: --param ggc-min-expand=3D100 --param = ggc-min-heapsize=3D131072 > GNU assembler version 2.25.1 (powerpc64-freebsd) using BFD version = (GNU Binutils) 2.25.1 > Compiler executable checksum: f075193fe6b42ec6fb8ba336147ebe8e > In file included from /usr/src/sys/sys/user.h:53:0, > from /usr/src/lib/libutil/kinfo_getallproc.c:34: > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > pmap_t pmap; /* (c) Physical map */ > ^ > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete = type > struct pmap vm_pmap; /* private physical map */ > ^ This is a powerpc64-xtoolchain-gcc based cross build: (I build with libc++ capable materials, not with gcc 4.2.1 .) > # uname -apKU > FreeBSD FreeBSDx64 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r308860M: Sat = Nov 19 14:00:24 PST 2016 = markmi@FreeBSDx64:/usr/obj/amd64_clang/amd64_amd64/usr/src/sys/GENERIC-NOD= BG amd64 amd64 1200014 1200014 > # svnlite info /usr/src/ | grep "Re[lpv]" > Relative URL: ^/head > Repository Root: svn://svn.freebsd.org/base > Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f > Revision: 308860 > Last Changed Rev: 308860 > # more /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG=20 > # > # GENERIC -- Custom configuration for the powerpc/powerpc64 > # >=20 > include "GENERIC64" >=20 > ident GENERIC64vtsc-NODGB >=20 > makeoptions DEBUG=3D-g # Build kernel with gdb(1) = debug symbols >=20 > nooptions PS3 # Sony Playstation 3 = HACK!!! to allow sc >=20 > options KDB # Enable kernel debugger = support >=20 > # For minimum debugger support (stable branch) use: > options KDB_TRACE # Print a stack trace for a = panic > options DDB # Enable the kernel debugger > options GDB # HACK!!! ... >=20 > # Extra stuff: > #options VERBOSE_SYSINIT # Enable verbose sysinit = messages > #options BOOTVERBOSE=3D1 > #options BOOTHOWTO=3DRB_VERBOSE > #options KTR > #options KTR_MASK=3DKTR_TRAP > ##options KTR_CPUMASK=3D0xF > #options KTR_VERBOSE >=20 > # HACK!!! to allow sc for 2560x1440 display on Radeon X1950 that vt = historically mishandled during booting > device sc > #device kbdmux # HACK: already listed by vt > options SC_OFWFB # OFW frame buffer > options SC_DFLT_FONT # compile font in > makeoptions SC_DFLT_FONT=3Dcp437 >=20 >=20 > # Disable any extra checking for. . . > nooptions DEADLKRES # Enable the deadlock resolver > nooptions INVARIANTS # Enable calls of extra sanity = checking > nooptions INVARIANT_SUPPORT # Extra sanity checks of = internal structures, required by INVARIANTS > nooptions WITNESS # Enable checks to detect = deadlocks and cycles > nooptions WITNESS_SKIPSPIN # Don't run witness on = spinlocks for speed > nooptions DIAGNOSTIC > nooptions MALLOC_DEBUG_MAXZONES # Separate malloc(9) zones Its SRC_ENV_CONF binding is to. . . > # more ~/src.configs/src.conf.powerpc64-xtoolchain.amd64-host=20 > TO_TYPE=3Dpowerpc64 > TOOLS_TO_TYPE=3D${TO_TYPE} > VERSION_CONTEXT=3D12.0 > # > KERNCONF=3DGENERIC64vtsc-NODBG > TARGET=3Dpowerpc > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITHOUT_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > # > WITH_LIBCPLUSPLUS=3D > WITHOUT_BINUTILS_BOOTSTRAP=3D > WITHOUT_CLANG_BOOTSTRAP=3D > WITH_CLANG=3D > WITH_CLANG_IS_CC=3D > WITH_CLANG_FULL=3D > WITH_CLANG_EXTRAS=3D > WITH_LLDB=3D > # > WITH_BOOT=3D > # powerpc64 LIB32 builds via gcc 4.9 or later variants that I've tried > # but the LIB32 does not work [crtbeginS code problem(s)] > WITHOUT_LIB32=3D > # > WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D > WITHOUT_GCC_BOOTSTRAP=3D > WITHOUT_GCC=3D > WITHOUT_GCC_IS_CC=3D > WITHOUT_GNUCXX=3D > # > NO_WERROR=3D > #WERROR=3D > MALLOC_PRODUCTION=3D > # > WITH_DEBUG_FILES=3D > # > # > # For TO (so-called "cross") stages . . . > # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . . > # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . = . > # > CROSS_TOOLCHAIN=3D${TO_TYPE}-gcc > X_COMPILER_TYPE=3Dgcc > CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ > .if ${.MAKE.LEVEL} =3D=3D 0 > = XCC=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-gc= c > = XCXX=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-g= ++ > = XCPP=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-c= pp > .export XCC > .export XCXX > .export XCPP > XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as > XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar > XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld > XNM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm > XOBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy > XOBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump > XRANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib > XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size > #NO-SUCH: XSTRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings > XSTRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings > .export XAS > .export XAR > .export XLD > .export XNM > .export XOBJCOPY > .export XOBJDUMP > .export XRANLIB > .export XSIZE > .export XSTRINGS > .endif > # > # > # =46rom based on clang (via system). . . > # > .if ${.MAKE.LEVEL} =3D=3D 0 > CC=3D/usr/bin/clang > CXX=3D/usr/bin/clang++ > CPP=3D/usr/bin/clang-cpp > .export CC > .export CXX > .export CPP > .endif > # svnlite status /usr/src/ > M = /usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp > M /usr/src/lib/csu/powerpc64/Makefile > ? /usr/src/sys/amd64/conf/GENERIC-DBG > ? /usr/src/sys/amd64/conf/GENERIC-NODBG > ? /usr/src/sys/arm/conf/BPIM3-DBG > ? /usr/src/sys/arm/conf/BPIM3-NODBG > ? /usr/src/sys/arm/conf/RPI2-DBG > ? /usr/src/sys/arm/conf/RPI2-NODBG > ? /usr/src/sys/arm64/conf/GENERIC-DBG > ? /usr/src/sys/arm64/conf/GENERIC-NODBG > M /usr/src/sys/boot/ofw/Makefile.inc > M /usr/src/sys/boot/powerpc/Makefile.inc > M /usr/src/sys/boot/powerpc/kboot/Makefile > M /usr/src/sys/boot/uboot/Makefile.inc > M /usr/src/sys/conf/Makefile.powerpc > M /usr/src/sys/conf/kern.mk > M /usr/src/sys/conf/kmod.mk > M /usr/src/sys/ddb/db_main.c > M /usr/src/sys/ddb/db_script.c > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG > ? /usr/src/sys/powerpc/conf/GENERICvtsc-DBG > ? /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG > M /usr/src/sys/powerpc/ofw/ofw_machdep.c > M /usr/src/sys/powerpc/powerpc/exec_machdep.c =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Sun Nov 20 02:31:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFCEDC3ECAA; Sun, 20 Nov 2016 02:31:35 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (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 A753F1503; Sun, 20 Nov 2016 02:31:35 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it0-x243.google.com with SMTP id o1so10931876ito.1; Sat, 19 Nov 2016 18:31:35 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=bPSzWVIOz5/ECAvHbD2+qWropcS5v1a5C8wdu8b9VKo=; b=TLV8ihadlyHeaz0f9drIpGbuY1w5I7J6I36yTLAWuJ269Ziikxgb9beu/HNZCnuxaB y5u3sIhtycgf6tPnjMahPVaRxgE9Tao90IllR5Qwrdj/HC9jHPzrH1ZO8y0/HKdB0A8a JldeoFcUza+XV+zsvzUk/oI9C2o54CBtsCjp03KjKOeBx7dVYLwPuBDIgPUe2252wgLQ p5+XldR3rhmC8h0xtvWfIKUga3bp8QDoSTu+Ue3+Xc6Gfp7evaFGVPPhfIeVFSeL02F9 eUw40QnOflyInhy39KkJCIW81+mNUKhV5fwl5LtWmzDNawjrMMBTROT3DqI4Ho7A9hyJ 8rRQ== 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 :in-reply-to:references:mime-version:content-transfer-encoding; bh=bPSzWVIOz5/ECAvHbD2+qWropcS5v1a5C8wdu8b9VKo=; b=fXrputIOeH8SFcGrvrqJR7ZR3dxMlmkA/7A0GrU1qRjEreJ0WoXnef4DADf80v/BHx BhRBk8QyqrQc3rTCI+4tyHCK/NHTC2R8R0vZwR0I8wR/z88LEPx+NDQ8CS9sijc/5VMe uJyLl44NoZ41I8Eeu8om1wD4E5hIIfDsZzLIgbEB3Ne4zIWJ9imScIPn/I8U4Cbhmu7x tN98rbzUNOv37Sbs6sr8rn0CwvBb7HG6Q+W6hRky6rLiDmAYHrGwMFLZHDQb41SB5GYz ocvQ7qJ16FvlJIRtzGiTwhxswqnFgUUxbW/nE1gIsSzHdaUQOlfoB18t38Lfp+Rzu0a/ PEEw== X-Gm-Message-State: AKaTC00Noy3Mey7aEIF5SQYoX1n2D/y8aBuMok/dqVQfBkfzSy8neUmfqmIGRDTlPDqy7A== X-Received: by 10.36.233.66 with SMTP id f63mr4540874ith.55.1479609093580; Sat, 19 Nov 2016 18:31:33 -0800 (PST) Received: from zhabar.knownspace (50-80-150-234.client.mchsi.com. [50.80.150.234]) by smtp.gmail.com with ESMTPSA id k198sm3735523itb.18.2016.11.19.18.31.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Nov 2016 18:31:33 -0800 (PST) Sender: Justin Hibbits Date: Sat, 19 Nov 2016 20:31:28 -0600 From: Justin Hibbits To: Mark Millard Cc: svn-src-head@freebsd.org, FreeBSD Current , Alan Cox Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Message-ID: <20161119203128.2ac46708@zhabar.knownspace> In-Reply-To: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; powerpc64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 02:31:36 -0000 On Sat, 19 Nov 2016 18:19:37 -0800 Mark Millard wrote: > > Author: jhibbits > > Date: Fri Nov 18 22:59:33 2016 > > New Revision: 308817 > > URL: https://svnweb.freebsd.org/changeset/base/308817 > > > > Log: > > Fix buildworld > > > > Change the pv_tracked flag to an int, just in case userspace > > decides to include this file and defines BOOKE. > > > > Guard this block from unintentional inclusion with ifdef BOOKE. > > > > Reported by: emaste > . . . > > (Later quotes are not from the list or from E-mail but from files.) > > I'm not targeting BOOKE but GENERIC64 (via include, with AIM but not > ps3). I'm at head -r308860 yet for TARGET_ARCH=powerpc64 I get the > following that did not happen with my older -r308247 builds: > > > --- kinfo_getallproc.o --- > . . . > > In file included from /usr/src/sys/sys/user.h:53:0, > > from q:34: > > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > > pmap_t pmap; /* (c) Physical map */ > > ^ > > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has > > incomplete type struct pmap vm_pmap; /* private physical map */ > > ^ > > --- kinfo_getfile.o --- > > In file included from /usr/src/sys/sys/user.h:53:0, > > from /usr/src/lib/libutil/kinfo_getfile.c:5: > > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > > pmap_t pmap; /* (c) Physical map */ > > ^ > > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has > > incomplete type struct pmap vm_pmap; /* private physical map */ > > > It is almost like a machine/pmap.h include is missing now so that the > types are not defined. But I've not yet found where the relevant > difference(s) are from -r308247. > > Showing a compile command (with -v) with its failure. . . > The change is the "#elif defined(BOOKE)". Since userspace doesn't define either AIM nor BOOKE, struct pmap no longer exists. Alan, do you know if vmspace *needs* struct pmap to exist when read from userspace (in libprocstat and libkvm, from what I grepped)? If not, I can add a simple '#else struct pmap {};' to quiet the build. - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 02:36:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 306F8C3EE33 for ; Sun, 20 Nov 2016 02:36:48 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-29.reflexion.net [208.70.210.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E9D681903 for ; Sun, 20 Nov 2016 02:36:47 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 23501 invoked from network); 20 Nov 2016 02:36:26 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 02:36:26 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 21:36:47 -0500 (EST) Received: (qmail 26929 invoked from network); 20 Nov 2016 02:36:46 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 02:36:46 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 0FE07EC8FDE; Sat, 19 Nov 2016 18:36:40 -0800 (PST) From: Mark Millard Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Date: Sat, 19 Nov 2016 18:36:39 -0800 References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> To: Justin Hibbits , svn-src-head@freebsd.org, FreeBSD Current In-Reply-To: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> Message-Id: <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 02:36:48 -0000 [Quick top post I'm afraid.] I think that I figured out why there is a problem even earlier --that just did not stop the compiles. lib/libutil/kinfo_getallproc.c is built here as part of buildworld (stage 4.2 "building libraries" instead of buildkernel. It does not have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of them). So if it includes machine/pmap.h that binds to sys/powerpc/include/pmap.h which has the structure. . . . . . #if defined(AIM) . . . (definitions here) #elif defined(BOOKE) . . . (definitions here) #endif . . . it gets no definition now. With the older: . . . #if defined(AIM) . . . (definitions here) #else . . . (definitions here) #endif . . . It got a definition, just not necessarily the right one. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Nov-19, at 6:19 PM, Mark Millard wrote: > Author: jhibbits > Date: Fri Nov 18 22:59:33 2016 > New Revision: 308817 > URL: https://svnweb.freebsd.org/changeset/base/308817 >=20 > Log: > Fix buildworld >=20 > Change the pv_tracked flag to an int, just in case userspace decides = to include > this file and defines BOOKE. >=20 > Guard this block from unintentional inclusion with ifdef BOOKE. >=20 > Reported by: emaste . . . (Later quotes are not from the list or from E-mail but from files.) I'm not targeting BOOKE but GENERIC64 (via include, with AIM but not ps3). I'm at head -r308860 yet for TARGET_ARCH=3Dpowerpc64 I get the following that did not happen with my older -r308247 builds: > --- kinfo_getallproc.o --- . . . > In file included from /usr/src/sys/sys/user.h:53:0, > from q:34: > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > pmap_t pmap; /* (c) Physical map */ > ^ > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete = type > struct pmap vm_pmap; /* private physical map */ > ^ > --- kinfo_getfile.o --- > In file included from /usr/src/sys/sys/user.h:53:0, > from /usr/src/lib/libutil/kinfo_getfile.c:5: > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > pmap_t pmap; /* (c) Physical map */ > ^ > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete = type > struct pmap vm_pmap; /* private physical map */ It is almost like a machine/pmap.h include is missing now so that the types are not defined. But I've not yet found where the relevant difference(s) are from -r308247. Showing a compile command (with -v) with its failure. . . > --- kinfo_getallproc.o --- > Using built-in specs. > COLLECT_GCC=3D/usr/local/bin/powerpc64-portbld-freebsd12.0-gcc > Target: powerpc64-portbld-freebsd12.0 > Configured with: = /usr/obj/portswork/usr/ports/devel/powerpc64-gcc/work/gcc-5.3.0/configure = --target=3Dpowerpc64-portbld-freebsd12.0 --disable-nls = --enable-languages=3Dc,c++ --without-headers --with-gmp=3D/usr/local = --with-pkgversion=3D'FreeBSD Ports Collection for powerpc64' = --with-system-zlib --with-as=3D/usr/local/bin/powerpc64-freebsd-as = --with-ld=3D/usr/local/bin/powerpc64-freebsd-ld --prefix=3D/usr/local = --localstatedir=3D/var --mandir=3D/usr/local/man = --infodir=3D/usr/local/info/ --build=3Dx86_64-portbld-freebsd12.0 > Thread model: posix > gcc version 5.3.0 (FreeBSD Ports Collection for powerpc64)=20 > COLLECT_GCC_OPTIONS=3D'-isystem' = '/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/inclu= de' = '-L/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib= ' '-B' = '/usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/lib' = '-B' '/usr/local/powerpc64-freebsd/bin/' '-O2' '-pipe' '-D' 'LIBC_SCCS' = '-D' 'INET6' '-I' '/usr/src/lib/libutil' '-I' = '/usr/src/lib/libutil/../libc/gen/' '-std=3Dgnu99' = '-fstack-protector-strong' '-Wsystem-headers' '-Wall' '-Wno-format-y2k' = '-Wextra' '-Wstrict-prototypes' '-Wmissing-prototypes' '-Wpointer-arith' = '-Wreturn-type' '-Wcast-qual' '-Wwrite-strings' '-Wswitch' '-Wshadow' = '-Wunused-parameter' '-Wcast-align' '-Wchar-subscripts' '-Winline' = '-Wnested-externs' '-Wredundant-decls' '-Wold-style-definition' = '-Wno-pointer-sign' '-Wno-error=3Daddress' '-Wno-error=3Darray-bounds' = '-Wno-error=3Dattributes' '-Wno-error=3Dbool-compare' = '-Wno-error=3Dcast-align' '-Wno-error=3Dclobbered' = '-Wno-error=3Denum-compare' '-Wno-error=3Dextra' '-Wno-error=3Dinline' = '-Wno-error=3Dlogical-not-parentheses' '-Wno-error=3Dstrict-aliasing' = '-Wno-error=3Duninitialized' '-Wno-error=3Dunused-but-set-variable' = '-Wno-error=3Dunused-function' '-Wno-error=3Dunused-value' = '-Wno-error=3Dstrict-overflow' '-v' '-c' '-o' 'kinfo_getallproc.o' > /usr/local/libexec/gcc/powerpc64-portbld-freebsd12.0/5.3.0/cc1 -quiet = -v -I /usr/src/lib/libutil -I /usr/src/lib/libutil/../libc/gen/ = -isysroot = /usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp -D = LIBC_SCCS -D INET6 -isystem = /usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/includ= e /usr/src/lib/libutil/kinfo_getallproc.c -quiet -dumpbase = kinfo_getallproc.c -auxbase-strip kinfo_getallproc.o -O2 = -Wsystem-headers -Wall -Wno-format-y2k -Wextra -Wstrict-prototypes = -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual = -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align = -Wchar-subscripts -Winline -Wnested-externs -Wredundant-decls = -Wold-style-definition -Wno-pointer-sign -Wno-error=3Daddress = -Wno-error=3Darray-bounds -Wno-error=3Dattributes = -Wno-error=3Dbool-compare -Wno-error=3Dcast-align -Wno-error=3Dclobbered = -Wno-error=3Denum-compare -Wno-error=3Dextra -Wno-error=3Dinline = -Wno-error=3Dlogical-not-parentheses -Wno-error=3Dstrict-aliasing = -Wno-error=3Duninitialized -Wno-error=3Dunused-but-set-variable = -Wno-error=3Dunused-function -Wno-error=3Dunused-value = -Wno-error=3Dstrict-overflow -std=3Dgnu99 -version = -fstack-protector-strong -o - | > /usr/local/bin/powerpc64-freebsd-as -v -I /usr/src/lib/libutil -I = /usr/src/lib/libutil/../libc/gen/ --traditional-format -a64 -mppc64 = -many -o kinfo_getallproc.o > GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 = (powerpc64-portbld-freebsd12.0) > compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 = (tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, = MPC version 1.0.3 > GGC heuristics: --param ggc-min-expand=3D100 --param = ggc-min-heapsize=3D131072 > ignoring nonexistent directory = "/usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/../../../../powerp= c64-portbld-freebsd12.0/sys-include" > ignoring nonexistent directory = "/usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/../../../../powerp= c64-portbld-freebsd12.0/include" > #include "..." search starts here: > #include <...> search starts here: > /usr/src/lib/libutil > /usr/src/lib/libutil/../libc/gen/ > = /usr/obj/powerpc64vtsc_xtoolchain/powerpc.powerpc64/usr/src/tmp/usr/includ= e > /usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/include > /usr/local/lib/gcc/powerpc64-portbld-freebsd12.0/5.3.0/include-fixed > End of search list. > GNU C99 (FreeBSD Ports Collection for powerpc64) version 5.3.0 = (powerpc64-portbld-freebsd12.0) > compiled by GNU C version 4.2.1 Compatible FreeBSD Clang 3.8.0 = (tags/RELEASE_380/final 262564), GMP version 5.1.3, MPFR version 3.1.5, = MPC version 1.0.3 > GGC heuristics: --param ggc-min-expand=3D100 --param = ggc-min-heapsize=3D131072 > GNU assembler version 2.25.1 (powerpc64-freebsd) using BFD version = (GNU Binutils) 2.25.1 > Compiler executable checksum: f075193fe6b42ec6fb8ba336147ebe8e > In file included from /usr/src/sys/sys/user.h:53:0, > from /usr/src/lib/libutil/kinfo_getallproc.c:34: > /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' > pmap_t pmap; /* (c) Physical map */ > ^ > /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has incomplete = type > struct pmap vm_pmap; /* private physical map */ > ^ This is a powerpc64-xtoolchain-gcc based cross build: (I build with libc++ capable materials, not with gcc 4.2.1 .) > # uname -apKU > FreeBSD FreeBSDx64 12.0-CURRENT FreeBSD 12.0-CURRENT #0 r308860M: Sat = Nov 19 14:00:24 PST 2016 = markmi@FreeBSDx64:/usr/obj/amd64_clang/amd64_amd64/usr/src/sys/GENERIC-NOD= BG amd64 amd64 1200014 1200014 > # svnlite info /usr/src/ | grep "Re[lpv]" > Relative URL: ^/head > Repository Root: svn://svn.freebsd.org/base > Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f > Revision: 308860 > Last Changed Rev: 308860 > # more /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG=20 > # > # GENERIC -- Custom configuration for the powerpc/powerpc64 > # >=20 > include "GENERIC64" >=20 > ident GENERIC64vtsc-NODGB >=20 > makeoptions DEBUG=3D-g # Build kernel with gdb(1) = debug symbols >=20 > nooptions PS3 # Sony Playstation 3 = HACK!!! to allow sc >=20 > options KDB # Enable kernel debugger = support >=20 > # For minimum debugger support (stable branch) use: > options KDB_TRACE # Print a stack trace for a = panic > options DDB # Enable the kernel debugger > options GDB # HACK!!! ... >=20 > # Extra stuff: > #options VERBOSE_SYSINIT # Enable verbose sysinit = messages > #options BOOTVERBOSE=3D1 > #options BOOTHOWTO=3DRB_VERBOSE > #options KTR > #options KTR_MASK=3DKTR_TRAP > ##options KTR_CPUMASK=3D0xF > #options KTR_VERBOSE >=20 > # HACK!!! to allow sc for 2560x1440 display on Radeon X1950 that vt = historically mishandled during booting > device sc > #device kbdmux # HACK: already listed by vt > options SC_OFWFB # OFW frame buffer > options SC_DFLT_FONT # compile font in > makeoptions SC_DFLT_FONT=3Dcp437 >=20 >=20 > # Disable any extra checking for. . . > nooptions DEADLKRES # Enable the deadlock resolver > nooptions INVARIANTS # Enable calls of extra sanity = checking > nooptions INVARIANT_SUPPORT # Extra sanity checks of = internal structures, required by INVARIANTS > nooptions WITNESS # Enable checks to detect = deadlocks and cycles > nooptions WITNESS_SKIPSPIN # Don't run witness on = spinlocks for speed > nooptions DIAGNOSTIC > nooptions MALLOC_DEBUG_MAXZONES # Separate malloc(9) zones Its SRC_ENV_CONF binding is to. . . > # more ~/src.configs/src.conf.powerpc64-xtoolchain.amd64-host=20 > TO_TYPE=3Dpowerpc64 > TOOLS_TO_TYPE=3D${TO_TYPE} > VERSION_CONTEXT=3D12.0 > # > KERNCONF=3DGENERIC64vtsc-NODBG > TARGET=3Dpowerpc > .if ${.MAKE.LEVEL} =3D=3D 0 > TARGET_ARCH=3D${TO_TYPE} > .export TARGET_ARCH > .endif > # > WITHOUT_CROSS_COMPILER=3D > WITHOUT_SYSTEM_COMPILER=3D > # > WITH_LIBCPLUSPLUS=3D > WITHOUT_BINUTILS_BOOTSTRAP=3D > WITHOUT_CLANG_BOOTSTRAP=3D > WITH_CLANG=3D > WITH_CLANG_IS_CC=3D > WITH_CLANG_FULL=3D > WITH_CLANG_EXTRAS=3D > WITH_LLDB=3D > # > WITH_BOOT=3D > # powerpc64 LIB32 builds via gcc 4.9 or later variants that I've tried > # but the LIB32 does not work [crtbeginS code problem(s)] > WITHOUT_LIB32=3D > # > WITHOUT_ELFTOOLCHAIN_BOOTSTRAP=3D > WITHOUT_GCC_BOOTSTRAP=3D > WITHOUT_GCC=3D > WITHOUT_GCC_IS_CC=3D > WITHOUT_GNUCXX=3D > # > NO_WERROR=3D > #WERROR=3D > MALLOC_PRODUCTION=3D > # > WITH_DEBUG_FILES=3D > # > # > # For TO (so-called "cross") stages . . . > # So-called-cross via ${TO_TYPE}-xtoolchain-gcc/${TO_TYPE}-gcc. . . > # TOOLS_TO_TYPE based on ${TO_TYPE}-xtoolchain-gcc related binutils. . = . > # > CROSS_TOOLCHAIN=3D${TO_TYPE}-gcc > X_COMPILER_TYPE=3Dgcc > CROSS_BINUTILS_PREFIX=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ > .if ${.MAKE.LEVEL} =3D=3D 0 > = XCC=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-gc= c > = XCXX=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-g= ++ > = XCPP=3D/usr/local/bin/${TOOLS_TO_TYPE}-portbld-freebsd${VERSION_CONTEXT}-c= pp > .export XCC > .export XCXX > .export XCPP > XAS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/as > XAR=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ar > XLD=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ld > XNM=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/nm > XOBJCOPY=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objcopy > XOBJDUMP=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/objdump > XRANLIB=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/ranlib > XSIZE=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/size > #NO-SUCH: XSTRINGS=3D/usr/local/${TOOLS_TO_TYPE}-freebsd/bin/strings > XSTRINGS=3D/usr/local/bin/${TOOLS_TO_TYPE}-freebsd-strings > .export XAS > .export XAR > .export XLD > .export XNM > .export XOBJCOPY > .export XOBJDUMP > .export XRANLIB > .export XSIZE > .export XSTRINGS > .endif > # > # > # =46rom based on clang (via system). . . > # > .if ${.MAKE.LEVEL} =3D=3D 0 > CC=3D/usr/bin/clang > CXX=3D/usr/bin/clang++ > CPP=3D/usr/bin/clang-cpp > .export CC > .export CXX > .export CPP > .endif > # svnlite status /usr/src/ > M = /usr/src/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp > M /usr/src/lib/csu/powerpc64/Makefile > ? /usr/src/sys/amd64/conf/GENERIC-DBG > ? /usr/src/sys/amd64/conf/GENERIC-NODBG > ? /usr/src/sys/arm/conf/BPIM3-DBG > ? /usr/src/sys/arm/conf/BPIM3-NODBG > ? /usr/src/sys/arm/conf/RPI2-DBG > ? /usr/src/sys/arm/conf/RPI2-NODBG > ? /usr/src/sys/arm64/conf/GENERIC-DBG > ? /usr/src/sys/arm64/conf/GENERIC-NODBG > M /usr/src/sys/boot/ofw/Makefile.inc > M /usr/src/sys/boot/powerpc/Makefile.inc > M /usr/src/sys/boot/powerpc/kboot/Makefile > M /usr/src/sys/boot/uboot/Makefile.inc > M /usr/src/sys/conf/Makefile.powerpc > M /usr/src/sys/conf/kern.mk > M /usr/src/sys/conf/kmod.mk > M /usr/src/sys/ddb/db_main.c > M /usr/src/sys/ddb/db_script.c > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-DBG > ? /usr/src/sys/powerpc/conf/GENERIC64vtsc-NODBG > ? /usr/src/sys/powerpc/conf/GENERICvtsc-DBG > ? /usr/src/sys/powerpc/conf/GENERICvtsc-NODBG > M /usr/src/sys/powerpc/ofw/ofw_machdep.c > M /usr/src/sys/powerpc/powerpc/exec_machdep.c =3D=3D=3D Mark Millard markmi at dsl-only.net From owner-svn-src-head@freebsd.org Sun Nov 20 02:47:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A387FC47089; Sun, 20 Nov 2016 02:47:18 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 5CDE41CB6; Sun, 20 Nov 2016 02:47:18 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io0-x243.google.com with SMTP id h133so1684951ioe.2; Sat, 19 Nov 2016 18:47:18 -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:in-reply-to:references :mime-version; bh=cXO3ZoG5MEw5PfglcflCRor4fmuxXlQ/rSS2UHDgsMk=; b=bk618bwvu+Wic9V+3WQG3IE+KPsvN/6Yox5Y3SdpOr5BeqFFCqkcVa3inROzDRvFlS HSKggdY+L1WJoVld7HC3j60O0rR3y6WegiaFulatgW/KXeCZJtJT5mqBhoki3MUmCTIt Y2as0nknSaMZ+ojIWM7cTlfKwKwLbTtvDNGexhDDLPKge+NHYygKdbQknTO/XM1VKSwi WxlnfNNOxz7FgOyyxSv9ZFDnxXBu/F4SWihHPW4GH9yMDa0cn0sw6Afbv5FtvSvFOIgV 5I4i2Ya2mf/7Rd/fWZdbonRCWaMxmDVbKuhgEJnGKNhrO0WQ+stEc55nSomYaw+p0W6+ 29/w== 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 :in-reply-to:references:mime-version; bh=cXO3ZoG5MEw5PfglcflCRor4fmuxXlQ/rSS2UHDgsMk=; b=R52nua8eUi464PQs7x3LVT8rMC+/9xLAdODuRSPghwjT33968PjMI66QpLnF1DkCuF KPoHvaetdrFFY7JpQZ+8v1oC0w2Z1qw3zBzH5z4IWvoNMe9saH0KeJO8ID8llWKGf0nB IzJw9dKk5UZi6B8Kd1AfQaUCpU2mOrXbVvjhihnoDtBikFllN6qOQebasmqPtCJBiD+7 /EfVGmt7v2WN7jGKoeOBu6uKr0ODSFymmagouwDCcaBUCk3tCrnER1XaUqHhtMrXmmD9 adKJq7++QrSidm3tVhKaurF/kOS1Mo8A7PRwrI5oWarDfscqHBZrApcn6MFeNcjyT/0f 9wFg== X-Gm-Message-State: AKaTC019ThBJw0tN8vMzq/0AEk1NdQKGTUV2QfJrk+LzPXjRPig1Q0Kg0QN3FYkvURqHZg== X-Received: by 10.107.167.5 with SMTP id q5mr5391258ioe.75.1479610037788; Sat, 19 Nov 2016 18:47:17 -0800 (PST) Received: from zhabar.knownspace (50-80-150-234.client.mchsi.com. [50.80.150.234]) by smtp.gmail.com with ESMTPSA id x74sm3377860ita.22.2016.11.19.18.47.17 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 19 Nov 2016 18:47:17 -0800 (PST) Sender: Justin Hibbits Date: Sat, 19 Nov 2016 20:47:15 -0600 From: Justin Hibbits To: Mark Millard Cc: svn-src-head@freebsd.org, FreeBSD Current Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Message-ID: <20161119204715.79632a66@zhabar.knownspace> In-Reply-To: <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> X-Mailer: Claws Mail 3.14.0 (GTK+ 2.24.29; powerpc64-portbld-freebsd12.0) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/eYKnT8u=tt7OZI3sR.Gf6ts" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 02:47:18 -0000 --MP_/eYKnT8u=tt7OZI3sR.Gf6ts Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline On Sat, 19 Nov 2016 18:36:39 -0800 Mark Millard wrote: > [Quick top post I'm afraid.] > > I think that I figured out why there is a problem even earlier > --that just did not stop the compiles. > > lib/libutil/kinfo_getallproc.c is built here as part of buildworld > (stage 4.2 "building libraries" instead of buildkernel. It does not > have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of > them). > > So if it includes machine/pmap.h that binds to > sys/powerpc/include/pmap.h which has the structure. . . > > . . . > #if defined(AIM) > . . . (definitions here) > #elif defined(BOOKE) > . . . (definitions here) > #endif > . . . > > it gets no definition now. > > With the older: > > . . . > #if defined(AIM) > . . . (definitions here) > #else > . . . (definitions here) > #endif > . . . > > It got a definition, just not necessarily the right one. > > > === > Mark Millard > markmi at dsl-only.net Can you try the attached patch? There was a subtle ABI issue that r308817 exposed, which is that the pmap structs aren't identical such that the pm_stats are at different locations, and libkvm ends up reading with the Book-E pmap, getting different stats than expected for AIM. This patch fixes that, bumping version to account for this ABI change. - Justin --MP_/eYKnT8u=tt7OZI3sR.Gf6ts Content-Type: text/x-patch Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=fix_pmap.diff Index: sys/sys/param.h =================================================================== --- sys/sys/param.h (revision 308708) +++ sys/sys/param.h (working copy) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200014 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200015 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Index: sys/powerpc/include/pmap.h =================================================================== --- sys/powerpc/include/pmap.h (revision 308718) +++ sys/powerpc/include/pmap.h (working copy) @@ -74,6 +74,9 @@ #include #include +struct pmap; +typedef struct pmap *pmap_t; + #if defined(AIM) #if !defined(NPMAPS) @@ -81,8 +84,6 @@ #endif /* !defined(NPMAPS) */ struct slbtnode; -struct pmap; -typedef struct pmap *pmap_t; struct pvo_entry { LIST_ENTRY(pvo_entry) pvo_vlink; /* Link to common virt page */ @@ -131,6 +132,7 @@ #define PVO_VSID(pvo) ((pvo)->pvo_vpn >> 16) struct pmap { + struct pmap_statistics pm_stats; struct mtx pm_mtx; #ifdef __powerpc64__ @@ -143,7 +145,6 @@ cpuset_t pm_active; struct pmap *pmap_phys; - struct pmap_statistics pm_stats; struct pvo_tree pmap_pvo; }; @@ -179,13 +180,13 @@ struct slb **slb_alloc_user_cache(void); void slb_free_user_cache(struct slb **); -#else +#elif defined(BOOKE) struct pmap { + struct pmap_statistics pm_stats; /* pmap statistics */ struct mtx pm_mtx; /* pmap mutex */ tlbtid_t pm_tid[MAXCPU]; /* TID to identify this pmap entries in TLB */ cpuset_t pm_active; /* active on cpus */ - struct pmap_statistics pm_stats; /* pmap statistics */ /* Page table directory, array of pointers to page tables. */ pte_t *pm_pdir[PDIR_NENTRIES]; @@ -193,7 +194,6 @@ /* List of allocated ptbl bufs (ptbl kva regions). */ TAILQ_HEAD(, ptbl_buf) pm_ptbl_list; }; -typedef struct pmap *pmap_t; struct pv_entry { pmap_t pv_pmap; @@ -210,6 +210,16 @@ #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#else +/* + * Common pmap members between AIM and BOOKE. + * libkvm needs pm_stats at the same location between both, as it doesn't define + * AIM nor BOOKE, and is expected to work across all. + */ +struct pmap { + struct pmap_statistics pm_stats; /* pmap statistics */ + struct mtx pm_mtx; /* pmap mutex */ +}; #endif /* AIM */ extern struct pmap kernel_pmap_store; Index: UPDATING =================================================================== --- UPDATING (revision 308708) +++ UPDATING (working copy) @@ -51,6 +51,11 @@ ****************************** SPECIAL WARNING: ****************************** +20161119: + The layout of the pmap structure has changed for powerpc to put the pmap + statistics at the front for all CPU variations. libkvm(3) and all tools + that link against it need to be recompiled. + 20161030: isl(4) and cyapa(4) drivers now require a new driver, chromebook_platform(4), to work properly on Chromebook-class hardware. --MP_/eYKnT8u=tt7OZI3sR.Gf6ts-- From owner-svn-src-head@freebsd.org Sun Nov 20 02:48:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C69C6C471DF for ; Sun, 20 Nov 2016 02:48:37 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-36.reflexion.net [208.70.210.36]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 755E21E20 for ; Sun, 20 Nov 2016 02:48:37 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 14656 invoked from network); 20 Nov 2016 02:48:21 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 02:48:21 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 21:48:46 -0500 (EST) Received: (qmail 18135 invoked from network); 20 Nov 2016 02:48:45 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 02:48:45 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 2760DEC903D; Sat, 19 Nov 2016 18:48:35 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: <20161119203128.2ac46708@zhabar.knownspace> Date: Sat, 19 Nov 2016 18:48:34 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: 7bit Message-Id: References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <20161119203128.2ac46708@zhabar.knownspace> To: Justin Hibbits , Alan Cox X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 02:48:37 -0000 On 2016-Nov-19, at 6:31 PM, Justin Hibbits wrote: > On Sat, 19 Nov 2016 18:19:37 -0800 > Mark Millard wrote: > >>> Author: jhibbits >>> Date: Fri Nov 18 22:59:33 2016 >>> New Revision: 308817 >>> URL: https://svnweb.freebsd.org/changeset/base/308817 >>> >>> Log: >>> Fix buildworld >>> >>> Change the pv_tracked flag to an int, just in case userspace >>> decides to include this file and defines BOOKE. >>> >>> Guard this block from unintentional inclusion with ifdef BOOKE. >>> >>> Reported by: emaste >> . . . >> >> (Later quotes are not from the list or from E-mail but from files.) >> >> I'm not targeting BOOKE but GENERIC64 (via include, with AIM but not >> ps3). I'm at head -r308860 yet for TARGET_ARCH=powerpc64 I get the >> following that did not happen with my older -r308247 builds: >> >>> --- kinfo_getallproc.o --- >> . . . >>> In file included from /usr/src/sys/sys/user.h:53:0, >>> from q:34: >>> /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' >>> pmap_t pmap; /* (c) Physical map */ >>> ^ >>> /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has >>> incomplete type struct pmap vm_pmap; /* private physical map */ >>> ^ >>> --- kinfo_getfile.o --- >>> In file included from /usr/src/sys/sys/user.h:53:0, >>> from /usr/src/lib/libutil/kinfo_getfile.c:5: >>> /usr/src/sys/vm/vm_map.h:190:2: error: unknown type name 'pmap_t' >>> pmap_t pmap; /* (c) Physical map */ >>> ^ >>> /usr/src/sys/vm/vm_map.h:250:14: error: field 'vm_pmap' has >>> incomplete type struct pmap vm_pmap; /* private physical map */ >> >> >> It is almost like a machine/pmap.h include is missing now so that the >> types are not defined. But I've not yet found where the relevant >> difference(s) are from -r308247. >> >> Showing a compile command (with -v) with its failure. . . >> > > The change is the "#elif defined(BOOKE)". Since userspace doesn't > define either AIM nor BOOKE, struct pmap no longer exists. > > Alan, do you know if vmspace *needs* struct pmap to exist when read > from userspace (in libprocstat and libkvm, from what I grepped)? If > not, I can add a simple '#else struct pmap {};' to quiet the build. > > - Justin pmap_t (the pointer type) would also be needed. So far as I can tell when . . . . . . #if defined(AIM) . . . (definitions here) #elif defined(BOOKE) . . . (definitions here) #endif . . . was instead the older: . . . #if defined(AIM) . . . (definitions here) #else . . . (definitions here) #endif . . . kinfo_getallproc.c and kinfo_getfile.c and the like got a pmap definition, just not necessarily the right one (when AIM was defined for build kernel). In my context AIM is defined for buildkernel (PowerMac G5 via GENERIC64 use, although I turn off ps3 and have both vt and sc). (I've still not tracked down where kinfo_getallproc.c and kinfo_getfile.c end up with a machine/pmap.h include happening.) From owner-svn-src-head@freebsd.org Sun Nov 20 03:01:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F267AC475D8 for ; Sun, 20 Nov 2016 03:01:00 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-35.reflexion.net [208.70.210.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8810E68D for ; Sun, 20 Nov 2016 03:00:59 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 17285 invoked from network); 20 Nov 2016 03:01:32 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 03:01:32 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 22:00:44 -0500 (EST) Received: (qmail 2747 invoked from network); 20 Nov 2016 03:00:44 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 03:00:44 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 2F3CCEC91C5; Sat, 19 Nov 2016 19:00:58 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: <20161119204715.79632a66@zhabar.knownspace> Date: Sat, 19 Nov 2016 19:00:57 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: 7bit Message-Id: References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:01:01 -0000 It may take a little bit but I'll try the patch. It looks like sys/powerpc/include/pmap.h from -r176700 from 2088-Mar-3 is when the BOOKE/E500 split started with the preprocessor use of AIM and #else . This predates PowerMac G5 support. This is definitely not new for the general structure on the powerpc side of things. Any place that did not have the AIM vs. not status available was subject to problems of possibly mismatched definitions. === Mark Millard markmi at dsl-only.net On 2016-Nov-19, at 6:47 PM, Justin Hibbits wrote: On Sat, 19 Nov 2016 18:36:39 -0800 Mark Millard wrote: > [Quick top post I'm afraid.] > > I think that I figured out why there is a problem even earlier > --that just did not stop the compiles. > > lib/libutil/kinfo_getallproc.c is built here as part of buildworld > (stage 4.2 "building libraries" instead of buildkernel. It does not > have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of > them). > > So if it includes machine/pmap.h that binds to > sys/powerpc/include/pmap.h which has the structure. . . > > . . . > #if defined(AIM) > . . . (definitions here) > #elif defined(BOOKE) > . . . (definitions here) > #endif > . . . > > it gets no definition now. > > With the older: > > . . . > #if defined(AIM) > . . . (definitions here) > #else > . . . (definitions here) > #endif > . . . > > It got a definition, just not necessarily the right one. > > > === > Mark Millard > markmi at dsl-only.net Can you try the attached patch? There was a subtle ABI issue that r308817 exposed, which is that the pmap structs aren't identical such that the pm_stats are at different locations, and libkvm ends up reading with the Book-E pmap, getting different stats than expected for AIM. This patch fixes that, bumping version to account for this ABI change. - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 03:27:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A2374C47F5E for ; Sun, 20 Nov 2016 03:27:08 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-34.reflexion.net [208.70.210.34]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6270A15FC for ; Sun, 20 Nov 2016 03:27:08 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 12615 invoked from network); 20 Nov 2016 03:27:39 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 03:27:39 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 22:27:12 -0500 (EST) Received: (qmail 1819 invoked from network); 20 Nov 2016 03:27:12 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 03:27:12 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 59815EC901D; Sat, 19 Nov 2016 19:27:05 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: Date: Sat, 19 Nov 2016 19:27:04 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:27:08 -0000 [Top post about patch issues.] Looking at the patch it seems to be designed for when #else was in use: > -#else > +#elif defined(BOOKE) but -r308817 already has the 2nd line (BOOKE). Your patch shows: > Index: sys/powerpc/include/pmap.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/powerpc/include/pmap.h (revision 308718) > +++ sys/powerpc/include/pmap.h (working copy) So it looks like you started from before -r308817 . Trying it (I'm at -r308860): > Patching file sys/powerpc/include/pmap.h using Plan A... > Hunk #1 succeeded at 74. > Hunk #2 succeeded at 84. > Hunk #3 succeeded at 132. > Hunk #4 succeeded at 145. > Hunk #5 failed at 180. > Hunk #6 succeeded at 194. > Hunk #7 succeeded at 210. > 1 out of 7 hunks failed--saving rejects to = sys/powerpc/include/pmap.h.rej > # more sys/powerpc/include/pmap.h.rej > @@ -179,13 +180,13 @@ > struct slb **slb_alloc_user_cache(void); > void slb_free_user_cache(struct slb **); > =20 > -#else > +#elif defined(BOOKE) > =20 > struct pmap { > + struct pmap_statistics pm_stats; /* pmap statistics */ > struct mtx pm_mtx; /* pmap mutex */ > tlbtid_t pm_tid[MAXCPU]; /* TID to identify = this pmap entries in TLB */ > cpuset_t pm_active; /* active on cpus */ > - struct pmap_statistics pm_stats; /* pmap statistics */ > =20 > /* Page table directory, array of pointers to page tables. */ > pte_t *pm_pdir[PDIR_NENTRIES]; =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Nov-19, at 7:00 PM, Mark Millard wrote: It may take a little bit but I'll try the patch. It looks like sys/powerpc/include/pmap.h from -r176700 from 2088-Mar-3 is when the BOOKE/E500 split started with the preprocessor use of AIM and #else . This predates PowerMac G5 support. This is definitely not new for the general structure on the powerpc side of things. Any place that did not have the AIM vs. not status available was subject to problems of possibly mismatched definitions. =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Nov-19, at 6:47 PM, Justin Hibbits = wrote: On Sat, 19 Nov 2016 18:36:39 -0800 Mark Millard wrote: > [Quick top post I'm afraid.] >=20 > I think that I figured out why there is a problem even earlier > --that just did not stop the compiles. >=20 > lib/libutil/kinfo_getallproc.c is built here as part of buildworld > (stage 4.2 "building libraries" instead of buildkernel. It does not > have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of > them). >=20 > So if it includes machine/pmap.h that binds to > sys/powerpc/include/pmap.h which has the structure. . . >=20 > . . . > #if defined(AIM) > . . . (definitions here) > #elif defined(BOOKE) > . . . (definitions here) > #endif > . . . >=20 > it gets no definition now. >=20 > With the older: >=20 > . . . > #if defined(AIM) > . . . (definitions here) > #else > . . . (definitions here) > #endif > . . . >=20 > It got a definition, just not necessarily the right one. >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net Can you try the attached patch? There was a subtle ABI issue that r308817 exposed, which is that the pmap structs aren't identical such that the pm_stats are at different locations, and libkvm ends up reading with the Book-E pmap, getting different stats than expected for AIM. This patch fixes that, bumping version to account for this ABI change. - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 03:32:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 56502C3E235; Sun, 20 Nov 2016 03:32:49 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ua0-x244.google.com (mail-ua0-x244.google.com [IPv6:2607:f8b0:400c:c08::244]) (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 0B39A1B66; Sun, 20 Nov 2016 03:32:49 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-ua0-x244.google.com with SMTP id b35so21986677uaa.1; Sat, 19 Nov 2016 19:32: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:from:date:message-id :subject:to:cc; bh=qNKNmklHlKbaCmehOfmM3JPjpN2lrAeph0Ex76VSFkY=; b=uRFFIaa2t8txV0b5eYyQ2JYLdgpXGVzxosoUhrMi3vri99HiHB1RQc1EoP2/HJtEWH nE0GXYADhesb5wTaT+fJ/uIdlaWjh3HBNx4+IxpHUNPDq4j4E/IgU8i/D8vHixynEF9G 2afEhD8sc4BVmUVI6J1hkgfO1aEPCGFP+on5I4q2tCMCEmvQ5fLmmuT/VEG9LBNVY6g4 s99htDPLxKWN1XUpJdEa1vmNMtAnoEhdReX342occHk5RjBG8J2BXHnDGyl3myVJoBbv Yn1mSI6495aFw9gDtYwqJZKWMIoSHvHWLwmtTvUQQqoqc3VwFhEJUtA1PZpvWm42f8/b YcRQ== 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; bh=qNKNmklHlKbaCmehOfmM3JPjpN2lrAeph0Ex76VSFkY=; b=Mq++jj9iJljq2uN5h9RwwAPJ7e8pVhgs2tIGPyp4ta1Pot4knTOV/U6iTwkXuO9MVg 1nfq2sQeB0wnWWYISH6XoiHOTSKaCDT0vHo+zHdlJvk9UFNKY2CZxsMi31pVkLTfVsvG njtmEB28qWh2UpVsIXq5tXSYMzl/M7CRMJzNsD0yv0TxP9SB0sdpdnVb2Y1iutjTEHz7 qmTwvkvkPPGjFbuyHDWibDiwlCEroErBRR7Pl1uG/nn5cOP5XbRi59LlNB4vlFhh8y5T /LqFsV3zYPBzI+z0GpYjQ4GGXehj539hE8l6agcpg0nU3vpVuScuaOXO4rPlYTMjrKxZ EKFg== X-Gm-Message-State: AKaTC01KsY8yoSpC1ZywiZdBR/Cz+RaGPpIM3fOvHd5ugnyk/RlfC2LMvezLyIxdSTBDuD3dyVL9V7W1vFUF5Q== X-Received: by 10.176.80.46 with SMTP id b43mr3978132uaa.135.1479612768097; Sat, 19 Nov 2016 19:32:48 -0800 (PST) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.103.150.66 with HTTP; Sat, 19 Nov 2016 19:32:47 -0800 (PST) Received: by 10.103.150.66 with HTTP; Sat, 19 Nov 2016 19:32:47 -0800 (PST) In-Reply-To: <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> From: Justin Hibbits Date: Sat, 19 Nov 2016 21:32:47 -0600 X-Google-Sender-Auth: hJUhpIz5GPzFTX-rTAHWerZAWTc Message-ID: Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] To: Mark Millard Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:32:49 -0000 Sorry, I generated the diff from a different tree that wasn't synced to head (had the same change in both trees originally). If that is the only problem, you can ignore it and try the rest. I can generate another diff later too. - Justin On Nov 19, 2016 21:27, "Mark Millard" wrote: > [Top post about patch issues.] > > Looking at the patch it seems to be designed for when #else was in use: > > > -#else > > +#elif defined(BOOKE) > > but -r308817 already has the 2nd line (BOOKE). Your patch shows: > > > Index: sys/powerpc/include/pmap.h > > =================================================================== > > --- sys/powerpc/include/pmap.h (revision 308718) > > +++ sys/powerpc/include/pmap.h (working copy) > > So it looks like you started from before -r308817 . > > Trying it (I'm at -r308860): > > > Patching file sys/powerpc/include/pmap.h using Plan A... > > Hunk #1 succeeded at 74. > > Hunk #2 succeeded at 84. > > Hunk #3 succeeded at 132. > > Hunk #4 succeeded at 145. > > Hunk #5 failed at 180. > > Hunk #6 succeeded at 194. > > Hunk #7 succeeded at 210. > > 1 out of 7 hunks failed--saving rejects to sys/powerpc/include/pmap.h.rej > > > # more sys/powerpc/include/pmap.h.rej > > @@ -179,13 +180,13 @@ > > struct slb **slb_alloc_user_cache(void); > > void slb_free_user_cache(struct slb **); > > > > -#else > > +#elif defined(BOOKE) > > > > struct pmap { > > + struct pmap_statistics pm_stats; /* pmap statistics */ > > struct mtx pm_mtx; /* pmap mutex */ > > tlbtid_t pm_tid[MAXCPU]; /* TID to identify this > pmap entries in TLB */ > > cpuset_t pm_active; /* active on cpus */ > > - struct pmap_statistics pm_stats; /* pmap statistics */ > > > > /* Page table directory, array of pointers to page tables. */ > > pte_t *pm_pdir[PDIR_NENTRIES]; > > > === > Mark Millard > markmi at dsl-only.net > > On 2016-Nov-19, at 7:00 PM, Mark Millard wrote: > > It may take a little bit but I'll try the patch. > > It looks like sys/powerpc/include/pmap.h from -r176700 from 2088-Mar-3 > is when the BOOKE/E500 split started with the preprocessor use of AIM > and #else . This predates PowerMac G5 support. > > This is definitely not new for the general structure on the powerpc > side of things. Any place that did not have the AIM vs. not status > available was subject to problems of possibly mismatched definitions. > > === > Mark Millard > markmi at dsl-only.net > > On 2016-Nov-19, at 6:47 PM, Justin Hibbits > wrote: > > On Sat, 19 Nov 2016 18:36:39 -0800 > Mark Millard wrote: > > > [Quick top post I'm afraid.] > > > > I think that I figured out why there is a problem even earlier > > --that just did not stop the compiles. > > > > lib/libutil/kinfo_getallproc.c is built here as part of buildworld > > (stage 4.2 "building libraries" instead of buildkernel. It does not > > have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of > > them). > > > > So if it includes machine/pmap.h that binds to > > sys/powerpc/include/pmap.h which has the structure. . . > > > > . . . > > #if defined(AIM) > > . . . (definitions here) > > #elif defined(BOOKE) > > . . . (definitions here) > > #endif > > . . . > > > > it gets no definition now. > > > > With the older: > > > > . . . > > #if defined(AIM) > > . . . (definitions here) > > #else > > . . . (definitions here) > > #endif > > . . . > > > > It got a definition, just not necessarily the right one. > > > > > > === > > Mark Millard > > markmi at dsl-only.net > > Can you try the attached patch? There was a subtle ABI issue that > r308817 exposed, which is that the pmap structs aren't identical such > that the pm_stats are at different locations, and libkvm ends up > reading with the Book-E pmap, getting different stats than expected for > AIM. This patch fixes that, bumping version to account for this ABI > change. > > - Justin > > > From owner-svn-src-head@freebsd.org Sun Nov 20 03:36:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C837AC3E328 for ; Sun, 20 Nov 2016 03:36:28 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-29.reflexion.net [208.70.210.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 88F7D1D2A for ; Sun, 20 Nov 2016 03:36:27 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 8908 invoked from network); 20 Nov 2016 03:36:12 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 03:36:12 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 22:36:36 -0500 (EST) Received: (qmail 10124 invoked from network); 20 Nov 2016 03:36:36 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 03:36:36 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id ACA0EEC902D; Sat, 19 Nov 2016 19:36:25 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: Date: Sat, 19 Nov 2016 19:36:25 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:36:28 -0000 On 2016-Nov-19, at 7:32 PM, Justin Hibbits wrote: > Sorry, I generated the diff from a different tree that wasn't synced = to head (had the same change in both trees originally). If that is the = only problem, you can ignore it and try the rest. I can generate another = diff later too. > - Justin Yep: I manually did the move of the pm_stats line and am building. =3D=3D=3D Mark Millard markmi at dsl-only.net On Nov 19, 2016 21:27, "Mark Millard" wrote: > [Top post about patch issues.] >=20 > Looking at the patch it seems to be designed for when #else was in = use: >=20 > > -#else > > +#elif defined(BOOKE) >=20 > but -r308817 already has the 2nd line (BOOKE). Your patch shows: >=20 > > Index: sys/powerpc/include/pmap.h > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > --- sys/powerpc/include/pmap.h (revision 308718) > > +++ sys/powerpc/include/pmap.h (working copy) >=20 > So it looks like you started from before -r308817 . >=20 > Trying it (I'm at -r308860): >=20 > > Patching file sys/powerpc/include/pmap.h using Plan A... > > Hunk #1 succeeded at 74. > > Hunk #2 succeeded at 84. > > Hunk #3 succeeded at 132. > > Hunk #4 succeeded at 145. > > Hunk #5 failed at 180. > > Hunk #6 succeeded at 194. > > Hunk #7 succeeded at 210. > > 1 out of 7 hunks failed--saving rejects to = sys/powerpc/include/pmap.h.rej >=20 > > # more sys/powerpc/include/pmap.h.rej > > @@ -179,13 +180,13 @@ > > struct slb **slb_alloc_user_cache(void); > > void slb_free_user_cache(struct slb **); > > > > -#else > > +#elif defined(BOOKE) > > > > struct pmap { > > + struct pmap_statistics pm_stats; /* pmap statistics = */ > > struct mtx pm_mtx; /* pmap mutex */ > > tlbtid_t pm_tid[MAXCPU]; /* TID to identify = this pmap entries in TLB */ > > cpuset_t pm_active; /* active on cpus */ > > - struct pmap_statistics pm_stats; /* pmap statistics = */ > > > > /* Page table directory, array of pointers to page tables. = */ > > pte_t *pm_pdir[PDIR_NENTRIES]; >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 7:00 PM, Mark Millard wrote: >=20 > It may take a little bit but I'll try the patch. >=20 > It looks like sys/powerpc/include/pmap.h from -r176700 from 2088-Mar-3 > is when the BOOKE/E500 split started with the preprocessor use of AIM > and #else . This predates PowerMac G5 support. >=20 > This is definitely not new for the general structure on the powerpc > side of things. Any place that did not have the AIM vs. not status > available was subject to problems of possibly mismatched definitions. >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 6:47 PM, Justin Hibbits = wrote: >=20 > On Sat, 19 Nov 2016 18:36:39 -0800 > Mark Millard wrote: >=20 > > [Quick top post I'm afraid.] > > > > I think that I figured out why there is a problem even earlier > > --that just did not stop the compiles. > > > > lib/libutil/kinfo_getallproc.c is built here as part of buildworld > > (stage 4.2 "building libraries" instead of buildkernel. It does not > > have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of > > them). > > > > So if it includes machine/pmap.h that binds to > > sys/powerpc/include/pmap.h which has the structure. . . > > > > . . . > > #if defined(AIM) > > . . . (definitions here) > > #elif defined(BOOKE) > > . . . (definitions here) > > #endif > > . . . > > > > it gets no definition now. > > > > With the older: > > > > . . . > > #if defined(AIM) > > . . . (definitions here) > > #else > > . . . (definitions here) > > #endif > > . . . > > > > It got a definition, just not necessarily the right one. > > > > > > =3D=3D=3D > > Mark Millard > > markmi at dsl-only.net >=20 > Can you try the attached patch? There was a subtle ABI issue that > r308817 exposed, which is that the pmap structs aren't identical such > that the pm_stats are at different locations, and libkvm ends up > reading with the Book-E pmap, getting different stats than expected = for > AIM. This patch fixes that, bumping version to account for this ABI > change. >=20 > - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 03:42:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 71147C3E5FD for ; Sun, 20 Nov 2016 03:42:30 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-35.reflexion.net [208.70.210.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 376E71D2 for ; Sun, 20 Nov 2016 03:42:29 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 3427 invoked from network); 20 Nov 2016 03:42:14 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 03:42:14 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 22:42:38 -0500 (EST) Received: (qmail 19248 invoked from network); 20 Nov 2016 03:42:38 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 03:42:38 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 83430EC901D; Sat, 19 Nov 2016 19:42:27 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: Date: Sat, 19 Nov 2016 19:42:27 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:42:30 -0000 On 2016-Nov-19, at 7:36 PM, Mark Millard wrote: > On 2016-Nov-19, at 7:32 PM, Justin Hibbits = wrote: >=20 >> Sorry, I generated the diff from a different tree that wasn't synced = to head (had the same change in both trees originally). If that is the = only problem, you can ignore it and try the rest. I can generate another = diff later too. >> - Justin >=20 > Yep: I manually did the move of the pm_stats line and am building. If it builds and I install it on a PowerMac G5 and it boots, what do I do to test if pm_stats and pm_mtx seems to be working well/right for the out of kernel code? Do you know of a reasonable test? =3D=3D=3D Mark Millard markmi at dsl-only.net On Nov 19, 2016 21:27, "Mark Millard" wrote: > [Top post about patch issues.] >=20 > Looking at the patch it seems to be designed for when #else was in = use: >=20 >> -#else >> +#elif defined(BOOKE) >=20 > but -r308817 already has the 2nd line (BOOKE). Your patch shows: >=20 >> Index: sys/powerpc/include/pmap.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- sys/powerpc/include/pmap.h (revision 308718) >> +++ sys/powerpc/include/pmap.h (working copy) >=20 > So it looks like you started from before -r308817 . >=20 > Trying it (I'm at -r308860): >=20 >> Patching file sys/powerpc/include/pmap.h using Plan A... >> Hunk #1 succeeded at 74. >> Hunk #2 succeeded at 84. >> Hunk #3 succeeded at 132. >> Hunk #4 succeeded at 145. >> Hunk #5 failed at 180. >> Hunk #6 succeeded at 194. >> Hunk #7 succeeded at 210. >> 1 out of 7 hunks failed--saving rejects to = sys/powerpc/include/pmap.h.rej >=20 >> # more sys/powerpc/include/pmap.h.rej >> @@ -179,13 +180,13 @@ >> struct slb **slb_alloc_user_cache(void); >> void slb_free_user_cache(struct slb **); >>=20 >> -#else >> +#elif defined(BOOKE) >>=20 >> struct pmap { >> + struct pmap_statistics pm_stats; /* pmap statistics */ >> struct mtx pm_mtx; /* pmap mutex */ >> tlbtid_t pm_tid[MAXCPU]; /* TID to identify = this pmap entries in TLB */ >> cpuset_t pm_active; /* active on cpus */ >> - struct pmap_statistics pm_stats; /* pmap statistics */ >>=20 >> /* Page table directory, array of pointers to page tables. */ >> pte_t *pm_pdir[PDIR_NENTRIES]; >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 7:00 PM, Mark Millard = wrote: >=20 > It may take a little bit but I'll try the patch. >=20 > It looks like sys/powerpc/include/pmap.h from -r176700 from 2088-Mar-3 > is when the BOOKE/E500 split started with the preprocessor use of AIM > and #else . This predates PowerMac G5 support. >=20 > This is definitely not new for the general structure on the powerpc > side of things. Any place that did not have the AIM vs. not status > available was subject to problems of possibly mismatched definitions. >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 6:47 PM, Justin Hibbits = wrote: >=20 > On Sat, 19 Nov 2016 18:36:39 -0800 > Mark Millard wrote: >=20 >> [Quick top post I'm afraid.] >>=20 >> I think that I figured out why there is a problem even earlier >> --that just did not stop the compiles. >>=20 >> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >> (stage 4.2 "building libraries" instead of buildkernel. It does not >> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >> them). >>=20 >> So if it includes machine/pmap.h that binds to >> sys/powerpc/include/pmap.h which has the structure. . . >>=20 >> . . . >> #if defined(AIM) >> . . . (definitions here) >> #elif defined(BOOKE) >> . . . (definitions here) >> #endif >> . . . >>=20 >> it gets no definition now. >>=20 >> With the older: >>=20 >> . . . >> #if defined(AIM) >> . . . (definitions here) >> #else >> . . . (definitions here) >> #endif >> . . . >>=20 >> It got a definition, just not necessarily the right one. >>=20 >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >=20 > Can you try the attached patch? There was a subtle ABI issue that > r308817 exposed, which is that the pmap structs aren't identical such > that the pm_stats are at different locations, and libkvm ends up > reading with the Book-E pmap, getting different stats than expected = for > AIM. This patch fixes that, bumping version to account for this ABI > change. >=20 > - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 03:47:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E338AC3E779; Sun, 20 Nov 2016 03:47:14 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-ua0-x244.google.com (mail-ua0-x244.google.com [IPv6:2607:f8b0:400c:c08::244]) (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 8F1273E3; Sun, 20 Nov 2016 03:47:14 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-ua0-x244.google.com with SMTP id 12so21930386uas.3; Sat, 19 Nov 2016 19:47: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:from:date:message-id :subject:to:cc; bh=mI9MRGFIKXmuxE1f8S5aMkI5pTnI7wcygirI2MBqFSY=; b=vKELH3mz0+SeQf/ZwVcIa/WNbTc2RIhliFSkXdjcmLLiGg6nDFSYrW8bpoXpWj+anf JKq57bF4Nzy2+ofjbJTFX0goy82X+DfB0Ru2jc+YboJ1FjhNXjK4eGdNa/opo+ASUC2F i49GojtjilBs/jthMhLAs7Po1/KYNORk5XTAAtbjmD2keenk6crPEsSI78acTY4qO1bn X+WrZ+wxmFXjTzjT5fz3z3TdwoUP2qW2eJ76wb3uoZgH8wIxadTJXTgX5tlhWRpykL0S 4uMyzt7shGePpI74hw+W2OGFvwZJvY0CIxk+/1HlOnaKvGntS0cHFfs92ww6uESPT7qb o80Q== 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; bh=mI9MRGFIKXmuxE1f8S5aMkI5pTnI7wcygirI2MBqFSY=; b=MExBhu4jB30SfHyT3nPMt4NBT2A+M9879yRhDL6i19yTSRNZHI+4WQ/lZZ+ZqhcIiA hRzrXgK6XK7Ple6XAWzGmu5AZkHRMvjsimFo5hWwHTJFH0dy4QrimElARAeOGhNjYObK Vyp7qE4/s0+691899G4oaG62VWoCPPCYMOUK8i09jRp0vblEW8Ehw5J755RNBstp2WMA RrJVV1F6AYMgfAq5tB5j0LrjMQhRxNCGYXl86IgsGToZ7aPbchZCacfBGK9wfGF75X+D wSJ3ymdFzWbm8wXOxoqbHh5uH6OoVoXJISZHiLVT28wSy/ZuqSycYY5+rmsOl6pxg234 KA8w== X-Gm-Message-State: AKaTC03XfoFiBFbo3sv4zGtkq30RCcHiF0+daPuKqb8BNhOb4vOMyzrn0XK9TimSPqAnGD86NL5xu0AO8X3mfg== X-Received: by 10.176.80.101 with SMTP id z34mr4117623uaz.140.1479613633752; Sat, 19 Nov 2016 19:47:13 -0800 (PST) MIME-Version: 1.0 Sender: chmeeedalf@gmail.com Received: by 10.103.150.66 with HTTP; Sat, 19 Nov 2016 19:47:12 -0800 (PST) Received: by 10.103.150.66 with HTTP; Sat, 19 Nov 2016 19:47:12 -0800 (PST) In-Reply-To: <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> From: Justin Hibbits Date: Sat, 19 Nov 2016 21:47:12 -0600 X-Google-Sender-Auth: p41Qez5AmZlmwwexVot_DeMQGvQ Message-ID: Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] To: Mark Millard Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:47:15 -0000 On Nov 19, 2016 21:42, "Mark Millard" wrote: > > On 2016-Nov-19, at 7:36 PM, Mark Millard wrote: > > > On 2016-Nov-19, at 7:32 PM, Justin Hibbits wrote: > > > >> Sorry, I generated the diff from a different tree that wasn't synced to head (had the same change in both trees originally). If that is the only problem, you can ignore it and try the rest. I can generate another diff later too. > >> - Justin > > > > Yep: I manually did the move of the pm_stats line and am building. > > If it builds and I install it on a PowerMac G5 and it boots, what do I > do to test if pm_stats and pm_mtx seems to be working well/right for > the out of kernel code? Do you know of a reasonable test? > > === > Mark Millard > markmi at dsl-only.net I think using procstat should work. Not at my machine right now so can't really check the man page, but libprocstat and libkvm both read vmspace, so that's a likely candidate. - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 03:47:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 62216C3E7DB for ; Sun, 20 Nov 2016 03:47:34 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-31.reflexion.net [208.70.210.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1E532765 for ; Sun, 20 Nov 2016 03:47:33 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 17649 invoked from network); 20 Nov 2016 03:47:18 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 03:47:18 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 22:47:38 -0500 (EST) Received: (qmail 7780 invoked from network); 20 Nov 2016 03:47:38 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 03:47:38 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 880F2EC903D; Sat, 19 Nov 2016 19:47:31 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> Date: Sat, 19 Nov 2016 19:47:31 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 03:47:34 -0000 [Top post of bad news.] With the patch I get a different incomplete type used in libmemstat: struct md_page --- all_subdir_lib/libmemstat --- In file included from /usr/src/lib/libmemstat/memstat_uma.c:34:0: /usr/src/sys/vm/vm_page.h:144:17: error: field 'md' has incomplete type struct md_page md; /* machine dependent stuff */ ^ *** [memstat_uma.o] Error code 1 make[5]: stopped in /usr/src/lib/libmemstat =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Nov-19, at 7:42 PM, Mark Millard wrote: > On 2016-Nov-19, at 7:36 PM, Mark Millard = wrote: >=20 >> On 2016-Nov-19, at 7:32 PM, Justin Hibbits = wrote: >>=20 >>> Sorry, I generated the diff from a different tree that wasn't synced = to head (had the same change in both trees originally). If that is the = only problem, you can ignore it and try the rest. I can generate another = diff later too. >>> - Justin >>=20 >> Yep: I manually did the move of the pm_stats line and am building. >=20 > If it builds and I install it on a PowerMac G5 and it boots, what do I > do to test if pm_stats and pm_mtx seems to be working well/right for > the out of kernel code? Do you know of a reasonable test? >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 On Nov 19, 2016 21:27, "Mark Millard" wrote: > [Top post about patch issues.] >=20 > Looking at the patch it seems to be designed for when #else was in = use: >=20 >> -#else >> +#elif defined(BOOKE) >=20 > but -r308817 already has the 2nd line (BOOKE). Your patch shows: >=20 >> Index: sys/powerpc/include/pmap.h >> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >> --- sys/powerpc/include/pmap.h (revision 308718) >> +++ sys/powerpc/include/pmap.h (working copy) >=20 > So it looks like you started from before -r308817 . >=20 > Trying it (I'm at -r308860): >=20 >> Patching file sys/powerpc/include/pmap.h using Plan A... >> Hunk #1 succeeded at 74. >> Hunk #2 succeeded at 84. >> Hunk #3 succeeded at 132. >> Hunk #4 succeeded at 145. >> Hunk #5 failed at 180. >> Hunk #6 succeeded at 194. >> Hunk #7 succeeded at 210. >> 1 out of 7 hunks failed--saving rejects to = sys/powerpc/include/pmap.h.rej >=20 >> # more sys/powerpc/include/pmap.h.rej >> @@ -179,13 +180,13 @@ >> struct slb **slb_alloc_user_cache(void); >> void slb_free_user_cache(struct slb **); >>=20 >> -#else >> +#elif defined(BOOKE) >>=20 >> struct pmap { >> + struct pmap_statistics pm_stats; /* pmap statistics */ >> struct mtx pm_mtx; /* pmap mutex */ >> tlbtid_t pm_tid[MAXCPU]; /* TID to identify this = pmap entries in TLB */ >> cpuset_t pm_active; /* active on cpus */ >> - struct pmap_statistics pm_stats; /* pmap statistics */ >>=20 >> /* Page table directory, array of pointers to page tables. */ >> pte_t *pm_pdir[PDIR_NENTRIES]; >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 7:00 PM, Mark Millard = wrote: >=20 > It may take a little bit but I'll try the patch. >=20 > It looks like sys/powerpc/include/pmap.h from -r176700 from 2088-Mar-3 > is when the BOOKE/E500 split started with the preprocessor use of AIM > and #else . This predates PowerMac G5 support. >=20 > This is definitely not new for the general structure on the powerpc > side of things. Any place that did not have the AIM vs. not status > available was subject to problems of possibly mismatched definitions. >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 6:47 PM, Justin Hibbits = wrote: >=20 > On Sat, 19 Nov 2016 18:36:39 -0800 > Mark Millard wrote: >=20 >> [Quick top post I'm afraid.] >>=20 >> I think that I figured out why there is a problem even earlier >> --that just did not stop the compiles. >>=20 >> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >> (stage 4.2 "building libraries" instead of buildkernel. It does not >> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >> them). >>=20 >> So if it includes machine/pmap.h that binds to >> sys/powerpc/include/pmap.h which has the structure. . . >>=20 >> . . . >> #if defined(AIM) >> . . . (definitions here) >> #elif defined(BOOKE) >> . . . (definitions here) >> #endif >> . . . >>=20 >> it gets no definition now. >>=20 >> With the older: >>=20 >> . . . >> #if defined(AIM) >> . . . (definitions here) >> #else >> . . . (definitions here) >> #endif >> . . . >>=20 >> It got a definition, just not necessarily the right one. >>=20 >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >=20 > Can you try the attached patch? There was a subtle ABI issue that > r308817 exposed, which is that the pmap structs aren't identical such > that the pm_stats are at different locations, and libkvm ends up > reading with the Book-E pmap, getting different stats than expected = for > AIM. This patch fixes that, bumping version to account for this ABI > change. >=20 > - Justin From owner-svn-src-head@freebsd.org Sun Nov 20 04:06:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0792CC3EDAA; Sun, 20 Nov 2016 04:06:42 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it0-x242.google.com (mail-it0-x242.google.com [IPv6:2607:f8b0:4001:c0b::242]) (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 BE973105F; Sun, 20 Nov 2016 04:06:41 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it0-x242.google.com with SMTP id o1so11063147ito.1; Sat, 19 Nov 2016 20:06:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:cc:message-id:from:to:in-reply-to:content-transfer-encoding :mime-version:subject:date:references; bh=rqgZhIfxVvcVfRGWagbCvcWgqV9GSyZanKf98ksIl4M=; b=HGMhI3XOM1MpPLxTG5mp34oNpzAFVN4pZWP4LwO4pE8PFhEOWBduF6j6WwJ9Gk6FOi dWF0WKvw4CjbJajO9Ob7UZ9BfrvFQAvi/LwfmY4no9IIgaJZdAHfxyUjCUQWs3HOBuSE jHtv59eDKMg3IhQgNPiUu6RiDji8ab91V7c+1FO2hI++GIhzGCnl/cb+j1RPok64E0EK w5kekCBgG20y9646i57Y21Q2IL7IrEQUKITpCKw5lM8Dd2xNKlJpsOSRSJ8XA4kk7h1O 53RjrpySRcG6kNahxZEqQ3y8fCOlo3K2wG6toEWMesrOiIIDQPFD952412PYQCjmW4/J IqRw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:cc:message-id:from:to:in-reply-to :content-transfer-encoding:mime-version:subject:date:references; bh=rqgZhIfxVvcVfRGWagbCvcWgqV9GSyZanKf98ksIl4M=; b=adpU/JoBeU+ctiuIEeSTgcUk7WvLyPbELqA/OMrd/vZKwaYabqjXbmyaryURg8dnn/ 4cfRA96M811yjVYAg+xlNjUIaYHSI8jHgGlk1OMz96jLj6i4imphnCu79J4xjYadDFY3 yrYwf9AD0DLlqcljyHN+rFWwk2vh8wGH+yPInRIzHtvsbadCecgqhWk4lcLo1F1D7qJA XHvlCL5FyeqHeiy7CpmtqlbYy8SVO82dGLiCnIiO4d4XZdavpRlhYeHRZU9kLEkRkzjj oJFizMcoGgqr57H6nh9JazZhHhxG2o8NkEiiocRunpP9tjoOAuv9E4DmfHKNxI13SZ8I JkFQ== X-Gm-Message-State: AKaTC00YL0NUdLT1xLTndFECvAGETmhmP/dYZ8pGJcA5f3nrByI+5eVilu27R2vKD/ZXJw== X-Received: by 10.36.159.193 with SMTP id c184mr5035938ite.72.1479614800915; Sat, 19 Nov 2016 20:06:40 -0800 (PST) Received: from blackstar.knownspace (50-80-150-234.client.mchsi.com. [50.80.150.234]) by smtp.gmail.com with ESMTPSA id p20sm3855502itc.8.2016.11.19.20.06.39 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 19 Nov 2016 20:06:40 -0800 (PST) Sender: Justin Hibbits Cc: svn-src-head@freebsd.org, FreeBSD Current Message-Id: From: Justin Hibbits To: Mark Millard In-Reply-To: <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Date: Wed, 16 Nov 2016 22:33:28 -0600 References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> X-Mailer: Apple Mail (2.936) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 04:06:42 -0000 *sigh* okay, thanks. I just tested, and vm/vm_page.h, and vm/vm.h can both be removed from memstat_uma.c for it to compile. I'm kicking off a buildworld myself now, too, and hope to have it ready to commit tomorrow (takes a couple hours to buildworld on my G5). - Justin On Nov 19, 2016, at 9:47 PM, Mark Millard wrote: > [Top post of bad news.] > > With the patch I get a different incomplete type used in libmemstat: > > struct md_page > > --- all_subdir_lib/libmemstat --- > In file included from /usr/src/lib/libmemstat/memstat_uma.c:34:0: > /usr/src/sys/vm/vm_page.h:144:17: error: field 'md' has incomplete > type > struct md_page md; /* machine dependent stuff */ > ^ > *** [memstat_uma.o] Error code 1 > > make[5]: stopped in /usr/src/lib/libmemstat > > > === > Mark Millard > markmi at dsl-only.net > > On 2016-Nov-19, at 7:42 PM, Mark Millard > wrote: > >> On 2016-Nov-19, at 7:36 PM, Mark Millard >> wrote: >> >>> On 2016-Nov-19, at 7:32 PM, Justin Hibbits >> freebsd.org> wrote: >>> >>>> Sorry, I generated the diff from a different tree that wasn't >>>> synced to head (had the same change in both trees originally). If >>>> that is the only problem, you can ignore it and try the rest. I >>>> can generate another diff later too. >>>> - Justin >>> >>> Yep: I manually did the move of the pm_stats line and am building. >> >> If it builds and I install it on a PowerMac G5 and it boots, what >> do I >> do to test if pm_stats and pm_mtx seems to be working well/right for >> the out of kernel code? Do you know of a reasonable test? >> >> === >> Mark Millard >> markmi at dsl-only.net >> > On Nov 19, 2016 21:27, "Mark Millard" wrote: >> [Top post about patch issues.] >> >> Looking at the patch it seems to be designed for when #else was in >> use: >> >>> -#else >>> +#elif defined(BOOKE) >> >> but -r308817 already has the 2nd line (BOOKE). Your patch shows: >> >>> Index: sys/powerpc/include/pmap.h >>> =================================================================== >>> --- sys/powerpc/include/pmap.h (revision 308718) >>> +++ sys/powerpc/include/pmap.h (working copy) >> >> So it looks like you started from before -r308817 . >> >> Trying it (I'm at -r308860): >> >>> Patching file sys/powerpc/include/pmap.h using Plan A... >>> Hunk #1 succeeded at 74. >>> Hunk #2 succeeded at 84. >>> Hunk #3 succeeded at 132. >>> Hunk #4 succeeded at 145. >>> Hunk #5 failed at 180. >>> Hunk #6 succeeded at 194. >>> Hunk #7 succeeded at 210. >>> 1 out of 7 hunks failed--saving rejects to sys/powerpc/include/ >>> pmap.h.rej >> >>> # more sys/powerpc/include/pmap.h.rej >>> @@ -179,13 +180,13 @@ >>> struct slb **slb_alloc_user_cache(void); >>> void slb_free_user_cache(struct slb **); >>> >>> -#else >>> +#elif defined(BOOKE) >>> >>> struct pmap { >>> + struct pmap_statistics pm_stats; /* pmap statistics >>> */ >>> struct mtx pm_mtx; /* pmap mutex */ >>> tlbtid_t pm_tid[MAXCPU]; /* TID to identify >>> this pmap entries in TLB */ >>> cpuset_t pm_active; /* active on cpus */ >>> - struct pmap_statistics pm_stats; /* pmap statistics >>> */ >>> >>> /* Page table directory, array of pointers to page tables. */ >>> pte_t *pm_pdir[PDIR_NENTRIES]; >> >> >> === >> Mark Millard >> markmi at dsl-only.net >> >> On 2016-Nov-19, at 7:00 PM, Mark Millard >> wrote: >> >> It may take a little bit but I'll try the patch. >> >> It looks like sys/powerpc/include/pmap.h from -r176700 from 2088- >> Mar-3 >> is when the BOOKE/E500 split started with the preprocessor use of AIM >> and #else . This predates PowerMac G5 support. >> >> This is definitely not new for the general structure on the powerpc >> side of things. Any place that did not have the AIM vs. not status >> available was subject to problems of possibly mismatched definitions. >> >> === >> Mark Millard >> markmi at dsl-only.net >> >> On 2016-Nov-19, at 6:47 PM, Justin Hibbits > freebsd.org> wrote: >> >> On Sat, 19 Nov 2016 18:36:39 -0800 >> Mark Millard wrote: >> >>> [Quick top post I'm afraid.] >>> >>> I think that I figured out why there is a problem even earlier >>> --that just did not stop the compiles. >>> >>> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >>> (stage 4.2 "building libraries" instead of buildkernel. It does not >>> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >>> them). >>> >>> So if it includes machine/pmap.h that binds to >>> sys/powerpc/include/pmap.h which has the structure. . . >>> >>> . . . >>> #if defined(AIM) >>> . . . (definitions here) >>> #elif defined(BOOKE) >>> . . . (definitions here) >>> #endif >>> . . . >>> >>> it gets no definition now. >>> >>> With the older: >>> >>> . . . >>> #if defined(AIM) >>> . . . (definitions here) >>> #else >>> . . . (definitions here) >>> #endif >>> . . . >>> >>> It got a definition, just not necessarily the right one. >>> >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >> >> Can you try the attached patch? There was a subtle ABI issue that >> r308817 exposed, which is that the pmap structs aren't identical such >> that the pm_stats are at different locations, and libkvm ends up >> reading with the Book-E pmap, getting different stats than expected >> for >> AIM. This patch fixes that, bumping version to account for this ABI >> change. >> >> - Justin > > > From owner-svn-src-head@freebsd.org Sun Nov 20 04:22:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46463C484BA for ; Sun, 20 Nov 2016 04:22:12 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-29.reflexion.net [208.70.210.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 088B418E1 for ; Sun, 20 Nov 2016 04:22:11 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 22712 invoked from network); 20 Nov 2016 04:22:11 -0000 Received: from unknown (HELO mail-cs-01.app.dca.reflexion.local) (10.81.19.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 04:22:11 -0000 Received: by mail-cs-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sat, 19 Nov 2016 23:22:20 -0500 (EST) Received: (qmail 28663 invoked from network); 20 Nov 2016 04:22:20 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 04:22:20 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 5B3BBEC9142; Sat, 19 Nov 2016 20:22:09 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: Date: Sat, 19 Nov 2016 20:22:08 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <9CDAF14D-2953-4914-BD3D-C91F591DE7DD@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 04:22:12 -0000 On 2016-Nov-16, at 8:33 PM, Justin Hibbits wrote: > *sigh* okay, thanks. I just tested, and vm/vm_page.h, and vm/vm.h can = both be removed from memstat_uma.c for it to compile. I'm kicking off a = buildworld myself now, too, and hope to have it ready to commit tomorrow = (takes a couple hours to buildworld on my G5). >=20 > - Justin That will not be the only potential place: umastat.c in = tools/tools/umastat/ also has a include of vm/vm_page.h: > # find /usr/src/ -name .svn -prune -o -name sys -prune -o -name man = -prune -o -exec grep "vm_page[.]h" {} \; -print | more > #include > /usr/src/lib/libmemstat/memstat_uma.c > #define LIBMEMSTAT /* Cause vm_page.h not to include opt_vmpage.h = */ > #include > /usr/src/tools/tools/umastat/umastat.c =3D=3D=3D Mark Millard markmi at dsl-only.net On Nov 19, 2016, at 9:47 PM, Mark Millard wrote: > [Top post of bad news.] >=20 > With the patch I get a different incomplete type used in libmemstat: >=20 > struct md_page >=20 > --- all_subdir_lib/libmemstat --- > In file included from /usr/src/lib/libmemstat/memstat_uma.c:34:0: > /usr/src/sys/vm/vm_page.h:144:17: error: field 'md' has incomplete = type > struct md_page md; /* machine dependent stuff */ > ^ > *** [memstat_uma.o] Error code 1 >=20 > make[5]: stopped in /usr/src/lib/libmemstat >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On 2016-Nov-19, at 7:42 PM, Mark Millard = wrote: >=20 >> On 2016-Nov-19, at 7:36 PM, Mark Millard = wrote: >>=20 >>> On 2016-Nov-19, at 7:32 PM, Justin Hibbits = wrote: >>>=20 >>>> Sorry, I generated the diff from a different tree that wasn't = synced to head (had the same change in both trees originally). If that = is the only problem, you can ignore it and try the rest. I can generate = another diff later too. >>>> - Justin >>>=20 >>> Yep: I manually did the move of the pm_stats line and am building. >>=20 >> If it builds and I install it on a PowerMac G5 and it boots, what do = I >> do to test if pm_stats and pm_mtx seems to be working well/right for >> the out of kernel code? Do you know of a reasonable test? >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >>=20 > On Nov 19, 2016 21:27, "Mark Millard" wrote: >> [Top post about patch issues.] >>=20 >> Looking at the patch it seems to be designed for when #else was in = use: >>=20 >>> -#else >>> +#elif defined(BOOKE) >>=20 >> but -r308817 already has the 2nd line (BOOKE). Your patch shows: >>=20 >>> Index: sys/powerpc/include/pmap.h >>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>> --- sys/powerpc/include/pmap.h (revision 308718) >>> +++ sys/powerpc/include/pmap.h (working copy) >>=20 >> So it looks like you started from before -r308817 . >>=20 >> Trying it (I'm at -r308860): >>=20 >>> Patching file sys/powerpc/include/pmap.h using Plan A... >>> Hunk #1 succeeded at 74. >>> Hunk #2 succeeded at 84. >>> Hunk #3 succeeded at 132. >>> Hunk #4 succeeded at 145. >>> Hunk #5 failed at 180. >>> Hunk #6 succeeded at 194. >>> Hunk #7 succeeded at 210. >>> 1 out of 7 hunks failed--saving rejects to = sys/powerpc/include/pmap.h.rej >>=20 >>> # more sys/powerpc/include/pmap.h.rej >>> @@ -179,13 +180,13 @@ >>> struct slb **slb_alloc_user_cache(void); >>> void slb_free_user_cache(struct slb **); >>>=20 >>> -#else >>> +#elif defined(BOOKE) >>>=20 >>> struct pmap { >>> + struct pmap_statistics pm_stats; /* pmap statistics = */ >>> struct mtx pm_mtx; /* pmap mutex */ >>> tlbtid_t pm_tid[MAXCPU]; /* TID to identify this = pmap entries in TLB */ >>> cpuset_t pm_active; /* active on cpus */ >>> - struct pmap_statistics pm_stats; /* pmap statistics = */ >>>=20 >>> /* Page table directory, array of pointers to page tables. */ >>> pte_t *pm_pdir[PDIR_NENTRIES]; >>=20 >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >>=20 >> On 2016-Nov-19, at 7:00 PM, Mark Millard = wrote: >>=20 >> It may take a little bit but I'll try the patch. >>=20 >> It looks like sys/powerpc/include/pmap.h from -r176700 from = 2088-Mar-3 >> is when the BOOKE/E500 split started with the preprocessor use of AIM >> and #else . This predates PowerMac G5 support. >>=20 >> This is definitely not new for the general structure on the powerpc >> side of things. Any place that did not have the AIM vs. not status >> available was subject to problems of possibly mismatched definitions. >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >>=20 >> On 2016-Nov-19, at 6:47 PM, Justin Hibbits = wrote: >>=20 >> On Sat, 19 Nov 2016 18:36:39 -0800 >> Mark Millard wrote: >>=20 >>> [Quick top post I'm afraid.] >>>=20 >>> I think that I figured out why there is a problem even earlier >>> --that just did not stop the compiles. >>>=20 >>> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >>> (stage 4.2 "building libraries" instead of buildkernel. It does not >>> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >>> them). >>>=20 >>> So if it includes machine/pmap.h that binds to >>> sys/powerpc/include/pmap.h which has the structure. . . >>>=20 >>> . . . >>> #if defined(AIM) >>> . . . (definitions here) >>> #elif defined(BOOKE) >>> . . . (definitions here) >>> #endif >>> . . . >>>=20 >>> it gets no definition now. >>>=20 >>> With the older: >>>=20 >>> . . . >>> #if defined(AIM) >>> . . . (definitions here) >>> #else >>> . . . (definitions here) >>> #endif >>> . . . >>>=20 >>> It got a definition, just not necessarily the right one. >>>=20 >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> markmi at dsl-only.net >>=20 >> Can you try the attached patch? There was a subtle ABI issue that >> r308817 exposed, which is that the pmap structs aren't identical such >> that the pm_stats are at different locations, and libkvm ends up >> reading with the Book-E pmap, getting different stats than expected = for >> AIM. This patch fixes that, bumping version to account for this ABI >> change. >>=20 >> - Justin >=20 >=20 >=20 From owner-svn-src-head@freebsd.org Sun Nov 20 04:29:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BB005C485EC; Sun, 20 Nov 2016 04:29:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (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 6EE521A89; Sun, 20 Nov 2016 04:29:24 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io0-x244.google.com with SMTP id n13so2666942ioe.1; Sat, 19 Nov 2016 20:29:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:cc:message-id:from:to:in-reply-to:content-transfer-encoding :mime-version:subject:date:references; bh=UDdf3YkqEFON3x4jEaBjk5xBxdMUyE8zlWxw7ZtcEgI=; b=eYp+VFtNfln0bZKxl2qRoI3lGWAiHtURTX8pfAiFZW53NYAxd5mIcF/pyiLgkSJSyk eZAWWBO+vY+MOL3fjY1pTn2BGhX5lvk3S3Qpwg7gXoDKDu4oE5n8DlTpol5864A1Wlb6 ntcVwGEOg7L52Bzyk4cMtcXelx4dRmFr+lXy5tDLc3PGK6QNenPI3PGayjeG4ZPq2hzY rI5maG+OL+Eljc4Gb4lUrTzm01KaqPtEldmzXlM4IHRr8OeG93XHM9M9AGalEiibOFAe gtaSOPWKap4ek+UcmkEfF/J8FL2WaL2DNJbixixLP6RCQ8TZlWwmc2VAH6r/9VNq4Y/L RKTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:cc:message-id:from:to:in-reply-to :content-transfer-encoding:mime-version:subject:date:references; bh=UDdf3YkqEFON3x4jEaBjk5xBxdMUyE8zlWxw7ZtcEgI=; b=lPzh/slkNlo3pfKdRxQBqlaZ0CAwvDutwrR9MTPVe4oHm0sdCNjhVlrrObgkSsTAcA bzaa7gbwjY4jeZ4IZVfF4uGJIZbIDbnwuosQJslx1RGd9bPc9NRO2hIQCh1VeOxGkd5O lQqKG9qsAK3BnsXXYZQ44Yel5MSlAQXCB2tleChC+28X1ZTQXG6XVAps2cFh97P0cJqp qacL6Y4PTkm9K0uXF5oOtA43/kGUzmOVpqIwm0urrjiPaN+a78JH6fNXInZ+sts0Dv5K 0BPTvhzBKTksAwbG08Bca/tq2ZqbORkWeH7pgin3s1cSta+0b8VqIZNkw7UYKwiVCR6q LY0Q== X-Gm-Message-State: AKaTC018o9HpkCfCojVSUSyTnv+lUIxBHynmOpWcXyyrVcSIs/MDh5e0CYbIS9RDcBZOow== X-Received: by 10.107.9.82 with SMTP id j79mr5664802ioi.197.1479616163552; Sat, 19 Nov 2016 20:29:23 -0800 (PST) Received: from blackstar.knownspace (50-80-150-234.client.mchsi.com. [50.80.150.234]) by smtp.gmail.com with ESMTPSA id i75sm3890736itf.10.2016.11.19.20.29.21 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 19 Nov 2016 20:29:22 -0800 (PST) Sender: Justin Hibbits Cc: svn-src-head@freebsd.org, FreeBSD Current Message-Id: From: Justin Hibbits To: Mark Millard In-Reply-To: <9CDAF14D-2953-4914-BD3D-C91F591DE7DD@dsl-only.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Date: Sat, 19 Nov 2016 22:29:19 -0600 References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> <9CDAF14D-2953-4914-BD3D-C91F591DE7DD@dsl-only.net> X-Mailer: Apple Mail (2.936) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 04:29:24 -0000 umastat doesn't even build right now anyway. I just tried: [chmeee@zhabar:pts/29]:~...tools/umastat> make echo umastat.full: /usr/lib/libc.a /usr/lib/libkvm.a >> .depend Warning: Object directory not changed from original /home/chmeee/ freebsd/head/tools/tools/umastat cc -O2 -pipe -g -MD -MF.depend.umastat.o -MTumastat.o -std=gnu99 - fstack-protector-strong -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes - Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c umastat.c - o umastat.o umastat.c:136: error: 'UMA_ZONE_REFCNT' undeclared here (not in a function) *** Error code 1 - Justin On Nov 19, 2016, at 10:22 PM, Mark Millard wrote: > On 2016-Nov-16, at 8:33 PM, Justin Hibbits > wrote: > >> *sigh* okay, thanks. I just tested, and vm/vm_page.h, and vm/vm.h >> can both be removed from memstat_uma.c for it to compile. I'm >> kicking off a buildworld myself now, too, and hope to have it ready >> to commit tomorrow (takes a couple hours to buildworld on my G5). >> >> - Justin > > That will not be the only potential place: umastat.c in tools/tools/ > umastat/ > also has a include of vm/vm_page.h: > >> # find /usr/src/ -name .svn -prune -o -name sys -prune -o -name man >> -prune -o -exec grep "vm_page[.]h" {} \; -print | more >> #include >> /usr/src/lib/libmemstat/memstat_uma.c >> #define LIBMEMSTAT /* Cause vm_page.h not to include >> opt_vmpage.h */ >> #include >> /usr/src/tools/tools/umastat/umastat.c > > > === > Mark Millard > markmi at dsl-only.net > > On Nov 19, 2016, at 9:47 PM, Mark Millard wrote: > >> [Top post of bad news.] >> >> With the patch I get a different incomplete type used in libmemstat: >> >> struct md_page >> >> --- all_subdir_lib/libmemstat --- >> In file included from /usr/src/lib/libmemstat/memstat_uma.c:34:0: >> /usr/src/sys/vm/vm_page.h:144:17: error: field 'md' has incomplete >> type >> struct md_page md; /* machine dependent stuff */ >> ^ >> *** [memstat_uma.o] Error code 1 >> >> make[5]: stopped in /usr/src/lib/libmemstat >> >> >> === >> Mark Millard >> markmi at dsl-only.net >> >> On 2016-Nov-19, at 7:42 PM, Mark Millard >> wrote: >> >>> On 2016-Nov-19, at 7:36 PM, Mark Millard >>> wrote: >>> >>>> On 2016-Nov-19, at 7:32 PM, Justin Hibbits >>> freebsd.org> wrote: >>>> >>>>> Sorry, I generated the diff from a different tree that wasn't >>>>> synced to head (had the same change in both trees originally). >>>>> If that is the only problem, you can ignore it and try the rest. >>>>> I can generate another diff later too. >>>>> - Justin >>>> >>>> Yep: I manually did the move of the pm_stats line and am building. >>> >>> If it builds and I install it on a PowerMac G5 and it boots, what >>> do I >>> do to test if pm_stats and pm_mtx seems to be working well/right for >>> the out of kernel code? Do you know of a reasonable test? >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >>> >> On Nov 19, 2016 21:27, "Mark Millard" wrote: >>> [Top post about patch issues.] >>> >>> Looking at the patch it seems to be designed for when #else was in >>> use: >>> >>>> -#else >>>> +#elif defined(BOOKE) >>> >>> but -r308817 already has the 2nd line (BOOKE). Your patch shows: >>> >>>> Index: sys/powerpc/include/pmap.h >>>> =================================================================== >>>> --- sys/powerpc/include/pmap.h (revision 308718) >>>> +++ sys/powerpc/include/pmap.h (working copy) >>> >>> So it looks like you started from before -r308817 . >>> >>> Trying it (I'm at -r308860): >>> >>>> Patching file sys/powerpc/include/pmap.h using Plan A... >>>> Hunk #1 succeeded at 74. >>>> Hunk #2 succeeded at 84. >>>> Hunk #3 succeeded at 132. >>>> Hunk #4 succeeded at 145. >>>> Hunk #5 failed at 180. >>>> Hunk #6 succeeded at 194. >>>> Hunk #7 succeeded at 210. >>>> 1 out of 7 hunks failed--saving rejects to sys/powerpc/include/ >>>> pmap.h.rej >>> >>>> # more sys/powerpc/include/pmap.h.rej >>>> @@ -179,13 +180,13 @@ >>>> struct slb **slb_alloc_user_cache(void); >>>> void slb_free_user_cache(struct slb **); >>>> >>>> -#else >>>> +#elif defined(BOOKE) >>>> >>>> struct pmap { >>>> + struct pmap_statistics pm_stats; /* pmap >>>> statistics */ >>>> struct mtx pm_mtx; /* pmap mutex */ >>>> tlbtid_t pm_tid[MAXCPU]; /* TID to identify >>>> this pmap entries in TLB */ >>>> cpuset_t pm_active; /* active on cpus */ >>>> - struct pmap_statistics pm_stats; /* pmap >>>> statistics */ >>>> >>>> /* Page table directory, array of pointers to page tables. */ >>>> pte_t *pm_pdir[PDIR_NENTRIES]; >>> >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >>> >>> On 2016-Nov-19, at 7:00 PM, Mark Millard >>> wrote: >>> >>> It may take a little bit but I'll try the patch. >>> >>> It looks like sys/powerpc/include/pmap.h from -r176700 from 2088- >>> Mar-3 >>> is when the BOOKE/E500 split started with the preprocessor use of >>> AIM >>> and #else . This predates PowerMac G5 support. >>> >>> This is definitely not new for the general structure on the powerpc >>> side of things. Any place that did not have the AIM vs. not status >>> available was subject to problems of possibly mismatched >>> definitions. >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >>> >>> On 2016-Nov-19, at 6:47 PM, Justin Hibbits >> freebsd.org> wrote: >>> >>> On Sat, 19 Nov 2016 18:36:39 -0800 >>> Mark Millard wrote: >>> >>>> [Quick top post I'm afraid.] >>>> >>>> I think that I figured out why there is a problem even earlier >>>> --that just did not stop the compiles. >>>> >>>> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >>>> (stage 4.2 "building libraries" instead of buildkernel. It does not >>>> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >>>> them). >>>> >>>> So if it includes machine/pmap.h that binds to >>>> sys/powerpc/include/pmap.h which has the structure. . . >>>> >>>> . . . >>>> #if defined(AIM) >>>> . . . (definitions here) >>>> #elif defined(BOOKE) >>>> . . . (definitions here) >>>> #endif >>>> . . . >>>> >>>> it gets no definition now. >>>> >>>> With the older: >>>> >>>> . . . >>>> #if defined(AIM) >>>> . . . (definitions here) >>>> #else >>>> . . . (definitions here) >>>> #endif >>>> . . . >>>> >>>> It got a definition, just not necessarily the right one. >>>> >>>> >>>> === >>>> Mark Millard >>>> markmi at dsl-only.net >>> >>> Can you try the attached patch? There was a subtle ABI issue that >>> r308817 exposed, which is that the pmap structs aren't identical >>> such >>> that the pm_stats are at different locations, and libkvm ends up >>> reading with the Book-E pmap, getting different stats than >>> expected for >>> AIM. This patch fixes that, bumping version to account for this ABI >>> change. >>> >>> - Justin >> >> >> > > From owner-svn-src-head@freebsd.org Sun Nov 20 06:10:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F825C49DE3; Sun, 20 Nov 2016 06:10:14 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 426DF1691; Sun, 20 Nov 2016 06:10:14 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAK6AD6N093777; Sun, 20 Nov 2016 06:10:13 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAK6ADfG093773; Sun, 20 Nov 2016 06:10:13 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201611200610.uAK6ADfG093773@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 20 Nov 2016 06:10:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308873 - in head: . lib/libmemstat sys/powerpc/include tools/tools/umastat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 06:10:14 -0000 Author: jhibbits Date: Sun Nov 20 06:10:12 2016 New Revision: 308873 URL: https://svnweb.freebsd.org/changeset/base/308873 Log: Fix buildworld for powerpc. vmpage requires struct pmap to exist and contain a pm_stats field. As of r308817, either AIM or BOOKE is required to be set in order to get their respective pmap structs. Rather than expose them both, or try to unify them unnecessarily, add a third option which contains only a pm_stats field, and change the two existing pmap structures to place the common fields at the beginning of the struct. This actually fixes the stats collection by libkvm on AIM hardware, because before it was accessing a possibly different offset, which would cause it to read garbage. Bump __FreeBSD_version to denote this ABI change, so that ports which depend on libkvm can be rebuilt. Modified: head/UPDATING head/lib/libmemstat/memstat_uma.c head/sys/powerpc/include/pmap.h head/tools/tools/umastat/umastat.c Modified: head/UPDATING ============================================================================== --- head/UPDATING Sun Nov 20 01:59:22 2016 (r308872) +++ head/UPDATING Sun Nov 20 06:10:12 2016 (r308873) @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20161119: + The layout of the pmap structure has changed for powerpc to put the pmap + statistics at the front for all CPU variations. libkvm(3) and all tools + that link against it need to be recompiled. + 20161030: isl(4) and cyapa(4) drivers now require a new driver, chromebook_platform(4), to work properly on Chromebook-class hardware. Modified: head/lib/libmemstat/memstat_uma.c ============================================================================== --- head/lib/libmemstat/memstat_uma.c Sun Nov 20 01:59:22 2016 (r308872) +++ head/lib/libmemstat/memstat_uma.c Sun Nov 20 06:10:12 2016 (r308873) @@ -30,9 +30,6 @@ #include #include -#include -#include - #include #include Modified: head/sys/powerpc/include/pmap.h ============================================================================== --- head/sys/powerpc/include/pmap.h Sun Nov 20 01:59:22 2016 (r308872) +++ head/sys/powerpc/include/pmap.h Sun Nov 20 06:10:12 2016 (r308873) @@ -74,6 +74,9 @@ #include #include +struct pmap; +typedef struct pmap *pmap_t; + #if defined(AIM) #if !defined(NPMAPS) @@ -81,8 +84,6 @@ #endif /* !defined(NPMAPS) */ struct slbtnode; -struct pmap; -typedef struct pmap *pmap_t; struct pvo_entry { LIST_ENTRY(pvo_entry) pvo_vlink; /* Link to common virt page */ @@ -131,6 +132,7 @@ RB_PROTOTYPE(pvo_tree, pvo_entry, pvo_pl #define PVO_VSID(pvo) ((pvo)->pvo_vpn >> 16) struct pmap { + struct pmap_statistics pm_stats; struct mtx pm_mtx; #ifdef __powerpc64__ @@ -143,7 +145,6 @@ struct pmap { cpuset_t pm_active; struct pmap *pmap_phys; - struct pmap_statistics pm_stats; struct pvo_tree pmap_pvo; }; @@ -182,10 +183,10 @@ void slb_free_user_cache(struct slb **); #elif defined(BOOKE) struct pmap { + struct pmap_statistics pm_stats; /* pmap statistics */ struct mtx pm_mtx; /* pmap mutex */ tlbtid_t pm_tid[MAXCPU]; /* TID to identify this pmap entries in TLB */ cpuset_t pm_active; /* active on cpus */ - struct pmap_statistics pm_stats; /* pmap statistics */ /* Page table directory, array of pointers to page tables. */ pte_t *pm_pdir[PDIR_NENTRIES]; @@ -193,7 +194,6 @@ struct pmap { /* List of allocated ptbl bufs (ptbl kva regions). */ TAILQ_HEAD(, ptbl_buf) pm_ptbl_list; }; -typedef struct pmap *pmap_t; struct pv_entry { pmap_t pv_pmap; @@ -210,6 +210,16 @@ struct md_page { #define pmap_page_get_memattr(m) VM_MEMATTR_DEFAULT #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) +#else +/* + * Common pmap members between AIM and BOOKE. + * libkvm needs pm_stats at the same location between both, as it doesn't define + * AIM nor BOOKE, and is expected to work across all. + */ +struct pmap { + struct pmap_statistics pm_stats; /* pmap statistics */ + struct mtx pm_mtx; /* pmap mutex */ +}; #endif /* AIM */ extern struct pmap kernel_pmap_store; Modified: head/tools/tools/umastat/umastat.c ============================================================================== --- head/tools/tools/umastat/umastat.c Sun Nov 20 01:59:22 2016 (r308872) +++ head/tools/tools/umastat/umastat.c Sun Nov 20 06:10:12 2016 (r308873) @@ -28,10 +28,6 @@ #include -#define LIBMEMSTAT /* Cause vm_page.h not to include opt_vmpage.h */ -#include -#include - #include #include From owner-svn-src-head@freebsd.org Sun Nov 20 06:11:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E5D30C49E96; Sun, 20 Nov 2016 06:11:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B636E19DB; Sun, 20 Nov 2016 06:11:31 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAK6BUd1096580; Sun, 20 Nov 2016 06:11:30 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAK6BUCL096579; Sun, 20 Nov 2016 06:11:30 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201611200611.uAK6BUCL096579@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Sun, 20 Nov 2016 06:11:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308874 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 06:11:32 -0000 Author: jhibbits Date: Sun Nov 20 06:11:30 2016 New Revision: 308874 URL: https://svnweb.freebsd.org/changeset/base/308874 Log: Actually bump __FreeBSD_version Modified: head/sys/sys/param.h Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Sun Nov 20 06:10:12 2016 (r308873) +++ head/sys/sys/param.h Sun Nov 20 06:11:30 2016 (r308874) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200014 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200015 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From owner-svn-src-head@freebsd.org Sun Nov 20 06:12:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CC34AC4A060; Sun, 20 Nov 2016 06:12:33 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-it0-x244.google.com (mail-it0-x244.google.com [IPv6:2607:f8b0:4001:c0b::244]) (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 8DEE21C0F; Sun, 20 Nov 2016 06:12:33 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-it0-x244.google.com with SMTP id o1so11217819ito.1; Sat, 19 Nov 2016 22:12:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:cc:message-id:from:to:in-reply-to:content-transfer-encoding :mime-version:subject:date:references; bh=hDzG7Q5nGYFYHxDze8EHgQtsSAiZphx+dWvSGO3wM7U=; b=dlISsmsC+Ue2O32koLqMVVbnIXhzZO0n3SGOKfqGdejS4IZiV/k3g9OReDHh9fZEg4 2ulvqn2ktYpCvPNIeEZ1Ke/ZNun8QpL2pq5o19OI72q9j+nWYHmG/GARbLh0liXBCgNW zVzTR4X+1Lo/ahYNd+a+K3rwY3utCeAXT0VLiWGWFXmsL9yhpAp2GU2c7SJvjrdwsr/F cY5pQRjgMTVEI28KTisjhK0CzcrLoCc9T2v6z2m8FuKvJhXkTEWlIIiOGOhunztop/mc evxOPjOZG9GNS2iuJjisbuUcVua3V3ogucQbHXUdmHCwVd8xjynItaI9ctksdoaRRXDz O13g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:cc:message-id:from:to:in-reply-to :content-transfer-encoding:mime-version:subject:date:references; bh=hDzG7Q5nGYFYHxDze8EHgQtsSAiZphx+dWvSGO3wM7U=; b=jXZB+XxiIh6zcCIfb3y9IhvgOPrVW2cgSX76ZOIS1BiXM/iVEd15TKHBo5ZoXDu+Hj CN0aS1jQC8ilEHDq5hViPE6xgH0Z+Rs77DkYf+iOeWaf+4QmG55hkmPN3a4JPT0HcKEB y5SS73rtqNjiv06P35Se5gqXaTggi8S3wIMTOCTR/cRPaU6OP/ikEHNoy0wj9Sq47YgT BRnEukaeFZXYGhKjiPdIT+PRwysqhj3xM86HkE62pfHSOim0OB7KFnTSDWaejuO3rp3r zod7+0KNZqMUz8MSrdfluRoNayA5m9x0+2tbLEQOEfv+EcCsrSw4cUF9sVUQYnnJzaaS XFSg== X-Gm-Message-State: AKaTC02H7J6/pZvgnUB8v3EaG1PFkCMhmc+FBIE+xdjAaJJdboI19zk5qK/M5vpzYD+JhQ== X-Received: by 10.36.43.193 with SMTP id h184mr4803124ita.29.1479622352655; Sat, 19 Nov 2016 22:12:32 -0800 (PST) Received: from blackstar.knownspace (50-80-150-234.client.mchsi.com. [50.80.150.234]) by smtp.gmail.com with ESMTPSA id x190sm4006268ite.14.2016.11.19.22.12.31 (version=TLS1 cipher=AES128-SHA bits=128/128); Sat, 19 Nov 2016 22:12:31 -0800 (PST) Sender: Justin Hibbits Cc: svn-src-head@freebsd.org, FreeBSD Current Message-Id: From: Justin Hibbits To: Mark Millard In-Reply-To: <9CDAF14D-2953-4914-BD3D-C91F591DE7DD@dsl-only.net> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] Date: Sun, 20 Nov 2016 00:12:30 -0600 References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> <9CDAF14D-2953-4914-BD3D-C91F591DE7DD@dsl-only.net> X-Mailer: Apple Mail (2.936) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 06:12:33 -0000 My buildworld completed successfully, so it's been fixed in r308873/ r308874. Thanks for your testing. I often build just kernel, so wouldn't have seen the fallout until it was far too late. - Justin On Nov 19, 2016, at 10:22 PM, Mark Millard wrote: > On 2016-Nov-16, at 8:33 PM, Justin Hibbits > wrote: > >> *sigh* okay, thanks. I just tested, and vm/vm_page.h, and vm/vm.h >> can both be removed from memstat_uma.c for it to compile. I'm >> kicking off a buildworld myself now, too, and hope to have it ready >> to commit tomorrow (takes a couple hours to buildworld on my G5). >> >> - Justin > > That will not be the only potential place: umastat.c in tools/tools/ > umastat/ > also has a include of vm/vm_page.h: > >> # find /usr/src/ -name .svn -prune -o -name sys -prune -o -name man >> -prune -o -exec grep "vm_page[.]h" {} \; -print | more >> #include >> /usr/src/lib/libmemstat/memstat_uma.c >> #define LIBMEMSTAT /* Cause vm_page.h not to include >> opt_vmpage.h */ >> #include >> /usr/src/tools/tools/umastat/umastat.c > > > === > Mark Millard > markmi at dsl-only.net > > On Nov 19, 2016, at 9:47 PM, Mark Millard wrote: > >> [Top post of bad news.] >> >> With the patch I get a different incomplete type used in libmemstat: >> >> struct md_page >> >> --- all_subdir_lib/libmemstat --- >> In file included from /usr/src/lib/libmemstat/memstat_uma.c:34:0: >> /usr/src/sys/vm/vm_page.h:144:17: error: field 'md' has incomplete >> type >> struct md_page md; /* machine dependent stuff */ >> ^ >> *** [memstat_uma.o] Error code 1 >> >> make[5]: stopped in /usr/src/lib/libmemstat >> >> >> === >> Mark Millard >> markmi at dsl-only.net >> >> On 2016-Nov-19, at 7:42 PM, Mark Millard >> wrote: >> >>> On 2016-Nov-19, at 7:36 PM, Mark Millard >>> wrote: >>> >>>> On 2016-Nov-19, at 7:32 PM, Justin Hibbits >>> freebsd.org> wrote: >>>> >>>>> Sorry, I generated the diff from a different tree that wasn't >>>>> synced to head (had the same change in both trees originally). >>>>> If that is the only problem, you can ignore it and try the rest. >>>>> I can generate another diff later too. >>>>> - Justin >>>> >>>> Yep: I manually did the move of the pm_stats line and am building. >>> >>> If it builds and I install it on a PowerMac G5 and it boots, what >>> do I >>> do to test if pm_stats and pm_mtx seems to be working well/right for >>> the out of kernel code? Do you know of a reasonable test? >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >>> >> On Nov 19, 2016 21:27, "Mark Millard" wrote: >>> [Top post about patch issues.] >>> >>> Looking at the patch it seems to be designed for when #else was in >>> use: >>> >>>> -#else >>>> +#elif defined(BOOKE) >>> >>> but -r308817 already has the 2nd line (BOOKE). Your patch shows: >>> >>>> Index: sys/powerpc/include/pmap.h >>>> =================================================================== >>>> --- sys/powerpc/include/pmap.h (revision 308718) >>>> +++ sys/powerpc/include/pmap.h (working copy) >>> >>> So it looks like you started from before -r308817 . >>> >>> Trying it (I'm at -r308860): >>> >>>> Patching file sys/powerpc/include/pmap.h using Plan A... >>>> Hunk #1 succeeded at 74. >>>> Hunk #2 succeeded at 84. >>>> Hunk #3 succeeded at 132. >>>> Hunk #4 succeeded at 145. >>>> Hunk #5 failed at 180. >>>> Hunk #6 succeeded at 194. >>>> Hunk #7 succeeded at 210. >>>> 1 out of 7 hunks failed--saving rejects to sys/powerpc/include/ >>>> pmap.h.rej >>> >>>> # more sys/powerpc/include/pmap.h.rej >>>> @@ -179,13 +180,13 @@ >>>> struct slb **slb_alloc_user_cache(void); >>>> void slb_free_user_cache(struct slb **); >>>> >>>> -#else >>>> +#elif defined(BOOKE) >>>> >>>> struct pmap { >>>> + struct pmap_statistics pm_stats; /* pmap >>>> statistics */ >>>> struct mtx pm_mtx; /* pmap mutex */ >>>> tlbtid_t pm_tid[MAXCPU]; /* TID to identify >>>> this pmap entries in TLB */ >>>> cpuset_t pm_active; /* active on cpus */ >>>> - struct pmap_statistics pm_stats; /* pmap >>>> statistics */ >>>> >>>> /* Page table directory, array of pointers to page tables. */ >>>> pte_t *pm_pdir[PDIR_NENTRIES]; >>> >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >>> >>> On 2016-Nov-19, at 7:00 PM, Mark Millard >>> wrote: >>> >>> It may take a little bit but I'll try the patch. >>> >>> It looks like sys/powerpc/include/pmap.h from -r176700 from 2088- >>> Mar-3 >>> is when the BOOKE/E500 split started with the preprocessor use of >>> AIM >>> and #else . This predates PowerMac G5 support. >>> >>> This is definitely not new for the general structure on the powerpc >>> side of things. Any place that did not have the AIM vs. not status >>> available was subject to problems of possibly mismatched >>> definitions. >>> >>> === >>> Mark Millard >>> markmi at dsl-only.net >>> >>> On 2016-Nov-19, at 6:47 PM, Justin Hibbits >> freebsd.org> wrote: >>> >>> On Sat, 19 Nov 2016 18:36:39 -0800 >>> Mark Millard wrote: >>> >>>> [Quick top post I'm afraid.] >>>> >>>> I think that I figured out why there is a problem even earlier >>>> --that just did not stop the compiles. >>>> >>>> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >>>> (stage 4.2 "building libraries" instead of buildkernel. It does not >>>> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >>>> them). >>>> >>>> So if it includes machine/pmap.h that binds to >>>> sys/powerpc/include/pmap.h which has the structure. . . >>>> >>>> . . . >>>> #if defined(AIM) >>>> . . . (definitions here) >>>> #elif defined(BOOKE) >>>> . . . (definitions here) >>>> #endif >>>> . . . >>>> >>>> it gets no definition now. >>>> >>>> With the older: >>>> >>>> . . . >>>> #if defined(AIM) >>>> . . . (definitions here) >>>> #else >>>> . . . (definitions here) >>>> #endif >>>> . . . >>>> >>>> It got a definition, just not necessarily the right one. >>>> >>>> >>>> === >>>> Mark Millard >>>> markmi at dsl-only.net >>> >>> Can you try the attached patch? There was a subtle ABI issue that >>> r308817 exposed, which is that the pmap structs aren't identical >>> such >>> that the pm_stats are at different locations, and libkvm ends up >>> reading with the Book-E pmap, getting different stats than >>> expected for >>> AIM. This patch fixes that, bumping version to account for this ABI >>> change. >>> >>> - Justin >> >> >> > > From owner-svn-src-head@freebsd.org Sun Nov 20 08:05:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AAF5C4BD64 for ; Sun, 20 Nov 2016 08:05:20 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-31.reflexion.net [208.70.210.31]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFF741932 for ; Sun, 20 Nov 2016 08:05:19 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 15082 invoked from network); 20 Nov 2016 08:04:59 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 20 Nov 2016 08:04:59 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.20.0) with SMTP; Sun, 20 Nov 2016 03:04:58 -0500 (EST) Received: (qmail 23055 invoked from network); 20 Nov 2016 08:04:58 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 20 Nov 2016 08:04:58 -0000 Received: from [192.168.1.106] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 87588EC8FDE; Sun, 20 Nov 2016 00:05:12 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308817 - head/sys/powerpc/include [Still have pmap_t and struct pmap ppowerpc64 problems as of -r308860] From: Mark Millard In-Reply-To: Date: Sun, 20 Nov 2016 00:05:11 -0800 Cc: svn-src-head@freebsd.org, FreeBSD Current Content-Transfer-Encoding: quoted-printable Message-Id: <469C6A73-67F3-4CB5-90BD-C8092210CDDD@dsl-only.net> References: <39962D4C-29BA-4AA4-B77D-2344A68FDB54@dsl-only.net> <53258F35-C86E-4DE0-BDF0-5C139E68356D@dsl-only.net> <20161119204715.79632a66@zhabar.knownspace> <3D338DB4-9FAF-46A8-96FF-4F77B01871E2@dsl-only.net> <1EC92166-7DF3-42DC-9AAD-AED1BA9D5CC1@dsl-only.net> <59613CEF-BA2D-4010-996C-6FB8F9D126C6@dsl-only.net> <9CDAF14D-2953-4914-BD3D-C91F591DE7DD@dsl-only.net> To: Justin Hibbits X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 08:05:20 -0000 Glad to help. Going in another direction: What of stable/11 ? (And possibly stable/10 = .) Changing the BROOKE kernel ABI in stable/11 is a no-no. Similarly for = AIM. Is there a reason to prefer which context actually works correctly for 11.0 default builds for accessing pm_stats in pmap? My guess is that GENERIC64 and GENERIC for powerpc64 and powerpc should by default work. Needing to have something special for 11.x BOOKE to build correctly in seems less of a problem overall: BOOKE likely has a more tailored 11.x build context anyway and there are no ftp 11.0 snapshots or releases for KERNCONF=3DMPC85XX . TARGET_ARCH=3Dpowerpcspe (KERNCONF=3DMPC85XXSPE) = does not exist until head (12.0-CURRENT) from what I can tell. This might suggest for stable/11 something like: (notation picked for emphasis) #if defined(AIM) || !defined(BOOKE) . . . struct pmap { struct mtx pm_mtx; =20 #ifdef __powerpc64__ struct slbtnode *pm_slb_tree_root; struct slb **pm_slb; int pm_slb_len; #else register_t pm_sr[16]; #endif cpuset_t pm_active; struct pmap *pmap_phys; struct pmap_statistics pm_stats;. . . . . . (the unchanged order above) . . . #elif defined(BOOKE) struct pmap { struct mtx pm_mtx; /* pmap mutex */ tlbtid_t pm_tid[MAXCPU]; /* TID to identify this = pmap entries in TLB */ cpuset_t pm_active; /* active on cpus */ struct pmap_statistics pm_stats; /* pmap statistics */ . . . (the unchanged order above) . . . #endif with some means used for defining BOOKE outside buildkernel for the BOOKE builds, such as for KERNCONF=3DMPC85XX . Then at least GENERIC and GENERIC64 would build correctly for this subject area by default. In particular GENERIC64 actually has no MPC85XX (BOOKE) alternative so far as I know. That makes it too bad that it is always broken for the issue in stable/11 (and in stable/10 ). I choose the above to also cover GENERIC. If only GENERIC64 was to be made to work right by default there are alternatives that involve __powerpc64__ in at least one more place, such as: #if defined(AIM) || defined(__powerpc64__) =3D=3D=3D Mark Millard markmi at dsl-only.net On 2016-Nov-19, at 10:12 PM, Justin Hibbits = wrote: > My buildworld completed successfully, so it's been fixed in = r308873/r308874. >=20 > Thanks for your testing. I often build just kernel, so wouldn't have = seen the fallout until it was far too late. >=20 > - Justin On Nov 19, 2016, at 10:22 PM, Mark Millard wrote: > On 2016-Nov-16, at 8:33 PM, Justin Hibbits = wrote: >=20 >> *sigh* okay, thanks. I just tested, and vm/vm_page.h, and vm/vm.h = can both be removed from memstat_uma.c for it to compile. I'm kicking = off a buildworld myself now, too, and hope to have it ready to commit = tomorrow (takes a couple hours to buildworld on my G5). >>=20 >> - Justin >=20 > That will not be the only potential place: umastat.c in = tools/tools/umastat/ > also has a include of vm/vm_page.h: >=20 >> # find /usr/src/ -name .svn -prune -o -name sys -prune -o -name man = -prune -o -exec grep "vm_page[.]h" {} \; -print | more >> #include >> /usr/src/lib/libmemstat/memstat_uma.c >> #define LIBMEMSTAT /* Cause vm_page.h not to include = opt_vmpage.h */ >> #include >> /usr/src/tools/tools/umastat/umastat.c >=20 >=20 > =3D=3D=3D > Mark Millard > markmi at dsl-only.net >=20 > On Nov 19, 2016, at 9:47 PM, Mark Millard wrote: >=20 >> [Top post of bad news.] >>=20 >> With the patch I get a different incomplete type used in libmemstat: >>=20 >> struct md_page >>=20 >> --- all_subdir_lib/libmemstat --- >> In file included from /usr/src/lib/libmemstat/memstat_uma.c:34:0: >> /usr/src/sys/vm/vm_page.h:144:17: error: field 'md' has incomplete = type >> struct md_page md; /* machine dependent stuff */ >> ^ >> *** [memstat_uma.o] Error code 1 >>=20 >> make[5]: stopped in /usr/src/lib/libmemstat >>=20 >>=20 >> =3D=3D=3D >> Mark Millard >> markmi at dsl-only.net >>=20 >> On 2016-Nov-19, at 7:42 PM, Mark Millard = wrote: >>=20 >>> On 2016-Nov-19, at 7:36 PM, Mark Millard = wrote: >>>=20 >>>> On 2016-Nov-19, at 7:32 PM, Justin Hibbits wrote: >>>>=20 >>>>> Sorry, I generated the diff from a different tree that wasn't = synced to head (had the same change in both trees originally). If that = is the only problem, you can ignore it and try the rest. I can generate = another diff later too. >>>>> - Justin >>>>=20 >>>> Yep: I manually did the move of the pm_stats line and am building. >>>=20 >>> If it builds and I install it on a PowerMac G5 and it boots, what do = I >>> do to test if pm_stats and pm_mtx seems to be working well/right for >>> the out of kernel code? Do you know of a reasonable test? >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> markmi at dsl-only.net >>>=20 >> On Nov 19, 2016 21:27, "Mark Millard" wrote: >>> [Top post about patch issues.] >>>=20 >>> Looking at the patch it seems to be designed for when #else was in = use: >>>=20 >>>> -#else >>>> +#elif defined(BOOKE) >>>=20 >>> but -r308817 already has the 2nd line (BOOKE). Your patch shows: >>>=20 >>>> Index: sys/powerpc/include/pmap.h >>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D >>>> --- sys/powerpc/include/pmap.h (revision 308718) >>>> +++ sys/powerpc/include/pmap.h (working copy) >>>=20 >>> So it looks like you started from before -r308817 . >>>=20 >>> Trying it (I'm at -r308860): >>>=20 >>>> Patching file sys/powerpc/include/pmap.h using Plan A... >>>> Hunk #1 succeeded at 74. >>>> Hunk #2 succeeded at 84. >>>> Hunk #3 succeeded at 132. >>>> Hunk #4 succeeded at 145. >>>> Hunk #5 failed at 180. >>>> Hunk #6 succeeded at 194. >>>> Hunk #7 succeeded at 210. >>>> 1 out of 7 hunks failed--saving rejects to = sys/powerpc/include/pmap.h.rej >>>=20 >>>> # more sys/powerpc/include/pmap.h.rej >>>> @@ -179,13 +180,13 @@ >>>> struct slb **slb_alloc_user_cache(void); >>>> void slb_free_user_cache(struct slb **); >>>>=20 >>>> -#else >>>> +#elif defined(BOOKE) >>>>=20 >>>> struct pmap { >>>> + struct pmap_statistics pm_stats; /* pmap statistics = */ >>>> struct mtx pm_mtx; /* pmap mutex */ >>>> tlbtid_t pm_tid[MAXCPU]; /* TID to identify this = pmap entries in TLB */ >>>> cpuset_t pm_active; /* active on cpus */ >>>> - struct pmap_statistics pm_stats; /* pmap statistics = */ >>>>=20 >>>> /* Page table directory, array of pointers to page tables. */ >>>> pte_t *pm_pdir[PDIR_NENTRIES]; >>>=20 >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> markmi at dsl-only.net >>>=20 >>> On 2016-Nov-19, at 7:00 PM, Mark Millard = wrote: >>>=20 >>> It may take a little bit but I'll try the patch. >>>=20 >>> It looks like sys/powerpc/include/pmap.h from -r176700 from = 2088-Mar-3 >>> is when the BOOKE/E500 split started with the preprocessor use of = AIM >>> and #else . This predates PowerMac G5 support. >>>=20 >>> This is definitely not new for the general structure on the powerpc >>> side of things. Any place that did not have the AIM vs. not status >>> available was subject to problems of possibly mismatched = definitions. >>>=20 >>> =3D=3D=3D >>> Mark Millard >>> markmi at dsl-only.net >>>=20 >>> On 2016-Nov-19, at 6:47 PM, Justin Hibbits = wrote: >>>=20 >>> On Sat, 19 Nov 2016 18:36:39 -0800 >>> Mark Millard wrote: >>>=20 >>>> [Quick top post I'm afraid.] >>>>=20 >>>> I think that I figured out why there is a problem even earlier >>>> --that just did not stop the compiles. >>>>=20 >>>> lib/libutil/kinfo_getallproc.c is built here as part of buildworld >>>> (stage 4.2 "building libraries" instead of buildkernel. It does not >>>> have the KERNCONF's AIM vs. BOOKE vs. . . . definitions vs. lack of >>>> them). >>>>=20 >>>> So if it includes machine/pmap.h that binds to >>>> sys/powerpc/include/pmap.h which has the structure. . . >>>>=20 >>>> . . . >>>> #if defined(AIM) >>>> . . . (definitions here) >>>> #elif defined(BOOKE) >>>> . . . (definitions here) >>>> #endif >>>> . . . >>>>=20 >>>> it gets no definition now. >>>>=20 >>>> With the older: >>>>=20 >>>> . . . >>>> #if defined(AIM) >>>> . . . (definitions here) >>>> #else >>>> . . . (definitions here) >>>> #endif >>>> . . . >>>>=20 >>>> It got a definition, just not necessarily the right one. >>>>=20 >>>>=20 >>>> =3D=3D=3D >>>> Mark Millard >>>> markmi at dsl-only.net >>>=20 >>> Can you try the attached patch? There was a subtle ABI issue that >>> r308817 exposed, which is that the pmap structs aren't identical = such >>> that the pm_stats are at different locations, and libkvm ends up >>> reading with the Book-E pmap, getting different stats than expected = for >>> AIM. This patch fixes that, bumping version to account for this ABI >>> change. >>>=20 >>> - Justin >>=20 >>=20 >>=20 >=20 >=20 From owner-svn-src-head@freebsd.org Sun Nov 20 08:31:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5B337C483F1; Sun, 20 Nov 2016 08:31:39 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 EAD63285; Sun, 20 Nov 2016 08:31:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id uAK8VVPs041821 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Sun, 20 Nov 2016 10:31:32 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua uAK8VVPs041821 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id uAK8VV3J041820; Sun, 20 Nov 2016 10:31:31 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 20 Nov 2016 10:31:31 +0200 From: Konstantin Belousov To: John Baldwin Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308821 - head/sys/i386/i386 Message-ID: <20161120083131.GP54029@kib.kiev.ua> References: <201611190136.uAJ1aiZb091275@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201611190136.uAJ1aiZb091275@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 08:31:39 -0000 On Sat, Nov 19, 2016 at 01:36:44AM +0000, John Baldwin wrote: > Author: jhb > Date: Sat Nov 19 01:36:44 2016 > New Revision: 308821 > URL: https://svnweb.freebsd.org/changeset/base/308821 > > Log: > MFamd64: Various fatal page fault fixes. > > - If a page fault is triggered due to reserved bits in a PTE, treat it > as a fatal fault and panic. > - If PG_NX is in use, report whether a fatal page fault is due to an > instruction fetch or a data access. > - If a fatal page fault is due to reserved bits in a PTE, report that as > the page fault type rather than a protection violation. > > MFC after: 1 month > > Modified: > head/sys/i386/i386/trap.c > > Modified: head/sys/i386/i386/trap.c > ============================================================================== > --- head/sys/i386/i386/trap.c Sat Nov 19 01:34:12 2016 (r308820) > +++ head/sys/i386/i386/trap.c Sat Nov 19 01:36:44 2016 (r308821) > @@ -857,6 +857,14 @@ trap_pfault(frame, usermode, eva) > } > > /* > + * If the trap was caused by errant bits in the PTE then panic. > + */ > + if (frame->tf_err & PGEX_RSV) { > + trap_fatal(frame, eva); > + return (-1); > + } > + > + /* > * PGEX_I is defined only if the execute disable bit capability is > * supported and enabled. > */ > @@ -926,9 +934,15 @@ trap_fatal(frame, eva) > #endif > if (type == T_PAGEFLT) { > printf("fault virtual address = 0x%x\n", eva); > - printf("fault code = %s %s, %s\n", > + printf("fault code = %s %s%s, %s\n", > code & PGEX_U ? "user" : "supervisor", > code & PGEX_W ? "write" : "read", > +#if defined(PAE) || defined(PAE_TABLES) > + pg_nx != 0 ? > + (code & PGEX_I ? " instruction" : " data") : > +#endif I suggest to remove #ifdef guards, and the pg_nx check there, as well. The page fault exception error code bits have constant meaning regardless of the kernel and CPU configuration, so if we get the I bit set in the error word, we know that it was due to executing on PAE table with bit 63 (nx) set. This is true even if kernel was not configured to create such tables. In other words, it would give more correct and useful information, which make it easier to track page tables corruption. > + "", > + code & PGEX_RSV ? "reserved bits in PTE" : > code & PGEX_P ? "protection violation" : "page not present"); > } > printf("instruction pointer = 0x%x:0x%x\n", I From owner-svn-src-head@freebsd.org Sun Nov 20 10:01:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6AC04C3EC7A; Sun, 20 Nov 2016 10:01:22 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3CCF6C4D; Sun, 20 Nov 2016 10:01:22 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKA1Leh094584; Sun, 20 Nov 2016 10:01:21 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKA1L1b094583; Sun, 20 Nov 2016 10:01:21 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201611201001.uAKA1L1b094583@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Sun, 20 Nov 2016 10:01:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308877 - head/tools/tools/sysbuild X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 10:01:22 -0000 Author: phk Date: Sun Nov 20 10:01:21 2016 New Revision: 308877 URL: https://svnweb.freebsd.org/changeset/base/308877 Log: Attempt package build even if dependencies seems to be missing Modified: head/tools/tools/sysbuild/sysbuild.sh Modified: head/tools/tools/sysbuild/sysbuild.sh ============================================================================== --- head/tools/tools/sysbuild/sysbuild.sh Sun Nov 20 09:11:21 2016 (r308876) +++ head/tools/tools/sysbuild/sysbuild.sh Sun Nov 20 10:01:21 2016 (r308877) @@ -273,8 +273,7 @@ ports_build() ( miss=`(cd $p ; make missing ${PORTS_OPTS}) || true` if [ "x${miss}" != "x" ] ; then - log_it "MISSING for $p:" $miss - continue + log_it "NB: MISSING for $p:" $miss fi log_it "build $pn ($p)" From owner-svn-src-head@freebsd.org Sun Nov 20 14:00:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE630C4AFC6; Sun, 20 Nov 2016 14:00:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B1932130D; Sun, 20 Nov 2016 14:00:51 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKE0ohM093030; Sun, 20 Nov 2016 14:00:50 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKE0o8M093028; Sun, 20 Nov 2016 14:00:50 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611201400.uAKE0o8M093028@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Sun, 20 Nov 2016 14:00:50 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308887 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 14:00:52 -0000 Author: avg Date: Sun Nov 20 14:00:50 2016 New Revision: 308887 URL: https://svnweb.freebsd.org/changeset/base/308887 Log: fix unsafe modification of zfs_vnodeops when DIAGNOSTIC is enabled The idea was to avoid a false assertion in zfs_lock, but it was implemented very dangerously and incorrectly. Reported by: pho Tested by: pho MFC after: 1 week Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Nov 20 13:44:27 2016 (r308886) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Sun Nov 20 14:00:50 2016 (r308887) @@ -5963,6 +5963,10 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) } #ifdef DIAGNOSTIC +#define CHECK_LOR ((flags & LK_NOWAIT) == 0 && vp->v_mount != NULL && \ + (vp->v_iflag & VI_DOOMED) == 0 && vp->v_data != NULL && \ + (zp->z_pflags & ZFS_XATTR) == 0) + static int zfs_lock(ap) struct vop_lock1_args /* { @@ -5979,22 +5983,21 @@ zfs_lock(ap) int err; vp = ap->a_vp; + zp = vp->v_data; flags = ap->a_flags; - if ((flags & LK_INTERLOCK) == 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && - (zp->z_pflags & ZFS_XATTR) == 0) { + if ((flags & LK_INTERLOCK) == 0 && CHECK_LOR) { zfsvfs = zp->z_zfsvfs; VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); } err = vop_stdlock(ap); - if ((flags & LK_INTERLOCK) != 0 && (flags & LK_NOWAIT) == 0 && - (vp->v_iflag & VI_DOOMED) == 0 && (zp = vp->v_data) != NULL && - (zp->z_pflags & ZFS_XATTR) == 0) { + if ((flags & LK_INTERLOCK) != 0 && CHECK_LOR) { zfsvfs = zp->z_zfsvfs; VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); } return (err); } + +#undef CHECK_LOR #endif struct vop_vector zfs_vnodeops; 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 Sun Nov 20 13:44:27 2016 (r308886) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c Sun Nov 20 14:00:50 2016 (r308887) @@ -727,14 +727,7 @@ zfs_znode_alloc(zfsvfs_t *zfsvfs, dmu_bu /* * Acquire vnode lock before making it available to the world. */ -#ifdef DIAGNOSTIC - vop_lock1_t *orig_lock = vp->v_op->vop_lock1; - vp->v_op->vop_lock1 = vop_stdlock; vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - vp->v_op->vop_lock1 = orig_lock; -#else - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); -#endif VN_LOCK_AREC(vp); if (vp->v_type != VFIFO) VN_LOCK_ASHARE(vp); From owner-svn-src-head@freebsd.org Sun Nov 20 18:20:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D796AC4C9F1; Sun, 20 Nov 2016 18:20:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A93377A5; Sun, 20 Nov 2016 18:20:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKIKSta099360; Sun, 20 Nov 2016 18:20:28 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKIKS6n099359; Sun, 20 Nov 2016 18:20:28 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611201820.uAKIKS6n099359@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 20 Nov 2016 18:20:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308895 - head/sys/dev/spibus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:20:30 -0000 Author: manu Date: Sun Nov 20 18:20:28 2016 New Revision: 308895 URL: https://svnweb.freebsd.org/changeset/base/308895 Log: Enable the use of spigen on FDT platform MFC after: 2 weeks Modified: head/sys/dev/spibus/spigen.c Modified: head/sys/dev/spibus/spigen.c ============================================================================== --- head/sys/dev/spibus/spigen.c Sun Nov 20 17:59:53 2016 (r308894) +++ head/sys/dev/spibus/spigen.c Sun Nov 20 18:20:28 2016 (r308895) @@ -25,6 +25,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_platform.h" + #include #include #include @@ -65,6 +67,17 @@ struct spigen_softc { int sc_debug; }; +#ifdef FDT +static void +spigen_identify(driver_t *driver, device_t parent) +{ + if (device_find_child(parent, "spigen", -1) != NULL) + return; + if (BUS_ADD_CHILD(parent, 0, "spigen", -1) == NULL) + device_printf(parent, "add child failed\n"); +} +#endif + static int spigen_probe(device_t dev) { @@ -387,6 +400,9 @@ static devclass_t spigen_devclass; static device_method_t spigen_methods[] = { /* Device interface */ +#ifdef FDT + DEVMETHOD(device_identify, spigen_identify), +#endif DEVMETHOD(device_probe, spigen_probe), DEVMETHOD(device_attach, spigen_attach), DEVMETHOD(device_detach, spigen_detach), From owner-svn-src-head@freebsd.org Sun Nov 20 18:21:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88724C4CA62; Sun, 20 Nov 2016 18:21:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 573E7A68; Sun, 20 Nov 2016 18:21:06 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKIL5WB099434; Sun, 20 Nov 2016 18:21:05 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKIL5JL099433; Sun, 20 Nov 2016 18:21:05 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201611201821.uAKIL5JL099433@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Sun, 20 Nov 2016 18:21:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308896 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:21:06 -0000 Author: jilles Date: Sun Nov 20 18:21:05 2016 New Revision: 308896 URL: https://svnweb.freebsd.org/changeset/base/308896 Log: rc.subr: $(ps -p $$ -o jid=) is always 0, so do not fork ps for it. The JID keyword writes 0 for a process also in the host system or in the same jail. Modified: head/etc/rc.subr Modified: head/etc/rc.subr ============================================================================== --- head/etc/rc.subr Sun Nov 20 18:20:28 2016 (r308895) +++ head/etc/rc.subr Sun Nov 20 18:21:05 2016 (r308896) @@ -49,7 +49,7 @@ PROTECT="/usr/bin/protect" ID="/usr/bin/id" IDCMD="if [ -x $ID ]; then $ID -un; fi" PS="/bin/ps -ww" -JID=`$PS -p $$ -o jid=` +JID=0 # # functions From owner-svn-src-head@freebsd.org Sun Nov 20 18:21:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2ABA7C4CBC1; Sun, 20 Nov 2016 18:21:44 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF342C50; Sun, 20 Nov 2016 18:21:43 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKILhAl000447; Sun, 20 Nov 2016 18:21:43 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKILhA1000446; Sun, 20 Nov 2016 18:21:43 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611201821.uAKILhA1000446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sun, 20 Nov 2016 18:21:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308897 - head/sys/arm/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:21:44 -0000 Author: manu Date: Sun Nov 20 18:21:42 2016 New Revision: 308897 URL: https://svnweb.freebsd.org/changeset/base/308897 Log: Add spigen to the ARMv6 GENERIC kernel Modified: head/sys/arm/conf/GENERIC Modified: head/sys/arm/conf/GENERIC ============================================================================== --- head/sys/arm/conf/GENERIC Sun Nov 20 18:21:05 2016 (r308896) +++ head/sys/arm/conf/GENERIC Sun Nov 20 18:21:42 2016 (r308897) @@ -150,6 +150,7 @@ device aw_cir # SPI device spibus +device spigen device bcm2835_spi device ti_spi From owner-svn-src-head@freebsd.org Sun Nov 20 18:38:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E58EC4C058; Sun, 20 Nov 2016 18:38:34 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 080A2335; Sun, 20 Nov 2016 18:38:33 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKIcXfH007433; Sun, 20 Nov 2016 18:38:33 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKIcXGQ007432; Sun, 20 Nov 2016 18:38:33 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611201838.uAKIcXGQ007432@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 20 Nov 2016 18:38:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308898 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:38:34 -0000 Author: gonzo Date: Sun Nov 20 18:38:32 2016 New Revision: 308898 URL: https://svnweb.freebsd.org/changeset/base/308898 Log: [bytgpio] Fix USB disconnect event after listsing pins on gpioc2 - Do not set input flag when reading value from GPIO pin, it is not required and for gpioc2(S5 bank) setting both input and output flags leads to some kind of electric interference (curren drop?) that causes USB devices to disconnect - Check pad configuration when attaching device and provide IN/OUT capabilities only for pads that are configured as GPIO. Do not let user code to configure or change value of non-GPIO pads. There is no information for NC bank in intel's datasheet so for now function check is ignored for pins in it Reported by: Frank H. MFC after: 3 days Modified: head/sys/dev/gpio/bytgpio.c Modified: head/sys/dev/gpio/bytgpio.c ============================================================================== --- head/sys/dev/gpio/bytgpio.c Sun Nov 20 18:21:42 2016 (r308897) +++ head/sys/dev/gpio/bytgpio.c Sun Nov 20 18:38:32 2016 (r308898) @@ -60,6 +60,16 @@ __FBSDID("$FreeBSD$"); #define BYTGPIO_ASSERT_LOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_OWNED) #define BYTGPIO_ASSERT_UNLOCKED(_sc) mtx_assert(&(_sc)->sc_mtx, MA_NOTOWNED) +struct pinmap_info { + int reg; + int pad_func; +}; + +/* Ignore function check, no info is available at the moment */ +#define PADCONF_FUNC_ANY -1 + +#define GPIO_PIN_MAP(r, f) { .reg = (r), .pad_func = (f) } + struct bytgpio_softc { ACPI_HANDLE sc_handle; device_t sc_dev; @@ -69,44 +79,211 @@ struct bytgpio_softc { struct resource *sc_mem_res; int sc_npins; const char* sc_bank_prefix; - const int *sc_pinpad_map; + const struct pinmap_info *sc_pinpad_map; + /* List of current functions for pads shared by GPIO */ + int *sc_pad_funcs; }; static int bytgpio_probe(device_t dev); static int bytgpio_attach(device_t dev); -#define SCORE_UID 1 -#define SCORE_BANK_PREFIX "GPIO_S0_SC" -const int bytgpio_score_pins[] = { - 85, 89, 93, 96, 99, 102, 98, 101, 34, 37, 36, 38, 39, 35, 40, - 84, 62, 61, 64, 59, 54, 56, 60, 55, 63, 57, 51, 50, 53, 47, - 52, 49, 48, 43, 46, 41, 45, 42, 58, 44, 95, 105, 70, 68, 67, - 66, 69, 71, 65, 72, 86, 90, 88, 92, 103, 77, 79, 83, 78, 81, - 80, 82, 13, 12, 15, 14, 17, 18, 19, 16, 2, 1, 0, 4, 6, 7, 9, - 8, 33, 32, 31, 30, 29, 27, 25, 28, 26, 23, 21, 20, 24, 22, 5, - 3, 10, 11, 106, 87, 91, 104, 97, 100 +#define SCORE_UID 1 +#define SCORE_BANK_PREFIX "GPIO_S0_SC" +const struct pinmap_info bytgpio_score_pins[] = { + GPIO_PIN_MAP(85, 0), + GPIO_PIN_MAP(89, 0), + GPIO_PIN_MAP(93, 0), + GPIO_PIN_MAP(96, 0), + GPIO_PIN_MAP(99, 0), + GPIO_PIN_MAP(102, 0), + GPIO_PIN_MAP(98, 0), + GPIO_PIN_MAP(101, 0), + GPIO_PIN_MAP(34, 0), + GPIO_PIN_MAP(37, 0), + GPIO_PIN_MAP(36, 0), + GPIO_PIN_MAP(38, 0), + GPIO_PIN_MAP(39, 0), + GPIO_PIN_MAP(35, 0), + GPIO_PIN_MAP(40, 0), + GPIO_PIN_MAP(84, 0), + GPIO_PIN_MAP(62, 0), + GPIO_PIN_MAP(61, 0), + GPIO_PIN_MAP(64, 0), + GPIO_PIN_MAP(59, 0), + GPIO_PIN_MAP(54, 0), + GPIO_PIN_MAP(56, 0), + GPIO_PIN_MAP(60, 0), + GPIO_PIN_MAP(55, 0), + GPIO_PIN_MAP(63, 0), + GPIO_PIN_MAP(57, 0), + GPIO_PIN_MAP(51, 0), + GPIO_PIN_MAP(50, 0), + GPIO_PIN_MAP(53, 0), + GPIO_PIN_MAP(47, 0), + GPIO_PIN_MAP(52, 0), + GPIO_PIN_MAP(49, 0), + GPIO_PIN_MAP(48, 0), + GPIO_PIN_MAP(43, 0), + GPIO_PIN_MAP(46, 0), + GPIO_PIN_MAP(41, 0), + GPIO_PIN_MAP(45, 0), + GPIO_PIN_MAP(42, 0), + GPIO_PIN_MAP(58, 0), + GPIO_PIN_MAP(44, 0), + GPIO_PIN_MAP(95, 0), + GPIO_PIN_MAP(105, 0), + GPIO_PIN_MAP(70, 0), + GPIO_PIN_MAP(68, 0), + GPIO_PIN_MAP(67, 0), + GPIO_PIN_MAP(66, 0), + GPIO_PIN_MAP(69, 0), + GPIO_PIN_MAP(71, 0), + GPIO_PIN_MAP(65, 0), + GPIO_PIN_MAP(72, 0), + GPIO_PIN_MAP(86, 0), + GPIO_PIN_MAP(90, 0), + GPIO_PIN_MAP(88, 0), + GPIO_PIN_MAP(92, 0), + GPIO_PIN_MAP(103, 0), + GPIO_PIN_MAP(77, 0), + GPIO_PIN_MAP(79, 0), + GPIO_PIN_MAP(83, 0), + GPIO_PIN_MAP(78, 0), + GPIO_PIN_MAP(81, 0), + GPIO_PIN_MAP(80, 0), + GPIO_PIN_MAP(82, 0), + GPIO_PIN_MAP(13, 0), + GPIO_PIN_MAP(12, 0), + GPIO_PIN_MAP(15, 0), + GPIO_PIN_MAP(14, 0), + GPIO_PIN_MAP(17, 0), + GPIO_PIN_MAP(18, 0), + GPIO_PIN_MAP(19, 0), + GPIO_PIN_MAP(16, 0), + GPIO_PIN_MAP(2, 0), + GPIO_PIN_MAP(1, 0), + GPIO_PIN_MAP(0, 0), + GPIO_PIN_MAP(4, 0), + GPIO_PIN_MAP(6, 0), + GPIO_PIN_MAP(7, 0), + GPIO_PIN_MAP(9, 0), + GPIO_PIN_MAP(8, 0), + GPIO_PIN_MAP(33, 0), + GPIO_PIN_MAP(32, 0), + GPIO_PIN_MAP(31, 0), + GPIO_PIN_MAP(30, 0), + GPIO_PIN_MAP(29, 0), + GPIO_PIN_MAP(27, 0), + GPIO_PIN_MAP(25, 0), + GPIO_PIN_MAP(28, 0), + GPIO_PIN_MAP(26, 0), + GPIO_PIN_MAP(23, 0), + GPIO_PIN_MAP(21, 0), + GPIO_PIN_MAP(20, 0), + GPIO_PIN_MAP(24, 0), + GPIO_PIN_MAP(22, 0), + GPIO_PIN_MAP(5, 1), + GPIO_PIN_MAP(3, 1), + GPIO_PIN_MAP(10, 0), + GPIO_PIN_MAP(11, 0), + GPIO_PIN_MAP(106, 0), + GPIO_PIN_MAP(87, 0), + GPIO_PIN_MAP(91, 0), + GPIO_PIN_MAP(104, 0), + GPIO_PIN_MAP(97, 0), + GPIO_PIN_MAP(100, 0) }; -#define SCORE_PINS nitems(bytgpio_score_pins) -#define NCORE_UID 2 -#define NCORE_BANK_PREFIX "GPIO_S0_NC" -const int bytgpio_ncore_pins[] = { - 19, 18, 17, 20, 21, 22, 24, 25, 23, 16, 14, 15, 12, 26, 27, - 1, 4, 8, 11, 0, 3, 6, 10, 13, 2, 5, 9, 7 +#define SCORE_PINS nitems(bytgpio_score_pins) + +#define NCORE_UID 2 +#define NCORE_BANK_PREFIX "GPIO_S0_NC" +const struct pinmap_info bytgpio_ncore_pins[] = { + GPIO_PIN_MAP(19, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(18, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(17, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(20, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(21, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(22, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(24, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(25, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(23, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(16, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(14, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(15, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(12, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(26, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(27, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(1, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(4, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(8, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(11, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(0, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(3, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(6, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(10, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(13, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(2, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(5, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(9, PADCONF_FUNC_ANY), + GPIO_PIN_MAP(7, PADCONF_FUNC_ANY) }; #define NCORE_PINS nitems(bytgpio_ncore_pins) -#define SUS_UID 3 -#define SUS_BANK_PREFIX "GPIO_S5_" -const int bytgpio_sus_pins[] = { - 29, 33, 30, 31, 32, 34, 36, 35, 38, 37, 18, 7, 11, 20, 17, 1, - 8, 10, 19, 12, 0, 2, 23, 39, 28, 27, 22, 21, 24, 25, 26, 51, - 56, 54, 49, 55, 48, 57, 50, 58, 52, 53, 59, 40 +#define SUS_UID 3 +#define SUS_BANK_PREFIX "GPIO_S5_" +const struct pinmap_info bytgpio_sus_pins[] = { + GPIO_PIN_MAP(29, 0), + GPIO_PIN_MAP(33, 0), + GPIO_PIN_MAP(30, 0), + GPIO_PIN_MAP(31, 0), + GPIO_PIN_MAP(32, 0), + GPIO_PIN_MAP(34, 0), + GPIO_PIN_MAP(36, 0), + GPIO_PIN_MAP(35, 0), + GPIO_PIN_MAP(38, 0), + GPIO_PIN_MAP(37, 0), + GPIO_PIN_MAP(18, 0), + GPIO_PIN_MAP(7, 1), + GPIO_PIN_MAP(11, 1), + GPIO_PIN_MAP(20, 1), + GPIO_PIN_MAP(17, 1), + GPIO_PIN_MAP(1, 1), + GPIO_PIN_MAP(8, 1), + GPIO_PIN_MAP(10, 1), + GPIO_PIN_MAP(19, 1), + GPIO_PIN_MAP(12, 1), + GPIO_PIN_MAP(0, 1), + GPIO_PIN_MAP(2, 1), + GPIO_PIN_MAP(23, 0), + GPIO_PIN_MAP(39, 0), + GPIO_PIN_MAP(28, 0), + GPIO_PIN_MAP(27, 0), + GPIO_PIN_MAP(22, 0), + GPIO_PIN_MAP(21, 0), + GPIO_PIN_MAP(24, 0), + GPIO_PIN_MAP(25, 0), + GPIO_PIN_MAP(26, 0), + GPIO_PIN_MAP(51, 0), + GPIO_PIN_MAP(56, 0), + GPIO_PIN_MAP(54, 0), + GPIO_PIN_MAP(49, 0), + GPIO_PIN_MAP(55, 0), + GPIO_PIN_MAP(48, 0), + GPIO_PIN_MAP(57, 0), + GPIO_PIN_MAP(50, 0), + GPIO_PIN_MAP(58, 0), + GPIO_PIN_MAP(52, 0), + GPIO_PIN_MAP(53, 0), + GPIO_PIN_MAP(59, 0), + GPIO_PIN_MAP(40, 0) }; + #define SUS_PINS nitems(bytgpio_sus_pins) -#define BYGPIO_PIN_REGISTER(sc, pin, reg) ((sc)->sc_pinpad_map[(pin)] * 16 + (reg)) +#define BYGPIO_PIN_REGISTER(sc, pin, r) ((sc)->sc_pinpad_map[(pin)].reg * 16 + (r)) #define BYTGPIO_PCONF0 0x0000 +#define BYTGPIO_PCONF0_FUNC_MASK 7 #define BYTGPIO_PAD_VAL 0x0008 #define BYTGPIO_PAD_VAL_LEVEL (1 << 0) #define BYTGPIO_PAD_VAL_I_OUTPUT_ENABLED (1 << 1) @@ -158,6 +335,19 @@ bytgpio_valid_pin(struct bytgpio_softc * return (0); } +/* + * Returns true if pad configured to be used as GPIO + */ +static bool +bytgpio_pad_is_gpio(struct bytgpio_softc *sc, int pin) +{ + if ((sc->sc_pinpad_map[pin].pad_func == PADCONF_FUNC_ANY) || + (sc->sc_pad_funcs[pin] == sc->sc_pinpad_map[pin].pad_func)) + return (true); + else + return (false); +} + static int bytgpio_pin_getcaps(device_t dev, uint32_t pin, uint32_t *caps) { @@ -167,7 +357,9 @@ bytgpio_pin_getcaps(device_t dev, uint32 if (bytgpio_valid_pin(sc, pin) != 0) return (EINVAL); - *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; + *caps = 0; + if (bytgpio_pad_is_gpio(sc, pin)) + *caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; return (0); } @@ -182,11 +374,14 @@ bytgpio_pin_getflags(device_t dev, uint3 if (bytgpio_valid_pin(sc, pin) != 0) return (EINVAL); + *flags = 0; + if (!bytgpio_pad_is_gpio(sc, pin)) + return (0); + /* Get the current pin state */ BYTGPIO_LOCK(sc); reg = BYGPIO_PIN_REGISTER(sc, pin, BYTGPIO_PAD_VAL); val = bytgpio_read_4(sc, reg); - *flags = 0; if ((val & BYTGPIO_PAD_VAL_I_OUTPUT_ENABLED) == 0) *flags |= GPIO_PIN_OUTPUT; /* @@ -211,7 +406,10 @@ bytgpio_pin_setflags(device_t dev, uint3 if (bytgpio_valid_pin(sc, pin) != 0) return (EINVAL); - allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; + if (bytgpio_pad_is_gpio(sc, pin)) + allowed = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; + else + allowed = 0; /* * Only directtion flag allowed @@ -266,6 +464,9 @@ bytgpio_pin_set(device_t dev, uint32_t p if (bytgpio_valid_pin(sc, pin) != 0) return (EINVAL); + if (!bytgpio_pad_is_gpio(sc, pin)) + return (EINVAL); + BYTGPIO_LOCK(sc); reg = BYGPIO_PIN_REGISTER(sc, pin, BYTGPIO_PAD_VAL); val = bytgpio_read_4(sc, reg); @@ -288,16 +489,17 @@ bytgpio_pin_get(device_t dev, uint32_t p sc = device_get_softc(dev); if (bytgpio_valid_pin(sc, pin) != 0) return (EINVAL); + /* + * Report non-GPIO pads as pin LOW + */ + if (!bytgpio_pad_is_gpio(sc, pin)) { + *value = GPIO_PIN_LOW; + return (0); + } BYTGPIO_LOCK(sc); reg = BYGPIO_PIN_REGISTER(sc, pin, BYTGPIO_PAD_VAL); /* - * Enable input to read current value - */ - val = bytgpio_read_4(sc, reg); - val = val & ~BYTGPIO_PAD_VAL_I_INPUT_ENABLED; - bytgpio_write_4(sc, reg, val); - /* * And read actual value */ val = bytgpio_read_4(sc, reg); @@ -320,6 +522,9 @@ bytgpio_pin_toggle(device_t dev, uint32_ if (bytgpio_valid_pin(sc, pin) != 0) return (EINVAL); + if (!bytgpio_pad_is_gpio(sc, pin)) + return (EINVAL); + /* Toggle the pin */ BYTGPIO_LOCK(sc); reg = BYGPIO_PIN_REGISTER(sc, pin, BYTGPIO_PAD_VAL); @@ -350,6 +555,8 @@ bytgpio_attach(device_t dev) struct bytgpio_softc *sc; ACPI_STATUS status; int uid; + int pin; + uint32_t reg, val; sc = device_get_softc(dev); sc->sc_dev = dev; @@ -378,8 +585,12 @@ bytgpio_attach(device_t dev) break; default: device_printf(dev, "invalid _UID value: %d\n", uid); + goto error; } + sc->sc_pad_funcs = malloc(sizeof(int)*sc->sc_npins, M_DEVBUF, + M_WAITOK | M_ZERO); + sc->sc_mem_rid = 0; sc->sc_mem_res = bus_alloc_resource_any(sc->sc_dev, SYS_RES_MEMORY, &sc->sc_mem_rid, RF_ACTIVE); @@ -390,6 +601,12 @@ bytgpio_attach(device_t dev) BYTGPIO_LOCK_INIT(sc); + for (pin = 0; pin < sc->sc_npins; pin++) { + reg = BYGPIO_PIN_REGISTER(sc, pin, BYTGPIO_PCONF0); + val = bytgpio_read_4(sc, reg); + sc->sc_pad_funcs[pin] = val & BYTGPIO_PCONF0_FUNC_MASK; + } + sc->sc_busdev = gpiobus_attach_bus(dev); if (sc->sc_busdev == NULL) { BYTGPIO_LOCK_DESTROY(sc); From owner-svn-src-head@freebsd.org Sun Nov 20 18:56:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 614EFC4C43B; Sun, 20 Nov 2016 18:56:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16C84DEC; Sun, 20 Nov 2016 18:56:06 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKIu5su015484; Sun, 20 Nov 2016 18:56:05 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKIu5is015483; Sun, 20 Nov 2016 18:56:05 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611201856.uAKIu5is015483@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Sun, 20 Nov 2016 18:56:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308899 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 18:56:06 -0000 Author: gonzo Date: Sun Nov 20 18:56:04 2016 New Revision: 308899 URL: https://svnweb.freebsd.org/changeset/base/308899 Log: [FDT] Remove empty wrapper for upstream am335x-evm.dts Remove empty wrapper for sys/gnu version of am335x-evm.dts located in sys/boot/fdt, with current include paths priority it's recursive #include and current build system can find file in sys/gnu when generating dtb Reported by: Jared McNeill Deleted: head/sys/boot/fdt/dts/arm/am335x-evm.dts From owner-svn-src-head@freebsd.org Sun Nov 20 19:36:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C241C4CF6D; Sun, 20 Nov 2016 19:36:19 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EE43C1B9; Sun, 20 Nov 2016 19:36:18 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKJaIgd031563; Sun, 20 Nov 2016 19:36:18 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKJaIGb031562; Sun, 20 Nov 2016 19:36:18 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201611201936.uAKJaIGb031562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 20 Nov 2016 19:36:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308900 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 19:36:19 -0000 Author: jmcneill Date: Sun Nov 20 19:36:17 2016 New Revision: 308900 URL: https://svnweb.freebsd.org/changeset/base/308900 Log: Add dtsi for FreeBSD-specific Allwinner H3 nodes. Added: head/sys/boot/fdt/dts/arm/h3.dtsi (contents, props changed) Added: head/sys/boot/fdt/dts/arm/h3.dtsi ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/h3.dtsi Sun Nov 20 19:36:17 2016 (r308900) @@ -0,0 +1,179 @@ +/*- + * Copyright (c) 2016 Jared McNeill + * 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 + +/ { + cpus { + cpu0: cpu@0 { + clocks = <&cpu>; + clock-latency = <2000000>; + }; + }; + + clocks { + pll2: clk@01c20008 { + #clock-cells = <1>; + compatible = "allwinner,sun8i-h3-pll2-clk"; + reg = <0x01c20008 0x4>; + clocks = <&osc24M>; + clock-output-names = "pll2-1x", "pll2-2x", + "pll2-4x", "pll2-8x"; + }; + + ths_clk: clk@1c20074 { + #clock-cells = <0>; + compatible = "allwinner,sun8i-h3-ths-clk"; + reg = <0x01c20074 0x4>; + clocks = <&osc24M>; + clock-output-names = "ths"; + }; + + codec_clk: clk@01c20140 { + #clock-cells = <0>; + compatible = "allwinner,sun4i-a10-codec-clk"; + reg = <0x01c20140 0x4>; + clocks = <&pll2 SUN4I_A10_PLL2_1X>; + clock-output-names = "codec"; + }; + }; + + soc { + emac: ethernet@1c30000 { + compatible = "allwinner,sun8i-h3-emac"; + reg = <0x01c30000 0x104>, <0x01c00030 0x4>; + reg-names = "emac", "syscon"; + interrupts = ; + resets = <&ahb_rst 17>; + reset-names = "ahb"; + clocks = <&bus_gates 17>; + clock-names = "ahb"; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + }; + + i2c0: i2c@1c2ac00 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2ac00 0x400>; + interrupts = ; + clocks = <&bus_gates 96>; + resets = <&apb2_rst 0>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c1: i2c@1c2b000 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b000 0x400>; + interrupts = ; + clocks = <&bus_gates 97>; + resets = <&apb2_rst 1>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + i2c2: i2c@1c2b400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01c2b400 0x400>; + interrupts = ; + clocks = <&bus_gates 98>; + resets = <&apb2_rst 2>; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + r_i2c: i2c@1f02400 { + compatible = "allwinner,sun6i-a31-i2c"; + reg = <0x01f02400 0x400>; + interrupts = ; + status = "disabled"; + #address-cells = <1>; + #size-cells = <0>; + }; + + sid: eeprom@1c14000 { + compatible = "allwinner,sun8i-a83t-sid"; + reg = <0x01c14000 0x400>; + }; + + rtp: rtp@1c25000 { + compatible = "allwinner,sun8i-h3-ts"; + reg = <0x01c25000 0x400>; + interrupts = ; + clocks = <&bus_gates 72>, <&ths_clk>; + clock-names = "ahb", "ths"; + resets = <&apb1_rst 8>; + #thermal-sensor-cells = <0>; + }; + + dma: dma-controller@01c02000 { + compatible = "allwinner,sun8i-h3-dma"; + reg = <0x01c02000 0x1000>; + interrupts = ; + clocks = <&bus_gates 6>; + clock-names = "ahb"; + resets = <&ahb_rst 6>; + reset-names = "ahb"; + #dma-cells = <1>; + }; + + codec: codec@01c22c00 { + compatible = "allwinner,sun8i-h3-codec"; + reg = <0x01c22c00 0x100>, <0x01f015c0 0x4>; + reg-names = "codec", "pr"; + interrupts = ; + clocks = <&bus_gates 64>, <&codec_clk>; + clock-names = "ahb", "codec"; + resets = <&ahb_rst 128>; + reset-names = "ahb"; + dmas = <&dma 15>, <&dma 15>; + dma-names = "rx", "tx"; + status = "disabled"; + }; + + }; +}; + +&pll1 { + compatible = "allwinner,sun8i-h3-pll1-clk"; +}; + +&pio { + emac_pins_rgmii_a: emac_rgmii@0 { + allwinner,pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", + "PD7", "PD8", "PD9", "PD10", "PD12", "PD13", + "PD15", "PD16", "PD17"; + allwinner,function = "emac"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; From owner-svn-src-head@freebsd.org Sun Nov 20 19:38:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 86CC3C4C039; Sun, 20 Nov 2016 19:38:06 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E78066C; Sun, 20 Nov 2016 19:38:06 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKJc57P031768; Sun, 20 Nov 2016 19:38:05 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKJc5Tq031767; Sun, 20 Nov 2016 19:38:05 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201611201938.uAKJc5Tq031767@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 20 Nov 2016 19:38:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308901 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 19:38:06 -0000 Author: jmcneill Date: Sun Nov 20 19:38:05 2016 New Revision: 308901 URL: https://svnweb.freebsd.org/changeset/base/308901 Log: Add dts for FriendlyARM NanoPi NEO. Added: head/sys/boot/fdt/dts/arm/nanopi-neo.dts (contents, props changed) head/sys/boot/fdt/dts/arm/sun8i-h3-nanopi-neo.dts (contents, props changed) Added: head/sys/boot/fdt/dts/arm/nanopi-neo.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/nanopi-neo.dts Sun Nov 20 19:38:05 2016 (r308901) @@ -0,0 +1,73 @@ +/*- + * Copyright (c) 2016 Jared McNeill + * 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 "sun8i-h3-nanopi-neo.dts" +#include "h3.dtsi" + +/ { + vdd_cpu: reg_cpux_vset { + compatible = "regulator-gpio"; + + regulator-name = "cpux-supply"; + regulator-min-microvolt = <1100000>; + regulator-max-microvolt = <1300000>; + regulator-boot-on; + + gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* GPIOL6 */ + states = <1300000 0x1 + 1100000 0x0>; + + enable-active-high; + }; +}; + +&r_i2c { + status = "okay"; +}; + +&emac { + phy = <&phy1>; + phy-mode = "mii"; + allwinner,use-internal-phy; + allwinner,leds-active-low; + status = "okay"; + + phy1: ethernet-phy@1 { + reg = <1>; + }; +}; + +&cpu0 { + cpu-supply = <&vdd_cpu>; + operating-points = < + /* kHz uV */ + 1008000 1300000 + 816000 1100000 + 480000 1100000 + >; +}; Added: head/sys/boot/fdt/dts/arm/sun8i-h3-nanopi-neo.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/sun8i-h3-nanopi-neo.dts Sun Nov 20 19:38:05 2016 (r308901) @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2016 James Pettigrew + * + * This file is dual-licensed: you can use it either under the terms + * of the GPL or the X11 license, at your option. Note that this dual + * licensing only applies to this file, and not this project as a + * whole. + * + * a) This file is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of the + * License, or (at your option) any later version. + * + * This file is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * Or, alternatively, + * + * b) Permission is hereby granted, free of charge, to any person + * obtaining a copy of this software and associated documentation + * files (the "Software"), to deal in the Software without + * restriction, including without limitation the rights to use, + * copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following + * conditions: + * + * The above copyright notice and this permission notice shall be + * included in all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * $FreeBSD$ + */ + +/dts-v1/; +#include "sun8i-h3.dtsi" +#include "sunxi-common-regulators.dtsi" + +#include +#include +#include + +/ { + model = "FriendlyARM NanoPi NEO"; + compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3"; + + aliases { + serial0 = &uart0; + }; + + chosen { + stdout-path = "serial0:115200n8"; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-names = "default"; + pinctrl-0 = <&leds_opc>, <&leds_r_opc>; + + pwr_led { + label = "nanopi:green:pwr"; + gpios = <&r_pio 0 10 GPIO_ACTIVE_HIGH>; + default-state = "on"; + }; + + status_led { + label = "nanopi:blue:status"; + gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; + }; + }; +}; + +&ehci3 { + status = "okay"; +}; + +&mmc0 { + pinctrl-names = "default"; + pinctrl-0 = <&mmc0_pins_a>, <&mmc0_cd_pin>; + vmmc-supply = <®_vcc3v3>; + bus-width = <4>; + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */ + cd-inverted; + status = "okay"; +}; + +&ohci3 { + status = "okay"; +}; + +&pio { + leds_opc: led_pins@0 { + allwinner,pins = "PA10"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; + +&r_pio { + leds_r_opc: led_pins@0 { + allwinner,pins = "PL10"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; + +&uart0 { + pinctrl-names = "default"; + pinctrl-0 = <&uart0_pins_a>; + status = "okay"; +}; + +&usbphy { + /* USB VBUS is always on */ + status = "okay"; +}; From owner-svn-src-head@freebsd.org Sun Nov 20 19:38:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77FB6C4C0B1; Sun, 20 Nov 2016 19:38:47 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 552FE845; Sun, 20 Nov 2016 19:38:47 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKJckF6031836; Sun, 20 Nov 2016 19:38:46 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKJckHE031835; Sun, 20 Nov 2016 19:38:46 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201611201938.uAKJckHE031835@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 20 Nov 2016 19:38:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308902 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 19:38:47 -0000 Author: jmcneill Date: Sun Nov 20 19:38:46 2016 New Revision: 308902 URL: https://svnweb.freebsd.org/changeset/base/308902 Log: Add dts for Xunlong Orange Pi Plus 2E. Added: head/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts (contents, props changed) Added: head/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/boot/fdt/dts/arm/orangepi-plus-2e.dts Sun Nov 20 19:38:46 2016 (r308902) @@ -0,0 +1,121 @@ +/*- + * Copyright (c) 2016 Jared McNeill + * 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 "sun8i-h3-orangepi-plus.dts" +#include "h3.dtsi" + +/ { + model = "Xunlong Orange Pi Plus 2E"; + compatible = "xunlong,orangepi-plus-2e", "allwinner,sun8i-h3"; + + reg_gmac_3v3: gmac-3v3 { + compatible = "regulator-fixed"; + pinctrl-names = "default"; + pinctrl-0 = <&emac_phy_reset_pin>; + regulator-name = "gmac-3v3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + startup-delay-us = <100000>; + enable-active-high; + gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; + }; +}; + +&pio { + emac_phy_reset_pin: emac_phy_reset_pin@0 { + allwinner,pins = "PD6"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; + + codec_pa_pin: codec_pa_pin@0 { + allwinner,pins = "PA16"; + allwinner,function = "gpio_out"; + allwinner,drive = ; + allwinner,pull = ; + }; +}; + +&emac { + pinctrl-names = "default"; + pinctrl-0 = <&emac_pins_rgmii_a>; + phy-supply = <®_gmac_3v3>; + phy-mode = "rgmii"; + phy = <&phy1>; + + allwinner,leds-active-low; + status = "okay"; + + phy1: ethernet-phy@1 { + reg = <1>; + }; +}; + +&ehci2 { + status = "okay"; +}; + +&i2c0 { + status = "okay"; +}; + +&r_i2c { + status = "okay"; + + vdd_cpu: regulator@65 { + compatible = "silergy,sy8106a"; + reg = <0x65>; + + regulator-name = "vdd-cpu"; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-ramp-delay = <200>; + regulator-boot-on; + regulator-always-on; + }; +}; + +&codec { + pinctrl-names = "default"; + pinctrl-0 = <&codec_pa_pin>; + allwinner,pa-gpios = <&pio 0 16 GPIO_ACTIVE_HIGH>; /* PA16 */ + status = "okay"; +}; + +&cpu0 { + cpu-supply = <&vdd_cpu>; + operating-points = < + /* kHz uV */ + 1296000 1340000 + 1200000 1320000 + 1008000 1200000 + 816000 1100000 + 648000 1040000 + >; +}; From owner-svn-src-head@freebsd.org Sun Nov 20 19:39:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4A7D1C4C164; Sun, 20 Nov 2016 19:39:56 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1C80EA98; Sun, 20 Nov 2016 19:39:56 +0000 (UTC) (envelope-from jmcneill@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKJdt1c032020; Sun, 20 Nov 2016 19:39:55 GMT (envelope-from jmcneill@FreeBSD.org) Received: (from jmcneill@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKJdt8M032019; Sun, 20 Nov 2016 19:39:55 GMT (envelope-from jmcneill@FreeBSD.org) Message-Id: <201611201939.uAKJdt8M032019@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jmcneill set sender to jmcneill@FreeBSD.org using -f From: Jared McNeill Date: Sun, 20 Nov 2016 19:39:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308903 - head/sys/modules/dtb/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 19:39:56 -0000 Author: jmcneill Date: Sun Nov 20 19:39:55 2016 New Revision: 308903 URL: https://svnweb.freebsd.org/changeset/base/308903 Log: Build and install nanopi-neo.dts and orangepi-plus-2e.dts Modified: head/sys/modules/dtb/allwinner/Makefile Modified: head/sys/modules/dtb/allwinner/Makefile ============================================================================== --- head/sys/modules/dtb/allwinner/Makefile Sun Nov 20 19:38:46 2016 (r308902) +++ head/sys/modules/dtb/allwinner/Makefile Sun Nov 20 19:39:55 2016 (r308903) @@ -5,8 +5,10 @@ DTS= \ bananapim2.dts \ cubieboard.dts \ cubieboard2.dts \ + nanopi-neo.dts \ olimex-a20-som-evb.dts \ olinuxino-lime.dts \ + orangepi-plus-2e.dts \ pcduino3.dts \ sinovoip-bpi-m3.dts \ sun5i-a13-olinuxino.dts \ From owner-svn-src-head@freebsd.org Sun Nov 20 20:13:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B7E5C4CCC0; Sun, 20 Nov 2016 20:13:24 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BC56E16; Sun, 20 Nov 2016 20:13:23 +0000 (UTC) (envelope-from vangyzen@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAKKDM2C047826; Sun, 20 Nov 2016 20:13:22 GMT (envelope-from vangyzen@FreeBSD.org) Received: (from vangyzen@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAKKDM8o047823; Sun, 20 Nov 2016 20:13:22 GMT (envelope-from vangyzen@FreeBSD.org) Message-Id: <201611202013.uAKKDM8o047823@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: vangyzen set sender to vangyzen@FreeBSD.org using -f From: Eric van Gyzen Date: Sun, 20 Nov 2016 20:13:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308904 - head/lib/libc/locale X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Nov 2016 20:13:24 -0000 Author: vangyzen Date: Sun Nov 20 20:13:22 2016 New Revision: 308904 URL: https://svnweb.freebsd.org/changeset/base/308904 Log: Fix error reporting from wcstof() When wcstof() skipped initial space and then parsing failed, it set endptr to the first non-space character. Fix it to correctly report failure by setting endptr to the beginning of the input string. The fix is from theraven@, who fixed this bug in wcstod() and wcstold() in r227753. While I'm here: Move assignments out of declarations in wcstod() and wcstold(). This is against my personal preference, but it is our agreed style(9). Set endptr correctly on malloc() failure in all three functions. Remove an incorrect comment: This is pointer arithmetic, so the code was not actually making that assumption. wcstold() advanced the wcp pointer beyond leading whitespace and then reset it back to the beginning of the string. Do not reset it. This seems to have no functional effect, since strtold_l() also skips leading whitespace. I'm making the change to keep this function consistent with wcstof() and wcstod(), and because the C11 spec prescribes the use of iswspace() to skip leading space. Reported by: libc++ unit test for std::stof(std::wstring) MFC after: 8 days Sponsored by: Dell EMC Modified: head/lib/libc/locale/wcstod.c head/lib/libc/locale/wcstof.c head/lib/libc/locale/wcstold.c Modified: head/lib/libc/locale/wcstod.c ============================================================================== --- head/lib/libc/locale/wcstod.c Sun Nov 20 19:39:55 2016 (r308903) +++ head/lib/libc/locale/wcstod.c Sun Nov 20 20:13:22 2016 (r308904) @@ -54,11 +54,13 @@ wcstod_l(const wchar_t * __restrict nptr mbstate_t mbs; double val; char *buf, *end; - const wchar_t *wcp = nptr; + const wchar_t *wcp; size_t len; - size_t spaces = 0; + size_t spaces; FIX_LOCALE(locale); + wcp = nptr; + spaces = 0; while (iswspace_l(*wcp, locale)) { wcp++; spaces++; @@ -80,8 +82,11 @@ wcstod_l(const wchar_t * __restrict nptr *endptr = (wchar_t *)nptr; return (0.0); } - if ((buf = malloc(len + 1)) == NULL) + if ((buf = malloc(len + 1)) == NULL) { + if (endptr != NULL) + *endptr = (wchar_t *)nptr; return (0.0); + } mbs = initial; wcsrtombs_l(buf, &wcp, len + 1, &mbs, locale); @@ -95,13 +100,11 @@ wcstod_l(const wchar_t * __restrict nptr * corresponding position in the wide char string. */ if (endptr != NULL) { - /* XXX Assume each wide char is one byte. */ *endptr = (wchar_t *)nptr + (end - buf); if (buf != end) *endptr += spaces; } - free(buf); return (val); Modified: head/lib/libc/locale/wcstof.c ============================================================================== --- head/lib/libc/locale/wcstof.c Sun Nov 20 19:39:55 2016 (r308903) +++ head/lib/libc/locale/wcstof.c Sun Nov 20 20:13:22 2016 (r308904) @@ -50,27 +50,37 @@ wcstof_l(const wchar_t * __restrict nptr char *buf, *end; const wchar_t *wcp; size_t len; + size_t spaces; FIX_LOCALE(locale); - while (iswspace_l(*nptr, locale)) - nptr++; - wcp = nptr; + spaces = 0; + while (iswspace_l(*wcp, locale)) { + wcp++; + spaces++; + } + mbs = initial; if ((len = wcsrtombs_l(NULL, &wcp, 0, &mbs, locale)) == (size_t)-1) { if (endptr != NULL) *endptr = (wchar_t *)nptr; return (0.0); } - if ((buf = malloc(len + 1)) == NULL) + if ((buf = malloc(len + 1)) == NULL) { + if (endptr != NULL) + *endptr = (wchar_t *)nptr; return (0.0); + } mbs = initial; wcsrtombs_l(buf, &wcp, len + 1, &mbs, locale); val = strtof_l(buf, &end, locale); - if (endptr != NULL) + if (endptr != NULL) { *endptr = (wchar_t *)nptr + (end - buf); + if (buf != end) + *endptr += spaces; + } free(buf); Modified: head/lib/libc/locale/wcstold.c ============================================================================== --- head/lib/libc/locale/wcstold.c Sun Nov 20 19:39:55 2016 (r308903) +++ head/lib/libc/locale/wcstold.c Sun Nov 20 20:13:22 2016 (r308904) @@ -48,32 +48,35 @@ wcstold_l(const wchar_t * __restrict npt mbstate_t mbs; long double val; char *buf, *end; - const wchar_t *wcp = nptr; + const wchar_t *wcp; size_t len; - size_t spaces = 0; + size_t spaces; FIX_LOCALE(locale); + wcp = nptr; + spaces = 0; while (iswspace_l(*wcp, locale)) { wcp++; spaces++; } - wcp = nptr; mbs = initial; if ((len = wcsrtombs_l(NULL, &wcp, 0, &mbs, locale)) == (size_t)-1) { if (endptr != NULL) *endptr = (wchar_t *)nptr; return (0.0); } - if ((buf = malloc(len + 1)) == NULL) + if ((buf = malloc(len + 1)) == NULL) { + if (endptr != NULL) + *endptr = (wchar_t *)nptr; return (0.0); + } mbs = initial; wcsrtombs_l(buf, &wcp, len + 1, &mbs, locale); val = strtold_l(buf, &end, locale); if (endptr != NULL) { - /* XXX Assume each wide char is one byte. */ *endptr = (wchar_t *)nptr + (end - buf); if (buf != end) *endptr += spaces; From owner-svn-src-head@freebsd.org Mon Nov 21 05:00:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F69CC469D1; Mon, 21 Nov 2016 05:00:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D77D2DE8; Mon, 21 Nov 2016 05:00:52 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAL50q5R062910; Mon, 21 Nov 2016 05:00:52 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAL50p34062907; Mon, 21 Nov 2016 05:00:51 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611210500.uAL50p34062907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 21 Nov 2016 05:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308905 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 05:00:53 -0000 Author: sephe Date: Mon Nov 21 05:00:51 2016 New Revision: 308905 URL: https://svnweb.freebsd.org/changeset/base/308905 Log: hyperv/hn: Implement RNDIS multi-packet message support. Currently, it is only applied to packet sent through chimney sending buffers. Not enabled by default yet. This one gives 20%~30% performance boost for non-TSO usage in both bit/packet rate tests and nginx performance test. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8560 Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c head/sys/dev/hyperv/netvsc/if_hn.c head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_rndis.c Sun Nov 20 20:13:22 2016 (r308904) +++ head/sys/dev/hyperv/netvsc/hn_rndis.c Mon Nov 21 05:00:51 2016 (r308905) @@ -838,11 +838,15 @@ hn_rndis_init(struct hn_softc *sc) error = EIO; goto done; } + sc->hn_rndis_agg_size = comp->rm_pktmaxsz; + sc->hn_rndis_agg_pkts = comp->rm_pktmaxcnt; + sc->hn_rndis_agg_align = 1U << comp->rm_align; + if (bootverbose) { if_printf(sc->hn_ifp, "RNDIS ver %u.%u, pktsz %u, pktcnt %u, " "align %u\n", comp->rm_ver_major, comp->rm_ver_minor, - comp->rm_pktmaxsz, comp->rm_pktmaxcnt, - 1U << comp->rm_align); + sc->hn_rndis_agg_size, sc->hn_rndis_agg_pkts, + sc->hn_rndis_agg_align); } error = 0; done: Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Sun Nov 20 20:13:22 2016 (r308904) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:00:51 2016 (r308905) @@ -159,10 +159,22 @@ __FBSDID("$FreeBSD$"); #define HN_CSUM_IP6_HWASSIST(sc) \ ((sc)->hn_tx_ring[0].hn_csum_assist & HN_CSUM_IP6_MASK) +#define HN_PKTSIZE_MIN(align) \ + roundup2(ETHER_MIN_LEN + ETHER_VLAN_ENCAP_LEN - ETHER_CRC_LEN + \ + HN_RNDIS_PKT_LEN, (align)) +#define HN_PKTSIZE(m, align) \ + roundup2((m)->m_pkthdr.len + HN_RNDIS_PKT_LEN, (align)) + struct hn_txdesc { #ifndef HN_USE_TXDESC_BUFRING SLIST_ENTRY(hn_txdesc) link; #endif + STAILQ_ENTRY(hn_txdesc) agg_link; + + /* Aggregated txdescs, in sending order. */ + STAILQ_HEAD(, hn_txdesc) agg_list; + + /* The oldest packet, if transmission aggregation happens. */ struct mbuf *m; struct hn_tx_ring *txr; int refs; @@ -180,6 +192,7 @@ struct hn_txdesc { #define HN_TXD_FLAG_ONLIST 0x0001 #define HN_TXD_FLAG_DMAMAP 0x0002 +#define HN_TXD_FLAG_ONAGG 0x0004 struct hn_rxinfo { uint32_t vlan_info; @@ -259,6 +272,10 @@ static int hn_rxfilter_sysctl(SYSCTL_H static int hn_rss_key_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_ind_sysctl(SYSCTL_HANDLER_ARGS); static int hn_rss_hash_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_txagg_size_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_txagg_pkts_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_txagg_pktmax_sysctl(SYSCTL_HANDLER_ARGS); +static int hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS); static void hn_stop(struct hn_softc *); static void hn_init_locked(struct hn_softc *); @@ -306,7 +323,7 @@ static int hn_create_tx_data(struct hn static void hn_fixup_tx_data(struct hn_softc *); static void hn_destroy_tx_data(struct hn_softc *); static void hn_txdesc_dmamap_destroy(struct hn_txdesc *); -static int hn_encap(struct hn_tx_ring *, +static int hn_encap(struct ifnet *, struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); static int hn_txpkt(struct ifnet *, struct hn_tx_ring *, struct hn_txdesc *); @@ -315,6 +332,10 @@ static void hn_set_tso_maxsize(struct static bool hn_tx_ring_pending(struct hn_tx_ring *); static void hn_tx_ring_qflush(struct hn_tx_ring *); static void hn_resume_tx(struct hn_softc *, int); +static void hn_set_txagg(struct hn_softc *); +static void *hn_try_txagg(struct ifnet *, + struct hn_tx_ring *, struct hn_txdesc *, + int); static int hn_get_txswq_depth(const struct hn_tx_ring *); static void hn_txpkt_done(struct hn_nvs_sendctx *, struct hn_softc *, struct vmbus_channel *, @@ -430,6 +451,16 @@ SYSCTL_UINT(_hw_hn, OID_AUTO, lro_mbufq_ &hn_lro_mbufq_depth, 0, "Depth of LRO mbuf queue"); #endif +/* Packet transmission aggregation size limit */ +static int hn_tx_agg_size = -1; +SYSCTL_INT(_hw_hn, OID_AUTO, tx_agg_size, CTLFLAG_RDTUN, + &hn_tx_agg_size, 0, "Packet transmission aggregation size limit"); + +/* Packet transmission aggregation count limit */ +static int hn_tx_agg_pkts = 0; +SYSCTL_INT(_hw_hn, OID_AUTO, tx_agg_pkts, CTLFLAG_RDTUN, + &hn_tx_agg_pkts, 0, "Packet transmission aggregation packet limit"); + static u_int hn_cpu_index; /* next CPU for channel */ static struct taskqueue *hn_tx_taskq; /* shared TX taskqueue */ @@ -658,6 +689,84 @@ hn_set_rxfilter(struct hn_softc *sc) return (error); } +static void +hn_set_txagg(struct hn_softc *sc) +{ + uint32_t size, pkts; + int i; + + /* + * Setup aggregation size. + */ + if (sc->hn_agg_size < 0) + size = UINT32_MAX; + else + size = sc->hn_agg_size; + + if (sc->hn_rndis_agg_size < size) + size = sc->hn_rndis_agg_size; + + if (size <= 2 * HN_PKTSIZE_MIN(sc->hn_rndis_agg_align)) { + /* Disable */ + size = 0; + pkts = 0; + goto done; + } + + /* NOTE: Type of the per TX ring setting is 'int'. */ + if (size > INT_MAX) + size = INT_MAX; + + /* NOTE: We only aggregate packets using chimney sending buffers. */ + if (size > (uint32_t)sc->hn_chim_szmax) + size = sc->hn_chim_szmax; + + /* + * Setup aggregation packet count. + */ + if (sc->hn_agg_pkts < 0) + pkts = UINT32_MAX; + else + pkts = sc->hn_agg_pkts; + + if (sc->hn_rndis_agg_pkts < pkts) + pkts = sc->hn_rndis_agg_pkts; + + if (pkts <= 1) { + /* Disable */ + size = 0; + pkts = 0; + goto done; + } + + /* NOTE: Type of the per TX ring setting is 'short'. */ + if (pkts > SHRT_MAX) + pkts = SHRT_MAX; + +done: + /* NOTE: Type of the per TX ring setting is 'short'. */ + if (sc->hn_rndis_agg_align > SHRT_MAX) { + /* Disable */ + size = 0; + pkts = 0; + } + + if (bootverbose) { + if_printf(sc->hn_ifp, "TX agg size %u, pkts %u, align %u\n", + size, pkts, sc->hn_rndis_agg_align); + } + + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { + struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + + mtx_lock(&txr->hn_tx_lock); + txr->hn_agg_szmax = size; + txr->hn_agg_pktmax = pkts; + txr->hn_agg_align = sc->hn_rndis_agg_align; + mtx_unlock(&txr->hn_tx_lock); + } +} + static int hn_get_txswq_depth(const struct hn_tx_ring *txr) { @@ -785,6 +894,12 @@ hn_attach(device_t dev) HN_LOCK_INIT(sc); /* + * Initialize these tunables once. + */ + sc->hn_agg_size = hn_tx_agg_size; + sc->hn_agg_pkts = hn_tx_agg_pkts; + + /* * Setup taskqueue for transmission. */ if (hn_tx_taskq == NULL) { @@ -939,6 +1054,24 @@ hn_attach(device_t dev) SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "rss_ind", CTLTYPE_OPAQUE | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, hn_rss_ind_sysctl, "IU", "RSS indirect table"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rndis_agg_size", + CTLFLAG_RD, &sc->hn_rndis_agg_size, 0, + "RNDIS offered packet transmission aggregation size limit"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rndis_agg_pkts", + CTLFLAG_RD, &sc->hn_rndis_agg_pkts, 0, + "RNDIS offered packet transmission aggregation count limit"); + SYSCTL_ADD_UINT(ctx, child, OID_AUTO, "rndis_agg_align", + CTLFLAG_RD, &sc->hn_rndis_agg_align, 0, + "RNDIS packet transmission aggregation alignment"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "agg_size", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_txagg_size_sysctl, "I", + "Packet transmission aggregation size, 0 -- disable, -1 -- auto"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "agg_pkts", + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, 0, + hn_txagg_pkts_sysctl, "I", + "Packet transmission aggregation packets, " + "0 -- disable, -1 -- auto"); /* * Setup the ifmedia, which has been initialized earlier. @@ -1189,16 +1322,45 @@ hn_txdesc_put(struct hn_tx_ring *txr, st KASSERT((txd->flags & HN_TXD_FLAG_ONLIST) == 0, ("put an onlist txd %#x", txd->flags)); + KASSERT((txd->flags & HN_TXD_FLAG_ONAGG) == 0, + ("put an onagg txd %#x", txd->flags)); KASSERT(txd->refs > 0, ("invalid txd refs %d", txd->refs)); if (atomic_fetchadd_int(&txd->refs, -1) != 1) return 0; + if (!STAILQ_EMPTY(&txd->agg_list)) { + struct hn_txdesc *tmp_txd; + + while ((tmp_txd = STAILQ_FIRST(&txd->agg_list)) != NULL) { + int freed; + + KASSERT(STAILQ_EMPTY(&tmp_txd->agg_list), + ("resursive aggregation on aggregated txdesc")); + KASSERT((tmp_txd->flags & HN_TXD_FLAG_ONAGG), + ("not aggregated txdesc")); + KASSERT((tmp_txd->flags & HN_TXD_FLAG_DMAMAP) == 0, + ("aggregated txdesc uses dmamap")); + KASSERT(tmp_txd->chim_index == HN_NVS_CHIM_IDX_INVALID, + ("aggregated txdesc consumes " + "chimney sending buffer")); + KASSERT(tmp_txd->chim_size == 0, + ("aggregated txdesc has non-zero " + "chimney sending size")); + + STAILQ_REMOVE_HEAD(&txd->agg_list, agg_link); + tmp_txd->flags &= ~HN_TXD_FLAG_ONAGG; + freed = hn_txdesc_put(txr, tmp_txd); + KASSERT(freed, ("failed to free aggregated txdesc")); + } + } + if (txd->chim_index != HN_NVS_CHIM_IDX_INVALID) { KASSERT((txd->flags & HN_TXD_FLAG_DMAMAP) == 0, ("chim txd uses dmamap")); hn_chim_free(txr->hn_sc, txd->chim_index); txd->chim_index = HN_NVS_CHIM_IDX_INVALID; + txd->chim_size = 0; } else if (txd->flags & HN_TXD_FLAG_DMAMAP) { bus_dmamap_sync(txr->hn_tx_data_dtag, txd->data_dmap, BUS_DMASYNC_POSTWRITE); @@ -1253,8 +1415,11 @@ hn_txdesc_get(struct hn_tx_ring *txr) atomic_subtract_int(&txr->hn_txdesc_avail, 1); #endif KASSERT(txd->m == NULL && txd->refs == 0 && + STAILQ_EMPTY(&txd->agg_list) && txd->chim_index == HN_NVS_CHIM_IDX_INVALID && + txd->chim_size == 0 && (txd->flags & HN_TXD_FLAG_ONLIST) && + (txd->flags & HN_TXD_FLAG_ONAGG) == 0 && (txd->flags & HN_TXD_FLAG_DMAMAP) == 0, ("invalid txd")); txd->flags &= ~HN_TXD_FLAG_ONLIST; txd->refs = 1; @@ -1271,6 +1436,22 @@ hn_txdesc_hold(struct hn_txdesc *txd) atomic_add_int(&txd->refs, 1); } +static __inline void +hn_txdesc_agg(struct hn_txdesc *agg_txd, struct hn_txdesc *txd) +{ + + KASSERT((agg_txd->flags & HN_TXD_FLAG_ONAGG) == 0, + ("recursive aggregation on aggregating txdesc")); + + KASSERT((txd->flags & HN_TXD_FLAG_ONAGG) == 0, + ("already aggregated")); + KASSERT(STAILQ_EMPTY(&txd->agg_list), + ("recursive aggregation on to-be-aggregated txdesc")); + + txd->flags |= HN_TXD_FLAG_ONAGG; + STAILQ_INSERT_TAIL(&agg_txd->agg_list, txd, agg_link); +} + static bool hn_tx_ring_pending(struct hn_tx_ring *txr) { @@ -1382,12 +1563,123 @@ hn_rndis_pktinfo_append(struct rndis_pac return (pi->rm_data); } +static __inline int +hn_flush_txagg(struct ifnet *ifp, struct hn_tx_ring *txr) +{ + struct hn_txdesc *txd; + struct mbuf *m; + int error, pkts; + + txd = txr->hn_agg_txd; + KASSERT(txd != NULL, ("no aggregate txdesc")); + + /* + * Since hn_txpkt() will reset this temporary stat, save + * it now, so that oerrors can be updated properly, if + * hn_txpkt() ever fails. + */ + pkts = txr->hn_stat_pkts; + + /* + * Since txd's mbuf will _not_ be freed upon hn_txpkt() + * failure, save it for later freeing, if hn_txpkt() ever + * fails. + */ + m = txd->m; + error = hn_txpkt(ifp, txr, txd); + if (__predict_false(error)) { + /* txd is freed, but m is not. */ + m_freem(m); + + txr->hn_flush_failed++; + if_inc_counter(ifp, IFCOUNTER_OERRORS, pkts); + } + + /* Reset all aggregation states. */ + txr->hn_agg_txd = NULL; + txr->hn_agg_szleft = 0; + txr->hn_agg_pktleft = 0; + txr->hn_agg_prevpkt = NULL; + + return (error); +} + +static void * +hn_try_txagg(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd, + int pktsize) +{ + void *chim; + + if (txr->hn_agg_txd != NULL) { + if (txr->hn_agg_pktleft >= 1 && txr->hn_agg_szleft > pktsize) { + struct hn_txdesc *agg_txd = txr->hn_agg_txd; + struct rndis_packet_msg *pkt = txr->hn_agg_prevpkt; + int olen; + + /* + * Update the previous RNDIS packet's total length, + * it can be increased due to the mandatory alignment + * padding for this RNDIS packet. And update the + * aggregating txdesc's chimney sending buffer size + * accordingly. + * + * XXX + * Zero-out the padding, as required by the RNDIS spec. + */ + olen = pkt->rm_len; + pkt->rm_len = roundup2(olen, txr->hn_agg_align); + agg_txd->chim_size += pkt->rm_len - olen; + + /* Link this txdesc to the parent. */ + hn_txdesc_agg(agg_txd, txd); + + chim = (uint8_t *)pkt + pkt->rm_len; + /* Save the current packet for later fixup. */ + txr->hn_agg_prevpkt = chim; + + txr->hn_agg_pktleft--; + txr->hn_agg_szleft -= pktsize; + if (txr->hn_agg_szleft <= + HN_PKTSIZE_MIN(txr->hn_agg_align)) { + /* + * Probably can't aggregate more packets, + * flush this aggregating txdesc proactively. + */ + txr->hn_agg_pktleft = 0; + } + /* Done! */ + return (chim); + } + hn_flush_txagg(ifp, txr); + } + KASSERT(txr->hn_agg_txd == NULL, ("lingering aggregating txdesc")); + + txr->hn_tx_chimney_tried++; + txd->chim_index = hn_chim_alloc(txr->hn_sc); + if (txd->chim_index == HN_NVS_CHIM_IDX_INVALID) + return (NULL); + txr->hn_tx_chimney++; + + chim = txr->hn_sc->hn_chim + + (txd->chim_index * txr->hn_sc->hn_chim_szmax); + + if (txr->hn_agg_pktmax > 1 && + txr->hn_agg_szmax > pktsize + HN_PKTSIZE_MIN(txr->hn_agg_align)) { + txr->hn_agg_txd = txd; + txr->hn_agg_pktleft = txr->hn_agg_pktmax - 1; + txr->hn_agg_szleft = txr->hn_agg_szmax - pktsize; + txr->hn_agg_prevpkt = chim; + } + return (chim); +} + /* * NOTE: * If this function fails, then both txd and m_head0 will be freed. */ static int -hn_encap(struct hn_tx_ring *txr, struct hn_txdesc *txd, struct mbuf **m_head0) +hn_encap(struct ifnet *ifp, struct hn_tx_ring *txr, struct hn_txdesc *txd, + struct mbuf **m_head0) { bus_dma_segment_t segs[HN_TX_DATA_SEGCNT_MAX]; int error, nsegs, i; @@ -1395,33 +1687,30 @@ hn_encap(struct hn_tx_ring *txr, struct struct rndis_packet_msg *pkt; uint32_t *pi_data; void *chim = NULL; - int pktlen; + int pkt_hlen, pkt_size; pkt = txd->rndis_pkt; - if (m_head->m_pkthdr.len + HN_RNDIS_PKT_LEN < txr->hn_chim_size) { - /* - * This packet is small enough to fit into a chimney sending - * buffer. Try allocating one chimney sending buffer now. - */ - txr->hn_tx_chimney_tried++; - txd->chim_index = hn_chim_alloc(txr->hn_sc); - if (txd->chim_index != HN_NVS_CHIM_IDX_INVALID) { - chim = txr->hn_sc->hn_chim + - (txd->chim_index * txr->hn_sc->hn_chim_szmax); - /* - * Directly fill the chimney sending buffer w/ the - * RNDIS packet message. - */ + pkt_size = HN_PKTSIZE(m_head, txr->hn_agg_align); + if (pkt_size < txr->hn_chim_size) { + chim = hn_try_txagg(ifp, txr, txd, pkt_size); + if (chim != NULL) pkt = chim; - } + } else { + if (txr->hn_agg_txd != NULL) + hn_flush_txagg(ifp, txr); } pkt->rm_type = REMOTE_NDIS_PACKET_MSG; pkt->rm_len = sizeof(*pkt) + m_head->m_pkthdr.len; pkt->rm_dataoffset = sizeof(*pkt); pkt->rm_datalen = m_head->m_pkthdr.len; + pkt->rm_oobdataoffset = 0; + pkt->rm_oobdatalen = 0; + pkt->rm_oobdataelements = 0; pkt->rm_pktinfooffset = sizeof(*pkt); pkt->rm_pktinfolen = 0; + pkt->rm_vchandle = 0; + pkt->rm_reserved = 0; if (txr->hn_tx_flags & HN_TX_FLAG_HASHVAL) { /* @@ -1482,7 +1771,7 @@ hn_encap(struct hn_tx_ring *txr, struct *pi_data |= NDIS_TXCSUM_INFO_UDPCS; } - pktlen = pkt->rm_pktinfooffset + pkt->rm_pktinfolen; + pkt_hlen = pkt->rm_pktinfooffset + pkt->rm_pktinfolen; /* Convert RNDIS packet message offsets */ pkt->rm_dataoffset = hn_rndis_pktmsg_offset(pkt->rm_dataoffset); pkt->rm_pktinfooffset = hn_rndis_pktmsg_offset(pkt->rm_pktinfooffset); @@ -1491,25 +1780,36 @@ hn_encap(struct hn_tx_ring *txr, struct * Fast path: Chimney sending. */ if (chim != NULL) { - KASSERT(txd->chim_index != HN_NVS_CHIM_IDX_INVALID, - ("chimney buffer is not used")); - KASSERT(pkt == chim, ("RNDIS pkt not in chimney buffer")); + struct hn_txdesc *tgt_txd = txd; + + if (txr->hn_agg_txd != NULL) { + tgt_txd = txr->hn_agg_txd; +#ifdef INVARIANTS + *m_head0 = NULL; +#endif + } + + KASSERT(pkt == chim, + ("RNDIS pkt not in chimney sending buffer")); + KASSERT(tgt_txd->chim_index != HN_NVS_CHIM_IDX_INVALID, + ("chimney sending buffer is not used")); + tgt_txd->chim_size += pkt->rm_len; m_copydata(m_head, 0, m_head->m_pkthdr.len, - ((uint8_t *)chim) + pktlen); + ((uint8_t *)chim) + pkt_hlen); - txd->chim_size = pkt->rm_len; txr->hn_gpa_cnt = 0; - txr->hn_tx_chimney++; txr->hn_sendpkt = hn_txpkt_chim; goto done; } + + KASSERT(txr->hn_agg_txd == NULL, ("aggregating sglist txdesc")); KASSERT(txd->chim_index == HN_NVS_CHIM_IDX_INVALID, ("chimney buffer is used")); KASSERT(pkt == txd->rndis_pkt, ("RNDIS pkt not in txdesc")); error = hn_txdesc_dmamap_load(txr, txd, &m_head, segs, &nsegs); - if (error) { + if (__predict_false(error)) { int freed; /* @@ -1523,7 +1823,7 @@ hn_encap(struct hn_tx_ring *txr, struct ("fail to free txd upon txdma error")); txr->hn_txdma_failed++; - if_inc_counter(txr->hn_sc->hn_ifp, IFCOUNTER_OERRORS, 1); + if_inc_counter(ifp, IFCOUNTER_OERRORS, 1); return error; } *m_head0 = m_head; @@ -1534,7 +1834,7 @@ hn_encap(struct hn_tx_ring *txr, struct /* send packet with page buffer */ txr->hn_gpa[0].gpa_page = atop(txd->rndis_pkt_paddr); txr->hn_gpa[0].gpa_ofs = txd->rndis_pkt_paddr & PAGE_MASK; - txr->hn_gpa[0].gpa_len = pktlen; + txr->hn_gpa[0].gpa_len = pkt_hlen; /* * Fill the page buffers with mbuf info after the page @@ -1557,6 +1857,12 @@ done: /* Set the completion routine */ hn_nvs_sendctx_init(&txd->send_ctx, hn_txpkt_done, txd); + /* Update temporary stats for later use. */ + txr->hn_stat_pkts++; + txr->hn_stat_size += m_head->m_pkthdr.len; + if (m_head->m_flags & M_MCAST) + txr->hn_stat_mcasts++; + return 0; } @@ -1572,23 +1878,34 @@ hn_txpkt(struct ifnet *ifp, struct hn_tx again: /* - * Make sure that txd is not freed before ETHER_BPF_MTAP. + * Make sure that this txd and any aggregated txds are not freed + * before ETHER_BPF_MTAP. */ hn_txdesc_hold(txd); error = txr->hn_sendpkt(txr, txd); if (!error) { - ETHER_BPF_MTAP(ifp, txd->m); - if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); + if (bpf_peers_present(ifp->if_bpf)) { + const struct hn_txdesc *tmp_txd; + + ETHER_BPF_MTAP(ifp, txd->m); + STAILQ_FOREACH(tmp_txd, &txd->agg_list, agg_link) + ETHER_BPF_MTAP(ifp, tmp_txd->m); + } + + if_inc_counter(ifp, IFCOUNTER_OPACKETS, txr->hn_stat_pkts); #ifdef HN_IFSTART_SUPPORT if (!hn_use_if_start) #endif { if_inc_counter(ifp, IFCOUNTER_OBYTES, - txd->m->m_pkthdr.len); - if (txd->m->m_flags & M_MCAST) - if_inc_counter(ifp, IFCOUNTER_OMCASTS, 1); + txr->hn_stat_size); + if (txr->hn_stat_mcasts != 0) { + if_inc_counter(ifp, IFCOUNTER_OMCASTS, + txr->hn_stat_mcasts); + } } - txr->hn_pkts++; + txr->hn_pkts += txr->hn_stat_pkts; + txr->hn_sends++; } hn_txdesc_put(txr, txd); @@ -1628,7 +1945,13 @@ again: txr->hn_send_failed++; } - return error; + + /* Reset temporary stats, after this sending is done. */ + txr->hn_stat_size = 0; + txr->hn_stat_pkts = 0; + txr->hn_stat_mcasts = 0; + + return (error); } /* @@ -2412,6 +2735,64 @@ hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARG } static int +hn_txagg_size_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int error, size; + + size = sc->hn_agg_size; + error = sysctl_handle_int(oidp, &size, 0, req); + if (error || req->newptr == NULL) + return (error); + + HN_LOCK(sc); + sc->hn_agg_size = size; + hn_set_txagg(sc); + HN_UNLOCK(sc); + + return (0); +} + +static int +hn_txagg_pkts_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int error, pkts; + + pkts = sc->hn_agg_pkts; + error = sysctl_handle_int(oidp, &pkts, 0, req); + if (error || req->newptr == NULL) + return (error); + + HN_LOCK(sc); + sc->hn_agg_pkts = pkts; + hn_set_txagg(sc); + HN_UNLOCK(sc); + + return (0); +} + +static int +hn_txagg_pktmax_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int pkts; + + pkts = sc->hn_tx_ring[0].hn_agg_pktmax; + return (sysctl_handle_int(oidp, &pkts, 0, req)); +} + +static int +hn_txagg_align_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct hn_softc *sc = arg1; + int align; + + align = sc->hn_tx_ring[0].hn_agg_align; + return (sysctl_handle_int(oidp, &align, 0, req)); +} + +static int hn_ndis_version_sysctl(SYSCTL_HANDLER_ARGS) { struct hn_softc *sc = arg1; @@ -2954,6 +3335,7 @@ hn_tx_ring_create(struct hn_softc *sc, i txd->txr = txr; txd->chim_index = HN_NVS_CHIM_IDX_INVALID; + STAILQ_INIT(&txd->agg_list); /* * Allocate and load RNDIS packet message. @@ -3037,6 +3419,8 @@ hn_tx_ring_create(struct hn_softc *sc, i SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "packets", CTLFLAG_RW, &txr->hn_pkts, "# of packets transmitted"); + SYSCTL_ADD_ULONG(ctx, child, OID_AUTO, "sends", + CTLFLAG_RW, &txr->hn_sends, "# of sends"); } } @@ -3151,6 +3535,11 @@ hn_create_tx_data(struct hn_softc *sc, i CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, __offsetof(struct hn_tx_ring, hn_txdma_failed), hn_tx_stat_ulong_sysctl, "LU", "# of TX DMA failure"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "agg_flush_failed", + CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, + __offsetof(struct hn_tx_ring, hn_flush_failed), + hn_tx_stat_ulong_sysctl, "LU", + "# of packet transmission aggregation flush failure"); SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "tx_collapsed", CTLTYPE_ULONG | CTLFLAG_RW | CTLFLAG_MPSAFE, sc, __offsetof(struct hn_tx_ring, hn_tx_collapsed), @@ -3187,6 +3576,17 @@ hn_create_tx_data(struct hn_softc *sc, i CTLFLAG_RD, &sc->hn_tx_ring_cnt, 0, "# created TX rings"); SYSCTL_ADD_INT(ctx, child, OID_AUTO, "tx_ring_inuse", CTLFLAG_RD, &sc->hn_tx_ring_inuse, 0, "# used TX rings"); + SYSCTL_ADD_INT(ctx, child, OID_AUTO, "agg_szmax", + CTLFLAG_RD, &sc->hn_tx_ring[0].hn_agg_szmax, 0, + "Applied packet transmission aggregation size"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "agg_pktmax", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_txagg_pktmax_sysctl, "I", + "Applied packet transmission aggregation packets"); + SYSCTL_ADD_PROC(ctx, child, OID_AUTO, "agg_align", + CTLTYPE_INT | CTLFLAG_RD | CTLFLAG_MPSAFE, sc, 0, + hn_txagg_align_sysctl, "I", + "Applied packet transmission aggregation alignment"); return 0; } @@ -3306,18 +3706,20 @@ hn_start_locked(struct hn_tx_ring *txr, { struct hn_softc *sc = txr->hn_sc; struct ifnet *ifp = sc->hn_ifp; + int sched = 0; KASSERT(hn_use_if_start, ("hn_start_locked is called, when if_start is disabled")); KASSERT(txr == &sc->hn_tx_ring[0], ("not the first TX ring")); mtx_assert(&txr->hn_tx_lock, MA_OWNED); + KASSERT(txr->hn_agg_txd == NULL, ("lingering aggregating txdesc")); if (__predict_false(txr->hn_suspended)) - return 0; + return (0); if ((ifp->if_drv_flags & (IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) - return 0; + return (0); while (!IFQ_DRV_IS_EMPTY(&ifp->if_snd)) { struct hn_txdesc *txd; @@ -3335,7 +3737,8 @@ hn_start_locked(struct hn_tx_ring *txr, * following up packets) to tx taskqueue. */ IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - return 1; + sched = 1; + break; } #if defined(INET6) || defined(INET) @@ -3356,21 +3759,50 @@ hn_start_locked(struct hn_tx_ring *txr, break; } - error = hn_encap(txr, txd, &m_head); + error = hn_encap(ifp, txr, txd, &m_head); if (error) { /* Both txd and m_head are freed */ + KASSERT(txr->hn_agg_txd == NULL, + ("encap failed w/ pending aggregating txdesc")); continue; } - error = hn_txpkt(ifp, txr, txd); - if (__predict_false(error)) { - /* txd is freed, but m_head is not */ - IFQ_DRV_PREPEND(&ifp->if_snd, m_head); - atomic_set_int(&ifp->if_drv_flags, IFF_DRV_OACTIVE); - break; + if (txr->hn_agg_pktleft == 0) { + if (txr->hn_agg_txd != NULL) { + KASSERT(m_head == NULL, + ("pending mbuf for aggregating txdesc")); + error = hn_flush_txagg(ifp, txr); + if (__predict_false(error)) { + atomic_set_int(&ifp->if_drv_flags, + IFF_DRV_OACTIVE); + break; + } + } else { + KASSERT(m_head != NULL, ("mbuf was freed")); + error = hn_txpkt(ifp, txr, txd); + if (__predict_false(error)) { + /* txd is freed, but m_head is not */ + IFQ_DRV_PREPEND(&ifp->if_snd, m_head); + atomic_set_int(&ifp->if_drv_flags, + IFF_DRV_OACTIVE); + break; + } + } + } +#ifdef INVARIANTS + else { + KASSERT(txr->hn_agg_txd != NULL, + ("no aggregating txdesc")); + KASSERT(m_head == NULL, + ("pending mbuf for aggregating txdesc")); } +#endif } - return 0; + + /* Flush pending aggerated transmission. */ + if (txr->hn_agg_txd != NULL) + hn_flush_txagg(ifp, txr); + return (sched); } static void @@ -3447,18 +3879,20 @@ hn_xmit(struct hn_tx_ring *txr, int len) struct hn_softc *sc = txr->hn_sc; struct ifnet *ifp = sc->hn_ifp; struct mbuf *m_head; + int sched = 0; mtx_assert(&txr->hn_tx_lock, MA_OWNED); #ifdef HN_IFSTART_SUPPORT KASSERT(hn_use_if_start == 0, ("hn_xmit is called, when if_start is enabled")); #endif + KASSERT(txr->hn_agg_txd == NULL, ("lingering aggregating txdesc")); if (__predict_false(txr->hn_suspended)) - return 0; + return (0); if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0 || txr->hn_oactive) - return 0; + return (0); while ((m_head = drbr_peek(ifp, txr->hn_mbuf_br)) != NULL) { struct hn_txdesc *txd; @@ -3471,7 +3905,8 @@ hn_xmit(struct hn_tx_ring *txr, int len) * following up packets) to tx taskqueue. */ drbr_putback(ifp, txr->hn_mbuf_br, m_head); - return 1; + sched = 1; + break; } txd = hn_txdesc_get(txr); @@ -3482,25 +3917,53 @@ hn_xmit(struct hn_tx_ring *txr, int len) break; } - error = hn_encap(txr, txd, &m_head); + error = hn_encap(ifp, txr, txd, &m_head); if (error) { /* Both txd and m_head are freed; discard */ + KASSERT(txr->hn_agg_txd == NULL, + ("encap failed w/ pending aggregating txdesc")); drbr_advance(ifp, txr->hn_mbuf_br); continue; } - error = hn_txpkt(ifp, txr, txd); - if (__predict_false(error)) { - /* txd is freed, but m_head is not */ - drbr_putback(ifp, txr->hn_mbuf_br, m_head); - txr->hn_oactive = 1; - break; + if (txr->hn_agg_pktleft == 0) { + if (txr->hn_agg_txd != NULL) { + KASSERT(m_head == NULL, + ("pending mbuf for aggregating txdesc")); + error = hn_flush_txagg(ifp, txr); + if (__predict_false(error)) { + txr->hn_oactive = 1; + break; + } + } else { + KASSERT(m_head != NULL, ("mbuf was freed")); + error = hn_txpkt(ifp, txr, txd); + if (__predict_false(error)) { + /* txd is freed, but m_head is not */ + drbr_putback(ifp, txr->hn_mbuf_br, + m_head); + txr->hn_oactive = 1; + break; + } + } } +#ifdef INVARIANTS + else { + KASSERT(txr->hn_agg_txd != NULL, + ("no aggregating txdesc")); + KASSERT(m_head == NULL, + ("pending mbuf for aggregating txdesc")); + } +#endif /* Sent */ drbr_advance(ifp, txr->hn_mbuf_br); } - return 0; + + /* Flush pending aggerated transmission. */ + if (txr->hn_agg_txd != NULL) + hn_flush_txagg(ifp, txr); + return (sched); } static int @@ -3978,6 +4441,11 @@ back: if (error) return (error); + /* + * Fixup transmission aggregation setup. + */ + hn_set_txagg(sc); + sc->hn_flags |= HN_FLAG_SYNTH_ATTACHED; return (0); } Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Sun Nov 20 20:13:22 2016 (r308904) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Mon Nov 21 05:00:51 2016 (r308905) @@ -125,6 +125,22 @@ struct hn_tx_ring { bus_dma_tag_t hn_tx_data_dtag; uint64_t hn_csum_assist; + /* Applied packet transmission aggregation limits. */ + int hn_agg_szmax; + short hn_agg_pktmax; + short hn_agg_align; + + /* Packet transmission aggregation states. */ + struct hn_txdesc *hn_agg_txd; + int hn_agg_szleft; + short hn_agg_pktleft; + struct rndis_packet_msg *hn_agg_prevpkt; + + /* Temporary stats for each sends. */ + int hn_stat_size; + short hn_stat_pkts; + short hn_stat_mcasts; + int (*hn_sendpkt)(struct hn_tx_ring *, struct hn_txdesc *); int hn_suspended; int hn_gpa_cnt; @@ -137,6 +153,8 @@ struct hn_tx_ring { u_long hn_tx_chimney_tried; u_long hn_tx_chimney; u_long hn_pkts; + u_long hn_sends; + u_long hn_flush_failed; /* Rarely used stuffs */ struct hn_txdesc *hn_txdesc; @@ -180,6 +198,10 @@ struct hn_softc { uint32_t hn_nvs_ver; uint32_t hn_rx_filter; + /* Packet transmission aggregation user settings. */ + int hn_agg_size; + int hn_agg_pkts; + struct taskqueue *hn_mgmt_taskq; struct taskqueue *hn_mgmt_taskq0; struct task hn_link_task; @@ -200,6 +222,9 @@ struct hn_softc { uint32_t hn_ndis_ver; int hn_ndis_tso_szmax; int hn_ndis_tso_sgmin; + uint32_t hn_rndis_agg_size; + uint32_t hn_rndis_agg_pkts; + uint32_t hn_rndis_agg_align; int hn_rss_ind_size; uint32_t hn_rss_hash; /* NDIS_HASH_ */ From owner-svn-src-head@freebsd.org Mon Nov 21 05:09:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C4184C46C32; Mon, 21 Nov 2016 05:09:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 866551258; Mon, 21 Nov 2016 05:09:44 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAL59hQ4066877; Mon, 21 Nov 2016 05:09:43 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAL59hZo066875; Mon, 21 Nov 2016 05:09:43 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611210509.uAL59hZo066875@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 21 Nov 2016 05:09:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308906 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 05:09:44 -0000 Author: sephe Date: Mon Nov 21 05:09:43 2016 New Revision: 308906 URL: https://svnweb.freebsd.org/changeset/base/308906 Log: hyperv/vmbus: Support transction result busy-wait. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8488 Modified: head/sys/dev/hyperv/include/vmbus_xact.h head/sys/dev/hyperv/vmbus/vmbus_xact.c Modified: head/sys/dev/hyperv/include/vmbus_xact.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus_xact.h Mon Nov 21 05:00:51 2016 (r308905) +++ head/sys/dev/hyperv/include/vmbus_xact.h Mon Nov 21 05:09:43 2016 (r308906) @@ -51,6 +51,8 @@ void vmbus_xact_activate(struct vmbus_ void vmbus_xact_deactivate(struct vmbus_xact *xact); const void *vmbus_xact_wait(struct vmbus_xact *xact, size_t *resp_len); +const void *vmbus_xact_busywait(struct vmbus_xact *xact, + size_t *resp_len); void vmbus_xact_wakeup(struct vmbus_xact *xact, const void *data, size_t dlen); void vmbus_xact_ctx_wakeup(struct vmbus_xact_ctx *ctx, Modified: head/sys/dev/hyperv/vmbus/vmbus_xact.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_xact.c Mon Nov 21 05:00:51 2016 (r308905) +++ head/sys/dev/hyperv/vmbus/vmbus_xact.c Mon Nov 21 05:09:43 2016 (r308906) @@ -69,6 +69,8 @@ static struct vmbus_xact *vmbus_xact_all static void vmbus_xact_free(struct vmbus_xact *); static struct vmbus_xact *vmbus_xact_get1(struct vmbus_xact_ctx *, uint32_t); +const void *vmbus_xact_wait1(struct vmbus_xact *, size_t *, + bool); static struct vmbus_xact * vmbus_xact_alloc(struct vmbus_xact_ctx *ctx, bus_dma_tag_t parent_dtag) @@ -249,7 +251,8 @@ vmbus_xact_deactivate(struct vmbus_xact } const void * -vmbus_xact_wait(struct vmbus_xact *xact, size_t *resp_len) +vmbus_xact_wait1(struct vmbus_xact *xact, size_t *resp_len, + bool can_sleep) { struct vmbus_xact_ctx *ctx = xact->x_ctx; const void *resp; @@ -258,8 +261,14 @@ vmbus_xact_wait(struct vmbus_xact *xact, KASSERT(ctx->xc_active == xact, ("xact mismatch")); while (xact->x_resp == NULL) { - mtx_sleep(&ctx->xc_active, &ctx->xc_active_lock, 0, - "wxact", 0); + if (can_sleep) { + mtx_sleep(&ctx->xc_active, &ctx->xc_active_lock, 0, + "wxact", 0); + } else { + mtx_unlock(&ctx->xc_active_lock); + DELAY(1000); + mtx_lock(&ctx->xc_active_lock); + } } ctx->xc_active = NULL; @@ -271,6 +280,20 @@ vmbus_xact_wait(struct vmbus_xact *xact, return (resp); } +const void * +vmbus_xact_wait(struct vmbus_xact *xact, size_t *resp_len) +{ + + return (vmbus_xact_wait1(xact, resp_len, true /* can sleep */)); +} + +const void * +vmbus_xact_busywait(struct vmbus_xact *xact, size_t *resp_len) +{ + + return (vmbus_xact_wait1(xact, resp_len, false /* can't sleep */)); +} + static void vmbus_xact_save_resp(struct vmbus_xact *xact, const void *data, size_t dlen) { From owner-svn-src-head@freebsd.org Mon Nov 21 05:21:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6DF37C46F4A; Mon, 21 Nov 2016 05:21:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EB561822; Mon, 21 Nov 2016 05:21:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAL5LGoL071735; Mon, 21 Nov 2016 05:21:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAL5LFeP071731; Mon, 21 Nov 2016 05:21:15 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611210521.uAL5LFeP071731@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 21 Nov 2016 05:21:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308907 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 05:21:17 -0000 Author: sephe Date: Mon Nov 21 05:21:15 2016 New Revision: 308907 URL: https://svnweb.freebsd.org/changeset/base/308907 Log: hyperv/hn: Fix WITNESS warnings And re-enable SIOCADDMULTI/SIOCDELMULTI, after WITNESS warning is fixed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8489 Modified: head/sys/dev/hyperv/netvsc/hn_nvs.c head/sys/dev/hyperv/netvsc/hn_rndis.c head/sys/dev/hyperv/netvsc/if_hn.c head/sys/dev/hyperv/netvsc/if_hnvar.h Modified: head/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_nvs.c Mon Nov 21 05:09:43 2016 (r308906) +++ head/sys/dev/hyperv/netvsc/hn_nvs.c Mon Nov 21 05:21:15 2016 (r308907) @@ -109,7 +109,10 @@ hn_nvs_xact_execute(struct hn_softc *sc, vmbus_xact_deactivate(xact); return (NULL); } - hdr = vmbus_xact_wait(xact, &resplen); + if (HN_CAN_SLEEP(sc)) + hdr = vmbus_xact_wait(xact, &resplen); + else + hdr = vmbus_xact_busywait(xact, &resplen); /* * Check this NVS response message. Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_rndis.c Mon Nov 21 05:09:43 2016 (r308906) +++ head/sys/dev/hyperv/netvsc/hn_rndis.c Mon Nov 21 05:21:15 2016 (r308907) @@ -232,7 +232,10 @@ hn_rndis_xact_exec1(struct hn_softc *sc, if_printf(sc->hn_ifp, "RNDIS ctrl send failed: %d\n", error); return (NULL); } - return (vmbus_xact_wait(xact, comp_len)); + if (HN_CAN_SLEEP(sc)) + return (vmbus_xact_wait(xact, comp_len)); + else + return (vmbus_xact_busywait(xact, comp_len)); } static const void * Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:09:43 2016 (r308906) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:21:15 2016 (r308907) @@ -149,7 +149,11 @@ __FBSDID("$FreeBSD$"); sx_init(&(sc)->hn_lock, device_get_nameunit((sc)->hn_dev)) #define HN_LOCK_DESTROY(sc) sx_destroy(&(sc)->hn_lock) #define HN_LOCK_ASSERT(sc) sx_assert(&(sc)->hn_lock, SA_XLOCKED) -#define HN_LOCK(sc) sx_xlock(&(sc)->hn_lock) +#define HN_LOCK(sc) \ +do { \ + while (sx_try_xlock(&(sc)->hn_lock) == 0) \ + DELAY(1000); \ +} while (0) #define HN_UNLOCK(sc) sx_xunlock(&(sc)->hn_lock) #define HN_CSUM_IP_MASK (CSUM_IP | CSUM_IP_TCP | CSUM_IP_UDP) @@ -667,18 +671,10 @@ hn_set_rxfilter(struct hn_softc *sc) filter = NDIS_PACKET_TYPE_DIRECTED; if (ifp->if_flags & IFF_BROADCAST) filter |= NDIS_PACKET_TYPE_BROADCAST; -#ifdef notyet - /* - * See the comment in SIOCADDMULTI/SIOCDELMULTI. - */ /* TODO: support multicast list */ if ((ifp->if_flags & IFF_ALLMULTI) || !TAILQ_EMPTY(&ifp->if_multiaddrs)) filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; -#else - /* Always enable ALLMULTI */ - filter |= NDIS_PACKET_TYPE_ALL_MULTICAST; -#endif } if (sc->hn_rx_filter != filter) { @@ -2338,10 +2334,18 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, } if (ifp->if_flags & IFF_UP) { - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* + * Caller meight hold mutex, e.g. + * bpf; use busy-wait for the RNDIS + * reply. + */ + HN_NO_SLEEPING(sc); hn_set_rxfilter(sc); - else + HN_SLEEPING_OK(sc); + } else { hn_init_locked(sc); + } } else { if (ifp->if_drv_flags & IFF_DRV_RUNNING) hn_stop(sc); @@ -2402,27 +2406,23 @@ hn_ioctl(struct ifnet *ifp, u_long cmd, case SIOCADDMULTI: case SIOCDELMULTI: -#ifdef notyet - /* - * XXX - * Multicast uses mutex, while RNDIS RX filter setting - * sleeps. We workaround this by always enabling - * ALLMULTI. ALLMULTI would actually always be on, even - * if we supported the SIOCADDMULTI/SIOCDELMULTI, since - * we don't support multicast address list configuration - * for this driver. - */ HN_LOCK(sc); if ((sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) == 0) { HN_UNLOCK(sc); break; } - if (ifp->if_drv_flags & IFF_DRV_RUNNING) + if (ifp->if_drv_flags & IFF_DRV_RUNNING) { + /* + * Multicast uses mutex; use busy-wait for + * the RNDIS reply. + */ + HN_NO_SLEEPING(sc); hn_set_rxfilter(sc); + HN_SLEEPING_OK(sc); + } HN_UNLOCK(sc); -#endif break; case SIOCSIFMEDIA: Modified: head/sys/dev/hyperv/netvsc/if_hnvar.h ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hnvar.h Mon Nov 21 05:09:43 2016 (r308906) +++ head/sys/dev/hyperv/netvsc/if_hnvar.h Mon Nov 21 05:21:15 2016 (r308907) @@ -236,6 +236,20 @@ struct hn_softc { #define HN_FLAG_HAS_RSSKEY 0x0004 #define HN_FLAG_HAS_RSSIND 0x0008 #define HN_FLAG_SYNTH_ATTACHED 0x0010 +#define HN_FLAG_NO_SLEEPING 0x0020 + +#define HN_NO_SLEEPING(sc) \ +do { \ + (sc)->hn_flags |= HN_FLAG_NO_SLEEPING; \ +} while (0) + +#define HN_SLEEPING_OK(sc) \ +do { \ + (sc)->hn_flags &= ~HN_FLAG_NO_SLEEPING; \ +} while (0) + +#define HN_CAN_SLEEP(sc) \ + (((sc)->hn_flags & HN_FLAG_NO_SLEEPING) == 0) #define HN_CAP_VLAN 0x0001 #define HN_CAP_MTU 0x0002 From owner-svn-src-head@freebsd.org Mon Nov 21 05:41:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A42CCC4C336; Mon, 21 Nov 2016 05:41:09 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5298A1F54; Mon, 21 Nov 2016 05:41:09 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAL5f8Hi081469; Mon, 21 Nov 2016 05:41:08 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAL5f8MK081467; Mon, 21 Nov 2016 05:41:08 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611210541.uAL5f8MK081467@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 21 Nov 2016 05:41:08 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308908 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 05:41:09 -0000 Author: sephe Date: Mon Nov 21 05:41:08 2016 New Revision: 308908 URL: https://svnweb.freebsd.org/changeset/base/308908 Log: hyperv/hn: Allow enabling IPv6 TX checksum offloading and IPv6 TSO. They are still disabled by default. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8490 Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/hn_rndis.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_rndis.c Mon Nov 21 05:21:15 2016 (r308907) +++ head/sys/dev/hyperv/netvsc/hn_rndis.c Mon Nov 21 05:41:08 2016 (r308908) @@ -602,7 +602,6 @@ hn_rndis_conf_offload(struct hn_softc *s if ((hwcaps.ndis_lsov2.ndis_ip6_encap & NDIS_OFFLOAD_ENCAP_8023) && (hwcaps.ndis_lsov2.ndis_ip6_opts & HN_NDIS_LSOV2_CAP_IP6) == HN_NDIS_LSOV2_CAP_IP6) { -#ifdef notyet caps |= HN_CAP_TSO6; params.ndis_lsov2_ip6 = NDIS_OFFLOAD_LSOV2_ON; @@ -610,7 +609,6 @@ hn_rndis_conf_offload(struct hn_softc *s tso_maxsz = hwcaps.ndis_lsov2.ndis_ip6_maxsz; if (hwcaps.ndis_lsov2.ndis_ip6_minsg > tso_minsg) tso_minsg = hwcaps.ndis_lsov2.ndis_ip6_minsg; -#endif } sc->hn_ndis_tso_szmax = 0; sc->hn_ndis_tso_sgmin = 0; Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:21:15 2016 (r308907) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:41:08 2016 (r308908) @@ -1127,6 +1127,13 @@ hn_attach(device_t dev) /* Enable all available capabilities by default. */ ifp->if_capenable = ifp->if_capabilities; + /* + * Disable IPv6 TSO and TXCSUM by default, they still can + * be enabled through SIOCSIFCAP. + */ + ifp->if_capenable &= ~(IFCAP_TXCSUM_IPV6 | IFCAP_TSO6); + ifp->if_hwassist &= ~(HN_CSUM_IP6_MASK | CSUM_IP6_TSO); + if (ifp->if_capabilities & (IFCAP_TSO6 | IFCAP_TSO4)) { hn_set_tso_maxsize(sc, hn_tso_maxlen, ETHERMTU); ifp->if_hw_tsomaxsegcount = HN_TX_DATA_SEGCNT_MAX; @@ -3646,12 +3653,10 @@ hn_fixup_tx_data(struct hn_softc *sc) csum_assist |= CSUM_IP_TCP; if (sc->hn_caps & HN_CAP_UDP4CS) csum_assist |= CSUM_IP_UDP; -#ifdef notyet if (sc->hn_caps & HN_CAP_TCP6CS) csum_assist |= CSUM_IP6_TCP; if (sc->hn_caps & HN_CAP_UDP6CS) csum_assist |= CSUM_IP6_UDP; -#endif for (i = 0; i < sc->hn_tx_ring_cnt; ++i) sc->hn_tx_ring[i].hn_csum_assist = csum_assist; From owner-svn-src-head@freebsd.org Mon Nov 21 05:54:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93FE3C4C723; Mon, 21 Nov 2016 05:54:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60AD3B05; Mon, 21 Nov 2016 05:54:32 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAL5sVwS086697; Mon, 21 Nov 2016 05:54:31 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAL5sVn6086696; Mon, 21 Nov 2016 05:54:31 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611210554.uAL5sVn6086696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Mon, 21 Nov 2016 05:54:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308909 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 05:54:32 -0000 Author: sephe Date: Mon Nov 21 05:54:31 2016 New Revision: 308909 URL: https://svnweb.freebsd.org/changeset/base/308909 Log: hyperv/hn: Don't abuse hn_{tx,rx}_ring_inuse. Just in case, the # of TX/RX rings is changed upon synthetic parts re-attach. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8520 Modified: head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:41:08 2016 (r308908) +++ head/sys/dev/hyperv/netvsc/if_hn.c Mon Nov 21 05:54:31 2016 (r308909) @@ -504,7 +504,7 @@ hn_set_lro_lenlim(struct hn_softc *sc, i { int i; - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) sc->hn_rx_ring[i].hn_lro.lro_length_lim = lenlim; } #endif @@ -2554,7 +2554,7 @@ hn_lro_ackcnt_sysctl(SYSCTL_HANDLER_ARGS */ --ackcnt; HN_LOCK(sc); - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) sc->hn_rx_ring[i].hn_lro.lro_ackcnt_lim = ackcnt; HN_UNLOCK(sc); return 0; @@ -2578,7 +2578,7 @@ hn_trust_hcsum_sysctl(SYSCTL_HANDLER_ARG return error; HN_LOCK(sc); - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { struct hn_rx_ring *rxr = &sc->hn_rx_ring[i]; if (on) @@ -2646,7 +2646,7 @@ hn_rx_stat_u64_sysctl(SYSCTL_HANDLER_ARG uint64_t stat; stat = 0; - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { rxr = &sc->hn_rx_ring[i]; stat += *((uint64_t *)((uint8_t *)rxr + ofs)); } @@ -2656,7 +2656,7 @@ hn_rx_stat_u64_sysctl(SYSCTL_HANDLER_ARG return error; /* Zero out this stat. */ - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { rxr = &sc->hn_rx_ring[i]; *((uint64_t *)((uint8_t *)rxr + ofs)) = 0; } @@ -2674,7 +2674,7 @@ hn_rx_stat_ulong_sysctl(SYSCTL_HANDLER_A u_long stat; stat = 0; - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { rxr = &sc->hn_rx_ring[i]; stat += *((u_long *)((uint8_t *)rxr + ofs)); } @@ -2684,7 +2684,7 @@ hn_rx_stat_ulong_sysctl(SYSCTL_HANDLER_A return error; /* Zero out this stat. */ - for (i = 0; i < sc->hn_rx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_rx_ring_cnt; ++i) { rxr = &sc->hn_rx_ring[i]; *((u_long *)((uint8_t *)rxr + ofs)) = 0; } @@ -2700,7 +2700,7 @@ hn_tx_stat_ulong_sysctl(SYSCTL_HANDLER_A u_long stat; stat = 0; - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { txr = &sc->hn_tx_ring[i]; stat += *((u_long *)((uint8_t *)txr + ofs)); } @@ -2710,7 +2710,7 @@ hn_tx_stat_ulong_sysctl(SYSCTL_HANDLER_A return error; /* Zero out this stat. */ - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { txr = &sc->hn_tx_ring[i]; *((u_long *)((uint8_t *)txr + ofs)) = 0; } @@ -2732,7 +2732,7 @@ hn_tx_conf_int_sysctl(SYSCTL_HANDLER_ARG return error; HN_LOCK(sc); - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) { txr = &sc->hn_tx_ring[i]; *((int *)((uint8_t *)txr + ofs)) = conf; } @@ -3603,7 +3603,7 @@ hn_set_chim_size(struct hn_softc *sc, in { int i; - for (i = 0; i < sc->hn_tx_ring_inuse; ++i) + for (i = 0; i < sc->hn_tx_ring_cnt; ++i) sc->hn_tx_ring[i].hn_chim_size = chim_size; } From owner-svn-src-head@freebsd.org Mon Nov 21 09:23:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8460C4B2DD; Mon, 21 Nov 2016 09:23:43 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77B261C3; Mon, 21 Nov 2016 09:23:43 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAL9NguB070493; Mon, 21 Nov 2016 09:23:42 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAL9NgeO070492; Mon, 21 Nov 2016 09:23:42 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201611210923.uAL9NgeO070492@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Mon, 21 Nov 2016 09:23:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308913 - head/sys/dev/rtwn/rtl8812a X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 09:23:43 -0000 Author: kevlo Date: Mon Nov 21 09:23:42 2016 New Revision: 308913 URL: https://svnweb.freebsd.org/changeset/base/308913 Log: Update struct r12a_rom. Reviewed by: avos Modified: head/sys/dev/rtwn/rtl8812a/r12a_rom_image.h Modified: head/sys/dev/rtwn/rtl8812a/r12a_rom_image.h ============================================================================== --- head/sys/dev/rtwn/rtl8812a/r12a_rom_image.h Mon Nov 21 07:30:07 2016 (r308912) +++ head/sys/dev/rtwn/rtl8812a/r12a_rom_image.h Mon Nov 21 09:23:42 2016 (r308913) @@ -114,17 +114,18 @@ struct r12a_rom { uint16_t pid_12a; uint8_t reserved5[3]; uint8_t macaddr_12a[IEEE80211_ADDR_LEN]; - uint8_t reserved6[35]; + uint8_t reserved6[2]; + uint8_t string_12a[8]; /* "Realtek " */ + uint8_t reserved7[25]; uint16_t vid_21a; uint16_t pid_21a; - uint8_t reserved7[3]; + uint8_t reserved8[3]; uint8_t macaddr_21a[IEEE80211_ADDR_LEN]; - uint8_t reserved8[2]; - /* XXX check on RTL8812AU. */ - uint8_t string[8]; /* "Realtek " */ uint8_t reserved9[2]; + uint8_t string_21a[8]; /* "Realtek " */ + uint8_t reserved10[2]; uint8_t string_ven[23]; /* XXX variable length? */ - uint8_t reserved10[208]; + uint8_t reserved11[208]; } __packed; _Static_assert(sizeof(struct r12a_rom) == R12A_EFUSE_MAP_LEN, From owner-svn-src-head@freebsd.org Mon Nov 21 11:18:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AD388C4C5EA; Mon, 21 Nov 2016 11:18:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7A5E2613; Mon, 21 Nov 2016 11:18:02 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALBI1MS015570; Mon, 21 Nov 2016 11:18:01 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALBI0PB015562; Mon, 21 Nov 2016 11:18:00 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211118.uALBI0PB015562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 11:18:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308921 - in head: share/man/man4 sys/conf sys/crypto/armv8 sys/modules sys/modules/armv8crypto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 11:18:02 -0000 Author: andrew Date: Mon Nov 21 11:18:00 2016 New Revision: 308921 URL: https://svnweb.freebsd.org/changeset/base/308921 Log: Add accelerated AES with using the ARMv8 crypto instructions. This is based on the AES-NI code, and modified as needed for use on ARMv8. When loaded the driver will check the appropriate field in the id_aa64isar0_el1 register to see if AES is supported, and if so the probe function will signal the driver should attach. With this I have seen up to 2000Mb/s from the cryptotest test with a single thread on a ThunderX Pass 2.0. Reviewed by: imp Obtained from: ABT Systems Ltd MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D8297 Added: head/share/man/man4/armv8crypto.4 (contents, props changed) head/sys/crypto/armv8/ head/sys/crypto/armv8/armv8_crypto.c (contents, props changed) head/sys/crypto/armv8/armv8_crypto.h (contents, props changed) head/sys/crypto/armv8/armv8_crypto_wrap.c (contents, props changed) head/sys/modules/armv8crypto/ head/sys/modules/armv8crypto/Makefile (contents, props changed) Modified: head/share/man/man4/Makefile head/sys/conf/files.arm64 head/sys/modules/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Nov 21 10:49:37 2016 (r308920) +++ head/share/man/man4/Makefile Mon Nov 21 11:18:00 2016 (r308921) @@ -53,6 +53,7 @@ MAN= aac.4 \ ${_aout.4} \ ${_apic.4} \ arcmsr.4 \ + ${_armv8crypto.4} \ ${_asmc.4} \ ata.4 \ ath.4 \ @@ -746,6 +747,10 @@ MLINKS+=xe.4 if_xe.4 MLINKS+=xl.4 if_xl.4 MLINKS+=zyd.4 if_zyd.4 +.if ${MACHINE_CPUARCH} == "aarch64" +_armv8crypto.4= armv8crypto.4 +.endif + .if ${MACHINE_CPUARCH} == "amd64" || ${MACHINE_CPUARCH} == "i386" _acpi_asus.4= acpi_asus.4 _acpi_asus_wmi.4= acpi_asus_wmi.4 Added: head/share/man/man4/armv8crypto.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/armv8crypto.4 Mon Nov 21 11:18:00 2016 (r308921) @@ -0,0 +1,83 @@ +.\" Copyright (c) 2016 The FreeBSD Foundation +.\" All rights reserved. +.\" +.\" This software was 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: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd October 20, 2016 +.Dt ARMV8CRYPTO 4 +.Os +.Sh NAME +.Nm armv8crypto +.Nd "driver for the AES accelerator on ARM CPUs" +.Sh SYNOPSIS +To compile this driver into the kernel, +place the following lines in your +kernel configuration file: +.Bd -ragged -offset indent +.Cd "device crypto" +.Cd "device armv8crypto" +.Ed +.Pp +Alternatively, to load the driver as a +module at boot time, place the following line in +.Xr loader.conf 5 : +.Bd -literal -offset indent +armv8crypto_load="YES" +.Ed +.Sh DESCRIPTION +Starting with the ARMv8 architecture ARM Limited has added optional +cryptography instructions to accelerate AES, SHA-1, SHA-2, and +finite field arithmetic. +.Pp +The processor capability is reported as AES in the Instruction Set +Attributes 0 line at boot. +The +.Nm +driver does not attach on systems that lack the required CPU capability. +.Pp +The +.Nm +driver registers itself to accelerate AES operations for +.Xr crypto 4 . +.Sh SEE ALSO +.Xr crypt 3 , +.Xr crypto 4 , +.Xr intro 4 , +.Xr ipsec 4 , +.Xr random 4 , +.Xr crypto 9 +.Sh HISTORY +The +.Nm +driver first appeared in +.Fx 11.0 . +.Sh AUTHORS +.An -nosplit +The +.Nm +driver was written by +.An Andrew Turner Aq Mt andrew@FreeBSD.org . Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Nov 21 10:49:37 2016 (r308920) +++ head/sys/conf/files.arm64 Mon Nov 21 11:18:00 2016 (r308921) @@ -136,6 +136,12 @@ contrib/vchiq/interface/vchiq_arm/vchiq_ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" contrib/vchiq/interface/vchiq_arm/vchiq_util.c optional vchiq soc_brcm_bcm2837 \ compile-with "${NORMAL_C} -DUSE_VCHIQ_ARM -D__VCCOREVER__=0x04000000 -I$S/contrib/vchiq" +crypto/armv8/armv8_crypto.c optional armv8crypto +armv8_crypto_wrap.o optional armv8crypto \ + dependency "$S/crypto/armv8/armv8_crypto_wrap.c" \ + compile-with "${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} ${WERROR} ${NO_WCAST_QUAL} ${PROF} -march=armv8a+crypto ${.IMPSRC}" \ + no-implicit-rule \ + clean "armv8_crypto_wrap.o" crypto/blowfish/bf_enc.c optional crypto | ipsec crypto/des/des_enc.c optional crypto | ipsec | netsmb dev/acpica/acpi_if.m optional acpi Added: head/sys/crypto/armv8/armv8_crypto.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/armv8/armv8_crypto.c Mon Nov 21 11:18:00 2016 (r308921) @@ -0,0 +1,565 @@ +/*- + * Copyright (c) 2005-2008 Pawel Jakub Dawidek + * Copyright (c) 2010 Konstantin Belousov + * Copyright (c) 2014,2016 The FreeBSD Foundation + * All rights reserved. + * + * Portions of this software were developed by John-Mark Gurney + * under sponsorship of the FreeBSD Foundation and + * Rubicon Communications, LLC (Netgate). + * + * This software was 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: + * 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 AUTHORS 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 AUTHORS 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. + */ + +/* + * This is based on the aesni code. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +struct armv8_crypto_softc { + int dieing; + int32_t cid; + uint32_t sid; + TAILQ_HEAD(armv8_crypto_sessions_head, armv8_crypto_session) sessions; + struct rwlock lock; +}; + +static struct mtx *ctx_mtx; +static struct fpu_kern_ctx **ctx_vfp; + +#define AQUIRE_CTX(i, ctx) \ + do { \ + (i) = PCPU_GET(cpuid); \ + mtx_lock(&ctx_mtx[(i)]); \ + (ctx) = ctx_vfp[(i)]; \ + } while (0) +#define RELEASE_CTX(i, ctx) \ + do { \ + mtx_unlock(&ctx_mtx[(i)]); \ + (i) = -1; \ + (ctx) = NULL; \ + } while (0) + +static void armv8_crypto_freesession_locked(struct armv8_crypto_softc *, + struct armv8_crypto_session *); +static int armv8_crypto_cipher_process(struct armv8_crypto_session *, + struct cryptodesc *, struct cryptop *); + +MALLOC_DEFINE(M_ARMV8_CRYPTO, "armv8_crypto", "ARMv8 Crypto Data"); + +static void +armv8_crypto_identify(driver_t *drv, device_t parent) +{ + + /* NB: order 10 is so we get attached after h/w devices */ + if (device_find_child(parent, "armv8crypto", -1) == NULL && + BUS_ADD_CHILD(parent, 10, "armv8crypto", -1) == 0) + panic("ARMv8 crypto: could not attach"); +} + +static int +armv8_crypto_probe(device_t dev) +{ + uint64_t reg; + int ret = ENXIO; + + reg = READ_SPECIALREG(id_aa64isar0_el1); + + switch (ID_AA64ISAR0_AES(reg)) { + case ID_AA64ISAR0_AES_BASE: + case ID_AA64ISAR0_AES_PMULL: + ret = 0; + break; + } + + device_set_desc_copy(dev, "AES-CBC"); + + /* TODO: Check more fields as we support more features */ + + return (ret); +} + +static int +armv8_crypto_attach(device_t dev) +{ + struct armv8_crypto_softc *sc; + int i; + + sc = device_get_softc(dev); + TAILQ_INIT(&sc->sessions); + sc->dieing = 0; + sc->sid = 1; + + sc->cid = crypto_get_driverid(dev, CRYPTOCAP_F_HARDWARE | + CRYPTOCAP_F_SYNC); + if (sc->cid < 0) { + device_printf(dev, "Could not get crypto driver id.\n"); + return (ENOMEM); + } + + rw_init(&sc->lock, "armv8crypto"); + + ctx_mtx = malloc(sizeof(*ctx_mtx) * (mp_maxid + 1), M_ARMV8_CRYPTO, + M_WAITOK|M_ZERO); + ctx_vfp = malloc(sizeof(*ctx_vfp) * (mp_maxid + 1), M_ARMV8_CRYPTO, + M_WAITOK|M_ZERO); + + CPU_FOREACH(i) { + ctx_vfp[i] = fpu_kern_alloc_ctx(0); + mtx_init(&ctx_mtx[i], "armv8cryptoctx", NULL, MTX_DEF|MTX_NEW); + } + + crypto_register(sc->cid, CRYPTO_AES_CBC, 0, 0); + + return (0); +} + +static int +armv8_crypto_detach(device_t dev) +{ + struct armv8_crypto_softc *sc; + struct armv8_crypto_session *ses; + int i; + + sc = device_get_softc(dev); + + rw_wlock(&sc->lock); + TAILQ_FOREACH(ses, &sc->sessions, next) { + if (ses->used) { + rw_wunlock(&sc->lock); + device_printf(dev, + "Cannot detach, sessions still active.\n"); + return (EBUSY); + } + } + sc->dieing = 1; + while ((ses = TAILQ_FIRST(&sc->sessions)) != NULL) { + TAILQ_REMOVE(&sc->sessions, ses, next); + free(ses, M_ARMV8_CRYPTO); + } + rw_wunlock(&sc->lock); + crypto_unregister_all(sc->cid); + + rw_destroy(&sc->lock); + + CPU_FOREACH(i) { + if (ctx_vfp[i] != NULL) { + mtx_destroy(&ctx_mtx[i]); + fpu_kern_free_ctx(ctx_vfp[i]); + } + ctx_vfp[i] = NULL; + } + free(ctx_mtx, M_ARMV8_CRYPTO); + ctx_mtx = NULL; + free(ctx_vfp, M_ARMV8_CRYPTO); + ctx_vfp = NULL; + + return (0); +} + +static int +armv8_crypto_cipher_setup(struct armv8_crypto_session *ses, + struct cryptoini *encini) +{ + int i; + + switch (ses->algo) { + case CRYPTO_AES_CBC: + switch (encini->cri_klen) { + case 128: + ses->rounds = AES128_ROUNDS; + break; + case 192: + ses->rounds = AES192_ROUNDS; + break; + case 256: + ses->rounds = AES256_ROUNDS; + break; + default: + CRYPTDEB("invalid CBC/ICM/GCM key length"); + return (EINVAL); + } + break; + default: + return (EINVAL); + } + + rijndaelKeySetupEnc(ses->enc_schedule, encini->cri_key, + encini->cri_klen); + rijndaelKeySetupDec(ses->dec_schedule, encini->cri_key, + encini->cri_klen); + for (i = 0; i < nitems(ses->enc_schedule); i++) { + ses->enc_schedule[i] = bswap32(ses->enc_schedule[i]); + ses->dec_schedule[i] = bswap32(ses->dec_schedule[i]); + } + + return (0); +} + +static int +armv8_crypto_newsession(device_t dev, uint32_t *sidp, struct cryptoini *cri) +{ + struct armv8_crypto_softc *sc; + struct armv8_crypto_session *ses; + struct cryptoini *encini; + int error; + + if (sidp == NULL || cri == NULL) { + CRYPTDEB("no sidp or cri"); + return (EINVAL); + } + + sc = device_get_softc(dev); + if (sc->dieing) + return (EINVAL); + + ses = NULL; + encini = NULL; + for (; cri != NULL; cri = cri->cri_next) { + switch (cri->cri_alg) { + case CRYPTO_AES_CBC: + if (encini != NULL) { + CRYPTDEB("encini already set"); + return (EINVAL); + } + encini = cri; + break; + default: + CRYPTDEB("unhandled algorithm"); + return (EINVAL); + } + } + if (encini == NULL) { + CRYPTDEB("no cipher"); + return (EINVAL); + } + + rw_wlock(&sc->lock); + if (sc->dieing) { + rw_wunlock(&sc->lock); + return (EINVAL); + } + + /* + * Free sessions goes first, so if first session is used, we need to + * allocate one. + */ + ses = TAILQ_FIRST(&sc->sessions); + if (ses == NULL || ses->used) { + ses = malloc(sizeof(*ses), M_ARMV8_CRYPTO, M_NOWAIT | M_ZERO); + if (ses == NULL) { + rw_wunlock(&sc->lock); + return (ENOMEM); + } + ses->id = sc->sid++; + } else { + TAILQ_REMOVE(&sc->sessions, ses, next); + } + ses->used = 1; + TAILQ_INSERT_TAIL(&sc->sessions, ses, next); + rw_wunlock(&sc->lock); + ses->algo = encini->cri_alg; + + error = armv8_crypto_cipher_setup(ses, encini); + if (error != 0) { + CRYPTDEB("setup failed"); + rw_wlock(&sc->lock); + armv8_crypto_freesession_locked(sc, ses); + rw_wunlock(&sc->lock); + return (error); + } + + *sidp = ses->id; + return (0); +} + +static void +armv8_crypto_freesession_locked(struct armv8_crypto_softc *sc, + struct armv8_crypto_session *ses) +{ + uint32_t sid; + + rw_assert(&sc->lock, RA_WLOCKED); + + sid = ses->id; + TAILQ_REMOVE(&sc->sessions, ses, next); + *ses = (struct armv8_crypto_session){}; + ses->id = sid; + TAILQ_INSERT_HEAD(&sc->sessions, ses, next); +} + +static int +armv8_crypto_freesession(device_t dev, uint64_t tid) +{ + struct armv8_crypto_softc *sc; + struct armv8_crypto_session *ses; + uint32_t sid; + + sc = device_get_softc(dev); + sid = ((uint32_t)tid) & 0xffffffff; + rw_wlock(&sc->lock); + TAILQ_FOREACH_REVERSE(ses, &sc->sessions, armv8_crypto_sessions_head, + next) { + if (ses->id == sid) + break; + } + if (ses == NULL) { + rw_wunlock(&sc->lock); + return (EINVAL); + } + armv8_crypto_freesession_locked(sc, ses); + rw_wunlock(&sc->lock); + + return (0); +} + +static int +armv8_crypto_process(device_t dev, struct cryptop *crp, int hint __unused) +{ + struct armv8_crypto_softc *sc = device_get_softc(dev); + struct cryptodesc *crd, *enccrd; + struct armv8_crypto_session *ses; + int error; + + error = 0; + enccrd = NULL; + + /* Sanity check. */ + if (crp == NULL) + return (EINVAL); + + if (crp->crp_callback == NULL || crp->crp_desc == NULL) { + error = EINVAL; + goto out; + } + + for (crd = crp->crp_desc; crd != NULL; crd = crd->crd_next) { + switch (crd->crd_alg) { + case CRYPTO_AES_CBC: + if (enccrd != NULL) { + error = EINVAL; + goto out; + } + enccrd = crd; + break; + default: + error = EINVAL; + goto out; + } + } + + if (enccrd == NULL) { + error = EINVAL; + goto out; + } + + /* We can only handle full blocks for now */ + if ((enccrd->crd_len % AES_BLOCK_LEN) != 0) { + error = EINVAL; + goto out; + } + + rw_rlock(&sc->lock); + TAILQ_FOREACH_REVERSE(ses, &sc->sessions, armv8_crypto_sessions_head, + next) { + if (ses->id == (crp->crp_sid & 0xffffffff)) + break; + } + rw_runlock(&sc->lock); + if (ses == NULL) { + error = EINVAL; + goto out; + } + + error = armv8_crypto_cipher_process(ses, enccrd, crp); + +out: + crp->crp_etype = error; + crypto_done(crp); + return (error); +} + +static uint8_t * +armv8_crypto_cipher_alloc(struct cryptodesc *enccrd, struct cryptop *crp, + int *allocated) +{ + struct mbuf *m; + struct uio *uio; + struct iovec *iov; + uint8_t *addr; + + if (crp->crp_flags & CRYPTO_F_IMBUF) { + m = (struct mbuf *)crp->crp_buf; + if (m->m_next != NULL) + goto alloc; + addr = mtod(m, uint8_t *); + } else if (crp->crp_flags & CRYPTO_F_IOV) { + uio = (struct uio *)crp->crp_buf; + if (uio->uio_iovcnt != 1) + goto alloc; + iov = uio->uio_iov; + addr = (uint8_t *)iov->iov_base; + } else + addr = (uint8_t *)crp->crp_buf; + *allocated = 0; + addr += enccrd->crd_skip; + return (addr); + +alloc: + addr = malloc(enccrd->crd_len, M_ARMV8_CRYPTO, M_NOWAIT); + if (addr != NULL) { + *allocated = 1; + crypto_copydata(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, + enccrd->crd_len, addr); + } else + *allocated = 0; + return (addr); +} + +static int +armv8_crypto_cipher_process(struct armv8_crypto_session *ses, + struct cryptodesc *enccrd, struct cryptop *crp) +{ + struct fpu_kern_ctx *ctx; + uint8_t *buf; + uint8_t iv[AES_BLOCK_LEN]; + int allocated, error, i; + int encflag, ivlen; + int kt; + + encflag = (enccrd->crd_flags & CRD_F_ENCRYPT) == CRD_F_ENCRYPT; + + buf = armv8_crypto_cipher_alloc(enccrd, crp, &allocated); + if (buf == NULL) + return (ENOMEM); + + error = 0; + + kt = is_fpu_kern_thread(0); + if (!kt) { + AQUIRE_CTX(i, ctx); + error = fpu_kern_enter(curthread, ctx, + FPU_KERN_NORMAL | FPU_KERN_KTHR); + if (error != 0) + goto out; + } + + if ((enccrd->crd_flags & CRD_F_KEY_EXPLICIT) != 0) { + panic("CRD_F_KEY_EXPLICIT"); + } + + switch (enccrd->crd_alg) { + case CRYPTO_AES_CBC: + ivlen = AES_BLOCK_LEN; + break; + } + + /* Setup iv */ + if (encflag) { + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) + bcopy(enccrd->crd_iv, iv, ivlen); + else + arc4rand(iv, ivlen, 0); + + if ((enccrd->crd_flags & CRD_F_IV_PRESENT) == 0) + crypto_copyback(crp->crp_flags, crp->crp_buf, + enccrd->crd_inject, ivlen, iv); + } else { + if ((enccrd->crd_flags & CRD_F_IV_EXPLICIT) != 0) + bcopy(enccrd->crd_iv, iv, ivlen); + else + crypto_copydata(crp->crp_flags, crp->crp_buf, + enccrd->crd_inject, ivlen, iv); + } + + /* Do work */ + switch (ses->algo) { + case CRYPTO_AES_CBC: + if (encflag) + armv8_aes_encrypt_cbc(ses->rounds, ses->enc_schedule, + enccrd->crd_len, buf, buf, iv); + else + armv8_aes_decrypt_cbc(ses->rounds, ses->dec_schedule, + enccrd->crd_len, buf, iv); + break; + } + + if (allocated) + crypto_copyback(crp->crp_flags, crp->crp_buf, enccrd->crd_skip, + enccrd->crd_len, buf); + + if (!kt) { + fpu_kern_leave(curthread, ctx); +out: + RELEASE_CTX(i, ctx); + } + if (allocated) { + bzero(buf, enccrd->crd_len); + free(buf, M_ARMV8_CRYPTO); + } + return (error); +} + +static device_method_t armv8_crypto_methods[] = { + DEVMETHOD(device_identify, armv8_crypto_identify), + DEVMETHOD(device_probe, armv8_crypto_probe), + DEVMETHOD(device_attach, armv8_crypto_attach), + DEVMETHOD(device_detach, armv8_crypto_detach), + + DEVMETHOD(cryptodev_newsession, armv8_crypto_newsession), + DEVMETHOD(cryptodev_freesession, armv8_crypto_freesession), + DEVMETHOD(cryptodev_process, armv8_crypto_process), + + DEVMETHOD_END, +}; + +static DEFINE_CLASS_0(armv8crypto, armv8_crypto_driver, armv8_crypto_methods, + sizeof(struct armv8_crypto_softc)); +static devclass_t armv8_crypto_devclass; + +DRIVER_MODULE(armv8crypto, nexus, armv8_crypto_driver, armv8_crypto_devclass, + 0, 0); Added: head/sys/crypto/armv8/armv8_crypto.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/armv8/armv8_crypto.h Mon Nov 21 11:18:00 2016 (r308921) @@ -0,0 +1,55 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was 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: + * 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 AUTHORS 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 AUTHORS 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 _ARMV8_CRYPTO_H_ +#define _ARMV8_CRYPTO_H_ + +#define AES128_ROUNDS 10 +#define AES192_ROUNDS 12 +#define AES256_ROUNDS 14 +#define AES_SCHED_LEN ((AES256_ROUNDS + 1) * AES_BLOCK_LEN) + +struct armv8_crypto_session { + uint32_t enc_schedule[AES_SCHED_LEN/4]; + uint32_t dec_schedule[AES_SCHED_LEN/4]; + int algo; + int rounds; + int used; + uint32_t id; + TAILQ_ENTRY(armv8_crypto_session) next; +}; + +void armv8_aes_encrypt_cbc(int, const void *, size_t, const uint8_t *, + uint8_t *, const uint8_t[static AES_BLOCK_LEN]); +void armv8_aes_decrypt_cbc(int, const void *, size_t, uint8_t *, + const uint8_t[static AES_BLOCK_LEN]); + +#endif /* _ARMV8_CRYPTO_H_ */ Added: head/sys/crypto/armv8/armv8_crypto_wrap.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/crypto/armv8/armv8_crypto_wrap.c Mon Nov 21 11:18:00 2016 (r308921) @@ -0,0 +1,128 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was 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: + * 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. + */ + +/* + * This code is built with floating-point enabled. Make sure to have entered + * into floating-point context before calling any of these functions. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include + +#include +#include + +#include + +static uint8x16_t +armv8_aes_enc(int rounds, const uint8x16_t *keysched, const uint8x16_t from) +{ + uint8x16_t tmp; + int i; + + tmp = from; + for (i = 0; i < rounds - 1; i += 2) { + tmp = vaeseq_u8(tmp, keysched[i]); + tmp = vaesmcq_u8(tmp); + tmp = vaeseq_u8(tmp, keysched[i + 1]); + tmp = vaesmcq_u8(tmp); + } + + tmp = vaeseq_u8(tmp, keysched[rounds - 1]); + tmp = vaesmcq_u8(tmp); + tmp = vaeseq_u8(tmp, keysched[rounds]); + tmp = veorq_u8(tmp, keysched[rounds + 1]); + + return (tmp); +} + +static uint8x16_t +armv8_aes_dec(int rounds, const uint8x16_t *keysched, const uint8x16_t from) +{ + uint8x16_t tmp; + int i; + + tmp = from; + for (i = 0; i < rounds - 1; i += 2) { + tmp = vaesdq_u8(tmp, keysched[i]); + tmp = vaesimcq_u8(tmp); + tmp = vaesdq_u8(tmp, keysched[i+1]); + tmp = vaesimcq_u8(tmp); + } + + tmp = vaesdq_u8(tmp, keysched[rounds - 1]); + tmp = vaesimcq_u8(tmp); + tmp = vaesdq_u8(tmp, keysched[rounds]); + tmp = veorq_u8(tmp, keysched[rounds + 1]); + + return (tmp); +} + +void +armv8_aes_encrypt_cbc(int rounds, const void *key_schedule, size_t len, + const uint8_t *from, uint8_t *to, const uint8_t iv[static AES_BLOCK_LEN]) +{ + uint8x16_t tot, ivreg, tmp; + size_t i; + + len /= AES_BLOCK_LEN; + ivreg = vld1q_u8(iv); + for (i = 0; i < len; i++) { + tmp = vld1q_u8(from); + tot = armv8_aes_enc(rounds - 1, key_schedule, + veorq_u8(tmp, ivreg)); + ivreg = tot; + vst1q_u8(to, tot); + from += AES_BLOCK_LEN; + to += AES_BLOCK_LEN; + } +} + +void +armv8_aes_decrypt_cbc(int rounds, const void *key_schedule, size_t len, + uint8_t *buf, const uint8_t iv[static AES_BLOCK_LEN]) +{ + uint8x16_t ivreg, nextiv, tmp; + size_t i; + + len /= AES_BLOCK_LEN; + ivreg = vld1q_u8(iv); + for (i = 0; i < len; i++) { + nextiv = vld1q_u8(buf); + tmp = armv8_aes_dec(rounds - 1, key_schedule, nextiv); + vst1q_u8(buf, veorq_u8(tmp, ivreg)); + ivreg = nextiv; + buf += AES_BLOCK_LEN; + } +} Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Nov 21 10:49:37 2016 (r308920) +++ head/sys/modules/Makefile Mon Nov 21 11:18:00 2016 (r308921) @@ -42,6 +42,7 @@ SUBDIR= \ ${_apm} \ ${_arcmsr} \ ${_arcnet} \ + ${_armv8crypto} \ ${_asmc} \ ata \ ath \ @@ -539,6 +540,7 @@ _cxgb= cxgb .endif .if ${MACHINE_CPUARCH} == "aarch64" +_armv8crypto= armv8crypto _em= em _igb= igb .endif Added: head/sys/modules/armv8crypto/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/armv8crypto/Makefile Mon Nov 21 11:18:00 2016 (r308921) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../crypto/armv8 + +KMOD= armv8crypto +SRCS= armv8_crypto.c +SRCS+= device_if.h bus_if.h opt_bus.h cryptodev_if.h + +OBJS+= armv8_crypto_wrap.o + +# Remove -nostdinc so we can get the intrinsics. +armv8_crypto_wrap.o: armv8_crypto_wrap.c + ${CC} -c ${CFLAGS:C/^-O2$/-O3/:N-nostdinc:N-mgeneral-regs-only} \ + ${WERROR} ${PROF} \ + -march=armv8a+crypto ${.IMPSRC} + ${CTFCONVERT_CMD} + +armv8_crypto_wrap.o: armv8_crypto.h + +.include From owner-svn-src-head@freebsd.org Mon Nov 21 11:27:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 476B9C4C96D; Mon, 21 Nov 2016 11:27:16 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0AC33C01; Mon, 21 Nov 2016 11:27:15 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALBRFIj019362; Mon, 21 Nov 2016 11:27:15 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALBRFeF019360; Mon, 21 Nov 2016 11:27:15 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211127.uALBRFeF019360@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 11:27:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308922 - in head/sys: conf dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 11:27:16 -0000 Author: andrew Date: Mon Nov 21 11:27:14 2016 New Revision: 308922 URL: https://svnweb.freebsd.org/changeset/base/308922 Log: Add an arm64 specific uart cpu driver. As arm64 may use ACPI to find the uart we need to handle both it and FDT, and as such we need to have an architecture specific driver. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7796 Added: head/sys/dev/uart/uart_cpu_arm64.c (contents, props changed) Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Nov 21 11:18:00 2016 (r308921) +++ head/sys/conf/files.arm64 Mon Nov 21 11:27:14 2016 (r308922) @@ -157,7 +157,7 @@ dev/ofw/ofwpci.c optional fdt pci dev/pci/pci_host_generic.c optional pci fdt dev/psci/psci.c optional psci dev/psci/psci_arm64.S optional psci -dev/uart/uart_cpu_fdt.c optional uart fdt +dev/uart/uart_cpu_arm64.c optional uart dev/uart/uart_dev_pl011.c optional uart pl011 dev/usb/controller/dwc_otg_hisi.c optional dwcotg fdt soc_hisi_hi6220 dev/usb/controller/generic_ehci.c optional ehci acpi Added: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/uart/uart_cpu_arm64.c Mon Nov 21 11:27:14 2016 (r308922) @@ -0,0 +1,117 @@ +/*- + * Copyright (c) 2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was 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: + * 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 "opt_acpi.h" +#include "opt_platform.h" + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include + +#include +#include + +#include + +#include +#include +#include + +#ifdef FDT +#include +#include +#include +#include +#endif + +/* + * UART console routines. + */ +bus_space_tag_t uart_bus_space_io; +bus_space_tag_t uart_bus_space_mem; + +int +uart_cpu_eqres(struct uart_bas *b1, struct uart_bas *b2) +{ + + if (pmap_kextract(b1->bsh) == 0) + return (0); + if (pmap_kextract(b2->bsh) == 0) + return (0); + return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); +} + +int +uart_cpu_getdev(int devtype, struct uart_devinfo *di) +{ + struct uart_class *class; + bus_space_handle_t bsh; + bus_space_tag_t bst; + u_int rclk, shift; + int br, err; + + /* Allow overriding the FDT using the environment. */ + class = &uart_ns8250_class; + err = uart_getenv(devtype, di, class); + if (err == 0) + return (0); + + if (devtype != UART_DEV_CONSOLE) + return (ENXIO); + + err = ENXIO; +#ifdef FDT + err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk, &shift); +#endif + if (err != 0) + return (err); + + /* + * Finalize configuration. + */ + di->bas.chan = 0; + di->bas.regshft = shift; + di->baudrate = br; + di->bas.rclk = rclk; + di->ops = uart_getops(class); + di->databits = 8; + di->stopbits = 1; + di->parity = UART_PARITY_NONE; + di->bas.bst = bst; + di->bas.bsh = bsh; + uart_bus_space_mem = di->bas.bst; + uart_bus_space_io = NULL; + + return (0); +} From owner-svn-src-head@freebsd.org Mon Nov 21 12:00:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E323C4D79F; Mon, 21 Nov 2016 12:00:33 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EFFDE1024; Mon, 21 Nov 2016 12:00:32 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALC0Wqb031496; Mon, 21 Nov 2016 12:00:32 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALC0WuE031495; Mon, 21 Nov 2016 12:00:32 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611211200.uALC0WuE031495@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 21 Nov 2016 12:00:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308923 - head/sys/riscv/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 12:00:33 -0000 Author: br Date: Mon Nov 21 12:00:31 2016 New Revision: 308923 URL: https://svnweb.freebsd.org/changeset/base/308923 Log: Disable superpages reservations as we don't have implemented them yet. Requested by: Alan Cox Sponsored by: DARPA, AFRL Modified: head/sys/riscv/include/vmparam.h Modified: head/sys/riscv/include/vmparam.h ============================================================================== --- head/sys/riscv/include/vmparam.h Mon Nov 21 11:27:14 2016 (r308922) +++ head/sys/riscv/include/vmparam.h Mon Nov 21 12:00:31 2016 (r308923) @@ -105,10 +105,10 @@ #define VM_NFREEORDER 12 /* - * Enable superpage reservations: 1 level. + * Disable superpage reservations. */ #ifndef VM_NRESERVLEVEL -#define VM_NRESERVLEVEL 1 +#define VM_NRESERVLEVEL 0 #endif /* From owner-svn-src-head@freebsd.org Mon Nov 21 12:27:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1628C4765D; Mon, 21 Nov 2016 12:27:52 +0000 (UTC) (envelope-from decui@microsoft.com) Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0126.outbound.protection.outlook.com [104.47.42.126]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (Client CN "mail.protection.outlook.com", Issuer "Microsoft IT SSL SHA2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AE041232; Mon, 21 Nov 2016 12:27:51 +0000 (UTC) (envelope-from decui@microsoft.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=K3bW54jmcuY5x6/H0c+KBpEVSBZeV3eNARKVh9Bu040=; b=oWY5dXj1Wd5xpREAiw6KW7B8XCQ0/Gu0zTYbHeLBxN9fXB8bnvUldTNo0x+ZeoZROH/LWtPAHCKHewC9vOHnlSNMVOVxjQQ5zTe+PDt7KPX6FF+UT8Ka2PGqhR56gg+OgwOBJnfHeQ2Xyx4redSZi4srHb/50yp7GR4jcIL+UVk= Received: from MWHPR03MB2669.namprd03.prod.outlook.com (10.168.207.15) by MWHPR03MB2672.namprd03.prod.outlook.com (10.168.207.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.734.8; Mon, 21 Nov 2016 05:53:16 +0000 Received: from MWHPR03MB2669.namprd03.prod.outlook.com ([10.168.207.15]) by MWHPR03MB2669.namprd03.prod.outlook.com ([10.168.207.15]) with mapi id 15.01.0734.012; Mon, 21 Nov 2016 05:53:16 +0000 From: Dexuan Cui To: John Baldwin , Dexuan Cui , Alexander Leidinger CC: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: RE: svn commit: r308798 - head/share/man/man4 Thread-Topic: svn commit: r308798 - head/share/man/man4 Thread-Index: AQHSQbr5yyVEkQQ01UWDUKGoAysOOqDi8hZA Date: Mon, 21 Nov 2016 05:53:16 +0000 Message-ID: References: <201611180736.uAI7a0GI063125@repo.freebsd.org> <4062212.DYY6ahumff@ralph.baldwin.cx> In-Reply-To: <4062212.DYY6ahumff@ralph.baldwin.cx> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=decui@microsoft.com; x-originating-ip: [139.226.141.81] x-microsoft-exchange-diagnostics: 1; MWHPR03MB2672; 7:MhhkZDo/2ddNQlbQ5rtZsY9QLAdY606SA//0JB8TAvluKY+xa0hJrpihhZm/3mTDkDecFqMsBEz0HG0DO+XCIUIcs67CdbE7EM8kjdUrX3pYlFM3x89rJtkJPoFr4B7u/9yUmpozyw2BkGH7slCLilMxfLBfb0xn9N7zIL/Zfr4OS4OGVz11t+e5SlrGU3PEwc5UznEBzfhMMqe+95zMgfE1UGe770NPPjNP3bwme8py8FAj6ztGSYBQOLdOMk0zJ+vEOChM8MPL0zv5R04PbYAACoKAkt0TQXLxMrCAPWOUon/oAI3Mh5ZazfEAxZpw16uIiC8WnGZt5kgScfglkzfKp9H+NyofGuOtUY94wtNC/iE3PlOa9SoqEfqyjjtf x-ms-office365-filtering-correlation-id: 995a11fa-781f-43a4-5afd-08d411d2b057 x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:MWHPR03MB2672; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:; x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(61425038)(6045199)(6040307)(6060326)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026)(61426038)(61427038)(6041248)(6046074)(6061324)(6072148)(6047074); SRVR:MWHPR03MB2672; BCL:0; PCL:0; RULEID:; SRVR:MWHPR03MB2672; x-forefront-prvs: 01334458E5 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(6009001)(7916002)(377454003)(199003)(189002)(24454002)(92566002)(3846002)(74316002)(5005710100001)(4326007)(3660700001)(2950100002)(3280700002)(2906002)(6116002)(102836003)(8990500004)(105586002)(99286002)(450100001)(106116001)(86362001)(106356001)(86612001)(10090500001)(10290500002)(122556002)(2900100001)(9686002)(8676002)(8936002)(305945005)(229853002)(81166006)(6506003)(81156014)(7696004)(77096005)(7736002)(68736007)(38730400001)(7846002)(5660300001)(189998001)(76576001)(87936001)(97736004)(5001770100001)(54356999)(50986999)(101416001)(66066001)(33656002)(76176999); DIR:OUT; SFP:1102; SCL:1; SRVR:MWHPR03MB2672; H:MWHPR03MB2669.namprd03.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; received-spf: None (protection.outlook.com: microsoft.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: microsoft.com X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2016 05:53:16.4250 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 72f988bf-86f1-41af-91ab-2d7cd011db47 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR03MB2672 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 12:27:53 -0000 > From: John Baldwin [mailto:jhb@freebsd.org] > Sent: Saturday, November 19, 2016 00:44 > To: Dexuan Cui > Cc: src-committers@freebsd.org; svn-src-all@freebsd.org; svn-src- > head@freebsd.org > Subject: Re: svn commit: r308798 - head/share/man/man4 >=20 > On Friday, November 18, 2016 07:36:00 AM Dexuan Cui wrote: > > Author: dexuan > > Date: Fri Nov 18 07:36:00 2016 > > New Revision: 308798 > > > > Log: > > remove the hv_ata_pci_disengage(4) manual > > > You will also want to add an entry in head/ObsoleteFiles.inc so that the = installed > manpage on existing systems gets deleted via 'make delete-old'. >=20 > John Baldwin Hi, I made https://reviews.freebsd.org/D8572 for this. Please review it. Thanks, -- Dexuan From owner-svn-src-head@freebsd.org Mon Nov 21 12:42:36 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7E28C47CF6; Mon, 21 Nov 2016 12:42:36 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qt0-x243.google.com (mail-qt0-x243.google.com [IPv6:2607:f8b0:400d:c0d::243]) (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 8F42AE56; Mon, 21 Nov 2016 12:42:36 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qt0-x243.google.com with SMTP id n6so25073232qtd.0; Mon, 21 Nov 2016 04:42:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:message-id:mime-version:subject:date:in-reply-to:cc:to :references; bh=lfE6akQNCKdaRexHPooY0wXCxjGmoPGbT+EFpaDwspM=; b=HkgFMM9+bdUf7ncNDVxjv+PABet9tI+5UwRAfQkTybgcYDNCGTzQbD4rh/rnYrQRga TNf839j2YOQSMQjmIIlbUy/Qy+BCot5a92COqYUqoXBMCRJvhi7b9LACYliklriTH03n FTsBM9lfSBYB1Iu5eMSsf4zpEGdm+Llh60DXb5b7w/k5Qpw5PUpw0Eng1BC7Cbrz8kjv a/f5ZAPPhI6y4H8c1dkHrgV6/fo8QjAn9RD6VyLOG/eFnBPDaR2NkCfiR2pVGX99s5Oy e7dBunT5P7+brQ/uDH0CjI5S8Yc9p37xg1rVOsTXJ9zrExen+zOv77nKRhJftb/3HgGa xWIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:message-id:mime-version:subject:date :in-reply-to:cc:to:references; bh=lfE6akQNCKdaRexHPooY0wXCxjGmoPGbT+EFpaDwspM=; b=P55YRpf2zGHP5RyBYCdnefJzfszETx3BgwB1umlPBq6PqJIY2d/JGrTVDiIlLmQ/FP kBjxeC0PwL/hezLlzKD3N2AwRTvVC/+wMUUTBHaabTemXEJOt/uXBSo+SsGb3/3WVjim XzpBLgAA6IBklhsD9d2w/POr54g6B+IzYPCTUaIfjixHZx4d7MgLnA1AI6rI66gfH8RF KMTyzkVae2qq5utrl8a8aV8s89xjurmsLCpIRNKHCnJyi+FLsSLM44Niqm4+X3gY132s uDc05SRv4v/5XLr+/jaznN7uFYYUDkmO4hQP7a3w6gY0pKwNCyK61Y9AvdtzbbkeE0iU zJWw== X-Gm-Message-State: AKaTC01hQgMl78kzUjrZlhDs+G9piCLNXcs31ZfdAHBxptA5GvXRLzPrqskpNEqA6CEV1w== X-Received: by 10.237.62.202 with SMTP id o10mr7764257qtf.2.1479732155437; Mon, 21 Nov 2016 04:42:35 -0800 (PST) Received: from mbp-eth.home (179-125-197-11.desktop.com.br. [179.125.197.11]) by smtp.gmail.com with ESMTPSA id 21sm4984966qkf.17.2016.11.21.04.42.33 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Nov 2016 04:42:34 -0800 (PST) Sender: Renato Botelho From: Renato Botelho Message-Id: <948A1B32-D2E7-4C63-A33D-4A61C1FE7FD8@FreeBSD.org> Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r306219 - head/sys/dev/oce Date: Mon, 21 Nov 2016 10:42:31 -0200 In-Reply-To: <201609222251.u8MMpBKW034720@repo.freebsd.org> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org To: Josh Paetzel References: <201609222251.u8MMpBKW034720@repo.freebsd.org> X-Mailer: Apple Mail (2.3251) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 12:42:36 -0000 > On 22 Sep 2016, at 19:51, Josh Paetzel wrote: >=20 > Author: jpaetzel > Date: Thu Sep 22 22:51:11 2016 > New Revision: 306219 > URL: https://svnweb.freebsd.org/changeset/base/306219 >=20 > Log: > Update oce to version 11.0.50.0 >=20 > Submitted by: Venkat Duvvuru = Hi Josh, Do you have plans to MFC it? This version seems to fix a problem = reported by users at: https://lists.freebsd.org/pipermail/freebsd-net/2015-June/042530.html = This single line change is part of the update. If you don=E2=80=99t have = plans to MFC the whole driver updated, it would be nice if we at least = import this fix Regards -- Renato Botelho From owner-svn-src-head@freebsd.org Mon Nov 21 14:13:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BEE7CC4C094; Mon, 21 Nov 2016 14:13:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 91EAB1C03; Mon, 21 Nov 2016 14:13:59 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALEDwd0088252; Mon, 21 Nov 2016 14:13:58 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALEDvPs088242; Mon, 21 Nov 2016 14:13:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611211413.uALEDvPs088242@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Mon, 21 Nov 2016 14:13:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308925 - in head/libexec/rtld-elf: . aarch64 amd64 arm i386 mips powerpc powerpc64 riscv sparc64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 14:13:59 -0000 Author: kib Date: Mon Nov 21 14:13:57 2016 New Revision: 308925 URL: https://svnweb.freebsd.org/changeset/base/308925 Log: Adjust r308689 to make rtld compilable with either in-tree or (hopefully) stock gcc 4.2.1 on i386 and other arches. In particular: - Do not use %ebx in the asm constraints on i386, since rtld is compiled with -fPIC and gcc cannot handle GOT-base register reload (clang and newer gcc can). - Avoid direct use of [static N] construct in the function declaration/definion. In-tree gcc was patched to support this, but stock 4.2.1 cannot handle the feature. Requested by: bde Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/libexec/rtld-elf/aarch64/reloc.c head/libexec/rtld-elf/amd64/reloc.c head/libexec/rtld-elf/arm/reloc.c head/libexec/rtld-elf/i386/reloc.c head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/powerpc/reloc.c head/libexec/rtld-elf/powerpc64/reloc.c head/libexec/rtld-elf/riscv/reloc.c head/libexec/rtld-elf/rtld.h head/libexec/rtld-elf/sparc64/reloc.c Modified: head/libexec/rtld-elf/aarch64/reloc.c ============================================================================== --- head/libexec/rtld-elf/aarch64/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/aarch64/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -300,7 +300,7 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } Modified: head/libexec/rtld-elf/amd64/reloc.c ============================================================================== --- head/libexec/rtld-elf/amd64/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/amd64/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -454,7 +454,7 @@ reloc_gnu_ifunc(Obj_Entry *obj, int flag uint32_t cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2; void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { u_int p[4], cpu_high; Modified: head/libexec/rtld-elf/arm/reloc.c ============================================================================== --- head/libexec/rtld-elf/arm/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/arm/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -480,7 +480,7 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } Modified: head/libexec/rtld-elf/i386/reloc.c ============================================================================== --- head/libexec/rtld-elf/i386/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/i386/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -33,7 +33,6 @@ #include #include -#include #include #include @@ -407,8 +406,21 @@ reloc_gnu_ifunc(Obj_Entry *obj, int flag uint32_t cpu_feature, cpu_feature2, cpu_stdext_feature, cpu_stdext_feature2; +static void +rtld_cpuid_count(int idx, int cnt, u_int *p) +{ + + __asm __volatile( + " pushl %%ebx\n" + " cpuid\n" + " movl %%ebx,%1\n" + " popl %%ebx\n" + : "=a" (p[0]), "=r" (p[1]), "=c" (p[2]), "=d" (p[3]) + : "0" (idx), "2" (cnt)); +} + void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { u_int p[4], cpu_high; int cpuid_supported; @@ -432,13 +444,13 @@ ifunc_init(Elf_Auxinfo aux_info[static A if (!cpuid_supported) return; - do_cpuid(1, p); + rtld_cpuid_count(1, 0, p); cpu_feature = p[3]; cpu_feature2 = p[2]; - do_cpuid(0, p); + rtld_cpuid_count(0, 0, p); cpu_high = p[0]; if (cpu_high >= 7) { - cpuid_count(7, 0, p); + rtld_cpuid_count(7, 0, p); cpu_stdext_feature = p[1]; cpu_stdext_feature2 = p[2]; } Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/mips/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -618,7 +618,7 @@ reloc_jmpslot(Elf_Addr *where, Elf_Addr } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } Modified: head/libexec/rtld-elf/powerpc/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/powerpc/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -620,7 +620,7 @@ init_pltgot(Obj_Entry *obj) } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } Modified: head/libexec/rtld-elf/powerpc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/powerpc64/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/powerpc64/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -524,7 +524,7 @@ init_pltgot(Obj_Entry *obj) } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } Modified: head/libexec/rtld-elf/riscv/reloc.c ============================================================================== --- head/libexec/rtld-elf/riscv/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/riscv/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -367,7 +367,7 @@ reloc_non_plt(Obj_Entry *obj, Obj_Entry } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } Modified: head/libexec/rtld-elf/rtld.h ============================================================================== --- head/libexec/rtld-elf/rtld.h Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/rtld.h Mon Nov 21 14:13:57 2016 (r308925) @@ -367,7 +367,7 @@ void dump_Elf_Rela(Obj_Entry *, const El unsigned long elf_hash(const char *); const Elf_Sym *find_symdef(unsigned long, const Obj_Entry *, const Obj_Entry **, int, SymCache *, struct Struct_RtldLockState *); -void ifunc_init(Elf_Auxinfo[static AT_COUNT]); +void ifunc_init(Elf_Auxinfo[__min_size(AT_COUNT)]); void init_pltgot(Obj_Entry *); void lockdflt_init(void); void digest_notes(Obj_Entry *, Elf_Addr, Elf_Addr); Modified: head/libexec/rtld-elf/sparc64/reloc.c ============================================================================== --- head/libexec/rtld-elf/sparc64/reloc.c Mon Nov 21 13:07:57 2016 (r308924) +++ head/libexec/rtld-elf/sparc64/reloc.c Mon Nov 21 14:13:57 2016 (r308925) @@ -787,7 +787,7 @@ reloc_jmpslot(Elf_Addr *wherep, Elf_Addr } void -ifunc_init(Elf_Auxinfo aux_info[static AT_COUNT] __unused) +ifunc_init(Elf_Auxinfo aux_info[__min_size(AT_COUNT)] __unused) { } From owner-svn-src-head@freebsd.org Mon Nov 21 14:43:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9D052C4C87F; Mon, 21 Nov 2016 14:43:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6153BCBA; Mon, 21 Nov 2016 14:43:32 +0000 (UTC) (envelope-from sbruno@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALEhVFq000207; Mon, 21 Nov 2016 14:43:31 GMT (envelope-from sbruno@FreeBSD.org) Received: (from sbruno@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALEhVvd000206; Mon, 21 Nov 2016 14:43:31 GMT (envelope-from sbruno@FreeBSD.org) Message-Id: <201611211443.uALEhVvd000206@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sbruno set sender to sbruno@FreeBSD.org using -f From: Sean Bruno Date: Mon, 21 Nov 2016 14:43:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308926 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 14:43:32 -0000 Author: sbruno Date: Mon Nov 21 14:43:31 2016 New Revision: 308926 URL: https://svnweb.freebsd.org/changeset/base/308926 Log: Add Intel Atom Cherryview SOC HSUART support PR: 207910 Submitted by: johannes@brilliantservice.co.jp MFC after: 1 week Modified: head/sys/dev/uart/uart_bus_pci.c Modified: head/sys/dev/uart/uart_bus_pci.c ============================================================================== --- head/sys/dev/uart/uart_bus_pci.c Mon Nov 21 14:13:57 2016 (r308925) +++ head/sys/dev/uart/uart_bus_pci.c Mon Nov 21 14:43:31 2016 (r308926) @@ -128,6 +128,10 @@ static const struct pci_id pci_ns8250_id { 0x8086, 0x1c3d, 0xffff, 0, "Intel AMT - KT Controller", 0x10 }, { 0x8086, 0x1d3d, 0xffff, 0, "Intel C600/X79 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x1e3d, 0xffff, 0, "Intel Panther Point KT Controller", 0x10 }, +{ 0x8086, 0x228a, 0xffff, 0, "Intel Cherryview SIO HSUART#1", 0x10, + 24 * DEFAULT_RCLK, 2 }, +{ 0x8086, 0x228c, 0xffff, 0, "Intel Cherryview SIO HSUART#2", 0x10, + 24 * DEFAULT_RCLK, 2 }, { 0x8086, 0x2a07, 0xffff, 0, "Intel AMT - PM965/GM965 KT Controller", 0x10 }, { 0x8086, 0x2a47, 0xffff, 0, "Mobile 4 Series Chipset KT Controller", 0x10 }, { 0x8086, 0x2e17, 0xffff, 0, "4 Series Chipset Serial KT Controller", 0x10 }, From owner-svn-src-head@freebsd.org Mon Nov 21 15:35:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E1AE4C4DA8C; Mon, 21 Nov 2016 15:35:57 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A2901FCB; Mon, 21 Nov 2016 15:35:57 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALFZu2Z020874; Mon, 21 Nov 2016 15:35:56 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALFZuR1020869; Mon, 21 Nov 2016 15:35:56 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611211535.uALFZuR1020869@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 21 Nov 2016 15:35:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308927 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 15:35:58 -0000 Author: br Date: Mon Nov 21 15:35:56 2016 New Revision: 308927 URL: https://svnweb.freebsd.org/changeset/base/308927 Log: Move FDT option to the main SoC file and mark boards config as NO_UNIVERSE. Pointed out by: andrew Sponsored by: DARPA, AFRL Modified: head/sys/mips/conf/CANNA head/sys/mips/conf/CI20 head/sys/mips/conf/JZ4780 head/sys/mips/conf/X1000 Modified: head/sys/mips/conf/CANNA ============================================================================== --- head/sys/mips/conf/CANNA Mon Nov 21 14:43:31 2016 (r308926) +++ head/sys/mips/conf/CANNA Mon Nov 21 15:35:56 2016 (r308927) @@ -2,10 +2,11 @@ # # $FreeBSD$ +#NO_UNIVERSE + include "X1000" ident CANNA -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=ingenic/canna.dts Modified: head/sys/mips/conf/CI20 ============================================================================== --- head/sys/mips/conf/CI20 Mon Nov 21 14:43:31 2016 (r308926) +++ head/sys/mips/conf/CI20 Mon Nov 21 15:35:56 2016 (r308927) @@ -2,10 +2,11 @@ # # $FreeBSD$ +#NO_UNIVERSE + include "JZ4780" ident CI20 -options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=ingenic/ci20.dts @@ -27,5 +28,4 @@ options ROOTDEVNAME=\"ufs:mmcsd0\" makeoptions TRAMPLOADADDR=0x88000000 #options VERBOSE_SYSINIT -device dme options PRINTF_BUFR_SIZE=256 Modified: head/sys/mips/conf/JZ4780 ============================================================================== --- head/sys/mips/conf/JZ4780 Mon Nov 21 14:43:31 2016 (r308926) +++ head/sys/mips/conf/JZ4780 Mon Nov 21 15:35:56 2016 (r308927) @@ -78,6 +78,8 @@ device da device mmc device mmcsd +device dme + # USB support options USB_DEBUG # enable debug msgs options USB_HOST_ALIGN=128 # L2 cache line size @@ -90,3 +92,6 @@ device uhid # "Human Interface Devices #device ulpt # Printer device umass # Disks/Mass storage - Requires scbus and da device ums # Mouse + +# FDT support +options FDT Modified: head/sys/mips/conf/X1000 ============================================================================== --- head/sys/mips/conf/X1000 Mon Nov 21 14:43:31 2016 (r308926) +++ head/sys/mips/conf/X1000 Mon Nov 21 15:35:56 2016 (r308927) @@ -87,3 +87,6 @@ device mmcsd #device ulpt # Printer #device umass # Disks/Mass storage - Requires scbus and da #device ums # Mouse + +# FDT support +options FDT From owner-svn-src-head@freebsd.org Mon Nov 21 15:42:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA847C4DE10; Mon, 21 Nov 2016 15:42:55 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 917D19DF; Mon, 21 Nov 2016 15:42:55 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALFgsjg024869; Mon, 21 Nov 2016 15:42:54 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALFgsV7024868; Mon, 21 Nov 2016 15:42:54 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611211542.uALFgsV7024868@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Mon, 21 Nov 2016 15:42:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308928 - head/sys/mips/ingenic X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 15:42:55 -0000 Author: br Date: Mon Nov 21 15:42:54 2016 New Revision: 308928 URL: https://svnweb.freebsd.org/changeset/base/308928 Log: Add PDMA controller registers. Obtained from: X1000 IoT Application Processor Programming Manual Sponsored by: DARPA, AFRL Added: head/sys/mips/ingenic/jz4780_pdma.h (contents, props changed) Added: head/sys/mips/ingenic/jz4780_pdma.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/mips/ingenic/jz4780_pdma.h Mon Nov 21 15:42:54 2016 (r308928) @@ -0,0 +1,68 @@ +/*- + * Copyright (c) 2016 Ruslan Bukin + * All rights reserved. + * + * This software was developed by SRI International and the University of + * Cambridge Computer Laboratory under DARPA/AFRL contract FA8750-10-C-0237 + * ("CTSRD"), as part of the DARPA CRASH research programme. + * + * 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$ + */ + +/* DMA Channel Registers */ +#define PDMA_DSA(n) (0x00 + 0x20 * n) /* Channel n Source Address */ +#define PDMA_DTA(n) (0x04 + 0x20 * n) /* Channel n Target Address */ +#define PDMA_DTC(n) (0x08 + 0x20 * n) /* Channel n Transfer Count */ +#define PDMA_DRT(n) (0x0C + 0x20 * n) /* Channel n Request Source */ +#define PDMA_DCS(n) (0x10 + 0x20 * n) /* Channel n Control/Status */ +#define PDMA_DCM(n) (0x14 + 0x20 * n) /* Channel n Command */ +#define PDMA_DDA(n) (0x18 + 0x20 * n) /* Channel n Descriptor Address */ +#define PDMA_DSD(n) (0x1C + 0x20 * n) /* Channel n Stride Difference */ + +/* Global Control Registers */ +#define PDMA_DMAC 0x1000 /* DMA Control */ +#define PDMA_DIRQP 0x1004 /* DMA Interrupt Pending */ +#define PDMA_DDB 0x1008 /* DMA Doorbell */ +#define PDMA_DDS 0x100C /* DMA Doorbell Set */ +#define PDMA_DIP 0x1010 /* Descriptor Interrupt Pending */ +#define PDMA_DIC 0x1014 /* Descriptor Interrupt Clear */ +#define PDMA_DMACP 0x101C /* DMA Channel Programmable */ +#define PDMA_DSIRQP 0x1020 /* Channel soft IRQ to MCU */ +#define PDMA_DSIRQM 0x1024 /* Channel soft IRQ mask */ +#define PDMA_DCIRQP 0x1028 /* Channel IRQ to MCU */ +#define PDMA_DCIRQM 0x102C /* Channel IRQ to MCU mask */ +#define PDMA_DMCS 0x1030 /* MCU Control and Status */ +#define PDMA_DMNMB 0x1034 /* MCU Normal Mailbox */ +#define PDMA_DMSMB 0x1038 /* MCU Security Mailbox */ +#define PDMA_DMINT 0x103C /* MCU Interrupt */ + +struct pdma_hwdesc { + uint32_t dcm; /* DMA Channel Command */ + uint32_t dsa; /* DMA Source Address */ + uint32_t dta; /* DMA Target Address */ + uint32_t dtc; /* DMA Transfer Counter */ + uint32_t sd; /* Stride Address */ + uint32_t drt; /* DMA Request Type */ + uint32_t reserved[2]; +}; From owner-svn-src-head@freebsd.org Mon Nov 21 18:01:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD6B1C4C5B7; Mon, 21 Nov 2016 18:01:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.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 BD5BE1284; Mon, 21 Nov 2016 18:01:51 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 95DAF10A982; Mon, 21 Nov 2016 13:01:50 -0500 (EST) From: John Baldwin To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308821 - head/sys/i386/i386 Date: Mon, 21 Nov 2016 09:49:35 -0800 Message-ID: <2451060.DFakaYVcal@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <20161120083131.GP54029@kib.kiev.ua> References: <201611190136.uAJ1aiZb091275@repo.freebsd.org> <20161120083131.GP54029@kib.kiev.ua> 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.4.3 (mail.baldwin.cx); Mon, 21 Nov 2016 13:01:50 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 18:01:52 -0000 On Sunday, November 20, 2016 10:31:31 AM Konstantin Belousov wrote: > On Sat, Nov 19, 2016 at 01:36:44AM +0000, John Baldwin wrote: > > Author: jhb > > Date: Sat Nov 19 01:36:44 2016 > > New Revision: 308821 > > URL: https://svnweb.freebsd.org/changeset/base/308821 > > > > Log: > > MFamd64: Various fatal page fault fixes. > > > > - If a page fault is triggered due to reserved bits in a PTE, treat it > > as a fatal fault and panic. > > - If PG_NX is in use, report whether a fatal page fault is due to an > > instruction fetch or a data access. > > - If a fatal page fault is due to reserved bits in a PTE, report that as > > the page fault type rather than a protection violation. > > > > MFC after: 1 month > > > > Modified: > > head/sys/i386/i386/trap.c > > > > Modified: head/sys/i386/i386/trap.c > > ============================================================================== > > --- head/sys/i386/i386/trap.c Sat Nov 19 01:34:12 2016 (r308820) > > +++ head/sys/i386/i386/trap.c Sat Nov 19 01:36:44 2016 (r308821) > > @@ -857,6 +857,14 @@ trap_pfault(frame, usermode, eva) > > } > > > > /* > > + * If the trap was caused by errant bits in the PTE then panic. > > + */ > > + if (frame->tf_err & PGEX_RSV) { > > + trap_fatal(frame, eva); > > + return (-1); > > + } > > + > > + /* > > * PGEX_I is defined only if the execute disable bit capability is > > * supported and enabled. > > */ > > @@ -926,9 +934,15 @@ trap_fatal(frame, eva) > > #endif > > if (type == T_PAGEFLT) { > > printf("fault virtual address = 0x%x\n", eva); > > - printf("fault code = %s %s, %s\n", > > + printf("fault code = %s %s%s, %s\n", > > code & PGEX_U ? "user" : "supervisor", > > code & PGEX_W ? "write" : "read", > > +#if defined(PAE) || defined(PAE_TABLES) > > + pg_nx != 0 ? > > + (code & PGEX_I ? " instruction" : " data") : > > +#endif > I suggest to remove #ifdef guards, and the pg_nx check there, as > well. The page fault exception error code bits have constant meaning > regardless of the kernel and CPU configuration, so if we get the I bit > set in the error word, we know that it was due to executing on PAE table > with bit 63 (nx) set. This is true even if kernel was not configured to > create such tables. > > In other words, it would give more correct and useful information, which > make it easier to track page tables corruption. The SDM claims that this bit is only defined if pg_nx is enabled, so an instruction fault when EFER_NXE is not enabled would report this bit as clear resulting in the trap output saying "data" when it was really "instruction". That is, on i386 without pg_nx, the I/D being zero can mean either instruction or data, not just data. I felt always printing data in that case could be misleading (someone might get a fatal trap and be confused that it reports a data fault when it is the instruction fetch that failed). -- John Baldwin From owner-svn-src-head@freebsd.org Mon Nov 21 18:21:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6EA9EC4D002; Mon, 21 Nov 2016 18:21:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.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 4DE84329; Mon, 21 Nov 2016 18:21:23 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 63D0810A982; Mon, 21 Nov 2016 13:21:22 -0500 (EST) From: John Baldwin To: Warner Losh Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308869 - head/sbin/nvmecontrol Date: Mon, 21 Nov 2016 10:07:49 -0800 Message-ID: <123365400.XYmKG93e4H@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201611192146.uAJLkDP5094317@repo.freebsd.org> References: <201611192146.uAJLkDP5094317@repo.freebsd.org> 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.4.3 (mail.baldwin.cx); Mon, 21 Nov 2016 13:21:22 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 18:21:23 -0000 On Saturday, November 19, 2016 09:46:13 PM Warner Losh wrote: > Author: imp > Date: Sat Nov 19 21:46:13 2016 > New Revision: 308869 > URL: https://svnweb.freebsd.org/changeset/base/308869 > > Log: > i386 turns out to not have __uint128_t. So confusingly use 64-bit math > instead. Since we're little endian, we can get away with it. Also, > since the counters in quesitons would require billions of iops for > tens of billions of seconds to overflow, and since such data rates are > unlikely for people using i386 for a while, that's OK. The fastest > cards today can't do even a million IOPs. > > Noticed by: dim@ > Sponsored by: Netflix, Inc It probably has it if you compile with -march= where is new enough to have SSE. Is nvme inherently x86-only? -- John Baldwin From owner-svn-src-head@freebsd.org Mon Nov 21 18:24:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DEB64C4D0D2; Mon, 21 Nov 2016 18:24:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA96A89A; Mon, 21 Nov 2016 18:24:07 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALIO6M4090459; Mon, 21 Nov 2016 18:24:06 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALIO6oc090450; Mon, 21 Nov 2016 18:24:06 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211824.uALIO6oc090450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 18:24:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308931 - in head/sys: arm/annapurna/alpine arm64/cavium conf dev/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 18:24:08 -0000 Author: andrew Date: Mon Nov 21 18:24:05 2016 New Revision: 308931 URL: https://svnweb.freebsd.org/changeset/base/308931 Log: To allow for an ACPI attachment to the generic PCIe driver split off the FDT attachment to a new file. A separate ACPI attachment will then be added to allow arm64 servers with ACPI to use it over FDT. This should also help with merging this with the ofwpci driver, with further work needed to remove restrictions this driver places on resource allocation. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7319 Added: head/sys/dev/pci/pci_host_generic_fdt.c (contents, props changed) head/sys/dev/pci/pci_host_generic_fdt.h (contents, props changed) Modified: head/sys/arm/annapurna/alpine/alpine_pci.c head/sys/arm64/cavium/thunder_pcie_common.c head/sys/arm64/cavium/thunder_pcie_fdt.c head/sys/conf/files.arm head/sys/conf/files.arm64 head/sys/dev/pci/pci_host_generic.c head/sys/dev/pci/pci_host_generic.h Modified: head/sys/arm/annapurna/alpine/alpine_pci.c ============================================================================== --- head/sys/arm/annapurna/alpine/alpine_pci.c Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/arm/annapurna/alpine/alpine_pci.c Mon Nov 21 18:24:05 2016 (r308931) @@ -45,6 +45,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -79,7 +80,7 @@ static device_method_t al_pcib_methods[] }; DEFINE_CLASS_1(pcib, al_pcib_driver, al_pcib_methods, - sizeof(struct generic_pcie_softc), generic_pcie_driver); + sizeof(struct generic_pcie_fdt_softc), generic_pcie_fdt_driver); static devclass_t anpa_pcib_devclass; Modified: head/sys/arm64/cavium/thunder_pcie_common.c ============================================================================== --- head/sys/arm64/cavium/thunder_pcie_common.c Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/arm64/cavium/thunder_pcie_common.c Mon Nov 21 18:24:05 2016 (r308931) @@ -58,6 +58,9 @@ __FBSDID("$FreeBSD$"); #include #include #include +#ifdef FDT +#include +#endif #include "thunder_pcie_common.h" Modified: head/sys/arm64/cavium/thunder_pcie_fdt.c ============================================================================== --- head/sys/arm64/cavium/thunder_pcie_fdt.c Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/arm64/cavium/thunder_pcie_fdt.c Mon Nov 21 18:24:05 2016 (r308931) @@ -49,6 +49,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include "thunder_pcie_common.h" @@ -80,7 +81,7 @@ static device_method_t thunder_pcie_fdt_ }; DEFINE_CLASS_1(pcib, thunder_pcie_fdt_driver, thunder_pcie_fdt_methods, - sizeof(struct generic_pcie_softc), generic_pcie_driver); + sizeof(struct generic_pcie_fdt_softc), generic_pcie_fdt_driver); static devclass_t thunder_pcie_fdt_devclass; @@ -115,11 +116,11 @@ thunder_pcie_fdt_probe(device_t dev) static int thunder_pcie_fdt_attach(device_t dev) { - struct generic_pcie_softc *sc; + struct generic_pcie_fdt_softc *sc; sc = device_get_softc(dev); - thunder_pcie_identify_ecam(dev, &sc->ecam); - sc->coherent = 1; + thunder_pcie_identify_ecam(dev, &sc->base.ecam); + sc->base.coherent = 1; return (pci_host_generic_attach(dev)); } Modified: head/sys/conf/files.arm ============================================================================== --- head/sys/conf/files.arm Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/conf/files.arm Mon Nov 21 18:24:05 2016 (r308931) @@ -124,7 +124,8 @@ dev/hwpmc/hwpmc_arm.c optional hwpmc dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6 dev/iicbus/twsi/twsi.c optional twsi dev/ofw/ofwpci.c optional fdt pci -dev/pci/pci_host_generic.c optional pci_host_generic pci fdt +dev/pci/pci_host_generic.c optional pci_host_generic pci +dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt dev/psci/psci.c optional psci dev/psci/psci_arm.S optional psci dev/syscons/scgfbrndr.c optional sc Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/conf/files.arm64 Mon Nov 21 18:24:05 2016 (r308931) @@ -154,8 +154,9 @@ dev/mmc/host/dwmmc.c optional dwmmc fdt dev/mmc/host/dwmmc_hisi.c optional dwmmc fdt soc_hisi_hi6220 dev/ofw/ofw_cpu.c optional fdt dev/ofw/ofwpci.c optional fdt pci -dev/pci/pci_host_generic.c optional pci fdt -dev/psci/psci.c optional psci +dev/pci/pci_host_generic.c optional pci +dev/pci/pci_host_generic_fdt.c optional pci fdt +dev/psci/psci.c optional psci fdt dev/psci/psci_arm64.S optional psci dev/uart/uart_cpu_arm64.c optional uart dev/uart/uart_dev_pl011.c optional uart pl011 Modified: head/sys/dev/pci/pci_host_generic.c ============================================================================== --- head/sys/dev/pci/pci_host_generic.c Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/dev/pci/pci_host_generic.c Mon Nov 21 18:24:05 2016 (r308931) @@ -43,26 +43,14 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include -#include -#if defined(INTRNG) -#include -#endif - -#include -#include -#include -#include #include #include #include #include -#include #include #include -#include #include "pcib_if.h" @@ -81,24 +69,8 @@ __FBSDID("$FreeBSD$"); (((func) & PCIE_FUNC_MASK) << PCIE_FUNC_SHIFT) | \ ((reg) & PCIE_REG_MASK)) -#define PCI_IO_WINDOW_OFFSET 0x1000 - -#define SPACE_CODE_SHIFT 24 -#define SPACE_CODE_MASK 0x3 -#define SPACE_CODE_IO_SPACE 0x1 -#define PROPS_CELL_SIZE 1 -#define PCI_ADDR_CELL_SIZE 2 - -/* OFW bus interface */ -struct generic_pcie_ofw_devinfo { - struct ofw_bus_devinfo di_dinfo; - struct resource_list di_rl; -}; - /* Forward prototypes */ -static int generic_pcie_probe(device_t dev); -static int parse_pci_mem_ranges(struct generic_pcie_softc *sc); static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, int bytes); static void generic_pcie_write_config(device_t dev, u_int bus, u_int slot, @@ -108,87 +80,17 @@ static int generic_pcie_read_ivar(device uintptr_t *result); static int generic_pcie_write_ivar(device_t dev, device_t child, int index, uintptr_t value); -static struct resource *generic_pcie_alloc_resource_ofw(device_t, device_t, - int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); -static struct resource *generic_pcie_alloc_resource_pcie(device_t dev, - device_t child, int type, int *rid, rman_res_t start, rman_res_t end, - rman_res_t count, u_int flags); -static int generic_pcie_release_resource(device_t dev, device_t child, - int type, int rid, struct resource *res); -static int generic_pcie_release_resource_ofw(device_t, device_t, int, int, - struct resource *); -static int generic_pcie_release_resource_pcie(device_t, device_t, int, int, - struct resource *); -static int generic_pcie_ofw_bus_attach(device_t); -static const struct ofw_bus_devinfo *generic_pcie_ofw_get_devinfo(device_t, - device_t); - -static __inline void -get_addr_size_cells(phandle_t node, pcell_t *addr_cells, pcell_t *size_cells) -{ - - *addr_cells = 2; - /* Find address cells if present */ - OF_getencprop(node, "#address-cells", addr_cells, sizeof(*addr_cells)); - - *size_cells = 2; - /* Find size cells if present */ - OF_getencprop(node, "#size-cells", size_cells, sizeof(*size_cells)); -} - -static int -generic_pcie_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (ofw_bus_is_compatible(dev, "pci-host-ecam-generic")) { - device_set_desc(dev, "Generic PCI host controller"); - return (BUS_PROBE_GENERIC); - } - if (ofw_bus_is_compatible(dev, "arm,gem5_pcie")) { - device_set_desc(dev, "GEM5 PCIe host controller"); - return (BUS_PROBE_DEFAULT); - } - - return (ENXIO); -} int -pci_host_generic_attach(device_t dev) +pci_host_generic_core_attach(device_t dev) { - struct generic_pcie_softc *sc; - uint64_t phys_base; - uint64_t pci_base; - uint64_t size; - phandle_t node; + struct generic_pcie_core_softc *sc; int error; - int tuple; int rid; sc = device_get_softc(dev); sc->dev = dev; - /* Retrieve 'ranges' property from FDT */ - if (bootverbose) - device_printf(dev, "parsing FDT for ECAM%d:\n", - sc->ecam); - if (parse_pci_mem_ranges(sc)) - return (ENXIO); - - /* Attach OFW bus */ - if (generic_pcie_ofw_bus_attach(dev) != 0) - return (ENXIO); - - node = ofw_bus_get_node(dev); - if (sc->coherent == 0) { - sc->coherent = OF_hasprop(node, "dma-coherent"); - } - if (bootverbose) - device_printf(dev, "Bus is%s cache-coherent\n", - sc->coherent ? "" : " not"); - /* Create the parent DMA tag to pass down the coherent flag */ error = bus_dma_tag_create(bus_get_dma_tag(dev), /* parent */ 1, 0, /* alignment, bounds */ @@ -232,111 +134,6 @@ pci_host_generic_attach(device_t dev) return (error); } - for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { - phys_base = sc->ranges[tuple].phys_base; - pci_base = sc->ranges[tuple].pci_base; - size = sc->ranges[tuple].size; - if (phys_base == 0 || size == 0) - continue; /* empty range element */ - if (sc->ranges[tuple].flags & FLAG_MEM) { - error = rman_manage_region(&sc->mem_rman, - phys_base, phys_base + size - 1); - } else if (sc->ranges[tuple].flags & FLAG_IO) { - error = rman_manage_region(&sc->io_rman, - pci_base + PCI_IO_WINDOW_OFFSET, - pci_base + PCI_IO_WINDOW_OFFSET + size - 1); - } else - continue; - if (error) { - device_printf(dev, "rman_manage_region() failed." - "error = %d\n", error); - rman_fini(&sc->mem_rman); - return (error); - } - } - - ofw_bus_setup_iinfo(node, &sc->pci_iinfo, sizeof(cell_t)); - - device_add_child(dev, "pci", -1); - return (bus_generic_attach(dev)); -} - -static int -parse_pci_mem_ranges(struct generic_pcie_softc *sc) -{ - pcell_t pci_addr_cells, parent_addr_cells; - pcell_t attributes, size_cells; - cell_t *base_ranges; - int nbase_ranges; - phandle_t node; - int i, j, k; - int tuple; - - node = ofw_bus_get_node(sc->dev); - - OF_getencprop(node, "#address-cells", &pci_addr_cells, - sizeof(pci_addr_cells)); - OF_getencprop(node, "#size-cells", &size_cells, - sizeof(size_cells)); - OF_getencprop(OF_parent(node), "#address-cells", &parent_addr_cells, - sizeof(parent_addr_cells)); - - if (parent_addr_cells > 2 || pci_addr_cells != 3 || size_cells > 2) { - device_printf(sc->dev, - "Unexpected number of address or size cells in FDT\n"); - return (ENXIO); - } - - nbase_ranges = OF_getproplen(node, "ranges"); - sc->nranges = nbase_ranges / sizeof(cell_t) / - (parent_addr_cells + pci_addr_cells + size_cells); - base_ranges = malloc(nbase_ranges, M_DEVBUF, M_WAITOK); - OF_getencprop(node, "ranges", base_ranges, nbase_ranges); - - for (i = 0, j = 0; i < sc->nranges; i++) { - attributes = (base_ranges[j++] >> SPACE_CODE_SHIFT) & \ - SPACE_CODE_MASK; - if (attributes == SPACE_CODE_IO_SPACE) { - sc->ranges[i].flags |= FLAG_IO; - } else { - sc->ranges[i].flags |= FLAG_MEM; - } - - sc->ranges[i].pci_base = 0; - for (k = 0; k < (pci_addr_cells - 1); k++) { - sc->ranges[i].pci_base <<= 32; - sc->ranges[i].pci_base |= base_ranges[j++]; - } - sc->ranges[i].phys_base = 0; - for (k = 0; k < parent_addr_cells; k++) { - sc->ranges[i].phys_base <<= 32; - sc->ranges[i].phys_base |= base_ranges[j++]; - } - sc->ranges[i].size = 0; - for (k = 0; k < size_cells; k++) { - sc->ranges[i].size <<= 32; - sc->ranges[i].size |= base_ranges[j++]; - } - } - - for (; i < MAX_RANGES_TUPLES; i++) { - /* zero-fill remaining tuples to mark empty elements in array */ - sc->ranges[i].pci_base = 0; - sc->ranges[i].phys_base = 0; - sc->ranges[i].size = 0; - } - - if (bootverbose) { - for (tuple = 0; tuple < MAX_RANGES_TUPLES; tuple++) { - device_printf(sc->dev, - "\tPCI addr: 0x%jx, CPU addr: 0x%jx, Size: 0x%jx\n", - sc->ranges[tuple].pci_base, - sc->ranges[tuple].phys_base, - sc->ranges[tuple].size); - } - } - - free(base_ranges, M_DEVBUF); return (0); } @@ -344,7 +141,7 @@ static uint32_t generic_pcie_read_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, int bytes) { - struct generic_pcie_softc *sc; + struct generic_pcie_core_softc *sc; bus_space_handle_t h; bus_space_tag_t t; uint64_t offset; @@ -381,7 +178,7 @@ static void generic_pcie_write_config(device_t dev, u_int bus, u_int slot, u_int func, u_int reg, uint32_t val, int bytes) { - struct generic_pcie_softc *sc; + struct generic_pcie_core_softc *sc; bus_space_handle_t h; bus_space_tag_t t; uint64_t offset; @@ -420,41 +217,10 @@ generic_pcie_maxslots(device_t dev) } static int -generic_pcie_route_interrupt(device_t bus, device_t dev, int pin) -{ - struct generic_pcie_softc *sc; - struct ofw_pci_register reg; - uint32_t pintr, mintr[2]; - phandle_t iparent; - int intrcells; - - sc = device_get_softc(bus); - pintr = pin; - - bzero(®, sizeof(reg)); - reg.phys_hi = (pci_get_bus(dev) << OFW_PCI_PHYS_HI_BUSSHIFT) | - (pci_get_slot(dev) << OFW_PCI_PHYS_HI_DEVICESHIFT) | - (pci_get_function(dev) << OFW_PCI_PHYS_HI_FUNCTIONSHIFT); - - intrcells = ofw_bus_lookup_imap(ofw_bus_get_node(dev), - &sc->pci_iinfo, ®, sizeof(reg), &pintr, sizeof(pintr), - mintr, sizeof(mintr), &iparent); - if (intrcells) { - pintr = ofw_bus_map_intr(dev, iparent, intrcells, mintr); - return (pintr); - } - - device_printf(bus, "could not route pin %d for device %d.%d\n", - pin, pci_get_slot(dev), pci_get_function(dev)); - return (PCI_INVALID_IRQ); -} - - -static int generic_pcie_read_ivar(device_t dev, device_t child, int index, uintptr_t *result) { - struct generic_pcie_softc *sc; + struct generic_pcie_core_softc *sc; int secondary_bus; sc = device_get_softc(dev); @@ -486,7 +252,7 @@ generic_pcie_write_ivar(device_t dev, de } static struct rman * -generic_pcie_rman(struct generic_pcie_softc *sc, int type) +generic_pcie_rman(struct generic_pcie_core_softc *sc, int type) { switch (type) { @@ -501,15 +267,21 @@ generic_pcie_rman(struct generic_pcie_so return (NULL); } -static int -generic_pcie_release_resource_pcie(device_t dev, device_t child, int type, +int +pci_host_generic_core_release_resource(device_t dev, device_t child, int type, int rid, struct resource *res) { - struct generic_pcie_softc *sc; + struct generic_pcie_core_softc *sc; struct rman *rm; sc = device_get_softc(dev); +#if defined(NEW_PCIB) && defined(PCI_RES_BUS) + if (type == PCI_RES_BUS) { + return (pci_domain_release_bus(sc->ecam, child, rid, res)); + } +#endif + rm = generic_pcie_rman(sc, type); if (rm != NULL) { KASSERT(rman_is_region_manager(res, rm), ("rman mismatch")); @@ -519,61 +291,22 @@ generic_pcie_release_resource_pcie(devic return (bus_generic_release_resource(dev, child, type, rid, res)); } -static int -generic_pcie_release_resource(device_t dev, device_t child, int type, - int rid, struct resource *res) +struct resource * +pci_host_generic_core_alloc_resource(device_t dev, device_t child, int type, + int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { -#if defined(NEW_PCIB) && defined(PCI_RES_BUS) - struct generic_pcie_softc *sc; - - if (type == PCI_RES_BUS) { - sc = device_get_softc(dev); - return (pci_domain_release_bus(sc->ecam, child, rid, res)); - } -#endif - /* For PCIe devices that do not have FDT nodes, use PCIB method */ - if ((int)ofw_bus_get_node(child) <= 0) { - return (generic_pcie_release_resource_pcie(dev, - child, type, rid, res)); - } + struct generic_pcie_core_softc *sc; + struct resource *res; + struct rman *rm; - /* For other devices use OFW method */ - return (generic_pcie_release_resource_ofw(dev, - child, type, rid, res)); -} + sc = device_get_softc(dev); -struct resource * -pci_host_generic_alloc_resource(device_t dev, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) -{ #if defined(NEW_PCIB) && defined(PCI_RES_BUS) - struct generic_pcie_softc *sc; - if (type == PCI_RES_BUS) { - sc = device_get_softc(dev); return (pci_domain_alloc_bus(sc->ecam, child, rid, start, end, count, flags)); } #endif - /* For PCIe devices that do not have FDT nodes, use PCIB method */ - if ((int)ofw_bus_get_node(child) <= 0) - return (generic_pcie_alloc_resource_pcie(dev, child, type, rid, - start, end, count, flags)); - - /* For other devices use OFW method */ - return (generic_pcie_alloc_resource_ofw(dev, child, type, rid, - start, end, count, flags)); -} - -static struct resource * -generic_pcie_alloc_resource_pcie(device_t dev, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) -{ - struct generic_pcie_softc *sc; - struct resource *res; - struct rman *rm; - - sc = device_get_softc(dev); rm = generic_pcie_rman(sc, type); if (rm == NULL) @@ -612,7 +345,7 @@ static int generic_pcie_adjust_resource(device_t dev, device_t child, int type, struct resource *res, rman_res_t start, rman_res_t end) { - struct generic_pcie_softc *sc; + struct generic_pcie_core_softc *sc; struct rman *rm; sc = device_get_softc(dev); @@ -628,194 +361,22 @@ generic_pcie_adjust_resource(device_t de return (bus_generic_adjust_resource(dev, child, type, res, start, end)); } -static int -generic_pcie_activate_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) -{ - struct generic_pcie_softc *sc; - uint64_t phys_base; - uint64_t pci_base; - uint64_t size; - int found; - int res; - int i; - - sc = device_get_softc(dev); - - if ((res = rman_activate_resource(r)) != 0) - return (res); - - switch(type) { - case SYS_RES_IOPORT: - found = 0; - for (i = 0; i < MAX_RANGES_TUPLES; i++) { - pci_base = sc->ranges[i].pci_base; - phys_base = sc->ranges[i].phys_base; - size = sc->ranges[i].size; - - if ((rid > pci_base) && (rid < (pci_base + size))) { - found = 1; - break; - } - } - if (found) { - rman_set_start(r, rman_get_start(r) + phys_base); - rman_set_end(r, rman_get_end(r) + phys_base); - BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, - type, rid, r); - } else { - device_printf(dev, "Failed to activate IOPORT resource\n"); - res = 0; - } - break; - case SYS_RES_MEMORY: - BUS_ACTIVATE_RESOURCE(device_get_parent(dev), child, type, rid, r); - break; - default: - break; - } - - return (res); -} - -static int -generic_pcie_deactivate_resource(device_t dev, device_t child, int type, int rid, - struct resource *r) -{ - struct generic_pcie_softc *sc; - vm_offset_t vaddr; - int res; - - sc = device_get_softc(dev); - - if ((res = rman_deactivate_resource(r)) != 0) - return (res); - - switch(type) { - case SYS_RES_IOPORT: - case SYS_RES_MEMORY: - vaddr = (vm_offset_t)rman_get_virtual(r); - pmap_unmapdev(vaddr, rman_get_size(r)); - break; - default: - break; - } - - return (res); -} - static bus_dma_tag_t generic_pcie_get_dma_tag(device_t dev, device_t child) { - struct generic_pcie_softc *sc; + struct generic_pcie_core_softc *sc; sc = device_get_softc(dev); return (sc->dmat); } -static int -generic_pcie_alloc_msi(device_t pci, device_t child, int count, int maxcount, - int *irqs) -{ -#if defined(INTRNG) - phandle_t msi_parent; - - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); - return (intr_alloc_msi(pci, child, msi_parent, count, maxcount, - irqs)); -#else - return (ENXIO); -#endif -} - -static int -generic_pcie_release_msi(device_t pci, device_t child, int count, int *irqs) -{ -#if defined(INTRNG) - phandle_t msi_parent; - - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); - return (intr_release_msi(pci, child, msi_parent, count, irqs)); -#else - return (ENXIO); -#endif -} - -static int -generic_pcie_map_msi(device_t pci, device_t child, int irq, uint64_t *addr, - uint32_t *data) -{ -#if defined(INTRNG) - phandle_t msi_parent; - - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); - return (intr_map_msi(pci, child, msi_parent, irq, addr, data)); -#else - return (ENXIO); -#endif -} - -static int -generic_pcie_alloc_msix(device_t pci, device_t child, int *irq) -{ -#if defined(INTRNG) - phandle_t msi_parent; - - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); - return (intr_alloc_msix(pci, child, msi_parent, irq)); -#else - return (ENXIO); -#endif -} - -static int -generic_pcie_release_msix(device_t pci, device_t child, int irq) -{ -#if defined(INTRNG) - phandle_t msi_parent; - - ofw_bus_msimap(ofw_bus_get_node(pci), pci_get_rid(child), &msi_parent, - NULL); - return (intr_release_msix(pci, child, msi_parent, irq)); -#else - return (ENXIO); -#endif -} - -int -generic_pcie_get_id(device_t pci, device_t child, enum pci_id_type type, - uintptr_t *id) -{ - phandle_t node; - uint32_t rid; - uint16_t pci_rid; - - if (type != PCI_ID_MSI) - return (pcib_get_id(pci, child, type, id)); - - node = ofw_bus_get_node(pci); - pci_rid = pci_get_rid(child); - - ofw_bus_msimap(node, pci_rid, NULL, &rid); - *id = rid; - - return (0); -} - static device_method_t generic_pcie_methods[] = { - DEVMETHOD(device_probe, generic_pcie_probe), - DEVMETHOD(device_attach, pci_host_generic_attach), + DEVMETHOD(device_attach, pci_host_generic_core_attach), DEVMETHOD(bus_read_ivar, generic_pcie_read_ivar), DEVMETHOD(bus_write_ivar, generic_pcie_write_ivar), - DEVMETHOD(bus_alloc_resource, pci_host_generic_alloc_resource), + DEVMETHOD(bus_alloc_resource, pci_host_generic_core_alloc_resource), DEVMETHOD(bus_adjust_resource, generic_pcie_adjust_resource), - DEVMETHOD(bus_release_resource, generic_pcie_release_resource), - DEVMETHOD(bus_activate_resource, generic_pcie_activate_resource), - DEVMETHOD(bus_deactivate_resource, generic_pcie_deactivate_resource), + DEVMETHOD(bus_release_resource, pci_host_generic_core_release_resource), DEVMETHOD(bus_setup_intr, bus_generic_setup_intr), DEVMETHOD(bus_teardown_intr, bus_generic_teardown_intr), @@ -823,147 +384,11 @@ static device_method_t generic_pcie_meth /* pcib interface */ DEVMETHOD(pcib_maxslots, generic_pcie_maxslots), - DEVMETHOD(pcib_route_interrupt, generic_pcie_route_interrupt), DEVMETHOD(pcib_read_config, generic_pcie_read_config), DEVMETHOD(pcib_write_config, generic_pcie_write_config), - DEVMETHOD(pcib_alloc_msi, generic_pcie_alloc_msi), - DEVMETHOD(pcib_release_msi, generic_pcie_release_msi), - DEVMETHOD(pcib_alloc_msix, generic_pcie_alloc_msix), - DEVMETHOD(pcib_release_msix, generic_pcie_release_msix), - DEVMETHOD(pcib_map_msi, generic_pcie_map_msi), - DEVMETHOD(pcib_get_id, generic_pcie_get_id), - - /* ofw_bus interface */ - DEVMETHOD(ofw_bus_get_devinfo, generic_pcie_ofw_get_devinfo), - DEVMETHOD(ofw_bus_get_compat, ofw_bus_gen_get_compat), - DEVMETHOD(ofw_bus_get_model, ofw_bus_gen_get_model), - DEVMETHOD(ofw_bus_get_name, ofw_bus_gen_get_name), - DEVMETHOD(ofw_bus_get_node, ofw_bus_gen_get_node), - DEVMETHOD(ofw_bus_get_type, ofw_bus_gen_get_type), DEVMETHOD_END }; -static const struct ofw_bus_devinfo * -generic_pcie_ofw_get_devinfo(device_t bus __unused, device_t child) -{ - struct generic_pcie_ofw_devinfo *di; - - di = device_get_ivars(child); - return (&di->di_dinfo); -} - -static struct resource * -generic_pcie_alloc_resource_ofw(device_t bus, device_t child, int type, int *rid, - rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) -{ - struct generic_pcie_softc *sc; - struct generic_pcie_ofw_devinfo *di; - struct resource_list_entry *rle; - int i; - - sc = device_get_softc(bus); - - if (RMAN_IS_DEFAULT_RANGE(start, end)) { - if ((di = device_get_ivars(child)) == NULL) - return (NULL); - if (type == SYS_RES_IOPORT) - type = SYS_RES_MEMORY; - - /* Find defaults for this rid */ - rle = resource_list_find(&di->di_rl, type, *rid); - if (rle == NULL) - return (NULL); - - start = rle->start; - end = rle->end; - count = rle->count; - } - - if (type == SYS_RES_MEMORY) { - /* Remap through ranges property */ - for (i = 0; i < MAX_RANGES_TUPLES; i++) { - if (start >= sc->ranges[i].phys_base && end < - sc->ranges[i].pci_base + sc->ranges[i].size) { - start -= sc->ranges[i].phys_base; - start += sc->ranges[i].pci_base; - end -= sc->ranges[i].phys_base; - end += sc->ranges[i].pci_base; - break; - } - } - - if (i == MAX_RANGES_TUPLES) { - device_printf(bus, "Could not map resource " - "%#jx-%#jx\n", start, end); - return (NULL); - } - } - - return (bus_generic_alloc_resource(bus, child, type, rid, start, end, - count, flags)); -} - -static int -generic_pcie_release_resource_ofw(device_t bus, device_t child, int type, int rid, - struct resource *res) -{ - - return (bus_generic_release_resource(bus, child, type, rid, res)); -} - -/* Helper functions */ - -static int -generic_pcie_ofw_bus_attach(device_t dev) -{ - struct generic_pcie_ofw_devinfo *di; - device_t child; - phandle_t parent, node; - pcell_t addr_cells, size_cells; - - parent = ofw_bus_get_node(dev); - if (parent > 0) { - get_addr_size_cells(parent, &addr_cells, &size_cells); - /* Iterate through all bus subordinates */ - for (node = OF_child(parent); node > 0; node = OF_peer(node)) { - - /* Allocate and populate devinfo. */ - di = malloc(sizeof(*di), M_DEVBUF, M_WAITOK | M_ZERO); - if (ofw_bus_gen_setup_devinfo(&di->di_dinfo, node) != 0) { - free(di, M_DEVBUF); - continue; - } - - /* Initialize and populate resource list. */ - resource_list_init(&di->di_rl); - ofw_bus_reg_to_rl(dev, node, addr_cells, size_cells, - &di->di_rl); - ofw_bus_intr_to_rl(dev, node, &di->di_rl, NULL); - - /* Add newbus device for this FDT node */ - child = device_add_child(dev, NULL, -1); - if (child == NULL) { - resource_list_free(&di->di_rl); - ofw_bus_gen_destroy_devinfo(&di->di_dinfo); - free(di, M_DEVBUF); - continue; - } - - device_set_ivars(child, di); - } - } - - return (0); -} - -DEFINE_CLASS_0(pcib, generic_pcie_driver, - generic_pcie_methods, sizeof(struct generic_pcie_softc)); - -devclass_t generic_pcie_devclass; - -DRIVER_MODULE(pcib, simplebus, generic_pcie_driver, - generic_pcie_devclass, 0, 0); -DRIVER_MODULE(pcib, ofwbus, generic_pcie_driver, - generic_pcie_devclass, 0, 0); - +DEFINE_CLASS_0(pcib, generic_pcie_core_driver, + generic_pcie_methods, sizeof(struct generic_pcie_core_softc)); Modified: head/sys/dev/pci/pci_host_generic.h ============================================================================== --- head/sys/dev/pci/pci_host_generic.h Mon Nov 21 18:20:28 2016 (r308930) +++ head/sys/dev/pci/pci_host_generic.h Mon Nov 21 18:24:05 2016 (r308931) @@ -48,7 +48,7 @@ struct pcie_range { #define FLAG_MEM (1 << 1) }; -struct generic_pcie_softc { +struct generic_pcie_core_softc { struct pcie_range ranges[MAX_RANGES_TUPLES]; int nranges; int coherent; @@ -62,17 +62,16 @@ struct generic_pcie_softc { device_t dev; bus_space_handle_t ioh; bus_dma_tag_t dmat; -#ifdef FDT - struct ofw_bus_iinfo pci_iinfo; -#endif }; -extern devclass_t generic_pcie_devclass; -DECLARE_CLASS(generic_pcie_driver); +DECLARE_CLASS(generic_pcie_core_driver); -struct resource *pci_host_generic_alloc_resource(device_t, +struct resource *pci_host_generic_core_alloc_resource(device_t, device_t, int, int *, rman_res_t, rman_res_t, rman_res_t, u_int); -int pci_host_generic_attach(device_t); -int generic_pcie_get_id(device_t, device_t, enum pci_id_type, uintptr_t *); +int pci_host_generic_core_attach(device_t); +struct resource *pci_host_generic_core_alloc_resource(device_t, device_t, int, + int *, rman_res_t, rman_res_t, rman_res_t, u_int); +int pci_host_generic_core_release_resource(device_t, device_t, int, int, + struct resource *); #endif /* __PCI_HOST_GENERIC_H_ */ Added: head/sys/dev/pci/pci_host_generic_fdt.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/pci/pci_host_generic_fdt.c Mon Nov 21 18:24:05 2016 (r308931) @@ -0,0 +1,641 @@ +/*- + * Copyright (c) 2015 Ruslan Bukin + * Copyright (c) 2014,2016 The FreeBSD Foundation + * All rights reserved. + * + * This software was developed by Andrew Turner under + * the sponsorship of the FreeBSD Foundation. + * + * This software was developed by Semihalf under + * the sponsorship of 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, 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. + */ + +/* Generic ECAM PCIe driver FDT attachment */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include +#include +#include + +#if defined(INTRNG) +#include +#endif + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include + +#include "pcib_if.h" + +#define PCI_IO_WINDOW_OFFSET 0x1000 + +#define SPACE_CODE_SHIFT 24 +#define SPACE_CODE_MASK 0x3 +#define SPACE_CODE_IO_SPACE 0x1 +#define PROPS_CELL_SIZE 1 +#define PCI_ADDR_CELL_SIZE 2 + +/* OFW bus interface */ +struct generic_pcie_ofw_devinfo { + struct ofw_bus_devinfo di_dinfo; + struct resource_list di_rl; +}; + +/* Forward prototypes */ + +static int generic_pcie_fdt_probe(device_t dev); +static int parse_pci_mem_ranges(device_t, struct generic_pcie_core_softc *); +static int generic_pcie_fdt_release_resource(device_t dev, device_t child, + int type, int rid, struct resource *res); +static int generic_pcie_ofw_bus_attach(device_t); +static const struct ofw_bus_devinfo *generic_pcie_ofw_get_devinfo(device_t, + device_t); + +static __inline void *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Mon Nov 21 18:50:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16360C4DE4F; Mon, 21 Nov 2016 18:50:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E24C91BEB; Mon, 21 Nov 2016 18:50:46 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALIojh1000747; Mon, 21 Nov 2016 18:50:45 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALIojFK000746; Mon, 21 Nov 2016 18:50:45 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211850.uALIojFK000746@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 18:50:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308933 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 18:50:47 -0000 Author: andrew Date: Mon Nov 21 18:50:45 2016 New Revision: 308933 URL: https://svnweb.freebsd.org/changeset/base/308933 Log: Mark the Allwinner drivers as FDT only. These are mobile and embedded parts so are unlikely to use ACPI. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files.arm64 Modified: head/sys/conf/files.arm64 ============================================================================== --- head/sys/conf/files.arm64 Mon Nov 21 18:33:33 2016 (r308932) +++ head/sys/conf/files.arm64 Mon Nov 21 18:50:45 2016 (r308933) @@ -11,33 +11,33 @@ cloudabi64_vdso_blob.o optional compat_ no-implicit-rule \ clean "cloudabi64_vdso_blob.o" # -arm/allwinner/a10_ehci.c optional ehci aw_ehci -arm/allwinner/a10_gpio.c optional gpio aw_gpio -arm/allwinner/a10_mmc.c optional mmc aw_mmc -arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 -arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 -arm/allwinner/aw_ccu.c optional aw_ccu -arm/allwinner/aw_nmi.c optional aw_nmi \ +arm/allwinner/a10_ehci.c optional ehci aw_ehci fdt +arm/allwinner/a10_gpio.c optional gpio aw_gpio fdt +arm/allwinner/a10_mmc.c optional mmc aw_mmc fdt +arm/allwinner/a64/a64_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/a64/a64_r_padconf.c optional soc_allwinner_a64 fdt +arm/allwinner/aw_ccu.c optional aw_ccu fdt +arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" -arm/allwinner/aw_reset.c optional aw_ccu -arm/allwinner/aw_rsb.c optional aw_rsb -arm/allwinner/aw_rtc.c optional aw_rtc -arm/allwinner/aw_sid.c optional aw_sid -arm/allwinner/aw_thermal.c optional aw_thermal -arm/allwinner/aw_usbphy.c optional ehci aw_usbphy -arm/allwinner/aw_wdog.c optional aw_wdog -arm/allwinner/axp81x.c optional axp81x -arm/allwinner/clk/aw_ahbclk.c optional aw_ccu -arm/allwinner/clk/aw_apbclk.c optional aw_ccu -arm/allwinner/clk/aw_axiclk.c optional aw_ccu -arm/allwinner/clk/aw_cpuclk.c optional aw_ccu -arm/allwinner/clk/aw_gate.c optional aw_ccu -arm/allwinner/clk/aw_modclk.c optional aw_ccu -arm/allwinner/clk/aw_pll.c optional aw_ccu \ +arm/allwinner/aw_reset.c optional aw_ccu fdt +arm/allwinner/aw_rsb.c optional aw_rsb fdt +arm/allwinner/aw_rtc.c optional aw_rtc fdt +arm/allwinner/aw_sid.c optional aw_sid fdt +arm/allwinner/aw_thermal.c optional aw_thermal fdt +arm/allwinner/aw_usbphy.c optional ehci aw_usbphy fdt +arm/allwinner/aw_wdog.c optional aw_wdog fdt +arm/allwinner/axp81x.c optional axp81x fdt +arm/allwinner/clk/aw_ahbclk.c optional aw_ccu fdt +arm/allwinner/clk/aw_apbclk.c optional aw_ccu fdt +arm/allwinner/clk/aw_axiclk.c optional aw_ccu fdt +arm/allwinner/clk/aw_cpuclk.c optional aw_ccu fdt +arm/allwinner/clk/aw_gate.c optional aw_ccu fdt +arm/allwinner/clk/aw_modclk.c optional aw_ccu fdt +arm/allwinner/clk/aw_pll.c optional aw_ccu fdt \ compile-with "${NORMAL_C} -I$S/gnu/dts/include" -arm/allwinner/clk/aw_thsclk.c optional aw_ccu -arm/allwinner/clk/aw_usbclk.c optional aw_ccu -arm/allwinner/if_awg.c optional awg +arm/allwinner/clk/aw_thsclk.c optional aw_ccu fdt +arm/allwinner/clk/aw_usbclk.c optional aw_ccu fdt +arm/allwinner/if_awg.c optional awg fdt arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt arm/annapurna/alpine/alpine_pci.c optional al_pci fdt From owner-svn-src-head@freebsd.org Mon Nov 21 19:03:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 926FFC4D1ED; Mon, 21 Nov 2016 19:03:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4528A65B; Mon, 21 Nov 2016 19:03:52 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJ3pYT006246; Mon, 21 Nov 2016 19:03:51 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJ3p96006245; Mon, 21 Nov 2016 19:03:51 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211903.uALJ3p96006245@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 19:03:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308934 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:03:52 -0000 Author: andrew Date: Mon Nov 21 19:03:51 2016 New Revision: 308934 URL: https://svnweb.freebsd.org/changeset/base/308934 Log: Mark extres as FDT only. Much of this assumes FDT and fails to build without it. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Nov 21 18:50:45 2016 (r308933) +++ head/sys/conf/files Mon Nov 21 19:03:51 2016 (r308934) @@ -1601,23 +1601,23 @@ dev/ex/if_ex.c optional ex dev/ex/if_ex_isa.c optional ex isa dev/ex/if_ex_pccard.c optional ex pccard dev/exca/exca.c optional cbb -dev/extres/clk/clk.c optional ext_resources clk -dev/extres/clk/clkdev_if.m optional ext_resources clk -dev/extres/clk/clknode_if.m optional ext_resources clk +dev/extres/clk/clk.c optional ext_resources clk fdt +dev/extres/clk/clkdev_if.m optional ext_resources clk fdt +dev/extres/clk/clknode_if.m optional ext_resources clk fdt dev/extres/clk/clk_bus.c optional ext_resources clk fdt -dev/extres/clk/clk_div.c optional ext_resources clk -dev/extres/clk/clk_fixed.c optional ext_resources clk -dev/extres/clk/clk_gate.c optional ext_resources clk -dev/extres/clk/clk_mux.c optional ext_resources clk -dev/extres/phy/phy.c optional ext_resources phy -dev/extres/phy/phy_if.m optional ext_resources phy -dev/extres/hwreset/hwreset.c optional ext_resources hwreset -dev/extres/hwreset/hwreset_if.m optional ext_resources hwreset -dev/extres/regulator/regdev_if.m optional ext_resources regulator -dev/extres/regulator/regnode_if.m optional ext_resources regulator -dev/extres/regulator/regulator.c optional ext_resources regulator +dev/extres/clk/clk_div.c optional ext_resources clk fdt +dev/extres/clk/clk_fixed.c optional ext_resources clk fdt +dev/extres/clk/clk_gate.c optional ext_resources clk fdt +dev/extres/clk/clk_mux.c optional ext_resources clk fdt +dev/extres/phy/phy.c optional ext_resources phy fdt +dev/extres/phy/phy_if.m optional ext_resources phy fdt +dev/extres/hwreset/hwreset.c optional ext_resources hwreset fdt +dev/extres/hwreset/hwreset_if.m optional ext_resources hwreset fdt +dev/extres/regulator/regdev_if.m optional ext_resources regulator fdt +dev/extres/regulator/regnode_if.m optional ext_resources regulator fdt +dev/extres/regulator/regulator.c optional ext_resources regulator fdt dev/extres/regulator/regulator_bus.c optional ext_resources regulator fdt -dev/extres/regulator/regulator_fixed.c optional ext_resources regulator +dev/extres/regulator/regulator_fixed.c optional ext_resources regulator fdt dev/fatm/if_fatm.c optional fatm pci dev/fb/fbd.c optional fbd | vt dev/fb/fb_if.m standard From owner-svn-src-head@freebsd.org Mon Nov 21 19:13:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0D30CC4D528; Mon, 21 Nov 2016 19:13:35 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C8014BDB; Mon, 21 Nov 2016 19:13:34 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJDXnK010234; Mon, 21 Nov 2016 19:13:33 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJDXSi010233; Mon, 21 Nov 2016 19:13:33 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211913.uALJDXSi010233@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 19:13:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308935 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:13:35 -0000 Author: andrew Date: Mon Nov 21 19:13:33 2016 New Revision: 308935 URL: https://svnweb.freebsd.org/changeset/base/308935 Log: Mark uart_dev_snps.c as FDT only, it doesn't have and ACPI bindings. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Nov 21 19:03:51 2016 (r308934) +++ head/sys/conf/files Mon Nov 21 19:13:33 2016 (r308935) @@ -2947,7 +2947,7 @@ dev/uart/uart_dev_pl011.c optional uart dev/uart/uart_dev_quicc.c optional uart quicc dev/uart/uart_dev_sab82532.c optional uart uart_sab82532 dev/uart/uart_dev_sab82532.c optional uart scc -dev/uart/uart_dev_snps.c optional uart uart_snps +dev/uart/uart_dev_snps.c optional uart uart_snps fdt dev/uart/uart_dev_z8530.c optional uart uart_z8530 dev/uart/uart_dev_z8530.c optional uart scc dev/uart/uart_if.m optional uart From owner-svn-src-head@freebsd.org Mon Nov 21 19:14:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C2298C4D5CA; Mon, 21 Nov 2016 19:14:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8EF41D7E; Mon, 21 Nov 2016 19:14:47 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJEkIn010316; Mon, 21 Nov 2016 19:14:46 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJEkwa010315; Mon, 21 Nov 2016 19:14:46 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211914.uALJEkwa010315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 19:14:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308936 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:14:47 -0000 Author: andrew Date: Mon Nov 21 19:14:46 2016 New Revision: 308936 URL: https://svnweb.freebsd.org/changeset/base/308936 Log: Mark virtio_mmio as FDT only, it lacks an ACPI attachment. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Mon Nov 21 19:13:33 2016 (r308935) +++ head/sys/conf/files Mon Nov 21 19:14:46 2016 (r308936) @@ -3149,8 +3149,8 @@ dev/virtio/virtqueue.c optional virtio dev/virtio/virtio_bus_if.m optional virtio dev/virtio/virtio_if.m optional virtio dev/virtio/pci/virtio_pci.c optional virtio_pci -dev/virtio/mmio/virtio_mmio.c optional virtio_mmio -dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio +dev/virtio/mmio/virtio_mmio.c optional virtio_mmio fdt +dev/virtio/mmio/virtio_mmio_if.m optional virtio_mmio fdt dev/virtio/network/if_vtnet.c optional vtnet dev/virtio/block/virtio_blk.c optional virtio_blk dev/virtio/balloon/virtio_balloon.c optional virtio_balloon From owner-svn-src-head@freebsd.org Mon Nov 21 19:26:24 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60324C4D7A4; Mon, 21 Nov 2016 19:26:24 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A88832A; Mon, 21 Nov 2016 19:26:23 +0000 (UTC) (envelope-from mizhka@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJQN6A014340; Mon, 21 Nov 2016 19:26:23 GMT (envelope-from mizhka@FreeBSD.org) Received: (from mizhka@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJQNQK014339; Mon, 21 Nov 2016 19:26:23 GMT (envelope-from mizhka@FreeBSD.org) Message-Id: <201611211926.uALJQNQK014339@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mizhka set sender to mizhka@FreeBSD.org using -f From: Michael Zhilin Date: Mon, 21 Nov 2016 19:26:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308937 - head/sys/dev/etherswitch/ukswitch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:26:24 -0000 Author: mizhka Date: Mon Nov 21 19:26:22 2016 New Revision: 308937 URL: https://svnweb.freebsd.org/changeset/base/308937 Log: [etherswitch] add ukswitch hint that is phy offset at mdio register This patch allows to specify PHY register offset for ukswitch. For instance, switch MAICREL KS8995XA connected via MDIO to SoC, but PHY register starts at 1. So hint for this case is: hint.ukswitch.0.phyoffset=1 No change/effect if hint is not set. Submitted by: Hiroki Mori Reviewed by: adrian, mizhka Approved by: adrian(mentor) Differential Revision: https://reviews.freebsd.org/D8584 Modified: head/sys/dev/etherswitch/ukswitch/ukswitch.c Modified: head/sys/dev/etherswitch/ukswitch/ukswitch.c ============================================================================== --- head/sys/dev/etherswitch/ukswitch/ukswitch.c Mon Nov 21 19:14:46 2016 (r308936) +++ head/sys/dev/etherswitch/ukswitch/ukswitch.c Mon Nov 21 19:26:22 2016 (r308937) @@ -67,6 +67,7 @@ struct ukswitch_softc { int media; /* cpu port media */ int cpuport; /* which PHY is connected to the CPU */ int phymask; /* PHYs we manage */ + int phyoffset; /* PHYs register offset */ int numports; /* number of ports */ int ifpport[MII_NPHY]; int *portphy; @@ -133,7 +134,7 @@ ukswitch_attach_phys(struct ukswitch_sof M_WAITOK | M_ZERO); err = mii_attach(sc->sc_dev, sc->miibus[port], sc->ifp[port], ukswitch_ifmedia_upd, ukswitch_ifmedia_sts, \ - BMSR_DEFCAPMASK, phy, MII_OFFSET_ANY, 0); + BMSR_DEFCAPMASK, phy + sc->phyoffset, MII_OFFSET_ANY, 0); DPRINTF(sc->sc_dev, "%s attached to pseudo interface %s\n", device_get_nameunit(*sc->miibus[port]), sc->ifp[port]->if_xname); @@ -166,6 +167,7 @@ ukswitch_attach(device_t dev) /* XXX Defaults */ sc->numports = 6; sc->phymask = 0x0f; + sc->phyoffset = 0; sc->cpuport = -1; sc->media = 100; @@ -174,6 +176,8 @@ ukswitch_attach(device_t dev) (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "phymask", &sc->phymask); (void) resource_int_value(device_get_name(dev), device_get_unit(dev), + "phyoffset", &sc->phyoffset); + (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "cpuport", &sc->cpuport); (void) resource_int_value(device_get_name(dev), device_get_unit(dev), "media", &sc->media); From owner-svn-src-head@freebsd.org Mon Nov 21 19:27:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34E7EC4D7EC; Mon, 21 Nov 2016 19:27:00 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0F7536C2; Mon, 21 Nov 2016 19:26:59 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJQxil014408; Mon, 21 Nov 2016 19:26:59 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJQwKL014403; Mon, 21 Nov 2016 19:26:58 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211926.uALJQwKL014403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 19:26:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308938 - in head/sys: arm64/acpica arm64/include dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:27:00 -0000 Author: andrew Date: Mon Nov 21 19:26:58 2016 New Revision: 308938 URL: https://svnweb.freebsd.org/changeset/base/308938 Log: Add support to find the arm64 serial using the ACPI tables. This uses the Serial Port Console Redirection Table to find the device to use. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/acpica/acpi_machdep.c head/sys/arm64/include/acpica_machdep.h head/sys/dev/uart/uart_cpu_acpi.h head/sys/dev/uart/uart_cpu_arm64.c head/sys/dev/uart/uart_dev_pl011.c Modified: head/sys/arm64/acpica/acpi_machdep.c ============================================================================== --- head/sys/arm64/acpica/acpi_machdep.c Mon Nov 21 19:26:22 2016 (r308937) +++ head/sys/arm64/acpica/acpi_machdep.c Mon Nov 21 19:26:58 2016 (r308938) @@ -44,6 +44,8 @@ __FBSDID("$FreeBSD$"); #include +extern struct bus_space memmap_bus; + int acpi_machdep_init(device_t dev) { @@ -215,3 +217,19 @@ acpi_find_table(const char *sig) return (addr); } + +int +acpi_map_addr(struct acpi_generic_address *addr, bus_space_tag_t *tag, + bus_space_handle_t *handle, bus_size_t size) +{ + bus_addr_t phys; + + /* Check if the device is Memory mapped */ + if (addr->SpaceId != 0) + return (ENXIO); + + phys = addr->Address; + *tag = &memmap_bus; + + return (bus_space_map(*tag, phys, size, 0, handle)); +} Modified: head/sys/arm64/include/acpica_machdep.h ============================================================================== --- head/sys/arm64/include/acpica_machdep.h Mon Nov 21 19:26:22 2016 (r308937) +++ head/sys/arm64/include/acpica_machdep.h Mon Nov 21 19:26:58 2016 (r308938) @@ -39,6 +39,8 @@ #ifdef _KERNEL +#include + /* Only use the reduced hardware model */ #define ACPI_REDUCED_HARDWARE 1 @@ -50,6 +52,11 @@ void *acpi_map_table(vm_paddr_t pa, cons void acpi_unmap_table(void *table); vm_paddr_t acpi_find_table(const char *sig); +struct acpi_generic_address; + +int acpi_map_addr(struct acpi_generic_address *, bus_space_tag_t *, + bus_space_handle_t *, bus_size_t); + #endif /* _KERNEL */ #endif /* __ACPICA_MACHDEP_H__ */ Modified: head/sys/dev/uart/uart_cpu_acpi.h ============================================================================== --- head/sys/dev/uart/uart_cpu_acpi.h Mon Nov 21 19:26:22 2016 (r308937) +++ head/sys/dev/uart/uart_cpu_acpi.h Mon Nov 21 19:26:58 2016 (r308938) @@ -40,6 +40,7 @@ struct uart_class; struct acpi_uart_compat_data { const char *hid; struct uart_class *clas; + uint16_t port_subtype; }; /* Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Mon Nov 21 19:26:22 2016 (r308937) +++ head/sys/dev/uart/uart_cpu_arm64.c Mon Nov 21 19:26:58 2016 (r308938) @@ -48,6 +48,12 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef DEV_ACPI +#include +#include +#include +#endif + #ifdef FDT #include #include @@ -72,6 +78,76 @@ uart_cpu_eqres(struct uart_bas *b1, stru return ((pmap_kextract(b1->bsh) == pmap_kextract(b2->bsh)) ? 1 : 0); } +#ifdef DEV_ACPI +static struct acpi_uart_compat_data * +uart_cpu_acpi_scan(uint8_t interface_type) +{ + struct acpi_uart_compat_data **cd; + + SET_FOREACH(cd, uart_acpi_class_and_device_set) { + if ((*cd)->port_subtype == interface_type) + return (*cd); + } + + SET_FOREACH(cd, uart_acpi_class_set) { + if ((*cd)->port_subtype == interface_type) + return (*cd); + } + + return (NULL); +} + +static int +uart_cpu_acpi_probe(struct uart_class **classp, bus_space_tag_t *bst, + bus_space_handle_t *bsh, int *baud, u_int *rclk, u_int *shiftp) +{ + struct acpi_uart_compat_data *cd; + ACPI_TABLE_SPCR *spcr; + vm_paddr_t spcr_physaddr; + int err; + + err = ENXIO; + spcr_physaddr = acpi_find_table(ACPI_SIG_SPCR); + if (spcr_physaddr == 0) + return (ENXIO); + + spcr = acpi_map_table(spcr_physaddr, ACPI_SIG_SPCR); + + cd = uart_cpu_acpi_scan(spcr->InterfaceType); + if (cd == NULL) + goto out; + + switch(spcr->BaudRate) { + case 3: + *baud = 9600; + break; + case 4: + *baud = 19200; + break; + case 6: + *baud = 57600; + break; + case 7: + *baud = 115200; + break; + default: + goto out; + } + + err = acpi_map_addr(&spcr->SerialPort, bst, bsh, PAGE_SIZE); + if (err != 0) + goto out; + + *classp = cd->clas; + *rclk = 0; + *shiftp = 2; + +out: + acpi_unmap_table(spcr); + return (err); +} +#endif + int uart_cpu_getdev(int devtype, struct uart_devinfo *di) { @@ -91,8 +167,14 @@ uart_cpu_getdev(int devtype, struct uart return (ENXIO); err = ENXIO; +#ifdef DEV_ACPI + err = uart_cpu_acpi_probe(&class, &bst, &bsh, &br, &rclk, &shift); +#endif #ifdef FDT - err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk, &shift); + if (err != 0) { + err = uart_cpu_fdt_probe(&class, &bst, &bsh, &br, &rclk, + &shift); + } #endif if (err != 0) return (err); Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Mon Nov 21 19:26:22 2016 (r308937) +++ head/sys/dev/uart/uart_dev_pl011.c Mon Nov 21 19:26:58 2016 (r308938) @@ -38,15 +38,18 @@ __FBSDID("$FreeBSD$"); #include #include -#ifdef DEV_ACPI -#include -#endif #ifdef FDT #include #endif #include #include "uart_if.h" +#ifdef DEV_ACPI +#include +#include +#include +#endif + #include /* PL011 UART registers and masks*/ @@ -296,8 +299,8 @@ UART_FDT_CLASS_AND_DEVICE(compat_data); #ifdef DEV_ACPI static struct acpi_uart_compat_data acpi_compat_data[] = { - {"ARMH0011", &uart_pl011_class}, - {NULL, NULL}, + {"ARMH0011", &uart_pl011_class, ACPI_DBG2_ARM_PL011}, + {NULL, NULL, 0}, }; UART_ACPI_CLASS_AND_DEVICE(acpi_compat_data); #endif From owner-svn-src-head@freebsd.org Mon Nov 21 19:38:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF53CC4DAA9; Mon, 21 Nov 2016 19:38:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7ED90E18; Mon, 21 Nov 2016 19:38:58 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJcvuR018565; Mon, 21 Nov 2016 19:38:57 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJcv0W018562; Mon, 21 Nov 2016 19:38:57 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611211938.uALJcv0W018562@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Mon, 21 Nov 2016 19:38:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308939 - head/sys/dev/uart X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:38:58 -0000 Author: andrew Date: Mon Nov 21 19:38:57 2016 New Revision: 308939 URL: https://svnweb.freebsd.org/changeset/base/308939 Log: Include the missing accommon.h from the ACPI uart code. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/dev/uart/uart_cpu_arm64.c head/sys/dev/uart/uart_dev_pl011.c Modified: head/sys/dev/uart/uart_cpu_arm64.c ============================================================================== --- head/sys/dev/uart/uart_cpu_arm64.c Mon Nov 21 19:26:58 2016 (r308938) +++ head/sys/dev/uart/uart_cpu_arm64.c Mon Nov 21 19:38:57 2016 (r308939) @@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ACPI #include +#include #include #include #endif Modified: head/sys/dev/uart/uart_dev_pl011.c ============================================================================== --- head/sys/dev/uart/uart_dev_pl011.c Mon Nov 21 19:26:58 2016 (r308938) +++ head/sys/dev/uart/uart_dev_pl011.c Mon Nov 21 19:38:57 2016 (r308939) @@ -47,6 +47,7 @@ __FBSDID("$FreeBSD$"); #ifdef DEV_ACPI #include #include +#include #include #endif From owner-svn-src-head@freebsd.org Mon Nov 21 19:43:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F46DC4DCC9; Mon, 21 Nov 2016 19:43:03 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B9B45124D; Mon, 21 Nov 2016 19:43:02 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJh1wK022383; Mon, 21 Nov 2016 19:43:01 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJh1px022382; Mon, 21 Nov 2016 19:43:01 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611211943.uALJh1px022382@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 21 Nov 2016 19:43:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308940 - head/sys/dev/gpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:43:03 -0000 Author: gonzo Date: Mon Nov 21 19:43:01 2016 New Revision: 308940 URL: https://svnweb.freebsd.org/changeset/base/308940 Log: [bytgpio] prepare bytgpio(4) for modularization - Add detach method - module should depend on gpiobus, not gpio Modified: head/sys/dev/gpio/bytgpio.c Modified: head/sys/dev/gpio/bytgpio.c ============================================================================== --- head/sys/dev/gpio/bytgpio.c Mon Nov 21 19:38:57 2016 (r308939) +++ head/sys/dev/gpio/bytgpio.c Mon Nov 21 19:43:01 2016 (r308940) @@ -86,6 +86,7 @@ struct bytgpio_softc { static int bytgpio_probe(device_t dev); static int bytgpio_attach(device_t dev); +static int bytgpio_detach(device_t dev); #define SCORE_UID 1 #define SCORE_BANK_PREFIX "GPIO_S0_SC" @@ -567,6 +568,8 @@ bytgpio_attach(device_t dev) return (ENXIO); } + BYTGPIO_LOCK_INIT(sc); + switch (uid) { case SCORE_UID: sc->sc_npins = SCORE_PINS; @@ -599,8 +602,6 @@ bytgpio_attach(device_t dev) goto error; } - BYTGPIO_LOCK_INIT(sc); - for (pin = 0; pin < sc->sc_npins; pin++) { reg = BYGPIO_PIN_REGISTER(sc, pin, BYTGPIO_PCONF0); val = bytgpio_read_4(sc, reg); @@ -618,13 +619,39 @@ bytgpio_attach(device_t dev) return (0); error: + BYTGPIO_LOCK_DESTROY(sc); + return (ENXIO); } + +static int +bytgpio_detach(device_t dev) +{ + struct bytgpio_softc *sc; + + sc = device_get_softc(dev); + + if (sc->sc_busdev) + gpiobus_detach_bus(dev); + + BYTGPIO_LOCK_DESTROY(sc); + + if (sc->sc_pad_funcs) + free(sc->sc_pad_funcs, M_DEVBUF); + + if (sc->sc_mem_res != NULL) + bus_release_resource(dev, SYS_RES_MEMORY, + sc->sc_mem_rid, sc->sc_mem_res); + + return (0); +} + static device_method_t bytgpio_methods[] = { /* Device interface */ DEVMETHOD(device_probe, bytgpio_probe), DEVMETHOD(device_attach, bytgpio_attach), + DEVMETHOD(device_detach, bytgpio_detach), /* GPIO protocol */ DEVMETHOD(gpio_get_bus, bytgpio_get_bus), @@ -649,4 +676,4 @@ static driver_t bytgpio_driver = { static devclass_t bytgpio_devclass; DRIVER_MODULE(bytgpio, acpi, bytgpio_driver, bytgpio_devclass, 0, 0); MODULE_DEPEND(bytgpio, acpi, 1, 1, 1); -MODULE_DEPEND(bytgpio, gpio, 1, 1, 1); +MODULE_DEPEND(bytgpio, gpiobus, 1, 1, 1); From owner-svn-src-head@freebsd.org Mon Nov 21 19:46:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92A9AC4DD7B; Mon, 21 Nov 2016 19:46:11 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6DF74144E; Mon, 21 Nov 2016 19:46:11 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJkAaN022579; Mon, 21 Nov 2016 19:46:10 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJkAV9022577; Mon, 21 Nov 2016 19:46:10 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611211946.uALJkAV9022577@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 21 Nov 2016 19:46:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308941 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:46:11 -0000 Author: gonzo Date: Mon Nov 21 19:46:10 2016 New Revision: 308941 URL: https://svnweb.freebsd.org/changeset/base/308941 Log: [bytgpio] Add bytgpio(4) man page with general description of the driver MFC after: 3 days Added: head/share/man/man4/bytgpio.4 (contents, props changed) Modified: head/share/man/man4/Makefile Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Mon Nov 21 19:43:01 2016 (r308940) +++ head/share/man/man4/Makefile Mon Nov 21 19:46:10 2016 (r308941) @@ -86,6 +86,7 @@ MAN= aac.4 \ bt.4 \ bwi.4 \ bwn.4 \ + ${_bytgpio.4} \ capsicum.4 \ cardbus.4 \ carp.4 \ @@ -774,6 +775,7 @@ _amdsmb.4= amdsmb.4 _amdtemp.4= amdtemp.4 _asmc.4= asmc.4 _bxe.4= bxe.4 +_bytgpio.4= bytgpio.4 _coretemp.4= coretemp.4 _cpuctl.4= cpuctl.4 _dpms.4= dpms.4 Added: head/share/man/man4/bytgpio.4 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/share/man/man4/bytgpio.4 Mon Nov 21 19:46:10 2016 (r308941) @@ -0,0 +1,55 @@ +.\" Copyright (c) 2016 +.\" Oleksandr Tymoshenko . All rights reserved. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd November 20, 2016 +.Dt BYTGPIO 4 +.Os +.Sh NAME +.Nm bytgpio +.Nd Intel Bay Trail SoC GPIO controller +.Sh SYNOPSIS +.Cd "device gpio" +.Cd "device bytgpio" +.Sh DESCRIPTION +The +.Nm +is a driver for GPIO controller that can be found in Intel's Bay Trail SoC family. +.Pp +Bay Trail SoC has three banks of GPIO pins exposed to userland as /dev/gpiocN, +where N is 0, 1, and 2. Pins in each bank are pre-named to match names +on boards schematics: GPIO_S0_SCnn, GPIO_S0_NCnn, and GPIO_S5_nn. +.Sh SEE ALSO +.Xr gpio 3 , +.Xr gpio 4 , +.Xr gpioctl 8 +.Sh HISTORY +The +.Nm +manual page first appeared in +.Fx 12.0 . +.Sh AUTHORS +This driver and man page was written by +.An Oleksandr Tymoshenko Aq Mt gonzo@FreeBSD.org . From owner-svn-src-head@freebsd.org Mon Nov 21 19:47:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7665EC4DE16; Mon, 21 Nov 2016 19:47:38 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 431201645; Mon, 21 Nov 2016 19:47:38 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALJlbXl022692; Mon, 21 Nov 2016 19:47:37 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALJlbDd022690; Mon, 21 Nov 2016 19:47:37 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611211947.uALJlbDd022690@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Mon, 21 Nov 2016 19:47:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308942 - in head/sys/modules: . bytgpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:47:38 -0000 Author: gonzo Date: Mon Nov 21 19:47:37 2016 New Revision: 308942 URL: https://svnweb.freebsd.org/changeset/base/308942 Log: [bytgpio] Add module for bytgpio(4) MFC after: 3 days Added: head/sys/modules/bytgpio/ head/sys/modules/bytgpio/Makefile (contents, props changed) Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Mon Nov 21 19:46:10 2016 (r308941) +++ head/sys/modules/Makefile Mon Nov 21 19:47:37 2016 (r308942) @@ -63,6 +63,7 @@ SUBDIR= \ bwi \ bwn \ bwn_pci \ + ${_bytgpio} \ cam \ ${_canbepm} \ ${_canbus} \ @@ -551,6 +552,7 @@ _an= an _aout= aout _bktr= bktr _bxe= bxe +_bytgpio= bytgpio _cardbus= cardbus _cbb= cbb _cpuctl= cpuctl Added: head/sys/modules/bytgpio/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/modules/bytgpio/Makefile Mon Nov 21 19:47:37 2016 (r308942) @@ -0,0 +1,8 @@ +# $FreeBSD$ + +.PATH: ${.CURDIR}/../../dev/gpio +KMOD= bytgpio +SRCS= bytgpio.c +SRCS+= device_if.h bus_if.h gpio_if.h + +.include From owner-svn-src-head@freebsd.org Mon Nov 21 19:50:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 105C6C4DEB6 for ; Mon, 21 Nov 2016 19:50:37 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x231.google.com (mail-it0-x231.google.com [IPv6:2607:f8b0:4001:c0b::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 CD7841842 for ; Mon, 21 Nov 2016 19:50:36 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x231.google.com with SMTP id c20so405244itb.0 for ; Mon, 21 Nov 2016 11:50:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=MzVYMt/CTYEisqV4FB3W+JZAO/qtlqRwsj5KgAv+6jk=; b=IAOlAPPdKNwndAWjTqQr6bkODW+nXt9L5YG5WdUgCUPFxa5M7BBFCCKu4AsrFUSR0R W0QJWf+xZMQM0niIQRtYHWXJXvrz71kJZNckvXXwrC/dzBvGtz5I87krwVw+dXxYQmtF D7T72kggDedAwhXRLsKSUpqTGsaRe6RB/N8f+OIdIUznxb/RZ7ZfQs8phxkKmj3yJHRf xXshfPfsK4sNbWITQ009py2bw7TfFOX09Uehl0g0VxePaJWReqTSC5NmN0gLqhPrja1H DQ0jjG35JrYHNjRIW5F1Hr1RxTq1eQcJoBQtI4jwQJGRhe2qk30wEdQetqxysOuJhOaZ 454w== 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; bh=MzVYMt/CTYEisqV4FB3W+JZAO/qtlqRwsj5KgAv+6jk=; b=bYfuvns4COqMR2ALDaxBH0CFQjGs5CuuTx2I/1RT7ZVE1BQZ5rT7QL3zfj3hk6WGbg /PuGtGhjCfY5KDs9ORqA1+qft4UsKduQzTee19LKbU4CgkiTXpt6A4lo7e/3Til3kGc9 2/DPi/fhI0gD5cHnj0ioO7hWJ7quwG+1I7T66p1M3EZguP3lqoplf/QngERZVEOhs42n Zo5r2KJdw2Q0dUhgs7UM8l8TO1hakiJvuGSNuPEkxCbwKtJsU1pqIKDxWOkZ4zHlcsZH IMRviK/mHy+CyHlt2gVcHuGh+5p5Q2t/5b43tPKDbsJbOcponDqUR2chubJ/GBKPmVC+ nREw== X-Gm-Message-State: AKaTC03J2sKPdgVFvgDCrQw1g1uXxAXClQ0zTatOExmh65H82SrGFXHaHza0ugY1Dyaoota2jyP1rOKv2bSOlg== X-Received: by 10.36.5.208 with SMTP id 199mr10806521itl.103.1479757836189; Mon, 21 Nov 2016 11:50:36 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.66 with HTTP; Mon, 21 Nov 2016 11:50:35 -0800 (PST) X-Originating-IP: [69.53.245.200] In-Reply-To: <123365400.XYmKG93e4H@ralph.baldwin.cx> References: <201611192146.uAJLkDP5094317@repo.freebsd.org> <123365400.XYmKG93e4H@ralph.baldwin.cx> From: Warner Losh Date: Mon, 21 Nov 2016 12:50:35 -0700 X-Google-Sender-Auth: 0wTj0FXnCHw2JDsOjh3rsbFNyv0 Message-ID: Subject: Re: svn commit: r308869 - head/sbin/nvmecontrol To: John Baldwin Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 19:50:37 -0000 On Mon, Nov 21, 2016 at 11:07 AM, John Baldwin wrote: > On Saturday, November 19, 2016 09:46:13 PM Warner Losh wrote: >> Author: imp >> Date: Sat Nov 19 21:46:13 2016 >> New Revision: 308869 >> URL: https://svnweb.freebsd.org/changeset/base/308869 >> >> Log: >> i386 turns out to not have __uint128_t. So confusingly use 64-bit math >> instead. Since we're little endian, we can get away with it. Also, >> since the counters in quesitons would require billions of iops for >> tens of billions of seconds to overflow, and since such data rates are >> unlikely for people using i386 for a while, that's OK. The fastest >> cards today can't do even a million IOPs. >> >> Noticed by: dim@ >> Sponsored by: Netflix, Inc > > It probably has it if you compile with -march= where is new > enough to have SSE. Yea, but this solution was good enough... There's also a lot of issues with 128bit ints in different versions of gcc and I didn't want to play the whack-a-mole game, so I punted. > Is nvme inherently x86-only? No. However, the implementation was done by Intel, only tested on x86 and has known issues with endian-ness. So we build only on x86. Warner From owner-svn-src-head@freebsd.org Mon Nov 21 20:17:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 44DFCC4D645; Mon, 21 Nov 2016 20:17:43 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 222758B0; Mon, 21 Nov 2016 20:17:42 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id C31C710AA1D; Mon, 21 Nov 2016 15:17:34 -0500 (EST) From: John Baldwin To: Warner Losh Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Subject: Re: svn commit: r308869 - head/sbin/nvmecontrol Date: Mon, 21 Nov 2016 12:16:35 -0800 Message-ID: <2066039.9u44RCLHQT@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: References: <201611192146.uAJLkDP5094317@repo.freebsd.org> <123365400.XYmKG93e4H@ralph.baldwin.cx> 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.4.3 (mail.baldwin.cx); Mon, 21 Nov 2016 15:17:34 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 20:17:43 -0000 On Monday, November 21, 2016 12:50:35 PM Warner Losh wrote: > On Mon, Nov 21, 2016 at 11:07 AM, John Baldwin wrote: > > On Saturday, November 19, 2016 09:46:13 PM Warner Losh wrote: > >> Author: imp > >> Date: Sat Nov 19 21:46:13 2016 > >> New Revision: 308869 > >> URL: https://svnweb.freebsd.org/changeset/base/308869 > >> > >> Log: > >> i386 turns out to not have __uint128_t. So confusingly use 64-bit math > >> instead. Since we're little endian, we can get away with it. Also, > >> since the counters in quesitons would require billions of iops for > >> tens of billions of seconds to overflow, and since such data rates are > >> unlikely for people using i386 for a while, that's OK. The fastest > >> cards today can't do even a million IOPs. > >> > >> Noticed by: dim@ > >> Sponsored by: Netflix, Inc > > > > It probably has it if you compile with -march= where is new > > enough to have SSE. > > Yea, but this solution was good enough... There's also a lot of issues > with 128bit ints in different versions of gcc and I didn't want to > play the whack-a-mole game, so I punted. Yes. We don't require SSE for i386, so we're stuck handling the non-SSE case currently. > > Is nvme inherently x86-only? > > No. However, the implementation was done by Intel, only tested on x86 > and has known issues with endian-ness. So we build only on x86. Something of a shame as you can probably shove one of these boards in arm64 servers. -- John Baldwin From owner-svn-src-head@freebsd.org Mon Nov 21 20:29:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82E1EC4D9E5 for ; Mon, 21 Nov 2016 20:29:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x230.google.com (mail-io0-x230.google.com [IPv6:2607:f8b0:4001:c06::230]) (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 434C5F5A for ; Mon, 21 Nov 2016 20:29:05 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x230.google.com with SMTP id j65so50309663iof.0 for ; Mon, 21 Nov 2016 12:29:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=s39OwUJhkv3sooLdKzVNtztlRcjZgnstfV6P0hlAzlo=; b=VrBN1bTHNEii0oSZMbbzIznGYcN0ANwB8SI9auFzeKMXJgryqxnuLt4mcmn9sIjKFH w87dvZHPniNDFmkLhpHyo7qmHD/e6zZd2FfxYWwgXOQYeCjSxCrETgCd2MOQqA/KpaO6 MpJKF4AfYwx7dUZxrn75cZKEVw56f+JXEAAVLAVGiAHaIlkAGY2bnuBJuKPYOyNA+3WQ QSoRA/R/v//ToWN/DzPdiReG/fESMhVbZu28wptP7JBHrnIUKzcvUEvW1RqB4uFLaY0S EsDphkUDRBjPDoBoy5FqTZDcsH1xeZRZRIFVmTBhTH8Mk/ZHP01AyyF8x2/QSIbSrixf yncQ== 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; bh=s39OwUJhkv3sooLdKzVNtztlRcjZgnstfV6P0hlAzlo=; b=kEiXWFFWcIkUxOq3S3MJKZAih6jEuXVTUGeK45MvaOmgbJp9J+sP8ilibycWVeqSzb 1EJSP4cd7bWZZGgIFEezD4cNfl1CwNkBttdQUOFVTa8mJPREHoNwD7x8d3e/fyDUkewj LqNxmH+5Di++Ql9E1CiD0w6DWcwBQLNYCRAGsFC+9NsfRqQ7Db0i+JqeBBAEe7zpzkaf 2CDCW2BihqJwjLwdpkDrjKIKGYgGcteIC9VXcdNIU/k+Je5KSQPzm0PWWbE6MAjvAqmW ZIqaEYHAHuMEOVnPYk74YqyzjpQWb7fNxpk36p+aGimOumA13erqYeU6vQ5qE0iWK4x1 GNVg== X-Gm-Message-State: AKaTC00OUPuI6ZTIAQjK8oCH5opO4sJeFnReadFVNuVmPnixTRBZZW5YXtr4ZjDf9FbgameHIZlDaxR1fNTrzg== X-Received: by 10.107.139.74 with SMTP id n71mr14746550iod.166.1479760144582; Mon, 21 Nov 2016 12:29:04 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.66 with HTTP; Mon, 21 Nov 2016 12:29:04 -0800 (PST) X-Originating-IP: [50.253.99.174] In-Reply-To: <2066039.9u44RCLHQT@ralph.baldwin.cx> References: <201611192146.uAJLkDP5094317@repo.freebsd.org> <123365400.XYmKG93e4H@ralph.baldwin.cx> <2066039.9u44RCLHQT@ralph.baldwin.cx> From: Warner Losh Date: Mon, 21 Nov 2016 13:29:04 -0700 X-Google-Sender-Auth: Scq4mA8NXoaQ7oZ6-kWPcLywjHM Message-ID: Subject: Re: svn commit: r308869 - head/sbin/nvmecontrol To: John Baldwin Cc: Warner Losh , src-committers , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 20:29:05 -0000 On Mon, Nov 21, 2016 at 1:16 PM, John Baldwin wrote: > On Monday, November 21, 2016 12:50:35 PM Warner Losh wrote: >> On Mon, Nov 21, 2016 at 11:07 AM, John Baldwin wrote: >> > On Saturday, November 19, 2016 09:46:13 PM Warner Losh wrote: >> >> Author: imp >> >> Date: Sat Nov 19 21:46:13 2016 >> >> New Revision: 308869 >> >> URL: https://svnweb.freebsd.org/changeset/base/308869 >> >> >> >> Log: >> >> i386 turns out to not have __uint128_t. So confusingly use 64-bit math >> >> instead. Since we're little endian, we can get away with it. Also, >> >> since the counters in quesitons would require billions of iops for >> >> tens of billions of seconds to overflow, and since such data rates are >> >> unlikely for people using i386 for a while, that's OK. The fastest >> >> cards today can't do even a million IOPs. >> >> >> >> Noticed by: dim@ >> >> Sponsored by: Netflix, Inc >> > >> > It probably has it if you compile with -march= where is new >> > enough to have SSE. >> >> Yea, but this solution was good enough... There's also a lot of issues >> with 128bit ints in different versions of gcc and I didn't want to >> play the whack-a-mole game, so I punted. > > Yes. We don't require SSE for i386, so we're stuck handling the non-SSE > case currently. Yea, this is fine. >> > Is nvme inherently x86-only? >> >> No. However, the implementation was done by Intel, only tested on x86 >> and has known issues with endian-ness. So we build only on x86. > > Something of a shame as you can probably shove one of these boards in > arm64 servers. No doubt. arm64 wouldn't be super hard, assuming that all the BUSDMA stuff got done correctly and there's no weird alignment issues with the crazy structures that nvme defines... Warner From owner-svn-src-head@freebsd.org Mon Nov 21 20:53:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72781C4D057; Mon, 21 Nov 2016 20:53:12 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3A23F1DC9; Mon, 21 Nov 2016 20:53:12 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALKrBio050030; Mon, 21 Nov 2016 20:53:11 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALKrBET050029; Mon, 21 Nov 2016 20:53:11 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201611212053.uALKrBET050029@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 21 Nov 2016 20:53:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308943 - head/sys/netinet X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 20:53:12 -0000 Author: hiren Date: Mon Nov 21 20:53:11 2016 New Revision: 308943 URL: https://svnweb.freebsd.org/changeset/base/308943 Log: For RTT calculations mid-session, we explicitly ignore ACKs with tsecr of 0 as many borken middle-boxes tend to do that. But during 3whs, in syncache_expand(), we don't do that which causes us to send a RST to such a client. Relax this constraint by only using tsecr to compare against timestamp that we sent when it is not 0. As a result, we'd now accept the final ACK of 3whs with tsecr of 0. Reviewed by: jtl, gnn Sponsored by: Limelight Networks Differential Revision: https://reviews.freebsd.org/D8552 Modified: head/sys/netinet/tcp_syncache.c Modified: head/sys/netinet/tcp_syncache.c ============================================================================== --- head/sys/netinet/tcp_syncache.c Mon Nov 21 19:47:37 2016 (r308942) +++ head/sys/netinet/tcp_syncache.c Mon Nov 21 20:53:11 2016 (r308943) @@ -1069,10 +1069,17 @@ syncache_expand(struct in_conninfo *inc, } /* - * If timestamps were negotiated the reflected timestamp - * must be equal to what we actually sent in the SYN|ACK. + * If timestamps were negotiated, the reflected timestamp + * must be equal to what we actually sent in the SYN|ACK + * except in the case of 0. Some boxes are known for sending + * broken timestamp replies during the 3whs (and potentially + * during the connection also). + * + * Accept the final ACK of 3whs with reflected timestamp of 0 + * instead of sending a RST and deleting the syncache entry. */ - if ((to->to_flags & TOF_TS) && to->to_tsecr != sc->sc_ts) { + if ((to->to_flags & TOF_TS) && to->to_tsecr && + to->to_tsecr != sc->sc_ts) { if ((s = tcp_log_addrs(inc, th, NULL, NULL))) log(LOG_DEBUG, "%s; %s: TSECR %u != TS %u, " "segment rejected\n", From owner-svn-src-head@freebsd.org Mon Nov 21 21:07:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79CB5C4D53A; Mon, 21 Nov 2016 21:07:44 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4A1168B8; Mon, 21 Nov 2016 21:07:44 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALL7hug054564; Mon, 21 Nov 2016 21:07:43 GMT (envelope-from hiren@FreeBSD.org) Received: (from hiren@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALL7hHB054563; Mon, 21 Nov 2016 21:07:43 GMT (envelope-from hiren@FreeBSD.org) Message-Id: <201611212107.uALL7hHB054563@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hiren set sender to hiren@FreeBSD.org using -f From: Hiren Panchasara Date: Mon, 21 Nov 2016 21:07:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308944 - head/sys/modules/bytgpio X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 21:07:44 -0000 Author: hiren Date: Mon Nov 21 21:07:43 2016 New Revision: 308944 URL: https://svnweb.freebsd.org/changeset/base/308944 Log: r308942 broke kernel build. Add acpi_if.h to module makefile to fix it. Submitted by: peter Modified: head/sys/modules/bytgpio/Makefile Modified: head/sys/modules/bytgpio/Makefile ============================================================================== --- head/sys/modules/bytgpio/Makefile Mon Nov 21 20:53:11 2016 (r308943) +++ head/sys/modules/bytgpio/Makefile Mon Nov 21 21:07:43 2016 (r308944) @@ -3,6 +3,6 @@ .PATH: ${.CURDIR}/../../dev/gpio KMOD= bytgpio SRCS= bytgpio.c -SRCS+= device_if.h bus_if.h gpio_if.h +SRCS+= acpi_if.h device_if.h bus_if.h gpio_if.h .include From owner-svn-src-head@freebsd.org Mon Nov 21 21:20:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CECFC4D9B8; Mon, 21 Nov 2016 21:20:42 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from mail.strugglingcoder.info (strugglingcoder.info [104.236.146.68]) by mx1.freebsd.org (Postfix) with ESMTP id 62288143; Mon, 21 Nov 2016 21:20:42 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from localhost (unknown [10.1.1.3]) (Authenticated sender: hiren@strugglingcoder.info) by mail.strugglingcoder.info (Postfix) with ESMTPA id DD76317EF3; Mon, 21 Nov 2016 13:20:35 -0800 (PST) Date: Mon, 21 Nov 2016 13:20:35 -0800 From: Hiren Panchasara To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308943 - head/sys/netinet Message-ID: <20161121212035.GC55731@strugglingcoder.info> References: <201611212053.uALKrBET050029@repo.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="E/DnYTRukya0zdZ1" Content-Disposition: inline In-Reply-To: <201611212053.uALKrBET050029@repo.freebsd.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 21:20:42 -0000 --E/DnYTRukya0zdZ1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Forgot to tag for MFC. On 11/21/16 at 08:53P, Hiren Panchasara wrote: > Author: hiren > Date: Mon Nov 21 20:53:11 2016 > New Revision: 308943 > URL: https://svnweb.freebsd.org/changeset/base/308943 >=20 > Log: > For RTT calculations mid-session, we explicitly ignore ACKs with tsecr = of 0 as > many borken middle-boxes tend to do that. But during 3whs, in syncache_= expand(), > we don't do that which causes us to send a RST to such a client. Relax = this > constraint by only using tsecr to compare against timestamp that we sen= t when it > is not 0. As a result, we'd now accept the final ACK of 3whs with tsecr= of 0. > =20 > Reviewed by: jtl, gnn > Sponsored by: Limelight Networks > Differential Revision: https://reviews.freebsd.org/D8552 MFC after: 2 weeks Cheers, Hiren --E/DnYTRukya0zdZ1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQF8BAABCgBmBQJYM2UhXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXRBNEUyMEZBMUQ4Nzg4RjNGMTdFNjZGMDI4 QjkyNTBFMTU2M0VERkU1AAoJEIuSUOFWPt/lfM0H/0EHF0rw5CcNDomA+1PqAKWa bQIDMmcM6XEY17atxBvDNVu6pIQjX+ORf1Bo9bZm4jXS19kOfWgVwM7LE1o36Xzx aSYG74yyR1uy7811Tl8J0R/VsR6UmrPTSL/M6iro1/uHiqxkvsrcQjg9tD30udJq LfnYgWMVtsF7+lhNMtE9x6SeXB6HKOMifqxHMRT27vwNfblqcXJIWAOsQxqwitrA /7YBT6t9EALRvCnAxBWgcaUYNf6GDIENqhb8Qf4bfLwj2wRZiTRIuF/B77NOrYyx 41m9cvuAclrVWA9+Pur6CxtDNpsYcv1D3EINRr8+MSv72WrbDiNfY88Q8HUxv4w= =Qssf -----END PGP SIGNATURE----- --E/DnYTRukya0zdZ1-- From owner-svn-src-head@freebsd.org Mon Nov 21 22:45:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3CAF6C4D458; Mon, 21 Nov 2016 22:45:53 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24B7A1857; Mon, 21 Nov 2016 22:45:52 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [208.184.220.60] (helo=[10.112.202.252]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1c8wfc-000Dde-AF; Mon, 21 Nov 2016 14:02:36 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308944 - head/sys/modules/bytgpio From: Oleksandr Tymoshenko In-Reply-To: <201611212107.uALL7hHB054563@repo.freebsd.org> Date: Mon, 21 Nov 2016 14:02:05 -0800 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: 7bit Message-Id: <0CB45E20-95FF-435C-BC64-C91076B19EBB@bluezbox.com> References: <201611212107.uALL7hHB054563@repo.freebsd.org> To: Hiren Panchasara X-Mailer: Apple Mail (2.3251) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Nov 21, 2016, at 1:07 PM, Hiren Panchasara wrote: > > Author: hiren > Date: Mon Nov 21 21:07:43 2016 > New Revision: 308944 > URL: https://svnweb.freebsd.org/changeset/base/308944 > > Log: > r308942 broke kernel build. > Add acpi_if.h to module makefile to fix it. > > Submitted by: peter [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 22:45:53 -0000 > On Nov 21, 2016, at 1:07 PM, Hiren Panchasara wrote: > > Author: hiren > Date: Mon Nov 21 21:07:43 2016 > New Revision: 308944 > URL: https://svnweb.freebsd.org/changeset/base/308944 > > Log: > r308942 broke kernel build. > Add acpi_if.h to module makefile to fix it. > > Submitted by: peter Thanks. Sorry for breaking the build. From owner-svn-src-head@freebsd.org Mon Nov 21 23:29:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2C0AC4DDFB; Mon, 21 Nov 2016 23:29:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 757C1CE9; Mon, 21 Nov 2016 23:29:30 +0000 (UTC) (envelope-from gjb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uALNTTWB013653; Mon, 21 Nov 2016 23:29:29 GMT (envelope-from gjb@FreeBSD.org) Received: (from gjb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uALNTSY9013641; Mon, 21 Nov 2016 23:29:28 GMT (envelope-from gjb@FreeBSD.org) Message-Id: <201611212329.uALNTSY9013641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gjb set sender to gjb@FreeBSD.org using -f From: Glen Barber Date: Mon, 21 Nov 2016 23:29:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308945 - head/release/packages X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Nov 2016 23:29:30 -0000 Author: gjb Date: Mon Nov 21 23:29:28 2016 New Revision: 308945 URL: https://svnweb.freebsd.org/changeset/base/308945 Log: Set the 'vital' flag on the runtime and jail packages. The default pkg(8) from pkg.freebsd.org requires libjail.so, so mark the jail package as vital along with the runtime package to avoid errors when libjail.so is removed. This is a no-op for systems with WITHOUT_JAIL in src.conf(5) and pkg(8) built from the Ports Collection. In order to make this work without marking packages such as the jail-lib32, for example, the jail.ucl file needed to be split out into separate files similarly to the runtime-*.ucl files. Glanced at by: brd MFC after: 5 days Sponsored by: The FreeBSD Foundation Added: head/release/packages/jail-debug.ucl (contents, props changed) head/release/packages/jail-development.ucl (contents, props changed) head/release/packages/jail-lib32-debug.ucl (contents, props changed) head/release/packages/jail-lib32-development.ucl (contents, props changed) head/release/packages/jail-lib32-profile.ucl (contents, props changed) head/release/packages/jail-lib32.ucl (contents, props changed) head/release/packages/jail-profile.ucl (contents, props changed) Modified: head/release/packages/Makefile.package head/release/packages/generate-ucl.sh head/release/packages/jail.ucl head/release/packages/runtime.ucl Modified: head/release/packages/Makefile.package ============================================================================== --- head/release/packages/Makefile.package Mon Nov 21 21:07:43 2016 (r308944) +++ head/release/packages/Makefile.package Mon Nov 21 23:29:28 2016 (r308945) @@ -40,6 +40,13 @@ hast_COMMENT= Highly Available Storage hast_DESC= Highly Available Storage daemon jail_COMMENT= Jail Utilities jail_DESC= Jail Utilities +jail-debug_DESCR= Debugging Symbols +jail-development_DESCR=Development Files +jail-profile_DESCR= Profiling Libraries +jail-lib32_DESCR= 32-bit Libraries +jail-lib32-debug_DESCR=32-bit Debugging Symbols +jail-lib32-development_DESCR=32-bit Development Files +jail-lib32-profile_DESCR=32-bit Profiling Libraries kernel_COMMENT= FreeBSD Kernel kernel_DESC= FreeBSD Kernel manuals_COMMENT= Manual Pages Modified: head/release/packages/generate-ucl.sh ============================================================================== --- head/release/packages/generate-ucl.sh Mon Nov 21 21:07:43 2016 (r308944) +++ head/release/packages/generate-ucl.sh Mon Nov 21 23:29:28 2016 (r308945) @@ -48,6 +48,12 @@ main() { pkgdeps="runtime" _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" ;; + jail_*) + outname="${origname}" + uclfile="${outname##*}${uclfile}" + pkgdeps="runtime" + _descr="$(make -C ${srctree}/release/packages -f Makefile.package -V ${outname}_DESCR)" + ;; *_lib32_development) outname="${outname%%_lib32_development}" _descr="32-bit Libraries, Development Files" Added: head/release/packages/jail-debug.ucl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/release/packages/jail-debug.ucl Mon Nov 21 23:29:28 2016 (r308945) @@ -0,0 +1,24 @@ +# +# $FreeBSD$ +# + +name = "FreeBSD-%PKGNAME%" +origin = "base" +version = "%VERSION%" +comment = "%COMMENT%" +categories = [ base ] +maintainer = "re@FreeBSD.org" +www = "https://www.FreeBSD.org" +prefix = "/" +licenselogic = "single" +licenses = [ BSD2CLAUSE ] +desc = < Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52862C4D342; Tue, 22 Nov 2016 00:41:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24664DF9; Tue, 22 Nov 2016 00:41:26 +0000 (UTC) (envelope-from rwatson@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM0fPPR043072; Tue, 22 Nov 2016 00:41:25 GMT (envelope-from rwatson@FreeBSD.org) Received: (from rwatson@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM0fP4n043070; Tue, 22 Nov 2016 00:41:25 GMT (envelope-from rwatson@FreeBSD.org) Message-Id: <201611220041.uAM0fP4n043070@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rwatson set sender to rwatson@FreeBSD.org using -f From: Robert Watson Date: Tue, 22 Nov 2016 00:41:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308947 - in head/sys: kern security/audit X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 00:41:26 -0000 Author: rwatson Date: Tue Nov 22 00:41:24 2016 New Revision: 308947 URL: https://svnweb.freebsd.org/changeset/base/308947 Log: Audit 'fd' and 'cmd' arguments to fcntl(2), and when generating BSM, always audit the file-descriptor number and vnode information for all fnctl(2) commands, not just locking-related ones. This was likely an oversight in the original adaptation of this code from XNU. MFC after: 3 days Sponsored by: DARPA, AFRL Modified: head/sys/kern/kern_descrip.c head/sys/security/audit/audit_bsm.c Modified: head/sys/kern/kern_descrip.c ============================================================================== --- head/sys/kern/kern_descrip.c Tue Nov 22 00:27:19 2016 (r308946) +++ head/sys/kern/kern_descrip.c Tue Nov 22 00:41:24 2016 (r308947) @@ -495,6 +495,8 @@ kern_fcntl(struct thread *td, int fd, in p = td->td_proc; fdp = p->p_fd; + AUDIT_ARG_FD(cmd); + AUDIT_ARG_CMD(cmd); switch (cmd) { case F_DUPFD: tmp = arg; Modified: head/sys/security/audit/audit_bsm.c ============================================================================== --- head/sys/security/audit/audit_bsm.c Tue Nov 22 00:27:19 2016 (r308946) +++ head/sys/security/audit/audit_bsm.c Tue Nov 22 00:41:24 2016 (r308947) @@ -979,10 +979,7 @@ kaudit_to_bsm(struct kaudit_record *kar, au_fcntl_cmd_to_bsm(ar->ar_arg_cmd)); kau_write(rec, tok); } - if (ar->ar_arg_cmd == F_GETLK || ar->ar_arg_cmd == F_SETLK || - ar->ar_arg_cmd == F_SETLKW) { - FD_VNODE1_TOKENS; - } + FD_VNODE1_TOKENS; break; case AUE_FCHFLAGS: From owner-svn-src-head@freebsd.org Tue Nov 22 00:43:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CB0A0C4D4EB; Tue, 22 Nov 2016 00:43:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 95194115B; Tue, 22 Nov 2016 00:43:16 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id j65so55168813iof.0; Mon, 21 Nov 2016 16:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=/piaGr8ZEZ+IA6iiymtq+i3dWcQbUZoPdFihu4QHPPk=; b=e42lvyGhoo7G0XicsG8eU+2sX2wv73Vxh0ngkJOHAzrPgWkxCcF4R8tDtO5x2AVZZa m8Qi2LdT35+w/9+k3N9FFebIjXSXSZk4Lq2t6x/242EV6VpfMk/aR/4/nNwSMKx46Drw ziulbHMdn6RMi3Nc5Mi1p67rbjyWsAP09b3wZhxIvap4wBm+QYlMJ36Pbg2Rgka8GEcU a45QLQ5LaG1p4vbJi64Aga6qK32RBnQXXZ3OICQE9QTh4ET+cJnAyK5dNCqqGZb56+8q kKKnpTXYzDfGBSCm3zOxkV8GIUD0CThyENIYaEhBGPRGdOITDNXrDFJRLc7yYCjKnwug l4cg== 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:from:date :message-id:subject:to:cc; bh=/piaGr8ZEZ+IA6iiymtq+i3dWcQbUZoPdFihu4QHPPk=; b=DxPa9EDNBx7Ga7pjBSIF+26qFIhBTMaPSb4T4RuAHkDHTLhXBMyF4UiQHVwicJ7Yom U3YSz1RuIHiEdgaYFxRkCqcbj/kPqV7rHARF/kmWwDqsj2n1iXJdPmkBIg8FTd5DS23C RvEga8EkYk+XyWo4BGeUJxNeH3W2zca2BHXyNjeAuXyFHwQv3FDUqRNXDfJY4FfjOcgf hcoso7yFuJDriHjxFsFNF2ETZu1YZnFo7qaATZcEfx33m3bvgvbqw/UTG+XrCNeIhwHr 4b4CGJo8x1EWqGBVKhXvrKLA0nUYC+o+ou4pxlyv0/WbgH3yCWntxrWN/oM17kQfdsCg iPcQ== X-Gm-Message-State: AKaTC01HeywBq/6numFHVU8LlwAZyfZzuY4pli7uQNykMhA+e0dgS75vJUoUMGzIoBo4s0uS1ux4KCPTr/5GNw== X-Received: by 10.107.136.86 with SMTP id k83mr13080749iod.99.1479775395645; Mon, 21 Nov 2016 16:43:15 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.39.134 with HTTP; Mon, 21 Nov 2016 16:43:14 -0800 (PST) In-Reply-To: <201609221241.u8MCfsvv097499@repo.freebsd.org> References: <201609221241.u8MCfsvv097499@repo.freebsd.org> From: Adrian Chadd Date: Mon, 21 Nov 2016 16:43:14 -0800 Message-ID: Subject: Re: svn commit: r306186 - head/sys/kern To: Ruslan Bukin Cc: "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 00:43:16 -0000 Hi, For reference - this breaks sooptcopyin() on MIPS32 BE. Undoing this commit fixes things. :) (it breaks ipfw. ) -adrian On 22 September 2016 at 05:41, Ruslan Bukin wrote: > Author: br > Date: Thu Sep 22 12:41:53 2016 > New Revision: 306186 > URL: https://svnweb.freebsd.org/changeset/base/306186 > > Log: > Adjust the sopt_val pointer on bigendian systems (e.g. MIPS64EB). > > sooptcopyin() checks if size of data provided by user is <= than we can > accept, else it strips down the size. On bigendian platforms we have to > move pointer as well so we copy the actual data. > > Reviewed by: gnn > Sponsored by: DARPA, AFRL > Sponsored by: HEIF5 > Differential Revision: https://reviews.freebsd.org/D7980 > > Modified: > head/sys/kern/uipc_socket.c > > Modified: head/sys/kern/uipc_socket.c > ============================================================================== > --- head/sys/kern/uipc_socket.c Thu Sep 22 12:08:26 2016 (r306185) > +++ head/sys/kern/uipc_socket.c Thu Sep 22 12:41:53 2016 (r306186) > @@ -2455,8 +2455,12 @@ sooptcopyin(struct sockopt *sopt, void * > */ > if ((valsize = sopt->sopt_valsize) < minlen) > return EINVAL; > - if (valsize > len) > + if (valsize > len) { > +#if _BYTE_ORDER == _BIG_ENDIAN > + sopt->sopt_val = (void *)((uintptr_t)sopt->sopt_val + (valsize - len)); > +#endif > sopt->sopt_valsize = valsize = len; > + } > > if (sopt->sopt_td != NULL) > return (copyin(sopt->sopt_val, buf, valsize)); > From owner-svn-src-head@freebsd.org Tue Nov 22 01:03:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9E19C4D8C2; Tue, 22 Nov 2016 01:03:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 922C2199E; Tue, 22 Nov 2016 01:03:00 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM12xYP053182; Tue, 22 Nov 2016 01:02:59 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM12xrq053180; Tue, 22 Nov 2016 01:02:59 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201611220102.uAM12xrq053180@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Tue, 22 Nov 2016 01:02:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308948 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 01:03:01 -0000 Author: jhb Date: Tue Nov 22 01:02:59 2016 New Revision: 308948 URL: https://svnweb.freebsd.org/changeset/base/308948 Log: Initialize 'ticks' earlier in boot after 'hz' is set. This avoids the time-warp after kthreads have started running and the required fixup to td_slptick and td_blktick in the EARLY_AP_STARTUP case. Now, 'ticks' is initialized before any kthreads are created or any context switches are performed. Tested by: gavin MFC after: 2 weeks Sponsored by: Netflix Modified: head/sys/kern/kern_clock.c head/sys/kern/subr_param.c Modified: head/sys/kern/kern_clock.c ============================================================================== --- head/sys/kern/kern_clock.c Tue Nov 22 00:41:24 2016 (r308947) +++ head/sys/kern/kern_clock.c Tue Nov 22 01:02:59 2016 (r308948) @@ -393,10 +393,6 @@ static void initclocks(dummy) void *dummy; { -#ifdef EARLY_AP_STARTUP - struct proc *p; - struct thread *td; -#endif register int i; /* @@ -416,40 +412,6 @@ initclocks(dummy) #ifdef SW_WATCHDOG EVENTHANDLER_REGISTER(watchdog_list, watchdog_config, NULL, 0); #endif - /* - * Arrange for ticks to wrap 10 minutes after boot to help catch - * sign problems sooner. - */ - ticks = INT_MAX - (hz * 10 * 60); - -#ifdef EARLY_AP_STARTUP - /* - * Fixup the tick counts in any blocked or sleeping threads to - * account for the jump above. - */ - sx_slock(&allproc_lock); - FOREACH_PROC_IN_SYSTEM(p) { - PROC_LOCK(p); - if (p->p_state == PRS_NEW) { - PROC_UNLOCK(p); - continue; - } - FOREACH_THREAD_IN_PROC(p, td) { - thread_lock(td); - if (TD_ON_LOCK(td)) { - MPASS(td->td_blktick == 0); - td->td_blktick = ticks; - } - if (TD_ON_SLEEPQ(td)) { - MPASS(td->td_slptick == 0); - td->td_slptick = ticks; - } - thread_unlock(td); - } - PROC_UNLOCK(p); - } - sx_sunlock(&allproc_lock); -#endif } /* Modified: head/sys/kern/subr_param.c ============================================================================== --- head/sys/kern/subr_param.c Tue Nov 22 00:41:24 2016 (r308947) +++ head/sys/kern/subr_param.c Tue Nov 22 01:02:59 2016 (r308948) @@ -171,6 +171,12 @@ init_param1(void) tick_sbt = SBT_1S / hz; tick_bt = sbttobt(tick_sbt); + /* + * Arrange for ticks to wrap 10 minutes after boot to help catch + * sign problems sooner. + */ + ticks = INT_MAX - (hz * 10 * 60); + #ifdef VM_SWZONE_SIZE_MAX maxswzone = VM_SWZONE_SIZE_MAX; #endif From owner-svn-src-head@freebsd.org Tue Nov 22 01:22:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E0ABEC4D8BC; Tue, 22 Nov 2016 01:22:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A39EDA13; Tue, 22 Nov 2016 01:22:55 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM1MsVY060860; Tue, 22 Nov 2016 01:22:54 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM1MsX8060858; Tue, 22 Nov 2016 01:22:54 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611220122.uAM1MsX8060858@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 22 Nov 2016 01:22:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308949 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 01:22:56 -0000 Author: adrian Date: Tue Nov 22 01:22:54 2016 New Revision: 308949 URL: https://svnweb.freebsd.org/changeset/base/308949 Log: [net80211] flesh out more IBSS 11n support * Pepper comments around which describe what state(s) we're in when faking up 11n nodes. * By default don't fake it up as 11n until we properly negotiate the 11n capabilities using probe request/response frames. * Send a probe request with our HT information, as the 802.11-2012 spec suggests. * Reassociate with the driver if we've been promoted. This is done because although learning a peer via beacons can learn 11n state, learning peers via hearing probe frames and broadcast frames does not. Thus, sometimes you end up with an 11n peer in the peer table and sometimes you don't. Note that the probe request/response exchange may not actually succeed. Ideally we'd put the peer into some blocking state until we've exchanged probe request/reponse to learn capabilities, or we timeout and just stay non-11n. This is more an experiment to get 11n IBSS nodes actually discovering each other and be able to transmit. There are other issues that creep up which I'll attempt to address in future commits. Tested: * AR9380 NICs in 11n mode. Reviewed by: avos Differential Revision: https://reviews.freebsd.org/D8365 Modified: head/sys/net80211/ieee80211_adhoc.c head/sys/net80211/ieee80211_node.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Tue Nov 22 01:02:59 2016 (r308948) +++ head/sys/net80211/ieee80211_adhoc.c Tue Nov 22 01:22:54 2016 (r308949) @@ -427,8 +427,12 @@ adhoc_input(struct ieee80211_node *ni, s goto err; } /* - * Fake up a node for this newly - * discovered member of the IBSS. + * Fake up a node for this newly discovered member + * of the IBSS. + * + * Note: This doesn't "upgrade" the node to 11n; + * that will happen after a probe request/response + * exchange. */ ni = ieee80211_fakeup_adhoc_node(vap, wh->i_addr2); if (ni == NULL) { @@ -773,12 +777,35 @@ adhoc_recv_mgmt(struct ieee80211_node *n ni = ieee80211_add_neighbor(vap, wh, &scan); else ni = NULL; + + /* + * Send a probe request so we announce 11n + * capabilities. + */ + ieee80211_send_probereq(ni, /* node */ + vap->iv_myaddr, /* SA */ + ni->ni_macaddr, /* DA */ + vap->iv_bss->ni_bssid, /* BSSID */ + vap->iv_bss->ni_essid, + vap->iv_bss->ni_esslen); /* SSID */ + } else if (ni->ni_capinfo == 0) { /* * Update faked node created on transmit. * Note this also updates the tsf. */ ieee80211_init_neighbor(ni, wh, &scan); + + /* + * Send a probe request so we announce 11n + * capabilities. + */ + ieee80211_send_probereq(ni, /* node */ + vap->iv_myaddr, /* SA */ + ni->ni_macaddr, /* DA */ + vap->iv_bss->ni_bssid, /* BSSID */ + vap->iv_bss->ni_essid, + vap->iv_bss->ni_esslen); /* SSID */ } else { /* * Record tsf for potential resync. @@ -889,6 +916,12 @@ adhoc_recv_mgmt(struct ieee80211_node *n */ ieee80211_send_proberesp(vap, wh->i_addr2, is11bclient(rates, xrates) ? IEEE80211_SEND_LEGACY_11B : 0); + + /* + * Note: we don't benefit from stashing the probe request + * IEs away to use for IBSS negotiation, because we + * typically don't get all of the IEs. + */ break; case IEEE80211_FC0_SUBTYPE_ACTION: Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Tue Nov 22 01:02:59 2016 (r308948) +++ head/sys/net80211/ieee80211_node.c Tue Nov 22 01:22:54 2016 (r308949) @@ -324,10 +324,11 @@ ieee80211_create_ibss(struct ieee80211va struct ieee80211_node *ni; IEEE80211_DPRINTF(vap, IEEE80211_MSG_SCAN, - "%s: creating %s on channel %u%c\n", __func__, + "%s: creating %s on channel %u%c flags 0x%08x\n", __func__, ieee80211_opmode_name[vap->iv_opmode], ieee80211_chan2ieee(ic, chan), - ieee80211_channel_type_char(chan)); + ieee80211_channel_type_char(chan), + chan->ic_flags); ni = ieee80211_alloc_node(&ic->ic_sta, vap, vap->iv_myaddr); if (ni == NULL) { @@ -408,6 +409,14 @@ ieee80211_create_ibss(struct ieee80211va } } + /* XXX TODO: other bits and pieces - eg fast-frames? */ + + /* If we're an 11n channel then initialise the 11n bits */ + if (IEEE80211_IS_CHAN_HT(ni->ni_chan)) { + /* XXX what else? */ + ieee80211_ht_node_init(ni); + } + (void) ieee80211_sta_join1(ieee80211_ref_node(ni)); } @@ -1549,6 +1558,9 @@ ieee80211_fakeup_adhoc_node(struct ieee8 * so we can do interesting things (e.g. use * WME to disable ACK's). */ + /* + * XXX TODO: 11n? + */ if (vap->iv_flags & IEEE80211_F_WME) ni->ni_flags |= IEEE80211_NODE_QOS; #ifdef IEEE80211_SUPPORT_SUPERG @@ -1558,8 +1570,44 @@ ieee80211_fakeup_adhoc_node(struct ieee8 } ieee80211_node_setuptxparms(ni); ieee80211_ratectl_node_init(ni); + + /* + * XXX TODO: 11n? At least 20MHz, at least A-MPDU RX, + * not A-MPDU TX; not 11n rates, etc. We'll cycle + * that after we hear that we can indeed do 11n + * (either by a beacon frame or by a probe response.) + */ + + /* + * This is the first time we see the node. + */ if (ic->ic_newassoc != NULL) ic->ic_newassoc(ni, 1); + + /* + * Kick off a probe request to the given node; + * we will then use the probe response to update + * 11n/etc configuration state. + * + * XXX TODO: this isn't guaranteed, and until we get + * a probe response, we won't be able to actually + * do anything 802.11n related to the node. + * So if this does indeed work, maybe we should hold + * off on sending responses until we get the probe + * response, or just default to some sensible subset + * of 802.11n behaviour (eg always allow aggregation + * negotiation TO us, but not FROM us, etc) so we + * aren't entirely busted. + */ + if (vap->iv_opmode == IEEE80211_M_IBSS) { + ieee80211_send_probereq(ni, /* node */ + vap->iv_myaddr, /* SA */ + ni->ni_macaddr, /* DA */ + vap->iv_bss->ni_bssid, /* BSSID */ + vap->iv_bss->ni_essid, + vap->iv_bss->ni_esslen); /* SSID */ + } + /* XXX not right for 802.1x/WPA */ ieee80211_node_authorize(ni); } @@ -1632,6 +1680,21 @@ ieee80211_init_neighbor(struct ieee80211 ni->ni_ies.htinfo_ie); ieee80211_node_setuptxparms(ni); ieee80211_ratectl_node_init(ni); + + /* Reassociate; we're now 11n */ + /* + * XXX TODO: this is the wrong thing to do - + * we're calling it with isnew=1 so the ath(4) + * driver reinitialises the rate tables. + * This "mostly" works for ath(4), but it won't + * be right for firmware devices which allocate + * node states. + * + * So, do we just create a new node and delete + * the old one? Or? + */ + if (ni->ni_ic->ic_newassoc) + ni->ni_ic->ic_newassoc(ni, 1); } } @@ -1809,6 +1872,10 @@ ieee80211_find_txnode(struct ieee80211va * caller to be consistent with * ieee80211_find_node_locked. */ + /* + * XXX TODO: this doesn't fake up 11n state; we need + * to find another way to get it upgraded. + */ ni = ieee80211_fakeup_adhoc_node(vap, macaddr); if (ni != NULL) (void) ieee80211_ref_node(ni); From owner-svn-src-head@freebsd.org Tue Nov 22 02:02:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EDC4EC4EAB7; Tue, 22 Nov 2016 02:02:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BFEB8174A; Tue, 22 Nov 2016 02:02:14 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM22DEk076703; Tue, 22 Nov 2016 02:02:13 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM22Di9076702; Tue, 22 Nov 2016 02:02:13 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611220202.uAM22Di9076702@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 22 Nov 2016 02:02:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308950 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 02:02:15 -0000 Author: adrian Date: Tue Nov 22 02:02:13 2016 New Revision: 308950 URL: https://svnweb.freebsd.org/changeset/base/308950 Log: [net80211] Remove extra \n. Modified: head/sys/net80211/ieee80211_ht.c Modified: head/sys/net80211/ieee80211_ht.c ============================================================================== --- head/sys/net80211/ieee80211_ht.c Tue Nov 22 01:22:54 2016 (r308949) +++ head/sys/net80211/ieee80211_ht.c Tue Nov 22 02:02:13 2016 (r308950) @@ -592,7 +592,7 @@ ieee80211_ampdu_rx_start_ext(struct ieee rap->rxa_flags |= IEEE80211_AGGR_RUNNING | IEEE80211_AGGR_XCHGPEND; IEEE80211_NOTE(ni->ni_vap, IEEE80211_MSG_11N, ni, - "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x\n", + "%s: tid=%d, start=%d, wnd=%d, flags=0x%08x", __func__, tid, seq, From owner-svn-src-head@freebsd.org Tue Nov 22 02:42:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1F81FC4E433; Tue, 22 Nov 2016 02:42:02 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D55DB62C; Tue, 22 Nov 2016 02:42:01 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM2g1im091548; Tue, 22 Nov 2016 02:42:01 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM2g1ul091547; Tue, 22 Nov 2016 02:42:01 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611220242.uAM2g1ul091547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 22 Nov 2016 02:42:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308951 - head/sys/dev/ath X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 02:42:02 -0000 Author: adrian Date: Tue Nov 22 02:42:00 2016 New Revision: 308951 URL: https://svnweb.freebsd.org/changeset/base/308951 Log: [ath] obey the peer A-MPDU density and max-size. * Obey the peer A-MPDU density if it's larger than the currently configured one. * Pay attention to the peer A-MPDU max-size and don't assume we can transmit a full A-MPDU (64k!) if the peer announces smaller values. Relnotes: ath(4): Fix A-MPDU transmit; obey A-MPDU density and max size. Modified: head/sys/dev/ath/if_ath_tx_ht.c Modified: head/sys/dev/ath/if_ath_tx_ht.c ============================================================================== --- head/sys/dev/ath/if_ath_tx_ht.c Tue Nov 22 02:02:13 2016 (r308950) +++ head/sys/dev/ath/if_ath_tx_ht.c Tue Nov 22 02:42:00 2016 (r308951) @@ -319,8 +319,8 @@ ath_tx_rate_fill_rcflags(struct ath_soft * and we're not doing positioning, enable STBC. */ if (ic->ic_htcaps & IEEE80211_HTCAP_TXSTBC && - ni->ni_vap->iv_flags_ht & IEEE80211_FHT_STBC_TX && - ni->ni_htcap & IEEE80211_HTCAP_RXSTBC_1STREAM && + (ni->ni_vap->iv_flags_ht & IEEE80211_FHT_STBC_TX) && + (ni->ni_htcap & IEEE80211_HTCAP_RXSTBC) && (sc->sc_cur_txchainmask > 1) && (HT_RC_2_STREAMS(rate) == 1) && (bf->bf_flags & ATH_BUF_TOA_PROBE) == 0) { @@ -404,24 +404,40 @@ static int ath_compute_num_delims(struct ath_softc *sc, struct ath_buf *first_bf, uint16_t pktlen) { +#define MS(_v, _f) (((_v) & _f) >> _f##_S) const HAL_RATE_TABLE *rt = sc->sc_currates; struct ieee80211_node *ni = first_bf->bf_node; struct ieee80211vap *vap = ni->ni_vap; int ndelim, mindelim = 0; - int mpdudensity; /* in 1/100'th of a microsecond */ + int mpdudensity; /* in 1/100'th of a microsecond */ + int peer_mpdudensity; /* net80211 value */ uint8_t rc, rix, flags; int width, half_gi; uint32_t nsymbits, nsymbols; uint16_t minlen; /* - * vap->iv_ampdu_density is a value, rather than the actual - * density. + * Get the advertised density from the node. */ - if (vap->iv_ampdu_density > IEEE80211_HTCAP_MPDUDENSITY_16) + peer_mpdudensity = MS(ni->ni_htparam, IEEE80211_HTCAP_MPDUDENSITY); + + /* + * vap->iv_ampdu_density is a net80211 value, rather than the actual + * density. Larger values are longer A-MPDU density spacing values, + * and we want to obey larger configured / negotiated density values + * per station if we get it. + */ + if (vap->iv_ampdu_density > peer_mpdudensity) + peer_mpdudensity = vap->iv_ampdu_density; + + /* + * Convert the A-MPDU density net80211 value to a 1/100 microsecond + * value for subsequent calculations. + */ + if (peer_mpdudensity > IEEE80211_HTCAP_MPDUDENSITY_16) mpdudensity = 1600; /* maximum density */ else - mpdudensity = ieee80211_mpdudensity_map[vap->iv_ampdu_density]; + mpdudensity = ieee80211_mpdudensity_map[peer_mpdudensity]; /* Select standard number of delimiters based on frame length */ ndelim = ATH_AGGR_GET_NDELIM(pktlen); @@ -509,22 +525,49 @@ ath_compute_num_delims(struct ath_softc __func__, pktlen, minlen, rix, rc, width, half_gi, ndelim); return ndelim; +#undef MS } /* * Fetch the aggregation limit. * * It's the lowest of the four rate series 4ms frame length. + * + * Also take into account the hardware specific limits (8KiB on AR5416) + * and per-peer limits in non-STA mode. */ static int -ath_get_aggr_limit(struct ath_softc *sc, struct ath_buf *bf) +ath_get_aggr_limit(struct ath_softc *sc, struct ieee80211_node *ni, + struct ath_buf *bf) { +#define MS(_v, _f) (((_v) & _f) >> _f##_S) int amin = ATH_AGGR_MAXSIZE; int i; + /* Extract out the maximum configured driver A-MPDU limit */ if (sc->sc_aggr_limit > 0 && sc->sc_aggr_limit < ATH_AGGR_MAXSIZE) amin = sc->sc_aggr_limit; + /* + * Check the HTCAP field for the maximum size the node has + * negotiated. If it's smaller than what we have, cap it there. + */ + switch (MS(ni->ni_htparam, IEEE80211_HTCAP_MAXRXAMPDU)) { + case IEEE80211_HTCAP_MAXRXAMPDU_16K: + amin = MIN(amin, 16384); + break; + case IEEE80211_HTCAP_MAXRXAMPDU_32K: + amin = MIN(amin, 32768); + break; + case IEEE80211_HTCAP_MAXRXAMPDU_64K: + amin = MIN(amin, 65536); + break; + case IEEE80211_HTCAP_MAXRXAMPDU_8K: + default: + amin = MIN(amin, 8192); + break; + } + for (i = 0; i < ATH_RC_NUM; i++) { if (bf->bf_state.bfs_rc[i].tries == 0) continue; @@ -535,6 +578,7 @@ ath_get_aggr_limit(struct ath_softc *sc, __func__, amin); return amin; +#undef MS } /* @@ -787,7 +831,8 @@ ath_tx_form_aggr(struct ath_softc *sc, s * set the aggregation limit based on the * rate control decision that has been made. */ - aggr_limit = ath_get_aggr_limit(sc, bf_first); + aggr_limit = ath_get_aggr_limit(sc, &an->an_node, + bf_first); } /* Set this early just so things don't get confused */ From owner-svn-src-head@freebsd.org Tue Nov 22 02:51:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5589DC4E987; Tue, 22 Nov 2016 02:51:08 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0B1CCB5C; Tue, 22 Nov 2016 02:51:07 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM2p7a4093471; Tue, 22 Nov 2016 02:51:07 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM2p78f093469; Tue, 22 Nov 2016 02:51:07 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611220251.uAM2p78f093469@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 22 Nov 2016 02:51:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308952 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 02:51:08 -0000 Author: adrian Date: Tue Nov 22 02:51:06 2016 New Revision: 308952 URL: https://svnweb.freebsd.org/changeset/base/308952 Log: [net80211] store references to VHT and related IEs. This just stores pointers to the IE; it doesn't yet parse anything. Note: it blows out the size of ieee80211_node, so this will require ye olde kernel/modules recompile. Modified: head/sys/net80211/ieee80211_node.c head/sys/net80211/ieee80211_node.h Modified: head/sys/net80211/ieee80211_node.c ============================================================================== --- head/sys/net80211/ieee80211_node.c Tue Nov 22 02:42:00 2016 (r308951) +++ head/sys/net80211/ieee80211_node.c Tue Nov 22 02:51:06 2016 (r308952) @@ -896,6 +896,10 @@ ieee80211_sta_join(struct ieee80211vap * if (ni->ni_ies.tdma_ie != NULL) ieee80211_parse_tdma(ni, ni->ni_ies.tdma_ie); #endif + + /* XXX parse VHT IEs */ + /* XXX parse BSSLOAD IE */ + /* XXX parse APCHANREP IE */ } vap->iv_dtim_period = se->se_dtimperiod; @@ -1055,6 +1059,21 @@ ieee80211_ies_expand(struct ieee80211_ie ies->meshid_ie = ie; break; #endif + case IEEE80211_ELEMID_VHT_CAP: + ies->vhtcap_ie = ie; + break; + case IEEE80211_ELEMID_VHT_OPMODE: + ies->vhtopmode_ie = ie; + break; + case IEEE80211_ELEMID_VHT_PWR_ENV: + ies->vhtpwrenv_ie = ie; + break; + case IEEE80211_ELEMID_BSSLOAD: + ies->bssload_ie = ie; + break; + case IEEE80211_ELEMID_APCHANREP: + ies->apchanrep_ie = ie; + break; } ielen -= 2 + ie[1]; ie += 2 + ie[1]; Modified: head/sys/net80211/ieee80211_node.h ============================================================================== --- head/sys/net80211/ieee80211_node.h Tue Nov 22 02:42:00 2016 (r308951) +++ head/sys/net80211/ieee80211_node.h Tue Nov 22 02:51:06 2016 (r308952) @@ -83,6 +83,11 @@ struct ieee80211_ies { uint8_t *htinfo_ie; /* captured HTINFO ie */ uint8_t *tdma_ie; /* captured TDMA ie */ uint8_t *meshid_ie; /* captured MESH ID ie */ + uint8_t *vhtcap_ie; /* captured VHTCAP ie */ + uint8_t *vhtopmode_ie; /* captured VHTOPMODE ie */ + uint8_t *vhtpwrenv_ie; /* captured VHTPWRENV ie */ + uint8_t *apchanrep_ie; /* captured APCHANREP ie */ + uint8_t *bssload_ie; /* captured BSSLOAD ie */ uint8_t *spare[4]; /* NB: these must be the last members of this structure */ uint8_t *data; /* frame data > 802.11 header */ From owner-svn-src-head@freebsd.org Tue Nov 22 05:54:40 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57D05C4E614; Tue, 22 Nov 2016 05:54:40 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2CAED5D; Tue, 22 Nov 2016 05:54:39 +0000 (UTC) (envelope-from jkim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM5sdHE068434; Tue, 22 Nov 2016 05:54:39 GMT (envelope-from jkim@FreeBSD.org) Received: (from jkim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM5scnJ068422; Tue, 22 Nov 2016 05:54:38 GMT (envelope-from jkim@FreeBSD.org) Message-Id: <201611220554.uAM5scnJ068422@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jkim set sender to jkim@FreeBSD.org using -f From: Jung-uk Kim Date: Tue, 22 Nov 2016 05:54:38 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308953 - in head/sys/contrib/dev/acpica: . common compiler components/disassembler components/dispatcher components/events components/executer components/namespace components/parser co... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 05:54:40 -0000 Author: jkim Date: Tue Nov 22 05:54:37 2016 New Revision: 308953 URL: https://svnweb.freebsd.org/changeset/base/308953 Log: Merge ACPICA 20161117. Modified: head/sys/contrib/dev/acpica/changes.txt head/sys/contrib/dev/acpica/common/acfileio.c head/sys/contrib/dev/acpica/common/dmtbdump.c head/sys/contrib/dev/acpica/common/dmtbinfo.c head/sys/contrib/dev/acpica/compiler/aslbtypes.c head/sys/contrib/dev/acpica/compiler/aslcompiler.l head/sys/contrib/dev/acpica/compiler/aslcstyle.y head/sys/contrib/dev/acpica/compiler/aslexternal.c head/sys/contrib/dev/acpica/compiler/aslkeywords.y head/sys/contrib/dev/acpica/compiler/aslopcodes.c head/sys/contrib/dev/acpica/compiler/aslprimaries.y head/sys/contrib/dev/acpica/compiler/aslresources.y head/sys/contrib/dev/acpica/compiler/aslrestype2.c head/sys/contrib/dev/acpica/compiler/aslrules.y head/sys/contrib/dev/acpica/compiler/aslstubs.c head/sys/contrib/dev/acpica/compiler/asltokens.y head/sys/contrib/dev/acpica/compiler/asltypes.y head/sys/contrib/dev/acpica/compiler/aslwalks.c head/sys/contrib/dev/acpica/compiler/dttable.c head/sys/contrib/dev/acpica/components/disassembler/dmbuffer.c head/sys/contrib/dev/acpica/components/disassembler/dmcstyle.c head/sys/contrib/dev/acpica/components/disassembler/dmresrc.c head/sys/contrib/dev/acpica/components/dispatcher/dsinit.c head/sys/contrib/dev/acpica/components/dispatcher/dsmethod.c head/sys/contrib/dev/acpica/components/dispatcher/dsopcode.c head/sys/contrib/dev/acpica/components/dispatcher/dswload2.c head/sys/contrib/dev/acpica/components/events/evrgnini.c head/sys/contrib/dev/acpica/components/executer/exconfig.c head/sys/contrib/dev/acpica/components/executer/exconvrt.c head/sys/contrib/dev/acpica/components/executer/exresop.c head/sys/contrib/dev/acpica/components/namespace/nsload.c head/sys/contrib/dev/acpica/components/namespace/nsnames.c head/sys/contrib/dev/acpica/components/namespace/nsxfname.c head/sys/contrib/dev/acpica/components/parser/psargs.c head/sys/contrib/dev/acpica/components/parser/psloop.c head/sys/contrib/dev/acpica/components/parser/psobject.c head/sys/contrib/dev/acpica/components/parser/pstree.c head/sys/contrib/dev/acpica/components/tables/tbdata.c head/sys/contrib/dev/acpica/components/tables/tbfadt.c head/sys/contrib/dev/acpica/components/tables/tbutils.c head/sys/contrib/dev/acpica/components/tables/tbxface.c head/sys/contrib/dev/acpica/components/tables/tbxfload.c head/sys/contrib/dev/acpica/components/utilities/utdecode.c head/sys/contrib/dev/acpica/components/utilities/utresrc.c head/sys/contrib/dev/acpica/include/acdisasm.h head/sys/contrib/dev/acpica/include/acevents.h head/sys/contrib/dev/acpica/include/acnamesp.h head/sys/contrib/dev/acpica/include/acopcode.h head/sys/contrib/dev/acpica/include/acpixf.h head/sys/contrib/dev/acpica/include/actables.h head/sys/contrib/dev/acpica/include/actbl.h head/sys/contrib/dev/acpica/include/acutils.h head/sys/contrib/dev/acpica/include/amlcode.h Directory Properties: head/sys/contrib/dev/acpica/ (props changed) Modified: head/sys/contrib/dev/acpica/changes.txt ============================================================================== --- head/sys/contrib/dev/acpica/changes.txt Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/changes.txt Tue Nov 22 05:54:37 2016 (r308953) @@ -1,4 +1,83 @@ ---------------------------------------- +17 November 2016. Summary of changes for version 20161117: + + +1) ACPICA kernel-resident subsystem: + +Table Manager: Fixed a regression introduced in 20160729, "FADT support +cleanup". This was an attempt to remove all references in the source to +the FADT version 2, which never was a legal version number. It was +skipped because it was an early version of 64-bit support that was +eventually abandoned for the current 64-bit support. + +Interpreter: Fixed a problem where runtime implicit conversion was +incorrectly disabled for the ASL operators below. This brings the +behavior into compliance with the ACPI specification: + FromBCD + ToBCD + ToDecimalString + ToHexString + ToInteger + ToBuffer + +Table Manager: Added a new public interface, AcpiPutTable, used to +release and free an ACPI table returned by AcpiGetTable and related +interfaces. Lv Zheng. + +Example Code and Data Size: These are the sizes for the OS-independent +acpica.lib produced by the Microsoft Visual C++ 9.0 32-bit compiler. The +debug version of the code includes the debug output trace mechanism and +has a much larger code and data size. + + Current Release: + Non-Debug Version: 140.5K Code, 58.5K Data, 198.9K Total + Debug Version: 201.3K Code, 82.7K Data, 284.0K Total + Previous Release: + Non-Debug Version: 140.4K Code, 58.1K Data, 198.5K Total + Debug Version: 200.7K Code, 82.1K Data, 282.8K Total + + +2) iASL Compiler/Disassembler and Tools: + +Disassembler: Fixed a regression for disassembly of Resource Template. +Detection of templates in the AML stream missed some types of templates. + +iASL: Fixed a problem where an Access Size error was returned for the PCC +address space when the AccessSize of the GAS register is greater than a +DWORD. Hoan Tran. + +iASL: Implemented several grammar changes for the operators below. These +changes are slated for the next version of the ACPI specification: + RefOf - Disallow method invocation as an operand + CondRefOf - Disallow method invocation as an operand + DerefOf - Disallow operands that use the result from operators +that + do not return a reference (Changed TermArg to +SuperName). + +iASL: Control method invocations are now allowed for Target operands, as +per the ACPI specification. Removed error for using a control method +invocation as a Target operand. + +Disassembler: Improved detection of Resource Templates, Unicode, and +Strings within Buffer objects. These subtypes do not contain a specific +opcode to indicate the originating ASL code, and they must be detected by +other means within the disassembler. + +iASL: Implemented an optimization improvement for 32-bit ACPI tables +(DSDT/SSDT). For the 32-bit case only, compute the optimum integer opcode +only after 64-bit to 32-bit truncation. A truncation warning message is +still emitted, however. + +AcpiXtract: Implemented handling for both types of line terminators (LF +or CR/LF) so that it can accept AcpiDump output files from any system. +Peter Wu. + +AcpiBin: Added two new options for comparing AML files: + -a: compare and display ALL mismatches + -o: start compare at this offset into the second file + +---------------------------------------- 30 September 2016. Summary of changes for version 20160930: Modified: head/sys/contrib/dev/acpica/common/acfileio.c ============================================================================== --- head/sys/contrib/dev/acpica/common/acfileio.c Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/common/acfileio.c Tue Nov 22 05:54:37 2016 (r308953) @@ -112,7 +112,7 @@ AcGetAllTablesFromFile ( if (FileSize == ACPI_UINT32_MAX) { Status = AE_ERROR; - goto ErrorExit; + goto Exit; } fprintf (stderr, @@ -124,7 +124,7 @@ AcGetAllTablesFromFile ( if (FileSize < sizeof (ACPI_TABLE_HEADER)) { Status = AE_BAD_HEADER; - goto ErrorExit; + goto Exit; } /* Check for an non-binary file */ @@ -134,7 +134,8 @@ AcGetAllTablesFromFile ( fprintf (stderr, " %s: File does not appear to contain a valid AML table\n", Filename); - return (AE_TYPE); + Status = AE_TYPE; + goto Exit; } /* Read all tables within the file */ @@ -153,23 +154,31 @@ AcGetAllTablesFromFile ( } else if (Status == AE_TYPE) { - return (AE_OK); + Status = AE_OK; + goto Exit; } else if (ACPI_FAILURE (Status)) { - goto ErrorExit; + goto Exit; } /* Print table header for iASL/disassembler only */ #ifdef ACPI_ASL_COMPILER - AcpiTbPrintTableHeader (0, Table); + AcpiTbPrintTableHeader (0, Table); #endif /* Allocate and link a table descriptor */ TableDesc = AcpiOsAllocate (sizeof (ACPI_NEW_TABLE_DESC)); + if (!TableDesc) + { + AcpiOsFree (Table); + Status = AE_NO_MEMORY; + goto Exit; + } + TableDesc->Table = Table; TableDesc->Next = NULL; @@ -204,7 +213,7 @@ AcGetAllTablesFromFile ( *ReturnListHead = ListHead; } -ErrorExit: +Exit: fclose(File); return (Status); } @@ -262,7 +271,6 @@ AcGetOneTableFromFile ( return (Status); } - if (GetOnlyAmlTables) { /* Modified: head/sys/contrib/dev/acpica/common/dmtbdump.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbdump.c Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/common/dmtbdump.c Tue Nov 22 05:54:37 2016 (r308953) @@ -52,31 +52,12 @@ ACPI_MODULE_NAME ("dmtbdump") -/* Table of revision-dependent FADT sizes */ +/* Local prototypes */ -static const UINT32 FadtRevisionLength [ACPI_FADT_MAX_VERSION + 1] = -{ - 0, /* 0 - illegal */ - ACPI_FADT_V1_SIZE, /* 1 - ACPI 1.0 */ - 0, /* 2 - illegal */ - ACPI_FADT_V3_SIZE, /* 3 - ACPI 2.0 */ - ACPI_FADT_V4_SIZE, /* 4 - ACPI 3.0 and ACPI 4.0 */ - ACPI_FADT_V5_SIZE, /* 5 - ACPI 5.0 */ - ACPI_FADT_V6_SIZE /* 6 - ACPI 6.0 */ -}; - -/* Table of revision-dependent FADT info tables */ - -ACPI_DMTABLE_INFO *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1] = -{ - NULL, /* 0 - illegal */ - AcpiDmTableInfoFadt1, /* 1 - ACPI 1.0 */ - NULL, /* 2 - illegal */ - AcpiDmTableInfoFadt3, /* 3 - ACPI 2.0 */ - AcpiDmTableInfoFadt4, /* 4 - ACPI 3.0 and ACPI 4.0 */ - AcpiDmTableInfoFadt5, /* 5 - ACPI 5.0 */ - AcpiDmTableInfoFadt6 /* 6 - ACPI 6.0 */ -}; +static void +AcpiDmValidateFadtLength ( + UINT32 Revision, + UINT32 Length); /******************************************************************************* @@ -366,11 +347,6 @@ AcpiDmDumpXsdt ( * * DESCRIPTION: Format the contents of a FADT * - * Check the FADT revision against the expected table length for - * that revision. Issue a warning if the length is not what was - * expected. This seems to be such a common BIOS bug that the - * FADT revision has been rendered virtually meaningless. - * * NOTE: We cannot depend on the FADT version to indicate the actual * contents of the FADT because of BIOS bugs. The table length * is the only reliable indicator. @@ -382,72 +358,142 @@ AcpiDmDumpFadt ( ACPI_TABLE_HEADER *Table) { ACPI_STATUS Status; - UINT8 FadtRevision; - UINT32 ExpectedLength; - UINT32 i; - - FadtRevision = Table->Revision; - /* FADT revision/length validation */ + /* Always dump the minimum FADT revision 1 fields (ACPI 1.0) */ - if ((FadtRevision == 0) || - (FadtRevision == 2)) + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt1); + if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ( - "// ACPI Warning: Invalid or unsupported FADT revision: %u\n", - FadtRevision); return; } - if (FadtRevision > ACPI_FADT_MAX_VERSION) - { - AcpiOsPrintf ("// ACPI Warning: Revision %u is not fully supported, " - "disassembling known fields (up to revision %u)\n\n", - FadtRevision, ACPI_FADT_MAX_VERSION); - } - else + /* Check for FADT revision 2 fields (ACPI 1.0B MS extensions) */ + + if ((Table->Length > ACPI_FADT_V1_SIZE) && + (Table->Length <= ACPI_FADT_V2_SIZE)) { - ExpectedLength = FadtRevisionLength[FadtRevision]; - if (Table->Length != ExpectedLength) + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt2); + if (ACPI_FAILURE (Status)) { - AcpiOsPrintf ( - "// ACPI Warning: Input FADT revision %X does not match " - "expected length: found 0x%X expected 0x%X\n", - FadtRevision, Table->Length, ExpectedLength); + return; } } - /* - * Dump the input table on a per-version basis, but is actually - * based upon the length of the table. Table length must - * be larger than the required length of the previous version. - */ - for (i = 1; i <= ACPI_FADT_MAX_VERSION; i++) + /* Check for FADT revision 3/4 fields and up (ACPI 2.0+ extended data) */ + + else if (Table->Length > ACPI_FADT_V2_SIZE) { - if (!FadtRevisionLength[i]) /* Skip any empty slots */ + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt3); + if (ACPI_FAILURE (Status)) { - continue; + return; } - /* Dump the fields specific to FADT revision[i] */ + /* Check for FADT revision 5 fields and up (ACPI 5.0+) */ - Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, - FadtRevisionInfo[i]); - if (ACPI_FAILURE (Status)) + if (Table->Length > ACPI_FADT_V3_SIZE) { - return; + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt5); + if (ACPI_FAILURE (Status)) + { + return; + } } - if (Table->Length <= FadtRevisionLength[i]) + /* Check for FADT revision 6 fields and up (ACPI 6.0+) */ + + if (Table->Length > ACPI_FADT_V3_SIZE) { - break; /* End of table */ + Status = AcpiDmDumpTable (Table->Length, 0, Table, 0, + AcpiDmTableInfoFadt6); + if (ACPI_FAILURE (Status)) + { + return; + } } } - /* Build a local FADT to test some FADT values */ + /* Validate various fields in the FADT, including length */ AcpiTbCreateLocalFadt (Table, Table->Length); + + /* Validate FADT length against the revision */ + + AcpiDmValidateFadtLength (Table->Revision, Table->Length); +} + + +/******************************************************************************* + * + * FUNCTION: AcpiDmValidateFadtLength + * + * PARAMETERS: Revision - FADT revision (Header->Revision) + * Length - FADT length (Header->Length + * + * RETURN: None + * + * DESCRIPTION: Check the FADT revision against the expected table length for + * that revision. Issue a warning if the length is not what was + * expected. This seems to be such a common BIOS bug that the + * FADT revision has been rendered virtually meaningless. + * + ******************************************************************************/ + +static void +AcpiDmValidateFadtLength ( + UINT32 Revision, + UINT32 Length) +{ + UINT32 ExpectedLength; + + + switch (Revision) + { + case 0: + + AcpiOsPrintf ("// ACPI Warning: Invalid FADT revision: 0\n"); + return; + + case 1: + + ExpectedLength = ACPI_FADT_V1_SIZE; + break; + + case 2: + + ExpectedLength = ACPI_FADT_V2_SIZE; + break; + + case 3: + case 4: + + ExpectedLength = ACPI_FADT_V3_SIZE; + break; + + case 5: + + ExpectedLength = ACPI_FADT_V5_SIZE; + break; + + default: + + return; + } + + if (Length == ExpectedLength) + { + return; + } + + AcpiOsPrintf ( + "\n// ACPI Warning: FADT revision %X does not match length: " + "found %X expected %X\n", + Revision, Length, ExpectedLength); } Modified: head/sys/contrib/dev/acpica/common/dmtbinfo.c ============================================================================== --- head/sys/contrib/dev/acpica/common/dmtbinfo.c Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/common/dmtbinfo.c Tue Nov 22 05:54:37 2016 (r308953) @@ -400,7 +400,7 @@ ACPI_DMTABLE_INFO AcpiDmTableI * ******************************************************************************/ -/* FADT version 1 (ACPI 1.0) */ +/* ACPI 1.0 FADT (Version 1) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[] = { @@ -486,7 +486,18 @@ ACPI_DMTABLE_INFO AcpiDmTableI ACPI_DMT_TERMINATOR }; -/* FADT version 3 (ACPI 2.0) */ +/* ACPI 1.0 MS Extensions (FADT version 2) */ + +ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[] = +{ + {ACPI_DMT_GAS, ACPI_FADT_OFFSET (ResetRegister), "Reset Register", 0}, + {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (ResetValue), "Value to cause reset", 0}, + {ACPI_DMT_UINT16, ACPI_FADT_OFFSET (ArmBootFlags), "Reserved", 0}, + {ACPI_DMT_UINT8, ACPI_FADT_OFFSET (MinorRevision), "Reserved", 0}, + ACPI_DMT_TERMINATOR +}; + +/* ACPI 2.0+ Extensions (FADT version 3, 4, and 5) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[] = { @@ -510,23 +521,16 @@ ACPI_DMTABLE_INFO AcpiDmTableI ACPI_DMT_TERMINATOR }; -/* FADT version 4 (ACPI 3.0 and ACPI 4.0) */ - -ACPI_DMTABLE_INFO AcpiDmTableInfoFadt4[] = -{ - {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepControl), "Sleep Control Register", 0}, - ACPI_DMT_TERMINATOR -}; - -/* FADT version 5 (ACPI 5.0) */ +/* ACPI 5.0 Extensions (FADT version 5) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[] = { + {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepControl), "Sleep Control Register", 0}, {ACPI_DMT_GAS, ACPI_FADT_OFFSET (SleepStatus), "Sleep Status Register", 0}, ACPI_DMT_TERMINATOR }; -/* FADT version 6 (ACPI 6.0) */ +/* ACPI 6.0 Extensions (FADT version 6) */ ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[] = { Modified: head/sys/contrib/dev/acpica/compiler/aslbtypes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslbtypes.c Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslbtypes.c Tue Nov 22 05:54:37 2016 (r308953) @@ -151,7 +151,6 @@ AnMapArgTypeToBtype ( return (ACPI_BTYPE_DATA | ACPI_BTYPE_DEBUG_OBJECT | ACPI_BTYPE_REFERENCE_OBJECT); - case ARGI_FIXED_TARGET: case ARGI_SIMPLE_TARGET: return (ACPI_BTYPE_OBJECTS_AND_REFS); Modified: head/sys/contrib/dev/acpica/compiler/aslcompiler.l ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcompiler.l Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslcompiler.l Tue Nov 22 05:54:37 2016 (r308953) @@ -156,8 +156,14 @@ NamePathTail [.]{NameSeg} "^=" { count (3); return (PARSEOP_EXP_XOR_EQ); } "|=" { count (3); return (PARSEOP_EXP_OR_EQ); } -"[" { count (3); return(PARSEOP_EXP_INDEX_LEFT); } -"]" { count (0); return(PARSEOP_EXP_INDEX_RIGHT); } +"[" { count (3); return (PARSEOP_EXP_INDEX_LEFT); } +"]" { count (0); return (PARSEOP_EXP_INDEX_RIGHT); } +"(" { count (0); return (PARSEOP_OPEN_PAREN); } +")" { count (0); return (PARSEOP_CLOSE_PAREN); } + +"{" { count (0); return ('{'); } +"}" { count (0); return ('}'); } +"," { count (0); return (','); } /* @@ -691,12 +697,6 @@ NamePathTail [.]{NameSeg} "__PATH__" { count (0); return (PARSEOP___PATH__); } -"{" { count (0); return('{'); } -"}" { count (0); return('}'); } -"," { count (0); return(','); } -"(" { count (0); return('('); } -")" { count (0); return(')'); } - {NameSeg} { char *s; count (0); s=UtStringCacheCalloc (ACPI_NAME_SIZE + 1); Modified: head/sys/contrib/dev/acpica/compiler/aslcstyle.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslcstyle.y Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslcstyle.y Tue Nov 22 05:54:37 2016 (r308953) @@ -149,21 +149,30 @@ Expression /* Parentheses */ - | '(' TermArg ')' { $$ = $2;} + | PARSEOP_OPEN_PAREN + Expression + PARSEOP_CLOSE_PAREN {$$ = $2;} /* Index term -- "= BUF1[5]" on right-hand side of an equals (source) */ - | SuperName PARSEOP_EXP_INDEX_LEFT - TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); - TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} + | IndexExpTerm ; - /* Index term -- "BUF1[5] = " on left-hand side of an equals (target) */ - + /* + * Index term -- "BUF1[5] = " or " = BUF1[5] on either the left side + * of an equals (target) or the right side (source) + * Currently used in these terms: + * Expression + * ObjectTypeSource + * DerefOfSource + * Type6Opcode + */ IndexExpTerm - : SuperName PARSEOP_EXP_INDEX_LEFT - TermArg PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); + : SuperName + PARSEOP_EXP_INDEX_LEFT + TermArg + PARSEOP_EXP_INDEX_RIGHT {$$ = TrCreateLeafNode (PARSEOP_INDEX); TrLinkChildren ($$,3,$1,$3,TrCreateNullTarget ());} ; @@ -177,11 +186,26 @@ IndexExpTerm EqualsTerm + /* Allow parens anywhere */ + + : PARSEOP_OPEN_PAREN + EqualsTerm + PARSEOP_CLOSE_PAREN {$$ = $2;} + /* Simple Store() operation */ - : SuperName PARSEOP_EXP_EQUALS + | SuperName + PARSEOP_EXP_EQUALS TermArg {$$ = TrCreateAssignmentNode ($1, $3);} + /* Chained equals: (a=RefOf)=b, a=b=c=d etc. */ + + | PARSEOP_OPEN_PAREN + EqualsTerm + PARSEOP_CLOSE_PAREN + PARSEOP_EXP_EQUALS + TermArg {$$ = TrCreateAssignmentNode ($2, $5);} + /* Compound assignments -- Add (operand, operand, target) */ | TermArg PARSEOP_EXP_ADD_EQ {$$ = TrCreateLeafNode (PARSEOP_ADD);} Modified: head/sys/contrib/dev/acpica/compiler/aslexternal.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslexternal.c Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslexternal.c Tue Nov 22 05:54:37 2016 (r308953) @@ -325,6 +325,7 @@ ExMoveExternals ( ACPI_PARSE_OBJECT *NextOp; ACPI_PARSE_OBJECT *Prev; ACPI_PARSE_OBJECT *Next; + char *ExternalName; ACPI_OBJECT_TYPE ObjType; UINT32 i; @@ -345,6 +346,12 @@ ExMoveExternals ( */ ExternalOp = NextOp->Asl.Child; + /* Get/set the fully qualified name */ + + ExternalName = AcpiNsGetNormalizedPathname (ExternalOp->Asl.Node, TRUE); + ExternalOp->Asl.ExternalName = ExternalName; + ExternalOp->Asl.Namepath = ExternalName; + /* Set line numbers (for listings, etc.) */ ExternalOp->Asl.LineNumber = 0; @@ -354,6 +361,14 @@ ExMoveExternals ( Next->Asl.LineNumber = 0; Next->Asl.LogicalLineNumber = 0; + if (Next->Asl.ParseOpcode == PARSEOP_NAMESEG) + { + Next->Asl.ParseOpcode = PARSEOP_NAMESTRING; + } + Next->Asl.ExternalName = ExternalName; + UtInternalizeName (ExternalName, &Next->Asl.Value.String); + Next->Asl.AmlLength = strlen (Next->Asl.Value.String); + Next = Next->Asl.Next; Next->Asl.LineNumber = 0; Next->Asl.LogicalLineNumber = 0; Modified: head/sys/contrib/dev/acpica/compiler/aslkeywords.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslkeywords.y Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslkeywords.y Tue Nov 22 05:54:37 2016 (r308953) @@ -58,15 +58,18 @@ AccessAttribKeyword | PARSEOP_ACCESSATTRIB_SND_RCV {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_SND_RCV);} | PARSEOP_ACCESSATTRIB_WORD {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD);} | PARSEOP_ACCESSATTRIB_WORD_CALL {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_WORD_CALL);} - | PARSEOP_ACCESSATTRIB_MULTIBYTE '(' {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);} + | PARSEOP_ACCESSATTRIB_MULTIBYTE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_MULTIBYTE);} ByteConst - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_ACCESSATTRIB_RAW_BYTES '(' {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_ACCESSATTRIB_RAW_BYTES + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_BYTES);} ByteConst - ')' {$$ = TrLinkChildren ($3,1,$4);} - | PARSEOP_ACCESSATTRIB_RAW_PROCESS '(' {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} + | PARSEOP_ACCESSATTRIB_RAW_PROCESS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACCESSATTRIB_RAW_PROCESS);} ByteConst - ')' {$$ = TrLinkChildren ($3,1,$4);} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,1,$4);} ; AccessTypeKeyword Modified: head/sys/contrib/dev/acpica/compiler/aslopcodes.c ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslopcodes.c Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslopcodes.c Tue Nov 22 05:54:37 2016 (r308953) @@ -289,7 +289,7 @@ OpcSetOptimalIntegerSize ( Op->Asl.AmlOpcode = AML_DWORD_OP; return (4); } - else + else /* 64-bit integer */ { if (AcpiGbl_IntegerByteWidth == 4) { @@ -299,8 +299,12 @@ OpcSetOptimalIntegerSize ( if (!Gbl_IgnoreErrors) { /* Truncate the integer to 32-bit */ - Op->Asl.AmlOpcode = AML_DWORD_OP; - return (4); + + Op->Asl.Value.Integer &= ACPI_UINT32_MAX; + + /* Now set the optimal integer size */ + + return (OpcSetOptimalIntegerSize (Op)); } } Modified: head/sys/contrib/dev/acpica/compiler/aslprimaries.y ============================================================================== --- head/sys/contrib/dev/acpica/compiler/aslprimaries.y Tue Nov 22 02:51:06 2016 (r308952) +++ head/sys/contrib/dev/acpica/compiler/aslprimaries.y Tue Nov 22 05:54:37 2016 (r308953) @@ -52,51 +52,61 @@ NoEcho(' ******************************************************************************/ AccessAsTerm - : PARSEOP_ACCESSAS '(' + : PARSEOP_ACCESSAS + PARSEOP_OPEN_PAREN AccessTypeKeyword OptionalAccessAttribTerm - ')' {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);} - | PARSEOP_ACCESSAS '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_ACCESSAS,2,$3,$4);} + | PARSEOP_ACCESSAS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AcquireTerm - : PARSEOP_ACQUIRE '(' {$$ = TrCreateLeafNode (PARSEOP_ACQUIRE);} + : PARSEOP_ACQUIRE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ACQUIRE);} SuperName ',' WordConstExpr - ')' {$$ = TrLinkChildren ($3,2,$4,$6);} - | PARSEOP_ACQUIRE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$6);} + | PARSEOP_ACQUIRE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AddTerm - : PARSEOP_ADD '(' {$$ = TrCreateLeafNode (PARSEOP_ADD);} + : PARSEOP_ADD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ADD);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_ADD '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_ADD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AliasTerm - : PARSEOP_ALIAS '(' {$$ = TrCreateLeafNode (PARSEOP_ALIAS);} + : PARSEOP_ALIAS + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_ALIAS);} NameString NameStringItem - ')' {$$ = TrLinkChildren ($3,2,$4, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4, TrSetNodeFlags ($5, NODE_IS_NAME_DECLARATION));} - | PARSEOP_ALIAS '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_ALIAS + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; AndTerm - : PARSEOP_AND '(' {$$ = TrCreateLeafNode (PARSEOP_AND);} + : PARSEOP_AND + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_AND);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_AND '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_AND + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ArgTerm @@ -110,18 +120,21 @@ ArgTerm ; BankFieldTerm - : PARSEOP_BANKFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_BANKFIELD);} + : PARSEOP_BANKFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_BANKFIELD);} NameString NameStringItem TermArgItem ',' AccessTypeKeyword ',' LockRuleKeyword ',' UpdateRuleKeyword - ')' '{' + PARSEOP_CLOSE_PAREN '{' FieldUnitList '}' {$$ = TrLinkChildren ($3,7, $4,$5,$6,$8,$10,$12,$15);} - | PARSEOP_BANKFIELD '(' - error ')' '{' error '}' {$$ = AslDoError(); yyclearin;} + | PARSEOP_BANKFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN + '{' error '}' {$$ = AslDoError(); yyclearin;} ; BreakTerm @@ -144,58 +157,69 @@ BufferTermData ; CaseTerm - : PARSEOP_CASE '(' {$$ = TrCreateLeafNode (PARSEOP_CASE);} + : PARSEOP_CASE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CASE);} DataObject - ')' '{' + PARSEOP_CLOSE_PAREN '{' TermList '}' {$$ = TrLinkChildren ($3,2,$4,$7);} - | PARSEOP_CASE '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CASE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ConcatTerm - : PARSEOP_CONCATENATE '(' {$$ = TrCreateLeafNode (PARSEOP_CONCATENATE);} + : PARSEOP_CONCATENATE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CONCATENATE);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_CONCATENATE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_CONCATENATE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ConcatResTerm - : PARSEOP_CONCATENATERESTEMPLATE '(' {$$ = TrCreateLeafNode ( - PARSEOP_CONCATENATERESTEMPLATE);} + : PARSEOP_CONCATENATERESTEMPLATE + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode ( + PARSEOP_CONCATENATERESTEMPLATE);} TermArg TermArgItem Target - ')' {$$ = TrLinkChildren ($3,3,$4,$5,$6);} - | PARSEOP_CONCATENATERESTEMPLATE '(' - error ')' {$$ = AslDoError(); yyclearin;} + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5,$6);} + | PARSEOP_CONCATENATERESTEMPLATE + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} + ; + +CondRefOfTerm + : PARSEOP_CONDREFOF + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CONDREFOF);} + CondRefOfSource + Target + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4,$5);} + | PARSEOP_CONDREFOF + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ConnectionTerm - : PARSEOP_CONNECTION '(' + : PARSEOP_CONNECTION + PARSEOP_OPEN_PAREN NameString - ')' {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);} - | PARSEOP_CONNECTION '(' {$$ = TrCreateLeafNode (PARSEOP_CONNECTION);} + PARSEOP_CLOSE_PAREN {$$ = TrCreateNode (PARSEOP_CONNECTION,1,$3);} + | PARSEOP_CONNECTION + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CONNECTION);} ResourceMacroTerm - ')' {$$ = TrLinkChildren ($3, 1, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3, 1, TrLinkChildren ( TrCreateLeafNode (PARSEOP_RESOURCETEMPLATE), 3, TrCreateLeafNode (PARSEOP_DEFAULT_ARG), TrCreateLeafNode (PARSEOP_DEFAULT_ARG), $4));} - | PARSEOP_CONNECTION '(' - error ')' {$$ = AslDoError(); yyclearin;} - ; - -CondRefOfTerm - : PARSEOP_CONDREFOF '(' {$$ = TrCreateLeafNode (PARSEOP_CONDREFOF);} - SuperName - Target - ')' {$$ = TrLinkChildren ($3,2,$4,$5);} - | PARSEOP_CONDREFOF '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CONNECTION + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; ContinueTerm @@ -203,92 +227,108 @@ ContinueTerm ; CopyObjectTerm - : PARSEOP_COPYOBJECT '(' {$$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);} + : PARSEOP_COPYOBJECT + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_COPYOBJECT);} TermArg - ',' SimpleTarget - ')' {$$ = TrLinkChildren ($3,2,$4, + ',' SimpleName + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,2,$4, TrSetNodeFlags ($6, NODE_IS_TARGET));} - | PARSEOP_COPYOBJECT '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_COPYOBJECT + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateBitFieldTerm - : PARSEOP_CREATEBITFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);} + : PARSEOP_CREATEBITFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEBITFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEBITFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEBITFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateByteFieldTerm - : PARSEOP_CREATEBYTEFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);} + : PARSEOP_CREATEBYTEFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEBYTEFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEBYTEFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEBYTEFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateDWordFieldTerm - : PARSEOP_CREATEDWORDFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);} + : PARSEOP_CREATEDWORDFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEDWORDFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEDWORDFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEDWORDFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateFieldTerm - : PARSEOP_CREATEFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);} + : PARSEOP_CREATEFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEFIELD);} TermArg TermArgItem TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,4,$4,$5,$6, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,4,$4,$5,$6, TrSetNodeFlags ($7, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateQWordFieldTerm - : PARSEOP_CREATEQWORDFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);} + : PARSEOP_CREATEQWORDFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEQWORDFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEQWORDFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEQWORDFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; CreateWordFieldTerm - : PARSEOP_CREATEWORDFIELD '(' {$$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);} + : PARSEOP_CREATEWORDFIELD + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_CREATEWORDFIELD);} TermArg TermArgItem NameStringItem - ')' {$$ = TrLinkChildren ($3,3,$4,$5, + PARSEOP_CLOSE_PAREN {$$ = TrLinkChildren ($3,3,$4,$5, TrSetNodeFlags ($6, NODE_IS_NAME_DECLARATION));} - | PARSEOP_CREATEWORDFIELD '(' - error ')' {$$ = AslDoError(); yyclearin;} + | PARSEOP_CREATEWORDFIELD + PARSEOP_OPEN_PAREN + error PARSEOP_CLOSE_PAREN {$$ = AslDoError(); yyclearin;} ; DataRegionTerm - : PARSEOP_DATATABLEREGION '(' {$$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);} + : PARSEOP_DATATABLEREGION + PARSEOP_OPEN_PAREN {$$ = TrCreateLeafNode (PARSEOP_DATATABLEREGION);} NameString TermArgItem TermArgItem *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Nov 22 06:53:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5719FC4E11A; Tue, 22 Nov 2016 06:53:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 26985E05; Tue, 22 Nov 2016 06:53:53 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM6rqQj092174; Tue, 22 Nov 2016 06:53:52 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM6rq8e092173; Tue, 22 Nov 2016 06:53:52 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611220653.uAM6rq8e092173@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 22 Nov 2016 06:53:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308956 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 06:53:53 -0000 Author: adrian Date: Tue Nov 22 06:53:52 2016 New Revision: 308956 URL: https://svnweb.freebsd.org/changeset/base/308956 Log: [net80211] Only send out a probe request if we see an unknown IBSS node that matches our SSID. Modified: head/sys/net80211/ieee80211_adhoc.c Modified: head/sys/net80211/ieee80211_adhoc.c ============================================================================== --- head/sys/net80211/ieee80211_adhoc.c Tue Nov 22 06:29:08 2016 (r308955) +++ head/sys/net80211/ieee80211_adhoc.c Tue Nov 22 06:53:52 2016 (r308956) @@ -773,22 +773,21 @@ adhoc_recv_mgmt(struct ieee80211_node *n * filling the node table with nodes that * aren't ours. */ - if (ieee80211_ibss_node_check_new(ni, &scan)) + if (ieee80211_ibss_node_check_new(ni, &scan)) { ni = ieee80211_add_neighbor(vap, wh, &scan); - else + /* + * Send a probe request so we announce 11n + * capabilities. + */ + ieee80211_send_probereq(ni, /* node */ + vap->iv_myaddr, /* SA */ + ni->ni_macaddr, /* DA */ + vap->iv_bss->ni_bssid, /* BSSID */ + vap->iv_bss->ni_essid, + vap->iv_bss->ni_esslen); /* SSID */ + } else ni = NULL; - /* - * Send a probe request so we announce 11n - * capabilities. - */ - ieee80211_send_probereq(ni, /* node */ - vap->iv_myaddr, /* SA */ - ni->ni_macaddr, /* DA */ - vap->iv_bss->ni_bssid, /* BSSID */ - vap->iv_bss->ni_essid, - vap->iv_bss->ni_esslen); /* SSID */ - } else if (ni->ni_capinfo == 0) { /* * Update faked node created on transmit. From owner-svn-src-head@freebsd.org Tue Nov 22 08:27:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 04AFDC4BCD7; Tue, 22 Nov 2016 08:27:51 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C4A4877F; Tue, 22 Nov 2016 08:27:50 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM8RoSS029579; Tue, 22 Nov 2016 08:27:50 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM8RnBL029576; Tue, 22 Nov 2016 08:27:49 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201611220827.uAM8RnBL029576@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 22 Nov 2016 08:27:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308957 - in head: contrib/ntp contrib/ntp/html contrib/ntp/html/drivers contrib/ntp/include contrib/ntp/lib/isc contrib/ntp/libntp contrib/ntp/libparse contrib/ntp/ntpd contrib/ntp/ntp... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 08:27:51 -0000 Author: delphij Date: Tue Nov 22 08:27:49 2016 New Revision: 308957 URL: https://svnweb.freebsd.org/changeset/base/308957 Log: MFV r308954: ntp 4.2.8p9. Approved by: so Added: head/contrib/ntp/include/libssl_compat.h - copied unchanged from r308954, vendor/ntp/dist/include/libssl_compat.h head/contrib/ntp/libntp/libssl_compat.c - copied unchanged from r308954, vendor/ntp/dist/libntp/libssl_compat.c head/contrib/ntp/sntp/unity/ulib_setup.c - copied unchanged from r308954, vendor/ntp/dist/sntp/unity/ulib_setup.c head/contrib/ntp/sntp/unity/ulib_teardown.c - copied unchanged from r308954, vendor/ntp/dist/sntp/unity/ulib_teardown.c Modified: head/contrib/ntp/ChangeLog head/contrib/ntp/CommitLog head/contrib/ntp/NEWS head/contrib/ntp/configure head/contrib/ntp/html/drivers/driver40-ja.html head/contrib/ntp/html/drivers/driver40.html head/contrib/ntp/html/miscopt.html head/contrib/ntp/include/Makefile.am head/contrib/ntp/include/Makefile.in head/contrib/ntp/include/ntp.h head/contrib/ntp/include/ntp_intres.h head/contrib/ntp/include/ntpd.h head/contrib/ntp/lib/isc/netaddr.c head/contrib/ntp/libntp/Makefile.am head/contrib/ntp/libntp/Makefile.in head/contrib/ntp/libntp/a_md5encrypt.c head/contrib/ntp/libntp/audio.c head/contrib/ntp/libntp/ntp_calendar.c head/contrib/ntp/libntp/ntp_intres.c head/contrib/ntp/libntp/ssl_init.c head/contrib/ntp/libntp/work_fork.c head/contrib/ntp/libparse/clk_hopf6021.c head/contrib/ntp/ntpd/complete.conf.in head/contrib/ntp/ntpd/invoke-ntp.conf.texi head/contrib/ntp/ntpd/invoke-ntp.keys.texi head/contrib/ntp/ntpd/invoke-ntpd.texi head/contrib/ntp/ntpd/keyword-gen-utd head/contrib/ntp/ntpd/keyword-gen.c head/contrib/ntp/ntpd/ntp.conf.5man head/contrib/ntp/ntpd/ntp.conf.5mdoc head/contrib/ntp/ntpd/ntp.conf.def head/contrib/ntp/ntpd/ntp.conf.html head/contrib/ntp/ntpd/ntp.conf.man.in head/contrib/ntp/ntpd/ntp.conf.mdoc.in head/contrib/ntp/ntpd/ntp.keys.5man head/contrib/ntp/ntpd/ntp.keys.5mdoc head/contrib/ntp/ntpd/ntp.keys.html head/contrib/ntp/ntpd/ntp.keys.man.in head/contrib/ntp/ntpd/ntp.keys.mdoc.in head/contrib/ntp/ntpd/ntp_config.c head/contrib/ntp/ntpd/ntp_control.c head/contrib/ntp/ntpd/ntp_crypto.c head/contrib/ntp/ntpd/ntp_keyword.h head/contrib/ntp/ntpd/ntp_loopfilter.c head/contrib/ntp/ntpd/ntp_parser.c head/contrib/ntp/ntpd/ntp_parser.h head/contrib/ntp/ntpd/ntp_peer.c head/contrib/ntp/ntpd/ntp_proto.c head/contrib/ntp/ntpd/ntp_refclock.c head/contrib/ntp/ntpd/ntpd-opts.c head/contrib/ntp/ntpd/ntpd-opts.h head/contrib/ntp/ntpd/ntpd.1ntpdman head/contrib/ntp/ntpd/ntpd.1ntpdmdoc head/contrib/ntp/ntpd/ntpd.html head/contrib/ntp/ntpd/ntpd.man.in head/contrib/ntp/ntpd/ntpd.mdoc.in head/contrib/ntp/ntpd/refclock_gpsdjson.c head/contrib/ntp/ntpd/refclock_jjy.c head/contrib/ntp/ntpd/refclock_jupiter.c head/contrib/ntp/ntpdc/invoke-ntpdc.texi head/contrib/ntp/ntpdc/ntpdc-opts.c head/contrib/ntp/ntpdc/ntpdc-opts.h head/contrib/ntp/ntpdc/ntpdc.1ntpdcman head/contrib/ntp/ntpdc/ntpdc.1ntpdcmdoc head/contrib/ntp/ntpdc/ntpdc.html head/contrib/ntp/ntpdc/ntpdc.man.in head/contrib/ntp/ntpdc/ntpdc.mdoc.in head/contrib/ntp/ntpq/invoke-ntpq.texi head/contrib/ntp/ntpq/ntpq-opts.c head/contrib/ntp/ntpq/ntpq-opts.h head/contrib/ntp/ntpq/ntpq.1ntpqman head/contrib/ntp/ntpq/ntpq.1ntpqmdoc head/contrib/ntp/ntpq/ntpq.c head/contrib/ntp/ntpq/ntpq.html head/contrib/ntp/ntpq/ntpq.man.in head/contrib/ntp/ntpq/ntpq.mdoc.in head/contrib/ntp/ntpsnmpd/invoke-ntpsnmpd.texi head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.c head/contrib/ntp/ntpsnmpd/ntpsnmpd-opts.h head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdman head/contrib/ntp/ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc head/contrib/ntp/ntpsnmpd/ntpsnmpd.html head/contrib/ntp/ntpsnmpd/ntpsnmpd.man.in head/contrib/ntp/ntpsnmpd/ntpsnmpd.mdoc.in head/contrib/ntp/packageinfo.sh head/contrib/ntp/scripts/build/genAuthors.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjman head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.html head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.man.in head/contrib/ntp/scripts/calc_tickadj/calc_tickadj.mdoc.in head/contrib/ntp/scripts/calc_tickadj/invoke-calc_tickadj.texi head/contrib/ntp/scripts/invoke-plot_summary.texi head/contrib/ntp/scripts/invoke-summary.texi head/contrib/ntp/scripts/ntp-wait/invoke-ntp-wait.texi head/contrib/ntp/scripts/ntp-wait/ntp-wait-opts head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitman head/contrib/ntp/scripts/ntp-wait/ntp-wait.1ntp-waitmdoc head/contrib/ntp/scripts/ntp-wait/ntp-wait.html head/contrib/ntp/scripts/ntp-wait/ntp-wait.man.in head/contrib/ntp/scripts/ntp-wait/ntp-wait.mdoc.in head/contrib/ntp/scripts/ntpsweep/invoke-ntpsweep.texi head/contrib/ntp/scripts/ntpsweep/ntpsweep-opts head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepman head/contrib/ntp/scripts/ntpsweep/ntpsweep.1ntpsweepmdoc head/contrib/ntp/scripts/ntpsweep/ntpsweep.html head/contrib/ntp/scripts/ntpsweep/ntpsweep.man.in head/contrib/ntp/scripts/ntpsweep/ntpsweep.mdoc.in head/contrib/ntp/scripts/ntptrace/invoke-ntptrace.texi head/contrib/ntp/scripts/ntptrace/ntptrace-opts head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptraceman head/contrib/ntp/scripts/ntptrace/ntptrace.1ntptracemdoc head/contrib/ntp/scripts/ntptrace/ntptrace.html head/contrib/ntp/scripts/ntptrace/ntptrace.man.in head/contrib/ntp/scripts/ntptrace/ntptrace.mdoc.in head/contrib/ntp/scripts/plot_summary-opts head/contrib/ntp/scripts/plot_summary.1plot_summaryman head/contrib/ntp/scripts/plot_summary.1plot_summarymdoc head/contrib/ntp/scripts/plot_summary.html head/contrib/ntp/scripts/plot_summary.man.in head/contrib/ntp/scripts/plot_summary.mdoc.in head/contrib/ntp/scripts/summary-opts head/contrib/ntp/scripts/summary.1summaryman head/contrib/ntp/scripts/summary.1summarymdoc head/contrib/ntp/scripts/summary.html head/contrib/ntp/scripts/summary.man.in head/contrib/ntp/scripts/summary.mdoc.in head/contrib/ntp/scripts/update-leap/invoke-update-leap.texi head/contrib/ntp/scripts/update-leap/update-leap-opts head/contrib/ntp/scripts/update-leap/update-leap.1update-leapman head/contrib/ntp/scripts/update-leap/update-leap.1update-leapmdoc head/contrib/ntp/scripts/update-leap/update-leap.html head/contrib/ntp/scripts/update-leap/update-leap.in head/contrib/ntp/scripts/update-leap/update-leap.man.in head/contrib/ntp/scripts/update-leap/update-leap.mdoc.in head/contrib/ntp/sntp/configure head/contrib/ntp/sntp/crypto.c head/contrib/ntp/sntp/include/version.def head/contrib/ntp/sntp/include/version.texi head/contrib/ntp/sntp/invoke-sntp.texi head/contrib/ntp/sntp/m4/version.m4 head/contrib/ntp/sntp/sntp-opts.c head/contrib/ntp/sntp/sntp-opts.h head/contrib/ntp/sntp/sntp.1sntpman head/contrib/ntp/sntp/sntp.1sntpmdoc head/contrib/ntp/sntp/sntp.html head/contrib/ntp/sntp/sntp.man.in head/contrib/ntp/sntp/sntp.mdoc.in head/contrib/ntp/sntp/tests/packetProcessing.c head/contrib/ntp/sntp/tests/run-packetProcessing.c head/contrib/ntp/sntp/unity/Makefile.am head/contrib/ntp/sntp/unity/Makefile.in head/contrib/ntp/sntp/unity/unity_fixture.c head/contrib/ntp/sntp/version.c head/contrib/ntp/tests/libntp/a_md5encrypt.c head/contrib/ntp/tests/libntp/calendar.c head/contrib/ntp/tests/libntp/run-calendar.c head/contrib/ntp/tests/libntp/sfptostr.c head/contrib/ntp/tests/ntpd/Makefile.am head/contrib/ntp/tests/ntpd/Makefile.in head/contrib/ntp/util/invoke-ntp-keygen.texi head/contrib/ntp/util/ntp-keygen-opts.c head/contrib/ntp/util/ntp-keygen-opts.h head/contrib/ntp/util/ntp-keygen.1ntp-keygenman head/contrib/ntp/util/ntp-keygen.1ntp-keygenmdoc head/contrib/ntp/util/ntp-keygen.c head/contrib/ntp/util/ntp-keygen.html head/contrib/ntp/util/ntp-keygen.man.in head/contrib/ntp/util/ntp-keygen.mdoc.in head/usr.sbin/ntp/config.h head/usr.sbin/ntp/doc/ntp-keygen.8 head/usr.sbin/ntp/doc/ntp.conf.5 head/usr.sbin/ntp/doc/ntp.keys.5 head/usr.sbin/ntp/doc/ntpd.8 head/usr.sbin/ntp/doc/ntpdc.8 head/usr.sbin/ntp/doc/ntpq.8 head/usr.sbin/ntp/doc/sntp.8 head/usr.sbin/ntp/libntp/Makefile head/usr.sbin/ntp/scripts/mkver Directory Properties: head/contrib/ntp/ (props changed) Modified: head/contrib/ntp/ChangeLog ============================================================================== --- head/contrib/ntp/ChangeLog Tue Nov 22 06:53:52 2016 (r308956) +++ head/contrib/ntp/ChangeLog Tue Nov 22 08:27:49 2016 (r308957) @@ -1,4 +1,73 @@ --- +(4.2.8p9) 2016/11/21 Released by Harlan Stenn +(4.2.8p9) 2016/MM/DD Released by Harlan Stenn + +* [Sec 3119] Trap crash +* [Sec 3118] Mode 6 information disclosure and DDoS vector + - TRAP config via mode 6 packet requires AUTH now. +* [Sec 3114] Broadcast Mode Replay Prevention DoS + - applied patches by Matthew Van Gundy. + - with bcpollbstep, tweaks and cleanup by stenn@ntp.org +* [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS + - applied fix as suggested by Matthew Van Gundy +* [Sec 3110] Windows: ntpd DoS by oversized UDP packet + - fixed error handling for truncated UDP packets. +* [Sec 3102] Zero origin issues. HStenn. +* [Sec 3082] null pointer dereference in _IO_str_init_static_internal() + - more hardening to read_mru_list(). perlinger@ntp.org +* [Sec 3072] Attack on interface selection + - implemented Miroslav Lichvars suggestion + to skip interface updates based on incoming packets +* [Bug 3142] bug in netmask prefix length detection +* [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org +* [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - moved retry decision where it belongs. +* [Bug 3125] NTPD doesn't fully start when ntp.conf entries are out of order + using the loopback-ppsapi-provider.dll +* [Bug 3116] unit tests for NTP time stamp expansion. +* [Bug 3100] ntpq can't retrieve daemon_version + - fixed extended sysvar lookup (bug introduced with bug 3008 fix) +* [Bug 3095] Compatibility with openssl 1.1 + - applied patches by Kurt Roeckx to source + - added shim layer for SSL API calls with issues (both directions) +* [Bug 3089] Serial Parser does not work anymore for hopfser like device + - simplified / refactored hex-decoding in driver. +* [Bug 3084] update-leap mis-parses the leapfile name. HStenn. +* [Bug 3068] Linker warnings when building on Solaris. perlinger@ntp.org + - applied patch thanks to Andrew Stormont +* [Bug 3067] Root distance calculation needs improvement. HStenn. +* [Bug 3066] NMEA clock ignores pps. perlinger@ntp.org + - PPS-HACK works again. +* [Bug 3059] Potential buffer overrun from oversized hash + - applied patch by Brian Utterback +* [Bug 3053] ntp_loopfilter.c frequency calc precedence error. Sarah White. +* [Bug 3050] Fix for bug #2960 causes [...] spurious error message. + + - patches by Reinhard Max and Havard Eidnes +* [Bug 3047] Fix refclock_jjy C-DEX JST2000. abe@ntp.org + - Patch provided by Kuramatsu. +* [Bug 3021] unity_fixture.c needs pragma weak + - removed unnecessary & harmful decls of 'setUp()' & 'tearDown()' +* [Bug 3019] Windows: ERROR_HOST_UNREACHABLE block packet processing. + DMayer and JPerlinger. +* [Bug 2998] sntp/tests/packetProcessing.c broken without openssl. JPerlinger +* [Bug 2961] sntp/tests/packetProcessing.c assumes AUTOKEY. HStenn. +* [Bug 2959] refclock_jupiter: gps week correction + - fixed GPS week expansion to work based on build date. Special thanks + to Craig Leres for initial patch and testing. +* [Bug 2951] ntpd tests fail: multiple definition of `send_via_ntp_signd' + - fixed Makefile.am +* [Bug 2689] ATOM driver processes last PPS pulse at startup, + even if it is very old + - make sure PPS source is alive before processing samples + - improve stability close to the 500ms phase jump (phase gate) +* Fix typos in include/ntp.h. +* Shim X509_get_signature_nid() if needed. +* git author attribution cleanup +* bk ignore file cleanup +* remove locks in Windows IO, use rpc-like thread synchronisation instead + +--- (4.2.8p8) 2016/06/02 Released by Harlan Stenn * [Sec 3042] Broadcast Interleave. HStenn. @@ -19,7 +88,7 @@ * Fix typo in ntp-wait and plot_summary. HStenn. * Make sure we have an "author" file for git imports. HStenn. * Update the sntp problem tests for MacOS. HStenn. - + --- (4.2.8p7) 2016/04/26 Released by Harlan Stenn Modified: head/contrib/ntp/CommitLog ============================================================================== --- head/contrib/ntp/CommitLog Tue Nov 22 06:53:52 2016 (r308956) +++ head/contrib/ntp/CommitLog Tue Nov 22 08:27:49 2016 (r308957) @@ -1,3 +1,1866 @@ +ChangeSet@1.3720, 2016-11-21 08:08:21-05:00, stenn@deacon.udel.edu + NTP_4_2_8P9 + TAG: NTP_4_2_8P9 + + ChangeLog@1.1852 +1 -0 + NTP_4_2_8P9 + + ntpd/invoke-ntp.conf.texi@1.203 +1 -1 + NTP_4_2_8P9 + + ntpd/invoke-ntp.keys.texi@1.192 +1 -1 + NTP_4_2_8P9 + + ntpd/invoke-ntpd.texi@1.508 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.conf.5man@1.237 +3 -3 + NTP_4_2_8P9 + + ntpd/ntp.conf.5mdoc@1.237 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.conf.html@1.187 +157 -154 + NTP_4_2_8P9 + + ntpd/ntp.conf.man.in@1.237 +3 -3 + NTP_4_2_8P9 + + ntpd/ntp.conf.mdoc.in@1.237 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.keys.5man@1.226 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.keys.5mdoc@1.226 +3 -3 + NTP_4_2_8P9 + + ntpd/ntp.keys.html@1.188 +21 -33 + NTP_4_2_8P9 + + ntpd/ntp.keys.man.in@1.226 +2 -2 + NTP_4_2_8P9 + + ntpd/ntp.keys.mdoc.in@1.226 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd-opts.c@1.530 +245 -245 + NTP_4_2_8P9 + + ntpd/ntpd-opts.h@1.529 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd.1ntpdman@1.337 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd.1ntpdmdoc@1.337 +2 -2 + NTP_4_2_8P9 + + ntpd/ntpd.html@1.181 +142 -186 + NTP_4_2_8P9 + + ntpd/ntpd.man.in@1.337 +3 -3 + NTP_4_2_8P9 + + ntpd/ntpd.mdoc.in@1.337 +2 -2 + NTP_4_2_8P9 + + ntpdc/invoke-ntpdc.texi@1.505 +2 -2 + NTP_4_2_8P9 + + ntpdc/ntpdc-opts.c@1.523 +106 -106 + NTP_4_2_8P9 + + ntpdc/ntpdc-opts.h@1.522 +3 -3 + NTP_4_2_8P9 + + ntpdc/ntpdc.1ntpdcman@1.336 +3 -3 + NTP_4_2_8P9 + + ntpdc/ntpdc.1ntpdcmdoc@1.336 +2 -2 + NTP_4_2_8P9 + + ntpdc/ntpdc.html@1.349 +75 -95 + NTP_4_2_8P9 + + ntpdc/ntpdc.man.in@1.336 +3 -3 + NTP_4_2_8P9 + + ntpdc/ntpdc.mdoc.in@1.336 +2 -2 + NTP_4_2_8P9 + + ntpq/invoke-ntpq.texi@1.513 +2 -2 + NTP_4_2_8P9 + + ntpq/ntpq-opts.c@1.530 +113 -113 + NTP_4_2_8P9 + + ntpq/ntpq-opts.h@1.528 +3 -3 + NTP_4_2_8P9 + + ntpq/ntpq.1ntpqman@1.341 +3 -3 + NTP_4_2_8P9 + + ntpq/ntpq.1ntpqmdoc@1.341 +2 -2 + NTP_4_2_8P9 + + ntpq/ntpq.html@1.178 +136 -160 + NTP_4_2_8P9 + + ntpq/ntpq.man.in@1.341 +3 -3 + NTP_4_2_8P9 + + ntpq/ntpq.mdoc.in@1.341 +2 -2 + NTP_4_2_8P9 + + ntpsnmpd/invoke-ntpsnmpd.texi@1.507 +2 -2 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd-opts.c@1.525 +67 -67 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd-opts.h@1.524 +3 -3 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.336 +3 -3 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.336 +2 -2 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.html@1.176 +10 -14 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.man.in@1.336 +3 -3 + NTP_4_2_8P9 + + ntpsnmpd/ntpsnmpd.mdoc.in@1.336 +2 -2 + NTP_4_2_8P9 + + packageinfo.sh@1.532 +2 -2 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.97 +3 -3 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.98 +2 -2 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.html@1.99 +30 -42 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.man.in@1.96 +3 -3 + NTP_4_2_8P9 + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.98 +2 -2 + NTP_4_2_8P9 + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.101 +1 -1 + NTP_4_2_8P9 + + scripts/invoke-plot_summary.texi@1.119 +2 -2 + NTP_4_2_8P9 + + scripts/invoke-summary.texi@1.118 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/invoke-ntp-wait.texi@1.328 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait-opts@1.64 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.325 +3 -3 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.326 +2 -2 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.html@1.345 +41 -59 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.man.in@1.325 +3 -3 + NTP_4_2_8P9 + + scripts/ntp-wait/ntp-wait.mdoc.in@1.326 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/invoke-ntpsweep.texi@1.116 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep-opts@1.66 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.104 +2 -2 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.html@1.117 +46 -57 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.man.in@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntpsweep/ntpsweep.mdoc.in@1.105 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/invoke-ntptrace.texi@1.117 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace-opts@1.66 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.1ntptraceman@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.105 +2 -2 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.html@1.118 +38 -47 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.man.in@1.104 +3 -3 + NTP_4_2_8P9 + + scripts/ntptrace/ntptrace.mdoc.in@1.106 +2 -2 + NTP_4_2_8P9 + + scripts/plot_summary-opts@1.67 +2 -2 + NTP_4_2_8P9 + + scripts/plot_summary.1plot_summaryman@1.117 +3 -3 + NTP_4_2_8P9 + + scripts/plot_summary.1plot_summarymdoc@1.117 +2 -2 + NTP_4_2_8P9 + + scripts/plot_summary.html@1.120 +40 -58 + NTP_4_2_8P9 + + scripts/plot_summary.man.in@1.117 +3 -3 + NTP_4_2_8P9 + + scripts/plot_summary.mdoc.in@1.117 +2 -2 + NTP_4_2_8P9 + + scripts/summary-opts@1.66 +2 -2 + NTP_4_2_8P9 + + scripts/summary.1summaryman@1.116 +3 -3 + NTP_4_2_8P9 + + scripts/summary.1summarymdoc@1.116 +2 -2 + NTP_4_2_8P9 + + scripts/summary.html@1.119 +37 -49 + NTP_4_2_8P9 + + scripts/summary.man.in@1.116 +3 -3 + NTP_4_2_8P9 + + scripts/summary.mdoc.in@1.116 +2 -2 + NTP_4_2_8P9 + + scripts/update-leap/invoke-update-leap.texi@1.17 +1 -1 + NTP_4_2_8P9 + + scripts/update-leap/update-leap-opts@1.17 +2 -2 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.1update-leapman@1.17 +3 -3 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.1update-leapmdoc@1.17 +2 -2 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.html@1.17 +48 -72 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.man.in@1.17 +3 -3 + NTP_4_2_8P9 + + scripts/update-leap/update-leap.mdoc.in@1.17 +2 -2 + NTP_4_2_8P9 + + sntp/invoke-sntp.texi@1.505 +2 -2 + NTP_4_2_8P9 + + sntp/sntp-opts.c@1.524 +158 -158 + NTP_4_2_8P9 + + sntp/sntp-opts.h@1.522 +3 -3 + NTP_4_2_8P9 + + sntp/sntp.1sntpman@1.340 +3 -3 + NTP_4_2_8P9 + + sntp/sntp.1sntpmdoc@1.340 +2 -2 + NTP_4_2_8P9 + + sntp/sntp.html@1.520 +111 -135 + NTP_4_2_8P9 + + sntp/sntp.man.in@1.340 +3 -3 + NTP_4_2_8P9 + + sntp/sntp.mdoc.in@1.340 +2 -2 + NTP_4_2_8P9 + + util/invoke-ntp-keygen.texi@1.508 +2 -2 + NTP_4_2_8P9 + + util/ntp-keygen-opts.c@1.526 +172 -172 + NTP_4_2_8P9 + + util/ntp-keygen-opts.h@1.524 +3 -3 + NTP_4_2_8P9 + + util/ntp-keygen.1ntp-keygenman@1.336 +3 -3 + NTP_4_2_8P9 + + util/ntp-keygen.1ntp-keygenmdoc@1.336 +2 -2 + NTP_4_2_8P9 + + util/ntp-keygen.html@1.182 +157 -216 + NTP_4_2_8P9 + + util/ntp-keygen.man.in@1.336 +3 -3 + NTP_4_2_8P9 + + util/ntp-keygen.mdoc.in@1.336 +2 -2 + NTP_4_2_8P9 + +ChangeSet@1.3719, 2016-11-21 07:07:04-05:00, stenn@deacon.udel.edu + ntp-4.2.8p9 + + packageinfo.sh@1.531 +1 -1 + ntp-4.2.8p9 + +ChangeSet@1.3718, 2016-11-21 03:47:58+00:00, stenn@psp-deb1.ntp.org + NEWS updates, final p9 testing + + NEWS@1.203 +25 -17 + NEWS updates, final p9 testing + + packageinfo.sh@1.530 +2 -2 + NEWS updates, final p9 testing + +ChangeSet@1.3717, 2016-11-18 10:33:02+00:00, stenn@psp-deb1.ntp.org + NEWS update for 3142 + + NEWS@1.202 +2 -1 + NEWS update for 3142 + +ChangeSet@1.3686.23.1, 2016-11-18 08:55:13+01:00, perlinger@ntp.org + [Bug 3142] bug in netmask prefix length detection + + ChangeLog@1.1834.23.1 +3 -0 + [Bug 3142] bug in netmask prefix length detection + + lib/isc/netaddr.c@1.15 +0 -1 + [Bug 3142] bug in netmask prefix length detection + +ChangeSet@1.3715, 2016-11-16 21:25:49-08:00, harlan@fb-x86-a.pfcs.com + NEWS file update + + NEWS@1.201 +7 -22 + NEWS file update + +ChangeSet@1.3707.1.1, 2016-11-13 21:59:31-08:00, harlan@fb-x86-a.pfcs.com + cleanup + + NEWS@1.197.1.1 +201 -77 + cleanup + +ChangeSet@1.3713, 2016-11-13 21:56:18-08:00, harlan@hms-mbp11.pfcs.com + cleanip + + ChangeLog@1.1850 +2 -0 + cleanip + +ChangeSet@1.3712, 2016-11-13 02:43:02+00:00, stenn@psp-deb1.ntp.org + NEWS updates + + NEWS@1.199 +17 -0 + NEWS updates + +ChangeSet@1.3710, 2016-11-13 02:30:31+00:00, stenn@psp-deb1.ntp.org + NEWS cleanup + + NEWS@1.198 +2 -0 + NEWS cleanup + +ChangeSet@1.3707, 2016-11-12 17:36:54-08:00, harlan@fb-x86-a.pfcs.com + NEWS cleanup + + NEWS@1.197 +41 -6 + NEWS cleanup + +ChangeSet@1.3706, 2016-11-12 16:55:59-08:00, harlan@fb-x86-a.pfcs.com + [Bug 3067] Root distance calculation needs improvement. HStenn + + ChangeLog@1.1846.1.2 +1 -0 + [Bug 3067] Root distance calculation needs improvement. HStenn + + NEWS@1.196 +1 -0 + [Bug 3067] Root distance calculation needs improvement. HStenn + + ntpd/ntp_proto.c@1.396 +16 -11 + [Bug 3067] Root distance calculation needs improvement. HStenn + +ChangeSet@1.3705, 2016-11-12 15:57:34-08:00, harlan@fb-x86-a.pfcs.com + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + + ChangeLog@1.1846.1.1 +1 -0 + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + + NEWS@1.195 +1 -0 + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + + ntpd/refclock_gpsdjson.c@1.25 +1 -1 + [Bug 3138] gpsdjson refclock should honor fudgetime1. stenn@ntp.org + +ChangeSet@1.3686.22.1, 2016-11-12 05:54:39+01:00, perlinger@ntp.org + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + + ChangeLog@1.1834.22.1 +4 -0 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + + include/ntp_intres.h@1.2 +6 -0 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - add flags and prototype for 'getaddrinfo_sometime_ex()' + + libntp/ntp_intres.c@1.101 +48 -14 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - implement 'getaddrinfo_sometime_ex()', support ignoring all errors + + ntpd/ntp_config.c@1.338.1.1 +11 -10 + [Bug 3129] Unknown hosts can put resolver thread into a hard loop + - move decison about igoring DNS errors to resolver code + +ChangeSet@1.3703.1.2, 2016-11-09 12:32:07+00:00, stenn@psp-deb1.ntp.org + [Bug 3114] bcpollbstep, tweaks and cleanup + + ChangeLog@1.1848 +1 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + html/miscopt.html@1.87 +4 -2 + [Bug 3114] bcpollbstep, tweaks and cleanup + + include/ntp.h@1.223 +1 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + include/ntpd.h@1.194 +1 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/complete.conf.in@1.32 +1 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/invoke-ntp.conf.texi@1.202 +16 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/keyword-gen-utd@1.29 +1 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/keyword-gen.c@1.35 +1 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.5man@1.236 +29 -8 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.5mdoc@1.236 +21 -2 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.def@1.25 +19 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.man.in@1.236 +29 -8 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp.conf.mdoc.in@1.236 +21 -2 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_config.c@1.339 +15 -0 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_keyword.h@1.31 +1068 -1058 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_parser.c@1.103 +1196 -1193 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_parser.h@1.67 +373 -371 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_parser.y@1.93 +3 -1 + [Bug 3114] bcpollbstep, tweaks and cleanup + + ntpd/ntp_proto.c@1.394.1.2 +43 -26 + [Bug 3114] bcpollbstep, tweaks and cleanup + +ChangeSet@1.3703, 2016-11-09 06:06:04+00:00, stenn@psp-deb1.ntp.org + typo + + ChangeLog@1.1846 +1 -1 + typo + +ChangeSet@1.3686.21.1, 2016-11-08 20:01:41+01:00, perlinger@ntp.org + [Bug 3089] Serial Parser does not work anymore for hopfser like device + + ChangeLog@1.1834.21.1 +4 -0 + [Bug 3089] Serial Parser does not work anymore for hopfser like device + + libparse/clk_hopf6021.c@1.13 +43 -25 + [Bug 3089] Serial Parser does not work anymore for hopfser like device + - simplified / refactored hex-decoding in driver. + +ChangeSet@1.3698.2.1, 2016-11-03 17:02:24-07:00, harlan@max.pfcs.com + Added leap smear/root dispersion comment + + ntpd/ntp_proto.c@1.393.1.1 +4 -0 + Added leap smear/root dispersion comment + +ChangeSet@1.3699.1.2, 2016-10-31 10:56:33+00:00, stenn@psp-deb1.ntp.org + Add bug 3125 to the NEWS file + + NEWS@1.194 +2 -0 + Add bug 3125 to the NEWS file + +ChangeSet@1.3701, 2016-10-24 07:37:25+02:00, perlinger@ntp.org + [winio2 - unlocked] + - the great lock removal + - the great renaming + + ChangeLog@1.1844 +1 -0 + [winio2 - unlocked] notes on changes + + ntpd/ntp_refclock.c@1.123 +1 -1 + [winio2 - unlocked] + - whitespace at EOL + + ports/winnt/include/ntp_iocpltypes.h@1.3 +21 -24 + [winio2 - unlocked] + - eliminate critical section, simplify API + - the great renaming + + ports/winnt/ntpd/ntp_iocompletionport.c@1.77 +331 -209 + [winio2 - unlocked] + - the great lock removal + - handle context objects are only manipulated by IOCPL thread + - closing handles is done by main thread after informing IOCPL thread (RPC-style) + - the great renaming + - restructured UNIX line mode emulation + + ports/winnt/ntpd/ntp_iocpltypes.c@1.3 +31 -95 + [winio2 - unlocked] + - eliminate critical section, simplify API + - the great renaming + + +ChangeSet@1.3698.1.7, 2016-10-23 05:18:04+00:00, stenn@psp-deb1.ntp.org + ntp-4.2.8p9-PRE + + ntpd/invoke-ntp.conf.texi@1.201 +1 -1 + ntp-4.2.8p9-PRE + + ntpd/invoke-ntp.keys.texi@1.191 +1 -1 + ntp-4.2.8p9-PRE + + ntpd/invoke-ntpd.texi@1.507 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.5man@1.235 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.5mdoc@1.235 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.html@1.186 +104 -91 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.man.in@1.235 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntp.conf.mdoc.in@1.235 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.5man@1.225 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.5mdoc@1.225 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.html@1.187 +29 -17 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.man.in@1.225 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntp.keys.mdoc.in@1.225 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd-opts.c@1.529 +245 -245 + ntp-4.2.8p9-PRE + + ntpd/ntpd-opts.h@1.528 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd.1ntpdman@1.336 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd.1ntpdmdoc@1.336 +2 -2 + ntp-4.2.8p9-PRE + + ntpd/ntpd.html@1.180 +146 -102 + ntp-4.2.8p9-PRE + + ntpd/ntpd.man.in@1.336 +3 -3 + ntp-4.2.8p9-PRE + + ntpd/ntpd.mdoc.in@1.336 +2 -2 + ntp-4.2.8p9-PRE + + ntpdc/invoke-ntpdc.texi@1.504 +2 -2 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc-opts.c@1.522 +106 -106 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc-opts.h@1.521 +3 -3 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.1ntpdcman@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.1ntpdcmdoc@1.335 +2 -2 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.html@1.348 +77 -57 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.man.in@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpdc/ntpdc.mdoc.in@1.335 +2 -2 + ntp-4.2.8p9-PRE + + ntpq/invoke-ntpq.texi@1.512 +2 -2 + ntp-4.2.8p9-PRE + + ntpq/ntpq-opts.c@1.529 +113 -113 + ntp-4.2.8p9-PRE + + ntpq/ntpq-opts.h@1.527 +3 -3 + ntp-4.2.8p9-PRE + + ntpq/ntpq.1ntpqman@1.340 +3 -3 + ntp-4.2.8p9-PRE + + ntpq/ntpq.1ntpqmdoc@1.340 +2 -2 + ntp-4.2.8p9-PRE + + ntpq/ntpq.html@1.177 +129 -105 + ntp-4.2.8p9-PRE + + ntpq/ntpq.man.in@1.340 +3 -3 + ntp-4.2.8p9-PRE + + ntpq/ntpq.mdoc.in@1.340 +2 -2 + ntp-4.2.8p9-PRE + + ntpsnmpd/invoke-ntpsnmpd.texi@1.506 +2 -2 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd-opts.c@1.524 +67 -67 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd-opts.h@1.523 +3 -3 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.1ntpsnmpdman@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.1ntpsnmpdmdoc@1.335 +2 -2 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.html@1.175 +14 -10 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.man.in@1.335 +3 -3 + ntp-4.2.8p9-PRE + + ntpsnmpd/ntpsnmpd.mdoc.in@1.335 +2 -2 + ntp-4.2.8p9-PRE + + packageinfo.sh@1.529 +2 -2 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjman@1.96 +3 -3 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.1calc_tickadjmdoc@1.97 +2 -2 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.html@1.98 +34 -22 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.man.in@1.95 +3 -3 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/calc_tickadj.mdoc.in@1.97 +2 -2 + ntp-4.2.8p9-PRE + + scripts/calc_tickadj/invoke-calc_tickadj.texi@1.100 +1 -1 + ntp-4.2.8p9-PRE + + scripts/invoke-plot_summary.texi@1.118 +2 -2 + ntp-4.2.8p9-PRE + + scripts/invoke-summary.texi@1.117 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/invoke-ntp-wait.texi@1.327 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait-opts@1.63 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.1ntp-waitman@1.324 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.1ntp-waitmdoc@1.325 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.html@1.344 +49 -31 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.man.in@1.324 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntp-wait/ntp-wait.mdoc.in@1.325 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/invoke-ntpsweep.texi@1.115 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep-opts@1.65 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.1ntpsweepman@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.1ntpsweepmdoc@1.103 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.html@1.116 +44 -33 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.man.in@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntpsweep/ntpsweep.mdoc.in@1.104 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/invoke-ntptrace.texi@1.116 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace-opts@1.65 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.1ntptraceman@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.1ntptracemdoc@1.104 +2 -2 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.html@1.117 +36 -27 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.man.in@1.103 +3 -3 + ntp-4.2.8p9-PRE + + scripts/ntptrace/ntptrace.mdoc.in@1.105 +2 -2 + ntp-4.2.8p9-PRE + + scripts/plot_summary-opts@1.66 +2 -2 + ntp-4.2.8p9-PRE + + scripts/plot_summary.1plot_summaryman@1.116 +3 -3 + ntp-4.2.8p9-PRE + + scripts/plot_summary.1plot_summarymdoc@1.116 +2 -2 + ntp-4.2.8p9-PRE + + scripts/plot_summary.html@1.119 +47 -29 + ntp-4.2.8p9-PRE + + scripts/plot_summary.man.in@1.116 +3 -3 + ntp-4.2.8p9-PRE + + scripts/plot_summary.mdoc.in@1.116 +2 -2 + ntp-4.2.8p9-PRE + + scripts/summary-opts@1.65 +2 -2 + ntp-4.2.8p9-PRE + + scripts/summary.1summaryman@1.115 +3 -3 + ntp-4.2.8p9-PRE + + scripts/summary.1summarymdoc@1.115 +2 -2 + ntp-4.2.8p9-PRE + + scripts/summary.html@1.118 +39 -27 + ntp-4.2.8p9-PRE + + scripts/summary.man.in@1.115 +3 -3 + ntp-4.2.8p9-PRE + + scripts/summary.mdoc.in@1.115 +2 -2 + ntp-4.2.8p9-PRE + + scripts/update-leap/invoke-update-leap.texi@1.16 +1 -1 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap-opts@1.16 +2 -2 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.1update-leapman@1.16 +3 -3 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.1update-leapmdoc@1.16 +2 -2 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.html@1.16 +59 -35 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.man.in@1.16 +3 -3 + ntp-4.2.8p9-PRE + + scripts/update-leap/update-leap.mdoc.in@1.16 +2 -2 + ntp-4.2.8p9-PRE + + sntp/invoke-sntp.texi@1.504 +2 -2 + ntp-4.2.8p9-PRE + + sntp/sntp-opts.c@1.523 +158 -158 + ntp-4.2.8p9-PRE + + sntp/sntp-opts.h@1.521 +3 -3 + ntp-4.2.8p9-PRE + + sntp/sntp.1sntpman@1.339 +3 -3 + ntp-4.2.8p9-PRE + + sntp/sntp.1sntpmdoc@1.339 +2 -2 + ntp-4.2.8p9-PRE + + sntp/sntp.html@1.519 +109 -85 + ntp-4.2.8p9-PRE + + sntp/sntp.man.in@1.339 +3 -3 + ntp-4.2.8p9-PRE + + sntp/sntp.mdoc.in@1.339 +2 -2 + ntp-4.2.8p9-PRE + + util/invoke-ntp-keygen.texi@1.507 +2 -2 + ntp-4.2.8p9-PRE + + util/ntp-keygen-opts.c@1.525 +172 -172 + ntp-4.2.8p9-PRE + + util/ntp-keygen-opts.h@1.523 +3 -3 + ntp-4.2.8p9-PRE + + util/ntp-keygen.1ntp-keygenman@1.335 +3 -3 + ntp-4.2.8p9-PRE + + util/ntp-keygen.1ntp-keygenmdoc@1.335 +2 -2 + ntp-4.2.8p9-PRE + + util/ntp-keygen.html@1.181 +183 -124 + ntp-4.2.8p9-PRE + + util/ntp-keygen.man.in@1.335 +3 -3 + ntp-4.2.8p9-PRE + + util/ntp-keygen.mdoc.in@1.335 +2 -2 + ntp-4.2.8p9-PRE + +ChangeSet@1.3688.4.1, 2016-10-20 19:28:06+00:00, stenn@psp-deb1.ntp.org + cleanup + + ChangeLog@1.1836.4.1 +1 -0 + cleanup + +ChangeSet@1.3686.20.1, 2016-10-20 20:13:40+02:00, perlinger@ntp.org + [Sec 3114] Broadcast Mode Replay Prevention DoS + + ChangeLog@1.1834.20.1 +4 -0 + [Sec 3114] Broadcast Mode Replay Prevention DoS + + ntpd/ntp_proto.c@1.392.2.1 +39 -6 + [Sec 3114] Broadcast Mode Replay Prevention DoS + - applied patches by Matthew Van Gundy, with some rework. + +ChangeSet@1.3686.19.1, 2016-10-20 09:21:04+02:00, perlinger@ntp.org + [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS + + ChangeLog@1.1834.19.1 +4 -0 + [Sec 3113] Broadcast Mode Poll Interval Enforcement DoS *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Nov 22 08:30:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D5D20C4BE69; Tue, 22 Nov 2016 08:30:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A52B0A5D; Tue, 22 Nov 2016 08:30:33 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM8UWkf029736; Tue, 22 Nov 2016 08:30:32 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM8UWIH029735; Tue, 22 Nov 2016 08:30:32 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201611220830.uAM8UWIH029735@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Tue, 22 Nov 2016 08:30:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308958 - head/contrib/ntp/sntp X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 08:30:33 -0000 Author: delphij Date: Tue Nov 22 08:30:32 2016 New Revision: 308958 URL: https://svnweb.freebsd.org/changeset/base/308958 Log: Replay r304721 in contrib/ so the change won't get lost across import. Modified: head/contrib/ntp/sntp/sntp.1sntpmdoc Modified: head/contrib/ntp/sntp/sntp.1sntpmdoc ============================================================================== --- head/contrib/ntp/sntp/sntp.1sntpmdoc Tue Nov 22 08:27:49 2016 (r308957) +++ head/contrib/ntp/sntp/sntp.1sntpmdoc Tue Nov 22 08:30:32 2016 (r308958) @@ -211,7 +211,7 @@ of seconds specified before giving up. more than enough for a unicast response. If \fBsntp\fP is only waiting for a broadcast response a longer timeout is likely needed. -.It Fl \-wait , " Fl \-no\-wait" +.It Fl \-wait , Fl \-no\-wait Wait for pending replies (if not setting the time). The \fIno\-wait\fP form will disable the option. This option is enabled by default. From owner-svn-src-head@freebsd.org Tue Nov 22 09:39:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3156EC4F436; Tue, 22 Nov 2016 09:39:32 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0E7DCFA5; Tue, 22 Nov 2016 09:39:31 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAM9dVRU058743; Tue, 22 Nov 2016 09:39:31 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAM9dVOk058742; Tue, 22 Nov 2016 09:39:31 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611220939.uAM9dVOk058742@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 Nov 2016 09:39:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308965 - head/sys/arm/arm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 09:39:32 -0000 Author: andrew Date: Tue Nov 22 09:39:31 2016 New Revision: 308965 URL: https://svnweb.freebsd.org/changeset/base/308965 Log: Split out the FDT parts of the pmu driver to make way for adding ACPI support. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm/arm/pmu.c Modified: head/sys/arm/arm/pmu.c ============================================================================== --- head/sys/arm/arm/pmu.c Tue Nov 22 09:37:31 2016 (r308964) +++ head/sys/arm/arm/pmu.c Tue Nov 22 09:39:31 2016 (r308965) @@ -36,6 +36,7 @@ __FBSDID("$FreeBSD$"); #include "opt_hwpmc_hooks.h" +#include "opt_platform.h" #include #include @@ -49,9 +50,11 @@ __FBSDID("$FreeBSD$"); #include #include +#ifdef FDT #include #include #include +#endif #include #include @@ -69,22 +72,6 @@ struct pmu_softc { void *ih[MAX_RLEN]; }; -static struct ofw_compat_data compat_data[] = { - {"arm,armv8-pmuv3", 1}, - {"arm,cortex-a17-pmu", 1}, - {"arm,cortex-a15-pmu", 1}, - {"arm,cortex-a12-pmu", 1}, - {"arm,cortex-a9-pmu", 1}, - {"arm,cortex-a8-pmu", 1}, - {"arm,cortex-a7-pmu", 1}, - {"arm,cortex-a5-pmu", 1}, - {"arm,arm11mpcore-pmu", 1}, - {"arm,arm1176-pmu", 1}, - {"arm,arm1136-pmu", 1}, - {"qcom,krait-pmu", 1}, - {NULL, 0} -}; - static struct resource_spec pmu_spec[] = { { SYS_RES_IRQ, 0, RF_ACTIVE }, /* We don't currently handle pmu events, other than on cpu 0 */ @@ -144,21 +131,6 @@ pmu_intr(void *arg) } static int -pmu_probe(device_t dev) -{ - - if (!ofw_bus_status_okay(dev)) - return (ENXIO); - - if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { - device_set_desc(dev, "Performance Monitoring Unit"); - return (BUS_PROBE_DEFAULT); - } - - return (ENXIO); -} - -static int pmu_attach(device_t dev) { struct pmu_softc *sc; @@ -206,18 +178,51 @@ pmu_attach(device_t dev) return (0); } -static device_method_t pmu_methods[] = { - DEVMETHOD(device_probe, pmu_probe), +#ifdef FDT +static struct ofw_compat_data compat_data[] = { + {"arm,armv8-pmuv3", 1}, + {"arm,cortex-a17-pmu", 1}, + {"arm,cortex-a15-pmu", 1}, + {"arm,cortex-a12-pmu", 1}, + {"arm,cortex-a9-pmu", 1}, + {"arm,cortex-a8-pmu", 1}, + {"arm,cortex-a7-pmu", 1}, + {"arm,cortex-a5-pmu", 1}, + {"arm,arm11mpcore-pmu", 1}, + {"arm,arm1176-pmu", 1}, + {"arm,arm1136-pmu", 1}, + {"qcom,krait-pmu", 1}, + {NULL, 0} +}; + +static int +pmu_fdt_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data != 0) { + device_set_desc(dev, "Performance Monitoring Unit"); + return (BUS_PROBE_DEFAULT); + } + + return (ENXIO); +} + +static device_method_t pmu_fdt_methods[] = { + DEVMETHOD(device_probe, pmu_fdt_probe), DEVMETHOD(device_attach, pmu_attach), { 0, 0 } }; -static driver_t pmu_driver = { +static driver_t pmu_fdt_driver = { "pmu", - pmu_methods, + pmu_fdt_methods, sizeof(struct pmu_softc), }; -static devclass_t pmu_devclass; +static devclass_t pmu_fdt_devclass; -DRIVER_MODULE(pmu, simplebus, pmu_driver, pmu_devclass, 0, 0); +DRIVER_MODULE(pmu, simplebus, pmu_fdt_driver, pmu_fdt_devclass, 0, 0); +#endif From owner-svn-src-head@freebsd.org Tue Nov 22 10:06:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BF4CC4F1E5; Tue, 22 Nov 2016 10:06:41 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AD65413B5; Tue, 22 Nov 2016 10:06:40 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMA6dwL071353; Tue, 22 Nov 2016 10:06:39 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMA6d5w071352; Tue, 22 Nov 2016 10:06:39 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611221006.uAMA6d5w071352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Nov 2016 10:06:39 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308969 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 10:06:41 -0000 Author: kib Date: Tue Nov 22 10:06:39 2016 New Revision: 308969 URL: https://svnweb.freebsd.org/changeset/base/308969 Log: Restore vnode pager statistic for buffer pagers. Reviewed by: alc, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D8585 Modified: head/sys/kern/vfs_bio.c Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Tue Nov 22 09:52:33 2016 (r308968) +++ head/sys/kern/vfs_bio.c Tue Nov 22 10:06:39 2016 (r308969) @@ -4707,7 +4707,7 @@ vfs_bio_getpages(struct vnode *vp, vm_pa daddr_t lbn, lbnp; vm_ooffset_t la, lb, poff, poffe; long bsize; - int bo_bs, br_flags, error, i; + int bo_bs, br_flags, error, i, pgsin, pgsin_a, pgsin_b; bool redo, lpart; object = vp->v_object; @@ -4717,17 +4717,26 @@ vfs_bio_getpages(struct vnode *vp, vm_pa return (VM_PAGER_BAD); lpart = la + PAGE_SIZE > object->un_pager.vnp.vnp_size; bo_bs = get_blksize(vp, get_lblkno(vp, IDX_TO_OFF(ma[0]->pindex))); - if (rbehind != NULL) { - lb = IDX_TO_OFF(ma[0]->pindex); - *rbehind = OFF_TO_IDX(lb - rounddown2(lb, bo_bs)); - } - if (rahead != NULL) { - *rahead = OFF_TO_IDX(roundup2(la, bo_bs) - la); - if (la + IDX_TO_OFF(*rahead) >= object->un_pager.vnp.vnp_size) { - *rahead = OFF_TO_IDX(roundup2(object->un_pager. - vnp.vnp_size, PAGE_SIZE) - la); - } - } + + /* + * Calculate read-ahead, behind and total pages. + */ + pgsin = count; + lb = IDX_TO_OFF(ma[0]->pindex); + pgsin_b = OFF_TO_IDX(lb - rounddown2(lb, bo_bs)); + pgsin += pgsin_b; + if (rbehind != NULL) + *rbehind = pgsin_b; + pgsin_a = OFF_TO_IDX(roundup2(la, bo_bs) - la); + if (la + IDX_TO_OFF(pgsin_a) >= object->un_pager.vnp.vnp_size) + pgsin_a = OFF_TO_IDX(roundup2(object->un_pager.vnp.vnp_size, + PAGE_SIZE) - la); + pgsin += pgsin_a; + if (rahead != NULL) + *rahead = pgsin_a; + PCPU_INC(cnt.v_vnodein); + PCPU_ADD(cnt.v_vnodepgsin, pgsin); + br_flags = (mp != NULL && (mp->mnt_kern_flag & MNTK_UNMAPPED_BUFS) != 0) ? GB_UNMAPPED : 0; VM_OBJECT_WLOCK(object); From owner-svn-src-head@freebsd.org Tue Nov 22 10:25:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DA5CDC4FC68; Tue, 22 Nov 2016 10:25:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AA0E5A0E; Tue, 22 Nov 2016 10:25:00 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMAOxM8079688; Tue, 22 Nov 2016 10:24:59 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMAOxm7079686; Tue, 22 Nov 2016 10:24:59 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611221024.uAMAOxm7079686@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Nov 2016 10:24:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308973 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 10:25:01 -0000 Author: kib Date: Tue Nov 22 10:24:59 2016 New Revision: 308973 URL: https://svnweb.freebsd.org/changeset/base/308973 Log: Minor cleanup, remove unneeded XXX comments and unused re-define. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Tue Nov 22 10:20:06 2016 (r308972) +++ head/sys/fs/nfsclient/nfs_clbio.c Tue Nov 22 10:24:59 2016 (r308973) @@ -96,8 +96,8 @@ ncl_getpages(struct vop_getpages_args *a vp = ap->a_vp; np = VTONFS(vp); - td = curthread; /* XXX */ - cred = curthread->td_ucred; /* XXX */ + td = curthread; + cred = curthread->td_ucred; nmp = VFSTONFS(vp->v_mount); pages = ap->a_m; npages = ap->a_count; Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Nov 22 10:20:06 2016 (r308972) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Nov 22 10:24:59 2016 (r308973) @@ -105,15 +105,6 @@ extern int nfsrv_useacl; extern int nfscl_debuglevel; MALLOC_DECLARE(M_NEWNFSREQ); -/* - * Ifdef for FreeBSD-current merged buffer cache. It is unfortunate that these - * calls are not in getblk() and brelse() so that they would not be necessary - * here. - */ -#ifndef B_VMIO -#define vfs_busy_pages(bp, f) -#endif - static vop_read_t nfsfifo_read; static vop_write_t nfsfifo_write; static vop_close_t nfsfifo_close; From owner-svn-src-head@freebsd.org Tue Nov 22 10:58:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DD0D6C4F7B1; Tue, 22 Nov 2016 10:58:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ACF8633A; Tue, 22 Nov 2016 10:58:25 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMAwO5T092087; Tue, 22 Nov 2016 10:58:24 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMAwOhB092085; Tue, 22 Nov 2016 10:58:24 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611221058.uAMAwOhB092085@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Nov 2016 10:58:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308980 - head/sys/fs/nfsclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 10:58:26 -0000 Author: kib Date: Tue Nov 22 10:58:24 2016 New Revision: 308980 URL: https://svnweb.freebsd.org/changeset/base/308980 Log: Use buffer pager for NFS. The pager, due to its construction, implements clustering for the page-ins. In particular, buildworld load demonstrates reduction of the READ RPCs from 39k down to 24k. No change in real or CPU time was observed. Discussed with, and measured by: bde No objections from: rmacklem Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/nfsclient/nfs_clbio.c head/sys/fs/nfsclient/nfs_clvnops.c Modified: head/sys/fs/nfsclient/nfs_clbio.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clbio.c Tue Nov 22 10:52:58 2016 (r308979) +++ head/sys/fs/nfsclient/nfs_clbio.c Tue Nov 22 10:58:24 2016 (r308980) @@ -78,6 +78,40 @@ static int nfs_directio_write(struct vno /* * Vnode op for VM getpages. */ +SYSCTL_DECL(_vfs_nfs); +static int use_buf_pager = 1; +SYSCTL_INT(_vfs_nfs, OID_AUTO, use_buf_pager, CTLFLAG_RWTUN, + &use_buf_pager, 0, + "Use buffer pager instead of direct readrpc call"); + +static daddr_t +ncl_gbp_getblkno(struct vnode *vp, vm_ooffset_t off) +{ + + return (off / vp->v_bufobj.bo_bsize); +} + +static int +ncl_gbp_getblksz(struct vnode *vp, daddr_t lbn) +{ + struct nfsnode *np; + u_quad_t nsize; + int biosize, bcount; + + np = VTONFS(vp); + mtx_lock(&np->n_mtx); + nsize = np->n_size; + mtx_unlock(&np->n_mtx); + + biosize = vp->v_bufobj.bo_bsize; + bcount = biosize; + if ((off_t)lbn * biosize >= nsize) + bcount = 0; + else if ((off_t)(lbn + 1) * biosize > nsize) + bcount = nsize - (off_t)lbn * biosize; + return (bcount); +} + int ncl_getpages(struct vop_getpages_args *ap) { @@ -126,6 +160,10 @@ ncl_getpages(struct vop_getpages_args *a } else mtx_unlock(&nmp->nm_mtx); + if (use_buf_pager) + return (vfs_bio_getpages(vp, pages, npages, ap->a_rbehind, + ap->a_rahead, ncl_gbp_getblkno, ncl_gbp_getblksz)); + /* * If the requested page is partially valid, just return it and * allow the pager to zero-out the blanks. Partially valid pages Modified: head/sys/fs/nfsclient/nfs_clvnops.c ============================================================================== --- head/sys/fs/nfsclient/nfs_clvnops.c Tue Nov 22 10:52:58 2016 (r308979) +++ head/sys/fs/nfsclient/nfs_clvnops.c Tue Nov 22 10:58:24 2016 (r308980) @@ -2569,13 +2569,20 @@ ncl_commit(struct vnode *vp, u_quad_t of static int nfs_strategy(struct vop_strategy_args *ap) { - struct buf *bp = ap->a_bp; + struct buf *bp; + struct vnode *vp; struct ucred *cr; + bp = ap->a_bp; + vp = ap->a_vp; + KASSERT(bp->b_vp == vp, ("missing b_getvp")); KASSERT(!(bp->b_flags & B_DONE), ("nfs_strategy: buffer %p unexpectedly marked B_DONE", bp)); BUF_ASSERT_HELD(bp); + if (vp->v_type == VREG && bp->b_blkno == bp->b_lblkno) + bp->b_blkno = bp->b_lblkno * (vp->v_bufobj.bo_bsize / + DEV_BSIZE); if (bp->b_iocmd == BIO_READ) cr = bp->b_rcred; else @@ -2587,8 +2594,8 @@ nfs_strategy(struct vop_strategy_args *a * otherwise just do it ourselves. */ if ((bp->b_flags & B_ASYNC) == 0 || - ncl_asyncio(VFSTONFS(ap->a_vp->v_mount), bp, NOCRED, curthread)) - (void) ncl_doio(ap->a_vp, bp, cr, curthread, 1); + ncl_asyncio(VFSTONFS(vp->v_mount), bp, NOCRED, curthread)) + (void) ncl_doio(vp, bp, cr, curthread, 1); return (0); } From owner-svn-src-head@freebsd.org Tue Nov 22 11:44:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73A7BC4FB12; Tue, 22 Nov 2016 11:44:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 402E979C; Tue, 22 Nov 2016 11:44:31 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMBiULo012115; Tue, 22 Nov 2016 11:44:30 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMBiU2X012114; Tue, 22 Nov 2016 11:44:30 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611221144.uAMBiU2X012114@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Tue, 22 Nov 2016 11:44:30 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308985 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 11:44:31 -0000 Author: avg Date: Tue Nov 22 11:44:30 2016 New Revision: 308985 URL: https://svnweb.freebsd.org/changeset/base/308985 Log: revert r304520, set canmount=on is not supposed to mount the filesystem Not sure where I got the idea that it should. See https://github.com/openzfs/openzfs/pull/218 Reported by: mahrens Pointyhat to: avg MFC after: 5 days Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Nov 22 11:35:29 2016 (r308984) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Tue Nov 22 11:44:30 2016 (r308985) @@ -1615,17 +1615,12 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl assert(cl_idx < nvl_len); /* * We don't want to unmount & remount the dataset when changing - * its canmount property. We only use the changelist logic to - * unmount when setting canmount=off for a mounted filesystem - * or when setting canmount=on for an unmounted filesystem. - * For all other changes to canmount property the filesystem - * remains the same. + * its canmount property to 'on' or 'noauto'. We only use + * the changelist logic to unmount when setting canmount=off. */ if (prop != ZFS_PROP_CANMOUNT || (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF && - zfs_is_mounted(zhp, NULL)) || - (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_ON && - !zfs_is_mounted(zhp, NULL))) { + zfs_is_mounted(zhp, NULL))) { cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); if (cls[cl_idx] == NULL) goto error; From owner-svn-src-head@freebsd.org Tue Nov 22 13:24:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BAD2C4DBB4; Tue, 22 Nov 2016 13:24:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5DDC0F10; Tue, 22 Nov 2016 13:24:58 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMDOvC6052737; Tue, 22 Nov 2016 13:24:57 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMDOvJn052736; Tue, 22 Nov 2016 13:24:57 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611221324.uAMDOvJn052736@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Tue, 22 Nov 2016 13:24:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308995 - head/sys/fs/udf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 13:24:58 -0000 Author: kib Date: Tue Nov 22 13:24:57 2016 New Revision: 308995 URL: https://svnweb.freebsd.org/changeset/base/308995 Log: On error, bread(9) zeroes buffer pointer, do not dereference it. See r294954 for the bread(9) change and r297401 for similar cd9660 fix. Reported and tested by: Joshua Kinard PR: 214705 Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/fs/udf/udf_vnops.c Modified: head/sys/fs/udf/udf_vnops.c ============================================================================== --- head/sys/fs/udf/udf_vnops.c Tue Nov 22 12:29:24 2016 (r308994) +++ head/sys/fs/udf/udf_vnops.c Tue Nov 22 13:24:57 2016 (r308995) @@ -487,11 +487,11 @@ udf_read(struct vop_read_args *ap) } else { error = bread(vp, lbn, size, NOCRED, &bp); } - n = min(n, size - bp->b_resid); - if (error) { + if (error != 0) { brelse(bp); return (error); } + n = min(n, size - bp->b_resid); error = uiomove(bp->b_data + on, (int)n, uio); brelse(bp); From owner-svn-src-head@freebsd.org Tue Nov 22 13:30:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1BDF9C4DD2C; Tue, 22 Nov 2016 13:30:09 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2E9211DB; Tue, 22 Nov 2016 13:30:08 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMDU8ik052992; Tue, 22 Nov 2016 13:30:08 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMDU7fg052989; Tue, 22 Nov 2016 13:30:07 GMT (envelope-from des@FreeBSD.org) Message-Id: <201611221330.uAMDU7fg052989@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Tue, 22 Nov 2016 13:30:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r308996 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 13:30:09 -0000 Author: des Date: Tue Nov 22 13:30:07 2016 New Revision: 308996 URL: https://svnweb.freebsd.org/changeset/base/308996 Log: Refactor fetch_connect() and fetch_bind() to improve readability and avoid repeating the same DNS lookups. MFC after: 3 weeks Modified: head/lib/libfetch/common.c head/lib/libfetch/common.h head/lib/libfetch/ftp.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Tue Nov 22 13:24:57 2016 (r308995) +++ head/lib/libfetch/common.c Tue Nov 22 13:30:07 2016 (r308996) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 1998-2014 Dag-Erling Smørgrav + * Copyright (c) 1998-2016 Dag-Erling Smørgrav * Copyright (c) 2013 Michael Gmelin * All rights reserved. * @@ -241,27 +241,83 @@ fetch_ref(conn_t *conn) /* + * Resolve an address + */ +struct addrinfo * +fetch_resolve(const char *addr, int port, int af) +{ + char hbuf[256], sbuf[8]; + struct addrinfo hints, *res; + const char *sep, *host, *service; + int err, len; + + /* split address if necessary */ + err = EAI_SYSTEM; + if ((sep = strchr(addr, ':')) != NULL) { + len = snprintf(hbuf, sizeof(hbuf), + "%.*s", (int)(sep - addr), addr); + if (len < 0) + return (NULL); + if (len >= (int)sizeof(hbuf)) { + errno = ENAMETOOLONG; + fetch_syserr(); + return (NULL); + } + host = hbuf; + service = sep + 1; + } else if (port != 0) { + if (port < 1 || port > 65535) { + errno = EINVAL; + fetch_syserr(); + return (NULL); + } + if (snprintf(sbuf, sizeof(sbuf), "%d", port) < 0) { + fetch_syserr(); + return (NULL); + } + host = addr; + service = sbuf; + } else { + host = addr; + service = NULL; + } + + /* resolve */ + fetch_info("resolving host = %s service = %s af = %d", + host, service, af); + memset(&hints, 0, sizeof(hints)); + hints.ai_family = af; + hints.ai_socktype = SOCK_STREAM; + hints.ai_flags = AI_ADDRCONFIG; + if ((err = getaddrinfo(host, service, &hints, &res)) != 0) { + netdb_seterr(err); + fetch_info("getaddrinfo() failed: %s", gai_strerror(err)); + return (NULL); + } + fetch_info("getaddrinfo() succeeded %p", res); + return (res); +} + + + +/* * Bind a socket to a specific local address */ int fetch_bind(int sd, int af, const char *addr) { - struct addrinfo hints, *res, *res0; + struct addrinfo *cliai, *ai; int err; - memset(&hints, 0, sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - if ((err = getaddrinfo(addr, NULL, &hints, &res0)) != 0) + if ((cliai = fetch_resolve(addr, 0, af)) == NULL) return (-1); - for (res = res0; res; res = res->ai_next) - if (bind(sd, res->ai_addr, res->ai_addrlen) == 0) { - freeaddrinfo(res0); - return (0); - } - freeaddrinfo(res0); - return (-1); + for (ai = cliai; ai != NULL; ai = ai->ai_next) + if ((err = bind(sd, ai->ai_addr, ai->ai_addrlen)) == 0) + break; + if (err != 0) + fetch_syserr(); + freeaddrinfo(cliai); + return (err == 0 ? 0 : -1); } @@ -271,59 +327,77 @@ fetch_bind(int sd, int af, const char *a conn_t * fetch_connect(const char *host, int port, int af, int verbose) { - conn_t *conn; - char pbuf[10]; + struct addrinfo *cais = NULL, *sais = NULL, *cai, *sai; const char *bindaddr; - struct addrinfo hints, *res, *res0; - int sd, err; + conn_t *conn = NULL; + int err = 0, sd = -1; DEBUG(fprintf(stderr, "---> %s:%d\n", host, port)); + /* resolve server address */ if (verbose) - fetch_info("looking up %s", host); + fetch_info("resolving server address: %s:%d", host, port); + if ((sais = fetch_resolve(host, port, af)) == NULL) + goto fail; + fetch_info("resolved"); - /* look up host name and set up socket address structure */ - snprintf(pbuf, sizeof(pbuf), "%d", port); - memset(&hints, 0, sizeof(hints)); - hints.ai_family = af; - hints.ai_socktype = SOCK_STREAM; - hints.ai_protocol = 0; - if ((err = getaddrinfo(host, pbuf, &hints, &res0)) != 0) { - netdb_seterr(err); - return (NULL); - } + /* resolve client address */ bindaddr = getenv("FETCH_BIND_ADDRESS"); + if (bindaddr != NULL && *bindaddr != '\0') { + if (verbose) + fetch_info("resolving client address: %s", bindaddr); + if ((cais = fetch_resolve(bindaddr, 0, af)) == NULL) + goto fail; + } - if (verbose) - fetch_info("connecting to %s:%d", host, port); - - /* try to connect */ - for (sd = -1, res = res0; res; sd = -1, res = res->ai_next) { - if ((sd = socket(res->ai_family, res->ai_socktype, - res->ai_protocol)) == -1) - continue; - if (bindaddr != NULL && *bindaddr != '\0' && - fetch_bind(sd, res->ai_family, bindaddr) != 0) { - fetch_info("failed to bind to '%s'", bindaddr); - close(sd); - continue; + /* try each server address in turn */ + for (err = 0, sai = sais; sai != NULL; sai = sai->ai_next) { + /* open socket */ + if ((sd = socket(sai->ai_family, SOCK_STREAM, 0)) < 0) + goto syserr; + /* attempt to bind to client address */ + for (err = 0, cai = cais; cai != NULL; cai = cai->ai_next) { + if (cai->ai_family != sai->ai_family) + continue; + if ((err = bind(sd, cai->ai_addr, cai->ai_addrlen)) == 0) + break; + } + if (err != 0) { + if (verbose) + fetch_info("failed to bind to %s", bindaddr); + goto syserr; } - if (connect(sd, res->ai_addr, res->ai_addrlen) == 0 && - fcntl(sd, F_SETFL, O_NONBLOCK) == 0) + /* attempt to connect to server address */ + if ((err = connect(sd, sai->ai_addr, sai->ai_addrlen)) == 0) break; + /* clean up before next attempt */ close(sd); + sd = -1; } - freeaddrinfo(res0); - if (sd == -1) { - fetch_syserr(); - return (NULL); + if (err != 0) { + if (verbose) + fetch_info("failed to connect to %s:%s", host, port); + goto syserr; } - if ((conn = fetch_reopen(sd)) == NULL) { - fetch_syserr(); - close(sd); - } + if ((conn = fetch_reopen(sd)) == NULL) + goto syserr; + if (cais != NULL) + freeaddrinfo(cais); + if (sais != NULL) + freeaddrinfo(sais); return (conn); +syserr: + fetch_syserr(); + goto fail; +fail: + if (sd >= 0) + close(sd); + if (cais != NULL) + freeaddrinfo(cais); + if (sais != NULL) + freeaddrinfo(sais); + return (NULL); } #ifdef WITH_SSL Modified: head/lib/libfetch/common.h ============================================================================== --- head/lib/libfetch/common.h Tue Nov 22 13:24:57 2016 (r308995) +++ head/lib/libfetch/common.h Tue Nov 22 13:30:07 2016 (r308996) @@ -76,6 +76,7 @@ void fetch_syserr(void); void fetch_info(const char *, ...); int fetch_default_port(const char *); int fetch_default_proxy_port(const char *); +struct addrinfo *fetch_resolve(const char *, int, int); int fetch_bind(int, int, const char *); conn_t *fetch_connect(const char *, int, int, int); conn_t *fetch_reopen(int); Modified: head/lib/libfetch/ftp.c ============================================================================== --- head/lib/libfetch/ftp.c Tue Nov 22 13:24:57 2016 (r308995) +++ head/lib/libfetch/ftp.c Tue Nov 22 13:30:07 2016 (r308996) @@ -768,8 +768,8 @@ ftp_transfer(conn_t *conn, const char *o fetch_info("opening data connection"); bindaddr = getenv("FETCH_BIND_ADDRESS"); if (bindaddr != NULL && *bindaddr != '\0' && - fetch_bind(sd, sa.ss_family, bindaddr) != 0) - goto sysouch; + (e = fetch_bind(sd, sa.ss_family, bindaddr)) != 0) + goto ouch; if (connect(sd, (struct sockaddr *)&sa, sa.ss_len) == -1) goto sysouch; From owner-svn-src-head@freebsd.org Tue Nov 22 16:00:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4D764C4CA11; Tue, 22 Nov 2016 16:00:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1DD3B17D6; Tue, 22 Nov 2016 16:00:19 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMG0ILx015255; Tue, 22 Nov 2016 16:00:18 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMG0Iti015254; Tue, 22 Nov 2016 16:00:18 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201611221600.uAMG0Iti015254@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Tue, 22 Nov 2016 16:00:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309006 - head/lib/libc/gen X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 16:00:19 -0000 Author: emaste Date: Tue Nov 22 16:00:18 2016 New Revision: 309006 URL: https://svnweb.freebsd.org/changeset/base/309006 Log: remove unnecessary vm includes from setproctitle vm headers were needed only for the PS_STRINGS fallback, which was removed in r297888. MFC after: 1 week Sponsored by: The FreeBSD Foundation Modified: head/lib/libc/gen/setproctitle.c Modified: head/lib/libc/gen/setproctitle.c ============================================================================== --- head/lib/libc/gen/setproctitle.c Tue Nov 22 15:28:20 2016 (r309005) +++ head/lib/libc/gen/setproctitle.c Tue Nov 22 16:00:18 2016 (r309006) @@ -23,10 +23,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include -#include -#include - #include #include #include From owner-svn-src-head@freebsd.org Tue Nov 22 17:36:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1A7BC50FF4; Tue, 22 Nov 2016 17:36:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A7C1B1F33; Tue, 22 Nov 2016 17:36:17 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMHaGCM055000; Tue, 22 Nov 2016 17:36:16 GMT (envelope-from adrian@FreeBSD.org) Received: (from adrian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMHaGZw054999; Tue, 22 Nov 2016 17:36:16 GMT (envelope-from adrian@FreeBSD.org) Message-Id: <201611221736.uAMHaGZw054999@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: adrian set sender to adrian@FreeBSD.org using -f From: Adrian Chadd Date: Tue, 22 Nov 2016 17:36:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309014 - head/sys/net80211 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 17:36:18 -0000 Author: adrian Date: Tue Nov 22 17:36:16 2016 New Revision: 309014 URL: https://svnweb.freebsd.org/changeset/base/309014 Log: [net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this." TODO: * drink real coffee before committing in the morning, or there's a high risk of more obviously self-evident commits being turned into attempts at humour. Reported by: cem, Coverity CID 1366219 Modified: head/sys/net80211/ieee80211_crypto_ccmp.c Modified: head/sys/net80211/ieee80211_crypto_ccmp.c ============================================================================== --- head/sys/net80211/ieee80211_crypto_ccmp.c Tue Nov 22 17:14:09 2016 (r309013) +++ head/sys/net80211/ieee80211_crypto_ccmp.c Tue Nov 22 17:36:16 2016 (r309014) @@ -241,7 +241,7 @@ ccmp_decap(struct ieee80211_key *k, stru rxs = ieee80211_get_rx_params_ptr(m); - if ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP)) + if ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP)) goto finish; /* @@ -286,7 +286,7 @@ finish: /* * Copy up 802.11 header and strip crypto bits. */ - if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { + if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + ccmp.ic_header, hdrlen); m_adj(m, ccmp.ic_header); @@ -295,13 +295,13 @@ finish: /* * XXX TODO: see if MMIC_STRIP also covers CCMP MIC trailer. */ - if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP))) + if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_MMIC_STRIP))) m_adj(m, -ccmp.ic_trailer); /* * Ok to update rsc now. */ - if (! ((rxs != NULL) & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { + if (! ((rxs != NULL) && (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP))) { k->wk_keyrsc[tid] = pn; } From owner-svn-src-head@freebsd.org Tue Nov 22 17:59:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 80E7CC5085C; Tue, 22 Nov 2016 17:59:38 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-it0-f65.google.com (mail-it0-f65.google.com [209.85.214.65]) (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 542961244; Tue, 22 Nov 2016 17:59:37 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-it0-f65.google.com with SMTP id n68so2723818itn.3; Tue, 22 Nov 2016 09:59:37 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=KGGNzII8sa/GnCIR6f/ypLwDBsjNcTDF+KsYANCQlrs=; b=R5Ymj5+c4labMXCHXNjY/Zy7aKqND7AEZG0sar24Oms/bNtNFtX/U0JHvkYOYOdH/i P5Bu4ZIjIiqV+7jlzZLVf5A7lFmo+wVQ3m/lOIyGi7Wkz10+Y6Kp1SlEVgneRQpU/2EW WTZiaVBX8/ohYS+9lFcyhaxg+ikLq36HqADX2s2bpKzZlZcELp+bnGGblVa21W6kiBRd JTlHh5TGdw1nT/5Dmj9zm8EPYuXC3N59QFHLBvUooJw6aON34zOTZV9H0IFhJyKLEDfF 0jpiXzm0cFerteIXzaz4vk3ThF6UKJ5B81EIpffkwR+4VNmvTF+8vWWksPBX43Nw92ef wVFg== X-Gm-Message-State: AKaTC00rjJSp+jYmiiTJxzDIhYN4d8+E2uM77WPLAY/BDhIWgKJ+qC8IImKw0xYPJALFEQ== X-Received: by 10.36.61.146 with SMTP id n140mr3650328itn.78.1479837570558; Tue, 22 Nov 2016 09:59:30 -0800 (PST) Received: from mail-it0-f52.google.com (mail-it0-f52.google.com. [209.85.214.52]) by smtp.gmail.com with ESMTPSA id m127sm1117414itc.19.2016.11.22.09.59.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 09:59:30 -0800 (PST) Received: by mail-it0-f52.google.com with SMTP id j191so18349998ita.1; Tue, 22 Nov 2016 09:59:30 -0800 (PST) X-Received: by 10.36.99.68 with SMTP id j65mr3455841itc.119.1479837569931; Tue, 22 Nov 2016 09:59:29 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.109.68 with HTTP; Tue, 22 Nov 2016 09:59:29 -0800 (PST) In-Reply-To: <201611172000.uAHK0KPS084672@repo.freebsd.org> References: <201611172000.uAHK0KPS084672@repo.freebsd.org> From: Conrad Meyer Date: Tue, 22 Nov 2016 09:59:29 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r308777 - head/sys/dev/iwm To: =?UTF-8?B?SW1yZSBWYWTDoXN6?= Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 17:59:38 -0000 Hi, See inline below. On Thu, Nov 17, 2016 at 12:00 PM, Imre Vad=C3=A1sz wr= ote: > Author: ivadasz > Date: Thu Nov 17 20:00:20 2016 > New Revision: 308777 > URL: https://svnweb.freebsd.org/changeset/base/308777 > > Log: > [iwm] Sync iwm_nvm_read_chunk() function with Linux iwlwifi. > > This fixes an error handling detail in iwm_nvm_read_chunk(), where an > error response from the firmware for an NVM read shouldn't be fatal if > the offset was non-zero. > > Approved by: adrian (mentor) > Obtained from: DragonFlyBSD git 250a1c33fca1725121fe499f9cebc902= 67d209f9 > Differential Revision: https://reviews.freebsd.org/D8542 > > Modified: > head/sys/dev/iwm/if_iwm.c > > Modified: head/sys/dev/iwm/if_iwm.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/dev/iwm/if_iwm.c Thu Nov 17 19:38:30 2016 (r308776) > +++ head/sys/dev/iwm/if_iwm.c Thu Nov 17 20:00:20 2016 (r308777) > ... > @@ -1684,12 +1686,10 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, > struct iwm_rx_packet *pkt; > struct iwm_host_cmd cmd =3D { > .id =3D IWM_NVM_ACCESS_CMD, > - .flags =3D IWM_CMD_SYNC | IWM_CMD_WANT_SKB | > - IWM_CMD_SEND_IN_RFKILL, > + .flags =3D IWM_CMD_WANT_SKB | IWM_CMD_SEND_IN_RFKILL, > .data =3D { &nvm_access_cmd, }, > }; > - int ret, offset_read; > - size_t bytes_read; > + int ret, bytes_read, offset_read; > uint8_t *resp_data; > > cmd.len[0] =3D sizeof(struct iwm_nvm_access_cmd); > @@ -1718,9 +1718,26 @@ iwm_nvm_read_chunk(struct iwm_softc *sc, > offset_read =3D le16toh(nvm_resp->offset); > resp_data =3D nvm_resp->data; > if (ret) { > - IWM_DPRINTF(sc, IWM_DEBUG_RESET, > - "NVM access command failed with status %d\n", ret); > - ret =3D EINVAL; > + if ((offset !=3D 0) && > + (ret =3D=3D IWM_READ_NVM_CHUNK_NOT_VALID_ADDRESS)) { Coverity reports that this is deadcode, because 'offset' is always zero at this point. Perhaps this should be 'offset_read' or 'nvm_access_cmd.offset'? CID 1366220. Best, Conrad > + /* > + * meaning of NOT_VALID_ADDRESS: > + * driver try to read chunk from address that is > + * multiple of 2K and got an error since addr is = empty. > + * meaning of (offset !=3D 0): driver already > + * read valid data from another chunk so this cas= e > + * is not an error. > + */ > + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESE= T, > + "NVM access command failed on offset = 0x%x since that section size is multiple 2K\n", > + offset); > + *len =3D 0; > + ret =3D 0; > + } else { > + IWM_DPRINTF(sc, IWM_DEBUG_EEPROM | IWM_DEBUG_RESE= T, > + "NVM access command failed with statu= s %d\n", ret); > + ret =3D EIO; > + } > goto exit; > } From owner-svn-src-head@freebsd.org Tue Nov 22 18:11:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C272C50CD2; Tue, 22 Nov 2016 18:11:46 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) (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 4D8CD19FE; Tue, 22 Nov 2016 18:11:45 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f171.google.com with SMTP id j65so74385238iof.0; Tue, 22 Nov 2016 10:11:45 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=ftcWKKBe/WZC0PXPm++JuugdR+OeA9MC/tWhB7fW/KU=; b=aApLm8RsQP/8eF93GeEDrXtckNh0FqW4MZxGJXdz+/gdX1oUV9e8YD16K1XZKdxO/M TALvLrQnssFR1LvjDO/myxXqxyD1YXJydQ/mW1AtOky4edLQ0pgeP/Sf5qIAWWZs8Y5v GjJJe1DxYjhMnN03X1VABcdHjy8ozJScoU5zWLw+47kw2UoRLL7a1GuciO8CSFMwk+aq 8+sAmZJIsY2he95rb9WfV7GJEvQP8FXtGzLz3+EpAghc5hnfmGYJL/qIlDRoynF8+hl8 cWRnMhg4R7IriUJE2exn1/V6gk3w1j1sYWO3xIm0D3VFt1deUJk8tsUNCSA6NaT55Sq4 YDtQ== X-Gm-Message-State: AKaTC00Pn0qEWWemes6od7HT92xsaYT+W9giq/qd1hZPq7n1LsLZ6GdxTbIEkIT+J5LDEA== X-Received: by 10.107.142.194 with SMTP id q185mr19757890iod.147.1479838305046; Tue, 22 Nov 2016 10:11:45 -0800 (PST) Received: from mail-it0-f44.google.com (mail-it0-f44.google.com. [209.85.214.44]) by smtp.gmail.com with ESMTPSA id q79sm10115422iod.1.2016.11.22.10.11.44 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 10:11:44 -0800 (PST) Received: by mail-it0-f44.google.com with SMTP id y23so18662933itc.0; Tue, 22 Nov 2016 10:11:44 -0800 (PST) X-Received: by 10.36.74.142 with SMTP id k136mr3501060itb.104.1479838304638; Tue, 22 Nov 2016 10:11:44 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.109.68 with HTTP; Tue, 22 Nov 2016 10:11:44 -0800 (PST) In-Reply-To: References: <201611221736.uAMHaGZw054999@repo.freebsd.org> From: Conrad Meyer Date: Tue, 22 Nov 2016 10:11:44 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r309014 - head/sys/net80211 To: Adrian Chadd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 18:11:46 -0000 On Tue, Nov 22, 2016 at 10:10 AM, Conrad Meyer wrote: > On Tue, Nov 22, 2016 at 9:36 AM, Adrian Chadd wrote: >> Author: adrian >> Date: Tue Nov 22 17:36:16 2016 >> New Revision: 309014 >> URL: https://svnweb.freebsd.org/changeset/base/309014 >> >> Log: >> [net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this." >> >> TODO: >> >> * drink real coffee before committing in the morning, or there's a high >> risk of more obviously self-evident commits being turned into attempts >> at humour. >> >> Reported by: cem, Coverity CID 1366219 > > I think this also addresses CID 1366222, which I didn't see earlier. Oops. Ditto CID 1366225. Sorry for the spam, that's the last ieee80211 one for this week. Best, Conrad From owner-svn-src-head@freebsd.org Tue Nov 22 18:13:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2E34C50D51; Tue, 22 Nov 2016 18:13:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A88441D3F; Tue, 22 Nov 2016 18:13:05 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMID4eh071323; Tue, 22 Nov 2016 18:13:04 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMID4fn071320; Tue, 22 Nov 2016 18:13:04 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611221813.uAMID4fn071320@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 Nov 2016 18:13:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309016 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 18:13:06 -0000 Author: andrew Date: Tue Nov 22 18:13:04 2016 New Revision: 309016 URL: https://svnweb.freebsd.org/changeset/base/309016 Log: Only build acpi_timer.c on x86, it fails on arm64 as it attempts to access an invalid address. It is also unneeded on arm64 as we use the ARM Generic Timer driver. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/conf/files head/sys/conf/files.amd64 head/sys/conf/files.i386 Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Tue Nov 22 17:42:59 2016 (r309015) +++ head/sys/conf/files Tue Nov 22 18:13:04 2016 (r309016) @@ -667,7 +667,6 @@ dev/acpica/acpi_resource.c optional acpi dev/acpica/acpi_smbat.c optional acpi dev/acpica/acpi_thermal.c optional acpi dev/acpica/acpi_throttle.c optional acpi -dev/acpica/acpi_timer.c optional acpi dev/acpica/acpi_video.c optional acpi_video acpi dev/acpica/acpi_dock.c optional acpi_dock acpi dev/adlink/adlink.c optional adlink Modified: head/sys/conf/files.amd64 ============================================================================== --- head/sys/conf/files.amd64 Tue Nov 22 17:42:59 2016 (r309015) +++ head/sys/conf/files.amd64 Tue Nov 22 18:13:04 2016 (r309016) @@ -187,6 +187,7 @@ crypto/via/padlock_cipher.c optional pad crypto/via/padlock_hash.c optional padlock dev/acpica/acpi_if.m standard dev/acpica/acpi_hpet.c optional acpi +dev/acpica/acpi_timer.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp dev/agp/agp_i810.c optional agp Modified: head/sys/conf/files.i386 ============================================================================== --- head/sys/conf/files.i386 Tue Nov 22 17:42:59 2016 (r309015) +++ head/sys/conf/files.i386 Tue Nov 22 18:13:04 2016 (r309016) @@ -332,6 +332,7 @@ dev/viawd/viawd.c optional viawd dev/vmware/vmxnet3/if_vmx.c optional vmx dev/acpica/acpi_if.m standard dev/acpica/acpi_hpet.c optional acpi +dev/acpica/acpi_timer.c optional acpi dev/acpi_support/acpi_wmi_if.m standard dev/wbwd/wbwd.c optional wbwd dev/wpi/if_wpi.c optional wpi From owner-svn-src-head@freebsd.org Tue Nov 22 18:13:48 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5A598C50D9C; Tue, 22 Nov 2016 18:13:48 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3220E1EC0; Tue, 22 Nov 2016 18:13:48 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMIDld4071401; Tue, 22 Nov 2016 18:13:47 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMIDkHQ071392; Tue, 22 Nov 2016 18:13:46 GMT (envelope-from alc@FreeBSD.org) Message-Id: <201611221813.uAMIDkHQ071392@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Tue, 22 Nov 2016 18:13:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309017 - in head/sys: cddl/compat/opensolaris/sys compat/linprocfs fs/tmpfs sys vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 18:13:48 -0000 Author: alc Date: Tue Nov 22 18:13:46 2016 New Revision: 309017 URL: https://svnweb.freebsd.org/changeset/base/309017 Log: Remove PG_CACHED-related fields from struct vmmeter, because they are no longer used. More precisely, they are always zero because the code that decremented and incremented them no longer exists. Bump __FreeBSD_version to mark this change. Reviewed by: kib, markj Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D8583 Modified: head/sys/cddl/compat/opensolaris/sys/kmem.h head/sys/compat/linprocfs/linprocfs.c head/sys/fs/tmpfs/tmpfs_subr.c head/sys/sys/param.h head/sys/sys/vmmeter.h head/sys/vm/swap_pager.c head/sys/vm/vm_meter.c head/sys/vm/vm_page.c head/sys/vm/vnode_pager.c Modified: head/sys/cddl/compat/opensolaris/sys/kmem.h ============================================================================== --- head/sys/cddl/compat/opensolaris/sys/kmem.h Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/cddl/compat/opensolaris/sys/kmem.h Tue Nov 22 18:13:46 2016 (r309017) @@ -77,7 +77,7 @@ void kmem_reap(void); int kmem_debugging(void); void *calloc(size_t n, size_t s); -#define freemem (vm_cnt.v_free_count + vm_cnt.v_cache_count) +#define freemem vm_cnt.v_free_count #define minfree vm_cnt.v_free_min #define heap_arena kmem_arena #define kmem_alloc(size, kmflags) zfs_kmem_alloc((size), (kmflags)) Modified: head/sys/compat/linprocfs/linprocfs.c ============================================================================== --- head/sys/compat/linprocfs/linprocfs.c Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/compat/linprocfs/linprocfs.c Tue Nov 22 18:13:46 2016 (r309017) @@ -176,7 +176,7 @@ linprocfs_domeminfo(PFS_FILL_ARGS) * like unstaticizing it just for linprocfs's sake. */ buffers = 0; - cached = vm_cnt.v_cache_count * PAGE_SIZE; + cached = vm_cnt.v_inactive_count * PAGE_SIZE; sbuf_printf(sb, "MemTotal: %9lu kB\n" Modified: head/sys/fs/tmpfs/tmpfs_subr.c ============================================================================== --- head/sys/fs/tmpfs/tmpfs_subr.c Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/fs/tmpfs/tmpfs_subr.c Tue Nov 22 18:13:46 2016 (r309017) @@ -105,8 +105,7 @@ tmpfs_mem_avail(void) { vm_ooffset_t avail; - avail = swap_pager_avail + vm_cnt.v_free_count + vm_cnt.v_cache_count - - tmpfs_pages_reserved; + avail = swap_pager_avail + vm_cnt.v_free_count - tmpfs_pages_reserved; if (__predict_false(avail < 0)) avail = 0; return (avail); Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/sys/param.h Tue Nov 22 18:13:46 2016 (r309017) @@ -58,7 +58,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200015 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200016 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/vmmeter.h ============================================================================== --- head/sys/sys/vmmeter.h Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/sys/vmmeter.h Tue Nov 22 18:13:46 2016 (r309017) @@ -80,7 +80,6 @@ struct vmmeter { u_int v_pdpages; /* (p) pages analyzed by daemon */ u_int v_pdshortfalls; /* (p) page reclamation shortfalls */ - u_int v_tcached; /* (p) total pages cached */ u_int v_dfree; /* (p) pages freed by daemon */ u_int v_pfree; /* (p) pages freed by exiting processes */ u_int v_tfree; /* (p) total pages freed */ @@ -98,7 +97,6 @@ struct vmmeter { u_int v_inactive_target; /* (c) pages desired inactive */ u_int v_inactive_count; /* (q) pages inactive */ u_int v_laundry_count; /* (q) pages eligible for laundering */ - u_int v_cache_count; /* (f) pages on cache queue */ u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ u_int v_interrupt_free_min; /* (c) reserved pages for int code */ u_int v_free_severe; /* (c) severe page depletion point */ @@ -130,8 +128,7 @@ static inline int vm_page_count_severe(void) { - return (vm_cnt.v_free_severe > vm_cnt.v_free_count + - vm_cnt.v_cache_count); + return (vm_cnt.v_free_severe > vm_cnt.v_free_count); } /* @@ -147,7 +144,7 @@ static inline int vm_page_count_min(void) { - return (vm_cnt.v_free_min > vm_cnt.v_free_count + vm_cnt.v_cache_count); + return (vm_cnt.v_free_min > vm_cnt.v_free_count); } /* @@ -158,8 +155,7 @@ static inline int vm_page_count_target(void) { - return (vm_cnt.v_free_target > vm_cnt.v_free_count + - vm_cnt.v_cache_count); + return (vm_cnt.v_free_target > vm_cnt.v_free_count); } /* @@ -170,8 +166,7 @@ static inline int vm_paging_target(void) { - return (vm_cnt.v_free_target - (vm_cnt.v_free_count + - vm_cnt.v_cache_count)); + return (vm_cnt.v_free_target - vm_cnt.v_free_count); } /* @@ -181,8 +176,7 @@ static inline int vm_paging_needed(void) { - return (vm_cnt.v_free_count + vm_cnt.v_cache_count < - vm_pageout_wakeup_thresh); + return (vm_cnt.v_free_count < vm_pageout_wakeup_thresh); } /* Modified: head/sys/vm/swap_pager.c ============================================================================== --- head/sys/vm/swap_pager.c Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/vm/swap_pager.c Tue Nov 22 18:13:46 2016 (r309017) @@ -2254,10 +2254,8 @@ swapoff_one(struct swdevt *sp, struct uc * of data we will have to page back in, plus an epsilon so * the system doesn't become critically low on swap space. */ - if (vm_cnt.v_free_count + vm_cnt.v_cache_count + swap_pager_avail < - nblks + nswap_lowat) { + if (vm_cnt.v_free_count + swap_pager_avail < nblks + nswap_lowat) return (ENOMEM); - } /* * Prevent further allocations on this device. Modified: head/sys/vm/vm_meter.c ============================================================================== --- head/sys/vm/vm_meter.c Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/vm/vm_meter.c Tue Nov 22 18:13:46 2016 (r309017) @@ -211,7 +211,7 @@ vmtotal(SYSCTL_HANDLER_ARGS) } } mtx_unlock(&vm_object_list_mtx); - total.t_free = vm_cnt.v_free_count + vm_cnt.v_cache_count; + total.t_free = vm_cnt.v_free_count; return (sysctl_handle_opaque(oidp, &total, sizeof(total), req)); } @@ -290,7 +290,6 @@ VM_STATS_VM(v_reactivated, "Pages reacti VM_STATS_VM(v_pdwakeups, "Pagedaemon wakeups"); VM_STATS_VM(v_pdpages, "Pages analyzed by pagedaemon"); VM_STATS_VM(v_pdshortfalls, "Page reclamation shortfalls"); -VM_STATS_VM(v_tcached, "Total pages cached"); VM_STATS_VM(v_dfree, "Pages freed by pagedaemon"); VM_STATS_VM(v_pfree, "Pages freed by exiting processes"); VM_STATS_VM(v_tfree, "Total pages freed"); @@ -305,7 +304,6 @@ VM_STATS_VM(v_active_count, "Active page VM_STATS_VM(v_inactive_target, "Desired inactive pages"); VM_STATS_VM(v_inactive_count, "Inactive pages"); VM_STATS_VM(v_laundry_count, "Pages eligible for laundering"); -VM_STATS_VM(v_cache_count, "Pages on cache queue"); VM_STATS_VM(v_pageout_free_min, "Min pages reserved for kernel"); VM_STATS_VM(v_interrupt_free_min, "Reserved pages for interrupt code"); VM_STATS_VM(v_forks, "Number of fork() calls"); Modified: head/sys/vm/vm_page.c ============================================================================== --- head/sys/vm/vm_page.c Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/vm/vm_page.c Tue Nov 22 18:13:46 2016 (r309017) @@ -1517,11 +1517,11 @@ vm_page_alloc(vm_object_t object, vm_pin * vm_page_cache(). */ mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE); - if (vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_free_reserved || + if (vm_cnt.v_free_count > vm_cnt.v_free_reserved || (req_class == VM_ALLOC_SYSTEM && - vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_interrupt_free_min) || + vm_cnt.v_free_count > vm_cnt.v_interrupt_free_min) || (req_class == VM_ALLOC_INTERRUPT && - vm_cnt.v_free_count + vm_cnt.v_cache_count > 0)) { + vm_cnt.v_free_count > 0)) { /* * Allocate from the free queue if the number of free pages * exceeds the minimum for the request class. @@ -1690,11 +1690,11 @@ vm_page_alloc_contig(vm_object_t object, req_class = VM_ALLOC_SYSTEM; mtx_lock(&vm_page_queue_free_mtx); - if (vm_cnt.v_free_count + vm_cnt.v_cache_count >= npages + - vm_cnt.v_free_reserved || (req_class == VM_ALLOC_SYSTEM && - vm_cnt.v_free_count + vm_cnt.v_cache_count >= npages + - vm_cnt.v_interrupt_free_min) || (req_class == VM_ALLOC_INTERRUPT && - vm_cnt.v_free_count + vm_cnt.v_cache_count >= npages)) { + if (vm_cnt.v_free_count >= npages + vm_cnt.v_free_reserved || + (req_class == VM_ALLOC_SYSTEM && + vm_cnt.v_free_count >= npages + vm_cnt.v_interrupt_free_min) || + (req_class == VM_ALLOC_INTERRUPT && + vm_cnt.v_free_count >= npages)) { #if VM_NRESERVLEVEL > 0 retry: if (object == NULL || (object->flags & OBJ_COLORED) == 0 || @@ -1842,11 +1842,11 @@ vm_page_alloc_freelist(int flind, int re * Do not allocate reserved pages unless the req has asked for it. */ mtx_lock_flags(&vm_page_queue_free_mtx, MTX_RECURSE); - if (vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_free_reserved || + if (vm_cnt.v_free_count > vm_cnt.v_free_reserved || (req_class == VM_ALLOC_SYSTEM && - vm_cnt.v_free_count + vm_cnt.v_cache_count > vm_cnt.v_interrupt_free_min) || + vm_cnt.v_free_count > vm_cnt.v_interrupt_free_min) || (req_class == VM_ALLOC_INTERRUPT && - vm_cnt.v_free_count + vm_cnt.v_cache_count > 0)) + vm_cnt.v_free_count > 0)) m = vm_phys_alloc_freelist_pages(flind, VM_FREEPOOL_DIRECT, 0); else { mtx_unlock(&vm_page_queue_free_mtx); @@ -2372,7 +2372,7 @@ vm_page_reclaim_contig(int req, u_long n * Return if the number of cached and free pages cannot satisfy the * requested allocation. */ - count = vm_cnt.v_free_count + vm_cnt.v_cache_count; + count = vm_cnt.v_free_count; if (count < npages + vm_cnt.v_free_reserved || (count < npages + vm_cnt.v_interrupt_free_min && req_class == VM_ALLOC_SYSTEM) || (count < npages && req_class == VM_ALLOC_INTERRUPT)) @@ -2656,7 +2656,7 @@ vm_page_free_wakeup(void) * some free. */ if (vm_pageout_pages_needed && - vm_cnt.v_cache_count + vm_cnt.v_free_count >= vm_cnt.v_pageout_free_min) { + vm_cnt.v_free_count >= vm_cnt.v_pageout_free_min) { wakeup(&vm_pageout_pages_needed); vm_pageout_pages_needed = 0; } @@ -3509,8 +3509,8 @@ vm_page_assert_pga_writeable(vm_page_t m DB_SHOW_COMMAND(page, vm_page_print_page_info) { + db_printf("vm_cnt.v_free_count: %d\n", vm_cnt.v_free_count); - db_printf("vm_cnt.v_cache_count: %d\n", vm_cnt.v_cache_count); db_printf("vm_cnt.v_inactive_count: %d\n", vm_cnt.v_inactive_count); db_printf("vm_cnt.v_active_count: %d\n", vm_cnt.v_active_count); db_printf("vm_cnt.v_laundry_count: %d\n", vm_cnt.v_laundry_count); @@ -3525,8 +3525,7 @@ DB_SHOW_COMMAND(pageq, vm_page_print_pag { int dom; - db_printf("pq_free %d pq_cache %d\n", - vm_cnt.v_free_count, vm_cnt.v_cache_count); + db_printf("pq_free %d\n", vm_cnt.v_free_count); for (dom = 0; dom < vm_ndomains; dom++) { db_printf( "dom %d page_cnt %d free %d pq_act %d pq_inact %d pq_laund %d\n", Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Tue Nov 22 18:13:04 2016 (r309016) +++ head/sys/vm/vnode_pager.c Tue Nov 22 18:13:46 2016 (r309017) @@ -1161,8 +1161,7 @@ vnode_pager_putpages(vm_object_t object, * daemon up. This should be probably be addressed XXX. */ - if (vm_cnt.v_free_count + vm_cnt.v_cache_count < - vm_cnt.v_pageout_free_min) + if (vm_cnt.v_free_count < vm_cnt.v_pageout_free_min) flags |= VM_PAGER_PUT_SYNC; /* From owner-svn-src-head@freebsd.org Tue Nov 22 18:31:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39E71C4F3A4; Tue, 22 Nov 2016 18:31:45 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0A1A4CE8; Tue, 22 Nov 2016 18:31:44 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMIViEF077909; Tue, 22 Nov 2016 18:31:44 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMIViaL077908; Tue, 22 Nov 2016 18:31:44 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611221831.uAMIViaL077908@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Tue, 22 Nov 2016 18:31:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309018 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 18:31:45 -0000 Author: br Date: Tue Nov 22 18:31:43 2016 New Revision: 309018 URL: https://svnweb.freebsd.org/changeset/base/309018 Log: Revert r306186 ("Adjust the sopt_val pointer on bigendian systems"). This logic doesn't work with bigger sopt_valsize (e.g. when ipfw passing 2048 bytes rule). Reported by: adrian Sponsored by: DARPA, AFRL Modified: head/sys/kern/uipc_socket.c Modified: head/sys/kern/uipc_socket.c ============================================================================== --- head/sys/kern/uipc_socket.c Tue Nov 22 18:13:46 2016 (r309017) +++ head/sys/kern/uipc_socket.c Tue Nov 22 18:31:43 2016 (r309018) @@ -2455,12 +2455,8 @@ sooptcopyin(struct sockopt *sopt, void * */ if ((valsize = sopt->sopt_valsize) < minlen) return EINVAL; - if (valsize > len) { -#if _BYTE_ORDER == _BIG_ENDIAN - sopt->sopt_val = (void *)((uintptr_t)sopt->sopt_val + (valsize - len)); -#endif + if (valsize > len) sopt->sopt_valsize = valsize = len; - } if (sopt->sopt_td != NULL) return (copyin(sopt->sopt_val, buf, valsize)); From owner-svn-src-head@freebsd.org Tue Nov 22 18:32:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0B83DC4F41D; Tue, 22 Nov 2016 18:32:22 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CF6FAEBE; Tue, 22 Nov 2016 18:32:21 +0000 (UTC) (envelope-from dab@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMIWK10080036; Tue, 22 Nov 2016 18:32:20 GMT (envelope-from dab@FreeBSD.org) Received: (from dab@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMIWKQ4080035; Tue, 22 Nov 2016 18:32:20 GMT (envelope-from dab@FreeBSD.org) Message-Id: <201611221832.uAMIWKQ4080035@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dab set sender to dab@FreeBSD.org using -f From: David Bright Date: Tue, 22 Nov 2016 18:32:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309019 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 18:32:22 -0000 Author: dab Date: Tue Nov 22 18:32:20 2016 New Revision: 309019 URL: https://svnweb.freebsd.org/changeset/base/309019 Log: Add myself (dab) as a src committer and vangyzen as my mentor. Approved by: vangyzen (mentor) Modified: head/share/misc/committers-src.dot Modified: head/share/misc/committers-src.dot ============================================================================== --- head/share/misc/committers-src.dot Tue Nov 22 18:31:43 2016 (r309018) +++ head/share/misc/committers-src.dot Tue Nov 22 18:32:20 2016 (r309019) @@ -15,7 +15,7 @@ digraph src { # foo [label="Foo Bar\nfoo@FreeBSD.org\n????/??/??"] # # ????/??/?? is the date when the commit bit was obtained, usually the one you -# can find looking at svn logs for the svnadmin/access file. +# can find looking at svn logs for the svnadmin/conf/access file. # Use YYYY/MM/DD format. # # For returned commit bits, the node definition will follow this example: @@ -140,6 +140,7 @@ cognet [label="Olivier Houchard\ncognet@ cokane [label="Coleman Kane\ncokane@FreeBSD.org\n2000/06/19"] cperciva [label="Colin Percival\ncperciva@FreeBSD.org\n2004/01/20"] csjp [label="Christian S.J. Peron\ncsjp@FreeBSD.org\n2004/05/04"] +dab [label="David Bright\ndab@FreeBSD.org\n2016/10/24"] das [label="David Schultz\ndas@FreeBSD.org\n2003/02/21"] davide [label="Davide Italiano\ndavide@FreeBSD.org\n2012/01/27"] dchagin [label="Dmitry Chagin\ndchagin@FreeBSD.org\n2009/02/28"] @@ -783,6 +784,7 @@ ume -> suz ume -> tshiozak vangyzen -> badger +vangyzen -> dab wes -> scf From owner-svn-src-head@freebsd.org Tue Nov 22 19:04:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 19FF7C503B5; Tue, 22 Nov 2016 19:04:57 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f176.google.com (mail-io0-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 E26A11435; Tue, 22 Nov 2016 19:04:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f176.google.com with SMTP id x94so77007998ioi.3; Tue, 22 Nov 2016 11:04:56 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=l1HfJB8mYok98siaUC4kGhQatH7cBhKe9yNRfMXpWSQ=; b=aJ3yXeYkkQSdmcpC9uM7JxwjxiP+rBIrh+ZXnioH5wSUujPxwPr4o9RDGSAi1FkBHl lo1cwdu8sMEfHO/rA1JeROQRqqMNylEd+mB4iVH3knFA1dcX0YkvAR++sEvtJr4KEePw 80Vg6MrSS36vNLDhZe608zF5FiuM2KudE7CICOt5X6mbZFCx20ExKvSU5+FzQxrjc6Yc i5zcO42Ce5FbN5xDWjeBt5crZDcmCjF4y14v6949gdmttGw40iCO+n22lB5rt5fQv6uJ 7DopoTKUAmJbuVw67JIYhfriuKj5VhIyLihvNG7z8Dtn26DxnJ66xSWYP8rh2FNypmW9 HHow== X-Gm-Message-State: AKaTC021wBFhPl7EkozLNyXVwRNw7D0JBcKXIBggdUUvdMBekvyeACnXCZv/mOt6ZDVh4g== X-Received: by 10.36.120.131 with SMTP id p125mr3507564itc.15.1479838204365; Tue, 22 Nov 2016 10:10:04 -0800 (PST) Received: from mail-io0-f170.google.com (mail-io0-f170.google.com. [209.85.223.170]) by smtp.gmail.com with ESMTPSA id l14sm10043267ioi.18.2016.11.22.10.10.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 10:10:03 -0800 (PST) Received: by mail-io0-f170.google.com with SMTP id x94so74481208ioi.3; Tue, 22 Nov 2016 10:10:03 -0800 (PST) X-Received: by 10.107.129.34 with SMTP id c34mr17848365iod.31.1479838203812; Tue, 22 Nov 2016 10:10:03 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.109.68 with HTTP; Tue, 22 Nov 2016 10:10:03 -0800 (PST) In-Reply-To: <201611221736.uAMHaGZw054999@repo.freebsd.org> References: <201611221736.uAMHaGZw054999@repo.freebsd.org> From: Conrad Meyer Date: Tue, 22 Nov 2016 10:10:03 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r309014 - head/sys/net80211 To: Adrian Chadd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 19:04:57 -0000 On Tue, Nov 22, 2016 at 9:36 AM, Adrian Chadd wrote: > Author: adrian > Date: Tue Nov 22 17:36:16 2016 > New Revision: 309014 > URL: https://svnweb.freebsd.org/changeset/base/309014 > > Log: > [net80211] high oops on the high seas, or "god damnit compilers, it's 2016 and you're supposed to save me from this." > > TODO: > > * drink real coffee before committing in the morning, or there's a high > risk of more obviously self-evident commits being turned into attempts > at humour. > > Reported by: cem, Coverity CID 1366219 I think this also addresses CID 1366222, which I didn't see earlier. Oops. Best, Conrad From owner-svn-src-head@freebsd.org Tue Nov 22 19:23:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93B74C50896 for ; Tue, 22 Nov 2016 19:23:45 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1b.ore.mailhop.org (outbound1b.ore.mailhop.org [54.200.247.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 799821EB0 for ; Tue, 22 Nov 2016 19:23:45 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: 2f403a83-b0e9-11e6-94b7-cbe6054a74b1 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.ore.mailhop.org (Halon) with ESMTPSA id 2f403a83-b0e9-11e6-94b7-cbe6054a74b1; Tue, 22 Nov 2016 19:23:45 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id uAMJNaII001717; Tue, 22 Nov 2016 12:23:36 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1479842616.12501.43.camel@freebsd.org> Subject: Re: svn commit: r309014 - head/sys/net80211 From: Ian Lepore To: Adrian Chadd , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 22 Nov 2016 12:23:36 -0700 In-Reply-To: <201611221736.uAMHaGZw054999@repo.freebsd.org> References: <201611221736.uAMHaGZw054999@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 19:23:45 -0000 On Tue, 2016-11-22 at 17:36 +0000, Adrian Chadd wrote: > Author: adrian > Date: Tue Nov 22 17:36:16 2016 > New Revision: 309014 > URL: https://svnweb.freebsd.org/changeset/base/309014 > > Log: >   [net80211] high oops on the high seas, or "god damnit compilers, > it's 2016 and you're supposed to save me from this." >    It's the redundant parens that did you in.  If it had been written   if (rxs != NULL & (rxs->c_pktflags & IEEE80211_RX_F_IV_STRIP)) you would have been warned.  I'm not quite sure how the compiler world standardized on "the presence of redundant parens means trust me I know what I'm doing," but that seems to be where we've landed in 2016. -- Ian >   TODO: >    >   * drink real coffee before committing in the morning, or there's a > high >     risk of more obviously self-evident commits being turned into > attempts >     at humour. >    >   Reported by: cem, Coverity CID 1366219 > > Modified: >   head/sys/net80211/ieee80211_crypto_ccmp.c > > Modified: head/sys/net80211/ieee80211_crypto_ccmp.c > ===================================================================== > ========= > --- head/sys/net80211/ieee80211_crypto_ccmp.c Tue Nov 22 > 17:14:09 2016 (r309013) > +++ head/sys/net80211/ieee80211_crypto_ccmp.c Tue Nov 22 > 17:36:16 2016 (r309014) > @@ -241,7 +241,7 @@ ccmp_decap(struct ieee80211_key *k, stru >   >   rxs = ieee80211_get_rx_params_ptr(m); >   > - if ((rxs != NULL) & (rxs->c_pktflags & > IEEE80211_RX_F_IV_STRIP)) > + if ((rxs != NULL) && (rxs->c_pktflags & > IEEE80211_RX_F_IV_STRIP)) >   goto finish; >   >   /* > @@ -286,7 +286,7 @@ finish: >   /* >    * Copy up 802.11 header and strip crypto bits. >    */ > - if (! ((rxs != NULL) & (rxs->c_pktflags & > IEEE80211_RX_F_IV_STRIP))) { > + if (! ((rxs != NULL) && (rxs->c_pktflags & > IEEE80211_RX_F_IV_STRIP))) { >   ovbcopy(mtod(m, void *), mtod(m, uint8_t *) + > ccmp.ic_header, >       hdrlen); >   m_adj(m, ccmp.ic_header); > @@ -295,13 +295,13 @@ finish: >   /* >    * XXX TODO: see if MMIC_STRIP also covers CCMP MIC trailer. >    */ > - if (! ((rxs != NULL) & (rxs->c_pktflags & > IEEE80211_RX_F_MMIC_STRIP))) > + if (! ((rxs != NULL) && (rxs->c_pktflags & > IEEE80211_RX_F_MMIC_STRIP))) >   m_adj(m, -ccmp.ic_trailer); >   >   /* >    * Ok to update rsc now. >    */ > - if (! ((rxs != NULL) & (rxs->c_pktflags & > IEEE80211_RX_F_IV_STRIP))) { > + if (! ((rxs != NULL) && (rxs->c_pktflags & > IEEE80211_RX_F_IV_STRIP))) { >   k->wk_keyrsc[tid] = pn; >   } >   > From owner-svn-src-head@freebsd.org Tue Nov 22 19:31:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8BA04C50C30; Tue, 22 Nov 2016 19:31:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 54DF03EC; Tue, 22 Nov 2016 19:31:33 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMJVWeh006970; Tue, 22 Nov 2016 19:31:32 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMJVW2E006969; Tue, 22 Nov 2016 19:31:32 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611221931.uAMJVW2E006969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Tue, 22 Nov 2016 19:31:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309022 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 19:31:33 -0000 Author: andrew Date: Tue Nov 22 19:31:32 2016 New Revision: 309022 URL: https://svnweb.freebsd.org/changeset/base/309022 Log: Add the missing DEVMETHOD_ENDs to the arm64 nexus ACPI and FDT drivers. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/nexus.c Modified: head/sys/arm64/arm64/nexus.c ============================================================================== --- head/sys/arm64/arm64/nexus.c Tue Nov 22 18:46:01 2016 (r309021) +++ head/sys/arm64/arm64/nexus.c Tue Nov 22 19:31:32 2016 (r309022) @@ -409,6 +409,8 @@ static device_method_t nexus_fdt_methods /* OFW interface */ DEVMETHOD(ofw_bus_map_intr, nexus_ofw_map_intr), + + DEVMETHOD_END, }; #define nexus_baseclasses nexus_fdt_baseclasses @@ -462,6 +464,8 @@ static device_method_t nexus_acpi_method /* Device interface */ DEVMETHOD(device_probe, nexus_acpi_probe), DEVMETHOD(device_attach, nexus_acpi_attach), + + DEVMETHOD_END, }; #define nexus_baseclasses nexus_acpi_baseclasses From owner-svn-src-head@freebsd.org Tue Nov 22 19:42:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37DC7C501B3; Tue, 22 Nov 2016 19:42:08 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f177.google.com (mail-io0-f177.google.com [209.85.223.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 04793E66; Tue, 22 Nov 2016 19:42:07 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f177.google.com with SMTP id j65so78692012iof.0; Tue, 22 Nov 2016 11:42:07 -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:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=ahV5rCFvL+VBPWY5wA4inefwflwarR7/l4rTA4aHfbk=; b=SNbPuIcRCBrKTzgLGrromL2vgrnrMXYDL0pXedq5Tlg/z3keDWPz3KjwXNNqXn/wM9 W+ZclNvRR3QCd8dqR4caqWJ/iYlxsVsaw3QC32PF4Pg73zyT9kNQbEssetb0gfwKekwS KGkikObpXHv905egHrK7PeWANbbyMAyCo7hJvgTNEqsqrqTqv70oFG8E274w4dJ+sgt5 TAe74RfX8zewwRwS+PM8NCCYSfPBtqY3GxlOJjxxWXI/RYckpDxKUZxX3ruTesObDwCk ZMIzoUQjl3dHD+rERYEMlOXlUYarcWSW2EJ+iiRGIDXQnsf7+d00e+U5p7bwwR56A8IO bsVw== X-Gm-Message-State: AKaTC03xWEmkJz98jobKQjvylQ9qdUihB2ShXihEvCnQDhhNSW4oRsZNGMQRGdZkcwi/lg== X-Received: by 10.107.59.88 with SMTP id i85mr18589914ioa.198.1479838146989; Tue, 22 Nov 2016 10:09:06 -0800 (PST) Received: from mail-io0-f179.google.com (mail-io0-f179.google.com. [209.85.223.179]) by smtp.gmail.com with ESMTPSA id w192sm1150241itw.3.2016.11.22.10.09.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Nov 2016 10:09:06 -0800 (PST) Received: by mail-io0-f179.google.com with SMTP id a124so1293157ioe.2; Tue, 22 Nov 2016 10:09:06 -0800 (PST) X-Received: by 10.107.140.65 with SMTP id o62mr17826125iod.17.1479838146558; Tue, 22 Nov 2016 10:09:06 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.109.68 with HTTP; Tue, 22 Nov 2016 10:09:06 -0800 (PST) In-Reply-To: <201611152035.uAFKZTQB045021@repo.freebsd.org> References: <201611152035.uAFKZTQB045021@repo.freebsd.org> From: Conrad Meyer Date: Tue, 22 Nov 2016 10:09:06 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r308696 - in head: share/man/man4 sys/boot/forth sys/conf sys/dev/bnxt sys/modules sys/modules/bnxt To: Stephen Hurd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 19:42:08 -0000 Hi Stephen, Coverity reports a missing 'break;' (or explicit /* FALLTHROUGH */) in if_bnxt.c:1915. (The HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR cases flow into the HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR case.) CID is 1366223. If the fall-through is intentional, please add the comment. If it isn't, I guess it needs a break statement. Thanks, Conrad On Tue, Nov 15, 2016 at 12:35 PM, Stephen Hurd wrote: > Author: shurd (ports committer) > Date: Tue Nov 15 20:35:29 2016 > New Revision: 308696 > URL: https://svnweb.freebsd.org/changeset/base/308696 > > Log: > New driver for Broadcom NetXtreme-C and NetXtreme-E devices. > > This driver uses the iflib framework supporting Broadcom > 25/50Gbps devices. > > Reviewed by: gallatin, wblock > Approved by: davidch > MFC after: 2 weeks > Relnotes: yes > Sponsored by: Broadcom Limited > Differential Revision: https://reviews.freebsd.org/D7551 > > Added: > head/share/man/man4/bnxt.4 (contents, props changed) > head/sys/dev/bnxt/ > head/sys/dev/bnxt/bnxt.h (contents, props changed) > head/sys/dev/bnxt/bnxt_hwrm.c (contents, props changed) > head/sys/dev/bnxt/bnxt_hwrm.h (contents, props changed) > head/sys/dev/bnxt/bnxt_ioctl.h (contents, props changed) > head/sys/dev/bnxt/bnxt_sysctl.c (contents, props changed) > head/sys/dev/bnxt/bnxt_sysctl.h (contents, props changed) > head/sys/dev/bnxt/bnxt_txrx.c (contents, props changed) > head/sys/dev/bnxt/convert_hsi.pl (contents, props changed) > head/sys/dev/bnxt/hsi_struct_def.h (contents, props changed) > head/sys/dev/bnxt/if_bnxt.c (contents, props changed) > head/sys/modules/bnxt/ > head/sys/modules/bnxt/Makefile (contents, props changed) > Modified: > head/share/man/man4/Makefile > head/sys/boot/forth/loader.conf > head/sys/conf/NOTES > head/sys/conf/files > head/sys/modules/Makefile > > ... > > *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Tue Nov 22 20:42:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 876D3C5041A; Tue, 22 Nov 2016 20:42:12 +0000 (UTC) (envelope-from shurd@sasktel.net) Received: from mail144c7.megamailservers.com (mail544c7.megamailservers.com [209.235.141.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6AC51333; Tue, 22 Nov 2016 20:42:10 +0000 (UTC) (envelope-from shurd@sasktel.net) X-Authenticated-User: hurds.sasktel.net X-VIP: 69.49.109.87 Received: from [192.168.0.33] (ip72-194-73-141.oc.oc.cox.net [72.194.73.141]) (authenticated bits=0) by mail144c7.megamailservers.com (8.14.9/8.13.1) with ESMTP id uAMKXpq1003307; Tue, 22 Nov 2016 15:33:56 -0500 Subject: Re: svn commit: r308696 - in head: share/man/man4 sys/boot/forth sys/conf sys/dev/bnxt sys/modules sys/modules/bnxt To: cem@freebsd.org, Stephen Hurd , Stephen Hurd Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201611152035.uAFKZTQB045021@repo.freebsd.org> From: Stephen Hurd Message-ID: <5834ABAE.50802@sasktel.net> Date: Tue, 22 Nov 2016 12:33:50 -0800 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:43.0) Gecko/20100101 Firefox/43.0 SeaMonkey/2.40 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-CTCH-RefID: str=0001.0A020201.5834ABB5.01F8, ss=1, re=0.000, recu=0.000, reip=0.000, cl=1, cld=1, fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown X-CTCH-Score: 0.000 X-CTCH-Rules: X-CTCH-Flags: 0 X-CTCH-ScoreCust: 0.000 X-CSC: 0 X-CHA: v=2.2 cv=J+fa1EvS c=1 sm=1 tr=0 a=l4Y+EJuLrT/8f1z5FvEQ1g==:117 a=l4Y+EJuLrT/8f1z5FvEQ1g==:17 a=IkcTkHD0fZMA:10 a=MtZCC52XAMUxWBClqooA:9 a=QEXdDO2ut3YA:10 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 20:42:12 -0000 Conrad Meyer wrote: > Hi Stephen, > > Coverity reports a missing 'break;' (or explicit /* FALLTHROUGH */) in > if_bnxt.c:1915. (The HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASEKR cases > flow into the HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR case.) CID is > 1366223. > > If the fall-through is intentional, please add the comment. If it > isn't, I guess it needs a break statement. > > Thanks, > Conrad Yes, that needs the break. I'll get that in today. From owner-svn-src-head@freebsd.org Tue Nov 22 22:11:00 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DB4EC4F30A; Tue, 22 Nov 2016 22:11:00 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C430D19F1; Tue, 22 Nov 2016 22:10:59 +0000 (UTC) (envelope-from phk@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMMAwUa074733; Tue, 22 Nov 2016 22:10:58 GMT (envelope-from phk@FreeBSD.org) Received: (from phk@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMMAw0R074732; Tue, 22 Nov 2016 22:10:58 GMT (envelope-from phk@FreeBSD.org) Message-Id: <201611222210.uAMMAw0R074732@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: phk set sender to phk@FreeBSD.org using -f From: Poul-Henning Kamp Date: Tue, 22 Nov 2016 22:10:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309025 - head/usr.sbin/fifolog/lib X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 22:11:00 -0000 Author: phk Date: Tue Nov 22 22:10:58 2016 New Revision: 309025 URL: https://svnweb.freebsd.org/changeset/base/309025 Log: Pass the correct size argument to ioctl(DIOCGSECTORSIZE) Modified: head/usr.sbin/fifolog/lib/fifolog_create.c Modified: head/usr.sbin/fifolog/lib/fifolog_create.c ============================================================================== --- head/usr.sbin/fifolog/lib/fifolog_create.c Tue Nov 22 21:02:35 2016 (r309024) +++ head/usr.sbin/fifolog/lib/fifolog_create.c Tue Nov 22 22:10:58 2016 (r309025) @@ -45,6 +45,7 @@ fifolog_create(const char *fn, off_t siz { int i, fd; ssize_t u; + u_int uu; off_t ms; struct stat st; char *buf; @@ -79,7 +80,8 @@ fifolog_create(const char *fn, off_t siz } /* For raw disk with larger sectors: use 1 sector */ - i = ioctl(fd, DIOCGSECTORSIZE, &u); + i = ioctl(fd, DIOCGSECTORSIZE, &uu); + u = uu; if (i == 0 && (u > recsize || (recsize % u) != 0)) recsize = u; From owner-svn-src-head@freebsd.org Tue Nov 22 22:30:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 66518C4FA61; Tue, 22 Nov 2016 22:30:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 369919D1; Tue, 22 Nov 2016 22:30:56 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMMUteL082761; Tue, 22 Nov 2016 22:30:55 GMT (envelope-from jilles@FreeBSD.org) Received: (from jilles@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMMUt0q082760; Tue, 22 Nov 2016 22:30:55 GMT (envelope-from jilles@FreeBSD.org) Message-Id: <201611222230.uAMMUt0q082760@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jilles set sender to jilles@FreeBSD.org using -f From: Jilles Tjoelker Date: Tue, 22 Nov 2016 22:30:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309026 - head/lib/libc/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 22:30:56 -0000 Author: jilles Date: Tue Nov 22 22:30:55 2016 New Revision: 309026 URL: https://svnweb.freebsd.org/changeset/base/309026 Log: open(2): Clarify non-POSIX error when opening a symlink with O_NOFOLLOW. We return [EMLINK] instead of [ELOOP] when trying to open a symlink with O_NOFOLLOW, so that the original case of [ELOOP] can be distinguished. Code like cmp -h and xz takes advantage of this. PR: 214633 Reviewed by: kib, imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D8586 Modified: head/lib/libc/sys/open.2 Modified: head/lib/libc/sys/open.2 ============================================================================== --- head/lib/libc/sys/open.2 Tue Nov 22 22:10:58 2016 (r309025) +++ head/lib/libc/sys/open.2 Tue Nov 22 22:30:55 2016 (r309026) @@ -28,7 +28,7 @@ .\" @(#)open.2 8.2 (Berkeley) 11/16/93 .\" $FreeBSD$ .\" -.Dd September 30, 2016 +.Dd November 22, 2016 .Dt OPEN 2 .Os .Sh NAME @@ -503,6 +503,22 @@ The .Fn openat function was introduced in .Fx 8.0 . +.Sh STANDARDS +These functions are specified by +.St -p1003.1-2008 . +.Fx +sets +.Va errno +to +.Er EMLINK instead of +.Er ELOOP +as specified by +.Tn POSIX +when +.Dv O_NOFOLLOW +is set in flags and the final component of pathname is a symbolic link +to distinguish it from the case of too many symbolic link traversals +in one of its non-final components. .Sh BUGS The Open Group Extended API Set 2 specification requires that the test for whether From owner-svn-src-head@freebsd.org Tue Nov 22 22:45:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1F49C4FF85; Tue, 22 Nov 2016 22:45:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C168E1152; Tue, 22 Nov 2016 22:45:16 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAMMjFkK089892; Tue, 22 Nov 2016 22:45:15 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAMMjFLA089891; Tue, 22 Nov 2016 22:45:15 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201611222245.uAMMjFLA089891@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Tue, 22 Nov 2016 22:45:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309027 - head/sbin/dhclient X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Nov 2016 22:45:17 -0000 Author: brooks Date: Tue Nov 22 22:45:15 2016 New Revision: 309027 URL: https://svnweb.freebsd.org/changeset/base/309027 Log: Allocate a struct ifreq rather than using a (wrong) computed size for the BIOCSETIF ioctl. The kernel always copies an entire struct ifreq and IPv4 addresses will always fit in an ifreq. On systems with pointers larger than 64-bits, the computed size will be less than the size of struct ifreq, potentially resulting in the kernel attempting to copyin memory from outside the allocation. Reviewed by: jhb Obtained from: CheriBSD MFC after: 1 week Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D8445 Modified: head/sbin/dhclient/dispatch.c Modified: head/sbin/dhclient/dispatch.c ============================================================================== --- head/sbin/dhclient/dispatch.c Tue Nov 22 22:30:55 2016 (r309026) +++ head/sbin/dhclient/dispatch.c Tue Nov 22 22:45:15 2016 (r309027) @@ -106,8 +106,8 @@ discover_interfaces(struct interface_inf if (foo.sin_addr.s_addr == htonl(INADDR_LOOPBACK)) continue; if (!iface->ifp) { - int len = IFNAMSIZ + ifa->ifa_addr->sa_len; - if ((tif = malloc(len)) == NULL) + if ((tif = calloc(1, sizeof(struct ifreq))) + == NULL) error("no space to remember ifp"); strlcpy(tif->ifr_name, ifa->ifa_name, IFNAMSIZ); memcpy(&tif->ifr_addr, ifa->ifa_addr, From owner-svn-src-head@freebsd.org Wed Nov 23 00:26:32 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 618D7C4C345; Wed, 23 Nov 2016 00:26:32 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 310322E2; Wed, 23 Nov 2016 00:26:32 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN0QVSp030034; Wed, 23 Nov 2016 00:26:31 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN0QVir030033; Wed, 23 Nov 2016 00:26:31 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201611230026.uAN0QVir030033@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Wed, 23 Nov 2016 00:26:31 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309028 - head/sys/dev/bnxt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 00:26:32 -0000 Author: shurd (ports committer) Date: Wed Nov 23 00:26:31 2016 New Revision: 309028 URL: https://svnweb.freebsd.org/changeset/base/309028 Log: Add missing break to switch statement Minimal impact, would allow selection of LR media when KR is connected. Reported by: Coverity Approved by: davidch MFC after: 7 days Sponsored by: Broadcom Limited Modified: head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Tue Nov 22 22:45:15 2016 (r309027) +++ head/sys/dev/bnxt/if_bnxt.c Wed Nov 23 00:26:31 2016 (r309028) @@ -1912,6 +1912,7 @@ bnxt_add_media_types(struct bnxt_softc * if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_10GB) ifmedia_add(softc->media, IFM_ETHER | IFM_10G_KR, 0, NULL); + break; case HWRM_PORT_PHY_QCFG_OUTPUT_PHY_TYPE_BASELR: if (supported & HWRM_PORT_PHY_QCFG_OUTPUT_SUPPORT_SPEEDS_100GB) ifmedia_add(softc->media, IFM_ETHER | IFM_100G_LR4, 0, From owner-svn-src-head@freebsd.org Wed Nov 23 01:44:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 34309C4FAE6; Wed, 23 Nov 2016 01:44:30 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EF7CF68D; Wed, 23 Nov 2016 01:44:29 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN1iT75061650; Wed, 23 Nov 2016 01:44:29 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN1iTVY061649; Wed, 23 Nov 2016 01:44:29 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611230144.uAN1iTVY061649@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 23 Nov 2016 01:44:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309029 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 01:44:30 -0000 Author: manu Date: Wed Nov 23 01:44:28 2016 New Revision: 309029 URL: https://svnweb.freebsd.org/changeset/base/309029 Log: Do not attempt to disable/release clock if it had not been enabled. While here fix a style(9) issue. MFC after: 1 week Modified: head/sys/arm/allwinner/a10_ehci.c Modified: head/sys/arm/allwinner/a10_ehci.c ============================================================================== --- head/sys/arm/allwinner/a10_ehci.c Wed Nov 23 00:26:31 2016 (r309028) +++ head/sys/arm/allwinner/a10_ehci.c Wed Nov 23 01:44:28 2016 (r309029) @@ -263,8 +263,10 @@ a10_ehci_attach(device_t self) return (0); error: - if (aw_sc->clk) + if (aw_sc->clk != NULL) { + clk_disable(aw_sc->clk); clk_release(aw_sc->clk); + } a10_ehci_detach(self); return (ENXIO); } @@ -325,8 +327,10 @@ a10_ehci_detach(device_t self) A10_WRITE_4(sc, SW_USB_PMU_IRQ_ENABLE, reg_value); /* Disable clock for USB */ - clk_disable(aw_sc->clk); - clk_release(aw_sc->clk); + if (aw_sc->clk != NULL) { + clk_disable(aw_sc->clk); + clk_release(aw_sc->clk); + } /* Assert reset */ if (aw_sc->rst != NULL) { From owner-svn-src-head@freebsd.org Wed Nov 23 05:03:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5F5A5C501C7; Wed, 23 Nov 2016 05:03:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33F51CBA; Wed, 23 Nov 2016 05:03:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN53jqn041630; Wed, 23 Nov 2016 05:03:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN53juA041626; Wed, 23 Nov 2016 05:03:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611230503.uAN53juA041626@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 23 Nov 2016 05:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309030 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 05:03:46 -0000 Author: sephe Date: Wed Nov 23 05:03:44 2016 New Revision: 309030 URL: https://svnweb.freebsd.org/changeset/base/309030 Log: hyperv/vmbus: Set a mark on the revoked channel. This will be used to fix device detach DEVMETHOD for revoked primary channel. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8522 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Wed Nov 23 01:44:28 2016 (r309029) +++ head/sys/dev/hyperv/include/vmbus.h Wed Nov 23 05:03:44 2016 (r309030) @@ -172,6 +172,7 @@ int vmbus_chan_send_prplist(struct vmbu uint32_t vmbus_chan_id(const struct vmbus_channel *chan); uint32_t vmbus_chan_subidx(const struct vmbus_channel *chan); bool vmbus_chan_is_primary(const struct vmbus_channel *chan); +bool vmbus_chan_is_revoked(const struct vmbus_channel *chan); const struct hyperv_guid * vmbus_chan_guid_inst(const struct vmbus_channel *chan); int vmbus_chan_prplist_nelem(int br_size, int prpcnt_max, Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Nov 23 01:44:28 2016 (r309029) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Wed Nov 23 05:03:44 2016 (r309030) @@ -1220,7 +1220,7 @@ vmbus_chan_add(struct vmbus_channel *new wakeup(prichan); done: /* - * Hook this channel up for later rescind. + * Hook this channel up for later revocation. */ mtx_lock(&sc->vmbus_chan_lock); vmbus_chan_ins_list(sc, newchan); @@ -1368,7 +1368,7 @@ vmbus_chan_msgproc_chrescind(struct vmbu note = (const struct vmbus_chanmsg_chrescind *)msg->msg_data; if (note->chm_chanid > VMBUS_CHAN_MAX) { - device_printf(sc->vmbus_dev, "invalid rescinded chan%u\n", + device_printf(sc->vmbus_dev, "invalid revoked chan%u\n", note->chm_chanid); return; } @@ -1403,8 +1403,12 @@ vmbus_chan_msgproc_chrescind(struct vmbu mtx_unlock(&sc->vmbus_prichan_lock); } + if (atomic_testandset_int(&chan->ch_stflags, + VMBUS_CHAN_ST_REVOKED_SHIFT)) + panic("channel has already been revoked"); + if (bootverbose) - vmbus_chan_printf(chan, "chan%u rescinded\n", note->chm_chanid); + vmbus_chan_printf(chan, "chan%u revoked\n", note->chm_chanid); /* Detach the target channel. */ taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); @@ -1695,3 +1699,12 @@ vmbus_chan_mgmt_tq(const struct vmbus_ch return (chan->ch_mgmt_tq); } + +bool +vmbus_chan_is_revoked(const struct vmbus_channel *chan) +{ + + if (chan->ch_stflags & VMBUS_CHAN_ST_REVOKED) + return (true); + return (false); +} Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Wed Nov 23 01:44:28 2016 (r309029) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Wed Nov 23 05:03:44 2016 (r309030) @@ -159,10 +159,12 @@ struct vmbus_channel { #define VMBUS_CHAN_ST_ONPRIL_SHIFT 1 #define VMBUS_CHAN_ST_ONSUBL_SHIFT 2 #define VMBUS_CHAN_ST_ONLIST_SHIFT 3 +#define VMBUS_CHAN_ST_REVOKED_SHIFT 4 /* sticky */ #define VMBUS_CHAN_ST_OPENED (1 << VMBUS_CHAN_ST_OPENED_SHIFT) #define VMBUS_CHAN_ST_ONPRIL (1 << VMBUS_CHAN_ST_ONPRIL_SHIFT) #define VMBUS_CHAN_ST_ONSUBL (1 << VMBUS_CHAN_ST_ONSUBL_SHIFT) #define VMBUS_CHAN_ST_ONLIST (1 << VMBUS_CHAN_ST_ONLIST_SHIFT) +#define VMBUS_CHAN_ST_REVOKED (1 << VMBUS_CHAN_ST_REVOKED_SHIFT) struct vmbus_softc; struct vmbus_message; From owner-svn-src-head@freebsd.org Wed Nov 23 07:57:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F018C50A1A; Wed, 23 Nov 2016 07:57:54 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3ED4A36A; Wed, 23 Nov 2016 07:57:54 +0000 (UTC) (envelope-from julian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN7vrEJ008898; Wed, 23 Nov 2016 07:57:53 GMT (envelope-from julian@FreeBSD.org) Received: (from julian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN7vqmC008888; Wed, 23 Nov 2016 07:57:52 GMT (envelope-from julian@FreeBSD.org) Message-Id: <201611230757.uAN7vqmC008888@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: julian set sender to julian@FreeBSD.org using -f From: Julian Elischer Date: Wed, 23 Nov 2016 07:57:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309035 - in head/lib/libpathconv: . tests X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 07:57:54 -0000 Author: julian Date: Wed Nov 23 07:57:52 2016 New Revision: 309035 URL: https://svnweb.freebsd.org/changeset/base/309035 Log: This little BSD licensed library has been kicking around for years. It allows one to trivially convert an absolute path to a relative path and the reverse. The test programs themselves are very useful in scripts but the real use comes shortly with the -r and -a arguments to ln. These are sometimes known as the --relative and --absolute flags and can force a symlink to be relative when you only have an absolue path. Another place these are sometimes used is to add -a and -r args to 'realpath'. Incredibly useful in Makefiles. I was going to just add the files in with 'ln' but a library makes more sense. The test programs may come out in their own right some day for scripting. released under a BSD 2-clause: * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. * Copyright (c) 1999 Tama Communications Corporation. All rights reserved. The test directry does not conform to any framework. Not connected to build. doc people may want to play with the manual pages. Obtained from: https://www.tamacom.com/pathconvert.html Shigio Yamaguchi. MFC after: 1 month Relnotes: yes Sponsored by: Panzura, Tama Communications Corporation Added: head/lib/libpathconv/ head/lib/libpathconv/Makefile (contents, props changed) head/lib/libpathconv/abs2rel.3 (contents, props changed) head/lib/libpathconv/abs2rel.c (contents, props changed) head/lib/libpathconv/pathconv.h (contents, props changed) head/lib/libpathconv/rel2abs.3 (contents, props changed) head/lib/libpathconv/rel2abs.c (contents, props changed) head/lib/libpathconv/tests/ head/lib/libpathconv/tests/Makefile (contents, props changed) head/lib/libpathconv/tests/abs2rel.c (contents, props changed) head/lib/libpathconv/tests/rel2abs.c (contents, props changed) head/lib/libpathconv/tests/test.pl (contents, props changed) Added: head/lib/libpathconv/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/Makefile Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,20 @@ +# $FreeBSD$ + +.include + +PACKAGE=lib${LIB} +LIB= pathconv +SHLIB_MAJOR= 1 +MAN= rel2abs.3 abs2rel.3 +INCS= pathconv.h +SRCS= abs2rel.c rel2abs.c + + +#VERSION_DEF= ${.CURDIR}/../libc/Versions.def +#SYMBOL_MAPS= ${.CURDIR}/Symbol.map + +.if ${MK_TESTS} != "no" +SUBDIR+= tests +.endif + +.include Added: head/lib/libpathconv/abs2rel.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/abs2rel.3 Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,136 @@ +.\" +.\" Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. +.\" Copyright (c) 1999 Tama Communications 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. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Dec 15, 1997" +.Dt ABS2REL 3 +.Os +.Sh NAME +.Nm abs2rel +.Nd make a relative path name from an absolute path name +.Sh SYNOPSIS +.Ft "char *" +.Fn abs2rel "const char *path" "const char *base" "char *result" "size_t size" +.Sh DESCRIPTION +The +.Fn abs2rel +function makes a relative path name from an absolute path name +.Fa path +based on a directory +.Fa base +and copies the resulting path name into the memory referenced by +.Fa result . +The +.Fa result +argument must refer to a buffer capable of storing at least +.Fa size +characters. + +The resulting path name may include symbolic links. +The +.Fn abs2rel +function doesn't check whether or not any path exists. +.Sh "RETURN VALUES" +The +.Fn abs2rel +function returns relative path name on success. +If an error occurs, +it returns +.Dv NULL . +.Sh ERRORS +The +.Fn abs2rel +function may fail and set the external variable +.Va errno +to indicate the error. +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa base +directory isn't an absolute path name or the +.Fa size +argument is zero. +.It Bq Er ERANGE +The +.Fa size +argument is greater than zero but smaller than the length of the pathname plus 1. +.Sh EXAMPLE + char result[MAXPATHLEN]; + char *path = abs2rel("/usr/src/sys", "/usr/local/lib", result, MAXPATHLEN); + +yields: + + path == "../../src/sys" + +Similarly, + + path1 = abs2rel("/usr/src/sys", "/usr", result, MAXPATHLEN); + path2 = abs2rel("/usr/src/sys", "/usr/src/sys", result, MAXPATHLEN); + +yields: + + path1 == "src/sys" + path2 == "." + +.Sh BUGS +If the +.Fa base +directory includes symbolic links, +the +.Fn abs2rel +function produces the wrong path. +For example, if '/sys' is a symbolic link to '/usr/src/sys', + + char *path = abs2rel("/usr/local/lib", "/sys", result, MAXPATHLEN); + +yields: + + path == "../usr/local/lib" /* It's wrong!! */ + +You should convert the base directory into a real path in advance. +.Pp + + path = abs2rel("/sys/kern", realpath("/sys", resolvedname), result, MAXPATHLEN); + +yields: + + path == "../../../sys/kern" /* It's correct but ... */ + +That is correct, but a little redundant. If you wish get the simple +answer 'kern', do the following. + + path = abs2rel(realpath("/sys/kern", r1), realpath("/sys", r2), + result, MAXPATHLEN); + +The +.Fn realpath +function assures correct result, but don't forget that +.Fn realpath +requires that all but the last component of the path exist. +.Sh "SEE ALSO" +.Xr rel2abs 3 +.Sh AUTHORS +Shigio Yamaguchi (shigio@tamacom.com) Added: head/lib/libpathconv/abs2rel.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/abs2rel.c Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,111 @@ +/* + * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. + * Copyright (c) 1999 Tama Communications 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. + * 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 "pathconv.h" /* prototypes */ +/* + * abs2rel: convert an absolute path name into relative. + * + * i) path absolute path + * i) base base directory (must be absolute path) + * o) result result buffer + * i) size size of result buffer + * r) != NULL: relative path + * == NULL: error + */ +char * +abs2rel(const char *path, const char *base, char *result, const size_t size) +{ + const char *pp, *bp, *branch; + /* + * endp points the last position which is safe in the result buffer. + */ + const char *endp = result + size - 1; + char *rp; + + if (*path != '/') { + if (strlen(path) >= size) + goto erange; + strcpy(result, path); + goto finish; + } else if (*base != '/' || !size) { + errno = EINVAL; + return (NULL); + } else if (size == 1) + goto erange; + /* + * seek to branched point. + */ + branch = path; + for (pp = path, bp = base; *pp && *bp && *pp == *bp; pp++, bp++) + if (*pp == '/') + branch = pp; + if ((*pp == 0 || (*pp == '/' && *(pp + 1) == 0)) && + (*bp == 0 || (*bp == '/' && *(bp + 1) == 0))) { + rp = result; + *rp++ = '.'; + if (*pp == '/' || *(pp - 1) == '/') + *rp++ = '/'; + if (rp > endp) + goto erange; + *rp = 0; + goto finish; + } + if ((*pp == 0 && *bp == '/') || (*pp == '/' && *bp == 0)) + branch = pp; + /* + * up to root. + */ + rp = result; + for (bp = base + (branch - path); *bp; bp++) + if (*bp == '/' && *(bp + 1) != 0) { + if (rp + 3 > endp) + goto erange; + *rp++ = '.'; + *rp++ = '.'; + *rp++ = '/'; + } + if (rp > endp) + goto erange; + *rp = 0; + /* + * down to leaf. + */ + if (*branch) { + if (rp + strlen(branch + 1) > endp) + goto erange; + strcpy(rp, branch + 1); + } else + *--rp = 0; +finish: + return result; +erange: + errno = ERANGE; + return (NULL); +} Added: head/lib/libpathconv/pathconv.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/pathconv.h Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,34 @@ +/* + * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. + * Copyright (c) 1999 Tama Communications 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. + * 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 _PATHCONV_H +#define _PATHCONV_H +char * rel2abs(const char *path, const char *base, char *result, const size_t size); +char * abs2rel(const char *path, const char *base, char *result, const size_t size); + +#endif /*_PATHCONV_H */ + Added: head/lib/libpathconv/rel2abs.3 ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/rel2abs.3 Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,98 @@ +.\" +.\" Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. +.\" Copyright (c) 1999 Tama Communications 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. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd Dec 3, 1997" +.Dt REL2ABS 3 +.Os +.Sh NAME +.Nm rel2abs +.Nd make an absolute path name from a relative path name +.Sh SYNOPSIS +.Ft "char *" +.Fn rel2abs "const char *path" "const char *base" "char *result" "size_t size" +.Sh DESCRIPTION +The +.Fn rel2abs +function makes an absolute path name from a relative path name +.Fa path +based on a directory +.Fa base +and copies the resulting path name into the memory referenced by +.Fa result . +The +.Fa result +argument must refer to a buffer capable of storing at least +.Fa size +character + +The resulting path name may include symbolic links. +.Fn abs2rel +doesn't check whether or not any path exists. +.Sh "RETURN VALUES" +The +.Fn rel2abs +function returns absolute path name on success. +If an error occurs, it returns +.Dv NULL . +.Sh ERRORS +The +.Fn rel2abs +function may fail and set the external variable +.Va errno +to indicate the error. +.Bl -tag -width Er +.It Bq Er EINVAL +The +.Fa base +directory isn't an absolute path name or the +.Fa size +argument is zero. +.It Bq Er ERANGE +The +.Fa size +argument is greater than zero but smaller than the length of the pathname plus 1 +.Sh EXAMPLE + char result[MAXPATHLEN]; + char *path = rel2abs("../../src/sys", "/usr/local/lib", result, MAXPATHLEN); + +yields: + + path == "/usr/src/sys" + +Similarly, + + path1 = rel2abs("src/sys", "/usr", result, MAXPATHLEN); + path2 = rel2abs(".", "/usr/src/sys", result, MAXPATHLEN); + +yields: + + path1 == "/usr/src/sys" + path2 == "/usr/src/sys" +.Sh "SEE ALSO" +.Xr abs2rel 3 +.Sh AUTHORS +Shigio Yamaguchi (shigio@tamacom.com) Added: head/lib/libpathconv/rel2abs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/rel2abs.c Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,132 @@ +/* + * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. + * Copyright (c) 1999 Tama Communications 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. + * 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 "pathconv.h" /* prototypes */ +/* + * rel2abs: convert an relative path name into absolute. + * + * i) path relative path + * i) base base directory (must be absolute path) + * o) result result buffer + * i) size size of result buffer + * r) != NULL: absolute path + * == NULL: error + */ +char * +rel2abs(const char *path, const char *base, char *result, const size_t size) +{ + const char *pp, *bp; + /* + * endp points the last position which is safe in the result buffer. + */ + const char *endp = result + size - 1; + char *rp; + size_t length; + + if (*path == '/') { + if (strlen(path) >= size) + goto erange; + strcpy(result, path); + goto finish; + } else if (*base != '/' || !size) { + errno = EINVAL; + return (NULL); + } else if (size == 1) + goto erange; + + length = strlen(base); + + if (!strcmp(path, ".") || !strcmp(path, "./")) { + if (length >= size) + goto erange; + strcpy(result, base); + /* + * rp points the last char. + */ + rp = result + length - 1; + /* + * remove the last '/'. + */ + if (*rp == '/') { + if (length > 1) + *rp = 0; + } else + rp++; + /* rp point NULL char */ + if (*++path == '/') { + /* + * Append '/' to the tail of path name. + */ + *rp++ = '/'; + if (rp > endp) + goto erange; + *rp = 0; + } + goto finish; + } + bp = base + length; + if (*(bp - 1) == '/') + --bp; + /* + * up to root. + */ + for (pp = path; *pp && *pp == '.'; ) { + if (!strncmp(pp, "../", 3)) { + pp += 3; + while (bp > base && *--bp != '/') + ; + } else if (!strncmp(pp, "./", 2)) { + pp += 2; + } else if (!strncmp(pp, "..\0", 3)) { + pp += 2; + while (bp > base && *--bp != '/') + ; + } else + break; + } + /* + * down to leaf. + */ + length = bp - base; + if (length >= size) + goto erange; + strncpy(result, base, length); + rp = result + length; + if (*pp || *(pp - 1) == '/' || length == 0) + *rp++ = '/'; + if (rp + strlen(pp) > endp) + goto erange; + strcpy(rp, pp); +finish: + return result; +erange: + errno = ERANGE; + return (NULL); +} Added: head/lib/libpathconv/tests/Makefile ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/tests/Makefile Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,10 @@ +# $FreeBSD$ + +TAP_TESTS_C+= abs2rel +TAP_TESTS_C+= rel2abs + +#LIBADD+= pathconv +#LDADD+= -L .. -lpathconv +LDADD+= ../libpathconv.a + +.include Added: head/lib/libpathconv/tests/abs2rel.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/tests/abs2rel.c Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,60 @@ +/* + * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. + * Copyright (c) 1999 Tama Communications 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. + * 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 +#include +#include +#include "../pathconv.h" + +int +main(int argc, char *argv[]) +{ + char result[MAXPATHLEN]; + char cwd[MAXPATHLEN]; + + if (argc < 2) { + fprintf(stderr, "usage: abs2rel path [base]\n"); + exit(1); + } + if (argc == 2) { + if (!getcwd(cwd, MAXPATHLEN)) { + fprintf(stderr, "cannot get current directory.\n"); + exit(1); + } + } else + strcpy(cwd, argv[2]); + + if (abs2rel(argv[1], cwd, result, MAXPATHLEN)) { + printf("%s\n", result); + } else + printf("ERROR\n"); + exit(0); +} Added: head/lib/libpathconv/tests/rel2abs.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/tests/rel2abs.c Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,59 @@ +/* + * Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. + * Copyright (c) 1999 Tama Communications 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. + * 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 +#include +#include +#include "../pathconv.h" + +int +main(int argc, char *argv[]) +{ + char result[MAXPATHLEN]; + char cwd[MAXPATHLEN]; + + if (argc < 2) { + fprintf(stderr, "usage: rel2abs path [base]\n"); + exit(1); + } + if (argc == 2) { + if (!getcwd(cwd, MAXPATHLEN)) { + fprintf(stderr, "cannot get current directory.\n"); + exit(1); + } + } else + strcpy(cwd, argv[2]); + + if (rel2abs(argv[1], cwd, result, MAXPATHLEN)) { + printf("%s\n", result); + } else + printf("ERROR\n"); + exit(0); +} Added: head/lib/libpathconv/tests/test.pl ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/lib/libpathconv/tests/test.pl Wed Nov 23 07:57:52 2016 (r309035) @@ -0,0 +1,146 @@ +#!/usr/bin/perl +# +# Copyright (c) 1997 Shigio Yamaguchi. All rights reserved. +# Copyright (c) 1999 Tama Communications 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. +# 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$ +# + +# +# Test script for abs2rel(3) and rel2abs(3). +# +$logfile = 'err'; +# +# target base directory result +# -------------------------------------- +@abs2rel = ( + '. / .', + 'a/b/c / a/b/c', + 'a/b/c /a a/b/c', + '/a/b/c a ERROR', +); +@rel2abs = ( + '. / /', + './ / /', + '/a/b/c / /a/b/c', + '/a/b/c /a /a/b/c', + 'a/b/c a ERROR', + '.. /a /', + '../ /a /', + '../.. /a /', + '../../ /a /', + '../../.. /a /', + '../../../ /a /', + '../b /a /b', + '../b/ /a /b/', + '../../b /a /b', + '../../b/ /a /b/', + '../../../b /a /b', + '../../../b/ /a /b/', + '../b/c /a /b/c', + '../b/c/ /a /b/c/', + '../../b/c /a /b/c', + '../../b/c/ /a /b/c/', + '../../../b/c /a /b/c', + '../../../b/c/ /a /b/c/', +); +@common = ( + '/a/b/c /a/b/c .', + '/a/b/c /a/b/ c', + '/a/b/c /a/b c', + '/a/b/c /a/ b/c', + '/a/b/c /a b/c', + '/a/b/c / a/b/c', + '/a/b/c /a/b/c .', + '/a/b/c /a/b/c/ .', + '/a/b/c/ /a/b/c ./', + '/a/b/ /a/b/c ../', + '/a/b /a/b/c ..', + '/a/ /a/b/c ../../', + '/a /a/b/c ../..', + '/ /a/b/c ../../../', + '/a/b/c /a/b/z ../c', + '/a/b/c /a/y/z ../../b/c', + '/a/b/c /x/y/z ../../../a/b/c', +); +print "TEST start "; +open(LOG, ">$logfile") || die("cannot open log file '$logfile'.\n"); +$cnt = 0; +$progname = 'abs2rel'; +foreach (@abs2rel) { + @d = split; + chop($result = `./$progname $d[0] $d[1]`); + if ($d[2] eq $result) { + print '.'; + } else { + print 'X'; + print LOG "$progname $d[0] $d[1] -> $result (It should be '$d[2]')\n"; + $cnt++; + } +} +foreach (@common) { + @d = split; + chop($result = `./$progname $d[0] $d[1]`); + if ($d[2] eq $result) { + print '.'; + } else { + print 'X'; + print LOG "$progname $d[0] $d[1] -> $result (It should be '$d[2]')\n"; + $cnt++; + } +} +$progname = 'rel2abs'; +foreach (@rel2abs) { + @d = split; + chop($result = `./$progname $d[0] $d[1]`); + if ($d[2] eq $result) { + print '.'; + } else { + print 'X'; + print LOG "$progname $d[0] $d[1] -> $result (It should be '$d[2]')\n"; + $cnt++; + } +} +foreach (@common) { + @d = split; + chop($result = `./$progname $d[2] $d[1]`); + if ($d[0] eq $result) { + print '.'; + } else { + print 'X'; + print LOG "$progname $d[2] $d[1] -> $result (It should be '$d[0]')\n"; + $cnt++; + } +} +close(LOG); +if ($cnt == 0) { + print " COMPLETED.\n"; +} else { + print " $cnt errors detected.\n"; + open(LOG, $logfile) || die("log file not found.\n"); + while () { + print; + } + close(LOG); +} From owner-svn-src-head@freebsd.org Wed Nov 23 08:30:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 61931C515A1; Wed, 23 Nov 2016 08:30:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24FCCC48; Wed, 23 Nov 2016 08:30:03 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN8U2t2021231; Wed, 23 Nov 2016 08:30:02 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN8U20Y021230; Wed, 23 Nov 2016 08:30:02 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611230830.uAN8U20Y021230@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Wed, 23 Nov 2016 08:30:02 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309039 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 08:30:03 -0000 Author: sephe Date: Wed Nov 23 08:30:02 2016 New Revision: 309039 URL: https://svnweb.freebsd.org/changeset/base/309039 Log: hyperv/vmbus: Merge free/active locks. These functions are only used by management stuffs, so there are no needs to introduce extra complexity. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8524 Modified: head/sys/dev/hyperv/vmbus/vmbus_xact.c Modified: head/sys/dev/hyperv/vmbus/vmbus_xact.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_xact.c Wed Nov 23 08:17:05 2016 (r309038) +++ head/sys/dev/hyperv/vmbus/vmbus_xact.c Wed Nov 23 08:30:02 2016 (r309039) @@ -50,16 +50,17 @@ struct vmbus_xact { }; struct vmbus_xact_ctx { - uint32_t xc_flags; size_t xc_req_size; size_t xc_resp_size; size_t xc_priv_size; + struct mtx xc_lock; + /* + * Protected by xc_lock. + */ + uint32_t xc_flags; /* VMBUS_XACT_CTXF_ */ struct vmbus_xact *xc_free; - struct mtx xc_free_lock; - struct vmbus_xact *xc_active; - struct mtx xc_active_lock; }; #define VMBUS_XACT_CTXF_DESTROY 0x0001 @@ -110,10 +111,10 @@ vmbus_xact_get1(struct vmbus_xact_ctx *c { struct vmbus_xact *xact; - mtx_lock(&ctx->xc_free_lock); + mtx_lock(&ctx->xc_lock); while ((ctx->xc_flags & dtor_flag) == 0 && ctx->xc_free == NULL) - mtx_sleep(&ctx->xc_free, &ctx->xc_free_lock, 0, "gxact", 0); + mtx_sleep(&ctx->xc_free, &ctx->xc_lock, 0, "gxact", 0); if (ctx->xc_flags & dtor_flag) { /* Being destroyed */ xact = NULL; @@ -124,7 +125,7 @@ vmbus_xact_get1(struct vmbus_xact_ctx *c ctx->xc_free = NULL; } - mtx_unlock(&ctx->xc_free_lock); + mtx_unlock(&ctx->xc_lock); return (xact); } @@ -146,8 +147,7 @@ vmbus_xact_ctx_create(bus_dma_tag_t dtag return (NULL); } - mtx_init(&ctx->xc_free_lock, "vmbus xact free", NULL, MTX_DEF); - mtx_init(&ctx->xc_active_lock, "vmbus xact active", NULL, MTX_DEF); + mtx_init(&ctx->xc_lock, "vmbus xact", NULL, MTX_DEF); return (ctx); } @@ -157,9 +157,9 @@ vmbus_xact_ctx_destroy(struct vmbus_xact { struct vmbus_xact *xact; - mtx_lock(&ctx->xc_free_lock); + mtx_lock(&ctx->xc_lock); ctx->xc_flags |= VMBUS_XACT_CTXF_DESTROY; - mtx_unlock(&ctx->xc_free_lock); + mtx_unlock(&ctx->xc_lock); wakeup(&ctx->xc_free); xact = vmbus_xact_get1(ctx, 0); @@ -167,8 +167,7 @@ vmbus_xact_ctx_destroy(struct vmbus_xact panic("can't get xact"); vmbus_xact_free(xact); - mtx_destroy(&ctx->xc_free_lock); - mtx_destroy(&ctx->xc_active_lock); + mtx_destroy(&ctx->xc_lock); free(ctx, M_DEVBUF); } @@ -196,10 +195,10 @@ vmbus_xact_put(struct vmbus_xact *xact) KASSERT(ctx->xc_active == NULL, ("pending active xact")); xact->x_resp = NULL; - mtx_lock(&ctx->xc_free_lock); + mtx_lock(&ctx->xc_lock); KASSERT(ctx->xc_free == NULL, ("has free xact")); ctx->xc_free = xact; - mtx_unlock(&ctx->xc_free_lock); + mtx_unlock(&ctx->xc_lock); wakeup(&ctx->xc_free); } @@ -233,10 +232,10 @@ vmbus_xact_activate(struct vmbus_xact *x KASSERT(xact->x_resp == NULL, ("xact has pending response")); - mtx_lock(&ctx->xc_active_lock); + mtx_lock(&ctx->xc_lock); KASSERT(ctx->xc_active == NULL, ("pending active xact")); ctx->xc_active = xact; - mtx_unlock(&ctx->xc_active_lock); + mtx_unlock(&ctx->xc_lock); } void @@ -244,10 +243,10 @@ vmbus_xact_deactivate(struct vmbus_xact { struct vmbus_xact_ctx *ctx = xact->x_ctx; - mtx_lock(&ctx->xc_active_lock); + mtx_lock(&ctx->xc_lock); KASSERT(ctx->xc_active == xact, ("xact mismatch")); ctx->xc_active = NULL; - mtx_unlock(&ctx->xc_active_lock); + mtx_unlock(&ctx->xc_lock); } const void * @@ -257,17 +256,17 @@ vmbus_xact_wait1(struct vmbus_xact *xact struct vmbus_xact_ctx *ctx = xact->x_ctx; const void *resp; - mtx_lock(&ctx->xc_active_lock); + mtx_lock(&ctx->xc_lock); KASSERT(ctx->xc_active == xact, ("xact mismatch")); while (xact->x_resp == NULL) { if (can_sleep) { - mtx_sleep(&ctx->xc_active, &ctx->xc_active_lock, 0, + mtx_sleep(&ctx->xc_active, &ctx->xc_lock, 0, "wxact", 0); } else { - mtx_unlock(&ctx->xc_active_lock); + mtx_unlock(&ctx->xc_lock); DELAY(1000); - mtx_lock(&ctx->xc_active_lock); + mtx_lock(&ctx->xc_lock); } } ctx->xc_active = NULL; @@ -275,7 +274,7 @@ vmbus_xact_wait1(struct vmbus_xact *xact resp = xact->x_resp; *resp_len = xact->x_resp_len; - mtx_unlock(&ctx->xc_active_lock); + mtx_unlock(&ctx->xc_lock); return (resp); } @@ -300,7 +299,7 @@ vmbus_xact_save_resp(struct vmbus_xact * struct vmbus_xact_ctx *ctx = xact->x_ctx; size_t cplen = dlen; - mtx_assert(&ctx->xc_active_lock, MA_OWNED); + mtx_assert(&ctx->xc_lock, MA_OWNED); if (cplen > ctx->xc_resp_size) { printf("vmbus: xact response truncated %zu -> %zu\n", @@ -319,18 +318,18 @@ vmbus_xact_wakeup(struct vmbus_xact *xac { struct vmbus_xact_ctx *ctx = xact->x_ctx; - mtx_lock(&ctx->xc_active_lock); + mtx_lock(&ctx->xc_lock); vmbus_xact_save_resp(xact, data, dlen); - mtx_unlock(&ctx->xc_active_lock); + mtx_unlock(&ctx->xc_lock); wakeup(&ctx->xc_active); } void vmbus_xact_ctx_wakeup(struct vmbus_xact_ctx *ctx, const void *data, size_t dlen) { - mtx_lock(&ctx->xc_active_lock); + mtx_lock(&ctx->xc_lock); KASSERT(ctx->xc_active != NULL, ("no pending xact")); vmbus_xact_save_resp(ctx->xc_active, data, dlen); - mtx_unlock(&ctx->xc_active_lock); + mtx_unlock(&ctx->xc_lock); wakeup(&ctx->xc_active); } From owner-svn-src-head@freebsd.org Wed Nov 23 09:33:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F3D39C5183E; Wed, 23 Nov 2016 09:33:49 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 070B8171D; Wed, 23 Nov 2016 09:33:48 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN9Xmns048939; Wed, 23 Nov 2016 09:33:48 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN9Xmdp048938; Wed, 23 Nov 2016 09:33:48 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611230933.uAN9Xmdp048938@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 23 Nov 2016 09:33:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309046 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 09:33:50 -0000 Author: andrew Date: Wed Nov 23 09:33:47 2016 New Revision: 309046 URL: https://svnweb.freebsd.org/changeset/base/309046 Log: Remove the unneeded ofw_cpu_reg function signature, it's not used in this file. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Nov 23 09:25:51 2016 (r309045) +++ head/sys/arm64/arm64/mp_machdep.c Wed Nov 23 09:33:47 2016 (r309046) @@ -87,8 +87,6 @@ static struct intr_ipi *intr_ipi_lookup( static void intr_pic_ipi_setup(u_int, const char *, intr_ipi_handler_t *, void *); -boolean_t ofw_cpu_reg(phandle_t node, u_int, cell_t *); - extern struct pcpu __pcpu[]; static device_identify_t arm64_cpu_identify; From owner-svn-src-head@freebsd.org Wed Nov 23 09:38:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 015DAC51940; Wed, 23 Nov 2016 09:38:12 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BF7A71AAB; Wed, 23 Nov 2016 09:38:11 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAN9cAmP049175; Wed, 23 Nov 2016 09:38:10 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAN9cARj049174; Wed, 23 Nov 2016 09:38:10 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611230938.uAN9cARj049174@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Wed, 23 Nov 2016 09:38:10 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309048 - head/sys/arm64/arm64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 09:38:12 -0000 Author: andrew Date: Wed Nov 23 09:38:10 2016 New Revision: 309048 URL: https://svnweb.freebsd.org/changeset/base/309048 Log: Mark cpu_find_cpu0_fdt as FDT only. It's only called when this is set, and the kernel is using FDT. Obtained from: ABT Systems Ltd Sponsored by: The FreeBSD Foundation Modified: head/sys/arm64/arm64/mp_machdep.c Modified: head/sys/arm64/arm64/mp_machdep.c ============================================================================== --- head/sys/arm64/arm64/mp_machdep.c Wed Nov 23 09:37:02 2016 (r309047) +++ head/sys/arm64/arm64/mp_machdep.c Wed Nov 23 09:38:10 2016 (r309048) @@ -511,6 +511,7 @@ cpu_mp_announce(void) { } +#ifdef FDT static boolean_t cpu_find_cpu0_fdt(u_int id, phandle_t node, u_int addr_size, pcell_t *reg) { @@ -531,6 +532,7 @@ cpu_find_cpu0_fdt(u_int id, phandle_t no return (TRUE); } +#endif void cpu_mp_setmaxid(void) From owner-svn-src-head@freebsd.org Wed Nov 23 10:52:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 538E7C50223; Wed, 23 Nov 2016 10:52:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2590A991; Wed, 23 Nov 2016 10:52:20 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANAqJA4081199; Wed, 23 Nov 2016 10:52:19 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANAqJ21081198; Wed, 23 Nov 2016 10:52:19 GMT (envelope-from des@FreeBSD.org) Message-Id: <201611231052.uANAqJ21081198@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Wed, 23 Nov 2016 10:52:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309051 - head/lib/libfetch X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 10:52:20 -0000 Author: des Date: Wed Nov 23 10:52:19 2016 New Revision: 309051 URL: https://svnweb.freebsd.org/changeset/base/309051 Log: Remove debugging code. Modified: head/lib/libfetch/common.c Modified: head/lib/libfetch/common.c ============================================================================== --- head/lib/libfetch/common.c Wed Nov 23 10:11:15 2016 (r309050) +++ head/lib/libfetch/common.c Wed Nov 23 10:52:19 2016 (r309051) @@ -283,18 +283,14 @@ fetch_resolve(const char *addr, int port } /* resolve */ - fetch_info("resolving host = %s service = %s af = %d", - host, service, af); memset(&hints, 0, sizeof(hints)); hints.ai_family = af; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_ADDRCONFIG; if ((err = getaddrinfo(host, service, &hints, &res)) != 0) { netdb_seterr(err); - fetch_info("getaddrinfo() failed: %s", gai_strerror(err)); return (NULL); } - fetch_info("getaddrinfo() succeeded %p", res); return (res); } From owner-svn-src-head@freebsd.org Wed Nov 23 11:19:26 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BAB3CC50CBC; Wed, 23 Nov 2016 11:19:26 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::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 5AF90C59; Wed, 23 Nov 2016 11:19:26 +0000 (UTC) (envelope-from cochard@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id t79so18982584wmt.0; Wed, 23 Nov 2016 03:19: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:from:date:message-id :subject:to:cc; bh=ya4dk/gan+aP90Gxb0dr/DNpQ8ROp8ZsKc9sgXyiK/I=; b=BCqv3FMU2hjSDkrf0SCU9GAju0UnOc0/gzuQmiES38xIMjQPs8kU/XDj4JGFhOt1m1 ypgGBizrATfI8DHQu0g0VXjHAsyU3WOYJZTrRlSLpupR7Wj/T2fSMAUW/xBLyuVjEpyC 0/LKjDhc4+Dv3jtE5uzhmIEFm7juC0O2Rlo0xUg4j/Dt7Z0OfR2IhQxhUjnnjl1f4+fA OSfmhfqNhDCVnG1zhS3fweBU6GJ4qnt0r6fdOVZoMWXll+TezKBEX07hL8Woqt1ZMi52 fS19lxKcVuPUtddrCB+v0QyJ5FYz0UGSD64+d6h1wJGncNjwFUy0sZDNhUg9qBVy8oRG JiBw== 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; bh=ya4dk/gan+aP90Gxb0dr/DNpQ8ROp8ZsKc9sgXyiK/I=; b=dgu4QLyIULgTQs1/sIQw9cp3cg1ZXzYca4fItxAyKLzWSBqPdX966WmuUtpH3agAf3 yoXGA4uNjGQNArW+XbWeoT5Vm6ilKzckioT6ffstmT1B7B1SK6O27Md8As40KYjM8207 6Br+vYReU+RgkQb80kDJuy7sUghTGFEPXFq4HARlNdbY3uPGhZO/tkfOyY6sw+7JZo7u 0nCUyFNDQx5QF1ujFGK6/nNiwymFyy9BXvI5bAtimX/WYeA7QG7UActB1G9sX650v2ip zEzlTjWBm/2LmSRidCMIoe1e0yiKtRi7U39BJbH7nO98iUKRhlCK27ql7g23aRjQ702e eUMQ== X-Gm-Message-State: AKaTC00ou0hi8Bg7/urJWBcvwXYzg0p1ktcIufEYu87SywCwYFAbVwnU2vWY21RH46SSrU7YzFoqxkbnRah3Ig== X-Received: by 10.28.213.74 with SMTP id m71mr6748506wmg.39.1479899964357; Wed, 23 Nov 2016 03:19:24 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.194.28.7 with HTTP; Wed, 23 Nov 2016 03:19:03 -0800 (PST) In-Reply-To: <201610161413.u9GEDW91013522@repo.freebsd.org> References: <201610161413.u9GEDW91013522@repo.freebsd.org> From: =?UTF-8?Q?Olivier_Cochard=2DLabb=C3=A9?= Date: Wed, 23 Nov 2016 12:19:03 +0100 X-Google-Sender-Auth: CQ0fulPkvAJgUzPUvJRCsBLdMNg Message-ID: Subject: Re: svn commit: r307394 - in head: share/man/man4 sys/conf sys/dev/netmap sys/modules/netmap sys/net tools/tools/netmap To: Luigi Rizzo , Navdeep Parhar Cc: src-committers , svn-src-all , svn-src-head Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 11:19:26 -0000 =E2=80=8BHi, since this commit, my system panic when using netmap pkt-gen with a Chelsio T540-CR NIC (I didn't reproduce it with Intel NIC). - Latest known working system: FreeBSD 12.0-CURRENT #2 r307393 - Crash since: FreeBSD 12.0-CURRENT #1 r307396 On a fresh (r309034) system, here is he behavior: [root@SM]~# pkt-gen -i vcxl0 -f rx -w 4 133.571714 main [2546] interface is vcxl0 133.572025 main [2670] running on 1 cpus (have 8) 133.572377 extract_ip_range [462] range is 10.0.0.1:1234 to 10.0.0.1:1234 133.572393 extract_ip_range [462] range is 10.1.0.1:1234 to 10.1.0.1:1234 =E2=80=8BFatal trap 12: page fault while in kernel mode cpuid =3D 7; apic id =3D 0e fault virtual address =3D 0x0 fault code =3D supervisor write data, page not present instruction pointer =3D 0x20:0xffffffff80d5480e stack pointer =3D 0x28:0xfffffe0466ba61e0 frame pointer =3D 0x28:0xfffffe0466ba61e0 code segment =3D base 0x0, limit 0xfffff, type 0x1b =3D DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags =3D interrupt enabled, resume, IOPL =3D 0 current process =3D 1900 (pkt-gen) trap number =3D 12 panic: page fault cpuid =3D 7 KDB: stack backtrace: #0 0xffffffff80971167 at kdb_backtrace+0x67 #1 0xffffffff80929b72 at vpanic+0x182 #2 0xffffffff809299e3 at panic+0x43 #3 0xffffffff80d56e84 at trap_fatal+0x324 #4 0xffffffff80d57083 at trap_pfault+0x1e3 #5 0xffffffff80d56683 at trap+0x273 #6 0xffffffff80d39261 at calltrap+0x8 #7 0xffffffff8047c664 at cxgbe_netmap_reg+0x2f4 #8 0xffffffff8063d48c at netmap_hw_reg+0x2c #9 0xffffffff8063a93b at netmap_do_regif+0x2ab #10 0xffffffff8063b564 at netmap_ioctl+0xba4 #11 0xffffffff8063f14e at freebsd_netmap_ioctl+0x3e #12 0xffffffff8085e47c at devfs_ioctl+0xac #13 0xffffffff80eee78d at VOP_IOCTL_APV+0x8d #14 0xffffffff80a08901 at vn_ioctl+0x131 #15 0xffffffff8085ecdf at devfs_ioctl_f+0x1f #16 0xffffffff8098ed7b at kern_ioctl+0x29b #17 0xffffffff8098ea71 at sys_ioctl+0x171 Uptime: 4m41s Dumping 1112 out of 16325 MB:..2%..11%..21%..31%..41%.. 51%..61%..71%..81%..91% Dump complete (kgdb) backtrace #0 doadump (textdump=3D) at pcpu.h:222 #1 0xffffffff809295f9 in kern_reboot (howto=3D260) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/kern/kern_shutdown.c:366 #2 0xffffffff80929bab in vpanic (fmt=3D, ap=3D) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/kern/kern_shutdown.c:759 #3 0xffffffff809299e3 in panic (fmt=3D0x0) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/kern/kern_shutdown.c:690 #4 0xffffffff80d56e84 in trap_fatal (frame=3D0xfffffe0466ba6120, eva=3D0) = at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/amd64/amd64/trap.c:801 #5 0xffffffff80d57083 in trap_pfault (frame=3D0xfffffe0466ba6120, usermode=3D0) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/amd64/amd64/trap.c:658 #6 0xffffffff80d56683 in trap (frame=3D0xfffffe0466ba6120) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/amd64/amd64/trap.c:421 #7 0xffffffff80d39261 in calltrap () at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/amd64/amd64/exception.S:236 #8 0xffffffff80d5480e in bzero () at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/amd64/amd64/support.S:53 #9 0xffffffff8047c664 in cxgbe_netmap_reg (na=3D, on=3D) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/dev/cxgbe/t4_netmap.c:102 #10 0xffffffff8063d48c in netmap_hw_reg (na=3D0xfffff800055ba400, onoff=3D1= ) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/dev/netmap/netmap.c:2788 #11 0xffffffff8063a93b in netmap_do_regif (priv=3D, na=3D, ringid=3D, flags=3D) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/dev/netmap/netmap.c:2050 #12 0xffffffff8063b564 in netmap_ioctl (priv=3D, cmd=3D, data=3D0xfffffe0466ba69b0 "vcxl0", td=3D0xfffff8001509a500) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/dev/netmap/netmap.c:2257 #13 0xffffffff8063f14e in freebsd_netmap_ioctl (dev=3D= , cmd=3D3225184658, data=3D0xfffffe0466ba69b0 "vcxl0", ffla=3D, td=3D0xfffff8001509a500) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/dev/netmap/netmap_freebsd.c:1389 #14 0xffffffff8085e47c in devfs_ioctl (ap=3D) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/fs/devfs/devfs_vnops.c:831 #15 0xffffffff80eee78d in VOP_IOCTL_APV (vop=3D, a=3D) at vnode_if.c:1067 #16 0xffffffff80a08901 in vn_ioctl (fp=3D0xfffff80015191f00, com=3D, data=3D0xfffffe0466ba69b0, active_cred=3D0xfffff8019928bd00= , td=3D0x1) at vnode_if.h:448 #17 0xffffffff8085ecdf in devfs_ioctl_f (fp=3D0x0, com=3D131072, data=3D0x0= , cred=3D0x4000, td=3D0xfffff8001509a500) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/fs/devfs/devfs_vnops.c:789 #18 0xffffffff8098ed7b in kern_ioctl (td=3D, fd=3D, com=3D3225184658, data=3D0xfffffe0466ba69b0 "vcxl0") at file.h:327 #19 0xffffffff8098ea71 in sys_ioctl (td=3D0xfffff8001509a500, uap=3D0xfffffe0466ba6b10) at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/kern/sys_generic.c:746 #20 0xffffffff80d57825 in amd64_syscall (td=3D, traced=3D0) at subr_syscall.c:135 #21 0xffffffff80d3954b in Xfast_syscall () at /usr/local/BSDRP/BSDRPcur/FreeBSD/src/sys/amd64/amd64/exception.S:396 #22 0x000000080100e5ca in ?? () =E2=80=8BRegards, Olivier=E2=80=8B From owner-svn-src-head@freebsd.org Wed Nov 23 11:30:41 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D429DC50FF9; Wed, 23 Nov 2016 11:30:41 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A4AE267D; Wed, 23 Nov 2016 11:30:41 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANBUex5094615; Wed, 23 Nov 2016 11:30:40 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANBUetw094614; Wed, 23 Nov 2016 11:30:40 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611231130.uANBUetw094614@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 23 Nov 2016 11:30:40 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309053 - head/sys/mips/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 11:30:41 -0000 Author: br Date: Wed Nov 23 11:30:40 2016 New Revision: 309053 URL: https://svnweb.freebsd.org/changeset/base/309053 Log: Increase pcpu size to 512 so it become both denominator of PAGE_SIZE and aligned to CACHE_LINE_SIZE. This fixes CTASSERT. Sponsored by: DARPA, AFRL Modified: head/sys/mips/include/pcpu.h Modified: head/sys/mips/include/pcpu.h ============================================================================== --- head/sys/mips/include/pcpu.h Wed Nov 23 11:03:23 2016 (r309052) +++ head/sys/mips/include/pcpu.h Wed Nov 23 11:30:40 2016 (r309053) @@ -48,7 +48,7 @@ #else #define PCPU_MD_MIPS32_FIELDS \ PCPU_MD_COMMON_FIELDS \ - char __pad[133] + char __pad[193] #endif #ifdef __mips_n64 From owner-svn-src-head@freebsd.org Wed Nov 23 11:56:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E4FDEC508C1; Wed, 23 Nov 2016 11:56:23 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A59EE84A; Wed, 23 Nov 2016 11:56:23 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANBuM6u006213; Wed, 23 Nov 2016 11:56:22 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANBuMkT006209; Wed, 23 Nov 2016 11:56:22 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611231156.uANBuMkT006209@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Wed, 23 Nov 2016 11:56:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309055 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 11:56:24 -0000 Author: br Date: Wed Nov 23 11:56:22 2016 New Revision: 309055 URL: https://svnweb.freebsd.org/changeset/base/309055 Log: Split MALTA board config to big and little endian versions. This fixes compilation after r308807 ("Pass MACHINE_ARCH on command line for MIPS kernels.") Sponsored by: DARPA, AFRL Added: head/sys/mips/conf/MALTA64EL - copied, changed from r309054, head/sys/mips/conf/MALTA64 head/sys/mips/conf/MALTAEL - copied, changed from r309054, head/sys/mips/conf/MALTA Modified: head/sys/mips/conf/MALTA head/sys/mips/conf/MALTA64 Modified: head/sys/mips/conf/MALTA ============================================================================== --- head/sys/mips/conf/MALTA Wed Nov 23 11:32:57 2016 (r309054) +++ head/sys/mips/conf/MALTA Wed Nov 23 11:56:22 2016 (r309055) @@ -1,4 +1,4 @@ -# MALTA -- Kernel config for MALTA boards +# MALTA -- Kernel config for MALTA endian-big boards # # $FreeBSD$ @@ -6,6 +6,6 @@ ident MALTA include "std.MALTA" -machine mips mipsel # Malta supports both, so it isn't in std.malta +machine mips mips makeoptions KERNLOADADDR=0x80100000 Modified: head/sys/mips/conf/MALTA64 ============================================================================== --- head/sys/mips/conf/MALTA64 Wed Nov 23 11:32:57 2016 (r309054) +++ head/sys/mips/conf/MALTA64 Wed Nov 23 11:56:22 2016 (r309055) @@ -1,4 +1,4 @@ -# MALTA64 -- 64-bit kernel config for MALTA boards +# MALTA64 -- 64-bit kernel config for MALTA endian-big boards # # $FreeBSD$ @@ -6,7 +6,7 @@ ident MALTA64 include "std.MALTA" -machine mips mips64el # Malta supports both, so it isn't in std.malta +machine mips mips64 makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" Copied and modified: head/sys/mips/conf/MALTA64EL (from r309054, head/sys/mips/conf/MALTA64) ============================================================================== --- head/sys/mips/conf/MALTA64 Wed Nov 23 11:32:57 2016 (r309054, copy source) +++ head/sys/mips/conf/MALTA64EL Wed Nov 23 11:56:22 2016 (r309055) @@ -1,4 +1,4 @@ -# MALTA64 -- 64-bit kernel config for MALTA boards +# MALTA64 -- 64-bit kernel config for MALTA endian-little boards # # $FreeBSD$ @@ -6,7 +6,7 @@ ident MALTA64 include "std.MALTA" -machine mips mips64el # Malta supports both, so it isn't in std.malta +machine mips mips64el makeoptions ARCH_FLAGS="-march=mips64 -mabi=64" Copied and modified: head/sys/mips/conf/MALTAEL (from r309054, head/sys/mips/conf/MALTA) ============================================================================== --- head/sys/mips/conf/MALTA Wed Nov 23 11:32:57 2016 (r309054, copy source) +++ head/sys/mips/conf/MALTAEL Wed Nov 23 11:56:22 2016 (r309055) @@ -1,4 +1,4 @@ -# MALTA -- Kernel config for MALTA boards +# MALTA -- Kernel config for MALTA endian-little boards # # $FreeBSD$ @@ -6,6 +6,6 @@ ident MALTA include "std.MALTA" -machine mips mipsel # Malta supports both, so it isn't in std.malta +machine mips mipsel makeoptions KERNLOADADDR=0x80100000 From owner-svn-src-head@freebsd.org Wed Nov 23 14:15:52 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 41D1EC51973; Wed, 23 Nov 2016 14:15:52 +0000 (UTC) (envelope-from misha@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1153DF2B; Wed, 23 Nov 2016 14:15:51 +0000 (UTC) (envelope-from misha@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANEFpTQ071856; Wed, 23 Nov 2016 14:15:51 GMT (envelope-from misha@FreeBSD.org) Received: (from misha@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANEFpVi071855; Wed, 23 Nov 2016 14:15:51 GMT (envelope-from misha@FreeBSD.org) Message-Id: <201611231415.uANEFpVi071855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: misha set sender to misha@FreeBSD.org using -f From: Mikhail Pchelin Date: Wed, 23 Nov 2016 14:15:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309059 - head/share/misc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 14:15:52 -0000 Author: misha (ports committer) Date: Wed Nov 23 14:15:51 2016 New Revision: 309059 URL: https://svnweb.freebsd.org/changeset/base/309059 Log: - Add myself (misha) as a ports committer - Update mentor/mentee relationships Approved by: jpaetzel (mentor) Modified: head/share/misc/committers-ports.dot Modified: head/share/misc/committers-ports.dot ============================================================================== --- head/share/misc/committers-ports.dot Wed Nov 23 13:45:25 2016 (r309058) +++ head/share/misc/committers-ports.dot Wed Nov 23 14:15:51 2016 (r309059) @@ -166,6 +166,7 @@ matthew [label="Matthew Seaman\nmatthew@ mezz [label="Jeremy Messenger\nmezz@FreeBSD.org\n2004/04/30"] mharo [label="Michael Haro\nmharo@FreeBSD.org\n1999/04/13"] milki [label="Jonathan Chu\nmilki@FreeBSD.org\n2013/12/15"] +misha [label="Mikhail Pchelin\nmisha@FreeBSD.org\n2016/11/15"] miwi [label="Martin Wilke\nmiwi@FreeBSD.org\n2006/06/04"] mm [label="Martin Matuska\nmm@FreeBSD.org\n2007/04/04"] mnag [label="Marcus Alves Grando\nmnag@FreeBSD.org\n2005/09/15"] @@ -378,6 +379,7 @@ flz -> johans flz -> laszlof flz -> romain +jpaetzel -> misha jpaetzel -> wg gabor -> lippe @@ -617,6 +619,7 @@ wen -> pawel wg -> alexey wg -> danilo wg -> dvl +wg -> misha wg -> nemysis will -> lioux From owner-svn-src-head@freebsd.org Wed Nov 23 16:54:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 339D1C51D25; Wed, 23 Nov 2016 16:54:29 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 02DA31FEB; Wed, 23 Nov 2016 16:54:28 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANGsSjG039057; Wed, 23 Nov 2016 16:54:28 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANGsSxE039056; Wed, 23 Nov 2016 16:54:28 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201611231654.uANGsSxE039056@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 23 Nov 2016 16:54:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309060 - head/tools/tools/nanobsd/Files/root X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 16:54:29 -0000 Author: brueffer Date: Wed Nov 23 16:54:27 2016 New Revision: 309060 URL: https://svnweb.freebsd.org/changeset/base/309060 Log: Fix comment typo. PR: 208484 Submitted by: madpilot MFC after: 1 week Modified: head/tools/tools/nanobsd/Files/root/save_cfg Modified: head/tools/tools/nanobsd/Files/root/save_cfg ============================================================================== --- head/tools/tools/nanobsd/Files/root/save_cfg Wed Nov 23 14:15:51 2016 (r309059) +++ head/tools/tools/nanobsd/Files/root/save_cfg Wed Nov 23 16:54:27 2016 (r309060) @@ -66,7 +66,7 @@ do # i) -> add file to ignore list (/cfg/.ignore hiereachy) and never save # try to add this file to /cfg. # - # touch is ised to add files to /cfg to keep the script flow straight and easy + # touch is used to add files to /cfg to keep the script flow straight and easy # read -p "New file /etc/$filename found. Add to /cfg (y/n/i)? " key case "$key" in From owner-svn-src-head@freebsd.org Wed Nov 23 17:53:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 81ED0C5119E; Wed, 23 Nov 2016 17:53:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4CF45257; Wed, 23 Nov 2016 17:53:09 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANHr8LM063720; Wed, 23 Nov 2016 17:53:08 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANHr7eb063712; Wed, 23 Nov 2016 17:53:07 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201611231753.uANHr7eb063712@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Wed, 23 Nov 2016 17:53:07 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309062 - in head/sys: fs/ext2fs kern sys ufs/ffs vm X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 17:53:09 -0000 Author: markj Date: Wed Nov 23 17:53:07 2016 New Revision: 309062 URL: https://svnweb.freebsd.org/changeset/base/309062 Log: Release laundered vnode pages to the head of the inactive queue. The swap pager enqueues laundered pages near the head of the inactive queue to avoid another trip through LRU before reclamation. This change adds support for this behaviour to the vnode pager and makes use of it in UFS and ext2fs. Some ioflag handling is consolidated into a common subroutine so that this support can be easily extended to other filesystems which make use of the buffer cache. No changes are needed for ZFS since its putpages routine always undirties the pages before returning, and the laundry thread requeues the pages appropriately in this case. Reviewed by: alc, kib Differential Revision: https://reviews.freebsd.org/D8589 Modified: head/sys/fs/ext2fs/ext2_vnops.c head/sys/kern/vfs_bio.c head/sys/sys/buf.h head/sys/sys/vnode.h head/sys/ufs/ffs/ffs_vnops.c head/sys/vm/vm_pageout.c head/sys/vm/vm_pager.h head/sys/vm/vnode_pager.c Modified: head/sys/fs/ext2fs/ext2_vnops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vnops.c Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/fs/ext2fs/ext2_vnops.c Wed Nov 23 17:53:07 2016 (r309062) @@ -1701,15 +1701,6 @@ ext2_ind_read(struct vop_read_args *ap) } /* - * If IO_DIRECT then set B_DIRECT for the buffer. This - * will cause us to attempt to release the buffer later on - * and will cause the buffer cache to attempt to free the - * underlying pages. - */ - if (ioflag & IO_DIRECT) - bp->b_flags |= B_DIRECT; - - /* * We should only get non-zero b_resid when an I/O error * has occurred, which should cause us to break above. * However, if the short read did not cause an error, @@ -1726,25 +1717,7 @@ ext2_ind_read(struct vop_read_args *ap) (int)xfersize, uio); if (error) break; - - if (ioflag & (IO_VMIO|IO_DIRECT)) { - /* - * If it's VMIO or direct I/O, then we don't - * need the buf, mark it available for - * freeing. If it's non-direct VMIO, the VM has - * the data. - */ - bp->b_flags |= B_RELBUF; - brelse(bp); - } else { - /* - * Otherwise let whoever - * made the request take care of - * freeing it. We just queue - * it onto another list. - */ - bqrelse(bp); - } + vfs_bio_brelse(bp, ioflag); } /* @@ -1753,14 +1726,8 @@ ext2_ind_read(struct vop_read_args *ap) * and on normal completion has not set a new value into it. * so it must have come from a 'break' statement */ - if (bp != NULL) { - if (ioflag & (IO_VMIO|IO_DIRECT)) { - bp->b_flags |= B_RELBUF; - brelse(bp); - } else { - bqrelse(bp); - } - } + if (bp != NULL) + vfs_bio_brelse(bp, ioflag); if ((error == 0 || uio->uio_resid != orig_resid) && (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0) @@ -2018,9 +1985,8 @@ ext2_write(struct vop_write_args *ap) if (error != 0 && (bp->b_flags & B_CACHE) == 0 && fs->e2fs_bsize == xfersize) vfs_bio_clrbuf(bp); - if (ioflag & (IO_VMIO|IO_DIRECT)) { - bp->b_flags |= B_RELBUF; - } + + vfs_bio_set_flags(bp, ioflag); /* * If IO_SYNC each buffer is written synchronously. Otherwise Modified: head/sys/kern/vfs_bio.c ============================================================================== --- head/sys/kern/vfs_bio.c Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/kern/vfs_bio.c Wed Nov 23 17:53:07 2016 (r309062) @@ -4414,6 +4414,45 @@ vfs_bio_bzero_buf(struct buf *bp, int ba } /* + * Update buffer flags based on I/O request parameters, optionally releasing the + * buffer. If it's VMIO or direct I/O, the buffer pages are released to the VM, + * where they may be placed on a page queue (VMIO) or freed immediately (direct + * I/O). Otherwise the buffer is released to the cache. + */ +static void +b_io_dismiss(struct buf *bp, int ioflag, bool release) +{ + + KASSERT((ioflag & IO_NOREUSE) == 0 || (ioflag & IO_VMIO) != 0, + ("buf %p non-VMIO noreuse", bp)); + + if ((ioflag & IO_DIRECT) != 0) + bp->b_flags |= B_DIRECT; + if ((ioflag & (IO_VMIO | IO_DIRECT)) != 0 && LIST_EMPTY(&bp->b_dep)) { + bp->b_flags |= B_RELBUF; + if ((ioflag & IO_NOREUSE) != 0) + bp->b_flags |= B_NOREUSE; + if (release) + brelse(bp); + } else if (release) + bqrelse(bp); +} + +void +vfs_bio_brelse(struct buf *bp, int ioflag) +{ + + b_io_dismiss(bp, ioflag, true); +} + +void +vfs_bio_set_flags(struct buf *bp, int ioflag) +{ + + b_io_dismiss(bp, ioflag, false); +} + +/* * vm_hold_load_pages and vm_hold_free_pages get pages into * a buffers address space. The pages are anonymous and are * not associated with a file object. Modified: head/sys/sys/buf.h ============================================================================== --- head/sys/sys/buf.h Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/sys/buf.h Wed Nov 23 17:53:07 2016 (r309062) @@ -538,9 +538,11 @@ int cluster_read(struct vnode *, u_quad_ struct ucred *, long, int, int, struct buf **); int cluster_wbuild(struct vnode *, long, daddr_t, int, int); void cluster_write(struct vnode *, struct buf *, u_quad_t, int, int); +void vfs_bio_brelse(struct buf *bp, int ioflags); void vfs_bio_bzero_buf(struct buf *bp, int base, int size); -void vfs_bio_set_valid(struct buf *, int base, int size); void vfs_bio_clrbuf(struct buf *); +void vfs_bio_set_flags(struct buf *bp, int ioflags); +void vfs_bio_set_valid(struct buf *, int base, int size); void vfs_busy_pages(struct buf *, int clear_modify); void vfs_unbusy_pages(struct buf *); int vmapbuf(struct buf *, int); Modified: head/sys/sys/vnode.h ============================================================================== --- head/sys/sys/vnode.h Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/sys/vnode.h Wed Nov 23 17:53:07 2016 (r309062) @@ -307,6 +307,7 @@ struct vattr { #define IO_INVAL 0x0040 /* invalidate after I/O */ #define IO_SYNC 0x0080 /* do I/O synchronously */ #define IO_DIRECT 0x0100 /* attempt to bypass buffer cache */ +#define IO_NOREUSE 0x0200 /* VMIO data won't be reused */ #define IO_EXT 0x0400 /* operate on external attributes */ #define IO_NORMAL 0x0800 /* operate on regular data */ #define IO_NOMACCHECK 0x1000 /* MAC checks unnecessary */ Modified: head/sys/ufs/ffs/ffs_vnops.c ============================================================================== --- head/sys/ufs/ffs/ffs_vnops.c Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/ufs/ffs/ffs_vnops.c Wed Nov 23 17:53:07 2016 (r309062) @@ -601,15 +601,6 @@ ffs_read(ap) } /* - * If IO_DIRECT then set B_DIRECT for the buffer. This - * will cause us to attempt to release the buffer later on - * and will cause the buffer cache to attempt to free the - * underlying pages. - */ - if (ioflag & IO_DIRECT) - bp->b_flags |= B_DIRECT; - - /* * We should only get non-zero b_resid when an I/O error * has occurred, which should cause us to break above. * However, if the short read did not cause an error, @@ -633,25 +624,7 @@ ffs_read(ap) if (error) break; - if ((ioflag & (IO_VMIO|IO_DIRECT)) && - (LIST_EMPTY(&bp->b_dep))) { - /* - * If there are no dependencies, and it's VMIO, - * then we don't need the buf, mark it available - * for freeing. For non-direct VMIO reads, the VM - * has the data. - */ - bp->b_flags |= B_RELBUF; - brelse(bp); - } else { - /* - * Otherwise let whoever - * made the request take care of - * freeing it. We just queue - * it onto another list. - */ - bqrelse(bp); - } + vfs_bio_brelse(bp, ioflag); } /* @@ -660,15 +633,8 @@ ffs_read(ap) * and on normal completion has not set a new value into it. * so it must have come from a 'break' statement */ - if (bp != NULL) { - if ((ioflag & (IO_VMIO|IO_DIRECT)) && - (LIST_EMPTY(&bp->b_dep))) { - bp->b_flags |= B_RELBUF; - brelse(bp); - } else { - bqrelse(bp); - } - } + if (bp != NULL) + vfs_bio_brelse(bp, ioflag); if ((error == 0 || uio->uio_resid != orig_resid) && (vp->v_mount->mnt_flag & (MNT_NOATIME | MNT_RDONLY)) == 0 && @@ -786,8 +752,6 @@ ffs_write(ap) vnode_pager_setsize(vp, ip->i_size); break; } - if (ioflag & IO_DIRECT) - bp->b_flags |= B_DIRECT; if ((ioflag & (IO_SYNC|IO_INVAL)) == (IO_SYNC|IO_INVAL)) bp->b_flags |= B_NOCACHE; @@ -827,10 +791,8 @@ ffs_write(ap) if (error != 0 && (bp->b_flags & B_CACHE) == 0 && fs->fs_bsize == xfersize) vfs_bio_clrbuf(bp); - if ((ioflag & (IO_VMIO|IO_DIRECT)) && - (LIST_EMPTY(&bp->b_dep))) { - bp->b_flags |= B_RELBUF; - } + + vfs_bio_set_flags(bp, ioflag); /* * If IO_SYNC each buffer is written synchronously. Otherwise @@ -978,15 +940,6 @@ ffs_extread(struct vnode *vp, struct uio } /* - * If IO_DIRECT then set B_DIRECT for the buffer. This - * will cause us to attempt to release the buffer later on - * and will cause the buffer cache to attempt to free the - * underlying pages. - */ - if (ioflag & IO_DIRECT) - bp->b_flags |= B_DIRECT; - - /* * We should only get non-zero b_resid when an I/O error * has occurred, which should cause us to break above. * However, if the short read did not cause an error, @@ -1004,26 +957,7 @@ ffs_extread(struct vnode *vp, struct uio (int)xfersize, uio); if (error) break; - - if ((ioflag & (IO_VMIO|IO_DIRECT)) && - (LIST_EMPTY(&bp->b_dep))) { - /* - * If there are no dependencies, and it's VMIO, - * then we don't need the buf, mark it available - * for freeing. For non-direct VMIO reads, the VM - * has the data. - */ - bp->b_flags |= B_RELBUF; - brelse(bp); - } else { - /* - * Otherwise let whoever - * made the request take care of - * freeing it. We just queue - * it onto another list. - */ - bqrelse(bp); - } + vfs_bio_brelse(bp, ioflag); } /* @@ -1032,15 +966,8 @@ ffs_extread(struct vnode *vp, struct uio * and on normal completion has not set a new value into it. * so it must have come from a 'break' statement */ - if (bp != NULL) { - if ((ioflag & (IO_VMIO|IO_DIRECT)) && - (LIST_EMPTY(&bp->b_dep))) { - bp->b_flags |= B_RELBUF; - brelse(bp); - } else { - bqrelse(bp); - } - } + if (bp != NULL) + vfs_bio_brelse(bp, ioflag); return (error); } @@ -1109,8 +1036,6 @@ ffs_extwrite(struct vnode *vp, struct ui */ if ((bp->b_flags & B_CACHE) == 0 && fs->fs_bsize <= xfersize) vfs_bio_clrbuf(bp); - if (ioflag & IO_DIRECT) - bp->b_flags |= B_DIRECT; if (uio->uio_offset + xfersize > dp->di_extsize) dp->di_extsize = uio->uio_offset + xfersize; @@ -1121,10 +1046,8 @@ ffs_extwrite(struct vnode *vp, struct ui error = uiomove((char *)bp->b_data + blkoffset, (int)xfersize, uio); - if ((ioflag & (IO_VMIO|IO_DIRECT)) && - (LIST_EMPTY(&bp->b_dep))) { - bp->b_flags |= B_RELBUF; - } + + vfs_bio_set_flags(bp, ioflag); /* * If IO_SYNC each buffer is written synchronously. Otherwise Modified: head/sys/vm/vm_pageout.c ============================================================================== --- head/sys/vm/vm_pageout.c Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/vm/vm_pageout.c Wed Nov 23 17:53:07 2016 (r309062) @@ -483,8 +483,8 @@ more: if (ib != 0 && pageout_count < vm_pageout_page_count) goto more; - return (vm_pageout_flush(&mc[page_base], pageout_count, 0, 0, NULL, - NULL)); + return (vm_pageout_flush(&mc[page_base], pageout_count, + VM_PAGER_PUT_NOREUSE, 0, NULL, NULL)); } /* Modified: head/sys/vm/vm_pager.h ============================================================================== --- head/sys/vm/vm_pager.h Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/vm/vm_pager.h Wed Nov 23 17:53:07 2016 (r309062) @@ -95,6 +95,7 @@ extern struct pagerops mgtdevicepagerops #define VM_PAGER_PUT_SYNC 0x0001 #define VM_PAGER_PUT_INVAL 0x0002 +#define VM_PAGER_PUT_NOREUSE 0x0004 #define VM_PAGER_CLUSTER_OK 0x0008 #ifdef _KERNEL Modified: head/sys/vm/vnode_pager.c ============================================================================== --- head/sys/vm/vnode_pager.c Wed Nov 23 17:48:43 2016 (r309061) +++ head/sys/vm/vnode_pager.c Wed Nov 23 17:53:07 2016 (r309062) @@ -1280,6 +1280,7 @@ vnode_pager_generic_putpages(struct vnod else if ((flags & VM_PAGER_CLUSTER_OK) == 0) ioflags |= IO_ASYNC; ioflags |= (flags & VM_PAGER_PUT_INVAL) ? IO_INVAL: 0; + ioflags |= (flags & VM_PAGER_PUT_NOREUSE) ? IO_NOREUSE : 0; ioflags |= IO_SEQMAX << IO_SEQSHIFT; aiov.iov_base = (caddr_t) 0; From owner-svn-src-head@freebsd.org Wed Nov 23 18:07:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BF729C51448; Wed, 23 Nov 2016 18:07:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 85EAEB59; Wed, 23 Nov 2016 18:07:45 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANI7iNW067746; Wed, 23 Nov 2016 18:07:44 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANI7itS067745; Wed, 23 Nov 2016 18:07:44 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611231807.uANI7itS067745@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 23 Nov 2016 18:07:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309063 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 18:07:45 -0000 Author: manu Date: Wed Nov 23 18:07:44 2016 New Revision: 309063 URL: https://svnweb.freebsd.org/changeset/base/309063 Log: Test that the emac device is enabled in probe function MFC after: 3 days Modified: head/sys/arm/allwinner/if_emac.c Modified: head/sys/arm/allwinner/if_emac.c ============================================================================== --- head/sys/arm/allwinner/if_emac.c Wed Nov 23 17:53:07 2016 (r309062) +++ head/sys/arm/allwinner/if_emac.c Wed Nov 23 18:07:44 2016 (r309063) @@ -783,6 +783,9 @@ static int emac_probe(device_t dev) { + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + if (!ofw_bus_is_compatible(dev, "allwinner,sun4i-a10-emac")) return (ENXIO); From owner-svn-src-head@freebsd.org Wed Nov 23 18:31:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 87591C51C84; Wed, 23 Nov 2016 18:31:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 58DEDF69; Wed, 23 Nov 2016 18:31:35 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANIVYpc077516; Wed, 23 Nov 2016 18:31:34 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANIVY3R077515; Wed, 23 Nov 2016 18:31:34 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611231831.uANIVY3R077515@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Wed, 23 Nov 2016 18:31:34 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309064 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 18:31:35 -0000 Author: manu Date: Wed Nov 23 18:31:34 2016 New Revision: 309064 URL: https://svnweb.freebsd.org/changeset/base/309064 Log: Enable UEXT related nodes for Olimex A20 SOM UEXT are Universal EXTension connector from Olimex. They embed i2c, spi and uart pins along power in one connector and are found on most, if not all, Olimex boards. The Olimex A20 SOM EVB have two UEXT connector so enable the nodes found on those two connectors. Patch has been applied upstream, in the meantime add the nodes to our custom DTS. Modified: head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Modified: head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Wed Nov 23 18:07:44 2016 (r309063) +++ head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Wed Nov 23 18:31:34 2016 (r309064) @@ -45,3 +45,39 @@ &cpu0 { cpu-supply = <®_dcdc2>; }; + +&i2c1 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c1_pins_a>; + status = "okay"; +}; + +&i2c2 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c2_pins_a>; + status = "okay"; +}; + +&spi1 { + pinctrl-names = "default"; + pinctrl-0 = <&spi1_pins_a>, + <&spi1_cs0_pins_a>; +}; + +&spi2 { + pinctrl-names = "default"; + pinctrl-0 = <&spi2_pins_a>, + <&spi2_cs0_pins_a>; +}; + +&uart6 { + pinctrl-names = "default"; + pinctrl-0 = <&uart6_pins_a>; + status = "okay"; +}; + +&uart7 { + pinctrl-names = "default"; + pinctrl-0 = <&uart7_pins_a>; + status = "okay"; +}; From owner-svn-src-head@freebsd.org Wed Nov 23 18:45:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 720E9C51172; Wed, 23 Nov 2016 18:45:18 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 33DE3B85; Wed, 23 Nov 2016 18:45:18 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANIjHCd084982; Wed, 23 Nov 2016 18:45:17 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANIjGNw084969; Wed, 23 Nov 2016 18:45:16 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201611231845.uANIjGNw084969@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 23 Nov 2016 18:45:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309065 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 18:45:18 -0000 Author: brueffer Date: Wed Nov 23 18:45:15 2016 New Revision: 309065 URL: https://svnweb.freebsd.org/changeset/base/309065 Log: Fix various mdoc issues reported by mandoc -Tlint. Modified: head/share/man/man4/armv8crypto.4 head/share/man/man4/bhnd.4 head/share/man/man4/bhndb.4 head/share/man/man4/chromebook_platform.4 head/share/man/man4/hv_vss.4 head/share/man/man4/mpr.4 head/share/man/man4/mps.4 head/share/man/man4/ng_checksum.4 head/share/man/man4/ng_mppc.4 head/share/man/man4/ntb_hw.4 head/share/man/man4/rtwn.4 head/share/man/man4/rtwn_pci.4 head/share/man/man4/rtwn_usb.4 Modified: head/share/man/man4/armv8crypto.4 ============================================================================== --- head/share/man/man4/armv8crypto.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/armv8crypto.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -50,7 +50,7 @@ armv8crypto_load="YES" .Ed .Sh DESCRIPTION Starting with the ARMv8 architecture ARM Limited has added optional -cryptography instructions to accelerate AES, SHA-1, SHA-2, and +cryptography instructions to accelerate AES, SHA-1, SHA-2, and finite field arithmetic. .Pp The processor capability is reported as AES in the Instruction Set Modified: head/share/man/man4/bhnd.4 ============================================================================== --- head/share/man/man4/bhnd.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/bhnd.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -67,8 +67,8 @@ the .Xr bcma 4 BHND driver. .Sh SEE ALSO -.Xr bhndb 4 , .Xr bcma 4 , +.Xr bhndb 4 , .Xr siba 4 .Sh HISTORY The Modified: head/share/man/man4/bhndb.4 ============================================================================== --- head/share/man/man4/bhndb.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/bhndb.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -53,7 +53,7 @@ driver supports host bridge cores such as those used by Broadcom HND PCI, PCMCIA, and SDIO network adapters. .Sh SEE ALSO -.Xr bhnd 4 +.Xr bhnd 4 , .Xr bwn 4 .Sh HISTORY The Modified: head/share/man/man4/chromebook_platform.4 ============================================================================== --- head/share/man/man4/chromebook_platform.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/chromebook_platform.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -59,7 +59,7 @@ Those have to be compiled into the kerne .Sh SEE ALSO .Xr cyapa 4 , .Xr iicbus 4 , -.Xr isl 4 , +.Xr isl 4 .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/hv_vss.4 ============================================================================== --- head/share/man/man4/hv_vss.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/hv_vss.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -352,9 +352,10 @@ main(int argc, char* argv[]) { } return 0; } +.Ed .Sh SEE ALSO -.Xr hv_vss_daemon 8 , -.Xr hv_utils 4 +.Xr hv_utils 4 , +.Xr hv_vss_daemon 8 .Sh HISTORY The daemon was introduced in October 2016 and developed by Microsoft Corp. .Sh AUTHORS Modified: head/share/man/man4/mpr.4 ============================================================================== --- head/share/man/man4/mpr.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/mpr.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -83,7 +83,6 @@ Broadcom Ltd./Avago Tech (LSI) SAS 3216 Broadcom Ltd./Avago Tech (LSI) SAS 3224 (24 Port SAS) .El .Sh CONFIGURATION -.Pp In all tunable descriptions below, X represents the adapter number. .Pp To disable MSI interrupts for all @@ -156,7 +155,6 @@ The current number of active I/O command dev.mpr.X.io_cmds_active .Xr sysctl 8 variable. -.Ed .Pp To set the maximum number of pages that will be used per I/O for all adapters, set this tunable in Modified: head/share/man/man4/mps.4 ============================================================================== --- head/share/man/man4/mps.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/mps.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -95,7 +95,6 @@ Intel Integrated RAID Module RMS25KB040 Intel Integrated RAID Module RMS25KB080 .El .Sh CONFIGURATION -.Pp In all tunable descriptions below, X represents the adapter number. .Pp To disable MSI interrupts for all @@ -168,7 +167,6 @@ The current number of active I/O command dev.mps.X.io_cmds_active .Xr sysctl 8 variable. -.Ed .Pp To set the maximum number of pages that will be used per I/O for all adapters, set this tunable in Modified: head/share/man/man4/ng_checksum.4 ============================================================================== --- head/share/man/man4/ng_checksum.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/ng_checksum.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -134,8 +134,8 @@ can calculate CSUM_IP_UDP|CSUM_IP_TCP. The .Nm node type was implemented in -.Fx 10.2 -and first submitted in +.Fx 10.2 +and first submitted in .Fx 12.0 . .Sh AUTHORS .An "Dmitry Vagin" Aq daemon.hammer@ya.ru . Modified: head/share/man/man4/ng_mppc.4 ============================================================================== --- head/share/man/man4/ng_mppc.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/ng_mppc.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -152,7 +152,6 @@ and .Dv NETGRAPH_MPPC_ENCRYPTION are supplied to selectively compile in either or both capabilities. At least one of these must be defined, or else this node type is useless. -.Pp .Sh SEE ALSO .Xr netgraph 4 , .Xr ng_ppp 4 , Modified: head/share/man/man4/ntb_hw.4 ============================================================================== --- head/share/man/man4/ntb_hw.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/ntb_hw.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -92,8 +92,8 @@ The recommended configuration is NTB-to- all BAR sizes are set to 20 (1 MiB). This needs to be done on both systems. .Sh SEE ALSO -.Xr ntb_transport 4 , -.Xr if_ntb 4 +.Xr if_ntb 4 , +.Xr ntb_transport 4 .Sh AUTHORS .An -nosplit The Modified: head/share/man/man4/rtwn.4 ============================================================================== --- head/share/man/man4/rtwn.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/rtwn.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -198,6 +198,7 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO +.Xr hostapd 4 , .Xr intro 4 , .Xr netintro 4 , .Xr rtwn_pci 4 , @@ -209,7 +210,6 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , -.Xr hostapd 4 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY Modified: head/share/man/man4/rtwn_pci.4 ============================================================================== --- head/share/man/man4/rtwn_pci.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/rtwn_pci.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -54,7 +54,7 @@ The RTL8188CE is a highly integrated 802 a 1T1R capable baseband and an RF in a single chip. It operates in the 2GHz spectrum only. .Sh SEE ALSO +.Xr pci 4 , .Xr rtwn 4 , -.Xr rtwnfw 4 , .Xr rtwn_usb 4 , -.Xr pci 4 +.Xr rtwnfw 4 Modified: head/share/man/man4/rtwn_usb.4 ============================================================================== --- head/share/man/man4/rtwn_usb.4 Wed Nov 23 18:31:34 2016 (r309064) +++ head/share/man/man4/rtwn_usb.4 Wed Nov 23 18:45:15 2016 (r309065) @@ -98,8 +98,8 @@ based USB wireless network adapters, inc .El .Sh SEE ALSO .Xr rtwn 4 , -.Xr rtwnfw 4 , .Xr rtwn_pci 4 , +.Xr rtwnfw 4 , .Xr usb 4 .Sh BUGS The From owner-svn-src-head@freebsd.org Wed Nov 23 19:07:21 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D964C515E2; Wed, 23 Nov 2016 19:07:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 10CFA844; Wed, 23 Nov 2016 19:07:21 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [IPv6:::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by freefall.freebsd.org (Postfix) with ESMTPS id EF3FF1AC0; Wed, 23 Nov 2016 19:07:20 +0000 (UTC) (envelope-from bdrewery@FreeBSD.org) Received: from mail.xzibition.com (localhost [172.31.3.2]) by mail.xzibition.com (Postfix) with ESMTP id 3215225A47; Wed, 23 Nov 2016 19:07:19 +0000 (UTC) X-Virus-Scanned: amavisd-new at mail.xzibition.com Received: from mail.xzibition.com ([172.31.3.2]) by mail.xzibition.com (mail.xzibition.com [172.31.3.2]) (amavisd-new, port 10026) with LMTP id S8q6XkG0chBc; Wed, 23 Nov 2016 19:07:02 +0000 (UTC) Subject: Re: svn commit: r308687 - head/libexec/rtld-elf DKIM-Filter: OpenDKIM Filter v2.9.2 mail.xzibition.com CCDB725A42 To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201611150937.uAF9bZPg082363@repo.freebsd.org> From: Bryan Drewery Openpgp: id=F9173CB2C3AAEA7A5C8A1F0935D771BB6E4697CF; url=http://www.shatow.net/bryan/bryan2.asc Organization: FreeBSD Message-ID: <19b061c5-cd2b-f098-e8b1-aca308e61c31@FreeBSD.org> Date: Wed, 23 Nov 2016 11:06:53 -0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <201611150937.uAF9bZPg082363@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nL1sN7pTM4K7UtD3DBoKmuaIwbKBLEj7S" X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 19:07:21 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --nL1sN7pTM4K7UtD3DBoKmuaIwbKBLEj7S Content-Type: multipart/mixed; boundary="copEhquxlOGQIQnMPMN8kRQdG8Ntrqa2Q"; protected-headers="v1" From: Bryan Drewery To: Konstantin Belousov , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <19b061c5-cd2b-f098-e8b1-aca308e61c31@FreeBSD.org> Subject: Re: svn commit: r308687 - head/libexec/rtld-elf References: <201611150937.uAF9bZPg082363@repo.freebsd.org> In-Reply-To: <201611150937.uAF9bZPg082363@repo.freebsd.org> --copEhquxlOGQIQnMPMN8kRQdG8Ntrqa2Q Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 11/15/2016 1:37 AM, Konstantin Belousov wrote: > Author: kib > Date: Tue Nov 15 09:37:35 2016 > New Revision: 308687 > URL: https://svnweb.freebsd.org/changeset/base/308687 >=20 > Log: > Update hint to utilize user variable. > =20 > Sponsored by: The FreeBSD Foundation > MFC after: 1 week >=20 > Modified: > head/libexec/rtld-elf/Makefile >=20 > Modified: head/libexec/rtld-elf/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/libexec/rtld-elf/Makefile Tue Nov 15 09:20:28 2016 (r308686) > +++ head/libexec/rtld-elf/Makefile Tue Nov 15 09:37:35 2016 (r308687) > @@ -2,7 +2,7 @@ > =20 > # Use the following command to build local debug version of dynamic > # linker: > -# make DEBUG_FLAGS=3D-g DEBUG=3D-DDEBUG MK_TESTS=3Dno all > +# make DEBUG_FLAGS=3D-g DEBUG=3D-DDEBUG WITHOUT_TESTS=3Dyes all What prompted this change? Passing MK_TESTS=3Dno should work fine. > =20 > .include > PACKAGE=3D clibs >=20 --=20 Regards, Bryan Drewery --copEhquxlOGQIQnMPMN8kRQdG8Ntrqa2Q-- --nL1sN7pTM4K7UtD3DBoKmuaIwbKBLEj7S Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBAgAGBQJYNejVAAoJEDXXcbtuRpfPN8IIAIIdWchZhYGPXa9unOL+rcwh HrnRsSWWD8gd92NeCJMewz21uRCnv4KLnVF/CB9qdPm18gY3yR3xj/OaMvpdUEu2 fpav7c3ayZICSVg7VIN8LdOATMwWosqnwZePw0tsMqtRpwnQF0z+4xWLC+ooQfia d+bR3IgpGIbYi2Ll7+WVI1Qesqm14cQA8UXKDhCkcLmcCFGHPpeZxYKbn2srVeor eFzBECKGS1eBHD6J5n2EGCTtGDwU0HRtz081mXTS0CFCuTr6i1ijxgDlnPzjFjY5 I2w83z0e5gvzy9FsK1TTAYDrac9fdHPJTmE4WgwIaEa35+73Y5Rd+km5N0DdATc= =GqFN -----END PGP SIGNATURE----- --nL1sN7pTM4K7UtD3DBoKmuaIwbKBLEj7S-- From owner-svn-src-head@freebsd.org Wed Nov 23 19:19:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9C9D7C51979; Wed, 23 Nov 2016 19:19:13 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 77D401224; Wed, 23 Nov 2016 19:19:13 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANJJCah098561; Wed, 23 Nov 2016 19:19:12 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANJJCvl098553; Wed, 23 Nov 2016 19:19:12 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201611231919.uANJJCvl098553@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Wed, 23 Nov 2016 19:19:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309066 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 19:19:13 -0000 Author: brueffer Date: Wed Nov 23 19:19:11 2016 New Revision: 309066 URL: https://svnweb.freebsd.org/changeset/base/309066 Log: Fix various mdoc issues reported by mandoc -Tlint. Modified: head/share/man/man9/bus_map_resource.9 head/share/man/man9/cnv.9 head/share/man/man9/counter.9 head/share/man/man9/osd.9 head/share/man/man9/pmap_zero_page.9 head/share/man/man9/rman.9 head/share/man/man9/tcp_functions.9 Modified: head/share/man/man9/bus_map_resource.9 ============================================================================== --- head/share/man/man9/bus_map_resource.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/bus_map_resource.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -135,6 +135,8 @@ By default memory mappings use the .Dv VM_MEMATTR_UNCACHEABLE attribute. .El +.Sh RETURN VALUES +Zero is returned on success, otherwise an error is returned. .Sh EXAMPLES This maps a PCI memory BAR with the write-combining memory attribute and reads the first 32-bit word: @@ -153,9 +155,6 @@ reads the first 32-bit word: bus_map_resource(dev, SYS_RES_MEMORY, r, &args, &map); val = bus_read_4(&map, 0); .Ed -.Pp -.Sh RETURN VALUES -Zero is returned on success, otherwise an error is returned. .Sh SEE ALSO .Xr bus_activate_resource 9 , .Xr bus_alloc_resource 9 , Modified: head/share/man/man9/cnv.9 ============================================================================== --- head/share/man/man9/cnv.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/cnv.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -80,7 +80,7 @@ .Fn cnvlist_take_nvlist_array "void *cookiep" "size_t *nitemsp" .Ft int .Fn cnvlist_take_descriptor "void *cookiep" -.Ft "const int *' +.Ft "const int *" .Fn cnvlist_take_descriptor_array "void *cookiep" "size_t *nitemsp" .\" .Ft void @@ -189,11 +189,11 @@ nvlist_destroy(nvl); return (0); .Ed .Sh SEE ALSO -.Xr nv 9 , .Xr close 2 , -.Xr free 3 +.Xr free 3 , +.Xr nv 9 .Sh AUTHORS -.An -nosplit The .Nm cnv API was created during the Google Summer Of Code 2016 by +.An Adam Starak . Modified: head/share/man/man9/counter.9 ============================================================================== --- head/share/man/man9/counter.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/counter.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -224,7 +224,6 @@ static counter_u64_t array[MY_SIZE]; SYSCTL_COUNTER_U64_ARRAY(_debug, OID_AUTO, counter_array, CTLFLAG_RW, &array[0], MY_SIZE, "Test counter array"); .Ed -.Pp .Sh SEE ALSO .Xr atomic 9 , .Xr critical 9 , Modified: head/share/man/man9/osd.9 ============================================================================== --- head/share/man/man9/osd.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/osd.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -412,7 +412,8 @@ return zero on success or ENOMEM if the triggered an internal .Xr realloc 9 which failed -.Fn ( osd_set_reserved +.Ns ( +.Fn osd_set_reserved will always succeed when .Fa rsv is non-NULL). Modified: head/share/man/man9/pmap_zero_page.9 ============================================================================== --- head/share/man/man9/pmap_zero_page.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/pmap_zero_page.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -49,7 +49,6 @@ The function is used to zero-fill an area of a page. The range specified must not cross a page boundary; it must be contained entirely within a single page. -.Pp .Sh IMPLEMENTATION NOTES This function is required to be implemented for each architecture supported by .Fx . Modified: head/share/man/man9/rman.9 ============================================================================== --- head/share/man/man9/rman.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/rman.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -468,8 +468,8 @@ function returns a pointer to the device .Xr bus_alloc_resource 9 , .Xr bus_map_resource 9 , .Xr bus_release_resource 9 , -.Xr bus_space 9 , .Xr bus_set_resource 9 , +.Xr bus_space 9 , .Xr mutex 9 .Sh AUTHORS This manual page was written by Modified: head/share/man/man9/tcp_functions.9 ============================================================================== --- head/share/man/man9/tcp_functions.9 Wed Nov 23 18:45:15 2016 (r309065) +++ head/share/man/man9/tcp_functions.9 Wed Nov 23 19:19:11 2016 (r309066) @@ -312,6 +312,7 @@ the current default function block. The .Fa blk argument references a function block that is not currently registered. +.El .Sh SEE ALSO .Xr connect 2 , .Xr listen 2 , From owner-svn-src-head@freebsd.org Wed Nov 23 19:50:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1D627C501BF; Wed, 23 Nov 2016 19:50:14 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E134E14E; Wed, 23 Nov 2016 19:50:13 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANJoDP9011517; Wed, 23 Nov 2016 19:50:13 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANJoDWA011516; Wed, 23 Nov 2016 19:50:13 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201611231950.uANJoDWA011516@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Wed, 23 Nov 2016 19:50:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309067 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 19:50:14 -0000 Author: mjg Date: Wed Nov 23 19:50:12 2016 New Revision: 309067 URL: https://svnweb.freebsd.org/changeset/base/309067 Log: cache: ensure that the number of bucket locks does not exceed hash size The size can be changed by side effect of modifying kern.maxvnodes. Since numbucketlocks was not modified, setting a sufficiently low value would give more locks than actual buckets, which would then lead to corruption. Force the number of buckets to be not smaller. Note this should not matter for real world cases. Reported and tested by: pho Modified: head/sys/kern/vfs_cache.c Modified: head/sys/kern/vfs_cache.c ============================================================================== --- head/sys/kern/vfs_cache.c Wed Nov 23 19:19:11 2016 (r309066) +++ head/sys/kern/vfs_cache.c Wed Nov 23 19:50:12 2016 (r309067) @@ -1780,6 +1780,8 @@ nchinit(void *dummy __unused) nchashtbl = hashinit(desiredvnodes * 2, M_VFSCACHE, &nchash); numbucketlocks = cache_roundup_2(mp_ncpus * 64); + if (numbucketlocks > nchash + 1) + numbucketlocks = nchash + 1; bucketlocks = malloc(sizeof(*bucketlocks) * numbucketlocks, M_VFSCACHE, M_WAITOK | M_ZERO); for (i = 0; i < numbucketlocks; i++) @@ -1828,7 +1830,11 @@ cache_changesize(int newmaxvnodes) uint32_t hash; int i; - new_nchashtbl = hashinit(newmaxvnodes * 2, M_VFSCACHE, &new_nchash); + newmaxvnodes = cache_roundup_2(newmaxvnodes * 2); + if (newmaxvnodes < numbucketlocks) + newmaxvnodes = numbucketlocks; + + new_nchashtbl = hashinit(newmaxvnodes, M_VFSCACHE, &new_nchash); /* If same hash table size, nothing to do */ if (nchash == new_nchash) { free(new_nchashtbl, M_VFSCACHE); From owner-svn-src-head@freebsd.org Wed Nov 23 20:21:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0E44C50F8E; Wed, 23 Nov 2016 20:21:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 773A81EC0; Wed, 23 Nov 2016 20:21:54 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANKLrZF026017; Wed, 23 Nov 2016 20:21:53 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANKLrkC026015; Wed, 23 Nov 2016 20:21:53 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201611232021.uANKLrkC026015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Wed, 23 Nov 2016 20:21:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309068 - in head/libexec/rtld-elf: . mips X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 20:21:54 -0000 Author: jhb Date: Wed Nov 23 20:21:53 2016 New Revision: 309068 URL: https://svnweb.freebsd.org/changeset/base/309068 Log: Fix _mips_rtld_bind() to handle ELF filters. MIPS does not use the common _rtld_bind() to handle runtime binding. Instead, it uses a private _mips_rtld_bind(). Update _mips_rtld_bind() to include the changes made to _rtld_bind() in r216695 and r218476 to support upgrading the read-locked rtld_bind_lock to a write lock when an object with a filter is encountered. While here, add a 'where' variable to track the location of the fixup in the GOT to make the code flow more closely match _rtld_bind(). Reviewed by: kib Obtained from: CheriBSD Sponsored by: DARPA / AFRL Differential Revision: https://reviews.freebsd.org/D8625 Modified: head/libexec/rtld-elf/mips/reloc.c head/libexec/rtld-elf/rtld.c Modified: head/libexec/rtld-elf/mips/reloc.c ============================================================================== --- head/libexec/rtld-elf/mips/reloc.c Wed Nov 23 19:50:12 2016 (r309067) +++ head/libexec/rtld-elf/mips/reloc.c Wed Nov 23 20:21:53 2016 (r309068) @@ -240,10 +240,17 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size Elf_Addr *got = obj->pltgot; const Elf_Sym *def; const Obj_Entry *defobj; + Elf_Addr *where; Elf_Addr target; + RtldLockState lockstate; + rlock_acquire(rtld_bind_lock, &lockstate); + if (sigsetjmp(lockstate.env, 0) != 0) + lock_upgrade(rtld_bind_lock, &lockstate); + + where = &got[obj->local_gotno + reloff - obj->gotsym]; def = find_symdef(reloff, obj, &defobj, SYMLOOK_IN_PLT, NULL, - NULL); + &lockstate); if (def == NULL) rtld_die(); @@ -251,9 +258,9 @@ _mips_rtld_bind(Obj_Entry *obj, Elf_Size dbg("bind now/fixup at %s sym # %jd in %s --> was=%p new=%p", obj->path, (intmax_t)reloff, defobj->strtab + def->st_name, - (void *)got[obj->local_gotno + reloff - obj->gotsym], - (void *)target); - got[obj->local_gotno + reloff - obj->gotsym] = target; + (void *)*where, (void *)target); + *where = target; + lock_release(rtld_bind_lock, &lockstate); return (Elf_Addr)target; } Modified: head/libexec/rtld-elf/rtld.c ============================================================================== --- head/libexec/rtld-elf/rtld.c Wed Nov 23 19:50:12 2016 (r309067) +++ head/libexec/rtld-elf/rtld.c Wed Nov 23 20:21:53 2016 (r309068) @@ -695,6 +695,10 @@ rtld_resolve_ifunc(const Obj_Entry *obj, return ((void *)target); } +/* + * NB: MIPS uses a private version of this function (_mips_rtld_bind). + * Changes to this function should be applied there as well. + */ Elf_Addr _rtld_bind(Obj_Entry *obj, Elf_Size reloff) { From owner-svn-src-head@freebsd.org Wed Nov 23 22:50:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 52EB2C51834; Wed, 23 Nov 2016 22:50:22 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0777AD99; Wed, 23 Nov 2016 22:50:21 +0000 (UTC) (envelope-from gnn@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANMoLxW091881; Wed, 23 Nov 2016 22:50:21 GMT (envelope-from gnn@FreeBSD.org) Received: (from gnn@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANMoK2p091878; Wed, 23 Nov 2016 22:50:20 GMT (envelope-from gnn@FreeBSD.org) Message-Id: <201611232250.uANMoK2p091878@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gnn set sender to gnn@FreeBSD.org using -f From: "George V. Neville-Neil" Date: Wed, 23 Nov 2016 22:50:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309069 - in head/sys/cddl: contrib/opensolaris/uts/common/dtrace dev/dtrace X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 22:50:22 -0000 Author: gnn Date: Wed Nov 23 22:50:20 2016 New Revision: 309069 URL: https://svnweb.freebsd.org/changeset/base/309069 Log: Add tunable to disable destructive dtrace Submitted by: Joerg Pernfuss Reviewed by: rstone, markj MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8624 Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c head/sys/cddl/dev/dtrace/dtrace_load.c head/sys/cddl/dev/dtrace/dtrace_sysctl.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Nov 23 20:21:53 2016 (r309068) +++ head/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c Wed Nov 23 22:50:20 2016 (r309069) @@ -157,6 +157,10 @@ * /etc/system. */ int dtrace_destructive_disallow = 0; +#ifndef illumos +/* Positive logic version of dtrace_destructive_disallow for loader tunable */ +int dtrace_allow_destructive = 1; +#endif dtrace_optval_t dtrace_nonroot_maxsize = (16 * 1024 * 1024); size_t dtrace_difo_maxsize = (256 * 1024); dtrace_optval_t dtrace_dof_maxsize = (8 * 1024 * 1024); Modified: head/sys/cddl/dev/dtrace/dtrace_load.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_load.c Wed Nov 23 20:21:53 2016 (r309068) +++ head/sys/cddl/dev/dtrace/dtrace_load.c Wed Nov 23 22:50:20 2016 (r309069) @@ -52,6 +52,17 @@ dtrace_load(void *dummy) int i; #endif +#ifndef illumos + /* + * DTrace uses negative logic for the destructive mode switch, so it + * is required to translate from the sysctl which uses positive logic. + */ + if (dtrace_allow_destructive) + dtrace_destructive_disallow = 0; + else + dtrace_destructive_disallow = 1; +#endif + /* Hook into the trap handler. */ dtrace_trap_func = dtrace_trap; Modified: head/sys/cddl/dev/dtrace/dtrace_sysctl.c ============================================================================== --- head/sys/cddl/dev/dtrace/dtrace_sysctl.c Wed Nov 23 20:21:53 2016 (r309068) +++ head/sys/cddl/dev/dtrace/dtrace_sysctl.c Wed Nov 23 22:50:20 2016 (r309069) @@ -92,3 +92,6 @@ SYSCTL_QUAD(_kern_dtrace, OID_AUTO, dof_ SYSCTL_QUAD(_kern_dtrace, OID_AUTO, helper_actions_max, CTLFLAG_RW, &dtrace_helper_actions_max, 0, "maximum number of allowed helper actions"); + +SYSCTL_INT(_security_bsd, OID_AUTO, allow_destructive_dtrace, CTLFLAG_RDTUN, + &dtrace_allow_destructive, 1, "Allow destructive mode DTrace scripts"); From owner-svn-src-head@freebsd.org Wed Nov 23 22:57:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0DD7AC51B54; Wed, 23 Nov 2016 22:57:49 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D3FCA2A5; Wed, 23 Nov 2016 22:57:48 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uANMvmKU095610; Wed, 23 Nov 2016 22:57:48 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uANMvmTr095609; Wed, 23 Nov 2016 22:57:48 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201611232257.uANMvmTr095609@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Wed, 23 Nov 2016 22:57:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309070 - head/share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Nov 2016 22:57:49 -0000 Author: avos Date: Wed Nov 23 22:57:47 2016 New Revision: 309070 URL: https://svnweb.freebsd.org/changeset/base/309070 Log: rtwn.4: fix hostapd(8) man page section. Modified: head/share/man/man4/rtwn.4 Modified: head/share/man/man4/rtwn.4 ============================================================================== --- head/share/man/man4/rtwn.4 Wed Nov 23 22:50:20 2016 (r309069) +++ head/share/man/man4/rtwn.4 Wed Nov 23 22:57:47 2016 (r309070) @@ -198,7 +198,6 @@ The driver will reset the hardware. This should not happen. .El .Sh SEE ALSO -.Xr hostapd 4 , .Xr intro 4 , .Xr netintro 4 , .Xr rtwn_pci 4 , @@ -210,6 +209,7 @@ This should not happen. .Xr wlan_tkip 4 , .Xr wlan_wep 4 , .Xr wlan_xauth 4 , +.Xr hostapd 8 , .Xr ifconfig 8 , .Xr wpa_supplicant 8 .Sh HISTORY From owner-svn-src-head@freebsd.org Thu Nov 24 00:15:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12D62C5058D; Thu, 24 Nov 2016 00:15:34 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CEABD19C; Thu, 24 Nov 2016 00:15:33 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO0FWDf027600; Thu, 24 Nov 2016 00:15:32 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO0FWdS027599; Thu, 24 Nov 2016 00:15:32 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201611240015.uAO0FWdS027599@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 24 Nov 2016 00:15:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309073 - head/sys/dev/bnxt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 00:15:34 -0000 Author: shurd (ports committer) Date: Thu Nov 24 00:15:32 2016 New Revision: 309073 URL: https://svnweb.freebsd.org/changeset/base/309073 Log: Fix version string This is no longer on github, but in FreeBSD base. Approved by: davidch MFC after: 6 days Sponsored by: Broadcom Limited Modified: head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Wed Nov 23 23:53:52 2016 (r309072) +++ head/sys/dev/bnxt/if_bnxt.c Thu Nov 24 00:15:32 2016 (r309073) @@ -227,7 +227,7 @@ static driver_t bnxt_iflib_driver = { * iflib shared context */ -char bnxt_driver_version[] = "https://github.com/Broadcom/freebsd-nxt/commits/bnxt-dev"; +char bnxt_driver_version[] = "FreeBSD base"; extern struct if_txrx bnxt_txrx; static struct if_shared_ctx bnxt_sctx_init = { .isc_magic = IFLIB_MAGIC, From owner-svn-src-head@freebsd.org Thu Nov 24 00:39:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2057FC50B7F; Thu, 24 Nov 2016 00:39:19 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9F93E96; Thu, 24 Nov 2016 00:39:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO0dIGE036226; Thu, 24 Nov 2016 00:39:18 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO0dIEb036225; Thu, 24 Nov 2016 00:39:18 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611240039.uAO0dIEb036225@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 24 Nov 2016 00:39:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309074 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 00:39:19 -0000 Author: gonzo Date: Thu Nov 24 00:39:17 2016 New Revision: 309074 URL: https://svnweb.freebsd.org/changeset/base/309074 Log: [rpi3] Fix SMP build for FreeBSD/arm64 Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c Modified: head/sys/arm/broadcom/bcm2835/bcm2836.c ============================================================================== --- head/sys/arm/broadcom/bcm2835/bcm2836.c Thu Nov 24 00:15:32 2016 (r309073) +++ head/sys/arm/broadcom/bcm2835/bcm2836.c Thu Nov 24 00:39:17 2016 (r309074) @@ -362,7 +362,11 @@ bcm_lintc_ipi_dispatch(struct bcm_lintc_ * and make sure that it's observed by everybody. */ bcm_lintc_write_4(sc, BCM_LINTC_MBOX0_CLR_REG(cpu), 1 << ipi); +#if defined(__aarch64__) + dsb(sy); +#else dsb(); +#endif intr_ipi_dispatch(ipi, tf); } } From owner-svn-src-head@freebsd.org Thu Nov 24 00:45:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D8DBAC50FD3; Thu, 24 Nov 2016 00:45:53 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A894085D; Thu, 24 Nov 2016 00:45:53 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO0jqNP040017; Thu, 24 Nov 2016 00:45:52 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO0jqm2040015; Thu, 24 Nov 2016 00:45:52 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611240045.uAO0jqm2040015@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 24 Nov 2016 00:45:52 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309076 - head/sys/arm64/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 00:45:54 -0000 Author: gonzo Date: Thu Nov 24 00:45:52 2016 New Revision: 309076 URL: https://svnweb.freebsd.org/changeset/base/309076 Log: [rpi3] Move SOC_BRCM_BCM2837 from UP config to SMP one Now that BCM283x source are buildable with SMP option it cam be moved to GENERIC SMP config. SMP itself does not work on RPi3 yet due to lack of PSCI monitor which is work in progress at the moment Modified: head/sys/arm64/conf/GENERIC head/sys/arm64/conf/GENERIC-UP Modified: head/sys/arm64/conf/GENERIC ============================================================================== --- head/sys/arm64/conf/GENERIC Thu Nov 24 00:45:00 2016 (r309075) +++ head/sys/arm64/conf/GENERIC Thu Nov 24 00:45:52 2016 (r309076) @@ -90,6 +90,7 @@ options MALLOC_DEBUG_MAXZONES=8 # Separ options SOC_ALLWINNER_A64 options SOC_CAVM_THUNDERX options SOC_HISI_HI6220 +options SOC_BRCM_BCM2837 # Annapurna Alpine drivers device al_ccu # Alpine Cache Coherency Unit Modified: head/sys/arm64/conf/GENERIC-UP ============================================================================== --- head/sys/arm64/conf/GENERIC-UP Thu Nov 24 00:45:00 2016 (r309075) +++ head/sys/arm64/conf/GENERIC-UP Thu Nov 24 00:45:52 2016 (r309076) @@ -21,5 +21,3 @@ include GENERIC ident GENERIC-UP nooptions SMP - -options SOC_BRCM_BCM2837 From owner-svn-src-head@freebsd.org Thu Nov 24 00:49:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C100FC510AA; Thu, 24 Nov 2016 00:49:01 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9BAD4B3E; Thu, 24 Nov 2016 00:49:01 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO0n0rr040219; Thu, 24 Nov 2016 00:49:00 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO0n0jx040217; Thu, 24 Nov 2016 00:49:00 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201611240049.uAO0n0jx040217@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Thu, 24 Nov 2016 00:49:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309078 - head/sys/dev/bnxt X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 00:49:01 -0000 Author: shurd (ports committer) Date: Thu Nov 24 00:49:00 2016 New Revision: 309078 URL: https://svnweb.freebsd.org/changeset/base/309078 Log: Add new device IDs Add device IDs for new hardware, sort the device IDs, add comment regarding fragice NPAR/VF detection. Approved by: davidch MFC after: 6 days Sponsored by: Broadcom Limited Modified: head/sys/dev/bnxt/bnxt.h head/sys/dev/bnxt/if_bnxt.c Modified: head/sys/dev/bnxt/bnxt.h ============================================================================== --- head/sys/dev/bnxt/bnxt.h Thu Nov 24 00:46:34 2016 (r309077) +++ head/sys/dev/bnxt/bnxt.h Thu Nov 24 00:49:00 2016 (r309078) @@ -52,16 +52,39 @@ __FBSDID("$FreeBSD$"); #define BCM57301 0x16c8 #define BCM57302 0x16c9 #define BCM57304 0x16ca +#define BCM57311 0x16ce +#define BCM57312 0x16cf +#define BCM57314 0x16df #define BCM57402 0x16d0 -#define BCM57404 0x16d1 -#define BCM57406 0x16d2 #define BCM57402_NPAR 0x16d4 -#define BCM57407 0x16d5 +#define BCM57404 0x16d1 #define BCM57404_NPAR 0x16e7 +#define BCM57406 0x16d2 #define BCM57406_NPAR 0x16e8 +#define BCM57407 0x16d5 +#define BCM57407_NPAR 0x16ea #define BCM57407_SFP 0x16e9 -#define BCM57304_VF 0x16cb -#define BCM57404_VF 0x16d3 +#define BCM57412 0x16d6 +#define BCM57412_NPAR1 0x16de +#define BCM57412_NPAR2 0x16eb +#define BCM57414 0x16d7 +#define BCM57414_NPAR1 0x16ec +#define BCM57414_NPAR2 0x16ed +#define BCM57416 0x16d8 +#define BCM57416_NPAR1 0x16ee +#define BCM57416_NPAR2 0x16ef +#define BCM57416_SFP 0x16e3 +#define BCM57417 0x16d9 +#define BCM57417_NPAR1 0x16c0 +#define BCM57417_NPAR2 0x16cc +#define BCM57417_SFP 0x16e2 +#define BCM58700 0x16cd +#define NETXTREME_C_VF1 0x16cb +#define NETXTREME_C_VF2 0x16e1 +#define NETXTREME_C_VF3 0x16e5 +#define NETXTREME_E_VF1 0x16c1 +#define NETXTREME_E_VF2 0x16d3 +#define NETXTREME_E_VF3 0x16dc #define CSUM_OFFLOAD (CSUM_IP_TSO|CSUM_IP6_TSO|CSUM_IP| \ CSUM_IP_UDP|CSUM_IP_TCP|CSUM_IP_SCTP| \ Modified: head/sys/dev/bnxt/if_bnxt.c ============================================================================== --- head/sys/dev/bnxt/if_bnxt.c Thu Nov 24 00:46:34 2016 (r309077) +++ head/sys/dev/bnxt/if_bnxt.c Thu Nov 24 00:49:00 2016 (r309078) @@ -75,26 +75,72 @@ static pci_vendor_info_t bnxt_vendor_inf "Broadcom BCM57302 NetXtreme-C 10Gb/25Gb Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57304, "Broadcom BCM57304 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57311, + "Broadcom BCM57311 NetXtreme-C 10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57312, + "Broadcom BCM57312 NetXtreme-C 10Gb/25Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57314, + "Broadcom BCM57314 NetXtreme-C 10Gb/25Gb/40Gb/50Gb Ethernet"), PVID(BROADCOM_VENDOR_ID, BCM57402, "Broadcom BCM57402 NetXtreme-E 10Gb Ethernet Controller"), - PVID(BROADCOM_VENDOR_ID, BCM57404, - "Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller"), - PVID(BROADCOM_VENDOR_ID, BCM57406, - "Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57402_NPAR, "Broadcom BCM57402 NetXtreme-E Partition"), - PVID(BROADCOM_VENDOR_ID, BCM57407, - "Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57404, + "Broadcom BCM57404 NetXtreme-E 10Gb/25Gb Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57404_NPAR, "Broadcom BCM57404 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57406, + "Broadcom BCM57406 NetXtreme-E 10GBase-T Ethernet Controller"), PVID(BROADCOM_VENDOR_ID, BCM57406_NPAR, "Broadcom BCM57406 NetXtreme-E Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57407, + "Broadcom BCM57407 NetXtreme-E 10GBase-T Ethernet Controller"), + PVID(BROADCOM_VENDOR_ID, BCM57407_NPAR, + "Broadcom BCM57407 NetXtreme-E Ethernet Partition"), PVID(BROADCOM_VENDOR_ID, BCM57407_SFP, "Broadcom BCM57407 NetXtreme-E 25Gb Ethernet Controller"), - PVID(BROADCOM_VENDOR_ID, BCM57304_VF, - "Broadcom BCM57304 NetXtreme-C Virtual Function"), - PVID(BROADCOM_VENDOR_ID, BCM57404_VF, - "Broadcom BCM57404 NetXtreme-E Virtual Function"), + PVID(BROADCOM_VENDOR_ID, BCM57412, + "Broadcom BCM57412 NetXtreme-E 10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57412_NPAR1, + "Broadcom BCM57412 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57412_NPAR2, + "Broadcom BCM57412 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57414, + "Broadcom BCM57414 NetXtreme-E 10Gb/25Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57414_NPAR1, + "Broadcom BCM57414 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57414_NPAR2, + "Broadcom BCM57414 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57416, + "Broadcom BCM57416 NetXtreme-E 10GBase-T Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57416_NPAR1, + "Broadcom BCM57416 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57416_NPAR2, + "Broadcom BCM57416 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57416_SFP, + "Broadcom BCM57416 NetXtreme-E 10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57417, + "Broadcom BCM57417 NetXtreme-E 10GBase-T Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM57417_NPAR1, + "Broadcom BCM57417 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57417_NPAR2, + "Broadcom BCM57417 NetXtreme-E Ethernet Partition"), + PVID(BROADCOM_VENDOR_ID, BCM57417_SFP, + "Broadcom BCM57417 NetXtreme-E 10Gb/25Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, BCM58700, + "Broadcom BCM58700 Nitro 1Gb/2.5Gb/10Gb Ethernet"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF1, + "Broadcom NetXtreme-C Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF2, + "Broadcom NetXtreme-C Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_C_VF3, + "Broadcom NetXtreme-C Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_E_VF1, + "Broadcom NetXtreme-E Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_E_VF2, + "Broadcom NetXtreme-E Ethernet Virtual Function"), + PVID(BROADCOM_VENDOR_ID, NETXTREME_E_VF3, + "Broadcom NetXtreme-E Ethernet Virtual Function"), /* required last entry */ PVID_END @@ -540,14 +586,26 @@ bnxt_attach_pre(if_ctx_t ctx) softc->sctx = iflib_get_sctx(ctx); scctx = softc->scctx; + /* TODO: Better way of detecting NPAR/VF is needed */ switch (softc->sctx->isc_vendor_info->pvi_device_id) { case BCM57402_NPAR: case BCM57404_NPAR: case BCM57406_NPAR: + case BCM57407_NPAR: + case BCM57412_NPAR1: + case BCM57412_NPAR2: + case BCM57414_NPAR1: + case BCM57414_NPAR2: + case BCM57416_NPAR1: + case BCM57416_NPAR2: softc->flags |= BNXT_FLAG_NPAR; break; - case BCM57304_VF: - case BCM57404_VF: + case NETXTREME_C_VF1: + case NETXTREME_C_VF2: + case NETXTREME_C_VF3: + case NETXTREME_E_VF1: + case NETXTREME_E_VF2: + case NETXTREME_E_VF3: softc->flags |= BNXT_FLAG_VF; break; } From owner-svn-src-head@freebsd.org Thu Nov 24 01:24:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BA00EC51574; Thu, 24 Nov 2016 01:24:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 89C1B883; Thu, 24 Nov 2016 01:24:27 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO1OQ2d055762; Thu, 24 Nov 2016 01:24:26 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO1OQqT055761; Thu, 24 Nov 2016 01:24:26 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611240124.uAO1OQqT055761@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 24 Nov 2016 01:24:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309079 - head/sys/arm/allwinner X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 01:24:27 -0000 Author: manu Date: Thu Nov 24 01:24:26 2016 New Revision: 309079 URL: https://svnweb.freebsd.org/changeset/base/309079 Log: Enable the SCL and SDA i2c line for DDC. This is an undocumented register that we need to set if we do not want to rely on u-boot or other bootloader. Modified: head/sys/arm/allwinner/a10_hdmi.c Modified: head/sys/arm/allwinner/a10_hdmi.c ============================================================================== --- head/sys/arm/allwinner/a10_hdmi.c Thu Nov 24 00:49:00 2016 (r309078) +++ head/sys/arm/allwinner/a10_hdmi.c Thu Nov 24 01:24:26 2016 (r309079) @@ -189,6 +189,9 @@ __FBSDID("$FreeBSD$"); #define DDC_ADDR 0x50 #define EDDC_ADDR 0x60 #define EDID_LENGTH 128 +#define DDC_CTRL_LINE 0x540 +#define DDC_LINE_SCL_ENABLE (1 << 8) +#define DDC_LINE_SDA_ENABLE (1 << 9) #define HDMI_ENABLE_DELAY 50000 #define DDC_READ_RETRY 4 #define EXT_TAG 0x00 @@ -494,6 +497,10 @@ a10hdmi_get_edid(device_t dev, uint8_t * /* Configure DDC clock */ HDMI_WRITE(sc, DDC_CLOCK, DDC_CLOCK_M | DDC_CLOCK_N); + /* Enable SDA/SCL */ + HDMI_WRITE(sc, DDC_CTRL_LINE, + DDC_LINE_SCL_ENABLE | DDC_LINE_SDA_ENABLE); + /* Read EDID block */ error = a10hdmi_ddc_read(sc, 0, sc->edid); if (error == 0) { From owner-svn-src-head@freebsd.org Thu Nov 24 04:58:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C9D3FC526C2; Thu, 24 Nov 2016 04:58:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8AA13FD1; Thu, 24 Nov 2016 04:58:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO4wD3Z039788; Thu, 24 Nov 2016 04:58:13 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO4wD4e039786; Thu, 24 Nov 2016 04:58:13 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611240458.uAO4wD4e039786@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 24 Nov 2016 04:58:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309080 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 04:58:14 -0000 Author: sephe Date: Thu Nov 24 04:58:13 2016 New Revision: 309080 URL: https://svnweb.freebsd.org/changeset/base/309080 Log: hyperv/vmbus: Implement orphan support for transaction API It will be used to fix the primary channel revocation support. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8525 Modified: head/sys/dev/hyperv/include/vmbus_xact.h head/sys/dev/hyperv/vmbus/vmbus_xact.c Modified: head/sys/dev/hyperv/include/vmbus_xact.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus_xact.h Thu Nov 24 01:24:26 2016 (r309079) +++ head/sys/dev/hyperv/include/vmbus_xact.h Thu Nov 24 04:58:13 2016 (r309080) @@ -39,6 +39,8 @@ struct vmbus_xact_ctx *vmbus_xact_ctx_cr size_t req_size, size_t resp_size, size_t priv_size); void vmbus_xact_ctx_destroy(struct vmbus_xact_ctx *ctx); +bool vmbus_xact_ctx_orphan(struct vmbus_xact_ctx *ctx); + struct vmbus_xact *vmbus_xact_get(struct vmbus_xact_ctx *ctx, size_t req_len); void vmbus_xact_put(struct vmbus_xact *xact); Modified: head/sys/dev/hyperv/vmbus/vmbus_xact.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_xact.c Thu Nov 24 01:24:26 2016 (r309079) +++ head/sys/dev/hyperv/vmbus/vmbus_xact.c Thu Nov 24 04:58:13 2016 (r309080) @@ -61,6 +61,7 @@ struct vmbus_xact_ctx { uint32_t xc_flags; /* VMBUS_XACT_CTXF_ */ struct vmbus_xact *xc_free; struct vmbus_xact *xc_active; + struct vmbus_xact *xc_orphan; }; #define VMBUS_XACT_CTXF_DESTROY 0x0001 @@ -72,6 +73,9 @@ static struct vmbus_xact *vmbus_xact_get uint32_t); const void *vmbus_xact_wait1(struct vmbus_xact *, size_t *, bool); +static void vmbus_xact_save_resp(struct vmbus_xact *, + const void *, size_t); +static void vmbus_xact_ctx_free(struct vmbus_xact_ctx *); static struct vmbus_xact * vmbus_xact_alloc(struct vmbus_xact_ctx *ctx, bus_dma_tag_t parent_dtag) @@ -136,6 +140,9 @@ vmbus_xact_ctx_create(bus_dma_tag_t dtag { struct vmbus_xact_ctx *ctx; + KASSERT(req_size > 0, ("request size is 0")); + KASSERT(resp_size > 0, ("response size is 0")); + ctx = malloc(sizeof(*ctx), M_DEVBUF, M_WAITOK | M_ZERO); ctx->xc_req_size = req_size; ctx->xc_resp_size = resp_size; @@ -152,25 +159,46 @@ vmbus_xact_ctx_create(bus_dma_tag_t dtag return (ctx); } -void -vmbus_xact_ctx_destroy(struct vmbus_xact_ctx *ctx) +bool +vmbus_xact_ctx_orphan(struct vmbus_xact_ctx *ctx) { - struct vmbus_xact *xact; - mtx_lock(&ctx->xc_lock); + if (ctx->xc_flags & VMBUS_XACT_CTXF_DESTROY) { + mtx_unlock(&ctx->xc_lock); + return (false); + } ctx->xc_flags |= VMBUS_XACT_CTXF_DESTROY; mtx_unlock(&ctx->xc_lock); + wakeup(&ctx->xc_free); + wakeup(&ctx->xc_active); - xact = vmbus_xact_get1(ctx, 0); - if (xact == NULL) + ctx->xc_orphan = vmbus_xact_get1(ctx, 0); + if (ctx->xc_orphan == NULL) panic("can't get xact"); + return (true); +} + +static void +vmbus_xact_ctx_free(struct vmbus_xact_ctx *ctx) +{ + KASSERT(ctx->xc_flags & VMBUS_XACT_CTXF_DESTROY, + ("xact ctx was not orphaned")); + KASSERT(ctx->xc_orphan != NULL, ("no orphaned xact")); - vmbus_xact_free(xact); + vmbus_xact_free(ctx->xc_orphan); mtx_destroy(&ctx->xc_lock); free(ctx, M_DEVBUF); } +void +vmbus_xact_ctx_destroy(struct vmbus_xact_ctx *ctx) +{ + + vmbus_xact_ctx_orphan(ctx); + vmbus_xact_ctx_free(ctx); +} + struct vmbus_xact * vmbus_xact_get(struct vmbus_xact_ctx *ctx, size_t req_len) { @@ -259,7 +287,8 @@ vmbus_xact_wait1(struct vmbus_xact *xact mtx_lock(&ctx->xc_lock); KASSERT(ctx->xc_active == xact, ("xact mismatch")); - while (xact->x_resp == NULL) { + while (xact->x_resp == NULL && + (ctx->xc_flags & VMBUS_XACT_CTXF_DESTROY) == 0) { if (can_sleep) { mtx_sleep(&ctx->xc_active, &ctx->xc_lock, 0, "wxact", 0); @@ -269,6 +298,20 @@ vmbus_xact_wait1(struct vmbus_xact *xact mtx_lock(&ctx->xc_lock); } } + KASSERT(ctx->xc_active == xact, ("xact trashed")); + + if ((ctx->xc_flags & VMBUS_XACT_CTXF_DESTROY) && xact->x_resp == NULL) { + uint8_t b = 0; + + /* + * Orphaned and no response was received yet; fake up + * an one byte response. + */ + printf("vmbus: xact ctx was orphaned w/ pending xact\n"); + vmbus_xact_save_resp(ctx->xc_active, &b, sizeof(b)); + } + KASSERT(xact->x_resp != NULL, ("no response")); + ctx->xc_active = NULL; resp = xact->x_resp; @@ -317,19 +360,47 @@ void vmbus_xact_wakeup(struct vmbus_xact *xact, const void *data, size_t dlen) { struct vmbus_xact_ctx *ctx = xact->x_ctx; + int do_wakeup = 0; mtx_lock(&ctx->xc_lock); - vmbus_xact_save_resp(xact, data, dlen); + /* + * NOTE: + * xc_active could be NULL, if the ctx has been orphaned. + */ + if (ctx->xc_active != NULL) { + vmbus_xact_save_resp(xact, data, dlen); + do_wakeup = 1; + } else { + KASSERT(ctx->xc_flags & VMBUS_XACT_CTXF_DESTROY, + ("no active xact pending")); + printf("vmbus: drop xact response\n"); + } mtx_unlock(&ctx->xc_lock); - wakeup(&ctx->xc_active); + + if (do_wakeup) + wakeup(&ctx->xc_active); } void vmbus_xact_ctx_wakeup(struct vmbus_xact_ctx *ctx, const void *data, size_t dlen) { + int do_wakeup = 0; + mtx_lock(&ctx->xc_lock); - KASSERT(ctx->xc_active != NULL, ("no pending xact")); - vmbus_xact_save_resp(ctx->xc_active, data, dlen); + /* + * NOTE: + * xc_active could be NULL, if the ctx has been orphaned. + */ + if (ctx->xc_active != NULL) { + vmbus_xact_save_resp(ctx->xc_active, data, dlen); + do_wakeup = 1; + } else { + KASSERT(ctx->xc_flags & VMBUS_XACT_CTXF_DESTROY, + ("no active xact pending")); + printf("vmbus: drop xact response\n"); + } mtx_unlock(&ctx->xc_lock); - wakeup(&ctx->xc_active); + + if (do_wakeup) + wakeup(&ctx->xc_active); } From owner-svn-src-head@freebsd.org Thu Nov 24 05:18:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7BC8C523C3; Thu, 24 Nov 2016 05:18:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 98C9862; Thu, 24 Nov 2016 05:18:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO5IjdW048448; Thu, 24 Nov 2016 05:18:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO5IjGs048445; Thu, 24 Nov 2016 05:18:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611240518.uAO5IjGs048445@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 24 Nov 2016 05:18:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309081 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 05:18:46 -0000 Author: sephe Date: Thu Nov 24 05:18:45 2016 New Revision: 309081 URL: https://svnweb.freebsd.org/changeset/base/309081 Log: hyperv/vmbus: Fix the primary channel revoking on vmbus side. Drivers can now use vmbus_chan_{is_revoked,set_orphan,unset_orphan}() and vmbus_xact_ctx_orphan() to fix their attach/detach DEVMETHODs for revoked primary channels. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8545 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Thu Nov 24 04:58:13 2016 (r309080) +++ head/sys/dev/hyperv/include/vmbus.h Thu Nov 24 05:18:45 2016 (r309081) @@ -116,6 +116,7 @@ struct vmbus_chan_br { }; struct vmbus_channel; +struct vmbus_xact_ctx; struct hyperv_guid; struct task; struct taskqueue; @@ -138,6 +139,9 @@ void vmbus_chan_close(struct vmbus_chan void vmbus_chan_intr_drain(struct vmbus_channel *chan); void vmbus_chan_run_task(struct vmbus_channel *chan, struct task *task); +void vmbus_chan_set_orphan(struct vmbus_channel *chan, + struct vmbus_xact_ctx *); +void vmbus_chan_unset_orphan(struct vmbus_channel *chan); int vmbus_chan_gpadl_connect(struct vmbus_channel *chan, bus_addr_t paddr, int size, uint32_t *gpadl); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Nov 24 04:58:13 2016 (r309080) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Nov 24 05:18:45 2016 (r309081) @@ -43,6 +43,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include #include @@ -1115,6 +1116,7 @@ vmbus_chan_alloc(struct vmbus_softc *sc) chan->ch_vmbus = sc; mtx_init(&chan->ch_subchan_lock, "vmbus subchan", NULL, MTX_DEF); + sx_init(&chan->ch_orphan_lock, "vmbus chorphan"); TAILQ_INIT(&chan->ch_subchans); vmbus_rxbr_init(&chan->ch_rxbr); vmbus_txbr_init(&chan->ch_txbr); @@ -1133,8 +1135,12 @@ vmbus_chan_free(struct vmbus_channel *ch VMBUS_CHAN_ST_ONPRIL | VMBUS_CHAN_ST_ONSUBL | VMBUS_CHAN_ST_ONLIST)) == 0, ("free busy channel")); + KASSERT(chan->ch_orphan_xact == NULL, + ("still has orphan xact installed")); + hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); mtx_destroy(&chan->ch_subchan_lock); + sx_destroy(&chan->ch_orphan_lock); vmbus_rxbr_deinit(&chan->ch_rxbr); vmbus_txbr_deinit(&chan->ch_txbr); free(chan, M_DEVBUF); @@ -1403,10 +1409,21 @@ vmbus_chan_msgproc_chrescind(struct vmbu mtx_unlock(&sc->vmbus_prichan_lock); } + /* + * NOTE: + * The following processing order is critical: + * Set the REVOKED state flag before orphaning the installed xact. + */ + if (atomic_testandset_int(&chan->ch_stflags, VMBUS_CHAN_ST_REVOKED_SHIFT)) panic("channel has already been revoked"); + sx_xlock(&chan->ch_orphan_lock); + if (chan->ch_orphan_xact != NULL) + vmbus_xact_ctx_orphan(chan->ch_orphan_xact); + sx_xunlock(&chan->ch_orphan_lock); + if (bootverbose) vmbus_chan_printf(chan, "chan%u revoked\n", note->chm_chanid); @@ -1708,3 +1725,21 @@ vmbus_chan_is_revoked(const struct vmbus return (true); return (false); } + +void +vmbus_chan_set_orphan(struct vmbus_channel *chan, struct vmbus_xact_ctx *xact) +{ + + sx_xlock(&chan->ch_orphan_lock); + chan->ch_orphan_xact = xact; + sx_xunlock(&chan->ch_orphan_lock); +} + +void +vmbus_chan_unset_orphan(struct vmbus_channel *chan) +{ + + sx_xlock(&chan->ch_orphan_lock); + chan->ch_orphan_xact = NULL; + sx_xunlock(&chan->ch_orphan_lock); +} Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Thu Nov 24 04:58:13 2016 (r309080) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Thu Nov 24 05:18:45 2016 (r309081) @@ -33,8 +33,9 @@ #include #include #include -#include #include +#include +#include #include #include @@ -138,6 +139,9 @@ struct vmbus_channel { struct hyperv_guid ch_guid_type; struct hyperv_guid ch_guid_inst; + struct sx ch_orphan_lock; + struct vmbus_xact_ctx *ch_orphan_xact; + struct sysctl_ctx_list ch_sysctl_ctx; } __aligned(CACHE_LINE_SIZE); From owner-svn-src-head@freebsd.org Thu Nov 24 05:52:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B02C524F1; Thu, 24 Nov 2016 05:52:30 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 00D77816; Thu, 24 Nov 2016 05:52:29 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO5qTmO063976; Thu, 24 Nov 2016 05:52:29 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO5qTxK063974; Thu, 24 Nov 2016 05:52:29 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201611240552.uAO5qTxK063974@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Thu, 24 Nov 2016 05:52:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309082 - in head: . share/man/man4 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 05:52:30 -0000 Author: dexuan Date: Thu Nov 24 05:52:28 2016 New Revision: 309082 URL: https://svnweb.freebsd.org/changeset/base/309082 Log: share/man/man4/Makefile: Only install Hyper-V man pages on amd64 and i386 We shouldn't install them on the architectures not supported by Hyper-V. And, hv_ata_pci_disengage.4.gz should be removed from all architectures: 1) It should have only applied to Hyper-V; 2) For Hyper-V platforms (amd64 and i386), the related driver was removed by r306426 | sephe | 2016-09-29 09:41:52 +0800 (Thu, 29 Sep 2016), because now we have a better mechanism to disble the ata driver for hard disks when the VM runs on Hyper-V. Reviewed by: sephe, andrew, jhb Approved by: sephe (mentor) MFC after: 3 days Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8572 Modified: head/ObsoleteFiles.inc head/share/man/man4/Makefile Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 24 05:18:45 2016 (r309081) +++ head/ObsoleteFiles.inc Thu Nov 24 05:52:28 2016 (r309082) @@ -38,6 +38,17 @@ # xargs -n1 | sort | uniq -d; # done +# 20161121: Hyper-V manuals only apply to amd64 and i386. +.if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "i386" +OLD_FILES+=usr/share/man/man4/hv_kvp.4.gz +OLD_FILES+=usr/share/man/man4/hv_netvsc.4.gz +OLD_FILES+=usr/share/man/man4/hv_storvsc.4.gz +OLD_FILES+=usr/share/man/man4/hv_utils.4.gz +OLD_FILES+=usr/share/man/man4/hv_vmbus.4.gz +OLD_FILES+=usr/share/man/man4/hv_vss.4.gz +.endif +# 20161118: Remove hv_ata_pci_disengage(4) +OLD_FILES+=usr/share/man/man4/hv_ata_pci_disengage.4.gz # 20161017: urtwn(4) was merged into rtwn(4) OLD_FILES+=usr/share/man/man4/urtwn.4.gz OLD_FILES+=usr/share/man/man4/urtwnfw.4.gz Modified: head/share/man/man4/Makefile ============================================================================== --- head/share/man/man4/Makefile Thu Nov 24 05:18:45 2016 (r309081) +++ head/share/man/man4/Makefile Thu Nov 24 05:52:28 2016 (r309082) @@ -189,12 +189,12 @@ MAN= aac.4 \ ${_hptmv.4} \ ${_hptnr.4} \ ${_hptrr.4} \ - hv_kvp.4 \ - hv_netvsc.4 \ - hv_storvsc.4 \ - hv_utils.4 \ - hv_vmbus.4 \ - hv_vss.4 \ + ${_hv_kvp.4} \ + ${_hv_netvsc.4} \ + ${_hv_storvsc.4} \ + ${_hv_utils.4} \ + ${_hv_vmbus.4} \ + ${_hv_vss.4} \ hwpmc.4 \ ichsmb.4 \ ${_ichwd.4} \ @@ -784,6 +784,12 @@ _hptiop.4= hptiop.4 _hptmv.4= hptmv.4 _hptnr.4= hptnr.4 _hptrr.4= hptrr.4 +_hv_kvp.4= hv_kvp.4 +_hv_netvsc.4= hv_netvsc.4 +_hv_storvsc.4= hv_storvsc.4 +_hv_utils.4= hv_utils.4 +_hv_vmbus.4= hv_vmbus.4 +_hv_vss.4= hv_vss.4 _i8254.4= i8254.4 _ichwd.4= ichwd.4 _if_bxe.4= if_bxe.4 From owner-svn-src-head@freebsd.org Thu Nov 24 06:01:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E43DFC527B4; Thu, 24 Nov 2016 06:01:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A513DC8C; Thu, 24 Nov 2016 06:01:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO61Tff067183; Thu, 24 Nov 2016 06:01:29 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO61TE2067181; Thu, 24 Nov 2016 06:01:29 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611240601.uAO61TE2067181@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 24 Nov 2016 06:01:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309083 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 06:01:31 -0000 Author: sephe Date: Thu Nov 24 06:01:29 2016 New Revision: 309083 URL: https://svnweb.freebsd.org/changeset/base/309083 Log: hyperv/vmbus: Fix the multi-channel revoking on vmbus side. - Reference count the sub-channel when channel offer message is processed, so that immediate rescind message on the same channel will not race sub-channel open on driver side. - Drop the above reference when sub-channel is closed, this closely mimics the hypervisor's reaction when primary channel is closed on the VM side. No drivers use sub-channel after primary channel is closed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8546 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Nov 24 05:52:28 2016 (r309082) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Thu Nov 24 06:01:29 2016 (r309083) @@ -65,6 +65,7 @@ static void vmbus_chan_cpu_default(str static int vmbus_chan_release(struct vmbus_channel *); static void vmbus_chan_set_chmap(struct vmbus_channel *); static void vmbus_chan_clear_chmap(struct vmbus_channel *); +static void vmbus_chan_detach(struct vmbus_channel *); static void vmbus_chan_ins_prilist(struct vmbus_softc *, struct vmbus_channel *); @@ -628,6 +629,32 @@ vmbus_chan_gpadl_disconnect(struct vmbus } static void +vmbus_chan_detach(struct vmbus_channel *chan) +{ + int refs; + + KASSERT(chan->ch_refs > 0, ("chan%u: invalid refcnt %d", + chan->ch_id, chan->ch_refs)); + refs = atomic_fetchadd_int(&chan->ch_refs, -1); +#ifdef INVARIANTS + if (VMBUS_CHAN_ISPRIMARY(chan)) { + KASSERT(refs == 1, ("chan%u: invalid refcnt %d for prichan", + chan->ch_id, refs + 1)); + } +#endif + if (refs == 1) { + /* + * Detach the target channel. + */ + if (bootverbose) { + vmbus_chan_printf(chan, "chan%u detached\n", + chan->ch_id); + } + taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); + } +} + +static void vmbus_chan_clrchmap_task(void *xchan, int pending __unused) { struct vmbus_channel *chan = xchan; @@ -752,8 +779,15 @@ vmbus_chan_close(struct vmbus_channel *c int i; subchan = vmbus_subchan_get(chan, subchan_cnt); - for (i = 0; i < subchan_cnt; ++i) + for (i = 0; i < subchan_cnt; ++i) { vmbus_chan_close_internal(subchan[i]); + /* + * This sub-channel is referenced, when it is + * linked to the primary channel; drop that + * reference now. + */ + vmbus_chan_detach(subchan[i]); + } vmbus_subchan_rel(subchan, subchan_cnt); } @@ -1114,6 +1148,7 @@ vmbus_chan_alloc(struct vmbus_softc *sc) return NULL; } + chan->ch_refs = 1; chan->ch_vmbus = sc; mtx_init(&chan->ch_subchan_lock, "vmbus subchan", NULL, MTX_DEF); sx_init(&chan->ch_orphan_lock, "vmbus chorphan"); @@ -1137,6 +1172,8 @@ vmbus_chan_free(struct vmbus_channel *ch VMBUS_CHAN_ST_ONLIST)) == 0, ("free busy channel")); KASSERT(chan->ch_orphan_xact == NULL, ("still has orphan xact installed")); + KASSERT(chan->ch_refs == 0, ("chan%u: invalid refcnt %d", + chan->ch_id, chan->ch_refs)); hyperv_dmamem_free(&chan->ch_monprm_dma, chan->ch_monprm); mtx_destroy(&chan->ch_subchan_lock); @@ -1213,6 +1250,14 @@ vmbus_chan_add(struct vmbus_channel *new ("new channel is not sub-channel")); KASSERT(prichan != NULL, ("no primary channel")); + /* + * Reference count this sub-channel; it will be dereferenced + * when this sub-channel is closed. + */ + KASSERT(newchan->ch_refs == 1, ("chan%u: invalid refcnt %d", + newchan->ch_id, newchan->ch_refs)); + atomic_add_int(&newchan->ch_refs, 1); + newchan->ch_prichan = prichan; newchan->ch_dev = prichan->ch_dev; @@ -1359,6 +1404,7 @@ vmbus_chan_msgproc_choffer(struct vmbus_ if (error) { device_printf(sc->vmbus_dev, "add chan%u failed: %d\n", chan->ch_id, error); + atomic_subtract_int(&chan->ch_refs, 1); vmbus_chan_free(chan); return; } @@ -1426,9 +1472,7 @@ vmbus_chan_msgproc_chrescind(struct vmbu if (bootverbose) vmbus_chan_printf(chan, "chan%u revoked\n", note->chm_chanid); - - /* Detach the target channel. */ - taskqueue_enqueue(chan->ch_mgmt_tq, &chan->ch_detach_task); + vmbus_chan_detach(chan); } static int Modified: head/sys/dev/hyperv/vmbus/vmbus_chanvar.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Thu Nov 24 05:52:28 2016 (r309082) +++ head/sys/dev/hyperv/vmbus/vmbus_chanvar.h Thu Nov 24 06:01:29 2016 (r309083) @@ -142,6 +142,8 @@ struct vmbus_channel { struct sx ch_orphan_lock; struct vmbus_xact_ctx *ch_orphan_xact; + int ch_refs; + struct sysctl_ctx_list ch_sysctl_ctx; } __aligned(CACHE_LINE_SIZE); From owner-svn-src-head@freebsd.org Thu Nov 24 06:43:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE8A6C52BB6; Thu, 24 Nov 2016 06:43:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E3AD6A3; Thu, 24 Nov 2016 06:43:12 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO6hBLj084367; Thu, 24 Nov 2016 06:43:11 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO6hBAf084366; Thu, 24 Nov 2016 06:43:11 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611240643.uAO6hBAf084366@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 24 Nov 2016 06:43:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309084 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 06:43:12 -0000 Author: manu Date: Thu Nov 24 06:43:11 2016 New Revision: 309084 URL: https://svnweb.freebsd.org/changeset/base/309084 Log: Enable the SPI1 and SPI2 node for Olimex A20 SOM EVB. This was missed in r309079. Modified: head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Modified: head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Thu Nov 24 06:01:29 2016 (r309083) +++ head/sys/boot/fdt/dts/arm/olimex-a20-som-evb.dts Thu Nov 24 06:43:11 2016 (r309084) @@ -62,12 +62,14 @@ pinctrl-names = "default"; pinctrl-0 = <&spi1_pins_a>, <&spi1_cs0_pins_a>; + status = "okay"; }; &spi2 { pinctrl-names = "default"; pinctrl-0 = <&spi2_pins_a>, <&spi2_cs0_pins_a>; + status = "okay"; }; &uart6 { From owner-svn-src-head@freebsd.org Thu Nov 24 07:35:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C8564C52487; Thu, 24 Nov 2016 07:35:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A2D588E; Thu, 24 Nov 2016 07:35:17 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO7ZG6T004259; Thu, 24 Nov 2016 07:35:16 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO7ZGJa004257; Thu, 24 Nov 2016 07:35:16 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611240735.uAO7ZGJa004257@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Thu, 24 Nov 2016 07:35:16 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309085 - head/sys/dev/hyperv/netvsc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 07:35:17 -0000 Author: sephe Date: Thu Nov 24 07:35:16 2016 New Revision: 309085 URL: https://svnweb.freebsd.org/changeset/base/309085 Log: hyperv/hn: Fix primary channel revocation Since hypervisor will not drain the TX bufring, once the channels are revoked: - Setup vmbus orphan handler properly. - Make sure that suspension will not wait the TX bufring draining forever. - GC the pending TX descs on detach path, before freeing the busdma stuffs. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8559 Modified: head/sys/dev/hyperv/netvsc/hn_nvs.c head/sys/dev/hyperv/netvsc/if_hn.c Modified: head/sys/dev/hyperv/netvsc/hn_nvs.c ============================================================================== --- head/sys/dev/hyperv/netvsc/hn_nvs.c Thu Nov 24 06:43:11 2016 (r309084) +++ head/sys/dev/hyperv/netvsc/hn_nvs.c Thu Nov 24 07:35:16 2016 (r309085) @@ -336,8 +336,13 @@ hn_nvs_disconn_rxbuf(struct hn_softc *sc /* * Wait for the hypervisor to receive this NVS request. + * + * NOTE: + * The TX bufring will not be drained by the hypervisor, + * if the primary channel is revoked. */ - while (!vmbus_chan_tx_empty(sc->hn_prichan)) + while (!vmbus_chan_tx_empty(sc->hn_prichan) && + !vmbus_chan_is_revoked(sc->hn_prichan)) pause("waittx", 1); /* * Linger long enough for NVS to disconnect RXBUF. @@ -387,8 +392,13 @@ hn_nvs_disconn_chim(struct hn_softc *sc) /* * Wait for the hypervisor to receive this NVS request. + * + * NOTE: + * The TX bufring will not be drained by the hypervisor, + * if the primary channel is revoked. */ - while (!vmbus_chan_tx_empty(sc->hn_prichan)) + while (!vmbus_chan_tx_empty(sc->hn_prichan) && + !vmbus_chan_is_revoked(sc->hn_prichan)) pause("waittx", 1); /* * Linger long enough for NVS to disconnect chimney Modified: head/sys/dev/hyperv/netvsc/if_hn.c ============================================================================== --- head/sys/dev/hyperv/netvsc/if_hn.c Thu Nov 24 06:43:11 2016 (r309084) +++ head/sys/dev/hyperv/netvsc/if_hn.c Thu Nov 24 07:35:16 2016 (r309085) @@ -303,7 +303,8 @@ static void hn_resume(struct hn_softc static void hn_resume_data(struct hn_softc *); static void hn_resume_mgmt(struct hn_softc *); static void hn_suspend_mgmt_taskfunc(void *, int); -static void hn_chan_drain(struct vmbus_channel *); +static void hn_chan_drain(struct hn_softc *, + struct vmbus_channel *); static void hn_update_link_status(struct hn_softc *); static void hn_change_network(struct hn_softc *); @@ -327,6 +328,8 @@ static int hn_create_tx_data(struct hn static void hn_fixup_tx_data(struct hn_softc *); static void hn_destroy_tx_data(struct hn_softc *); static void hn_txdesc_dmamap_destroy(struct hn_txdesc *); +static void hn_txdesc_gc(struct hn_tx_ring *, + struct hn_txdesc *); static int hn_encap(struct ifnet *, struct hn_tx_ring *, struct hn_txdesc *, struct mbuf **); static int hn_txpkt(struct ifnet *, struct hn_tx_ring *, @@ -994,8 +997,25 @@ hn_attach(device_t dev) */ sc->hn_xact = vmbus_xact_ctx_create(bus_get_dma_tag(dev), HN_XACT_REQ_SIZE, HN_XACT_RESP_SIZE, 0); - if (sc->hn_xact == NULL) + if (sc->hn_xact == NULL) { + error = ENXIO; + goto failed; + } + + /* + * Install orphan handler for the revocation of this device's + * primary channel. + * + * NOTE: + * The processing order is critical here: + * Install the orphan handler, _before_ testing whether this + * device's primary channel has been revoked or not. + */ + vmbus_chan_set_orphan(sc->hn_prichan, sc->hn_xact); + if (vmbus_chan_is_revoked(sc->hn_prichan)) { + error = ENXIO; goto failed; + } /* * Attach the synthetic parts, i.e. NVS and RNDIS. @@ -1170,6 +1190,14 @@ hn_detach(device_t dev) struct hn_softc *sc = device_get_softc(dev); struct ifnet *ifp = sc->hn_ifp; + if (sc->hn_xact != NULL && vmbus_chan_is_revoked(sc->hn_prichan)) { + /* + * In case that the vmbus missed the orphan handler + * installation. + */ + vmbus_xact_ctx_orphan(sc->hn_xact); + } + if (device_is_attached(dev)) { HN_LOCK(sc); if (sc->hn_flags & HN_FLAG_SYNTH_ATTACHED) { @@ -1195,8 +1223,14 @@ hn_detach(device_t dev) taskqueue_free(sc->hn_tx_taskq); taskqueue_free(sc->hn_mgmt_taskq0); - if (sc->hn_xact != NULL) + if (sc->hn_xact != NULL) { + /* + * Uninstall the orphan handler _before_ the xact is + * destructed. + */ + vmbus_chan_unset_orphan(sc->hn_prichan); vmbus_xact_ctx_destroy(sc->hn_xact); + } if_free(ifp); @@ -1435,7 +1469,7 @@ hn_txdesc_hold(struct hn_txdesc *txd) { /* 0->1 transition will never work */ - KASSERT(txd->refs > 0, ("invalid refs %d", txd->refs)); + KASSERT(txd->refs > 0, ("invalid txd refs %d", txd->refs)); atomic_add_int(&txd->refs, 1); } @@ -3449,24 +3483,43 @@ hn_txdesc_dmamap_destroy(struct hn_txdes } static void +hn_txdesc_gc(struct hn_tx_ring *txr, struct hn_txdesc *txd) +{ + + KASSERT(txd->refs == 0 || txd->refs == 1, + ("invalid txd refs %d", txd->refs)); + + /* Aggregated txds will be freed by their aggregating txd. */ + if (txd->refs > 0 && (txd->flags & HN_TXD_FLAG_ONAGG) == 0) { + int freed; + + freed = hn_txdesc_put(txr, txd); + KASSERT(freed, ("can't free txdesc")); + } +} + +static void hn_tx_ring_destroy(struct hn_tx_ring *txr) { - struct hn_txdesc *txd; + int i; if (txr->hn_txdesc == NULL) return; -#ifndef HN_USE_TXDESC_BUFRING - while ((txd = SLIST_FIRST(&txr->hn_txlist)) != NULL) { - SLIST_REMOVE_HEAD(&txr->hn_txlist, link); - hn_txdesc_dmamap_destroy(txd); - } -#else - mtx_lock(&txr->hn_tx_lock); - while ((txd = buf_ring_dequeue_sc(txr->hn_txdesc_br)) != NULL) - hn_txdesc_dmamap_destroy(txd); - mtx_unlock(&txr->hn_tx_lock); -#endif + /* + * NOTE: + * Because the freeing of aggregated txds will be deferred + * to the aggregating txd, two passes are used here: + * - The first pass GCes any pending txds. This GC is necessary, + * since if the channels are revoked, hypervisor will not + * deliver send-done for all pending txds. + * - The second pass frees the busdma stuffs, i.e. after all txds + * were freed. + */ + for (i = 0; i < txr->hn_txdesc_cnt; ++i) + hn_txdesc_gc(txr, &txr->hn_txdesc[i]); + for (i = 0; i < txr->hn_txdesc_cnt; ++i) + hn_txdesc_dmamap_destroy(&txr->hn_txdesc[i]); if (txr->hn_tx_data_dtag != NULL) bus_dma_tag_destroy(txr->hn_tx_data_dtag); @@ -4499,10 +4552,17 @@ hn_set_ring_inuse(struct hn_softc *sc, i } static void -hn_chan_drain(struct vmbus_channel *chan) +hn_chan_drain(struct hn_softc *sc, struct vmbus_channel *chan) { - while (!vmbus_chan_rx_empty(chan) || !vmbus_chan_tx_empty(chan)) + /* + * NOTE: + * The TX bufring will not be drained by the hypervisor, + * if the primary channel is revoked. + */ + while (!vmbus_chan_rx_empty(chan) || + (!vmbus_chan_is_revoked(sc->hn_prichan) && + !vmbus_chan_tx_empty(chan))) pause("waitch", 1); vmbus_chan_intr_drain(chan); } @@ -4511,6 +4571,7 @@ static void hn_suspend_data(struct hn_softc *sc) { struct vmbus_channel **subch = NULL; + struct hn_tx_ring *txr; int i, nsubch; HN_LOCK_ASSERT(sc); @@ -4519,19 +4580,23 @@ hn_suspend_data(struct hn_softc *sc) * Suspend TX. */ for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { - struct hn_tx_ring *txr = &sc->hn_tx_ring[i]; + txr = &sc->hn_tx_ring[i]; mtx_lock(&txr->hn_tx_lock); txr->hn_suspended = 1; mtx_unlock(&txr->hn_tx_lock); /* No one is able send more packets now. */ - /* Wait for all pending sends to finish. */ - while (hn_tx_ring_pending(txr)) + /* + * Wait for all pending sends to finish. + * + * NOTE: + * We will _not_ receive all pending send-done, if the + * primary channel is revoked. + */ + while (hn_tx_ring_pending(txr) && + !vmbus_chan_is_revoked(sc->hn_prichan)) pause("hnwtx", 1 /* 1 tick */); - - taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task); - taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task); } /* @@ -4554,12 +4619,27 @@ hn_suspend_data(struct hn_softc *sc) if (subch != NULL) { for (i = 0; i < nsubch; ++i) - hn_chan_drain(subch[i]); + hn_chan_drain(sc, subch[i]); } - hn_chan_drain(sc->hn_prichan); + hn_chan_drain(sc, sc->hn_prichan); if (subch != NULL) vmbus_subchan_rel(subch, nsubch); + + /* + * Drain any pending TX tasks. + * + * NOTE: + * The above hn_chan_drain() can dispatch TX tasks, so the TX + * tasks will have to be drained _after_ the above hn_chan_drain() + * calls. + */ + for (i = 0; i < sc->hn_tx_ring_inuse; ++i) { + txr = &sc->hn_tx_ring[i]; + + taskqueue_drain(txr->hn_tx_taskq, &txr->hn_tx_task); + taskqueue_drain(txr->hn_tx_taskq, &txr->hn_txeof_task); + } } static void From owner-svn-src-head@freebsd.org Thu Nov 24 09:00:53 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0469AC535AF; Thu, 24 Nov 2016 09:00:53 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFC4F149; Thu, 24 Nov 2016 09:00:52 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO90pUj038716; Thu, 24 Nov 2016 09:00:51 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO90pLL038715; Thu, 24 Nov 2016 09:00:51 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611240900.uAO90pLL038715@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 09:00:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309090 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 09:00:53 -0000 Author: avg Date: Thu Nov 24 09:00:51 2016 New Revision: 309090 URL: https://svnweb.freebsd.org/changeset/base/309090 Log: further fix zfs_lock() diagnostics It was very wrong to look at the vnode and znode internals without having locked the vnode first. Reported by: pho Tested by: pho MFC after: 1 week X-MFC with: r308887 Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 24 09:00:18 2016 (r309089) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c Thu Nov 24 09:00:51 2016 (r309090) @@ -5963,10 +5963,6 @@ zfs_vptocnp(struct vop_vptocnp_args *ap) } #ifdef DIAGNOSTIC -#define CHECK_LOR ((flags & LK_NOWAIT) == 0 && vp->v_mount != NULL && \ - (vp->v_iflag & VI_DOOMED) == 0 && vp->v_data != NULL && \ - (zp->z_pflags & ZFS_XATTR) == 0) - static int zfs_lock(ap) struct vop_lock1_args /* { @@ -5976,28 +5972,20 @@ zfs_lock(ap) int line; } */ *ap; { - zfsvfs_t *zfsvfs; - znode_t *zp; vnode_t *vp; - int flags; + znode_t *zp; int err; - vp = ap->a_vp; - zp = vp->v_data; - flags = ap->a_flags; - if ((flags & LK_INTERLOCK) == 0 && CHECK_LOR) { - zfsvfs = zp->z_zfsvfs; - VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); - } err = vop_stdlock(ap); - if ((flags & LK_INTERLOCK) != 0 && CHECK_LOR) { - zfsvfs = zp->z_zfsvfs; - VERIFY(!RRM_LOCK_HELD(&zfsvfs->z_teardown_lock)); + if (err == 0 && (ap->a_flags & LK_NOWAIT) == 0) { + vp = ap->a_vp; + zp = vp->v_data; + if (vp->v_mount != NULL && (vp->v_iflag & VI_DOOMED) == 0 && + zp != NULL && (zp->z_pflags & ZFS_XATTR) == 0) + VERIFY(!RRM_LOCK_HELD(&zp->z_zfsvfs->z_teardown_lock)); } return (err); } - -#undef CHECK_LOR #endif struct vop_vector zfs_vnodeops; From owner-svn-src-head@freebsd.org Thu Nov 24 09:26:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3E0CC503B4; Thu, 24 Nov 2016 09:26:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::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 4FEB928D; Thu, 24 Nov 2016 09:26:34 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from tom.home (kib@localhost [127.0.0.1]) by kib.kiev.ua (8.15.2/8.15.2) with ESMTPS id uAO9QOLR011357 (version=TLSv1 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Thu, 24 Nov 2016 11:26:25 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua uAO9QOLR011357 Received: (from kostik@localhost) by tom.home (8.15.2/8.15.2/Submit) id uAO9QOOV011308; Thu, 24 Nov 2016 11:26:24 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Nov 2016 11:26:24 +0200 From: Konstantin Belousov To: Bryan Drewery Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r308687 - head/libexec/rtld-elf Message-ID: <20161124092624.GP54029@kib.kiev.ua> References: <201611150937.uAF9bZPg082363@repo.freebsd.org> <19b061c5-cd2b-f098-e8b1-aca308e61c31@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <19b061c5-cd2b-f098-e8b1-aca308e61c31@FreeBSD.org> User-Agent: Mutt/1.7.1 (2016-10-04) 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.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on tom.home X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 09:26:34 -0000 On Wed, Nov 23, 2016 at 11:06:53AM -0800, Bryan Drewery wrote: > On 11/15/2016 1:37 AM, Konstantin Belousov wrote: > > Author: kib > > Date: Tue Nov 15 09:37:35 2016 > > New Revision: 308687 > > URL: https://svnweb.freebsd.org/changeset/base/308687 > > > > Log: > > Update hint to utilize user variable. > > > > Sponsored by: The FreeBSD Foundation > > MFC after: 1 week > > > > Modified: > > head/libexec/rtld-elf/Makefile > > > > Modified: head/libexec/rtld-elf/Makefile > > ============================================================================== > > --- head/libexec/rtld-elf/Makefile Tue Nov 15 09:20:28 2016 (r308686) > > +++ head/libexec/rtld-elf/Makefile Tue Nov 15 09:37:35 2016 (r308687) > > @@ -2,7 +2,7 @@ > > > > # Use the following command to build local debug version of dynamic > > # linker: > > -# make DEBUG_FLAGS=-g DEBUG=-DDEBUG MK_TESTS=no all > > +# make DEBUG_FLAGS=-g DEBUG=-DDEBUG WITHOUT_TESTS=yes all > > What prompted this change? Passing MK_TESTS=no should work fine. I thought that the intent was to expose WITH_/WITHOUT_ knobs to users, and keep MK_ to internal build machinery. This most likely come from reading commit logs which I cannot dig now. For start, only WITH_/WITHOUT_ are documented in src.conf. Second, the very beginning of src.opts.mk says # Users define WITH_FOO and WITHOUT_FOO on the command line or in /etc/src.conf # and /etc/make.conf files. These translate in the build system to MK_FOO={yes,no} # with sensible (usually) defaults. Then it adds # Define MK_* variables (which are either "yes" or "no") for users # to set via WITH_*/WITHOUT_* in /etc/src.conf and override in the # make(1) environment. IMO it is relatively easy to make the same conclusion as I did, from the text above. > > > > > .include > > PACKAGE= clibs > > > > > -- > Regards, > Bryan Drewery > From owner-svn-src-head@freebsd.org Thu Nov 24 09:43:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51BFFC51087; Thu, 24 Nov 2016 09:43:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 217B17CC; Thu, 24 Nov 2016 09:43:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO9hgK7056724; Thu, 24 Nov 2016 09:43:42 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO9hgUb056723; Thu, 24 Nov 2016 09:43:42 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611240943.uAO9hgUb056723@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 09:43:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309092 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 09:43:43 -0000 Author: avg Date: Thu Nov 24 09:43:42 2016 New Revision: 309092 URL: https://svnweb.freebsd.org/changeset/base/309092 Log: fwohci: report whether PhysicalUpperBound register is implemented Please see section 5.15 of 1394 OHCI Specification. If the register is not implemented, then the physical response unit is limited to the first 4GB of the physical memory. In that case the non-cooperative debugging over firewire (using /dev/fwmem) can not be expected to work if a target has more RAM than that. The method is described in gdb.4 and the Developer's Handbook. It seems that most of the consumer hardware does not implement PhysicalUpperBound register. MFC after: 1 week Modified: head/sys/dev/firewire/fwohci.c Modified: head/sys/dev/firewire/fwohci.c ============================================================================== --- head/sys/dev/firewire/fwohci.c Thu Nov 24 09:39:00 2016 (r309091) +++ head/sys/dev/firewire/fwohci.c Thu Nov 24 09:43:42 2016 (r309092) @@ -1860,6 +1860,16 @@ fwohci_intr_core(struct fwohci_softc *sc prequpper = OHCI_PREQUPPER_MAX; } OWRITE(sc, OHCI_PREQUPPER, prequpper & 0xffffffff); + if (OREAD(sc, OHCI_PREQUPPER) != + (prequpper & 0xffffffff)) { + device_printf(fc->dev, + "PhysicalUpperBound register is not " + "implemented. Physical memory access " + "is limited to the first 4GB\n"); + device_printf(fc->dev, + "PhysicalUpperBound = 0x%08x\n", + OREAD(sc, OHCI_PREQUPPER)); + } } /* Set ATRetries register */ OWRITE(sc, OHCI_ATRETRY, 1<<(13 + 16) | 0xfff); From owner-svn-src-head@freebsd.org Thu Nov 24 09:47:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9C68C5119B; Thu, 24 Nov 2016 09:47:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 914289BA; Thu, 24 Nov 2016 09:47:57 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAO9luWo056928; Thu, 24 Nov 2016 09:47:56 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAO9lurA056927; Thu, 24 Nov 2016 09:47:56 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611240947.uAO9lurA056927@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 09:47:56 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309093 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 09:47:58 -0000 Author: avg Date: Thu Nov 24 09:47:56 2016 New Revision: 309093 URL: https://svnweb.freebsd.org/changeset/base/309093 Log: firewire: initialize tag label to -1 in fw_xfer_alloc() Zero can be confused for a potentially valid value. For example, if I load and unload sbp driver I get a lot of messages like the following: fw_tl_free: the xfer is not in the queue (tlabel=0, flag=0x0) send: dst=0x00 tl=0x00 rt=0 tcode=0x0 pri=0x0 src=0x000 recv: dst=0x01 tl=0x21 rt=1 tcode=0x1 pri=0x0 src=0xffc0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe04464407e0 fw_tl_free() at fw_tl_free+0x18d/frame 0xfffffe0446440820 fw_xfer_unload() at fw_xfer_unload+0xca/frame 0xfffffe0446440840 fw_xferlist_remove() at fw_xferlist_remove+0x2f/frame 0xfffffe0446440870 sbp_detach() at sbp_detach+0x1e0/frame 0xfffffe04464408e0 device_detach() at device_detach+0x80/frame 0xfffffe0446440900 devclass_driver_deleted() at devclass_driver_deleted+0x6a/frame 0xfffffe0446440940 devclass_delete_driver() at devclass_delete_driver+0x7d/frame 0xfffffe0446440980 driver_module_handler() at driver_module_handler+0xff/frame 0xfffffe04464409d0 module_unload() at module_unload+0x32/frame 0xfffffe04464409f0 linker_file_unload() at linker_file_unload+0x24b/frame 0xfffffe0446440a40 kern_kldunload() at kern_kldunload+0xbc/frame 0xfffffe0446440a70 amd64_syscall() at amd64_syscall+0x314/frame 0xfffffe0446440bf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe0446440bf0 MFC after: 2 weeks Modified: head/sys/dev/firewire/firewire.c Modified: head/sys/dev/firewire/firewire.c ============================================================================== --- head/sys/dev/firewire/firewire.c Thu Nov 24 09:43:42 2016 (r309092) +++ head/sys/dev/firewire/firewire.c Thu Nov 24 09:47:56 2016 (r309093) @@ -1098,6 +1098,7 @@ fw_xfer_alloc(struct malloc_type *type) return xfer; xfer->malloc = type; + xfer->tl = -1; return xfer; } From owner-svn-src-head@freebsd.org Thu Nov 24 10:03:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E78BCC51755; Thu, 24 Nov 2016 10:03:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A8CB619; Thu, 24 Nov 2016 10:03:58 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOA3v74064585; Thu, 24 Nov 2016 10:03:57 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOA3vSe064584; Thu, 24 Nov 2016 10:03:57 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611241003.uAOA3vSe064584@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 10:03:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309094 - head/cddl/contrib/opensolaris X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:03:59 -0000 Author: avg Date: Thu Nov 24 10:03:57 2016 New Revision: 309094 URL: https://svnweb.freebsd.org/changeset/base/309094 Log: MFV r308986: 6412 zfs receive: -u can be ignored sometimes This is a record only change, the actual change is in FreeBSD since r297520. Modified: Directory Properties: head/cddl/contrib/opensolaris/ (props changed) From owner-svn-src-head@freebsd.org Thu Nov 24 10:04:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 069C6C517CA; Thu, 24 Nov 2016 10:04:22 +0000 (UTC) (envelope-from martymac@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CA234806; Thu, 24 Nov 2016 10:04:21 +0000 (UTC) (envelope-from martymac@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOA4KDu064645; Thu, 24 Nov 2016 10:04:20 GMT (envelope-from martymac@FreeBSD.org) Received: (from martymac@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOA4KpC064644; Thu, 24 Nov 2016 10:04:20 GMT (envelope-from martymac@FreeBSD.org) Message-Id: <201611241004.uAOA4KpC064644@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: martymac set sender to martymac@FreeBSD.org using -f From: Ganael LAPLANCHE Date: Thu, 24 Nov 2016 10:04:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309095 - head/share/man/man5 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:04:22 -0000 Author: martymac (ports committer) Date: Thu Nov 24 10:04:20 2016 New Revision: 309095 URL: https://svnweb.freebsd.org/changeset/base/309095 Log: Fix path for per-user nsmb.conf file ~/nsmb.conf, as erroneously introduced by r214387, is never used. Fix the man page to specify that ~/.nsmbrc is used instead. PR: 210652 Submitted by: ganael.laplanche@corp.ovh.com Approved by: gjb (doceng@) Modified: head/share/man/man5/nsmb.conf.5 (contents, props changed) Modified: head/share/man/man5/nsmb.conf.5 ============================================================================== --- head/share/man/man5/nsmb.conf.5 Thu Nov 24 10:03:57 2016 (r309094) +++ head/share/man/man5/nsmb.conf.5 Thu Nov 24 10:04:20 2016 (r309095) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd October 19, 2010 +.Dd November 24, 2016 .Dt NSMB.CONF 5 .Os .Sh NAME @@ -96,7 +96,7 @@ Possible keywords may include: .Bl -tag -width ".Pa /etc/nsmb.conf" .It Pa /etc/nsmb.conf The default remote mount-point configuration file. -.It Pa ~/nsmb.conf +.It Pa ~/.nsmbrc The user specific remote mount-point configuration file. .El .Sh EXAMPLES From owner-svn-src-head@freebsd.org Thu Nov 24 10:11:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6C0ADC519FE; Thu, 24 Nov 2016 10:11:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2DEECB19; Thu, 24 Nov 2016 10:11:10 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOAB9vR064971; Thu, 24 Nov 2016 10:11:09 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOAB95n064970; Thu, 24 Nov 2016 10:11:09 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611241011.uAOAB95n064970@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 10:11:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309096 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:11:10 -0000 Author: avg Date: Thu Nov 24 10:11:09 2016 New Revision: 309096 URL: https://svnweb.freebsd.org/changeset/base/309096 Log: MFV r308989: 6428 set canmount=off on unmounted filesystem tries to unmount children This is a cosmetic and bookkeeping change as the actual change is already in FreeBSD. See r297521, r304520, r308985. Modified: head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.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_dataset.c ============================================================================== --- head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Nov 24 10:04:20 2016 (r309095) +++ head/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c Thu Nov 24 10:11:09 2016 (r309096) @@ -1620,7 +1620,7 @@ zfs_prop_set_list(zfs_handle_t *zhp, nvl */ if (prop != ZFS_PROP_CANMOUNT || (fnvpair_value_uint64(elem) == ZFS_CANMOUNT_OFF && - zfs_is_mounted(zhp, NULL))) { + zfs_is_mounted(zhp, NULL))) { cls[cl_idx] = changelist_gather(zhp, prop, 0, 0); if (cls[cl_idx] == NULL) goto error; From owner-svn-src-head@freebsd.org Thu Nov 24 10:21:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E5EEC51DC0; Thu, 24 Nov 2016 10:21:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 78D762B9; Thu, 24 Nov 2016 10:21:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOALMPB072259; Thu, 24 Nov 2016 10:21:22 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOALM21072255; Thu, 24 Nov 2016 10:21:22 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611241021.uAOALM21072255@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 10:21:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309097 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:21:23 -0000 Author: avg Date: Thu Nov 24 10:21:22 2016 New Revision: 309097 URL: https://svnweb.freebsd.org/changeset/base/309097 Log: MFV r308987: 7180 potential race between zfs_suspend_fs+zfs_resume_fs and zfs_ioc_rename illumos/illumos-gate@690041b9caf801816f2d0bac90bc7cecefb73523 https://github.com/illumos/illumos-gate/commit/690041b9caf801816f2d0bac90bc7cecefb73523 https://www.illumos.org/issues/7180 If a filesystem is not unmounted while the rename is being performed, then, for example, a concurrect zfs rollback may call zfs_suspend_fs followed by zfs_resume_fs on the same filesystem. The latter takes the filesystem's name as an argument. If the filesystem name changes as a result of the rename, then dmu_objset_hold(osname, zfsvfs, &os) call in zfs_resume_fs would fail resulting in a kernel panic. So far I have been able to reproduce this problem on FreeBSD where zfs rename has -u option that skips the unmounting before doing the renaming. But I think that in theory the same problem can occur on illumos as well, because the unmounting is done in userland before invoking the rename ioctl and there could be a race with, e.g., zfs mount. panic: solaris assert: dmu_objset_hold(osname, zfsvfs, &zfsvfs->z_os) == 0 (0x2 == 0x0), file: /usr/devel/svn/head/sys/cddl/contrib/opensolaris/uts/common/fs/ zfs/zfs_vfsops.c, line: 2210 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe004df30710 vpanic() at vpanic+0x182/frame 0xfffffe004df30790 panic() at panic+0x43/frame 0xfffffe004df307f0 assfail3() at assfail3+0x2c/frame 0xfffffe004df30810 zfs_resume_fs() at zfs_resume_fs+0xb9/frame 0xfffffe004df30860 zfs_ioc_rollback() at zfs_ioc_rollback+0x61/frame 0xfffffe004df308a0 zfsdev_ioctl() at zfsdev_ioctl+0x65c/frame 0xfffffe004df30940 devfs_ioctl_f() at devfs_ioctl_f+0x156/frame 0xfffffe004df309a0 kern_ioctl() at kern_ioctl+0x246/frame 0xfffffe004df30a00 sys_ioctl() at sys_ioctl+0x171/frame 0xfffffe004df30ae0 amd64_syscall() at amd64_syscall+0x2db/frame 0xfffffe004df30bf0 Xfast_syscall() at Xfast_syscall+0xfb/frame 0xfffffe004df30bf0 Reviewed by: Matt Ahrens Reviewed by: Pavel Zakharov Approved by: Richard Lowe MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Thu Nov 24 10:11:09 2016 (r309096) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_vfsops.h Thu Nov 24 10:21:22 2016 (r309097) @@ -142,7 +142,7 @@ extern uint_t zfs_fsyncer_key; extern int zfs_super_owner; extern int zfs_suspend_fs(zfsvfs_t *zfsvfs); -extern int zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname); +extern int zfs_resume_fs(zfsvfs_t *zfsvfs, struct dsl_dataset *ds); extern int zfs_userspace_one(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, const char *domain, uint64_t rid, uint64_t *valuep); extern int zfs_userspace_many(zfsvfs_t *zfsvfs, zfs_userquota_prop_t type, 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 Thu Nov 24 10:11:09 2016 (r309096) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c Thu Nov 24 10:21:22 2016 (r309097) @@ -3789,12 +3789,15 @@ zfs_ioc_rollback(const char *fsname, nvl int error; if (getzfsvfs(fsname, &zfsvfs) == 0) { + dsl_dataset_t *ds; + + ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); if (error == 0) { int resume_err; error = dsl_dataset_rollback(fsname, zfsvfs, outnvl); - resume_err = zfs_resume_fs(zfsvfs, fsname); + resume_err = zfs_resume_fs(zfsvfs, ds); error = error ? error : resume_err; } #ifdef illumos @@ -4435,8 +4438,10 @@ zfs_ioc_recv(zfs_cmd_t *zc) if (getzfsvfs(tofs, &zfsvfs) == 0) { /* online recv */ + dsl_dataset_t *ds; int end_err; + ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); /* * If the suspend fails, then the recv_end will @@ -4444,7 +4449,7 @@ zfs_ioc_recv(zfs_cmd_t *zc) */ end_err = dmu_recv_end(&drc, zfsvfs); if (error == 0) - error = zfs_resume_fs(zfsvfs, tofs); + error = zfs_resume_fs(zfsvfs, ds); error = error ? error : end_err; #ifdef illumos VFS_RELE(zfsvfs->z_vfs); @@ -4990,11 +4995,14 @@ zfs_ioc_userspace_upgrade(zfs_cmd_t *zc) * objset needs to be closed & reopened (to grow the * objset_phys_t). Suspend/resume the fs will do that. */ + dsl_dataset_t *ds; + + ds = dmu_objset_ds(zfsvfs->z_os); error = zfs_suspend_fs(zfsvfs); if (error == 0) { dmu_objset_refresh_ownership(zfsvfs->z_os, zfsvfs); - error = zfs_resume_fs(zfsvfs, zc->zc_name); + error = zfs_resume_fs(zfsvfs, ds); } } if (error == 0) 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 Thu Nov 24 10:11:09 2016 (r309096) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Nov 24 10:21:22 2016 (r309097) @@ -2225,7 +2225,7 @@ zfs_suspend_fs(zfsvfs_t *zfsvfs) * zfsvfs, held, and long held on entry. */ int -zfs_resume_fs(zfsvfs_t *zfsvfs, const char *osname) +zfs_resume_fs(zfsvfs_t *zfsvfs, dsl_dataset_t *ds) { int err; znode_t *zp; @@ -2234,14 +2234,13 @@ zfs_resume_fs(zfsvfs_t *zfsvfs, const ch ASSERT(RW_WRITE_HELD(&zfsvfs->z_teardown_inactive_lock)); /* - * We already own this, so just hold and rele it to update the - * objset_t, as the one we had before may have been evicted. + * We already own this, so just update the objset_t, as the one we + * had before may have been evicted. */ objset_t *os; - VERIFY0(dmu_objset_hold(osname, zfsvfs, &os)); - VERIFY3P(os->os_dsl_dataset->ds_owner, ==, zfsvfs); - VERIFY(dsl_dataset_long_held(os->os_dsl_dataset)); - dmu_objset_rele(os, zfsvfs); + VERIFY3P(ds->ds_owner, ==, zfsvfs); + VERIFY(dsl_dataset_long_held(ds)); + VERIFY0(dmu_objset_from_ds(ds, &os)); err = zfsvfs_init(zfsvfs, os); if (err != 0) From owner-svn-src-head@freebsd.org Thu Nov 24 10:29:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0743CC52135; Thu, 24 Nov 2016 10:29:23 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B38E3B13; Thu, 24 Nov 2016 10:29:22 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOATL1L073644; Thu, 24 Nov 2016 10:29:21 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOATL9W073641; Thu, 24 Nov 2016 10:29:21 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611241029.uAOATL9W073641@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 10:29:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309098 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:29:23 -0000 Author: avg Date: Thu Nov 24 10:29:21 2016 New Revision: 309098 URL: https://svnweb.freebsd.org/changeset/base/309098 Log: MFV r308988: 7199, 7200 dsl_dataset_rollback_sync may try to free already free blocks 7199 dsl_dataset_rollback_sync may try to free already free blocks 7200 no blocks must be born in a txg after a snaphot is created illumos/illumos-gate@bfaed0b91e57062c38bc16b4f89db3c8f0052a9b https://github.com/illumos/illumos-gate/commit/bfaed0b91e57062c38bc16b4f89db3c8f0052a9b https://www.illumos.org/issues/7199 dsl_dataset_rollback_sync may try to free already freed blocks when it calls dsl_destroy_head_sync_impl to destroy a temporary clone. That happens if a snapshot to which we are rolling back and from which the clone is created has some ZIL records. https://www.illumos.org/issues/7200 No new blocks must be born in a dataset in the same TXG after a snapshot of the dataset is taken. Those blocks would have the same blk_birth as the dataset's ds_prev_snap_txg and as such they would be presumed to belong o the snapshot while in fact they do not. All the datasets must be clean before sync tasks are run, so the described scenario may happen only if one of the sync tasks dirties the dataset and another sync task takes its snapshot. Then, there will be another sync pass because of the dirty data and the new blocks will be born in the same TXG when the data is written out. It seems that almost all of the existing sync tasks modify only MOS and do not dirty any objsets. The only exception that I've been able to identify so far is the rollback which can modify an objset when it zeroes out the objset's ZIL. Reviewed by: Matthew Ahrens Reviewed by: Brad Lewis Approved by: Gordon Ross Author: Andriy Gapon MFC after: 3 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) 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 Thu Nov 24 10:21:22 2016 (r309097) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c Thu Nov 24 10:29:21 2016 (r309098) @@ -88,6 +88,8 @@ extern inline dsl_dataset_phys_t *dsl_da extern int spa_asize_inflation; +static zil_header_t zero_zil; + /* * 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 @@ -132,6 +134,7 @@ dsl_dataset_block_born(dsl_dataset_t *ds return; } + ASSERT3U(bp->blk_birth, >, dsl_dataset_phys(ds)->ds_prev_snap_txg); dmu_buf_will_dirty(ds->ds_dbuf, tx); mutex_enter(&ds->ds_lock); delta = parent_delta(ds, used); @@ -902,8 +905,20 @@ dsl_dataset_zero_zil(dsl_dataset_t *ds, objset_t *os; VERIFY0(dmu_objset_from_ds(ds, &os)); - bzero(&os->os_zil_header, sizeof (os->os_zil_header)); - dsl_dataset_dirty(ds, tx); + if (bcmp(&os->os_zil_header, &zero_zil, sizeof (zero_zil)) != 0) { + dsl_pool_t *dp = ds->ds_dir->dd_pool; + zio_t *zio; + + bzero(&os->os_zil_header, sizeof (os->os_zil_header)); + + zio = zio_root(dp->dp_spa, NULL, NULL, ZIO_FLAG_MUSTSUCCEED); + dsl_dataset_sync(ds, zio, tx); + VERIFY0(zio_wait(zio)); + + /* dsl_dataset_sync_done will drop this reference. */ + dmu_buf_add_ref(ds->ds_dbuf, ds); + dsl_dataset_sync_done(ds, tx); + } } uint64_t @@ -1083,8 +1098,10 @@ dsl_dataset_dirty(dsl_dataset_t *ds, dmu if (dsl_dataset_phys(ds)->ds_next_snap_obj != 0) panic("dirtying snapshot!"); - dp = ds->ds_dir->dd_pool; + /* Must not dirty a dataset in the same txg where it got snapshotted. */ + ASSERT3U(tx->tx_txg, >, dsl_dataset_phys(ds)->ds_prev_snap_txg); + dp = ds->ds_dir->dd_pool; if (txg_list_add(&dp->dp_dirty_datasets, ds, tx->tx_txg)) { /* up the hold count until we can be written out */ dmu_buf_add_ref(ds->ds_dbuf, ds); @@ -1339,8 +1356,6 @@ void dsl_dataset_snapshot_sync_impl(dsl_dataset_t *ds, const char *snapname, dmu_tx_t *tx) { - static zil_header_t zero_zil; - dsl_pool_t *dp = ds->ds_dir->dd_pool; dmu_buf_t *dbuf; dsl_dataset_phys_t *dsphys; @@ -1359,6 +1374,10 @@ dsl_dataset_snapshot_sync_impl(dsl_datas bcmp(&os->os_phys->os_zil_header, &zero_zil, sizeof (zero_zil)) == 0); + /* Should not snapshot a dirty dataset. */ + ASSERT(!txg_list_member(&ds->ds_dir->dd_pool->dp_dirty_datasets, + ds, tx->tx_txg)); + dsl_fs_ss_count_adjust(ds->ds_dir, 1, DD_FIELD_SNAPSHOT_COUNT, tx); /* @@ -1718,6 +1737,27 @@ dsl_dataset_sync(dsl_dataset_t *ds, zio_ } } +static int +deadlist_enqueue_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) +{ + dsl_deadlist_t *dl = arg; + dsl_deadlist_insert(dl, bp, tx); + return (0); +} + +void +dsl_dataset_sync_done(dsl_dataset_t *ds, dmu_tx_t *tx) +{ + objset_t *os = ds->ds_objset; + + bplist_iterate(&ds->ds_pending_deadlist, + deadlist_enqueue_cb, &ds->ds_deadlist, tx); + + ASSERT(!dmu_objset_is_dirty(os, dmu_tx_get_txg(tx))); + + dmu_buf_rele(ds->ds_dbuf, ds); +} + static void get_clones_stat(dsl_dataset_t *ds, nvlist_t *nv) { @@ -2237,6 +2277,18 @@ dsl_dataset_rollback_check(void *arg, dm return (SET_ERROR(EINVAL)); } + /* + * No rollback to a snapshot created in the current txg, because + * the rollback may dirty the dataset and create blocks that are + * not reachable from the rootbp while having a birth txg that + * falls into the snapshot's range. + */ + if (dmu_tx_is_syncing(tx) && + dsl_dataset_phys(ds)->ds_prev_snap_txg >= tx->tx_txg) { + dsl_dataset_rele(ds, FTAG); + return (SET_ERROR(EAGAIN)); + } + /* must not have any bookmarks after the most recent snapshot */ nvlist_t *proprequest = fnvlist_alloc(); fnvlist_add_boolean(proprequest, zfs_prop_to_name(ZFS_PROP_CREATETXG)); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Nov 24 10:21:22 2016 (r309097) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c Thu Nov 24 10:29:21 2016 (r309098) @@ -524,14 +524,6 @@ dsl_pool_mos_diduse_space(dsl_pool_t *dp mutex_exit(&dp->dp_lock); } -static int -deadlist_enqueue_cb(void *arg, const blkptr_t *bp, dmu_tx_t *tx) -{ - dsl_deadlist_t *dl = arg; - dsl_deadlist_insert(dl, bp, tx); - return (0); -} - static void dsl_pool_sync_mos(dsl_pool_t *dp, dmu_tx_t *tx) { @@ -632,11 +624,7 @@ dsl_pool_sync(dsl_pool_t *dp, uint64_t t * - release hold from dsl_dataset_dirty() */ while ((ds = list_remove_head(&synced_datasets)) != NULL) { - objset_t *os = ds->ds_objset; - bplist_iterate(&ds->ds_pending_deadlist, - deadlist_enqueue_cb, &ds->ds_deadlist, tx); - ASSERT(!dmu_objset_is_dirty(os, txg)); - dmu_buf_rele(ds->ds_dbuf, ds); + dsl_dataset_sync_done(ds, tx); } while ((dd = txg_list_remove(&dp->dp_dirty_dirs, txg)) != NULL) { dsl_dir_sync(dd, tx); Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h ============================================================================== --- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Thu Nov 24 10:21:22 2016 (r309097) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h Thu Nov 24 10:29:21 2016 (r309098) @@ -274,6 +274,7 @@ boolean_t dsl_dataset_modified_since_sna dsl_dataset_t *snap); void dsl_dataset_sync(dsl_dataset_t *os, zio_t *zio, dmu_tx_t *tx); +void dsl_dataset_sync_done(dsl_dataset_t *os, dmu_tx_t *tx); void dsl_dataset_block_born(dsl_dataset_t *ds, const blkptr_t *bp, dmu_tx_t *tx); From owner-svn-src-head@freebsd.org Thu Nov 24 10:34:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 307AFC5239F; Thu, 24 Nov 2016 10:34:44 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E702DF7A; Thu, 24 Nov 2016 10:34:43 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOAYhMG077353; Thu, 24 Nov 2016 10:34:43 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOAYhYx077352; Thu, 24 Nov 2016 10:34:43 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611241034.uAOAYhYx077352@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 10:34:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309099 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:34:44 -0000 Author: avg Date: Thu Nov 24 10:34:42 2016 New Revision: 309099 URL: https://svnweb.freebsd.org/changeset/base/309099 Log: MFV r308990: 7181 race between zfs_mount and zfs_ioc_rollback illumos/illumos-gate@90f2c094b3822f4825f21cef2c2faf7d03b55139 https://github.com/illumos/illumos-gate/commit/90f2c094b3822f4825f21cef2c2faf7d03b55139 https://www.illumos.org/issues/7181 zfsvfs_setup() is called in both zfs_mount and zfs_resume_fs paths. dmu_objset_set_user(zfsvfs->z_os, zfsvfs) is called early in zfsvfs_setup() before the setup is actually completed, thus an under-constructed zfsvfs becomes visible. Additionally, there is nothing to serialize the two call paths. As a result two threads can step on each other's toes. assertion failed: zilog->zl_clean_taskq == NULL, file: ../../common/fs/zfs/zil.c, line: 1772 > $c vpanic() 0xfffffffffbdf6928() zil_open+0x45(ffffff1bbc5dd000, fffffffff7993880) zfsvfs_setup+0x84(ffffffb378d77000, 0) zfs_resume_fs+0x132(ffffffb378d77000, ffffffb37ddcf000) zfs_ioc_rollback+0x96(ffffffb37ddcf000, ffffff01dcdc4cd0, ffffff01aa091000) zfsdev_ioctl+0x215(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) cdev_ioctl+0x39(10a00000000, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) spec_ioctl+0x60(ffffff0197737700, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) fop_ioctl+0x55(ffffff0197737700, 5a19, 80465f8, 100003, ffffff01ab318368, ffffff0004b59e58) ioctl+0x9b(7, 5a19, 80465f8) sys_syscall32+0x1f7() > ffffff1bbc5dd000::print objset_t os_zil os_zil = 0xffffff1c053cf7c0 > 0xffffff1c053cf7c0::print zilog_t zl_clean_taskq Reviewed by: Matthew Ahrens Approved by: Gordon Ross Author: Andriy Gapon MFC after: 2 weeks Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Directory Properties: head/sys/cddl/contrib/opensolaris/ (props changed) 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 Thu Nov 24 10:29:21 2016 (r309098) +++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c Thu Nov 24 10:34:42 2016 (r309099) @@ -1039,13 +1039,6 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t if (error) return (error); - /* - * Set the objset user_ptr to track its zfsvfs. - */ - mutex_enter(&zfsvfs->z_os->os_user_ptr_lock); - dmu_objset_set_user(zfsvfs->z_os, zfsvfs); - mutex_exit(&zfsvfs->z_os->os_user_ptr_lock); - zfsvfs->z_log = zil_open(zfsvfs->z_os, zfs_get_data); /* @@ -1106,6 +1099,13 @@ zfsvfs_setup(zfsvfs_t *zfsvfs, boolean_t zfsvfs->z_vfs->vfs_flag |= readonly; /* restore readonly bit */ } + /* + * Set the objset user_ptr to track its zfsvfs. + */ + mutex_enter(&zfsvfs->z_os->os_user_ptr_lock); + dmu_objset_set_user(zfsvfs->z_os, zfsvfs); + mutex_exit(&zfsvfs->z_os->os_user_ptr_lock); + return (0); } From owner-svn-src-head@freebsd.org Thu Nov 24 10:35:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C71DBC52409; Thu, 24 Nov 2016 10:35:50 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9657510EA; Thu, 24 Nov 2016 10:35:50 +0000 (UTC) (envelope-from brueffer@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOAZn6o077447; Thu, 24 Nov 2016 10:35:49 GMT (envelope-from brueffer@FreeBSD.org) Received: (from brueffer@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOAZnjo077446; Thu, 24 Nov 2016 10:35:49 GMT (envelope-from brueffer@FreeBSD.org) Message-Id: <201611241035.uAOAZnjo077446@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brueffer set sender to brueffer@FreeBSD.org using -f From: Christian Brueffer Date: Thu, 24 Nov 2016 10:35:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309100 - head/release/doc/en_US.ISO8859-1/hardware X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 10:35:50 -0000 Author: brueffer Date: Thu Nov 24 10:35:49 2016 New Revision: 309100 URL: https://svnweb.freebsd.org/changeset/base/309100 Log: Sync the rtwn(4) entry with the manpage. Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml Modified: head/release/doc/en_US.ISO8859-1/hardware/article.xml ============================================================================== --- head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Nov 24 10:34:42 2016 (r309099) +++ head/release/doc/en_US.ISO8859-1/hardware/article.xml Thu Nov 24 10:35:49 2016 (r309100) @@ -1000,8 +1000,9 @@ &hwlist.rsu; - Realtek RTL8188CE based PCIe IEEE 802.11b/g/n wireless network - adapters (&man.rtwn.4; driver) + Realtek RTL8192C, RTL8188E, RTL8812A and RTL8821A based + PCIe IEEE 802.11b/g/n wireless network adapters (&man.rtwn.4; + driver) &hwlist.rum; From owner-svn-src-head@freebsd.org Thu Nov 24 12:40:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 11D02C50E6D; Thu, 24 Nov 2016 12:40:35 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citapm.icyb.net.ua (citapm.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id B7FBB14D; Thu, 24 Nov 2016 12:40:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citapm.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id OAA10444; Thu, 24 Nov 2016 14:40:16 +0200 (EET) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1c9tK3-000PxH-U2; Thu, 24 Nov 2016 14:40:15 +0200 Subject: Re: svn commit: r305898 - head/usr.sbin/bhyve To: Jakub Wojciech Klama , src-committers@FreeBSD.org, svn-src-all@FreeBSD.org, svn-src-head@FreeBSD.org References: <201609171348.u8HDm1Yn093022@repo.freebsd.org> From: Andriy Gapon Message-ID: <32cdc6d3-cec6-8d66-e549-b1463a43f136@FreeBSD.org> Date: Thu, 24 Nov 2016 14:38:53 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.0 MIME-Version: 1.0 In-Reply-To: <201609171348.u8HDm1Yn093022@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 12:40:35 -0000 On 17/09/2016 16:48, Jakub Wojciech Klama wrote: > Author: jceel > Date: Sat Sep 17 13:48:01 2016 > New Revision: 305898 > URL: https://svnweb.freebsd.org/changeset/base/305898 > > Log: > Add virtio-console support to bhyve. Please update bhyve.8 with this device and its options. An example would be great. Thank you! > Adds virtio-console device support to bhyve, allowing to create > bidirectional character streams between host and guest. > > Syntax: > -s ,virtio-console,port1=/path/to/port1.sock,anotherport=... > > Maximum of 16 ports per device can be created. Every port is named > and corresponds to an Unix domain socket created by bhyve. bhyve > accepts at most one connection per port at a time. > > Limitations: > - due to lack of destructors of in bhyve, sockets on the filesystem > must be cleaned up manually after bhyve exits > - there's no way to use "console port" feature, nor the console port > resize as of now > - emergency write is advertised, but no-op as of now > > Approved by: trasz > MFC after: 1 month > Relnotes: yes > Sponsored by: iXsystems, Inc. > Differential Revision: D7185 > > Added: > head/usr.sbin/bhyve/pci_virtio_console.c (contents, props changed) > Modified: > head/usr.sbin/bhyve/Makefile > head/usr.sbin/bhyve/virtio.h -- Andriy Gapon From owner-svn-src-head@freebsd.org Thu Nov 24 14:50:22 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8EFCEC53A72; Thu, 24 Nov 2016 14:50:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E87AAD3; Thu, 24 Nov 2016 14:50:22 +0000 (UTC) (envelope-from des@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOEoLvu079216; Thu, 24 Nov 2016 14:50:21 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOEoLA5079215; Thu, 24 Nov 2016 14:50:21 GMT (envelope-from des@FreeBSD.org) Message-Id: <201611241450.uAOEoLA5079215@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: des set sender to des@FreeBSD.org using -f From: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= Date: Thu, 24 Nov 2016 14:50:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309109 - head/lib/libutil X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 14:50:22 -0000 Author: des Date: Thu Nov 24 14:50:21 2016 New Revision: 309109 URL: https://svnweb.freebsd.org/changeset/base/309109 Log: Add a warning against modifying this code without understanding it, and an example of how not to make it more portable. I've had this lying around uncommitted since 2009... Modified: head/lib/libutil/flopen.c Modified: head/lib/libutil/flopen.c ============================================================================== --- head/lib/libutil/flopen.c Thu Nov 24 14:48:46 2016 (r309108) +++ head/lib/libutil/flopen.c Thu Nov 24 14:50:21 2016 (r309109) @@ -1,5 +1,5 @@ /*- - * Copyright (c) 2007 Dag-Erling Coïdan Smørgrav + * Copyright (c) 2007-2009 Dag-Erling Coïdan Smørgrav * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -37,6 +37,14 @@ __FBSDID("$FreeBSD$"); #include +/* + * Reliably open and lock a file. + * + * DO NOT, UNDER PAIN OF DEATH, modify this code without first reading the + * revision history and discussing your changes with . + * Don't be fooled by the code's apparent simplicity; there would be no + * need for this function if it was as easy to get right as you think. + */ int flopen(const char *path, int flags, ...) { @@ -100,6 +108,14 @@ flopen(const char *path, int flags, ...) errno = serrno; return (-1); } +#ifdef DONT_EVEN_THINK_ABOUT_IT + if (fcntl(fd, F_SETFD, FD_CLOEXEC) != 0) { + serrno = errno; + (void)close(fd); + errno = serrno; + return (-1); + } +#endif return (fd); } } From owner-svn-src-head@freebsd.org Thu Nov 24 14:58:31 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 79B85C53ED3; Thu, 24 Nov 2016 14:58:31 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pg0-x236.google.com (mail-pg0-x236.google.com [IPv6:2607:f8b0:400e:c05::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 51F306B5; Thu, 24 Nov 2016 14:58:31 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pg0-x236.google.com with SMTP id p66so19434701pga.2; Thu, 24 Nov 2016 06:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=fi95XDY6N4KxvBTrQkyuHuTwKmpNwpiEa/LhaQe0Z6o=; b=pCm41soHnAGO+vJQwaoxijWQ8D4/QdD01cfKA1/Vtrd6ZN810udGl/c1VvbcebJQvp AasDXtzdJhJP7QaHLsHXOQONcl1hmnPU5a01mn7jwcfuFBpZbB+zv/ss+8+0z934WbBc LW9ld/P1AYK14JtRmOdkK8wXHMRtzBQaljseY/hWfTyKR8uwxkZ8aMCpXRke1kHsCV1t LSxDIdpJW7JP3Nakk+WhL6buZ2MyI8d1vnrscodEA/aGqlT3r5clkpTX5hBBM76vjf7Y pAWpwTZu94IFxciTbw1fv7f2TKZ9injguwT8NAZasZmuZvMCGxBVLeSK02DMSWM31PdY YeJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=fi95XDY6N4KxvBTrQkyuHuTwKmpNwpiEa/LhaQe0Z6o=; b=D4ogVLSgXHpvgMSKPGavHtmbZ3t1HIRd++2bVXuZxY5z41GA0bYCgy4V43PQaX0A0/ AMUvcHH4hUdpI7b1+3qtvjZ7RY0leF1lpsiQzcwG7k+xQDhSDH7QqvR6PV/5uSjpGMkd N+QIw7tpplyTgmFZUIA8NnGFKsNu5klnTIGpBWaMY0V1VFkfpc36tOykXfqVR6b+dpHV cNAO3VCQm6FXG3ZYDaGw7xlUKWHQbWNiohNvClqa6sG1f9+BlPRO36QXZ6QeTIVz6qIA /ERZw4BCVLV7NfvJio7UDdOm/1oQWiAMAv3Y0pNa/WufkXqimc3fzsyFU+VGnWTONBIn 4uNw== X-Gm-Message-State: AKaTC0115YuQaSzPum/czykd8VRi3bzjRHvyJhD8/PHmeyKeNo3YiBImHTiCqX7wCGHtNQ== X-Received: by 10.84.210.73 with SMTP id z67mr6344297plh.112.1479999510252; Thu, 24 Nov 2016 06:58:30 -0800 (PST) Received: from ?IPv6:2001:44b8:31ae:7b01:4432:31af:138c:5cd2? (2001-44b8-31ae-7b01-4432-31af-138c-5cd2.static.ipv6.internode.on.net. [2001:44b8:31ae:7b01:4432:31af:138c:5cd2]) by smtp.gmail.com with ESMTPSA id z62sm61133400pfz.19.2016.11.24.06.58.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 06:58:29 -0800 (PST) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r309109 - head/lib/libutil To: =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201611241450.uAOEoLA5079215@repo.freebsd.org> From: Kubilay Kocak Message-ID: Date: Fri, 25 Nov 2016 01:56:36 +1100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.0a2 MIME-Version: 1.0 In-Reply-To: <201611241450.uAOEoLA5079215@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-AU Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 14:58:31 -0000 On 25/11/2016 1:50 AM, Dag-Erling Smørgrav wrote: > +/* + * Reliably open and lock a file. + * + * DO NOT, UNDER PAIN OF > DEATH, modify this code without first reading the + * revision > history and discussing your changes with . + * Don't > be fooled by the code's apparent simplicity; there would be no + * > need for this function if it was as easy to get right as you think. + > */ This comes as close to obvious territoriality in FreeBSD as I've seen to date and it's especially disappointing to see coming from someone many look up to and consider a senior project developer. While we all may understand the frustration associated with people changing code they don't understand, I believe we need less fear associated with contributing to FreeBSD and that this is a big step in the wrong direction. Please choose a better way to resolve the perceived problem. -- Respectfully, ./koobs From owner-svn-src-head@freebsd.org Thu Nov 24 15:21:08 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D392CC5372E; Thu, 24 Nov 2016 15:21:08 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C73F7847; Thu, 24 Nov 2016 15:21:08 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id BCC701982; Thu, 24 Nov 2016 15:21:08 +0000 (UTC) Date: Thu, 24 Nov 2016 15:21:08 +0000 From: Alexey Dokuchaev To: Kubilay Kocak Cc: Dag-Erling Sm??rgrav , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309109 - head/lib/libutil Message-ID: <20161124152108.GA20603@FreeBSD.org> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 15:21:08 -0000 On Fri, Nov 25, 2016 at 01:56:36AM +1100, Kubilay Kocak wrote: > On 25/11/2016 1:50 AM, Dag-Erling Sm??rgrav wrote: > > +/* + * Reliably open and lock a file. + * + * DO NOT, UNDER PAIN OF > > DEATH, modify this code without first reading the + * revision > > history and discussing your changes with . + * Don't > > be fooled by the code's apparent simplicity; there would be no + * > > need for this function if it was as easy to get right as you think. + > > */ (Garbled quoting; please fix you MUA.) > This comes as close to obvious territoriality in FreeBSD as I've seen to > date and it's especially disappointing to see coming from someone many > look up to and consider a senior project developer. Apparently des@ was/is unhappy about unthought changes made to this code; what exactly makes his wish territorialiting and disappointing? > While we all may understand the frustration associated with people > changing code they don't understand, I believe we need less fear > associated with contributing to FreeBSD and that this is a big step in > the wrong direction. Dag-Erling's comment is perfectly fine; loud and clear. Those who want to contribute should read the prior history and ping des@; I don't see anything wrong with this (and given how reluctantly people are eager to do "svn blame" these days, I don't think this is uncalled). ./danfe From owner-svn-src-head@freebsd.org Thu Nov 24 15:27:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A0C53C5380D; Thu, 24 Nov 2016 15:27:33 +0000 (UTC) (envelope-from hps@selasky.org) 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 6D184BA8; Thu, 24 Nov 2016 15:27:33 +0000 (UTC) (envelope-from hps@selasky.org) Received: from hps2016.home.selasky.org (unknown [62.141.129.119]) (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 BB6B31FE024; Thu, 24 Nov 2016 16:27:30 +0100 (CET) Subject: [off-list] Re: svn commit: r309109 - head/lib/libutil To: koobs@FreeBSD.org, =?UTF-8?Q?Dag-Erling_Sm=c3=b8rgrav?= , svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201611241450.uAOEoLA5079215@repo.freebsd.org> From: Hans Petter Selasky Message-ID: <85e2980a-a244-5dcd-b5e3-2030bf462bc6@selasky.org> Date: Thu, 24 Nov 2016 16:27:14 +0100 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 15:27:33 -0000 On 11/24/16 15:56, Kubilay Kocak wrote: > On 25/11/2016 1:50 AM, Dag-Erling Smørgrav wrote: >> +/* + * Reliably open and lock a file. + * + * DO NOT, UNDER PAIN OF >> DEATH, modify this code without first reading the + * revision >> history and discussing your changes with . + * Don't >> be fooled by the code's apparent simplicity; there would be no + * >> need for this function if it was as easy to get right as you think. + >> */ > > This comes as close to obvious territoriality in FreeBSD as I've seen to > date and it's especially disappointing to see coming from someone many > look up to and consider a senior project developer. > > While we all may understand the frustration associated with people > changing code they don't understand, I believe we need less fear > associated with contributing to FreeBSD and that this is a big step in > the wrong direction. > > Please choose a better way to resolve the perceived problem. > > -- > Respectfully, > > ./koobs Hi Dag Erling, The type of text you are referring to is well known in religious circles. Why not refer to that instead of making your own version ;-) https://www.biblegateway.com/passage/?search=Revelation+22%3A18-19&version=KJV Revelation 22:18-19King James Version (KJV) 18 For I testify unto every man that heareth the words of the prophecy of this book, If any man shall add unto these things, God shall add unto him the plagues that are written in this book: 19 And if any man shall take away from the words of the book of this prophecy, God shall take away his part out of the book of life, and out of the holy city, and from the things which are written in this book. --HPS From owner-svn-src-head@freebsd.org Thu Nov 24 15:27:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7EDCAC5385D; Thu, 24 Nov 2016 15:27:54 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x22c.google.com (mail-yw0-x22c.google.com [IPv6:2607:f8b0:4002:c05::22c]) (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 3C8F7C14; Thu, 24 Nov 2016 15:27:54 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x22c.google.com with SMTP id i145so41834870ywg.2; Thu, 24 Nov 2016 07:27:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=v0G57otIuNcez8rAn4eC+/MOW+uDYQkx4NtxzeIZjAc=; b=FPOA8zeLYLaN1WQUg++VCUfdn8PNvA8u0tLXNtmLZ2ugL16l+3L5kej64MxPt0mKd9 TkMia4wU4omBgyu+4KJH+dJoKAQwySRE2lzmaDnUZDSTaT6Y9tztN08BFxN4RxPKnxcN sFYtdmmDXslctXV05kQKmhlCZexRBK60n9eNpg5OZrp6xPQV1iqZTFucUlGe9GcvVtT8 Z6wwsIaTTI3YWdPqV7zZ9l3sP8iJoXZfeg6xoQnP+uclXatpGQ2gI0UIbJdAgD/GDQSP p8c2SXjJfiCDE8CbxaxynufeobSY5FWLKH8nF5FtfRP3bzkWd9JwvBluIw9uhysfh0bS S5rg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=v0G57otIuNcez8rAn4eC+/MOW+uDYQkx4NtxzeIZjAc=; b=QA5prepVjqyT6H6jRFObqwUiZXq+Iq1yIj+sBs4nwMnZhfMLWEbE+soE4w/aG/bb9w 7nyJYwehup2rWzFaTTC2QCSIECBdgicd0ZGnkSom83ERULw1VL26WLvTzAjalm/0z7zz ccoaUwhSmC/RmrdEjrpDar3sKMEL7TEOCErFX2iO+MmRUkl/mZyjfM8IaqUrSZEnQbXZ ZCtXsFYOzKJlEbY8viwJVV9d+3UM9fjoC700m1lJMoeYmNhHbmoMuqrpdfRW2P7ACAXn bVXrm5agNFlKHh5iMVlGPwjZIDtaiViocqH9L2ywiFrFF9mI3csfHiib9cLLdnfokTGY zOSw== X-Gm-Message-State: AKaTC02Fm+SE+TPISLeTWJu1ldeK9yGpR2lx6r8MoojjWAjBgCaznODIOUz8d2TiScXuwtvD3JRdkwh80siWxQ== X-Received: by 10.13.237.67 with SMTP id w64mr4040833ywe.167.1480001273379; Thu, 24 Nov 2016 07:27:53 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.163.194 with HTTP; Thu, 24 Nov 2016 07:27:52 -0800 (PST) Received: by 10.129.163.194 with HTTP; Thu, 24 Nov 2016 07:27:52 -0800 (PST) Reply-To: araujo@freebsd.org In-Reply-To: <201611241450.uAOEoLA5079215@repo.freebsd.org> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> From: Marcelo Araujo Date: Thu, 24 Nov 2016 23:27:52 +0800 Message-ID: Subject: Re: svn commit: r309109 - head/lib/libutil To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 15:27:54 -0000 On Nov 24, 2016 10:50 PM, "Dag-Erling Sm=C3=B8rgrav" wrot= e: > > Author: des > Date: Thu Nov 24 14:50:21 2016 > New Revision: 309109 > URL: https://svnweb.freebsd.org/changeset/base/309109 > > Log: > Add a warning against modifying this code without understanding it, and > an example of how not to make it more portable. I've had this lying > around uncommitted since 2009... > > Modified: > head/lib/libutil/flopen.c > > Modified: head/lib/libutil/flopen.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/lib/libutil/flopen.c Thu Nov 24 14:48:46 2016 (r309108) > +++ head/lib/libutil/flopen.c Thu Nov 24 14:50:21 2016 (r309109) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2007 Dag-Erling Co=C3=AFdan Sm=C3=B8rgrav > + * Copyright (c) 2007-2009 Dag-Erling Co=C3=AFdan Sm=C3=B8rgrav > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -37,6 +37,14 @@ __FBSDID("$FreeBSD$"); > > #include > > +/* > + * Reliably open and lock a file. > + * > + * DO NOT, UNDER PAIN OF DEATH, modify this code without first reading the > + * revision history and discussing your changes with . > + * Don't be fooled by the code's apparent simplicity; there would be no > + * need for this function if it was as easy to get right as you think. > + */ > int > flopen(const char *path, int flags, ...) > { > @@ -100,6 +108,14 @@ flopen(const char *path, int flags, ...) > errno =3D serrno; > return (-1); > } > +#ifdef DONT_EVEN_THINK_ABOUT_IT > + if (fcntl(fd, F_SETFD, FD_CLOEXEC) !=3D 0) { > + serrno =3D errno; > + (void)close(fd); > + errno =3D serrno; > + return (-1); > + } > +#endif > return (fd); > } > } > Serious? We have code review, we have some many ways for communication, even revert a commit if needed. That is not how open source works, sad to say that for you twice this year. Please revert it, it is bad for the community and for FreeBSD. Everybody can read the svn history. Best, From owner-svn-src-head@freebsd.org Thu Nov 24 15:39:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 76942C53F71; Thu, 24 Nov 2016 15:39:35 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "freefall.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6448431; Thu, 24 Nov 2016 15:39:35 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: by freefall.freebsd.org (Postfix, from userid 1033) id 59F5D195F; Thu, 24 Nov 2016 15:39:35 +0000 (UTC) Date: Thu, 24 Nov 2016 15:39:35 +0000 From: Alexey Dokuchaev To: araujo@freebsd.org Cc: Dag-Erling Sm??rgrav , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r309109 - head/lib/libutil Message-ID: <20161124153935.GB20603@FreeBSD.org> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 15:39:35 -0000 On Thu, Nov 24, 2016 at 11:27:52PM +0800, Marcelo Araujo wrote: > We have code review, we have some many ways for communication, even revert > a commit if needed. Or we can ask people to think twice, so we won't have to revert bogus commits. > Please revert it, it is bad for the community and for FreeBSD. Everybody > can read the svn history. It is good for the community and for FreeBSD. Unfortunately, only a fraction of people that can read svn history are actually doing it. ./danfe From owner-svn-src-head@freebsd.org Thu Nov 24 15:40:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E821C53FEC; Thu, 24 Nov 2016 15:40:05 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 236D31EF; Thu, 24 Nov 2016 15:40:04 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id ED63C2CB; Thu, 24 Nov 2016 09:40:03 -0600 (CST) Date: Thu, 24 Nov 2016 09:40:02 -0600 From: Mark Linimon To: Alexey Dokuchaev Cc: Kubilay Kocak , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dag-Erling Sm??rgrav Subject: Re: svn commit: r309109 - head/lib/libutil Message-ID: <20161124154002.GB24019@lonesome.com> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <20161124152108.GA20603@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161124152108.GA20603@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 15:40:05 -0000 I thought the src/MAINTAINERS mechanism was designed for exactly this. mcl From owner-svn-src-head@freebsd.org Thu Nov 24 15:41:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3401AC53077; Thu, 24 Nov 2016 15:41:07 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from mail.soaustin.net (mail.soaustin.net [192.108.105.60]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.soaustin.net", Issuer "StartCom Class 2 IV Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1B6E263C; Thu, 24 Nov 2016 15:41:07 +0000 (UTC) (envelope-from linimon@lonesome.com) Received: from lonesome.com (bones.soaustin.net [192.108.105.22]) by mail.soaustin.net (Postfix) with ESMTPSA id 3BBE52CB; Thu, 24 Nov 2016 09:41:06 -0600 (CST) Date: Thu, 24 Nov 2016 09:41:05 -0600 From: Mark Linimon To: Alexey Dokuchaev Cc: araujo@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Dag-Erling Sm??rgrav Subject: Re: svn commit: r309109 - head/lib/libutil Message-ID: <20161124154105.GC24019@lonesome.com> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <20161124153935.GB20603@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161124153935.GB20603@FreeBSD.org> User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 15:41:07 -0000 On Thu, Nov 24, 2016 at 03:39:35PM +0000, Alexey Dokuchaev wrote: > It is good for the community and for FreeBSD. Only if we wish to forever remain a closed, cliquish, group of developers. mcl From owner-svn-src-head@freebsd.org Thu Nov 24 16:27:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A665DC53569; Thu, 24 Nov 2016 16:27:23 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 6FB4F1FA3; Thu, 24 Nov 2016 16:27:23 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id 8A2B6A375; Thu, 24 Nov 2016 16:27:16 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 780644E52; Thu, 24 Nov 2016 17:27:17 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Marcelo Araujo Cc: araujo@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r309109 - head/lib/libutil References: <201611241450.uAOEoLA5079215@repo.freebsd.org> Date: Thu, 24 Nov 2016 17:27:17 +0100 In-Reply-To: (Marcelo Araujo's message of "Thu, 24 Nov 2016 23:27:52 +0800") Message-ID: <861sy0n8re.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 16:27:23 -0000 Marcelo Araujo writes: > We have code review, we have some many ways for communication, even > revert a commit if needed. No. This is the kind of mistake where the code will seem to work just fine and end up in a release before a user suddenly discovers that they have two instances of the same daemon running and trashing their data. If I remember correctly, the last time someone touched flopen(), everything worked except 'service mountd reload' stopped working. > Everybody can read the svn history. Yeah, but they don't. And before you say MAINTAINERS, they don't read or respect that either. Believe me, I have years of experience cleaning up after unapproved, unreviewed commits to code I maintain. Conversely, another committer once reverted a commit they had reviewed and approved because they thought I hadn't committed it and hit 'y' blindly when patch told them it was already applied. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@freebsd.org Thu Nov 24 16:31:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2256EC53815; Thu, 24 Nov 2016 16:31:13 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: from mail-yw0-x22b.google.com (mail-yw0-x22b.google.com [IPv6:2607:f8b0:4002:c05::22b]) (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 D34F96BD; Thu, 24 Nov 2016 16:31:12 +0000 (UTC) (envelope-from araujobsdport@gmail.com) Received: by mail-yw0-x22b.google.com with SMTP id i145so43161905ywg.2; Thu, 24 Nov 2016 08:31:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:in-reply-to:references:from:date:message-id :subject:to:cc; bh=6VSGynMZguh+8LZXhzosnRlGAzeRFcS0Rc+L5gaelpE=; b=iQFdhDBJAQ/1I8FdpoBPokVFK7LoIE1IGEQ1Yjm6Ak4G6BsCUdDjeAQB56CHfHQQMP 9r/kKdYJO3AHck9kjadGRYkBmYwXk71OPQ5SSnEgg6fsp3QJ5pKzGHWEZ8Kwo4N4t2qn aehUjLpXxWmtAtW3uX7hF7DQ4ISTBvr3sBL1Pc4LzpRetbBy7kIY2HoWLWZrksLKckS9 hyfulc0myiVVIEjj8S+Q3AfaXseb6iO6gta5FQJVt7vClE1pAEO3pGCTjva3Tg7f8iif RDN8SlO1oKK3Lc5BCD80E6g+6p70pROK3MEENpIRzlaYXhVtuAIkuUSPiiO+wNcRj15w xsBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc; bh=6VSGynMZguh+8LZXhzosnRlGAzeRFcS0Rc+L5gaelpE=; b=JMejXsMVF0Hzoq8lc/dRcRy3SzFG9Gpd//0Ms4DT7sfsvBBZ5EH0gh7V/B3TJN9BK/ 4NlZgnWjp7t7D37Lw5MWJb1RAzxoYnEinmbO+i/WZkxhX/7VWPllHhSuu7fO1f4fNiW3 r0ySjD7YNtrGTnPYDwt1oFqa5wR2MURYOPT5hNxvYjcQWYg5532f3GL8JvTNlY2L6YFT NoHepaLeWomjzaqepYVgLbP2nwKhrqH02JpN8pM5Y9MDHodSPPQwx/QUt4WyF6WsbUJR Rme161RP46gtHgmNqQnqC8lUdOVuR7ak/1Hnr9mehePix+o783+jyzKo2SxJjyApU5jh i9Kw== X-Gm-Message-State: AKaTC02b1HCWwF/ozknSMKPTXavWA6Cj94ybI/6/XmHwn3VVvXy5ME4yPlV+7McacpMy1Pn6mBeFbsbbg6yHXg== X-Received: by 10.129.78.207 with SMTP id c198mr3903847ywb.295.1480005072069; Thu, 24 Nov 2016 08:31:12 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.163.194 with HTTP; Thu, 24 Nov 2016 08:31:11 -0800 (PST) Received: by 10.129.163.194 with HTTP; Thu, 24 Nov 2016 08:31:11 -0800 (PST) Reply-To: araujo@freebsd.org In-Reply-To: <861sy0n8re.fsf@desk.des.no> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <861sy0n8re.fsf@desk.des.no> From: Marcelo Araujo Date: Fri, 25 Nov 2016 00:31:11 +0800 Message-ID: Subject: Re: svn commit: r309109 - head/lib/libutil To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers@freebsd.org, svn-src-head@freebsd.org, araujo@freebsd.org, svn-src-all@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 16:31:13 -0000 On Nov 25, 2016 12:27 AM, "Dag-Erling Sm=C3=B8rgrav" wrote: > > Marcelo Araujo writes: > > We have code review, we have some many ways for communication, even > > revert a commit if needed. > > No. This is the kind of mistake where the code will seem to work just > fine and end up in a release before a user suddenly discovers that they > have two instances of the same daemon running and trashing their data. > If I remember correctly, the last time someone touched flopen(), > everything worked except 'service mountd reload' stopped working. > > > Everybody can read the svn history. > > Yeah, but they don't. And before you say MAINTAINERS, they don't read > or respect that either. Believe me, I have years of experience cleaning > up after unapproved, unreviewed commits to code I maintain. Conversely, > another committer once reverted a commit they had reviewed and approved > because they thought I hadn't committed it and hit 'y' blindly when > patch told them it was already applied. > > DES > -- > Dag-Erling Sm=C3=B8rgrav - des@des.no Ok, I understand your frustration, and I apologize about my previous email, but you are a developer that most of people respect in this community. You definitely has voice to solve it in a different way. Best, From owner-svn-src-head@freebsd.org Thu Nov 24 18:21:49 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 92706C537B0; Thu, 24 Nov 2016 18:21:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 623BDA51; Thu, 24 Nov 2016 18:21:49 +0000 (UTC) (envelope-from mjg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOILmdZ070486; Thu, 24 Nov 2016 18:21:48 GMT (envelope-from mjg@FreeBSD.org) Received: (from mjg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOILmlF070485; Thu, 24 Nov 2016 18:21:48 GMT (envelope-from mjg@FreeBSD.org) Message-Id: <201611241821.uAOILmlF070485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mjg set sender to mjg@FreeBSD.org using -f From: Mateusz Guzik Date: Thu, 24 Nov 2016 18:21:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309111 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 18:21:49 -0000 Author: mjg Date: Thu Nov 24 18:21:48 2016 New Revision: 309111 URL: https://svnweb.freebsd.org/changeset/base/309111 Log: wait: avoid relocking the child if proc_to_reap returns 1 proc_to_reap would always unlock. However, if it returned 1, kern_wait6 would immediately lock it again. Save the dance. Reviewed by: kib Modified: head/sys/kern/kern_exit.c Modified: head/sys/kern/kern_exit.c ============================================================================== --- head/sys/kern/kern_exit.c Thu Nov 24 17:07:15 2016 (r309110) +++ head/sys/kern/kern_exit.c Thu Nov 24 18:21:48 2016 (r309111) @@ -1061,7 +1061,6 @@ proc_to_reap(struct thread *td, struct p proc_reap(td, p, status, options); return (-1); } - PROC_UNLOCK(p); return (1); } @@ -1162,7 +1161,7 @@ loop: return (0); } - PROC_LOCK(p); + PROC_LOCK_ASSERT(p, MA_OWNED); PROC_SLOCK(p); if ((options & WTRAPPED) != 0 && @@ -1263,6 +1262,7 @@ loop: if (ret != 0) { KASSERT(ret != -1, ("reaped an orphan (pid %d)", (int)td->td_retval[0])); + PROC_UNLOCK(p); nfound++; break; } From owner-svn-src-head@freebsd.org Thu Nov 24 19:08:11 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AB2AC533B1; Thu, 24 Nov 2016 19:08:11 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 0C781E3; Thu, 24 Nov 2016 19:08:10 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id 62F8510A998; Thu, 24 Nov 2016 14:08:03 -0500 (EST) From: John Baldwin To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309109 - head/lib/libutil Date: Thu, 24 Nov 2016 11:06:04 -0800 Message-ID: <2600117.GH2pUSAs7N@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <201611241450.uAOEoLA5079215@repo.freebsd.org> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 24 Nov 2016 14:08:03 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:08:11 -0000 On Thursday, November 24, 2016 02:50:21 PM Dag-Erling Sm=F8rgrav wrote:= > Author: des > Date: Thu Nov 24 14:50:21 2016 > New Revision: 309109 > URL: https://svnweb.freebsd.org/changeset/base/309109 >=20 > Log: > Add a warning against modifying this code without understanding it,= and > an example of how not to make it more portable. I've had this lyin= g > around uncommitted since 2009... While I think the sentiment is correct, I would suggest adjusting the c= omment as some folks may not get the sarcasm on first blush. Even though it s= omewhat duplicates the revision log, I think it would be useful to expand the c= omment to list some of the "obvious" improvements to this function that actual= ly break it along with a brief explanation of the breakage each of these c= hanges cause. In particular, the code here doesn't explain why close-on-exec = would be bad, but a comment as I've described would. --=20 John Baldwin From owner-svn-src-head@freebsd.org Thu Nov 24 19:11:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 69913C535DD; Thu, 24 Nov 2016 19:11:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from mail.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) (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 4462067D; Thu, 24 Nov 2016 19:11:27 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from ralph.baldwin.cx (c-73-231-226-104.hsd1.ca.comcast.net [73.231.226.104]) by mail.baldwin.cx (Postfix) with ESMTPSA id B265810A998; Thu, 24 Nov 2016 14:11:26 -0500 (EST) From: John Baldwin To: Dag-Erling =?ISO-8859-1?Q?Sm=F8rgrav?= Cc: Marcelo Araujo , araujo@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r309109 - head/lib/libutil Date: Thu, 24 Nov 2016 11:11:21 -0800 Message-ID: <2094160.1ufjjsmd6m@ralph.baldwin.cx> User-Agent: KMail/4.14.10 (FreeBSD/11.0-PRERELEASE; KDE/4.14.10; amd64; ; ) In-Reply-To: <861sy0n8re.fsf@desk.des.no> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <861sy0n8re.fsf@desk.des.no> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="iso-8859-1" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (mail.baldwin.cx); Thu, 24 Nov 2016 14:11:26 -0500 (EST) X-Virus-Scanned: clamav-milter 0.99.2 at mail.baldwin.cx X-Virus-Status: Clean X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:11:28 -0000 On Thursday, November 24, 2016 05:27:17 PM Dag-Erling Sm=F8rgrav wrote:= > Marcelo Araujo writes: > > We have code review, we have some many ways for communication, even= > > revert a commit if needed. >=20 > No. This is the kind of mistake where the code will seem to work jus= t > fine and end up in a release before a user suddenly discovers that th= ey > have two instances of the same daemon running and trashing their data= . > If I remember correctly, the last time someone touched flopen(), > everything worked except 'service mountd reload' stopped working. Of course, there's only one person who has touched flopen: % svn log -q flopen.c | awk -F \| '/^r/ { print $2 }' | sort | uniq -c 12 des=20 Perhaps you were just warning yourself? :) --=20 John Baldwin From owner-svn-src-head@freebsd.org Thu Nov 24 19:35:57 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DCCCAC53E3F; Thu, 24 Nov 2016 19:35:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x22c.google.com (mail-io0-x22c.google.com [IPv6:2607:f8b0:4001:c06::22c]) (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 A6AD768; Thu, 24 Nov 2016 19:35:57 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x22c.google.com with SMTP id x94so93246974ioi.3; Thu, 24 Nov 2016 11:35: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:from:date:message-id :subject:to:cc; bh=4aGPH8x3sgvsw/XjyeiJCIvlxlCJ81+rFUJ9PsDb898=; b=bJLFpahSKsIJopnjAHk2+CpBfVCMJ3OIrETIB295FQSO0FhgG7zzPZBUF7JKuyUlfl qKK+EngPlPcZMYffNV7FTvCFJVTxN7P6So/i28FT6wXU6nzw1lwUsY23i3122Rb2WI0x jHuGVfB8hV9vxyLbDTSaRNka/RqGCv/NdZPi8iLm/vne2AfbD9XOlPc9GkDtuCDQooIT 5Uo0zrFuesT99q+5Bkp5YF/rWrpvj9T3PyjOl3ko7+qjx54Nrhe13gp824sOg4jGJ00o M3oVR+RR1nw9P0DajjVAApC8GQD0dHJ9uE0ZL4vhzx+85f6M+VFGE/otGJXe3UF6gLMn qfsQ== 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; bh=4aGPH8x3sgvsw/XjyeiJCIvlxlCJ81+rFUJ9PsDb898=; b=bEz8V5KCs22fV57il1ljZ6pofT4n/jeCE41KEzvmIIb4kvNs1WjO7lOHojO9duQDfw 3LD5qs4K2zFMkH/DEZi5kQJqoGahSCSrSdsr5J24bomKvchG1LDPb5aDxX2jWphUBfe9 0Vy0exiSSm4Y78EcQ2QdA2dzF6R0vLP4WRkUt+Bojt0iAOkN0jX8261+muXtWI2fmXHF xDchg9zacuAOwyeHybkm1UIMmVzYRHk0eS1Nu1zp0gL57FRFhw/runK5irZlGTWK21p3 x7sT4yjvw+vx7kyEe5QSaK8EoEJdiBGyL0YF1HF1mKqOJPDwa5Jbeyz8Tw9zU7G5J15X 9Afw== X-Gm-Message-State: AKaTC02SJb57t6Sw4mTsI+1BLuZQ6ImLCszbM7H8/2ZPa+tKhlEtoXESIdNxNCJVXqCnFZGCtKEhhxYdMGVbkQ== X-Received: by 10.36.212.66 with SMTP id x63mr3205828itg.14.1480016156947; Thu, 24 Nov 2016 11:35:56 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.212 with HTTP; Thu, 24 Nov 2016 11:35:36 -0800 (PST) In-Reply-To: <201611191746.uAJHkJQ8095246@repo.freebsd.org> References: <201611191746.uAJHkJQ8095246@repo.freebsd.org> From: Ed Maste Date: Thu, 24 Nov 2016 14:35:36 -0500 X-Google-Sender-Auth: sA_r8M25w-D5aMgi89RzFg755PM Message-ID: Subject: Re: svn commit: r308857 - in head: bin/dd sys/mips/conf sys/mips/ingenic To: Ruslan Bukin Cc: "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:35:58 -0000 On 19 November 2016 at 12:46, Ruslan Bukin wrote: > Author: br > Date: Sat Nov 19 17:46:18 2016 > New Revision: 308857 > URL: https://svnweb.freebsd.org/changeset/base/308857 > > Log: > Bring in support for Ingenic XBurst JZ4780 and > X1000 systems on chips. Hi Ruslan, "make tinderbox" is now failing with: /scratch/tmp/emaste/freebsd/sys/mips/ingenic/jz4780_machdep.c:273:2: error: #error "Non-static FDT not supported on JZ4780" From owner-svn-src-head@freebsd.org Thu Nov 24 19:39:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B79C53F66; Thu, 24 Nov 2016 19:39:37 +0000 (UTC) (envelope-from des@des.no) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 45CF429C; Thu, 24 Nov 2016 19:39:36 +0000 (UTC) (envelope-from des@des.no) Received: from desk.des.no (smtp.des.no [194.63.250.102]) by smtp.des.no (Postfix) with ESMTP id ADFEAA7C5; Thu, 24 Nov 2016 19:39:35 +0000 (UTC) Received: by desk.des.no (Postfix, from userid 1001) id 45A9B4E70; Thu, 24 Nov 2016 20:39:37 +0100 (CET) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: John Baldwin Cc: Marcelo Araujo , araujo@freebsd.org, src-committers@freebsd.org, svn-src-head@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r309109 - head/lib/libutil References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <861sy0n8re.fsf@desk.des.no> <2094160.1ufjjsmd6m@ralph.baldwin.cx> Date: Thu, 24 Nov 2016 20:39:37 +0100 In-Reply-To: <2094160.1ufjjsmd6m@ralph.baldwin.cx> (John Baldwin's message of "Thu, 24 Nov 2016 11:11:21 -0800") Message-ID: <86vavc3bwm.fsf@desk.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:39:37 -0000 John Baldwin writes: > Of course, there's only one person who has touched flopen [...] > Perhaps you were just warning yourself? :) Precisely. If memory serves, I wrote that comment after receiving a patch from someone who made the same mistake that I had already made and reverted *twice*. It's the logical, sane thing to do: replace a BSD primitive with the equivalent POSIX primitive, except the latter has subtly different semantics and works in some of flopen(3)'s typical use cases, but not all, and crucially, not in the pidfile(3) case. I just remembered that I wrote a unit test for flopen(3). So maybe the comment is redundant... if you assume that people build and run the tests, and I'm willing to bet that they don't, because our test framework is not very developer-friendly. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no From owner-svn-src-head@freebsd.org Thu Nov 24 19:42:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 780D3C54102; Thu, 24 Nov 2016 19:42:38 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 42486966; Thu, 24 Nov 2016 19:42:38 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x242.google.com with SMTP id r94so6353074ioe.1; Thu, 24 Nov 2016 11:42:38 -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; bh=uwywtCnO39oBtCiqaIPCUhwqcwjHnLEE2FSiGHBYWSU=; b=kt3xFK/ZP1hOsZKw7+EEo1NXVZqW2Efoww8/BgoWPjXx6UKgvAWbZ/caDdt+OxB/2/ yYroXCifWM/cP3xAj115bwgr2sDWGDXhS4z0jr9PgURdLZHCXgL0LkIm7sBlCE2za3js VdvriwaNH5yUrseaFfHxEId8elVdBlngBBxnbB+QNrN/3v/QfXbsT+/d/lFnXqr19NsM b5zvg7sKTSXza87/NZa+DNVcP8YJw2Q+9Cd4+5wsL9ZTxfsnzUJ2X4x+o4YSOLQNvVGs O3/DwOur36vrpUGSzAVAbxCSbSUANkvDe1FzE4jT5fnreDhQbAihZiRNIZVZg99/z2KT c4eA== 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; bh=uwywtCnO39oBtCiqaIPCUhwqcwjHnLEE2FSiGHBYWSU=; b=AdpakncJI7eo4FeB9I/kNa96o0N1iL6ev20idTYBww9VPwlE6gbTot7DUKDNUp35w6 wdZtxQdlVygI++GXt7QGGWlAGB5fKZDFH5kANVDklddkBBLri7ihP0aXmH7j7WbXUuGP 0X7xJXN0vKgvQpALXrYFtEATmD4j+z3fWmdHTMVz1T44wh06n5r1+nBFaXjDAenoTrwU vudjHn7pAsbLZC/R6g00O3JtZveBvXNfSxUx+vYCTSyZ5do5KUPrhPuoxGvNRtINZ9Qp +8ibwvK9iZc66KWhz0qbMbweQiL37s9tEjYO9jQh9UnDEw3c/6fhIjW/C8AZslnPh19y UI6w== X-Gm-Message-State: AKaTC02BnlMBx9EWkXbQAKu/fxjLda0G6GnQYY3W/bh8+UhlK/sDPUsPb1SBJhWCoKr+Vlo8Lj7/FTNbrLpgBw== X-Received: by 10.36.33.151 with SMTP id e145mr3279737ita.14.1480016557552; Thu, 24 Nov 2016 11:42:37 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.212 with HTTP; Thu, 24 Nov 2016 11:42:16 -0800 (PST) In-Reply-To: <201610270946.u9R9kMc0010656@repo.freebsd.org> References: <201610270946.u9R9kMc0010656@repo.freebsd.org> From: Ed Maste Date: Thu, 24 Nov 2016 14:42:16 -0500 X-Google-Sender-Auth: pHRRiaNinDBFdE8Rc82O5FeBaMg Message-ID: Subject: Re: svn commit: r308000 - in head/sys: dev/netmap net To: Luigi Rizzo Cc: "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:42:38 -0000 On 27 October 2016 at 05:46, Luigi Rizzo wrote: > Author: luigi > Date: Thu Oct 27 09:46:22 2016 > New Revision: 308000 > URL: https://svnweb.freebsd.org/changeset/base/308000 > > Log: > Various fixes for ptnet/ptnetmap (passthrough of netmap ports). In detail: > - use PCI_VENDOR and PCI_DEVICE ids from a publicly allocated range > (thanks to RedHat) > - export memory pool information through PCI registers > - improve mechanism for configuring passthrough on different hypervisors > Code is from Vincenzo Maffione as a follow up to his GSOC work. ... > @@ -1099,7 +1090,7 @@ nm_kthread_worker(void *data) > continue; > } else if (nmk->run) { > /* wait on event with one second timeout */ > - msleep_spin(ctx->ioevent_file, &nmk->worker_lock, > + msleep_spin((void *)ctx->cfg.wchan, &nmk->worker_lock, > "nmk_ev", hz); > nmk->scheduled++; > } Hi Luigi, This breaks "make tinderbox" in powerpc LINT with: /scratch/tmp/emaste/freebsd/sys/dev/netmap/netmap_freebsd.c: In function 'nm_os_kthread_wakeup_worker': /scratch/tmp/emaste/freebsd/sys/dev/netmap/netmap_freebsd.c:1027: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] /scratch/tmp/emaste/freebsd/sys/dev/netmap/netmap_freebsd.c: In function 'nm_kthread_worker': /scratch/tmp/emaste/freebsd/sys/dev/netmap/netmap_freebsd.c:1093: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] *** [netmap_freebsd.o] Error code 1 From owner-svn-src-head@freebsd.org Thu Nov 24 19:46:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D41A2C541B6; Thu, 24 Nov 2016 19:46:29 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 9E458B3C; Thu, 24 Nov 2016 19:46:29 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x242.google.com with SMTP id h133so6392215ioe.2; Thu, 24 Nov 2016 11:46:29 -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; bh=zRsSDWwdU4bI99AtKNXXcUXdMdd8jRnSc4FrqZRzp8g=; b=P5yBALr6jb79VarTL6k2mKmajdM+VTejyK8lu2/QbnMYt8oC6qpSZNkdgEitkHixkl 9IaJeimqMUy8wW5Xy3SebHelJURX9n6IrYH70cvRSoZ6XIldivvSzqZB+9OjC/FLD9l+ 0y9imxUP3i2NHG42i895KbmlEDpUM3R78qvQRneNIrjholDX9wO703QsXxG8jR7JuIVG JLtBd9cvJICaNnqDRZ2ACT9IxQdW2rXbKKAHr6nb9kRd2pd26kgyfv+7/nNjEZd4TMkT 4xqWGwjZl4Bj+ObtSfsJgzKQESbd7vFfEWPloXkcA/kTkCJ4nflkOEe3XeSoZfpSFhIA WWfQ== 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; bh=zRsSDWwdU4bI99AtKNXXcUXdMdd8jRnSc4FrqZRzp8g=; b=eLm9m1WNNlkRCgyx1SMi1f1rNSRTiKOcseC4MwMOL1O74RZXYo6urPoZliPpDJT/ld D6y1EbQ5dHB4R+SyEwi+RuvJaxg3ArgP6QRtlNO3CLQl348kdjgfjaQuxqbE1Q2bWwJP FdhlS9jh+15BtbXlMYwNlKlH1pekkiiv3ZgBMn2uwIPLQx9rd72HZvoQ3bqdfMpPlwTR al9P7eptapDxrRm5jpCOkjRMI2hEHKNfCiRPtHr0o0e+627yf+83pyPpC9c8ZsqgIcY2 YUf2EC4aDPNDlomUiyQ2UgkJSsZhbbaIQ2UcvwlEDzTLi6h0pY2wVDtSxV6BEs3rbOGc AUbQ== X-Gm-Message-State: AKaTC02FJFZqfS7yRle9VbjlvVrc32f5Gq/TWezThRSIT5KZx13/FV+3EgMCPTqR0e4g3i6bco4ShKZ07aDr3w== X-Received: by 10.107.19.164 with SMTP id 36mr3590620iot.155.1480016788897; Thu, 24 Nov 2016 11:46:28 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.212 with HTTP; Thu, 24 Nov 2016 11:46:08 -0800 (PST) In-Reply-To: <201611211947.uALJlbDd022690@repo.freebsd.org> References: <201611211947.uALJlbDd022690@repo.freebsd.org> From: Ed Maste Date: Thu, 24 Nov 2016 14:46:08 -0500 X-Google-Sender-Auth: kiTOriAJ6tMyzuBtAgkTz2W4gW4 Message-ID: Subject: Re: svn commit: r308942 - in head/sys/modules: . bytgpio To: Oleksandr Tymoshenko Cc: "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 19:46:29 -0000 On 21 November 2016 at 14:47, Oleksandr Tymoshenko wrote: > Author: gonzo > Date: Mon Nov 21 19:47:37 2016 > New Revision: 308942 > URL: https://svnweb.freebsd.org/changeset/base/308942 > > Log: > [bytgpio] Add module for bytgpio(4) It looks like this breaks tinderbox for PC98: In file included from /scratch/tmp/emaste/freebsd/sys/modules/bytgpio/../../dev/gpio/bytgpio.c:43: In file included from /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/acpi.h:56: In file included from /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acenv.h:194: /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acfreebsd.h:72:10: fatal error: 'machine/acpica_machdep.h' file not found #include ^ 1 error generated. *** [bytgpio.o] Error code 1 From owner-svn-src-head@freebsd.org Thu Nov 24 20:00:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C7F7C54488; Thu, 24 Nov 2016 20:00:50 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: from mail-oi0-x233.google.com (mail-oi0-x233.google.com [IPv6:2607:f8b0:4003:c06::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 4320CDF; Thu, 24 Nov 2016 20:00:50 +0000 (UTC) (envelope-from bjkfbsd@gmail.com) Received: by mail-oi0-x233.google.com with SMTP id w63so61021381oiw.0; Thu, 24 Nov 2016 12:00:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=lqVKipGUzhAy9dbp41d6SykaA0StDFI6nYwcFu2L9L4=; b=G6TzfcUBuWI4FrOQESdiQqSIzfxS/0B11jKO04MdGedH7fTgNzlvVSbdDULfxes0uL anWOlC+pVeTFzGtazKnet+sULMd9Ad/EW1F8WVtEcQMDn7EZ3ZPeLrUXfcCpTJVVhJbo 41DdRcEh663iExjCiGU49TQfJEGUzdvNk0owt78U2bpOmol0WAA4f8CKFEphxkVOS5fS eiWn+YO9xu6TWrXOThQ7YE1JhVW8iEGDgXsjdnF4ycKECxbSC+HAkNGLlVX2jIhE0tY0 /rNvOuOB8K1Ib/mPr3sYaHQmsI7Hf+oQBvaLbxVYbu73Tnp9Iysd2/QfLe/v2lwNZy9R 65QQ== 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:from:date :message-id:subject:to:cc; bh=lqVKipGUzhAy9dbp41d6SykaA0StDFI6nYwcFu2L9L4=; b=l1Ir/59u19SIHgKgRlRTg0g22vu6VIjvJ+JwShUmnc6LDYiCOsq5dcxuXcx/AQMPxc nEF1v+XaF05Z2ZcijPemThf1J3ucWV7EvEOihiqE7y117NrcEq72yxTxn/hOAQ8ynTtI TiIL9+MpNuJE7Ph7xKo3TUV94ZJHzllCxJ3MJUUSruWQbYzGssh/fhEYIzIqyr0TP4BW DyDJvChbjiCgte6qforYiBN6lysi/OIlyw+w7F+0tAUdlKPt+cL0t2NrNHSzGe7m8k2n XB31O9kb2Fo6PQJjajfnDu+jrXCB7Z0PMkdYAKODJgwsF2QVTBaLbXHRbVzm6IxfbrO1 1+9w== X-Gm-Message-State: AKaTC00T7phJx7eBLdjYzSi1n1o87doG3VKDDaqlGxBGd7XI/CQW8jTc+KMWCZCuieQTJrpm9K4fDg6pIPRh1w== X-Received: by 10.157.56.188 with SMTP id p57mr2282281otc.94.1480017649633; Thu, 24 Nov 2016 12:00:49 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.61.69 with HTTP; Thu, 24 Nov 2016 12:00:49 -0800 (PST) In-Reply-To: <86vavc3bwm.fsf@desk.des.no> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <861sy0n8re.fsf@desk.des.no> <2094160.1ufjjsmd6m@ralph.baldwin.cx> <86vavc3bwm.fsf@desk.des.no> From: Benjamin Kaduk Date: Thu, 24 Nov 2016 14:00:49 -0600 Message-ID: Subject: Re: svn commit: r309109 - head/lib/libutil To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:00:50 -0000 I'm happy to have a comment noting the extreme subtleties in play and calling you out as the domain expert to contact. However, I don't think that the "UNDER PAIN OF DEATH" is appropriate, even jocularly; there are other ways to express the needed sentiment that do not cause one to think about the code of conduct. -Ben From owner-svn-src-head@freebsd.org Thu Nov 24 20:07:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8F4EDC54651; Thu, 24 Nov 2016 20:07:46 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: from mail-io0-x242.google.com (mail-io0-x242.google.com [IPv6:2607:f8b0:4001:c06::242]) (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 56C847E7; Thu, 24 Nov 2016 20:07:46 +0000 (UTC) (envelope-from chmeeedalf@gmail.com) Received: by mail-io0-x242.google.com with SMTP id j92so6465283ioi.0; Thu, 24 Nov 2016 12:07:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=cc:message-id:from:to:in-reply-to:content-transfer-encoding :mime-version:subject:date:references; bh=kSGQaKQRVWi3eGrBg+9iGHBdWNV+B19LOf5OE+7DcKw=; b=K8puatnNnWfyIABR+QvPt0/VFfsVbKJsgvNRw+W+VVAelfCqKchuNyusSeWedppHMa IAz8RiVeA5D5NUnHCMP/OvzwtAavabtj/AQkT17dJN7o7nhmp7185sGvsPTNkdg0yIaP exZrCOyKlZpzOQ2uxBjdQtV1XnqfpdJK0qIs+aMfSFDlyIVCw2rvBnoFOlvzL0XI2zvx 8ayofi9MHmYqXf6/K6vqAFSf/6n//lXmWzROutG7HcBKVrgsA/7aCahDKqPfUupvyn/Y Z9srv4ntUsJKRo+b5fhnZs54Kq16drJps1lkiYNVIerZ09OmJ+xZeF/6xxjBM1VevV3M 9A4A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:cc:message-id:from:to:in-reply-to :content-transfer-encoding:mime-version:subject:date:references; bh=kSGQaKQRVWi3eGrBg+9iGHBdWNV+B19LOf5OE+7DcKw=; b=Zw+Leq6YTpqM6z9RFkoWl+wMZMtpIwO+A/SY4Ld9w6cgk6mekckpdY7Csl8BtMnVSV bQaFwnuFCZLe1hAqB1ZvbzMqy54mPLV9HSf0/b5LbRJx2/vk3NKhBGJpnocoFWXq4Yp/ e11xiHc69/4E+FQXVC9tiez31fNFr99ZI/vuXssit6GvF0pWf3R6pvu7MRLp5ApZ/dXp qhhjpZj6gt2/aWsot/WALuGz0bCvdH81p8pRLR11vyGmTE0qdxcNhQIlpU1HxfmcqVDj GfEriGrmjDz/WqJGW90jkeNTi9E2Vq/AFCOLMSzWFKezx2XEX60l/xHxZuGSybeebSuw fb2w== X-Gm-Message-State: AKaTC01JIP+YrQ1kXXT7N+7v0vbsIq8ePjsiP6wN5o+DjupPA/bDHvnkdvRDSXMIjdRo9g== X-Received: by 10.36.6.76 with SMTP id 73mr3623196itv.0.1480018065532; Thu, 24 Nov 2016 12:07:45 -0800 (PST) Received: from blackstar.knownspace (50-80-150-234.client.mchsi.com. [50.80.150.234]) by smtp.gmail.com with ESMTPSA id w143sm3283166itc.0.2016.11.24.12.07.44 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 24 Nov 2016 12:07:45 -0800 (PST) Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: <762C1A8D-D1A5-486E-AC52-969AE1F2F45A@gmail.com> From: Justin Hibbits To: Alan Cox In-Reply-To: <201611221813.uAMIDkHQ071392@repo.freebsd.org> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Subject: Re: svn commit: r309017 - in head/sys: cddl/compat/opensolaris/sys compat/linprocfs fs/tmpfs sys vm Date: Thu, 24 Nov 2016 14:07:43 -0600 References: <201611221813.uAMIDkHQ071392@repo.freebsd.org> X-Mailer: Apple Mail (2.936) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:07:46 -0000 On Nov 22, 2016, at 12:13 PM, Alan Cox wrote: > Author: alc > Date: Tue Nov 22 18:13:46 2016 > New Revision: 309017 > URL: https://svnweb.freebsd.org/changeset/base/309017 > > Log: > Remove PG_CACHED-related fields from struct vmmeter, because they > are no > longer used. More precisely, they are always zero because the code > that > decremented and incremented them no longer exists. > > Bump __FreeBSD_version to mark this change. > > Reviewed by: kib, markj > Sponsored by: Dell EMC Isilon > Differential Revision: https://reviews.freebsd.org/D8583 > > Modified: > head/sys/cddl/compat/opensolaris/sys/kmem.h > head/sys/compat/linprocfs/linprocfs.c > head/sys/fs/tmpfs/tmpfs_subr.c > head/sys/sys/param.h > head/sys/sys/vmmeter.h > head/sys/vm/swap_pager.c > head/sys/vm/vm_meter.c > head/sys/vm/vm_page.c > head/sys/vm/vnode_pager.c > > Modified: head/sys/sys/vmmeter.h > = > = > = > = > = > = > = > = > ====================================================================== > --- head/sys/sys/vmmeter.h Tue Nov 22 18:13:04 2016 (r309016) > +++ head/sys/sys/vmmeter.h Tue Nov 22 18:13:46 2016 (r309017) > @@ -80,7 +80,6 @@ struct vmmeter { > u_int v_pdpages; /* (p) pages analyzed by daemon */ > u_int v_pdshortfalls; /* (p) page reclamation shortfalls */ > > - u_int v_tcached; /* (p) total pages cached */ > u_int v_dfree; /* (p) pages freed by daemon */ > u_int v_pfree; /* (p) pages freed by exiting processes */ > u_int v_tfree; /* (p) total pages freed */ > @@ -98,7 +97,6 @@ struct vmmeter { > u_int v_inactive_target; /* (c) pages desired inactive */ > u_int v_inactive_count; /* (q) pages inactive */ > u_int v_laundry_count; /* (q) pages eligible for laundering */ > - u_int v_cache_count; /* (f) pages on cache queue */ > u_int v_pageout_free_min; /* (c) min pages reserved for kernel */ > u_int v_interrupt_free_min; /* (c) reserved pages for int code */ > u_int v_free_severe; /* (c) severe page depletion point */ Removing these fields cause build failures, at least with MPC85XX/ MPC85XXSPE (see make universe), because it ends up changing the size of struct pcpu. - Justin From owner-svn-src-head@freebsd.org Thu Nov 24 20:08:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D1ACCC546D3; Thu, 24 Nov 2016 20:08:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A173F96C; Thu, 24 Nov 2016 20:08:18 +0000 (UTC) (envelope-from gonzo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOK8HdX011410; Thu, 24 Nov 2016 20:08:17 GMT (envelope-from gonzo@FreeBSD.org) Received: (from gonzo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOK8H8E011409; Thu, 24 Nov 2016 20:08:17 GMT (envelope-from gonzo@FreeBSD.org) Message-Id: <201611242008.uAOK8H8E011409@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: gonzo set sender to gonzo@FreeBSD.org using -f From: Oleksandr Tymoshenko Date: Thu, 24 Nov 2016 20:08:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309112 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:08:18 -0000 Author: gonzo Date: Thu Nov 24 20:08:17 2016 New Revision: 309112 URL: https://svnweb.freebsd.org/changeset/base/309112 Log: [bytgpio] Fix pc98 build by disabling bytgpio module for this platform Reported by: dim Modified: head/sys/modules/Makefile Modified: head/sys/modules/Makefile ============================================================================== --- head/sys/modules/Makefile Thu Nov 24 18:21:48 2016 (r309111) +++ head/sys/modules/Makefile Thu Nov 24 20:08:17 2016 (r309112) @@ -552,7 +552,6 @@ _an= an _aout= aout _bktr= bktr _bxe= bxe -_bytgpio= bytgpio _cardbus= cardbus _cbb= cbb _cpuctl= cpuctl @@ -609,6 +608,7 @@ _amdsbwd= amdsbwd _amdtemp= amdtemp _arcmsr= arcmsr _asmc= asmc +_bytgpio= bytgpio _ciss= ciss _chromebook_platform= chromebook_platform _cmx= cmx From owner-svn-src-head@freebsd.org Thu Nov 24 20:14:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C34FC54880; Thu, 24 Nov 2016 20:14:45 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF55FD9B; Thu, 24 Nov 2016 20:14:44 +0000 (UTC) (envelope-from loos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOKEi0w015340; Thu, 24 Nov 2016 20:14:44 GMT (envelope-from loos@FreeBSD.org) Received: (from loos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOKEhT9015336; Thu, 24 Nov 2016 20:14:43 GMT (envelope-from loos@FreeBSD.org) Message-Id: <201611242014.uAOKEhT9015336@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: loos set sender to loos@FreeBSD.org using -f From: Luiz Otavio O Souza Date: Thu, 24 Nov 2016 20:14:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309113 - in head/sys: arm/ti/cpsw conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:14:45 -0000 Author: loos Date: Thu Nov 24 20:14:43 2016 New Revision: 309113 URL: https://svnweb.freebsd.org/changeset/base/309113 Log: Add the etherswitch(4) support for TI CPSW. Adds VLAN and port management abilities for etherswitchcfg(8). The code is conditionally enabled for now, because it is not necessary on single ethernet use cases. Obtained from: pfSense MFC after: 2 weeks Sponsored by: Rubicon Communications, LLC (Netgate) Modified: head/sys/arm/ti/cpsw/if_cpsw.c head/sys/arm/ti/cpsw/if_cpswreg.h head/sys/arm/ti/cpsw/if_cpswvar.h head/sys/conf/options.arm Modified: head/sys/arm/ti/cpsw/if_cpsw.c ============================================================================== --- head/sys/arm/ti/cpsw/if_cpsw.c Thu Nov 24 20:08:17 2016 (r309112) +++ head/sys/arm/ti/cpsw/if_cpsw.c Thu Nov 24 20:14:43 2016 (r309113) @@ -47,6 +47,8 @@ #include __FBSDID("$FreeBSD$"); +#include "opt_cpsw.h" + #include #include #include @@ -78,6 +80,11 @@ __FBSDID("$FreeBSD$"); #include #include + +#ifdef CPSW_ETHERSWITCH +#include +#include "etherswitch_if.h" +#endif #include "if_cpswreg.h" #include "if_cpswvar.h" @@ -142,6 +149,19 @@ static void cpsw_add_sysctls(struct cpsw static void cpsw_stats_collect(struct cpsw_softc *); static int cpsw_stats_sysctl(SYSCTL_HANDLER_ARGS); +#ifdef CPSW_ETHERSWITCH +static etherswitch_info_t *cpsw_getinfo(device_t); +static int cpsw_getport(device_t, etherswitch_port_t *); +static int cpsw_setport(device_t, etherswitch_port_t *); +static int cpsw_getconf(device_t, etherswitch_conf_t *); +static int cpsw_getvgroup(device_t, etherswitch_vlangroup_t *); +static int cpsw_setvgroup(device_t, etherswitch_vlangroup_t *); +static int cpsw_readreg(device_t, int); +static int cpsw_writereg(device_t, int, int); +static int cpsw_readphy(device_t, int, int); +static int cpsw_writephy(device_t, int, int, int); +#endif + /* * Arbitrary limit on number of segments in an mbuf to be transmitted. * Packets with more segments than this will be defragmented before @@ -158,8 +178,23 @@ static device_method_t cpsw_methods[] = DEVMETHOD(device_shutdown, cpsw_shutdown), DEVMETHOD(device_suspend, cpsw_suspend), DEVMETHOD(device_resume, cpsw_resume), + /* Bus interface */ + DEVMETHOD(bus_add_child, device_add_child_ordered), /* OFW methods */ DEVMETHOD(ofw_bus_get_node, cpsw_get_node), +#ifdef CPSW_ETHERSWITCH + /* etherswitch interface */ + DEVMETHOD(etherswitch_getinfo, cpsw_getinfo), + DEVMETHOD(etherswitch_readreg, cpsw_readreg), + DEVMETHOD(etherswitch_writereg, cpsw_writereg), + DEVMETHOD(etherswitch_readphyreg, cpsw_readphy), + DEVMETHOD(etherswitch_writephyreg, cpsw_writephy), + DEVMETHOD(etherswitch_getport, cpsw_getport), + DEVMETHOD(etherswitch_setport, cpsw_setport), + DEVMETHOD(etherswitch_getvgroup, cpsw_getvgroup), + DEVMETHOD(etherswitch_setvgroup, cpsw_setvgroup), + DEVMETHOD(etherswitch_getconf, cpsw_getconf), +#endif DEVMETHOD_END }; @@ -194,11 +229,20 @@ static driver_t cpswp_driver = { static devclass_t cpswp_devclass; +#ifdef CPSW_ETHERSWITCH +DRIVER_MODULE(etherswitch, cpswss, etherswitch_driver, etherswitch_devclass, 0, 0); +MODULE_DEPEND(cpswss, etherswitch, 1, 1, 1); +#endif + DRIVER_MODULE(cpsw, cpswss, cpswp_driver, cpswp_devclass, 0, 0); DRIVER_MODULE(miibus, cpsw, miibus_driver, miibus_devclass, 0, 0); MODULE_DEPEND(cpsw, ether, 1, 1, 1); MODULE_DEPEND(cpsw, miibus, 1, 1, 1); +#ifdef CPSW_ETHERSWITCH +static struct cpsw_vlangroups cpsw_vgroups[CPSW_VLANS]; +#endif + static uint32_t slave_mdio_addr[] = { 0x4a100200, 0x4a100300 }; static struct resource_spec irq_res_spec[] = { @@ -576,7 +620,8 @@ cpsw_init(struct cpsw_softc *sc) cpsw_write_4(sc, CPSW_PORT_P0_CPDMA_RX_CH_MAP, 0); /* Initialize ALE: set host port to forwarding(3). */ - cpsw_write_4(sc, CPSW_ALE_PORTCTL(0), 3); + cpsw_write_4(sc, CPSW_ALE_PORTCTL(0), + ALE_PORTCTL_INGRESS | ALE_PORTCTL_FORWARD); cpsw_write_4(sc, CPSW_SS_PTYPE, 0); @@ -851,6 +896,11 @@ cpsw_attach(device_t dev) return (ENXIO); } +#ifdef CPSW_ETHERSWITCH + for (i = 0; i < CPSW_VLANS; i++) + cpsw_vgroups[i].vid = -1; +#endif + /* Reset the controller. */ cpsw_reset(sc); cpsw_init(sc); @@ -864,6 +914,7 @@ cpsw_attach(device_t dev) return (ENXIO); } } + bus_generic_probe(dev); bus_generic_attach(dev); return (0); @@ -918,7 +969,12 @@ cpsw_detach(device_t dev) mtx_destroy(&sc->rx.lock); mtx_destroy(&sc->tx.lock); - return (0); + /* Detach the switch device, if present. */ + error = bus_generic_detach(dev); + if (error != 0) + return (error); + + return (device_delete_children(dev)); } static phandle_t @@ -1085,6 +1141,9 @@ cpswp_init(void *arg) static void cpswp_init_locked(void *arg) { +#ifdef CPSW_ETHERSWITCH + int i; +#endif struct cpswp_softc *sc = arg; struct ifnet *ifp; uint32_t reg; @@ -1115,8 +1174,9 @@ cpswp_init_locked(void *arg) reg |= CPSW_SL_MACTL_GMII_ENABLE; cpsw_write_4(sc->swsc, CPSW_SL_MACCONTROL(sc->unit), reg); - /* Initialize ALE: set port to forwarding(3), initialize addrs */ - cpsw_write_4(sc->swsc, CPSW_ALE_PORTCTL(sc->unit + 1), 3); + /* Initialize ALE: set port to forwarding, initialize addrs */ + cpsw_write_4(sc->swsc, CPSW_ALE_PORTCTL(sc->unit + 1), + ALE_PORTCTL_INGRESS | ALE_PORTCTL_FORWARD); cpswp_ale_update_addresses(sc, 1); if (sc->swsc->dualemac) { @@ -1127,6 +1187,14 @@ cpswp_init_locked(void *arg) (1 << (sc->unit + 1)) | (1 << 0), /* Member list */ (1 << (sc->unit + 1)) | (1 << 0), /* Untagged egress */ (1 << (sc->unit + 1)) | (1 << 0), 0); /* mcast reg flood */ +#ifdef CPSW_ETHERSWITCH + for (i = 0; i < CPSW_VLANS; i++) { + if (cpsw_vgroups[i].vid != -1) + continue; + cpsw_vgroups[i].vid = sc->vlan; + break; + } +#endif } mii_mediachg(sc->mii); @@ -2699,3 +2767,229 @@ cpsw_add_sysctls(struct cpsw_softc *sc) CTLFLAG_RD, NULL, "Watchdog Statistics"); cpsw_add_watchdog_sysctls(ctx, node, sc); } + +#ifdef CPSW_ETHERSWITCH +static etherswitch_info_t etherswitch_info = { + .es_nports = CPSW_PORTS + 1, + .es_nvlangroups = CPSW_VLANS, + .es_name = "TI Common Platform Ethernet Switch (CPSW)", + .es_vlan_caps = ETHERSWITCH_VLAN_DOT1Q, +}; + +static etherswitch_info_t * +cpsw_getinfo(device_t dev) +{ + return (ðerswitch_info); +} + +static int +cpsw_getport(device_t dev, etherswitch_port_t *p) +{ + int err; + struct cpsw_softc *sc; + struct cpswp_softc *psc; + struct ifmediareq *ifmr; + uint32_t reg; + + if (p->es_port < 0 || p->es_port > CPSW_PORTS) + return (ENXIO); + + err = 0; + sc = device_get_softc(dev); + if (p->es_port == CPSW_CPU_PORT) { + p->es_flags |= ETHERSWITCH_PORT_CPU; + ifmr = &p->es_ifmr; + ifmr->ifm_current = ifmr->ifm_active = + IFM_ETHER | IFM_1000_T | IFM_FDX; + ifmr->ifm_mask = 0; + ifmr->ifm_status = IFM_ACTIVE | IFM_AVALID; + ifmr->ifm_count = 0; + } else { + psc = device_get_softc(sc->port[p->es_port - 1].dev); + err = ifmedia_ioctl(psc->ifp, &p->es_ifr, + &psc->mii->mii_media, SIOCGIFMEDIA); + } + reg = cpsw_read_4(sc, CPSW_PORT_P_VLAN(p->es_port)); + p->es_pvid = reg & ETHERSWITCH_VID_MASK; + + reg = cpsw_read_4(sc, CPSW_ALE_PORTCTL(p->es_port)); + if (reg & ALE_PORTCTL_DROP_UNTAGGED) + p->es_flags |= ETHERSWITCH_PORT_DROPUNTAGGED; + if (reg & ALE_PORTCTL_INGRESS) + p->es_flags |= ETHERSWITCH_PORT_INGRESS; + + return (err); +} + +static int +cpsw_setport(device_t dev, etherswitch_port_t *p) +{ + struct cpsw_softc *sc; + struct cpswp_softc *psc; + struct ifmedia *ifm; + uint32_t reg; + + if (p->es_port < 0 || p->es_port > CPSW_PORTS) + return (ENXIO); + + sc = device_get_softc(dev); + if (p->es_pvid != 0) { + cpsw_write_4(sc, CPSW_PORT_P_VLAN(p->es_port), + p->es_pvid & ETHERSWITCH_VID_MASK); + } + + reg = cpsw_read_4(sc, CPSW_ALE_PORTCTL(p->es_port)); + if (p->es_flags & ETHERSWITCH_PORT_DROPUNTAGGED) + reg |= ALE_PORTCTL_DROP_UNTAGGED; + else + reg &= ~ALE_PORTCTL_DROP_UNTAGGED; + if (p->es_flags & ETHERSWITCH_PORT_INGRESS) + reg |= ALE_PORTCTL_INGRESS; + else + reg &= ~ALE_PORTCTL_INGRESS; + cpsw_write_4(sc, CPSW_ALE_PORTCTL(p->es_port), reg); + + /* CPU port does not allow media settings. */ + if (p->es_port == CPSW_CPU_PORT) + return (0); + + psc = device_get_softc(sc->port[p->es_port - 1].dev); + ifm = &psc->mii->mii_media; + + return (ifmedia_ioctl(psc->ifp, &p->es_ifr, ifm, SIOCSIFMEDIA)); +} + +static int +cpsw_getconf(device_t dev, etherswitch_conf_t *conf) +{ + + /* Return the VLAN mode. */ + conf->cmd = ETHERSWITCH_CONF_VLAN_MODE; + conf->vlan_mode = ETHERSWITCH_VLAN_DOT1Q; + + return (0); +} + +static int +cpsw_getvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + int i, vid; + uint32_t ale_entry[3]; + struct cpsw_softc *sc; + + sc = device_get_softc(dev); + + if (vg->es_vlangroup >= CPSW_VLANS) + return (EINVAL); + + vg->es_vid = 0; + vid = cpsw_vgroups[vg->es_vlangroup].vid; + if (vid == -1) + return (0); + + for (i = 0; i < CPSW_MAX_ALE_ENTRIES; i++) { + cpsw_ale_read_entry(sc, i, ale_entry); + if (ALE_TYPE(ale_entry) != ALE_TYPE_VLAN) + continue; + if (vid != ALE_VLAN(ale_entry)) + continue; + + vg->es_fid = 0; + vg->es_vid = ALE_VLAN(ale_entry) | ETHERSWITCH_VID_VALID; + vg->es_member_ports = ALE_VLAN_MEMBERS(ale_entry); + vg->es_untagged_ports = ALE_VLAN_UNTAG(ale_entry); + } + + return (0); +} + +static void +cpsw_remove_vlan(struct cpsw_softc *sc, int vlan) +{ + int i; + uint32_t ale_entry[3]; + + for (i = 0; i < CPSW_MAX_ALE_ENTRIES; i++) { + cpsw_ale_read_entry(sc, i, ale_entry); + if (ALE_TYPE(ale_entry) != ALE_TYPE_VLAN) + continue; + if (vlan != ALE_VLAN(ale_entry)) + continue; + ale_entry[0] = ale_entry[1] = ale_entry[2] = 0; + cpsw_ale_write_entry(sc, i, ale_entry); + break; + } +} + +static int +cpsw_setvgroup(device_t dev, etherswitch_vlangroup_t *vg) +{ + int i; + struct cpsw_softc *sc; + + sc = device_get_softc(dev); + + for (i = 0; i < CPSW_VLANS; i++) { + /* Is this Vlan ID in use by another vlangroup ? */ + if (vg->es_vlangroup != i && cpsw_vgroups[i].vid == vg->es_vid) + return (EINVAL); + } + + if (vg->es_vid == 0) { + if (cpsw_vgroups[vg->es_vlangroup].vid == -1) + return (0); + cpsw_remove_vlan(sc, cpsw_vgroups[vg->es_vlangroup].vid); + cpsw_vgroups[vg->es_vlangroup].vid = -1; + vg->es_untagged_ports = 0; + vg->es_member_ports = 0; + vg->es_vid = 0; + return (0); + } + + vg->es_vid &= ETHERSWITCH_VID_MASK; + vg->es_member_ports &= CPSW_PORTS_MASK; + vg->es_untagged_ports &= CPSW_PORTS_MASK; + + if (cpsw_vgroups[vg->es_vlangroup].vid != -1 && + cpsw_vgroups[vg->es_vlangroup].vid != vg->es_vid) + return (EINVAL); + + cpsw_vgroups[vg->es_vlangroup].vid = vg->es_vid; + cpsw_ale_update_vlan_table(sc, vg->es_vid, vg->es_member_ports, + vg->es_untagged_ports, vg->es_member_ports, 0); + + return (0); +} + +static int +cpsw_readreg(device_t dev, int addr) +{ + + /* Not supported. */ + return (0); +} + +static int +cpsw_writereg(device_t dev, int addr, int value) +{ + + /* Not supported. */ + return (0); +} + +static int +cpsw_readphy(device_t dev, int phy, int reg) +{ + + /* Not supported. */ + return (0); +} + +static int +cpsw_writephy(device_t dev, int phy, int reg, int data) +{ + + /* Not supported. */ + return (0); +} +#endif Modified: head/sys/arm/ti/cpsw/if_cpswreg.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswreg.h Thu Nov 24 20:08:17 2016 (r309112) +++ head/sys/arm/ti/cpsw/if_cpswreg.h Thu Nov 24 20:14:43 2016 (r309113) @@ -106,6 +106,14 @@ #define ALE_VLAN_UNTAG(_a) ((_a[0] >> 24) & 7) #define ALE_VLAN_MEMBERS(_a) (_a[0] & 7) #define CPSW_ALE_PORTCTL(p) (CPSW_ALE_OFFSET + 0x40 + ((p) * 0x04)) +#define ALE_PORTCTL_NO_SA_UPDATE (1 << 5) +#define ALE_PORTCTL_NO_LEARN (1 << 4) +#define ALE_PORTCTL_INGRESS (1 << 3) +#define ALE_PORTCTL_DROP_UNTAGGED (1 << 2) +#define ALE_PORTCTL_FORWARD 3 +#define ALE_PORTCTL_LEARN 2 +#define ALE_PORTCTL_BLOCKED 1 +#define ALE_PORTCTL_DISABLED 0 /* SL1 is at 0x0D80, SL2 is at 0x0DC0 */ #define CPSW_SL_OFFSET 0x0D80 Modified: head/sys/arm/ti/cpsw/if_cpswvar.h ============================================================================== --- head/sys/arm/ti/cpsw/if_cpswvar.h Thu Nov 24 20:08:17 2016 (r309112) +++ head/sys/arm/ti/cpsw/if_cpswvar.h Thu Nov 24 20:14:43 2016 (r309113) @@ -40,6 +40,16 @@ #define CPSW_SYSCTL_COUNT 34 +#ifdef CPSW_ETHERSWITCH +#define CPSW_CPU_PORT 0 +#define CPSW_PORTS_MASK 0x7 +#define CPSW_VLANS 128 /* Arbitrary number. */ + +struct cpsw_vlangroups { + int vid; +}; +#endif + struct cpsw_slot { uint32_t bd_offset; /* Offset of corresponding BD within CPPI RAM. */ bus_dmamap_t dmamap; Modified: head/sys/conf/options.arm ============================================================================== --- head/sys/conf/options.arm Thu Nov 24 20:08:17 2016 (r309112) +++ head/sys/conf/options.arm Thu Nov 24 20:14:43 2016 (r309113) @@ -7,6 +7,7 @@ ARM_MANY_BOARD opt_global.h NKPT2PG opt_pmap.h ARM_WANT_TP_ADDRESS opt_global.h COUNTS_PER_SEC opt_timer.h +CPSW_ETHERSWITCH opt_cpsw.h CPU_ARM9 opt_global.h CPU_ARM9E opt_global.h CPU_ARM1176 opt_global.h From owner-svn-src-head@freebsd.org Thu Nov 24 20:30:56 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2E3A3C54E0C; Thu, 24 Nov 2016 20:30:56 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: from mail-io0-f180.google.com (mail-io0-f180.google.com [209.85.223.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 01D20677; Thu, 24 Nov 2016 20:30:55 +0000 (UTC) (envelope-from cse.cem@gmail.com) Received: by mail-io0-f180.google.com with SMTP id x94so94951186ioi.3; Thu, 24 Nov 2016 12:30: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:mime-version:reply-to:in-reply-to:references :from:date:message-id:subject:to:cc:content-transfer-encoding; bh=rh6Wz68ZKqpb8rkxRW7aE3FviScZGvCMpQttkSAIr2A=; b=kZgIBNhWWz4qRiwxl1W43b34DjUkz2whsmpX3r85YB4n5fnXj9PjUyQulLEjCC0XWx JDurtVNpajRGtW8QKT1CKS6lFTX0/5yKz0mlDOOA5gawYYd52HChtsK207+5XF2S+3tC HEveI5y8Pn8H5PqfUBYiHqo3y9Xy+Oz4Yi4w49n1GvdVqUpRQBKVGOyHp3VzAMnf1MDY +ZVuKNaoeAxLA2Vj32S0X1pbRgaptQAQzk4VwMweYqntuGYhXTHoKSvkxxvF1SIhLDcD XqTuoKzEJxHgYGOAiwal45rz3SO4R+tF611Gv9cZKMstzDG4EpmWiqY0N0eSkNYb9Ycg a8hg== X-Gm-Message-State: AKaTC015JCQmtnTlasKM0hTaLstTwGaiaUKqPTga0H5KTVYGPw2u/KZA55Nmsg6uMGs/ZQ== X-Received: by 10.36.190.6 with SMTP id i6mr3464492itf.37.1480016053137; Thu, 24 Nov 2016 11:34:13 -0800 (PST) Received: from mail-io0-f176.google.com (mail-io0-f176.google.com. [209.85.223.176]) by smtp.gmail.com with ESMTPSA id f142sm13881252iof.44.2016.11.24.11.34.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 11:34:12 -0800 (PST) Received: by mail-io0-f176.google.com with SMTP id a124so93144088ioe.2; Thu, 24 Nov 2016 11:34:12 -0800 (PST) X-Received: by 10.107.16.170 with SMTP id 42mr3442509ioq.93.1480016052569; Thu, 24 Nov 2016 11:34:12 -0800 (PST) MIME-Version: 1.0 Reply-To: cem@freebsd.org Received: by 10.36.109.68 with HTTP; Thu, 24 Nov 2016 11:34:12 -0800 (PST) In-Reply-To: <201611241450.uAOEoLA5079215@repo.freebsd.org> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> From: Conrad Meyer Date: Thu, 24 Nov 2016 11:34:12 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: svn commit: r309109 - head/lib/libutil To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:30:56 -0000 This kind of language isn't really appropriate. Please revert the commit immediately. When you've had time to think of an appropriate way to word comments to the same effect, please commit that separately. Thanks, Conrad On Thu, Nov 24, 2016 at 6:50 AM, Dag-Erling Sm=C3=B8rgrav = wrote: > Author: des > Date: Thu Nov 24 14:50:21 2016 > New Revision: 309109 > URL: https://svnweb.freebsd.org/changeset/base/309109 > > Log: > Add a warning against modifying this code without understanding it, and > an example of how not to make it more portable. I've had this lying > around uncommitted since 2009... > > Modified: > head/lib/libutil/flopen.c > > Modified: head/lib/libutil/flopen.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/lib/libutil/flopen.c Thu Nov 24 14:48:46 2016 (r309108) > +++ head/lib/libutil/flopen.c Thu Nov 24 14:50:21 2016 (r309109) > @@ -1,5 +1,5 @@ > /*- > - * Copyright (c) 2007 Dag-Erling Co=C3=AFdan Sm=C3=B8rgrav > + * Copyright (c) 2007-2009 Dag-Erling Co=C3=AFdan Sm=C3=B8rgrav > * All rights reserved. > * > * Redistribution and use in source and binary forms, with or without > @@ -37,6 +37,14 @@ __FBSDID("$FreeBSD$"); > > #include > > +/* > + * Reliably open and lock a file. > + * > + * DO NOT, UNDER PAIN OF DEATH, modify this code without first reading t= he > + * revision history and discussing your changes with . > + * Don't be fooled by the code's apparent simplicity; there would be no > + * need for this function if it was as easy to get right as you think. > + */ > int > flopen(const char *path, int flags, ...) > { > @@ -100,6 +108,14 @@ flopen(const char *path, int flags, ...) > errno =3D serrno; > return (-1); > } > +#ifdef DONT_EVEN_THINK_ABOUT_IT > + if (fcntl(fd, F_SETFD, FD_CLOEXEC) !=3D 0) { > + serrno =3D errno; > + (void)close(fd); > + errno =3D serrno; > + return (-1); > + } > +#endif > return (fd); > } > } > From owner-svn-src-head@freebsd.org Thu Nov 24 20:31:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C7493C54E83; Thu, 24 Nov 2016 20:31:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 96BDA8EE; Thu, 24 Nov 2016 20:31:47 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOKVk8k022518; Thu, 24 Nov 2016 20:31:46 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOKVkhW022517; Thu, 24 Nov 2016 20:31:46 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201611242031.uAOKVkhW022517@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Thu, 24 Nov 2016 20:31:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309114 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:31:47 -0000 Author: jhibbits Date: Thu Nov 24 20:31:46 2016 New Revision: 309114 URL: https://svnweb.freebsd.org/changeset/base/309114 Log: Fix the build post-r309017 for MPC85XX/MPC85XXSPE r309017 removed two fields from struct vmmeter, which is embedded in struct pcpu. This caused the struct size to change, triggering the CTASSERT in sys/pcpu.h. Add the extra 8 bytes back in as padding. Modified: head/sys/powerpc/include/pcpu.h Modified: head/sys/powerpc/include/pcpu.h ============================================================================== --- head/sys/powerpc/include/pcpu.h Thu Nov 24 20:14:43 2016 (r309113) +++ head/sys/powerpc/include/pcpu.h Thu Nov 24 20:31:46 2016 (r309114) @@ -88,7 +88,7 @@ struct pvo_entry; vm_offset_t pc_qmap_addr; \ uint32_t *pc_booke_tlb_lock; \ int pc_tid_next; \ - char __pad[165] + char __pad[173] /* Definitions for register offsets within the exception tmp save areas */ #define CPUSAVE_R27 0 /* where r27 gets saved */ From owner-svn-src-head@freebsd.org Thu Nov 24 20:33:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A3D51C54F10; Thu, 24 Nov 2016 20:33:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pg0-x22a.google.com (mail-pg0-x22a.google.com [IPv6:2607:f8b0:400e:c05::22a]) (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 73A0CC12; Thu, 24 Nov 2016 20:33:14 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pg0-x22a.google.com with SMTP id f188so21456927pgc.3; Thu, 24 Nov 2016 12:33:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BYoh1GcXSJOzYlpZXRAB+R10g5CvoiDCV+NO2giuZkk=; b=TlQzTmmlX5xJtxGAF3j0V9gKOD7kUbfJNU2vfYM+jHbgJa9FfNT7fep42X4wjpdK57 IDh6kaaaaMga33FjaISPCEHVElCMr1Ety1IZEEO5k1uDWIAUPuGkRABlm/D5I4oSONq+ U8L6lyNkaoRatkkDzMkOSnkwpSUdigkF5xTq0vbcWzy9YN8HV/HFq0QOXnn6KqJYtOUu lIsgsTIxXqKqsyCK1JE6X/U1E67CucPas8FcExgbYSxgTlTaCP5EykLxGilpufIlLGh+ 6z64z1MboIUbb7QV5iQOLKKfwhbef6Wx9/FlL4lKfkE9qrVvCNmA72DF+QvCRFRgUlw8 yy6A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=BYoh1GcXSJOzYlpZXRAB+R10g5CvoiDCV+NO2giuZkk=; b=QxytqMZIyDQUOFT6cy0fIVcpek+Cxa40N+rDbaj5OnTkZuv8LrA9O92WSJxDKuWE7F mqp49Wl8NIjyp8eVZmeLr/e+0Q6UJS3g3T2SkDsxOtKNW1w5TPb/bjfXaDd+f5kRMKLD 5fFiN7Bq7uvkBnyiRkRjEhz9meqgajv+n+RerOTAxFu/oeO9qOlcd7rAwQ1MNrrlrOcX 8E9R6pyPoDO3nJBqRrYqIeSq46vb3iBYB40AVkNm0HCMZjhnXiRpMU63k70xcli1AYjn Lc5M4/FDvcfG03bh8lDw7beVcBVKubhSQ5Ash+EXY9ZZcrgVo2dJVe2NFutP3ftF4nM5 Zeqw== X-Gm-Message-State: AKaTC01G2EY3/8vg75/08ZlaofXl8X+LsSoP1eae78CcX92DOM4xMslrCj/BXNunNmQW+w== X-Received: by 10.98.59.82 with SMTP id i79mr4062637pfa.147.1480019593586; Thu, 24 Nov 2016 12:33:13 -0800 (PST) Received: from fuji-wireless.local (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id 72sm58975976pfw.37.2016.11.24.12.33.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Nov 2016 12:33:12 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r309109 - head/lib/libutil From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <2600117.GH2pUSAs7N@ralph.baldwin.cx> Date: Thu, 24 Nov 2016 12:33:11 -0800 Cc: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <2600117.GH2pUSAs7N@ralph.baldwin.cx> To: John Baldwin X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 20:33:14 -0000 > On Nov 24, 2016, at 11:06 AM, John Baldwin wrote: >=20 > On Thursday, November 24, 2016 02:50:21 PM Dag-Erling Sm=C3=B8rgrav = wrote: >> Author: des >> Date: Thu Nov 24 14:50:21 2016 >> New Revision: 309109 >> URL: https://svnweb.freebsd.org/changeset/base/309109 >>=20 >> Log: >> Add a warning against modifying this code without understanding it, = and >> an example of how not to make it more portable. I've had this lying >> around uncommitted since 2009... >=20 > While I think the sentiment is correct, I would suggest adjusting the = comment > as some folks may not get the sarcasm on first blush. Even though it = somewhat > duplicates the revision log, I think it would be useful to expand the = comment > to list some of the "obvious" improvements to this function that = actually > break it along with a brief explanation of the breakage each of these = changes > cause. In particular, the code here doesn't explain why close-on-exec = would > be bad, but a comment as I've described would. +1 I think this is probably the most constructive comment on this thread = and it echoes my sentiments. Thanks, -Ngie= From owner-svn-src-head@freebsd.org Thu Nov 24 21:12:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1DC77C53C58; Thu, 24 Nov 2016 21:12:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DEEF587A; Thu, 24 Nov 2016 21:12:33 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOLCXnr039739; Thu, 24 Nov 2016 21:12:33 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOLCX2f039738; Thu, 24 Nov 2016 21:12:33 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611242112.uAOLCX2f039738@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 21:12:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309116 - head/sys/dev/virtio/console X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 21:12:34 -0000 Author: avg Date: Thu Nov 24 21:12:32 2016 New Revision: 309116 URL: https://svnweb.freebsd.org/changeset/base/309116 Log: virtio_console: correctly determine presense of payload and its length MFC after: 2 weeks Modified: head/sys/dev/virtio/console/virtio_console.c Modified: head/sys/dev/virtio/console/virtio_console.c ============================================================================== --- head/sys/dev/virtio/console/virtio_console.c Thu Nov 24 21:01:25 2016 (r309115) +++ head/sys/dev/virtio/console/virtio_console.c Thu Nov 24 21:12:32 2016 (r309116) @@ -888,9 +888,9 @@ vtcon_ctrl_task_cb(void *xsc, int pendin if (control == NULL) break; - if (len > sizeof(control)) { + if (len > sizeof(*control)) { payload = (void *)(control + 1); - plen = len - sizeof(control); + plen = len - sizeof(*control); } VTCON_UNLOCK(sc); From owner-svn-src-head@freebsd.org Thu Nov 24 21:32:05 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B64FFC5438E; Thu, 24 Nov 2016 21:32:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 860D78D4; Thu, 24 Nov 2016 21:32:05 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOLW4ib044548; Thu, 24 Nov 2016 21:32:04 GMT (envelope-from avg@FreeBSD.org) Received: (from avg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOLW4Pr044547; Thu, 24 Nov 2016 21:32:04 GMT (envelope-from avg@FreeBSD.org) Message-Id: <201611242132.uAOLW4Pr044547@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avg set sender to avg@FreeBSD.org using -f From: Andriy Gapon Date: Thu, 24 Nov 2016 21:32:04 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309119 - head/sys/dev/virtio/pci X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 21:32:05 -0000 Author: avg Date: Thu Nov 24 21:32:04 2016 New Revision: 309119 URL: https://svnweb.freebsd.org/changeset/base/309119 Log: virtio_pci: fix announcement of MSI-X interrupts for queues Queues that do not need interrupts - for instance, output queues - do not have a corresponding entry in vtpci_msix_vq_interrupts. So, it was wrong to increment a pointer into that array when iterating over such a queue. I ran into this bug while trying to use virtio_console(4) that allocates a lot of queues with every other being an output queue without an interrupt handler (if MultiplePorts feature is negotiated). MFC after: 2 weeks Modified: head/sys/dev/virtio/pci/virtio_pci.c Modified: head/sys/dev/virtio/pci/virtio_pci.c ============================================================================== --- head/sys/dev/virtio/pci/virtio_pci.c Thu Nov 24 21:14:22 2016 (r309118) +++ head/sys/dev/virtio/pci/virtio_pci.c Thu Nov 24 21:32:04 2016 (r309119) @@ -1087,7 +1087,8 @@ vtpci_set_host_msix_vectors(struct vtpci * For shared MSIX, all the virtqueues share the first * interrupt. */ - if ((sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) == 0) + if (!sc->vtpci_vqs[idx].vtv_no_intr && + (sc->vtpci_flags & VTPCI_FLAG_SHARED_MSIX) == 0) intr++; } From owner-svn-src-head@freebsd.org Thu Nov 24 21:53:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82BA7C54A9F; Thu, 24 Nov 2016 21:53:43 +0000 (UTC) (envelope-from jceel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 385B71719; Thu, 24 Nov 2016 21:53:43 +0000 (UTC) (envelope-from jceel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOLrgoI057268; Thu, 24 Nov 2016 21:53:42 GMT (envelope-from jceel@FreeBSD.org) Received: (from jceel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOLrgfI057267; Thu, 24 Nov 2016 21:53:42 GMT (envelope-from jceel@FreeBSD.org) Message-Id: <201611242153.uAOLrgfI057267@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jceel set sender to jceel@FreeBSD.org using -f From: Jakub Wojciech Klama Date: Thu, 24 Nov 2016 21:53:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309120 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 21:53:43 -0000 Author: jceel Date: Thu Nov 24 21:53:42 2016 New Revision: 309120 URL: https://svnweb.freebsd.org/changeset/base/309120 Log: Allow opening virtio-console ports from the host side before guest enumerates them. Approved by: trasz Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/pci_virtio_console.c Modified: head/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_console.c Thu Nov 24 21:32:04 2016 (r309119) +++ head/usr.sbin/bhyve/pci_virtio_console.c Thu Nov 24 21:53:42 2016 (r309120) @@ -90,6 +90,7 @@ struct pci_vtcon_port { bool vsp_enabled; bool vsp_console; bool vsp_rx_ready; + bool vsp_open; int vsp_rxq; int vsp_txq; void * vsp_arg; @@ -116,6 +117,7 @@ struct pci_vtcon_softc { char * vsc_rootdir; int vsc_kq; int vsc_nports; + bool vsc_ready; struct pci_vtcon_port vsc_control_port; struct pci_vtcon_port vsc_ports[VTCON_MAXPORTS]; struct pci_vtcon_config *vsc_config; @@ -359,6 +361,7 @@ pci_vtcon_sock_accept(int fd __unused, e sock->vss_open = true; sock->vss_conn_fd = s; sock->vss_conn_evp = mevent_add(s, EVF_READ, pci_vtcon_sock_rx, sock); + pci_vtcon_open_port(sock->vss_port, true); } @@ -454,11 +457,15 @@ pci_vtcon_control_tx(struct pci_vtcon_po switch (ctrl->event) { case VTCON_DEVICE_READY: + sc->vsc_ready = true; /* set port ready events for registered ports */ for (i = 0; i < VTCON_MAXPORTS; i++) { tmp = &sc->vsc_ports[i]; if (tmp->vsp_enabled) pci_vtcon_announce_port(tmp); + + if (tmp->vsp_open) + pci_vtcon_open_port(tmp, true); } break; @@ -500,6 +507,11 @@ pci_vtcon_open_port(struct pci_vtcon_por { struct pci_vtcon_control event; + if (!port->vsp_sc->vsc_ready) { + port->vsp_open = true; + return; + } + event.id = port->vsp_id; event.event = VTCON_PORT_OPEN; event.value = (int)open; From owner-svn-src-head@freebsd.org Thu Nov 24 22:16:19 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 88143C54EAC; Thu, 24 Nov 2016 22:16:19 +0000 (UTC) (envelope-from jceel@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 50A151FAC; Thu, 24 Nov 2016 22:16:19 +0000 (UTC) (envelope-from jceel@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOMGIqV065704; Thu, 24 Nov 2016 22:16:18 GMT (envelope-from jceel@FreeBSD.org) Received: (from jceel@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOMGIi0065703; Thu, 24 Nov 2016 22:16:18 GMT (envelope-from jceel@FreeBSD.org) Message-Id: <201611242216.uAOMGIi0065703@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jceel set sender to jceel@FreeBSD.org using -f From: Jakub Wojciech Klama Date: Thu, 24 Nov 2016 22:16:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309121 - head/usr.sbin/bhyve X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 22:16:19 -0000 Author: jceel Date: Thu Nov 24 22:16:18 2016 New Revision: 309121 URL: https://svnweb.freebsd.org/changeset/base/309121 Log: virtio_console: handle short writes to an Unix domain socket gracefully. writev() can do a short write. Retrying it results in a very convoluted and complex code, so we iterate over iovec and do regular stream_write() instead. Approved by: trasz Sponsored by: iXsystems, Inc. Modified: head/usr.sbin/bhyve/pci_virtio_console.c Modified: head/usr.sbin/bhyve/pci_virtio_console.c ============================================================================== --- head/usr.sbin/bhyve/pci_virtio_console.c Thu Nov 24 21:53:42 2016 (r309120) +++ head/usr.sbin/bhyve/pci_virtio_console.c Thu Nov 24 22:16:18 2016 (r309121) @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); #include "pci_emul.h" #include "virtio.h" #include "mevent.h" +#include "sockstream.h" #define VTCON_RINGSZ 64 #define VTCON_MAXPORTS 16 @@ -425,16 +426,21 @@ pci_vtcon_sock_tx(struct pci_vtcon_port int niov) { struct pci_vtcon_sock *sock; - int ret; + int i, ret; sock = (struct pci_vtcon_sock *)arg; if (sock->vss_conn_fd == -1) return; - ret = writev(sock->vss_conn_fd, iov, niov); + for (i = 0; i < niov; i++) { + ret = stream_write(sock->vss_conn_fd, iov[i].iov_base, + iov[i].iov_len); + if (ret <= 0) + break; + } - if (ret < 0 && errno != EWOULDBLOCK) { + if (ret <= 0) { mevent_delete_close(sock->vss_conn_evp); sock->vss_conn_fd = -1; sock->vss_open = false; From owner-svn-src-head@freebsd.org Thu Nov 24 22:24:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7528DC5408D for ; Thu, 24 Nov 2016 22:24:06 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound1a.eu.mailhop.org (outbound1a.eu.mailhop.org [52.58.109.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 15C687EF for ; Thu, 24 Nov 2016 22:24:05 +0000 (UTC) (envelope-from ian@freebsd.org) X-MHO-User: b54d83f4-b294-11e6-b17f-19517aec265d X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 73.78.92.27 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [73.78.92.27]) by outbound1.eu.mailhop.org (Halon) with ESMTPSA id b54d83f4-b294-11e6-b17f-19517aec265d; Thu, 24 Nov 2016 22:24:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id uAOMNqqV007031; Thu, 24 Nov 2016 15:23:52 -0700 (MST) (envelope-from ian@freebsd.org) Message-ID: <1480026232.1889.63.camel@freebsd.org> Subject: Re: svn commit: r309121 - head/usr.sbin/bhyve From: Ian Lepore To: Jakub Wojciech Klama , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Thu, 24 Nov 2016 15:23:52 -0700 In-Reply-To: <201611242216.uAOMGIi0065703@repo.freebsd.org> References: <201611242216.uAOMGIi0065703@repo.freebsd.org> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.18.5.1 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 22:24:06 -0000 On Thu, 2016-11-24 at 22:16 +0000, Jakub Wojciech Klama wrote: > Author: jceel > Date: Thu Nov 24 22:16:18 2016 > New Revision: 309121 > URL: https://svnweb.freebsd.org/changeset/base/309121 > > Log: >   virtio_console: handle short writes to an Unix domain socket > gracefully. >    >   writev() can do a short write.  Retrying it results in a very > convoluted >   and complex code, so we iterate over iovec and do regular > stream_write() >   instead. >    Doesn't pwritev(2) simplify iterating to handle short writes? -- Ian >   Approved by: trasz >   Sponsored by: iXsystems, Inc. > > Modified: >   head/usr.sbin/bhyve/pci_virtio_console.c > > Modified: head/usr.sbin/bhyve/pci_virtio_console.c > ===================================================================== > ========= > --- head/usr.sbin/bhyve/pci_virtio_console.c Thu Nov 24 > 21:53:42 2016 (r309120) > +++ head/usr.sbin/bhyve/pci_virtio_console.c Thu Nov 24 > 22:16:18 2016 (r309121) > @@ -53,6 +53,7 @@ __FBSDID("$FreeBSD$"); >  #include "pci_emul.h" >  #include "virtio.h" >  #include "mevent.h" > +#include "sockstream.h" >   >  #define VTCON_RINGSZ 64 >  #define VTCON_MAXPORTS 16 > @@ -425,16 +426,21 @@ pci_vtcon_sock_tx(struct pci_vtcon_port  >      int niov) >  { >   struct pci_vtcon_sock *sock; > - int ret; > + int i, ret; >   >   sock = (struct pci_vtcon_sock *)arg; >   >   if (sock->vss_conn_fd == -1) >   return; >   > - ret = writev(sock->vss_conn_fd, iov, niov); > + for (i = 0; i < niov; i++) { > + ret = stream_write(sock->vss_conn_fd, > iov[i].iov_base, > +     iov[i].iov_len); > + if (ret <= 0) > + break; > + } >   > - if (ret < 0 && errno != EWOULDBLOCK) { > + if (ret <= 0) { >   mevent_delete_close(sock->vss_conn_evp); >   sock->vss_conn_fd = -1; >   sock->vss_open = false; > From owner-svn-src-head@freebsd.org Thu Nov 24 22:55:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 38910C54889; Thu, 24 Nov 2016 22:55:03 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A656C88D; Thu, 24 Nov 2016 22:55:01 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAOMt0Oj081796; Thu, 24 Nov 2016 22:55:00 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAOMswkb081748; Thu, 24 Nov 2016 22:54:58 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611242254.uAOMswkb081748@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Thu, 24 Nov 2016 22:54:58 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contrib... X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Nov 2016 22:55:03 -0000 Author: dim Date: Thu Nov 24 22:54:55 2016 New Revision: 309124 URL: https://svnweb.freebsd.org/changeset/base/309124 Log: Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 release, and add lld 3.9.0. Also completely revamp the build system for clang, llvm, lldb and their related tools. Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 support to build; see UPDATING for more information. Release notes for llvm, clang and lld are available here: Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan Beich for their help. Relnotes: yes MFC after: 1 month Added: head/contrib/compiler-rt/include/sanitizer/esan_interface.h - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/include/sanitizer/esan_interface.h head/contrib/compiler-rt/lib/asan/asan_memory_profile.cc - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/asan/asan_memory_profile.cc head/contrib/compiler-rt/lib/asan/asan_scariness_score.h - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/asan/asan_scariness_score.h head/contrib/compiler-rt/lib/builtins/cpu_model.c - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/builtins/cpu_model.c head/contrib/compiler-rt/lib/esan/ - copied from r309123, projects/clang390-import/contrib/compiler-rt/lib/esan/ head/contrib/compiler-rt/lib/profile/InstrProfilingMerge.c - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/profile/InstrProfilingMerge.c head/contrib/compiler-rt/lib/profile/InstrProfilingMergeFile.c - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/profile/InstrProfilingMergeFile.c head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cc - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_s390.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_x86_64.S head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/sanitizer_common/sanitizer_termination.cc head/contrib/compiler-rt/lib/scudo/ - copied from r309123, projects/clang390-import/contrib/compiler-rt/lib/scudo/ head/contrib/compiler-rt/lib/stats/ - copied from r309123, projects/clang390-import/contrib/compiler-rt/lib/stats/ head/contrib/compiler-rt/lib/tsan/rtl/tsan_debugging.cc - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/tsan/rtl/tsan_debugging.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_preinit.cc - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/tsan/rtl/tsan_preinit.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_proc.cc - copied unchanged from r309123, projects/clang390-import/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_proc.cc head/contrib/libc++/include/__bsd_locale_defaults.h - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/__bsd_locale_defaults.h head/contrib/libc++/include/__bsd_locale_fallbacks.h - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/__bsd_locale_fallbacks.h head/contrib/libc++/include/__threading_support - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/__threading_support head/contrib/libc++/include/experimental/__memory - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/__memory head/contrib/libc++/include/experimental/deque - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/deque head/contrib/libc++/include/experimental/filesystem - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/filesystem head/contrib/libc++/include/experimental/forward_list - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/forward_list head/contrib/libc++/include/experimental/iterator - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/iterator head/contrib/libc++/include/experimental/list - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/list head/contrib/libc++/include/experimental/map - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/map head/contrib/libc++/include/experimental/memory_resource - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/memory_resource head/contrib/libc++/include/experimental/propagate_const - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/propagate_const head/contrib/libc++/include/experimental/regex - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/regex head/contrib/libc++/include/experimental/set - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/set head/contrib/libc++/include/experimental/string - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/string head/contrib/libc++/include/experimental/unordered_map - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/unordered_map head/contrib/libc++/include/experimental/unordered_set - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/unordered_set head/contrib/libc++/include/experimental/vector - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/experimental/vector head/contrib/libc++/include/stdbool.h - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/stdbool.h head/contrib/libc++/include/string.h - copied unchanged from r309123, projects/clang390-import/contrib/libc++/include/string.h head/contrib/libc++/src/experimental/ - copied from r309123, projects/clang390-import/contrib/libc++/src/experimental/ head/contrib/llvm/include/llvm/ADT/BitmaskEnum.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/ADT/BitmaskEnum.h head/contrib/llvm/include/llvm/ADT/PriorityWorklist.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/ADT/PriorityWorklist.h head/contrib/llvm/include/llvm/ADT/Sequence.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/ADT/Sequence.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h head/contrib/llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/CFLAndersAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/CFLSteensAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/IndirectCallPromotionAnalysis.h head/contrib/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/IndirectCallSiteVisitor.h head/contrib/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/LazyBlockFrequencyInfo.h head/contrib/llvm/include/llvm/Analysis/LoopPassManager.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/LoopPassManager.h head/contrib/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/LoopUnrollAnalyzer.h head/contrib/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/ModuleSummaryAnalysis.h head/contrib/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/OptimizationDiagnosticInfo.h head/contrib/llvm/include/llvm/Analysis/ProfileSummaryInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/ProfileSummaryInfo.h head/contrib/llvm/include/llvm/Analysis/TypeMetadataUtils.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Analysis/TypeMetadataUtils.h head/contrib/llvm/include/llvm/CodeGen/GlobalISel/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/GlobalISel/ head/contrib/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/MachineInstrBundleIterator.h head/contrib/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/PreISelIntrinsicLowering.h head/contrib/llvm/include/llvm/CodeGen/RegisterUsageInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/RegisterUsageInfo.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGMutation.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/ScheduleDAGMutation.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/SelectionDAGTargetInfo.h head/contrib/llvm/include/llvm/CodeGen/TailDuplicator.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/TailDuplicator.h head/contrib/llvm/include/llvm/CodeGen/TargetPassConfig.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/TargetPassConfig.h head/contrib/llvm/include/llvm/CodeGen/UnreachableBlockElim.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/CodeGen/UnreachableBlockElim.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/ByteStream.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ByteStream.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CVRecord.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CVSymbolTypes.def head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CVSymbolVisitor.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CVTypeVisitor.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeViewError.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/EnumTables.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/EnumTables.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstream.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstream.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/ModuleSubstreamVisitor.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/RecordSerialization.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamArray.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamInterface.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamInterface.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamReader.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamReader.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamRef.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamRef.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamWriter.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/StreamWriter.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumpDelegate.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumpDelegate.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolDumper.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolRecord.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/SymbolVisitorDelegate.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeDumper.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeDumper.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecords.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecords.def head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeStreamMerger.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeVisitorCallbacks.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAError.h head/contrib/llvm/include/llvm/DebugInfo/PDB/GenericError.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/PDB/GenericError.h head/contrib/llvm/include/llvm/DebugInfo/PDB/Raw/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/DebugInfo/PDB/Raw/ head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcABISupport.h head/contrib/llvm/include/llvm/IR/GlobalIFunc.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/IR/GlobalIFunc.h head/contrib/llvm/include/llvm/IR/GlobalIndirectSymbol.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/IR/GlobalIndirectSymbol.h head/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/IR/ModuleSummaryIndex.h head/contrib/llvm/include/llvm/IR/OptBisect.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/IR/OptBisect.h head/contrib/llvm/include/llvm/IR/ProfileSummary.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/IR/ProfileSummary.h head/contrib/llvm/include/llvm/LTO/LTO.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/LTO/LTO.h head/contrib/llvm/include/llvm/LTO/legacy/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/LTO/legacy/ head/contrib/llvm/include/llvm/MC/MCCodeView.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/MC/MCCodeView.h head/contrib/llvm/include/llvm/MC/MCDisassembler/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/MC/MCDisassembler/ head/contrib/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/MC/MCParser/MCTargetAsmParser.h head/contrib/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Object/ModuleSummaryIndexObjectFile.h head/contrib/llvm/include/llvm/ObjectYAML/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/ObjectYAML/ head/contrib/llvm/include/llvm/ProfileData/Coverage/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/ProfileData/Coverage/ head/contrib/llvm/include/llvm/ProfileData/ProfileCommon.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/ProfileData/ProfileCommon.h head/contrib/llvm/include/llvm/Support/AArch64TargetParser.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/AArch64TargetParser.def head/contrib/llvm/include/llvm/Support/AtomicOrdering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/AtomicOrdering.h head/contrib/llvm/include/llvm/Support/CachePruning.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/CachePruning.h head/contrib/llvm/include/llvm/Support/CodeGenCWrappers.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/CodeGenCWrappers.h head/contrib/llvm/include/llvm/Support/ELFRelocs/AMDGPU.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/ELFRelocs/AMDGPU.def head/contrib/llvm/include/llvm/Support/ELFRelocs/BPF.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/ELFRelocs/BPF.def head/contrib/llvm/include/llvm/Support/ELFRelocs/Lanai.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/ELFRelocs/Lanai.def head/contrib/llvm/include/llvm/Support/Error.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/Error.h head/contrib/llvm/include/llvm/Support/MachO.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/MachO.def head/contrib/llvm/include/llvm/Support/SHA1.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/SHA1.h head/contrib/llvm/include/llvm/Support/ScopedPrinter.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/ScopedPrinter.h head/contrib/llvm/include/llvm/Support/TypeName.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/TypeName.h head/contrib/llvm/include/llvm/Support/raw_sha1_ostream.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Support/raw_sha1_ostream.h head/contrib/llvm/include/llvm/TableGen/SearchableTable.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/TableGen/SearchableTable.td head/contrib/llvm/include/llvm/Target/GenericOpcodes.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Target/GenericOpcodes.td head/contrib/llvm/include/llvm/Target/TargetOpcodes.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Target/TargetOpcodes.def head/contrib/llvm/include/llvm/Transforms/GCOVProfiler.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/GCOVProfiler.h head/contrib/llvm/include/llvm/Transforms/IPO/ConstantMerge.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/ConstantMerge.h head/contrib/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/CrossDSOCFI.h head/contrib/llvm/include/llvm/Transforms/IPO/DeadArgumentElimination.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/DeadArgumentElimination.h head/contrib/llvm/include/llvm/Transforms/IPO/ElimAvailExtern.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/ElimAvailExtern.h head/contrib/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/FunctionAttrs.h head/contrib/llvm/include/llvm/Transforms/IPO/GlobalDCE.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/GlobalDCE.h head/contrib/llvm/include/llvm/Transforms/IPO/GlobalOpt.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/GlobalOpt.h head/contrib/llvm/include/llvm/Transforms/IPO/Internalize.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/Internalize.h head/contrib/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/LowerTypeTests.h head/contrib/llvm/include/llvm/Transforms/IPO/PartialInlining.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/PartialInlining.h head/contrib/llvm/include/llvm/Transforms/IPO/SCCP.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/SCCP.h head/contrib/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/IPO/WholeProgramDevirt.h head/contrib/llvm/include/llvm/Transforms/InstrProfiling.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/InstrProfiling.h head/contrib/llvm/include/llvm/Transforms/PGOInstrumentation.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/PGOInstrumentation.h head/contrib/llvm/include/llvm/Transforms/SampleProfile.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/SampleProfile.h head/contrib/llvm/include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/AlignmentFromAssumptions.h head/contrib/llvm/include/llvm/Transforms/Scalar/BDCE.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/BDCE.h head/contrib/llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/ConstantHoisting.h head/contrib/llvm/include/llvm/Transforms/Scalar/CorrelatedValuePropagation.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/CorrelatedValuePropagation.h head/contrib/llvm/include/llvm/Transforms/Scalar/DCE.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/DCE.h head/contrib/llvm/include/llvm/Transforms/Scalar/DeadStoreElimination.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/DeadStoreElimination.h head/contrib/llvm/include/llvm/Transforms/Scalar/Float2Int.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/Float2Int.h head/contrib/llvm/include/llvm/Transforms/Scalar/GVN.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/GVN.h head/contrib/llvm/include/llvm/Transforms/Scalar/GuardWidening.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/GuardWidening.h head/contrib/llvm/include/llvm/Transforms/Scalar/IndVarSimplify.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/IndVarSimplify.h head/contrib/llvm/include/llvm/Transforms/Scalar/JumpThreading.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/JumpThreading.h head/contrib/llvm/include/llvm/Transforms/Scalar/LICM.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LICM.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopDeletion.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopDeletion.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopDistribute.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopDistribute.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopIdiomRecognize.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopInstSimplify.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopInstSimplify.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopRotation.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopRotation.h head/contrib/llvm/include/llvm/Transforms/Scalar/LoopSimplifyCFG.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LoopSimplifyCFG.h head/contrib/llvm/include/llvm/Transforms/Scalar/LowerAtomic.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/LowerAtomic.h head/contrib/llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h head/contrib/llvm/include/llvm/Transforms/Scalar/MergedLoadStoreMotion.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/MergedLoadStoreMotion.h head/contrib/llvm/include/llvm/Transforms/Scalar/PartiallyInlineLibCalls.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/PartiallyInlineLibCalls.h head/contrib/llvm/include/llvm/Transforms/Scalar/Reassociate.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/Reassociate.h head/contrib/llvm/include/llvm/Transforms/Scalar/SCCP.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/SCCP.h head/contrib/llvm/include/llvm/Transforms/Scalar/Sink.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/Sink.h head/contrib/llvm/include/llvm/Transforms/Scalar/TailRecursionElimination.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Scalar/TailRecursionElimination.h head/contrib/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/AddDiscriminators.h head/contrib/llvm/include/llvm/Transforms/Utils/Evaluator.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/Evaluator.h head/contrib/llvm/include/llvm/Transforms/Utils/FunctionImportUtils.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/FunctionImportUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/LCSSA.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/LCSSA.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopSimplify.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/LoopSimplify.h head/contrib/llvm/include/llvm/Transforms/Utils/Mem2Reg.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/Mem2Reg.h head/contrib/llvm/include/llvm/Transforms/Utils/MemorySSA.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/MemorySSA.h head/contrib/llvm/include/llvm/Transforms/Utils/SanitizerStats.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/SanitizerStats.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyInstructions.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Utils/SimplifyInstructions.h head/contrib/llvm/include/llvm/Transforms/Vectorize/ - copied from r309123, projects/clang390-import/contrib/llvm/include/llvm/Transforms/Vectorize/ head/contrib/llvm/lib/Analysis/AliasAnalysisSummary.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/AliasAnalysisSummary.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisSummary.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/AliasAnalysisSummary.h head/contrib/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/CFLAndersAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/CFLGraph.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/CFLGraph.h head/contrib/llvm/lib/Analysis/CFLSteensAliasAnalysis.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/CFLSteensAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/IndirectCallPromotionAnalysis.cpp head/contrib/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/LazyBlockFrequencyInfo.cpp head/contrib/llvm/lib/Analysis/LoopPassManager.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/LoopPassManager.cpp head/contrib/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/LoopUnrollAnalyzer.cpp head/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp head/contrib/llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/OptimizationDiagnosticInfo.cpp head/contrib/llvm/lib/Analysis/ProfileSummaryInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/ProfileSummaryInfo.cpp head/contrib/llvm/lib/Analysis/TypeMetadataUtils.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Analysis/TypeMetadataUtils.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/AsmPrinter/DebugHandlerBase.h head/contrib/llvm/lib/CodeGen/BuiltinGCs.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/BuiltinGCs.cpp head/contrib/llvm/lib/CodeGen/DetectDeadLanes.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/DetectDeadLanes.cpp head/contrib/llvm/lib/CodeGen/GlobalISel/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/GlobalISel/ head/contrib/llvm/lib/CodeGen/LiveRangeUtils.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/LiveRangeUtils.h head/contrib/llvm/lib/CodeGen/LowerEmuTLS.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/LowerEmuTLS.cpp head/contrib/llvm/lib/CodeGen/PatchableFunction.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/PatchableFunction.cpp head/contrib/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/PostRAHazardRecognizer.cpp head/contrib/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/PreISelIntrinsicLowering.cpp head/contrib/llvm/lib/CodeGen/RegUsageInfoCollector.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/RegUsageInfoCollector.cpp head/contrib/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/RegUsageInfoPropagate.cpp head/contrib/llvm/lib/CodeGen/RegisterUsageInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/RegisterUsageInfo.cpp head/contrib/llvm/lib/CodeGen/RenameIndependentSubregs.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/RenameIndependentSubregs.cpp head/contrib/llvm/lib/CodeGen/SafeStack.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/SafeStack.cpp head/contrib/llvm/lib/CodeGen/SafeStackColoring.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/SafeStackColoring.cpp head/contrib/llvm/lib/CodeGen/SafeStackColoring.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/SafeStackColoring.h head/contrib/llvm/lib/CodeGen/SafeStackLayout.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/SafeStackLayout.cpp head/contrib/llvm/lib/CodeGen/SafeStackLayout.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/SafeStackLayout.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGTargetInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGTargetInfo.cpp head/contrib/llvm/lib/CodeGen/TailDuplicator.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/TailDuplicator.cpp head/contrib/llvm/lib/CodeGen/TargetPassConfig.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/TargetPassConfig.cpp head/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/CodeGen/XRayInstrumentation.cpp head/contrib/llvm/lib/DebugInfo/CodeView/ByteStream.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/ByteStream.cpp head/contrib/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/CVTypeVisitor.cpp head/contrib/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/CodeViewError.cpp head/contrib/llvm/lib/DebugInfo/CodeView/EnumTables.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/EnumTables.cpp head/contrib/llvm/lib/DebugInfo/CodeView/ModuleSubstream.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleSubstream.cpp head/contrib/llvm/lib/DebugInfo/CodeView/ModuleSubstreamVisitor.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/ModuleSubstreamVisitor.cpp head/contrib/llvm/lib/DebugInfo/CodeView/RecordSerialization.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/RecordSerialization.cpp head/contrib/llvm/lib/DebugInfo/CodeView/StreamReader.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/StreamReader.cpp head/contrib/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/StreamWriter.cpp head/contrib/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/SymbolDumper.cpp head/contrib/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/TypeDumper.cpp head/contrib/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/TypeRecord.cpp head/contrib/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAError.cpp head/contrib/llvm/lib/DebugInfo/PDB/GenericError.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/PDB/GenericError.cpp head/contrib/llvm/lib/DebugInfo/PDB/Raw/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/DebugInfo/PDB/Raw/ head/contrib/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/ExecutionEngine/Orc/OrcABISupport.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFThumb.h head/contrib/llvm/lib/IR/AttributeSetNode.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/IR/AttributeSetNode.h head/contrib/llvm/lib/IR/ModuleSummaryIndex.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/IR/ModuleSummaryIndex.cpp head/contrib/llvm/lib/IR/OptBisect.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/IR/OptBisect.cpp head/contrib/llvm/lib/IR/ProfileSummary.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/IR/ProfileSummary.cpp head/contrib/llvm/lib/LTO/LTO.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/LTO/LTO.cpp head/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/LTO/ThinLTOCodeGenerator.cpp head/contrib/llvm/lib/LTO/UpdateCompilerUsed.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/LTO/UpdateCompilerUsed.cpp head/contrib/llvm/lib/MC/MCCodeView.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/MC/MCCodeView.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCSymbolizer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/MC/MCDisassembler/MCSymbolizer.cpp head/contrib/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Object/ModuleSummaryIndexObjectFile.cpp head/contrib/llvm/lib/ObjectYAML/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/ObjectYAML/ head/contrib/llvm/lib/ProfileData/Coverage/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/ProfileData/Coverage/ head/contrib/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/ProfileData/ProfileSummaryBuilder.cpp head/contrib/llvm/lib/Support/CachePruning.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Support/CachePruning.cpp head/contrib/llvm/lib/Support/Error.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Support/Error.cpp head/contrib/llvm/lib/Support/SHA1.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Support/SHA1.cpp head/contrib/llvm/lib/Support/ScopedPrinter.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Support/ScopedPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64CallLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64RedundantCopyElimination.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64RegisterBankInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64SchedKryo.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64SchedKryo.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedKryoDetails.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64SchedKryoDetails.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedVulcan.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64SchedVulcan.td head/contrib/llvm/lib/Target/AArch64/AArch64SystemOperands.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AArch64/AArch64SystemOperands.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallLowering.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/AMDGPUCodeGenPrepare.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPURuntimeMetadata.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/AMDGPURuntimeMetadata.h head/contrib/llvm/lib/Target/AMDGPU/Disassembler/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/Disassembler/ head/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.cpp head/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/GCNHazardRecognizer.h head/contrib/llvm/lib/Target/AMDGPU/R600FrameLowering.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/R600FrameLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/R600FrameLowering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/R600FrameLowering.h head/contrib/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/SIDebuggerInsertNops.cpp head/contrib/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/SIWholeQuadMode.cpp head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.cpp head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUAsmUtils.h head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTInfo.h head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.cpp head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AMDGPU/Utils/AMDKernelCodeTUtils.h head/contrib/llvm/lib/Target/AVR/AVRFrameLowering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRFrameLowering.h head/contrib/llvm/lib/Target/AVR/AVRISelLowering.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRISelLowering.h head/contrib/llvm/lib/Target/AVR/AVRInstrFormats.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRInstrFormats.td head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRInstrInfo.cpp head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRInstrInfo.h head/contrib/llvm/lib/Target/AVR/AVRInstrInfo.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRInstrInfo.td head/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.cpp head/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRRegisterInfo.h head/contrib/llvm/lib/Target/AVR/AVRSubtarget.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRSubtarget.cpp head/contrib/llvm/lib/Target/AVR/AVRSubtarget.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRSubtarget.h head/contrib/llvm/lib/Target/AVR/AVRTargetMachine.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/AVRTargetMachine.h head/contrib/llvm/lib/Target/AVR/MCTargetDesc/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/MCTargetDesc/ head/contrib/llvm/lib/Target/AVR/TODO.md - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/AVR/TODO.md head/contrib/llvm/lib/Target/Hexagon/HexagonBlockRanges.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Hexagon/HexagonBlockRanges.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonBlockRanges.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Hexagon/HexagonBlockRanges.h head/contrib/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Hexagon/HexagonBranchRelaxation.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Hexagon/HexagonOptAddrMode.cpp head/contrib/llvm/lib/Target/Lanai/ - copied from r309123, projects/clang390-import/contrib/llvm/lib/Target/Lanai/ head/contrib/llvm/lib/Target/Mips/MipsHazardSchedule.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Mips/MipsHazardSchedule.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/NVPTX/NVPTXInferAddressSpaces.cpp head/contrib/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/NVPTX/NVVMIntrRange.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCCState.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/PowerPC/PPCCCState.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCCState.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/PowerPC/PPCCCState.h head/contrib/llvm/lib/Target/PowerPC/PPCQPXLoadSplat.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/PowerPC/PPCQPXLoadSplat.cpp head/contrib/llvm/lib/Target/PowerPC/README_P9.txt - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/PowerPC/README_P9.txt head/contrib/llvm/lib/Target/PowerPC/p9-instrs.txt - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/PowerPC/p9-instrs.txt head/contrib/llvm/lib/Target/Sparc/LeonFeatures.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Sparc/LeonFeatures.td head/contrib/llvm/lib/Target/Sparc/LeonPasses.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Sparc/LeonPasses.cpp head/contrib/llvm/lib/Target/Sparc/LeonPasses.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Sparc/LeonPasses.h head/contrib/llvm/lib/Target/Sparc/SparcSchedule.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/Sparc/SparcSchedule.td head/contrib/llvm/lib/Target/SystemZ/SystemZTDC.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/SystemZ/SystemZTDC.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFixIrreducibleControlFlow.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyOptimizeLiveIntervals.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPrepareForLiveIntervals.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblyReplacePhysRegs.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/WebAssembly/WebAssemblySetP2AlignOperands.cpp head/contrib/llvm/lib/Target/X86/X86FixupBWInsts.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/X86/X86FixupBWInsts.cpp head/contrib/llvm/lib/Target/X86/X86FixupSetCC.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/X86/X86FixupSetCC.cpp head/contrib/llvm/lib/Target/X86/X86WinAllocaExpander.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Target/X86/X86WinAllocaExpander.cpp head/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/IPO/LowerTypeTests.cpp head/contrib/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp head/contrib/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Instrumentation/EfficiencySanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Instrumentation/IndirectCallPromotion.cpp head/contrib/llvm/lib/Transforms/Scalar/GVNHoist.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Scalar/GVNHoist.cpp head/contrib/llvm/lib/Transforms/Scalar/GuardWidening.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Scalar/GuardWidening.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Scalar/LoopDataPrefetch.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Scalar/LoopVersioningLICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Scalar/LowerGuardIntrinsic.cpp head/contrib/llvm/lib/Transforms/Utils/Evaluator.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Utils/Evaluator.cpp head/contrib/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Utils/FunctionImportUtils.cpp head/contrib/llvm/lib/Transforms/Utils/MemorySSA.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Utils/MemorySSA.cpp head/contrib/llvm/lib/Transforms/Utils/NameAnonFunctions.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Utils/NameAnonFunctions.cpp head/contrib/llvm/lib/Transforms/Utils/SanitizerStats.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Utils/SanitizerStats.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/lib/Transforms/Vectorize/LoadStoreVectorizer.cpp head/contrib/llvm/tools/clang/include/clang/AST/Availability.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/AST/Availability.h head/contrib/llvm/tools/clang/include/clang/AST/LocInfoType.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/AST/LocInfoType.h head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/Cuda.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Basic/Cuda.h head/contrib/llvm/tools/clang/include/clang/Basic/DebugInfoOptions.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Basic/DebugInfoOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLImageTypes.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Basic/OpenCLImageTypes.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLOptions.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Basic/OpenCLOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/PragmaKinds.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Basic/PragmaKinds.h head/contrib/llvm/tools/clang/include/clang/CodeGen/SwiftCallingConv.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/CodeGen/SwiftCallingConv.h head/contrib/llvm/tools/clang/include/clang/Index/CodegenNameGenerator.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Index/CodegenNameGenerator.h head/contrib/llvm/tools/clang/include/clang/Index/IndexDataConsumer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Index/IndexDataConsumer.h head/contrib/llvm/tools/clang/include/clang/Index/IndexSymbol.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Index/IndexSymbol.h head/contrib/llvm/tools/clang/include/clang/Index/IndexingAction.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Index/IndexingAction.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMapTypes.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Lex/HeaderMapTypes.h head/contrib/llvm/tools/clang/include/clang/Sema/CleanupInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Sema/CleanupInfo.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Checkers/SValExplainer.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Regions.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Regions.def head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValVisitor.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValVisitor.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.def head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymExpr.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Symbols.def - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Symbols.def head/contrib/llvm/tools/clang/include/clang/Tooling/Core/QualTypeNames.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Tooling/Core/QualTypeNames.h head/contrib/llvm/tools/clang/include/clang/Tooling/FixIt.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/include/clang/Tooling/FixIt.h head/contrib/llvm/tools/clang/lib/Basic/Cuda.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Basic/Cuda.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDABuiltin.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGCUDABuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntimeNVPTX.h head/contrib/llvm/tools/clang/lib/CodeGen/SwiftCallingConv.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/CodeGen/SwiftCallingConv.cpp head/contrib/llvm/tools/clang/lib/Format/AffectedRangeManager.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/AffectedRangeManager.cpp head/contrib/llvm/tools/clang/lib/Format/AffectedRangeManager.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/AffectedRangeManager.h head/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.cpp head/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/FormatTokenLexer.h head/contrib/llvm/tools/clang/lib/Format/SortJavaScriptImports.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/SortJavaScriptImports.cpp head/contrib/llvm/tools/clang/lib/Format/SortJavaScriptImports.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/SortJavaScriptImports.h head/contrib/llvm/tools/clang/lib/Format/TokenAnalyzer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/TokenAnalyzer.cpp head/contrib/llvm/tools/clang/lib/Format/TokenAnalyzer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Format/TokenAnalyzer.h head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_cmath.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_cmath.h head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_intrinsics.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_intrinsics.h head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_math_forward_declares.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_math_forward_declares.h head/contrib/llvm/tools/clang/lib/Headers/avx512ifmaintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/avx512ifmaintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512ifmavlintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/avx512ifmavlintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512pfintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/avx512pfintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vbmiintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/avx512vbmiintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vbmivlintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/avx512vbmivlintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlcdintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/avx512vlcdintrin.h head/contrib/llvm/tools/clang/lib/Headers/clflushoptintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/clflushoptintrin.h head/contrib/llvm/tools/clang/lib/Headers/intrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/intrin.h head/contrib/llvm/tools/clang/lib/Headers/mwaitxintrin.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/mwaitxintrin.h head/contrib/llvm/tools/clang/lib/Headers/opencl-c.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Headers/opencl-c.h head/contrib/llvm/tools/clang/lib/Index/CodegenNameGenerator.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/CodegenNameGenerator.cpp head/contrib/llvm/tools/clang/lib/Index/IndexBody.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexBody.cpp head/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexDecl.cpp head/contrib/llvm/tools/clang/lib/Index/IndexSymbol.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexSymbol.cpp head/contrib/llvm/tools/clang/lib/Index/IndexTypeSourceInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexTypeSourceInfo.cpp head/contrib/llvm/tools/clang/lib/Index/IndexingAction.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexingAction.cpp head/contrib/llvm/tools/clang/lib/Index/IndexingContext.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexingContext.cpp head/contrib/llvm/tools/clang/lib/Index/IndexingContext.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Index/IndexingContext.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MPI-Checker/ head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCSuperDeallocChecker.cpp head/contrib/llvm/tools/clang/lib/Tooling/Core/QualTypeNames.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Tooling/Core/QualTypeNames.cpp head/contrib/llvm/tools/clang/lib/Tooling/FixIt.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/clang/lib/Tooling/FixIt.cpp head/contrib/llvm/tools/lld/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/lld/ head/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfo.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfo.h head/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfoList.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/API/SBMemoryRegionInfoList.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLVector.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLVector.h head/contrib/llvm/tools/lldb/include/lldb/Expression/DiagnosticManager.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/Expression/DiagnosticManager.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandAlias.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandAlias.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangUtil.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangUtil.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/JavaASTContext.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/Symbol/JavaASTContext.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-defines.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/include/lldb/lldb-private-defines.h head/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfo.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfo.cpp head/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfoList.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/API/SBMemoryRegionInfoList.cpp head/contrib/llvm/tools/lldb/source/Expression/DiagnosticManager.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Expression/DiagnosticManager.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandAlias.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Interpreter/CommandAlias.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-s390x/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-s390x/ head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangDiagnostic.h head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/ThreadSanitizer/ head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/BlockPointer.h head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxAtomic.h head/contrib/llvm/tools/lldb/source/Plugins/Language/Java/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Language/Java/ head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Java/ head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_s390x.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_s390x.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_s390x.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextNetBSD_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_s390x.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_s390x.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContext_s390x.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_s390x.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-s390x-register-enums.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/lldb-s390x-register-enums.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/RegisterContextPOSIXCore_s390x.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserJava.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/ - copied from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/PDB/ head/contrib/llvm/tools/lldb/source/Symbol/ClangUtil.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Symbol/ClangUtil.cpp head/contrib/llvm/tools/lldb/source/Symbol/JavaASTContext.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/lldb/source/Symbol/JavaASTContext.cpp head/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp head/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-cov/SourceCoverageViewHTML.h head/contrib/llvm/tools/llvm-cov/SourceCoverageViewText.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-cov/SourceCoverageViewText.cpp head/contrib/llvm/tools/llvm-cov/SourceCoverageViewText.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-cov/SourceCoverageViewText.h head/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.cpp head/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/LLVMOutputStyle.h head/contrib/llvm/tools/llvm-pdbdump/OutputStyle.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/OutputStyle.h head/contrib/llvm/tools/llvm-pdbdump/PdbYaml.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/PdbYaml.cpp head/contrib/llvm/tools/llvm-pdbdump/PdbYaml.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/PdbYaml.h head/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.cpp head/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-pdbdump/YAMLOutputStyle.h head/contrib/llvm/tools/llvm-readobj/CodeView.h - copied unchanged from r309123, projects/clang390-import/contrib/llvm/tools/llvm-readobj/CodeView.h head/contrib/llvm/utils/TableGen/SearchableTableEmitter.cpp - copied unchanged from r309123, projects/clang390-import/contrib/llvm/utils/TableGen/SearchableTableEmitter.cpp head/lib/clang/clang.pre.mk - copied unchanged from r309123, projects/clang390-import/lib/clang/clang.pre.mk head/lib/clang/headers/ - copied from r309123, projects/clang390-import/lib/clang/headers/ head/lib/clang/include/lld/ - copied from r309123, projects/clang390-import/lib/clang/include/lld/ head/lib/clang/libclang/ - copied from r309123, projects/clang390-import/lib/clang/libclang/ head/lib/clang/libllvm/ - copied from r309123, projects/clang390-import/lib/clang/libllvm/ head/lib/clang/libllvmminimal/ - copied from r309123, projects/clang390-import/lib/clang/libllvmminimal/ head/lib/clang/lldb.pre.mk - copied unchanged from r309123, projects/clang390-import/lib/clang/lldb.pre.mk head/lib/clang/llvm.build.mk - copied unchanged from r309123, projects/clang390-import/lib/clang/llvm.build.mk head/lib/clang/llvm.pre.mk - copied unchanged from r309123, projects/clang390-import/lib/clang/llvm.pre.mk head/lib/libclang_rt/stats/ - copied from r309123, projects/clang390-import/lib/libclang_rt/stats/ head/lib/libclang_rt/stats_client/ - copied from r309123, projects/clang390-import/lib/libclang_rt/stats_client/ head/tools/build/options/WITHOUT_LLD - copied unchanged from r309123, projects/clang390-import/tools/build/options/WITHOUT_LLD head/tools/build/options/WITH_LLD - copied unchanged from r309123, projects/clang390-import/tools/build/options/WITH_LLD head/usr.bin/clang/Makefile.inc - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/Makefile.inc head/usr.bin/clang/clang-tblgen/Makefile.depend.host - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/clang-tblgen/Makefile.depend.host head/usr.bin/clang/lld/ - copied from r309123, projects/clang390-import/usr.bin/clang/lld/ head/usr.bin/clang/llvm-tblgen/Makefile.depend.host - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-tblgen/Makefile.depend.host head/usr.bin/clang/llvm.prog.mk - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm.prog.mk Replaced: head/lib/clang/liblldb/Makefile.depend - copied unchanged from r309123, projects/clang390-import/lib/clang/liblldb/Makefile.depend head/usr.bin/clang/bugpoint/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/bugpoint/Makefile.depend head/usr.bin/clang/clang-format/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/clang-format/Makefile.depend head/usr.bin/clang/clang-tblgen/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/clang-tblgen/Makefile.depend head/usr.bin/clang/clang/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/clang/Makefile.depend head/usr.bin/clang/llc/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llc/Makefile.depend head/usr.bin/clang/lldb/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/lldb/Makefile.depend head/usr.bin/clang/lli/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/lli/Makefile.depend head/usr.bin/clang/llvm-ar/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-ar/Makefile.depend head/usr.bin/clang/llvm-as/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-as/Makefile.depend head/usr.bin/clang/llvm-bcanalyzer/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-bcanalyzer/Makefile.depend head/usr.bin/clang/llvm-cov/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-cov/Makefile.depend head/usr.bin/clang/llvm-cxxdump/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-cxxdump/Makefile.depend head/usr.bin/clang/llvm-diff/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-diff/Makefile.depend head/usr.bin/clang/llvm-dis/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-dis/Makefile.depend head/usr.bin/clang/llvm-dwarfdump/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-dwarfdump/Makefile.depend head/usr.bin/clang/llvm-extract/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-extract/Makefile.depend head/usr.bin/clang/llvm-link/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-link/Makefile.depend head/usr.bin/clang/llvm-lto/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-lto/Makefile.depend head/usr.bin/clang/llvm-mc/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-mc/Makefile.depend head/usr.bin/clang/llvm-nm/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-nm/Makefile.depend head/usr.bin/clang/llvm-objdump/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-objdump/Makefile.depend head/usr.bin/clang/llvm-pdbdump/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-pdbdump/Makefile.depend head/usr.bin/clang/llvm-profdata/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-profdata/Makefile.depend head/usr.bin/clang/llvm-rtdyld/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-rtdyld/Makefile.depend head/usr.bin/clang/llvm-symbolizer/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-symbolizer/Makefile.depend head/usr.bin/clang/llvm-tblgen/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/llvm-tblgen/Makefile.depend head/usr.bin/clang/opt/Makefile.depend - copied unchanged from r309123, projects/clang390-import/usr.bin/clang/opt/Makefile.depend Deleted: head/contrib/llvm/include/llvm/Analysis/CFLAliasAnalysis.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcArchitectureSupport.h head/contrib/llvm/include/llvm/IR/FunctionInfo.h head/contrib/llvm/include/llvm/LTO/LTOCodeGenerator.h head/contrib/llvm/include/llvm/LTO/LTOModule.h head/contrib/llvm/include/llvm/MC/MCCodeGenInfo.h head/contrib/llvm/include/llvm/MC/MCDisassembler.h head/contrib/llvm/include/llvm/MC/MCExternalSymbolizer.h head/contrib/llvm/include/llvm/MC/MCRelocationInfo.h head/contrib/llvm/include/llvm/MC/MCSymbolizer.h head/contrib/llvm/include/llvm/MC/MCTargetAsmParser.h head/contrib/llvm/include/llvm/MC/YAML.h head/contrib/llvm/include/llvm/Object/COFFYAML.h head/contrib/llvm/include/llvm/Object/ELFYAML.h head/contrib/llvm/include/llvm/Object/FunctionIndexObjectFile.h head/contrib/llvm/include/llvm/ProfileData/CoverageMapping.h head/contrib/llvm/include/llvm/ProfileData/CoverageMappingReader.h head/contrib/llvm/include/llvm/ProfileData/CoverageMappingWriter.h head/contrib/llvm/include/llvm/Support/AIXDataTypesFix.h head/contrib/llvm/include/llvm/Support/DataTypes.h.in head/contrib/llvm/include/llvm/Support/RegistryParser.h head/contrib/llvm/include/llvm/Target/TargetSelectionDAGInfo.h head/contrib/llvm/include/llvm/Transforms/IPO/LowerBitSets.h head/contrib/llvm/lib/Analysis/CFLAliasAnalysis.cpp head/contrib/llvm/lib/AsmParser/module.modulemap head/contrib/llvm/lib/Bitcode/module.modulemap head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/WinCodeViewLineTables.h head/contrib/llvm/lib/CodeGen/CoreCLRGC.cpp head/contrib/llvm/lib/CodeGen/ErlangGC.cpp head/contrib/llvm/lib/CodeGen/OcamlGC.cpp head/contrib/llvm/lib/CodeGen/Passes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetSelectionDAGInfo.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGC.cpp head/contrib/llvm/lib/CodeGen/StatepointExampleGC.cpp head/contrib/llvm/lib/CodeGen/module.modulemap head/contrib/llvm/lib/DebugInfo/DWARF/module.modulemap head/contrib/llvm/lib/ExecutionEngine/Orc/OrcArchitectureSupport.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.cpp head/contrib/llvm/lib/IR/FunctionInfo.cpp head/contrib/llvm/lib/IR/module.modulemap head/contrib/llvm/lib/MC/MCCodeGenInfo.cpp head/contrib/llvm/lib/MC/MCSymbolizer.cpp head/contrib/llvm/lib/MC/YAML.cpp head/contrib/llvm/lib/Object/COFFYAML.cpp head/contrib/llvm/lib/Object/ELFYAML.cpp head/contrib/llvm/lib/Object/FunctionIndexObjectFile.cpp head/contrib/llvm/lib/ProfileData/CoverageMapping.cpp head/contrib/llvm/lib/ProfileData/CoverageMappingReader.cpp head/contrib/llvm/lib/ProfileData/CoverageMappingWriter.cpp head/contrib/llvm/lib/TableGen/module.modulemap head/contrib/llvm/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUDiagnosticInfoUnsupported.h head/contrib/llvm/lib/Target/AMDGPU/R600TextureIntrinsicsReplacer.cpp head/contrib/llvm/lib/Target/AMDGPU/SIFixSGPRLiveRanges.cpp head/contrib/llvm/lib/Target/AVR/AVRConfig.h head/contrib/llvm/lib/Target/CppBackend/ head/contrib/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp head/contrib/llvm/lib/Target/PowerPC/PPCLoopDataPrefetch.cpp head/contrib/llvm/lib/Target/WebAssembly/Disassembler/CMakeLists.txt head/contrib/llvm/lib/Target/WebAssembly/Disassembler/LLVMBuild.txt head/contrib/llvm/lib/Target/WebAssembly/Disassembler/Makefile head/contrib/llvm/lib/Target/WebAssembly/Relooper.cpp head/contrib/llvm/lib/Target/WebAssembly/Relooper.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPEI.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFRelocationInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachORelocationInfo.cpp head/contrib/llvm/lib/Transforms/IPO/LowerBitSets.cpp head/contrib/llvm/lib/Transforms/Instrumentation/SafeStack.cpp head/contrib/llvm/lib/Transforms/Scalar/ScalarReplAggregates.cpp head/contrib/llvm/tools/clang/include/clang/Sema/LocInfoType.h head/contrib/llvm/tools/clang/lib/Headers/Intrin.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/Checkers.td head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.cpp head/contrib/llvm/tools/llvm-readobj/StreamWriter.cpp head/contrib/llvm/tools/llvm-readobj/StreamWriter.h head/contrib/llvm/utils/TableGen/module.modulemap head/lib/clang/clang.lib.mk head/lib/clang/include/AArch64GenAsmMatcher.inc head/lib/clang/include/AArch64GenAsmWriter.inc head/lib/clang/include/AArch64GenAsmWriter1.inc head/lib/clang/include/AArch64GenCallingConv.inc head/lib/clang/include/AArch64GenDAGISel.inc head/lib/clang/include/AArch64GenDisassemblerTables.inc head/lib/clang/include/AArch64GenFastISel.inc head/lib/clang/include/AArch64GenInstrInfo.inc head/lib/clang/include/AArch64GenMCCodeEmitter.inc head/lib/clang/include/AArch64GenMCPseudoLowering.inc head/lib/clang/include/AArch64GenRegisterInfo.inc head/lib/clang/include/AArch64GenSubtargetInfo.inc head/lib/clang/include/ARMGenAsmMatcher.inc head/lib/clang/include/ARMGenAsmWriter.inc head/lib/clang/include/ARMGenCallingConv.inc head/lib/clang/include/ARMGenCodeEmitter.inc head/lib/clang/include/ARMGenDAGISel.inc head/lib/clang/include/ARMGenDisassemblerTables.inc head/lib/clang/include/ARMGenFastISel.inc head/lib/clang/include/ARMGenInstrInfo.inc head/lib/clang/include/ARMGenMCCodeEmitter.inc head/lib/clang/include/ARMGenMCPseudoLowering.inc head/lib/clang/include/ARMGenRegisterInfo.inc head/lib/clang/include/ARMGenSubtargetInfo.inc head/lib/clang/include/AttributesCompatFunc.inc head/lib/clang/include/Checkers.inc head/lib/clang/include/Makefile head/lib/clang/include/Makefile.depend head/lib/clang/include/MipsGenAsmMatcher.inc head/lib/clang/include/MipsGenAsmWriter.inc head/lib/clang/include/MipsGenCallingConv.inc head/lib/clang/include/MipsGenCodeEmitter.inc head/lib/clang/include/MipsGenDAGISel.inc head/lib/clang/include/MipsGenDisassemblerTables.inc head/lib/clang/include/MipsGenFastISel.inc head/lib/clang/include/MipsGenInstrInfo.inc head/lib/clang/include/MipsGenMCCodeEmitter.inc head/lib/clang/include/MipsGenMCPseudoLowering.inc head/lib/clang/include/MipsGenRegisterInfo.inc head/lib/clang/include/MipsGenSubtargetInfo.inc head/lib/clang/include/PPCGenAsmMatcher.inc head/lib/clang/include/PPCGenAsmWriter.inc head/lib/clang/include/PPCGenCallingConv.inc head/lib/clang/include/PPCGenCodeEmitter.inc head/lib/clang/include/PPCGenDAGISel.inc head/lib/clang/include/PPCGenDisassemblerTables.inc head/lib/clang/include/PPCGenFastISel.inc head/lib/clang/include/PPCGenInstrInfo.inc head/lib/clang/include/PPCGenMCCodeEmitter.inc head/lib/clang/include/PPCGenRegisterInfo.inc head/lib/clang/include/PPCGenSubtargetInfo.inc head/lib/clang/include/SparcGenAsmMatcher.inc head/lib/clang/include/SparcGenAsmWriter.inc head/lib/clang/include/SparcGenCallingConv.inc head/lib/clang/include/SparcGenCodeEmitter.inc head/lib/clang/include/SparcGenDAGISel.inc head/lib/clang/include/SparcGenDisassemblerTables.inc head/lib/clang/include/SparcGenInstrInfo.inc head/lib/clang/include/SparcGenMCCodeEmitter.inc head/lib/clang/include/SparcGenRegisterInfo.inc head/lib/clang/include/SparcGenSubtargetInfo.inc head/lib/clang/include/X86GenAsmMatcher.inc head/lib/clang/include/X86GenAsmWriter.inc head/lib/clang/include/X86GenAsmWriter1.inc head/lib/clang/include/X86GenCallingConv.inc head/lib/clang/include/X86GenDAGISel.inc head/lib/clang/include/X86GenDisassemblerTables.inc head/lib/clang/include/X86GenFastISel.inc head/lib/clang/include/X86GenInstrInfo.inc head/lib/clang/include/X86GenRegisterInfo.inc head/lib/clang/include/X86GenSubtargetInfo.inc head/lib/clang/include/clang/AST/ head/lib/clang/include/clang/Basic/AttrHasAttributeImpl.inc head/lib/clang/include/clang/Basic/AttrList.inc head/lib/clang/include/clang/Basic/DiagnosticASTKinds.inc head/lib/clang/include/clang/Basic/DiagnosticAnalysisKinds.inc head/lib/clang/include/clang/Basic/DiagnosticCommentKinds.inc head/lib/clang/include/clang/Basic/DiagnosticCommonKinds.inc head/lib/clang/include/clang/Basic/DiagnosticDriverKinds.inc head/lib/clang/include/clang/Basic/DiagnosticFrontendKinds.inc head/lib/clang/include/clang/Basic/DiagnosticGroups.inc head/lib/clang/include/clang/Basic/DiagnosticIndexName.inc head/lib/clang/include/clang/Basic/DiagnosticLexKinds.inc head/lib/clang/include/clang/Basic/DiagnosticParseKinds.inc head/lib/clang/include/clang/Basic/DiagnosticSemaKinds.inc head/lib/clang/include/clang/Basic/DiagnosticSerializationKinds.inc head/lib/clang/include/clang/Basic/arm_neon.inc head/lib/clang/include/clang/Driver/ head/lib/clang/include/clang/Parse/ head/lib/clang/include/clang/Sema/ head/lib/clang/include/clang/Serialization/ head/lib/clang/include/llvm/IR/ head/lib/clang/libclanganalysis/ head/lib/clang/libclangarcmigrate/ head/lib/clang/libclangast/ head/lib/clang/libclangbasic/ head/lib/clang/libclangcodegen/ head/lib/clang/libclangdriver/ head/lib/clang/libclangedit/ head/lib/clang/libclangformat/ head/lib/clang/libclangfrontend/ head/lib/clang/libclangfrontendtool/ head/lib/clang/libclanglex/ head/lib/clang/libclangparse/ head/lib/clang/libclangrewrite/ head/lib/clang/libclangrewritefrontend/ head/lib/clang/libclangsema/ head/lib/clang/libclangserialization/ head/lib/clang/libclangstaticanalyzercheckers/ head/lib/clang/libclangstaticanalyzercore/ head/lib/clang/libclangstaticanalyzerfrontend/ head/lib/clang/libclangtoolingcore/ head/lib/clang/liblldbAPI/ head/lib/clang/liblldbBreakpoint/ head/lib/clang/liblldbCommands/ head/lib/clang/liblldbCore/ head/lib/clang/liblldbDataFormatters/ head/lib/clang/liblldbExpression/ head/lib/clang/liblldbHostCommon/ head/lib/clang/liblldbHostFreeBSD/ head/lib/clang/liblldbHostPOSIX/ head/lib/clang/liblldbInitialization/ head/lib/clang/liblldbInterpreter/ head/lib/clang/liblldbPluginABISysV_arm/ head/lib/clang/liblldbPluginABISysV_arm64/ head/lib/clang/liblldbPluginABISysV_i386/ head/lib/clang/liblldbPluginABISysV_mips/ head/lib/clang/liblldbPluginABISysV_mips64/ head/lib/clang/liblldbPluginABISysV_ppc/ head/lib/clang/liblldbPluginABISysV_ppc64/ head/lib/clang/liblldbPluginABISysV_x86_64/ head/lib/clang/liblldbPluginCXXItaniumABI/ head/lib/clang/liblldbPluginDisassemblerLLVM/ head/lib/clang/liblldbPluginDynamicLoaderPosixDYLD/ head/lib/clang/liblldbPluginDynamicLoaderStatic/ head/lib/clang/liblldbPluginExpressionParserClang/ head/lib/clang/liblldbPluginExpressionParserGo/ head/lib/clang/liblldbPluginInstructionARM/ head/lib/clang/liblldbPluginInstructionARM64/ head/lib/clang/liblldbPluginInstructionMIPS/ head/lib/clang/liblldbPluginInstructionMIPS64/ head/lib/clang/liblldbPluginInstrumentationRuntimeAddressSanitizer/ head/lib/clang/liblldbPluginJITLoaderGDB/ head/lib/clang/liblldbPluginLanguageCPlusPlus/ head/lib/clang/liblldbPluginLanguageObjC/ head/lib/clang/liblldbPluginMemoryHistoryASan/ head/lib/clang/liblldbPluginObjectContainerBSDArchive/ head/lib/clang/liblldbPluginObjectFileELF/ head/lib/clang/liblldbPluginObjectFileJIT/ head/lib/clang/liblldbPluginPlatformFreeBSD/ head/lib/clang/liblldbPluginPlatformGDB/ head/lib/clang/liblldbPluginProcessElfCore/ head/lib/clang/liblldbPluginProcessFreeBSD/ head/lib/clang/liblldbPluginProcessGDBRemote/ head/lib/clang/liblldbPluginProcessPOSIX/ head/lib/clang/liblldbPluginProcessUtility/ head/lib/clang/liblldbPluginScriptInterpreterNone/ head/lib/clang/liblldbPluginSymbolFileDWARF/ head/lib/clang/liblldbPluginSymbolFileSymtab/ head/lib/clang/liblldbPluginSymbolVendorELF/ head/lib/clang/liblldbPluginUnwindAssemblyInstEmulation/ head/lib/clang/liblldbPluginUnwindAssemblyX86/ head/lib/clang/liblldbSymbol/ head/lib/clang/liblldbTarget/ head/lib/clang/liblldbUtility/ head/lib/clang/libllvmaarch64asmparser/ head/lib/clang/libllvmaarch64asmprinter/ head/lib/clang/libllvmaarch64codegen/ head/lib/clang/libllvmaarch64desc/ head/lib/clang/libllvmaarch64disassembler/ head/lib/clang/libllvmaarch64info/ head/lib/clang/libllvmaarch64utils/ head/lib/clang/libllvmanalysis/ head/lib/clang/libllvmarmasmparser/ head/lib/clang/libllvmarmasmprinter/ head/lib/clang/libllvmarmcodegen/ head/lib/clang/libllvmarmdesc/ head/lib/clang/libllvmarmdisassembler/ head/lib/clang/libllvmarminfo/ head/lib/clang/libllvmasmparser/ head/lib/clang/libllvmasmprinter/ head/lib/clang/libllvmbitreader/ head/lib/clang/libllvmbitwriter/ head/lib/clang/libllvmcodegen/ head/lib/clang/libllvmcore/ head/lib/clang/libllvmdebuginfodwarf/ head/lib/clang/libllvmdebuginfopdb/ head/lib/clang/libllvmexecutionengine/ head/lib/clang/libllvminstcombine/ head/lib/clang/libllvminstrumentation/ head/lib/clang/libllvminterpreter/ head/lib/clang/libllvmipo/ head/lib/clang/libllvmirreader/ head/lib/clang/libllvmlibdriver/ head/lib/clang/libllvmlinker/ head/lib/clang/libllvmlto/ head/lib/clang/libllvmmc/ head/lib/clang/libllvmmcdisassembler/ head/lib/clang/libllvmmcjit/ head/lib/clang/libllvmmcparser/ head/lib/clang/libllvmmipsasmparser/ head/lib/clang/libllvmmipsasmprinter/ head/lib/clang/libllvmmipscodegen/ head/lib/clang/libllvmmipsdesc/ head/lib/clang/libllvmmipsdisassembler/ head/lib/clang/libllvmmipsinfo/ head/lib/clang/libllvmmirparser/ head/lib/clang/libllvmobjcarcopts/ head/lib/clang/libllvmobject/ head/lib/clang/libllvmoption/ head/lib/clang/libllvmorcjit/ head/lib/clang/libllvmpasses/ head/lib/clang/libllvmpowerpcasmparser/ head/lib/clang/libllvmpowerpcasmprinter/ head/lib/clang/libllvmpowerpccodegen/ head/lib/clang/libllvmpowerpcdesc/ head/lib/clang/libllvmpowerpcdisassembler/ head/lib/clang/libllvmpowerpcinfo/ head/lib/clang/libllvmprofiledata/ head/lib/clang/libllvmruntimedyld/ head/lib/clang/libllvmscalaropts/ head/lib/clang/libllvmselectiondag/ head/lib/clang/libllvmsparcasmparser/ head/lib/clang/libllvmsparcasmprinter/ head/lib/clang/libllvmsparccodegen/ head/lib/clang/libllvmsparcdesc/ head/lib/clang/libllvmsparcdisassembler/ head/lib/clang/libllvmsparcinfo/ head/lib/clang/libllvmsupport/ head/lib/clang/libllvmsymbolize/ head/lib/clang/libllvmtablegen/ head/lib/clang/libllvmtarget/ head/lib/clang/libllvmtransformutils/ head/lib/clang/libllvmvectorize/ head/lib/clang/libllvmx86asmparser/ head/lib/clang/libllvmx86asmprinter/ head/lib/clang/libllvmx86codegen/ head/lib/clang/libllvmx86desc/ head/lib/clang/libllvmx86disassembler/ head/lib/clang/libllvmx86info/ head/lib/clang/libllvmx86utils/ head/lib/clang/lldb.lib.mk Modified: head/Makefile.inc1 head/ObsoleteFiles.inc head/UPDATING head/contrib/compiler-rt/LICENSE.TXT head/contrib/compiler-rt/include/sanitizer/allocator_interface.h head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h head/contrib/compiler-rt/include/sanitizer/linux_syscall_hooks.h head/contrib/compiler-rt/lib/asan/asan_activation.cc head/contrib/compiler-rt/lib/asan/asan_allocator.cc head/contrib/compiler-rt/lib/asan/asan_allocator.h head/contrib/compiler-rt/lib/asan/asan_fake_stack.cc head/contrib/compiler-rt/lib/asan/asan_fake_stack.h head/contrib/compiler-rt/lib/asan/asan_flags.cc head/contrib/compiler-rt/lib/asan/asan_flags.inc head/contrib/compiler-rt/lib/asan/asan_globals.cc head/contrib/compiler-rt/lib/asan/asan_init_version.h head/contrib/compiler-rt/lib/asan/asan_interceptors.cc head/contrib/compiler-rt/lib/asan/asan_interceptors.h head/contrib/compiler-rt/lib/asan/asan_interface_internal.h head/contrib/compiler-rt/lib/asan/asan_internal.h head/contrib/compiler-rt/lib/asan/asan_linux.cc head/contrib/compiler-rt/lib/asan/asan_mac.cc head/contrib/compiler-rt/lib/asan/asan_malloc_linux.cc head/contrib/compiler-rt/lib/asan/asan_malloc_win.cc head/contrib/compiler-rt/lib/asan/asan_mapping.h head/contrib/compiler-rt/lib/asan/asan_new_delete.cc head/contrib/compiler-rt/lib/asan/asan_poisoning.cc head/contrib/compiler-rt/lib/asan/asan_posix.cc head/contrib/compiler-rt/lib/asan/asan_report.cc head/contrib/compiler-rt/lib/asan/asan_report.h head/contrib/compiler-rt/lib/asan/asan_rtl.cc head/contrib/compiler-rt/lib/asan/asan_stack.h head/contrib/compiler-rt/lib/asan/asan_suppressions.cc head/contrib/compiler-rt/lib/asan/asan_thread.cc head/contrib/compiler-rt/lib/asan/asan_thread.h head/contrib/compiler-rt/lib/asan/asan_win.cc head/contrib/compiler-rt/lib/asan/asan_win_dll_thunk.cc head/contrib/compiler-rt/lib/asan/asan_win_dynamic_runtime_thunk.cc head/contrib/compiler-rt/lib/builtins/arm/adddf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/addsf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_cdcmp.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_cfcmp.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_dcmp.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_fcmp.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_idivmod.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_ldivmod.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_memcmp.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_memcpy.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_memmove.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_memset.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_uidivmod.S head/contrib/compiler-rt/lib/builtins/arm/aeabi_uldivmod.S head/contrib/compiler-rt/lib/builtins/arm/bswapdi2.S head/contrib/compiler-rt/lib/builtins/arm/bswapsi2.S head/contrib/compiler-rt/lib/builtins/arm/clzdi2.S head/contrib/compiler-rt/lib/builtins/arm/clzsi2.S head/contrib/compiler-rt/lib/builtins/arm/comparesf2.S head/contrib/compiler-rt/lib/builtins/arm/divdf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/divmodsi4.S head/contrib/compiler-rt/lib/builtins/arm/divsf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/divsi3.S head/contrib/compiler-rt/lib/builtins/arm/eqdf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/eqsf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/extendsfdf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/fixdfsivfp.S head/contrib/compiler-rt/lib/builtins/arm/fixsfsivfp.S head/contrib/compiler-rt/lib/builtins/arm/fixunsdfsivfp.S head/contrib/compiler-rt/lib/builtins/arm/fixunssfsivfp.S head/contrib/compiler-rt/lib/builtins/arm/floatsidfvfp.S head/contrib/compiler-rt/lib/builtins/arm/floatsisfvfp.S head/contrib/compiler-rt/lib/builtins/arm/floatunssidfvfp.S head/contrib/compiler-rt/lib/builtins/arm/floatunssisfvfp.S head/contrib/compiler-rt/lib/builtins/arm/gedf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/gesf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/gtdf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/gtsf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/ledf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/lesf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/ltdf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/ltsf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/modsi3.S head/contrib/compiler-rt/lib/builtins/arm/muldf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/mulsf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/nedf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/negdf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/negsf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/nesf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/restore_vfp_d8_d15_regs.S head/contrib/compiler-rt/lib/builtins/arm/save_vfp_d8_d15_regs.S head/contrib/compiler-rt/lib/builtins/arm/subdf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/subsf3vfp.S head/contrib/compiler-rt/lib/builtins/arm/switch16.S head/contrib/compiler-rt/lib/builtins/arm/switch32.S head/contrib/compiler-rt/lib/builtins/arm/switch8.S head/contrib/compiler-rt/lib/builtins/arm/switchu8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_add_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_add_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_and_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_and_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_max_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_max_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_min_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_min_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_nand_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_nand_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_or_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_or_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_sub_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_sub_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umax_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umax_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umin_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_umin_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_xor_4.S head/contrib/compiler-rt/lib/builtins/arm/sync_fetch_and_xor_8.S head/contrib/compiler-rt/lib/builtins/arm/sync_synchronize.S head/contrib/compiler-rt/lib/builtins/arm/truncdfsf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/udivmodsi4.S head/contrib/compiler-rt/lib/builtins/arm/udivsi3.S head/contrib/compiler-rt/lib/builtins/arm/umodsi3.S head/contrib/compiler-rt/lib/builtins/arm/unorddf2vfp.S head/contrib/compiler-rt/lib/builtins/arm/unordsf2vfp.S head/contrib/compiler-rt/lib/builtins/assembly.h head/contrib/compiler-rt/lib/builtins/clear_cache.c head/contrib/compiler-rt/lib/builtins/emutls.c head/contrib/compiler-rt/lib/builtins/floatdidf.c head/contrib/compiler-rt/lib/builtins/floattidf.c head/contrib/compiler-rt/lib/builtins/floatundidf.c head/contrib/compiler-rt/lib/builtins/floatuntidf.c head/contrib/compiler-rt/lib/builtins/gcc_personality_v0.c head/contrib/compiler-rt/lib/builtins/i386/ashldi3.S head/contrib/compiler-rt/lib/builtins/i386/ashrdi3.S head/contrib/compiler-rt/lib/builtins/i386/divdi3.S head/contrib/compiler-rt/lib/builtins/i386/floatdidf.S head/contrib/compiler-rt/lib/builtins/i386/floatdisf.S head/contrib/compiler-rt/lib/builtins/i386/floatdixf.S head/contrib/compiler-rt/lib/builtins/i386/floatundidf.S head/contrib/compiler-rt/lib/builtins/i386/floatundisf.S head/contrib/compiler-rt/lib/builtins/i386/floatundixf.S head/contrib/compiler-rt/lib/builtins/i386/lshrdi3.S head/contrib/compiler-rt/lib/builtins/i386/moddi3.S head/contrib/compiler-rt/lib/builtins/i386/muldi3.S head/contrib/compiler-rt/lib/builtins/i386/udivdi3.S head/contrib/compiler-rt/lib/builtins/i386/umoddi3.S head/contrib/compiler-rt/lib/builtins/int_lib.h head/contrib/compiler-rt/lib/builtins/ppc/restFP.S head/contrib/compiler-rt/lib/builtins/ppc/saveFP.S head/contrib/compiler-rt/lib/builtins/x86_64/floatundidf.S head/contrib/compiler-rt/lib/builtins/x86_64/floatundisf.S head/contrib/compiler-rt/lib/builtins/x86_64/floatundixf.S head/contrib/compiler-rt/lib/cfi/cfi.cc head/contrib/compiler-rt/lib/dfsan/dfsan.cc head/contrib/compiler-rt/lib/interception/interception_win.cc head/contrib/compiler-rt/lib/interception/interception_win.h head/contrib/compiler-rt/lib/lsan/lsan.cc head/contrib/compiler-rt/lib/lsan/lsan.h head/contrib/compiler-rt/lib/lsan/lsan_allocator.cc head/contrib/compiler-rt/lib/lsan/lsan_common.cc head/contrib/compiler-rt/lib/lsan/lsan_common.h head/contrib/compiler-rt/lib/lsan/lsan_common_linux.cc head/contrib/compiler-rt/lib/lsan/lsan_flags.inc head/contrib/compiler-rt/lib/lsan/lsan_interceptors.cc head/contrib/compiler-rt/lib/lsan/lsan_thread.cc head/contrib/compiler-rt/lib/lsan/lsan_thread.h head/contrib/compiler-rt/lib/msan/msan.cc head/contrib/compiler-rt/lib/msan/msan.h head/contrib/compiler-rt/lib/msan/msan_interceptors.cc head/contrib/compiler-rt/lib/msan/msan_linux.cc head/contrib/compiler-rt/lib/msan/msan_report.cc head/contrib/compiler-rt/lib/profile/GCDAProfiling.c head/contrib/compiler-rt/lib/profile/InstrProfData.inc head/contrib/compiler-rt/lib/profile/InstrProfiling.c head/contrib/compiler-rt/lib/profile/InstrProfiling.h head/contrib/compiler-rt/lib/profile/InstrProfilingBuffer.c head/contrib/compiler-rt/lib/profile/InstrProfilingFile.c head/contrib/compiler-rt/lib/profile/InstrProfilingInternal.h head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformDarwin.c head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformLinux.c head/contrib/compiler-rt/lib/profile/InstrProfilingPlatformOther.c head/contrib/compiler-rt/lib/profile/InstrProfilingPort.h head/contrib/compiler-rt/lib/profile/InstrProfilingUtil.c head/contrib/compiler-rt/lib/profile/InstrProfilingUtil.h head/contrib/compiler-rt/lib/profile/InstrProfilingValue.c head/contrib/compiler-rt/lib/profile/InstrProfilingWriter.c head/contrib/compiler-rt/lib/profile/WindowsMMap.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_interface.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_allocator_internal.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_atomic_msvc.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_nolibc.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_common_syscalls.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_coverage_mapping_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector1.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_deadlock_detector_interface.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_flags.inc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_interface_internal.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_libc.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_list.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_interceptors.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_common.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_procmaps_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_quarantine.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stacktrace_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_internal.h head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_mac.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_thread_registry.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_tls_get_addr.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_unwind_linux_libcdep.cc head/contrib/compiler-rt/lib/sanitizer_common/sanitizer_win.cc head/contrib/compiler-rt/lib/tsan/dd/dd_interceptors.cc head/contrib/compiler-rt/lib/tsan/go/test.c head/contrib/compiler-rt/lib/tsan/go/tsan_go.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_defs.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_flags.inc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_interceptors_mac.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface_atomic.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_interface_java.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_libdispatch_mac.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_malloc_mac.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_mman.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_mman.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_mutex.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_mutex.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_new_delete.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_linux.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_mac.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_platform_posix.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_report.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_report.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_mutex.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_report.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_rtl_thread.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_stat.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_stat.h head/contrib/compiler-rt/lib/tsan/rtl/tsan_suppressions.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_sync.cc head/contrib/compiler-rt/lib/tsan/rtl/tsan_sync.h head/contrib/compiler-rt/lib/ubsan/ubsan_diag.cc head/contrib/compiler-rt/lib/ubsan/ubsan_flags.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers.h head/contrib/compiler-rt/lib/ubsan/ubsan_handlers_cxx.cc head/contrib/compiler-rt/lib/ubsan/ubsan_handlers_cxx.h head/contrib/compiler-rt/lib/ubsan/ubsan_platform.h head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash.h head/contrib/compiler-rt/lib/ubsan/ubsan_type_hash_itanium.cc head/contrib/compiler-rt/lib/ubsan/ubsan_value.cc head/contrib/libc++/CREDITS.TXT head/contrib/libc++/LICENSE.TXT head/contrib/libc++/include/__config head/contrib/libc++/include/__functional_base head/contrib/libc++/include/__hash_table head/contrib/libc++/include/__mutex_base head/contrib/libc++/include/__tree head/contrib/libc++/include/__tuple head/contrib/libc++/include/__undef___deallocate head/contrib/libc++/include/__undef_min_max head/contrib/libc++/include/algorithm head/contrib/libc++/include/array head/contrib/libc++/include/atomic head/contrib/libc++/include/bitset head/contrib/libc++/include/cctype head/contrib/libc++/include/cmath head/contrib/libc++/include/complex head/contrib/libc++/include/cstring head/contrib/libc++/include/cwchar head/contrib/libc++/include/deque head/contrib/libc++/include/exception head/contrib/libc++/include/experimental/__config head/contrib/libc++/include/experimental/algorithm head/contrib/libc++/include/experimental/any head/contrib/libc++/include/experimental/dynarray head/contrib/libc++/include/experimental/functional head/contrib/libc++/include/experimental/optional head/contrib/libc++/include/experimental/string_view head/contrib/libc++/include/experimental/tuple head/contrib/libc++/include/ext/hash_map head/contrib/libc++/include/ext/hash_set head/contrib/libc++/include/forward_list head/contrib/libc++/include/fstream head/contrib/libc++/include/functional head/contrib/libc++/include/future head/contrib/libc++/include/iomanip head/contrib/libc++/include/ios head/contrib/libc++/include/iosfwd head/contrib/libc++/include/istream head/contrib/libc++/include/iterator head/contrib/libc++/include/list head/contrib/libc++/include/locale head/contrib/libc++/include/map head/contrib/libc++/include/memory head/contrib/libc++/include/mutex head/contrib/libc++/include/queue head/contrib/libc++/include/shared_mutex head/contrib/libc++/include/stack head/contrib/libc++/include/stdexcept head/contrib/libc++/include/streambuf head/contrib/libc++/include/string head/contrib/libc++/include/thread head/contrib/libc++/include/tuple head/contrib/libc++/include/type_traits head/contrib/libc++/include/unordered_map head/contrib/libc++/include/unordered_set head/contrib/libc++/include/utility head/contrib/libc++/include/vector head/contrib/libc++/include/wchar.h head/contrib/libc++/src/algorithm.cpp head/contrib/libc++/src/bind.cpp head/contrib/libc++/src/condition_variable.cpp head/contrib/libc++/src/locale.cpp head/contrib/libc++/src/memory.cpp head/contrib/libc++/src/mutex.cpp head/contrib/libc++/src/regex.cpp head/contrib/libc++/src/strstream.cpp head/contrib/libc++/src/system_error.cpp head/contrib/libc++/src/thread.cpp head/contrib/llvm/LICENSE.TXT head/contrib/llvm/include/llvm-c/Core.h head/contrib/llvm/include/llvm-c/Disassembler.h head/contrib/llvm/include/llvm-c/ErrorHandling.h head/contrib/llvm/include/llvm-c/Linker.h head/contrib/llvm/include/llvm-c/OrcBindings.h head/contrib/llvm/include/llvm-c/Target.h head/contrib/llvm/include/llvm-c/TargetMachine.h head/contrib/llvm/include/llvm-c/Transforms/Scalar.h head/contrib/llvm/include/llvm-c/Types.h head/contrib/llvm/include/llvm-c/lto.h head/contrib/llvm/include/llvm/ADT/APFloat.h head/contrib/llvm/include/llvm/ADT/APInt.h head/contrib/llvm/include/llvm/ADT/ArrayRef.h head/contrib/llvm/include/llvm/ADT/BitVector.h head/contrib/llvm/include/llvm/ADT/DenseMap.h head/contrib/llvm/include/llvm/ADT/DenseMapInfo.h head/contrib/llvm/include/llvm/ADT/DenseSet.h head/contrib/llvm/include/llvm/ADT/FoldingSet.h head/contrib/llvm/include/llvm/ADT/GraphTraits.h head/contrib/llvm/include/llvm/ADT/Hashing.h head/contrib/llvm/include/llvm/ADT/PointerEmbeddedInt.h head/contrib/llvm/include/llvm/ADT/PostOrderIterator.h head/contrib/llvm/include/llvm/ADT/SCCIterator.h head/contrib/llvm/include/llvm/ADT/STLExtras.h head/contrib/llvm/include/llvm/ADT/SetVector.h head/contrib/llvm/include/llvm/ADT/SmallBitVector.h head/contrib/llvm/include/llvm/ADT/SmallPtrSet.h head/contrib/llvm/include/llvm/ADT/SmallSet.h head/contrib/llvm/include/llvm/ADT/SmallVector.h head/contrib/llvm/include/llvm/ADT/SparseSet.h head/contrib/llvm/include/llvm/ADT/Statistic.h head/contrib/llvm/include/llvm/ADT/StringExtras.h head/contrib/llvm/include/llvm/ADT/StringMap.h head/contrib/llvm/include/llvm/ADT/StringRef.h head/contrib/llvm/include/llvm/ADT/StringSet.h head/contrib/llvm/include/llvm/ADT/TinyPtrVector.h head/contrib/llvm/include/llvm/ADT/Triple.h head/contrib/llvm/include/llvm/ADT/ilist.h head/contrib/llvm/include/llvm/ADT/iterator.h head/contrib/llvm/include/llvm/Analysis/AliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/AliasSetTracker.h head/contrib/llvm/include/llvm/Analysis/AssumptionCache.h head/contrib/llvm/include/llvm/Analysis/BasicAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfo.h head/contrib/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h head/contrib/llvm/include/llvm/Analysis/BranchProbabilityInfo.h head/contrib/llvm/include/llvm/Analysis/CGSCCPassManager.h head/contrib/llvm/include/llvm/Analysis/CallGraph.h head/contrib/llvm/include/llvm/Analysis/CallGraphSCCPass.h head/contrib/llvm/include/llvm/Analysis/CallPrinter.h head/contrib/llvm/include/llvm/Analysis/CodeMetrics.h head/contrib/llvm/include/llvm/Analysis/ConstantFolding.h head/contrib/llvm/include/llvm/Analysis/DemandedBits.h head/contrib/llvm/include/llvm/Analysis/DependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/DominanceFrontier.h head/contrib/llvm/include/llvm/Analysis/EHPersonalities.h head/contrib/llvm/include/llvm/Analysis/GlobalsModRef.h head/contrib/llvm/include/llvm/Analysis/IVUsers.h head/contrib/llvm/include/llvm/Analysis/InlineCost.h head/contrib/llvm/include/llvm/Analysis/InstructionSimplify.h head/contrib/llvm/include/llvm/Analysis/Interval.h head/contrib/llvm/include/llvm/Analysis/IteratedDominanceFrontier.h head/contrib/llvm/include/llvm/Analysis/LazyCallGraph.h head/contrib/llvm/include/llvm/Analysis/LazyValueInfo.h head/contrib/llvm/include/llvm/Analysis/Loads.h head/contrib/llvm/include/llvm/Analysis/LoopAccessAnalysis.h head/contrib/llvm/include/llvm/Analysis/LoopInfo.h head/contrib/llvm/include/llvm/Analysis/LoopInfoImpl.h head/contrib/llvm/include/llvm/Analysis/LoopPass.h head/contrib/llvm/include/llvm/Analysis/MemoryBuiltins.h head/contrib/llvm/include/llvm/Analysis/MemoryDependenceAnalysis.h head/contrib/llvm/include/llvm/Analysis/MemoryLocation.h head/contrib/llvm/include/llvm/Analysis/ObjCARCAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h head/contrib/llvm/include/llvm/Analysis/ObjCARCInstKind.h head/contrib/llvm/include/llvm/Analysis/Passes.h head/contrib/llvm/include/llvm/Analysis/PostDominators.h head/contrib/llvm/include/llvm/Analysis/RegionInfo.h head/contrib/llvm/include/llvm/Analysis/RegionInfoImpl.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolution.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpander.h head/contrib/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h head/contrib/llvm/include/llvm/Analysis/ScopedNoAliasAA.h head/contrib/llvm/include/llvm/Analysis/SparsePropagation.h head/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.def head/contrib/llvm/include/llvm/Analysis/TargetLibraryInfo.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfo.h head/contrib/llvm/include/llvm/Analysis/TargetTransformInfoImpl.h head/contrib/llvm/include/llvm/Analysis/TypeBasedAliasAnalysis.h head/contrib/llvm/include/llvm/Analysis/ValueTracking.h head/contrib/llvm/include/llvm/Analysis/VectorUtils.h head/contrib/llvm/include/llvm/AsmParser/Parser.h head/contrib/llvm/include/llvm/Bitcode/BitCodes.h head/contrib/llvm/include/llvm/Bitcode/BitcodeWriterPass.h head/contrib/llvm/include/llvm/Bitcode/BitstreamReader.h head/contrib/llvm/include/llvm/Bitcode/BitstreamWriter.h head/contrib/llvm/include/llvm/Bitcode/LLVMBitCodes.h head/contrib/llvm/include/llvm/Bitcode/ReaderWriter.h head/contrib/llvm/include/llvm/CodeGen/Analysis.h head/contrib/llvm/include/llvm/CodeGen/AsmPrinter.h head/contrib/llvm/include/llvm/CodeGen/BasicTTIImpl.h head/contrib/llvm/include/llvm/CodeGen/CallingConvLower.h head/contrib/llvm/include/llvm/CodeGen/CommandFlags.h head/contrib/llvm/include/llvm/CodeGen/DFAPacketizer.h head/contrib/llvm/include/llvm/CodeGen/DIE.h head/contrib/llvm/include/llvm/CodeGen/DIEValue.def head/contrib/llvm/include/llvm/CodeGen/FastISel.h head/contrib/llvm/include/llvm/CodeGen/FaultMaps.h head/contrib/llvm/include/llvm/CodeGen/FunctionLoweringInfo.h head/contrib/llvm/include/llvm/CodeGen/GCMetadata.h head/contrib/llvm/include/llvm/CodeGen/ISDOpcodes.h head/contrib/llvm/include/llvm/CodeGen/LiveInterval.h head/contrib/llvm/include/llvm/CodeGen/LiveIntervalAnalysis.h head/contrib/llvm/include/llvm/CodeGen/LivePhysRegs.h head/contrib/llvm/include/llvm/CodeGen/LiveRangeEdit.h head/contrib/llvm/include/llvm/CodeGen/LiveVariables.h head/contrib/llvm/include/llvm/CodeGen/MIRParser/MIRParser.h head/contrib/llvm/include/llvm/CodeGen/MIRYamlMapping.h head/contrib/llvm/include/llvm/CodeGen/MachineBasicBlock.h head/contrib/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineCombinerPattern.h head/contrib/llvm/include/llvm/CodeGen/MachineDominators.h head/contrib/llvm/include/llvm/CodeGen/MachineFrameInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineFunction.h head/contrib/llvm/include/llvm/CodeGen/MachineFunctionPass.h head/contrib/llvm/include/llvm/CodeGen/MachineInstr.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBuilder.h head/contrib/llvm/include/llvm/CodeGen/MachineInstrBundle.h head/contrib/llvm/include/llvm/CodeGen/MachineLoopInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineMemOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineModuleInfoImpls.h head/contrib/llvm/include/llvm/CodeGen/MachineOperand.h head/contrib/llvm/include/llvm/CodeGen/MachineRegisterInfo.h head/contrib/llvm/include/llvm/CodeGen/MachineSSAUpdater.h head/contrib/llvm/include/llvm/CodeGen/MachineScheduler.h head/contrib/llvm/include/llvm/CodeGen/MachineTraceMetrics.h head/contrib/llvm/include/llvm/CodeGen/MachineValueType.h head/contrib/llvm/include/llvm/CodeGen/PBQP/Graph.h head/contrib/llvm/include/llvm/CodeGen/ParallelCG.h head/contrib/llvm/include/llvm/CodeGen/Passes.h head/contrib/llvm/include/llvm/CodeGen/PseudoSourceValue.h head/contrib/llvm/include/llvm/CodeGen/RegAllocPBQP.h head/contrib/llvm/include/llvm/CodeGen/RegisterPressure.h head/contrib/llvm/include/llvm/CodeGen/RegisterScavenging.h head/contrib/llvm/include/llvm/CodeGen/ResourcePriorityQueue.h head/contrib/llvm/include/llvm/CodeGen/RuntimeLibcalls.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAG.h head/contrib/llvm/include/llvm/CodeGen/ScheduleDAGInstrs.h head/contrib/llvm/include/llvm/CodeGen/ScheduleHazardRecognizer.h head/contrib/llvm/include/llvm/CodeGen/ScoreboardHazardRecognizer.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAG.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGISel.h head/contrib/llvm/include/llvm/CodeGen/SelectionDAGNodes.h head/contrib/llvm/include/llvm/CodeGen/SlotIndexes.h head/contrib/llvm/include/llvm/CodeGen/StackMaps.h head/contrib/llvm/include/llvm/CodeGen/StackProtector.h head/contrib/llvm/include/llvm/CodeGen/TargetLoweringObjectFileImpl.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.h head/contrib/llvm/include/llvm/CodeGen/ValueTypes.td head/contrib/llvm/include/llvm/CodeGen/WinEHFuncInfo.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/CodeView.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/FieldListRecordBuilder.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/Line.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/ListRecordBuilder.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/MemoryTypeTableBuilder.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeIndex.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecord.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeRecordBuilder.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeSymbolEmitter.h head/contrib/llvm/include/llvm/DebugInfo/CodeView/TypeTableBuilder.h head/contrib/llvm/include/llvm/DebugInfo/DIContext.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFCompileUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFContext.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFFormValue.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFTypeUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnit.h head/contrib/llvm/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h head/contrib/llvm/include/llvm/DebugInfo/PDB/ConcreteSymbolEnumerator.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIADataStream.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumDebugStreams.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumLineNumbers.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSourceFiles.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIAEnumSymbols.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIALineNumber.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIARawSymbol.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASession.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASourceFile.h head/contrib/llvm/include/llvm/DebugInfo/PDB/DIA/DIASupport.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBDataStream.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBEnumChildren.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBLineNumber.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBRawSymbol.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSession.h head/contrib/llvm/include/llvm/DebugInfo/PDB/IPDBSourceFile.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDB.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBContext.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBExtras.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymDumper.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbol.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolAnnotation.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolBlock.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompiland.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandDetails.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCompilandEnv.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolCustom.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolData.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolExe.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFunc.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugEnd.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolFuncDebugStart.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolLabel.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolPublicSymbol.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolThunk.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeArray.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBaseClass.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeCustom.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeDimension.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeEnum.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFriend.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionArg.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeFunctionSig.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeManaged.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypePointer.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeTypedef.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeUDT.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTable.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolTypeVTableShape.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUnknown.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBSymbolUsingNamespace.h head/contrib/llvm/include/llvm/DebugInfo/PDB/PDBTypes.h head/contrib/llvm/include/llvm/DebugInfo/Symbolize/DIPrinter.h head/contrib/llvm/include/llvm/DebugInfo/Symbolize/SymbolizableModule.h head/contrib/llvm/include/llvm/DebugInfo/Symbolize/Symbolize.h head/contrib/llvm/include/llvm/ExecutionEngine/ExecutionEngine.h head/contrib/llvm/include/llvm/ExecutionEngine/GenericValue.h head/contrib/llvm/include/llvm/ExecutionEngine/JITEventListener.h head/contrib/llvm/include/llvm/ExecutionEngine/JITSymbolFlags.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileOnDemandLayer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/CompileUtils.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/IRCompileLayer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/JITSymbol.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/LambdaResolver.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/LazyEmittingLayer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/ObjectLinkingLayer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/ObjectTransformLayer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcError.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetClient.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/OrcRemoteTargetServer.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RPCChannel.h head/contrib/llvm/include/llvm/ExecutionEngine/Orc/RPCUtils.h head/contrib/llvm/include/llvm/ExecutionEngine/RTDyldMemoryManager.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyld.h head/contrib/llvm/include/llvm/ExecutionEngine/RuntimeDyldChecker.h head/contrib/llvm/include/llvm/IR/Argument.h head/contrib/llvm/include/llvm/IR/Attributes.h head/contrib/llvm/include/llvm/IR/Attributes.td head/contrib/llvm/include/llvm/IR/AutoUpgrade.h head/contrib/llvm/include/llvm/IR/BasicBlock.h head/contrib/llvm/include/llvm/IR/CFG.h head/contrib/llvm/include/llvm/IR/CallSite.h head/contrib/llvm/include/llvm/IR/CallingConv.h head/contrib/llvm/include/llvm/IR/Comdat.h head/contrib/llvm/include/llvm/IR/Constant.h head/contrib/llvm/include/llvm/IR/ConstantRange.h head/contrib/llvm/include/llvm/IR/Constants.h head/contrib/llvm/include/llvm/IR/DIBuilder.h head/contrib/llvm/include/llvm/IR/DataLayout.h head/contrib/llvm/include/llvm/IR/DebugInfo.h head/contrib/llvm/include/llvm/IR/DebugInfoFlags.def head/contrib/llvm/include/llvm/IR/DebugInfoMetadata.h head/contrib/llvm/include/llvm/IR/DerivedTypes.h head/contrib/llvm/include/llvm/IR/DiagnosticInfo.h head/contrib/llvm/include/llvm/IR/Dominators.h head/contrib/llvm/include/llvm/IR/Function.h head/contrib/llvm/include/llvm/IR/GVMaterializer.h head/contrib/llvm/include/llvm/IR/GetElementPtrTypeIterator.h head/contrib/llvm/include/llvm/IR/GlobalAlias.h head/contrib/llvm/include/llvm/IR/GlobalObject.h head/contrib/llvm/include/llvm/IR/GlobalValue.h head/contrib/llvm/include/llvm/IR/GlobalVariable.h head/contrib/llvm/include/llvm/IR/IRBuilder.h head/contrib/llvm/include/llvm/IR/IRPrintingPasses.h head/contrib/llvm/include/llvm/IR/InlineAsm.h head/contrib/llvm/include/llvm/IR/InstrTypes.h head/contrib/llvm/include/llvm/IR/Instruction.h head/contrib/llvm/include/llvm/IR/Instructions.h head/contrib/llvm/include/llvm/IR/IntrinsicInst.h head/contrib/llvm/include/llvm/IR/Intrinsics.h head/contrib/llvm/include/llvm/IR/Intrinsics.td head/contrib/llvm/include/llvm/IR/IntrinsicsAArch64.td head/contrib/llvm/include/llvm/IR/IntrinsicsAMDGPU.td head/contrib/llvm/include/llvm/IR/IntrinsicsARM.td head/contrib/llvm/include/llvm/IR/IntrinsicsHexagon.td head/contrib/llvm/include/llvm/IR/IntrinsicsMips.td head/contrib/llvm/include/llvm/IR/IntrinsicsNVVM.td head/contrib/llvm/include/llvm/IR/IntrinsicsPowerPC.td head/contrib/llvm/include/llvm/IR/IntrinsicsSystemZ.td head/contrib/llvm/include/llvm/IR/IntrinsicsWebAssembly.td head/contrib/llvm/include/llvm/IR/IntrinsicsX86.td head/contrib/llvm/include/llvm/IR/LLVMContext.h head/contrib/llvm/include/llvm/IR/LegacyPassManagers.h head/contrib/llvm/include/llvm/IR/Mangler.h head/contrib/llvm/include/llvm/IR/Metadata.def head/contrib/llvm/include/llvm/IR/Metadata.h head/contrib/llvm/include/llvm/IR/Module.h head/contrib/llvm/include/llvm/IR/ModuleSlotTracker.h head/contrib/llvm/include/llvm/IR/Operator.h head/contrib/llvm/include/llvm/IR/PassManager.h head/contrib/llvm/include/llvm/IR/PassManagerInternal.h head/contrib/llvm/include/llvm/IR/PatternMatch.h head/contrib/llvm/include/llvm/IR/Statepoint.h head/contrib/llvm/include/llvm/IR/SymbolTableListTraits.h head/contrib/llvm/include/llvm/IR/TrackingMDRef.h head/contrib/llvm/include/llvm/IR/Type.h head/contrib/llvm/include/llvm/IR/TypeFinder.h head/contrib/llvm/include/llvm/IR/Use.h head/contrib/llvm/include/llvm/IR/UseListOrder.h head/contrib/llvm/include/llvm/IR/User.h head/contrib/llvm/include/llvm/IR/Value.def head/contrib/llvm/include/llvm/IR/Value.h head/contrib/llvm/include/llvm/IR/ValueMap.h head/contrib/llvm/include/llvm/IR/ValueSymbolTable.h head/contrib/llvm/include/llvm/IR/Verifier.h head/contrib/llvm/include/llvm/IRReader/IRReader.h head/contrib/llvm/include/llvm/InitializePasses.h head/contrib/llvm/include/llvm/LibDriver/LibDriver.h head/contrib/llvm/include/llvm/LineEditor/LineEditor.h head/contrib/llvm/include/llvm/LinkAllIR.h head/contrib/llvm/include/llvm/LinkAllPasses.h head/contrib/llvm/include/llvm/Linker/IRMover.h head/contrib/llvm/include/llvm/Linker/Linker.h head/contrib/llvm/include/llvm/MC/MCAsmBackend.h head/contrib/llvm/include/llvm/MC/MCAsmInfo.h head/contrib/llvm/include/llvm/MC/MCAsmInfoELF.h head/contrib/llvm/include/llvm/MC/MCAssembler.h head/contrib/llvm/include/llvm/MC/MCContext.h head/contrib/llvm/include/llvm/MC/MCDirectives.h head/contrib/llvm/include/llvm/MC/MCDwarf.h head/contrib/llvm/include/llvm/MC/MCELFObjectWriter.h head/contrib/llvm/include/llvm/MC/MCELFStreamer.h head/contrib/llvm/include/llvm/MC/MCExpr.h head/contrib/llvm/include/llvm/MC/MCFragment.h head/contrib/llvm/include/llvm/MC/MCInstPrinter.h head/contrib/llvm/include/llvm/MC/MCLinkerOptimizationHint.h head/contrib/llvm/include/llvm/MC/MCMachObjectWriter.h head/contrib/llvm/include/llvm/MC/MCObjectFileInfo.h head/contrib/llvm/include/llvm/MC/MCObjectStreamer.h head/contrib/llvm/include/llvm/MC/MCObjectWriter.h head/contrib/llvm/include/llvm/MC/MCParser/AsmLexer.h head/contrib/llvm/include/llvm/MC/MCParser/MCAsmLexer.h head/contrib/llvm/include/llvm/MC/MCRegisterInfo.h head/contrib/llvm/include/llvm/MC/MCSchedule.h head/contrib/llvm/include/llvm/MC/MCSection.h head/contrib/llvm/include/llvm/MC/MCSectionCOFF.h head/contrib/llvm/include/llvm/MC/MCSectionELF.h head/contrib/llvm/include/llvm/MC/MCStreamer.h head/contrib/llvm/include/llvm/MC/MCSubtargetInfo.h head/contrib/llvm/include/llvm/MC/MCSymbol.h head/contrib/llvm/include/llvm/MC/MCSymbolMachO.h head/contrib/llvm/include/llvm/MC/MCTargetOptions.h head/contrib/llvm/include/llvm/MC/MCWin64EH.h head/contrib/llvm/include/llvm/MC/MCWinEH.h head/contrib/llvm/include/llvm/MC/SectionKind.h head/contrib/llvm/include/llvm/MC/StringTableBuilder.h head/contrib/llvm/include/llvm/MC/SubtargetFeature.h head/contrib/llvm/include/llvm/Object/Archive.h head/contrib/llvm/include/llvm/Object/ArchiveWriter.h head/contrib/llvm/include/llvm/Object/Binary.h head/contrib/llvm/include/llvm/Object/COFF.h head/contrib/llvm/include/llvm/Object/ELF.h head/contrib/llvm/include/llvm/Object/ELFObjectFile.h head/contrib/llvm/include/llvm/Object/ELFTypes.h head/contrib/llvm/include/llvm/Object/Error.h head/contrib/llvm/include/llvm/Object/IRObjectFile.h head/contrib/llvm/include/llvm/Object/MachO.h head/contrib/llvm/include/llvm/Object/MachOUniversal.h head/contrib/llvm/include/llvm/Object/ObjectFile.h head/contrib/llvm/include/llvm/Object/RelocVisitor.h head/contrib/llvm/include/llvm/Object/StackMapParser.h head/contrib/llvm/include/llvm/Object/SymbolicFile.h head/contrib/llvm/include/llvm/Option/OptParser.td head/contrib/llvm/include/llvm/Option/Option.h head/contrib/llvm/include/llvm/Pass.h head/contrib/llvm/include/llvm/PassAnalysisSupport.h head/contrib/llvm/include/llvm/PassRegistry.h head/contrib/llvm/include/llvm/PassSupport.h head/contrib/llvm/include/llvm/Passes/PassBuilder.h head/contrib/llvm/include/llvm/ProfileData/InstrProf.h head/contrib/llvm/include/llvm/ProfileData/InstrProfData.inc head/contrib/llvm/include/llvm/ProfileData/InstrProfReader.h head/contrib/llvm/include/llvm/ProfileData/InstrProfWriter.h head/contrib/llvm/include/llvm/ProfileData/SampleProf.h head/contrib/llvm/include/llvm/ProfileData/SampleProfReader.h head/contrib/llvm/include/llvm/ProfileData/SampleProfWriter.h head/contrib/llvm/include/llvm/Support/ARMBuildAttributes.h head/contrib/llvm/include/llvm/Support/ARMTargetParser.def head/contrib/llvm/include/llvm/Support/AlignOf.h head/contrib/llvm/include/llvm/Support/Allocator.h head/contrib/llvm/include/llvm/Support/Atomic.h head/contrib/llvm/include/llvm/Support/BranchProbability.h head/contrib/llvm/include/llvm/Support/COFF.h head/contrib/llvm/include/llvm/Support/CodeGen.h head/contrib/llvm/include/llvm/Support/CommandLine.h head/contrib/llvm/include/llvm/Support/Compiler.h head/contrib/llvm/include/llvm/Support/ConvertUTF.h head/contrib/llvm/include/llvm/Support/CrashRecoveryContext.h head/contrib/llvm/include/llvm/Support/Dwarf.def head/contrib/llvm/include/llvm/Support/Dwarf.h head/contrib/llvm/include/llvm/Support/ELF.h head/contrib/llvm/include/llvm/Support/ELFRelocs/Hexagon.def head/contrib/llvm/include/llvm/Support/ELFRelocs/Mips.def head/contrib/llvm/include/llvm/Support/ELFRelocs/i386.def head/contrib/llvm/include/llvm/Support/ELFRelocs/x86_64.def head/contrib/llvm/include/llvm/Support/Endian.h head/contrib/llvm/include/llvm/Support/EndianStream.h head/contrib/llvm/include/llvm/Support/ErrorHandling.h head/contrib/llvm/include/llvm/Support/ErrorOr.h head/contrib/llvm/include/llvm/Support/FileSystem.h head/contrib/llvm/include/llvm/Support/Format.h head/contrib/llvm/include/llvm/Support/GenericDomTree.h head/contrib/llvm/include/llvm/Support/Host.h head/contrib/llvm/include/llvm/Support/JamCRC.h head/contrib/llvm/include/llvm/Support/Locale.h head/contrib/llvm/include/llvm/Support/LockFileManager.h head/contrib/llvm/include/llvm/Support/MD5.h head/contrib/llvm/include/llvm/Support/MachO.h head/contrib/llvm/include/llvm/Support/ManagedStatic.h head/contrib/llvm/include/llvm/Support/MathExtras.h head/contrib/llvm/include/llvm/Support/OnDiskHashTable.h head/contrib/llvm/include/llvm/Support/Path.h head/contrib/llvm/include/llvm/Support/PointerLikeTypeTraits.h head/contrib/llvm/include/llvm/Support/PrettyStackTrace.h head/contrib/llvm/include/llvm/Support/Printable.h head/contrib/llvm/include/llvm/Support/Process.h head/contrib/llvm/include/llvm/Support/Program.h head/contrib/llvm/include/llvm/Support/RandomNumberGenerator.h head/contrib/llvm/include/llvm/Support/Registry.h head/contrib/llvm/include/llvm/Support/ScaledNumber.h head/contrib/llvm/include/llvm/Support/Signals.h head/contrib/llvm/include/llvm/Support/StreamingMemoryObject.h head/contrib/llvm/include/llvm/Support/SwapByteOrder.h head/contrib/llvm/include/llvm/Support/TargetParser.h head/contrib/llvm/include/llvm/Support/TargetRegistry.h head/contrib/llvm/include/llvm/Support/Threading.h head/contrib/llvm/include/llvm/Support/Timer.h head/contrib/llvm/include/llvm/Support/TrailingObjects.h head/contrib/llvm/include/llvm/Support/Unicode.h head/contrib/llvm/include/llvm/Support/Valgrind.h head/contrib/llvm/include/llvm/Support/YAMLParser.h head/contrib/llvm/include/llvm/Support/YAMLTraits.h head/contrib/llvm/include/llvm/Support/thread.h head/contrib/llvm/include/llvm/Support/type_traits.h head/contrib/llvm/include/llvm/TableGen/Record.h head/contrib/llvm/include/llvm/TableGen/StringToOffsetTable.h head/contrib/llvm/include/llvm/Target/Target.td head/contrib/llvm/include/llvm/Target/TargetCallingConv.h head/contrib/llvm/include/llvm/Target/TargetCallingConv.td head/contrib/llvm/include/llvm/Target/TargetFrameLowering.h head/contrib/llvm/include/llvm/Target/TargetInstrInfo.h head/contrib/llvm/include/llvm/Target/TargetLowering.h head/contrib/llvm/include/llvm/Target/TargetLoweringObjectFile.h head/contrib/llvm/include/llvm/Target/TargetMachine.h head/contrib/llvm/include/llvm/Target/TargetOpcodes.h head/contrib/llvm/include/llvm/Target/TargetOptions.h head/contrib/llvm/include/llvm/Target/TargetRecip.h head/contrib/llvm/include/llvm/Target/TargetRegisterInfo.h head/contrib/llvm/include/llvm/Target/TargetSchedule.td head/contrib/llvm/include/llvm/Target/TargetSelectionDAG.td head/contrib/llvm/include/llvm/Target/TargetSubtargetInfo.h head/contrib/llvm/include/llvm/Transforms/IPO.h head/contrib/llvm/include/llvm/Transforms/IPO/ForceFunctionAttrs.h head/contrib/llvm/include/llvm/Transforms/IPO/FunctionImport.h head/contrib/llvm/include/llvm/Transforms/IPO/InferFunctionAttrs.h head/contrib/llvm/include/llvm/Transforms/IPO/InlinerPass.h head/contrib/llvm/include/llvm/Transforms/IPO/PassManagerBuilder.h head/contrib/llvm/include/llvm/Transforms/IPO/StripDeadPrototypes.h head/contrib/llvm/include/llvm/Transforms/InstCombine/InstCombine.h head/contrib/llvm/include/llvm/Transforms/InstCombine/InstCombineWorklist.h head/contrib/llvm/include/llvm/Transforms/Instrumentation.h head/contrib/llvm/include/llvm/Transforms/Scalar.h head/contrib/llvm/include/llvm/Transforms/Scalar/ADCE.h head/contrib/llvm/include/llvm/Transforms/Scalar/EarlyCSE.h head/contrib/llvm/include/llvm/Transforms/Scalar/LowerExpectIntrinsic.h head/contrib/llvm/include/llvm/Transforms/Scalar/SROA.h head/contrib/llvm/include/llvm/Transforms/Scalar/SimplifyCFG.h head/contrib/llvm/include/llvm/Transforms/Utils/BasicBlockUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/BuildLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/Cloning.h head/contrib/llvm/include/llvm/Transforms/Utils/CodeExtractor.h head/contrib/llvm/include/llvm/Transforms/Utils/Local.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/LoopVersioning.h head/contrib/llvm/include/llvm/Transforms/Utils/ModuleUtils.h head/contrib/llvm/include/llvm/Transforms/Utils/PromoteMemToReg.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdater.h head/contrib/llvm/include/llvm/Transforms/Utils/SSAUpdaterImpl.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyIndVar.h head/contrib/llvm/include/llvm/Transforms/Utils/SimplifyLibCalls.h head/contrib/llvm/include/llvm/Transforms/Utils/SplitModule.h head/contrib/llvm/include/llvm/Transforms/Utils/UnrollLoop.h head/contrib/llvm/include/llvm/Transforms/Utils/ValueMapper.h head/contrib/llvm/include/llvm/Transforms/Vectorize.h head/contrib/llvm/include/llvm/module.modulemap head/contrib/llvm/lib/Analysis/AliasAnalysis.cpp head/contrib/llvm/lib/Analysis/AliasAnalysisEvaluator.cpp head/contrib/llvm/lib/Analysis/AliasSetTracker.cpp head/contrib/llvm/lib/Analysis/Analysis.cpp head/contrib/llvm/lib/Analysis/AssumptionCache.cpp head/contrib/llvm/lib/Analysis/BasicAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfo.cpp head/contrib/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp head/contrib/llvm/lib/Analysis/BranchProbabilityInfo.cpp head/contrib/llvm/lib/Analysis/CFG.cpp head/contrib/llvm/lib/Analysis/CGSCCPassManager.cpp head/contrib/llvm/lib/Analysis/CallGraph.cpp head/contrib/llvm/lib/Analysis/CallGraphSCCPass.cpp head/contrib/llvm/lib/Analysis/CallPrinter.cpp head/contrib/llvm/lib/Analysis/CaptureTracking.cpp head/contrib/llvm/lib/Analysis/CodeMetrics.cpp head/contrib/llvm/lib/Analysis/ConstantFolding.cpp head/contrib/llvm/lib/Analysis/CostModel.cpp head/contrib/llvm/lib/Analysis/Delinearization.cpp head/contrib/llvm/lib/Analysis/DemandedBits.cpp head/contrib/llvm/lib/Analysis/DependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/DivergenceAnalysis.cpp head/contrib/llvm/lib/Analysis/DomPrinter.cpp head/contrib/llvm/lib/Analysis/DominanceFrontier.cpp head/contrib/llvm/lib/Analysis/EHPersonalities.cpp head/contrib/llvm/lib/Analysis/GlobalsModRef.cpp head/contrib/llvm/lib/Analysis/IVUsers.cpp head/contrib/llvm/lib/Analysis/InlineCost.cpp head/contrib/llvm/lib/Analysis/InstructionSimplify.cpp head/contrib/llvm/lib/Analysis/Interval.cpp head/contrib/llvm/lib/Analysis/IntervalPartition.cpp head/contrib/llvm/lib/Analysis/IteratedDominanceFrontier.cpp head/contrib/llvm/lib/Analysis/LazyCallGraph.cpp head/contrib/llvm/lib/Analysis/LazyValueInfo.cpp head/contrib/llvm/lib/Analysis/Lint.cpp head/contrib/llvm/lib/Analysis/Loads.cpp head/contrib/llvm/lib/Analysis/LoopAccessAnalysis.cpp head/contrib/llvm/lib/Analysis/LoopInfo.cpp head/contrib/llvm/lib/Analysis/LoopPass.cpp head/contrib/llvm/lib/Analysis/MemDepPrinter.cpp head/contrib/llvm/lib/Analysis/MemDerefPrinter.cpp head/contrib/llvm/lib/Analysis/MemoryBuiltins.cpp head/contrib/llvm/lib/Analysis/MemoryDependenceAnalysis.cpp head/contrib/llvm/lib/Analysis/MemoryLocation.cpp head/contrib/llvm/lib/Analysis/ObjCARCAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ObjCARCInstKind.cpp head/contrib/llvm/lib/Analysis/PHITransAddr.cpp head/contrib/llvm/lib/Analysis/PostDominators.cpp head/contrib/llvm/lib/Analysis/RegionInfo.cpp head/contrib/llvm/lib/Analysis/RegionPrinter.cpp head/contrib/llvm/lib/Analysis/ScalarEvolution.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionExpander.cpp head/contrib/llvm/lib/Analysis/ScalarEvolutionNormalization.cpp head/contrib/llvm/lib/Analysis/ScopedNoAliasAA.cpp head/contrib/llvm/lib/Analysis/SparsePropagation.cpp head/contrib/llvm/lib/Analysis/StratifiedSets.h head/contrib/llvm/lib/Analysis/TargetLibraryInfo.cpp head/contrib/llvm/lib/Analysis/TargetTransformInfo.cpp head/contrib/llvm/lib/Analysis/Trace.cpp head/contrib/llvm/lib/Analysis/TypeBasedAliasAnalysis.cpp head/contrib/llvm/lib/Analysis/ValueTracking.cpp head/contrib/llvm/lib/Analysis/VectorUtils.cpp head/contrib/llvm/lib/AsmParser/LLLexer.cpp head/contrib/llvm/lib/AsmParser/LLParser.cpp head/contrib/llvm/lib/AsmParser/LLParser.h head/contrib/llvm/lib/AsmParser/LLToken.h head/contrib/llvm/lib/AsmParser/Parser.cpp head/contrib/llvm/lib/Bitcode/Reader/BitReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitcodeReader.cpp head/contrib/llvm/lib/Bitcode/Reader/BitstreamReader.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp head/contrib/llvm/lib/Bitcode/Writer/BitcodeWriterPass.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp head/contrib/llvm/lib/Bitcode/Writer/ValueEnumerator.h head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/AggressiveAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/Analysis.cpp head/contrib/llvm/lib/CodeGen/AntiDepBreaker.h head/contrib/llvm/lib/CodeGen/AsmPrinter/ARMException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AddressPool.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterHandler.h head/contrib/llvm/lib/CodeGen/AsmPrinter/AsmPrinterInlineAsm.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/ByteStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DIE.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DIEHash.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DbgValueHistoryCalculator.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DebugLocEntry.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCFIException.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfException.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfFile.h head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp head/contrib/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.h head/contrib/llvm/lib/CodeGen/AsmPrinter/EHStreamer.h head/contrib/llvm/lib/CodeGen/AsmPrinter/WinException.cpp head/contrib/llvm/lib/CodeGen/AtomicExpandPass.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.cpp head/contrib/llvm/lib/CodeGen/BranchFolding.h head/contrib/llvm/lib/CodeGen/CalcSpillWeights.cpp head/contrib/llvm/lib/CodeGen/CallingConvLower.cpp head/contrib/llvm/lib/CodeGen/CodeGen.cpp head/contrib/llvm/lib/CodeGen/CodeGenPrepare.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.cpp head/contrib/llvm/lib/CodeGen/CriticalAntiDepBreaker.h head/contrib/llvm/lib/CodeGen/DFAPacketizer.cpp head/contrib/llvm/lib/CodeGen/DeadMachineInstructionElim.cpp head/contrib/llvm/lib/CodeGen/EarlyIfConversion.cpp head/contrib/llvm/lib/CodeGen/ExecutionDepsFix.cpp head/contrib/llvm/lib/CodeGen/ExpandISelPseudos.cpp head/contrib/llvm/lib/CodeGen/ExpandPostRAPseudos.cpp head/contrib/llvm/lib/CodeGen/FuncletLayout.cpp head/contrib/llvm/lib/CodeGen/GCRootLowering.cpp head/contrib/llvm/lib/CodeGen/GlobalMerge.cpp head/contrib/llvm/lib/CodeGen/IfConversion.cpp head/contrib/llvm/lib/CodeGen/ImplicitNullChecks.cpp head/contrib/llvm/lib/CodeGen/InlineSpiller.cpp head/contrib/llvm/lib/CodeGen/InterleavedAccessPass.cpp head/contrib/llvm/lib/CodeGen/LLVMTargetMachine.cpp head/contrib/llvm/lib/CodeGen/LexicalScopes.cpp head/contrib/llvm/lib/CodeGen/LiveDebugValues.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.cpp head/contrib/llvm/lib/CodeGen/LiveDebugVariables.h head/contrib/llvm/lib/CodeGen/LiveInterval.cpp head/contrib/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp head/contrib/llvm/lib/CodeGen/LivePhysRegs.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.cpp head/contrib/llvm/lib/CodeGen/LiveRangeCalc.h head/contrib/llvm/lib/CodeGen/LiveRangeEdit.cpp head/contrib/llvm/lib/CodeGen/LiveStackAnalysis.cpp head/contrib/llvm/lib/CodeGen/LiveVariables.cpp head/contrib/llvm/lib/CodeGen/LocalStackSlotAllocation.cpp head/contrib/llvm/lib/CodeGen/MIRParser/MILexer.cpp head/contrib/llvm/lib/CodeGen/MIRParser/MILexer.h head/contrib/llvm/lib/CodeGen/MIRParser/MIParser.cpp head/contrib/llvm/lib/CodeGen/MIRParser/MIParser.h head/contrib/llvm/lib/CodeGen/MIRParser/MIRParser.cpp head/contrib/llvm/lib/CodeGen/MIRPrinter.cpp head/contrib/llvm/lib/CodeGen/MachineBasicBlock.cpp head/contrib/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp head/contrib/llvm/lib/CodeGen/MachineBlockPlacement.cpp head/contrib/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp head/contrib/llvm/lib/CodeGen/MachineCSE.cpp head/contrib/llvm/lib/CodeGen/MachineCombiner.cpp head/contrib/llvm/lib/CodeGen/MachineCopyPropagation.cpp head/contrib/llvm/lib/CodeGen/MachineDominators.cpp head/contrib/llvm/lib/CodeGen/MachineFunction.cpp head/contrib/llvm/lib/CodeGen/MachineFunctionPass.cpp head/contrib/llvm/lib/CodeGen/MachineInstr.cpp head/contrib/llvm/lib/CodeGen/MachineInstrBundle.cpp head/contrib/llvm/lib/CodeGen/MachineLICM.cpp head/contrib/llvm/lib/CodeGen/MachineLoopInfo.cpp head/contrib/llvm/lib/CodeGen/MachineModuleInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegionInfo.cpp head/contrib/llvm/lib/CodeGen/MachineRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/MachineSSAUpdater.cpp head/contrib/llvm/lib/CodeGen/MachineScheduler.cpp head/contrib/llvm/lib/CodeGen/MachineSink.cpp head/contrib/llvm/lib/CodeGen/MachineTraceMetrics.cpp head/contrib/llvm/lib/CodeGen/MachineVerifier.cpp head/contrib/llvm/lib/CodeGen/OptimizePHIs.cpp head/contrib/llvm/lib/CodeGen/PHIElimination.cpp head/contrib/llvm/lib/CodeGen/ParallelCG.cpp head/contrib/llvm/lib/CodeGen/PeepholeOptimizer.cpp head/contrib/llvm/lib/CodeGen/PostRASchedulerList.cpp head/contrib/llvm/lib/CodeGen/PrologEpilogInserter.cpp head/contrib/llvm/lib/CodeGen/PseudoSourceValue.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.cpp head/contrib/llvm/lib/CodeGen/RegAllocBase.h head/contrib/llvm/lib/CodeGen/RegAllocBasic.cpp head/contrib/llvm/lib/CodeGen/RegAllocFast.cpp head/contrib/llvm/lib/CodeGen/RegAllocGreedy.cpp head/contrib/llvm/lib/CodeGen/RegAllocPBQP.cpp head/contrib/llvm/lib/CodeGen/RegisterCoalescer.cpp head/contrib/llvm/lib/CodeGen/RegisterPressure.cpp head/contrib/llvm/lib/CodeGen/RegisterScavenging.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGInstrs.cpp head/contrib/llvm/lib/CodeGen/ScheduleDAGPrinter.cpp head/contrib/llvm/lib/CodeGen/ScoreboardHazardRecognizer.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FastISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/InstrEmitter.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeFloatTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeTypesGeneric.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ResourcePriorityQueue.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SDNodeDbgValue.h head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp head/contrib/llvm/lib/CodeGen/SelectionDAG/StatepointLowering.h head/contrib/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp head/contrib/llvm/lib/CodeGen/ShadowStackGCLowering.cpp head/contrib/llvm/lib/CodeGen/SjLjEHPrepare.cpp head/contrib/llvm/lib/CodeGen/SlotIndexes.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.cpp head/contrib/llvm/lib/CodeGen/SpillPlacement.h head/contrib/llvm/lib/CodeGen/Spiller.h head/contrib/llvm/lib/CodeGen/SplitKit.cpp head/contrib/llvm/lib/CodeGen/SplitKit.h head/contrib/llvm/lib/CodeGen/StackColoring.cpp head/contrib/llvm/lib/CodeGen/StackMapLivenessAnalysis.cpp head/contrib/llvm/lib/CodeGen/StackMaps.cpp head/contrib/llvm/lib/CodeGen/StackProtector.cpp head/contrib/llvm/lib/CodeGen/StackSlotColoring.cpp head/contrib/llvm/lib/CodeGen/TailDuplication.cpp head/contrib/llvm/lib/CodeGen/TargetFrameLoweringImpl.cpp head/contrib/llvm/lib/CodeGen/TargetInstrInfo.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringBase.cpp head/contrib/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp head/contrib/llvm/lib/CodeGen/TargetRegisterInfo.cpp head/contrib/llvm/lib/CodeGen/TargetSchedule.cpp head/contrib/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp head/contrib/llvm/lib/CodeGen/UnreachableBlockElim.cpp head/contrib/llvm/lib/CodeGen/VirtRegMap.cpp head/contrib/llvm/lib/CodeGen/WinEHPrepare.cpp head/contrib/llvm/lib/DebugInfo/CodeView/FieldListRecordBuilder.cpp head/contrib/llvm/lib/DebugInfo/CodeView/ListRecordBuilder.cpp head/contrib/llvm/lib/DebugInfo/CodeView/MemoryTypeTableBuilder.cpp head/contrib/llvm/lib/DebugInfo/CodeView/MethodListRecordBuilder.cpp head/contrib/llvm/lib/DebugInfo/CodeView/TypeRecordBuilder.cpp head/contrib/llvm/lib/DebugInfo/CodeView/TypeTableBuilder.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFContext.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugLine.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugLoc.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFDebugMacro.cpp head/contrib/llvm/lib/DebugInfo/DWARF/DWARFUnit.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIADataStream.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumDebugStreams.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumLineNumbers.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSourceFiles.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIAEnumSymbols.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIALineNumber.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIARawSymbol.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASession.cpp head/contrib/llvm/lib/DebugInfo/PDB/DIA/DIASourceFile.cpp head/contrib/llvm/lib/DebugInfo/PDB/IPDBSourceFile.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDB.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBContext.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBExtras.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBInterfaceAnchors.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymDumper.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbol.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolAnnotation.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolBlock.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompiland.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandDetails.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCompilandEnv.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolCustom.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolData.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolExe.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFunc.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFuncDebugEnd.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolFuncDebugStart.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolLabel.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolPublicSymbol.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolThunk.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeArray.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeBaseClass.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeBuiltin.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeCustom.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeDimension.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeEnum.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFriend.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionArg.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeFunctionSig.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeManaged.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypePointer.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeTypedef.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeUDT.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeVTable.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolTypeVTableShape.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolUnknown.cpp head/contrib/llvm/lib/DebugInfo/PDB/PDBSymbolUsingNamespace.cpp head/contrib/llvm/lib/DebugInfo/Symbolize/DIPrinter.cpp head/contrib/llvm/lib/DebugInfo/Symbolize/SymbolizableObjectFile.cpp head/contrib/llvm/lib/DebugInfo/Symbolize/Symbolize.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngine.cpp head/contrib/llvm/lib/ExecutionEngine/ExecutionEngineBindings.cpp head/contrib/llvm/lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.cpp head/contrib/llvm/lib/ExecutionEngine/MCJIT/MCJIT.h head/contrib/llvm/lib/ExecutionEngine/OProfileJIT/OProfileWrapper.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/IndirectionUtils.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindings.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/OrcCBindingsStack.h head/contrib/llvm/lib/ExecutionEngine/Orc/OrcError.cpp head/contrib/llvm/lib/ExecutionEngine/Orc/OrcMCJITReplacement.h head/contrib/llvm/lib/ExecutionEngine/Orc/OrcRemoteTargetRPCAPI.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCOFF.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldChecker.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldCheckerImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldELF.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldImpl.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.cpp head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyldMachO.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFI386.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldCOFFX86_64.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOAArch64.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOARM.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOI386.h head/contrib/llvm/lib/ExecutionEngine/RuntimeDyld/Targets/RuntimeDyldMachOX86_64.h head/contrib/llvm/lib/ExecutionEngine/TargetSelect.cpp head/contrib/llvm/lib/IR/AsmWriter.cpp head/contrib/llvm/lib/IR/AttributeImpl.h head/contrib/llvm/lib/IR/Attributes.cpp head/contrib/llvm/lib/IR/AutoUpgrade.cpp head/contrib/llvm/lib/IR/BasicBlock.cpp head/contrib/llvm/lib/IR/Comdat.cpp head/contrib/llvm/lib/IR/ConstantFold.cpp head/contrib/llvm/lib/IR/ConstantFold.h head/contrib/llvm/lib/IR/ConstantRange.cpp head/contrib/llvm/lib/IR/Constants.cpp head/contrib/llvm/lib/IR/ConstantsContext.h head/contrib/llvm/lib/IR/Core.cpp head/contrib/llvm/lib/IR/DIBuilder.cpp head/contrib/llvm/lib/IR/DataLayout.cpp head/contrib/llvm/lib/IR/DebugInfo.cpp head/contrib/llvm/lib/IR/DebugInfoMetadata.cpp head/contrib/llvm/lib/IR/DebugLoc.cpp head/contrib/llvm/lib/IR/DiagnosticInfo.cpp head/contrib/llvm/lib/IR/Dominators.cpp head/contrib/llvm/lib/IR/Function.cpp head/contrib/llvm/lib/IR/GCOV.cpp head/contrib/llvm/lib/IR/Globals.cpp head/contrib/llvm/lib/IR/IRBuilder.cpp head/contrib/llvm/lib/IR/IRPrintingPasses.cpp head/contrib/llvm/lib/IR/InlineAsm.cpp head/contrib/llvm/lib/IR/Instruction.cpp head/contrib/llvm/lib/IR/Instructions.cpp head/contrib/llvm/lib/IR/IntrinsicInst.cpp head/contrib/llvm/lib/IR/LLVMContext.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.cpp head/contrib/llvm/lib/IR/LLVMContextImpl.h head/contrib/llvm/lib/IR/LegacyPassManager.cpp head/contrib/llvm/lib/IR/MDBuilder.cpp head/contrib/llvm/lib/IR/Mangler.cpp head/contrib/llvm/lib/IR/Metadata.cpp head/contrib/llvm/lib/IR/Module.cpp head/contrib/llvm/lib/IR/Operator.cpp head/contrib/llvm/lib/IR/Pass.cpp head/contrib/llvm/lib/IR/PassManager.cpp head/contrib/llvm/lib/IR/PassRegistry.cpp head/contrib/llvm/lib/IR/Statepoint.cpp head/contrib/llvm/lib/IR/Type.cpp head/contrib/llvm/lib/IR/TypeFinder.cpp head/contrib/llvm/lib/IR/Value.cpp head/contrib/llvm/lib/IR/ValueSymbolTable.cpp head/contrib/llvm/lib/IR/ValueTypes.cpp head/contrib/llvm/lib/IR/Verifier.cpp head/contrib/llvm/lib/LTO/LTOCodeGenerator.cpp head/contrib/llvm/lib/LTO/LTOModule.cpp head/contrib/llvm/lib/LibDriver/LibDriver.cpp head/contrib/llvm/lib/LineEditor/LineEditor.cpp head/contrib/llvm/lib/Linker/IRMover.cpp head/contrib/llvm/lib/Linker/LinkModules.cpp head/contrib/llvm/lib/MC/ConstantPools.cpp head/contrib/llvm/lib/MC/ELFObjectWriter.cpp head/contrib/llvm/lib/MC/MCAsmBackend.cpp head/contrib/llvm/lib/MC/MCAsmInfo.cpp head/contrib/llvm/lib/MC/MCAsmInfoDarwin.cpp head/contrib/llvm/lib/MC/MCAsmInfoELF.cpp head/contrib/llvm/lib/MC/MCAsmStreamer.cpp head/contrib/llvm/lib/MC/MCAssembler.cpp head/contrib/llvm/lib/MC/MCContext.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/Disassembler.h head/contrib/llvm/lib/MC/MCDisassembler/MCDisassembler.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCExternalSymbolizer.cpp head/contrib/llvm/lib/MC/MCDisassembler/MCRelocationInfo.cpp head/contrib/llvm/lib/MC/MCDwarf.cpp head/contrib/llvm/lib/MC/MCELFStreamer.cpp head/contrib/llvm/lib/MC/MCExpr.cpp head/contrib/llvm/lib/MC/MCFragment.cpp head/contrib/llvm/lib/MC/MCInst.cpp head/contrib/llvm/lib/MC/MCLabel.cpp head/contrib/llvm/lib/MC/MCLinkerOptimizationHint.cpp head/contrib/llvm/lib/MC/MCMachOStreamer.cpp head/contrib/llvm/lib/MC/MCObjectFileInfo.cpp head/contrib/llvm/lib/MC/MCObjectStreamer.cpp head/contrib/llvm/lib/MC/MCParser/AsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/AsmParser.cpp head/contrib/llvm/lib/MC/MCParser/COFFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/DarwinAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/ELFAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmLexer.cpp head/contrib/llvm/lib/MC/MCParser/MCAsmParser.cpp head/contrib/llvm/lib/MC/MCParser/MCTargetAsmParser.cpp head/contrib/llvm/lib/MC/MCRegisterInfo.cpp head/contrib/llvm/lib/MC/MCSection.cpp head/contrib/llvm/lib/MC/MCStreamer.cpp head/contrib/llvm/lib/MC/MCSymbol.cpp head/contrib/llvm/lib/MC/MCValue.cpp head/contrib/llvm/lib/MC/MCWin64EH.cpp head/contrib/llvm/lib/MC/MCWinEH.cpp head/contrib/llvm/lib/MC/MachObjectWriter.cpp head/contrib/llvm/lib/MC/StringTableBuilder.cpp head/contrib/llvm/lib/MC/SubtargetFeature.cpp head/contrib/llvm/lib/MC/WinCOFFObjectWriter.cpp head/contrib/llvm/lib/MC/WinCOFFStreamer.cpp head/contrib/llvm/lib/Object/Archive.cpp head/contrib/llvm/lib/Object/ArchiveWriter.cpp head/contrib/llvm/lib/Object/Binary.cpp head/contrib/llvm/lib/Object/COFFObjectFile.cpp head/contrib/llvm/lib/Object/ELF.cpp head/contrib/llvm/lib/Object/ELFObjectFile.cpp head/contrib/llvm/lib/Object/Error.cpp head/contrib/llvm/lib/Object/IRObjectFile.cpp head/contrib/llvm/lib/Object/MachOObjectFile.cpp head/contrib/llvm/lib/Object/MachOUniversal.cpp head/contrib/llvm/lib/Object/Object.cpp head/contrib/llvm/lib/Object/ObjectFile.cpp head/contrib/llvm/lib/Object/RecordStreamer.cpp head/contrib/llvm/lib/Object/RecordStreamer.h head/contrib/llvm/lib/Object/SymbolicFile.cpp head/contrib/llvm/lib/Option/OptTable.cpp head/contrib/llvm/lib/Option/Option.cpp head/contrib/llvm/lib/Passes/PassBuilder.cpp head/contrib/llvm/lib/Passes/PassRegistry.def head/contrib/llvm/lib/ProfileData/InstrProf.cpp head/contrib/llvm/lib/ProfileData/InstrProfReader.cpp head/contrib/llvm/lib/ProfileData/InstrProfWriter.cpp head/contrib/llvm/lib/ProfileData/SampleProf.cpp head/contrib/llvm/lib/ProfileData/SampleProfReader.cpp head/contrib/llvm/lib/ProfileData/SampleProfWriter.cpp head/contrib/llvm/lib/Support/APFloat.cpp head/contrib/llvm/lib/Support/APInt.cpp head/contrib/llvm/lib/Support/APSInt.cpp head/contrib/llvm/lib/Support/ARMBuildAttrs.cpp head/contrib/llvm/lib/Support/Atomic.cpp head/contrib/llvm/lib/Support/BranchProbability.cpp head/contrib/llvm/lib/Support/CommandLine.cpp head/contrib/llvm/lib/Support/ConvertUTFWrapper.cpp head/contrib/llvm/lib/Support/CrashRecoveryContext.cpp head/contrib/llvm/lib/Support/Dwarf.cpp head/contrib/llvm/lib/Support/ErrorHandling.cpp head/contrib/llvm/lib/Support/FileUtilities.cpp head/contrib/llvm/lib/Support/FoldingSet.cpp head/contrib/llvm/lib/Support/Host.cpp head/contrib/llvm/lib/Support/IntEqClasses.cpp head/contrib/llvm/lib/Support/JamCRC.cpp head/contrib/llvm/lib/Support/Locale.cpp head/contrib/llvm/lib/Support/LockFileManager.cpp head/contrib/llvm/lib/Support/ManagedStatic.cpp head/contrib/llvm/lib/Support/MemoryBuffer.cpp head/contrib/llvm/lib/Support/Path.cpp head/contrib/llvm/lib/Support/PrettyStackTrace.cpp head/contrib/llvm/lib/Support/Process.cpp head/contrib/llvm/lib/Support/ScaledNumber.cpp head/contrib/llvm/lib/Support/Signals.cpp head/contrib/llvm/lib/Support/SmallPtrSet.cpp head/contrib/llvm/lib/Support/SpecialCaseList.cpp head/contrib/llvm/lib/Support/Statistic.cpp head/contrib/llvm/lib/Support/StreamingMemoryObject.cpp head/contrib/llvm/lib/Support/StringMap.cpp head/contrib/llvm/lib/Support/StringRef.cpp head/contrib/llvm/lib/Support/TargetParser.cpp head/contrib/llvm/lib/Support/TargetRegistry.cpp head/contrib/llvm/lib/Support/ThreadPool.cpp head/contrib/llvm/lib/Support/Threading.cpp head/contrib/llvm/lib/Support/Timer.cpp head/contrib/llvm/lib/Support/Triple.cpp head/contrib/llvm/lib/Support/Twine.cpp head/contrib/llvm/lib/Support/Unix/Memory.inc head/contrib/llvm/lib/Support/Unix/Path.inc head/contrib/llvm/lib/Support/Unix/Process.inc head/contrib/llvm/lib/Support/Unix/Signals.inc head/contrib/llvm/lib/Support/Windows/DynamicLibrary.inc head/contrib/llvm/lib/Support/Windows/Path.inc head/contrib/llvm/lib/Support/Windows/Process.inc head/contrib/llvm/lib/Support/Windows/Signals.inc head/contrib/llvm/lib/Support/Windows/WindowsSupport.h head/contrib/llvm/lib/Support/YAMLParser.cpp head/contrib/llvm/lib/Support/YAMLTraits.cpp head/contrib/llvm/lib/Support/raw_ostream.cpp head/contrib/llvm/lib/TableGen/Record.cpp head/contrib/llvm/lib/TableGen/SetTheory.cpp head/contrib/llvm/lib/TableGen/TGParser.cpp head/contrib/llvm/lib/Target/AArch64/AArch64.h head/contrib/llvm/lib/Target/AArch64/AArch64.td head/contrib/llvm/lib/Target/AArch64/AArch64A53Fix835769.cpp head/contrib/llvm/lib/Target/AArch64/AArch64A57FPLoadBalancing.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AddressTypePromotion.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AdvSIMDScalarPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp head/contrib/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CallingConvention.td head/contrib/llvm/lib/Target/AArch64/AArch64CleanupLocalDynamicTLSPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64CollectLOH.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ConditionOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ConditionalCompares.cpp head/contrib/llvm/lib/Target/AArch64/AArch64DeadRegisterDefinitionsPass.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FastISel.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64FrameLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp head/contrib/llvm/lib/Target/AArch64/AArch64ISelLowering.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrAtomics.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrFormats.td head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64InstrInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/AArch64/AArch64MachineFunctionInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64PBQPRegAlloc.cpp head/contrib/llvm/lib/Target/AArch64/AArch64PromoteConstant.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64RegisterInfo.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedA53.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedA57.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedCyclone.td head/contrib/llvm/lib/Target/AArch64/AArch64SchedM1.td head/contrib/llvm/lib/Target/AArch64/AArch64Schedule.td head/contrib/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64SelectionDAGInfo.h head/contrib/llvm/lib/Target/AArch64/AArch64StorePairSuppress.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.cpp head/contrib/llvm/lib/Target/AArch64/AArch64Subtarget.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetMachine.h head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp head/contrib/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.h head/contrib/llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64Disassembler.h head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.cpp head/contrib/llvm/lib/Target/AArch64/Disassembler/AArch64ExternalSymbolizer.h head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.cpp head/contrib/llvm/lib/Target/AArch64/InstPrinter/AArch64InstPrinter.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AddressingModes.h head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64AsmBackend.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFObjectWriter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCCodeEmitter.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.cpp head/contrib/llvm/lib/Target/AArch64/MCTargetDesc/AArch64MCTargetDesc.h head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.cpp head/contrib/llvm/lib/Target/AArch64/Utils/AArch64BaseInfo.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPU.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPU.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAlwaysInlinePass.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAnnotateKernelFeatures.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAnnotateUniformValues.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUCallingConv.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUFrameLowering.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelDAGToDAG.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUISelLowering.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstrInfo.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUInstructions.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsicInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsicInfo.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUIntrinsics.td head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMCInstLower.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUMachineFunction.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUOpenCLImageTypeLoweringPass.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUPromoteAlloca.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPURegisterInfo.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUSubtarget.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetObjectFile.h head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.h head/contrib/llvm/lib/Target/AMDGPU/AMDILCFGStructurizer.cpp head/contrib/llvm/lib/Target/AMDGPU/AMDKernelCodeT.h head/contrib/llvm/lib/Target/AMDGPU/AsmParser/AMDGPUAsmParser.cpp head/contrib/llvm/lib/Target/AMDGPU/CIInstructions.td head/contrib/llvm/lib/Target/AMDGPU/CaymanInstructions.td head/contrib/llvm/lib/Target/AMDGPU/EvergreenInstructions.td head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.cpp head/contrib/llvm/lib/Target/AMDGPU/InstPrinter/AMDGPUInstPrinter.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUAsmBackend.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFObjectWriter.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUELFStreamer.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUFixupKinds.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCAsmInfo.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCCodeEmitter.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUMCTargetDesc.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUTargetStreamer.h head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/R600MCCodeEmitter.cpp head/contrib/llvm/lib/Target/AMDGPU/MCTargetDesc/SIMCCodeEmitter.cpp head/contrib/llvm/lib/Target/AMDGPU/Processors.td head/contrib/llvm/lib/Target/AMDGPU/R600ClauseMergePass.cpp head/contrib/llvm/lib/Target/AMDGPU/R600ControlFlowFinalizer.cpp head/contrib/llvm/lib/Target/AMDGPU/R600Defines.h head/contrib/llvm/lib/Target/AMDGPU/R600EmitClauseMarkers.cpp head/contrib/llvm/lib/Target/AMDGPU/R600ExpandSpecialInstrs.cpp head/contrib/llvm/lib/Target/AMDGPU/R600ISelLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/R600ISelLowering.h head/contrib/llvm/lib/Target/AMDGPU/R600InstrInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/R600InstrInfo.h head/contrib/llvm/lib/Target/AMDGPU/R600Instructions.td head/contrib/llvm/lib/Target/AMDGPU/R600Intrinsics.td head/contrib/llvm/lib/Target/AMDGPU/R600MachineFunctionInfo.h head/contrib/llvm/lib/Target/AMDGPU/R600MachineScheduler.cpp head/contrib/llvm/lib/Target/AMDGPU/R600MachineScheduler.h head/contrib/llvm/lib/Target/AMDGPU/R600OptimizeVectorRegisters.cpp head/contrib/llvm/lib/Target/AMDGPU/R600Packetizer.cpp head/contrib/llvm/lib/Target/AMDGPU/R600RegisterInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/R600RegisterInfo.h head/contrib/llvm/lib/Target/AMDGPU/R600Schedule.td head/contrib/llvm/lib/Target/AMDGPU/SIAnnotateControlFlow.cpp head/contrib/llvm/lib/Target/AMDGPU/SIDefines.h head/contrib/llvm/lib/Target/AMDGPU/SIFixSGPRCopies.cpp head/contrib/llvm/lib/Target/AMDGPU/SIFoldOperands.cpp head/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/SIFrameLowering.h head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.cpp head/contrib/llvm/lib/Target/AMDGPU/SIISelLowering.h head/contrib/llvm/lib/Target/AMDGPU/SIInsertWaits.cpp head/contrib/llvm/lib/Target/AMDGPU/SIInstrFormats.td head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.h head/contrib/llvm/lib/Target/AMDGPU/SIInstrInfo.td head/contrib/llvm/lib/Target/AMDGPU/SIInstructions.td head/contrib/llvm/lib/Target/AMDGPU/SIIntrinsics.td head/contrib/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/AMDGPU/SILowerControlFlow.cpp head/contrib/llvm/lib/Target/AMDGPU/SILowerI1Copies.cpp head/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/SIMachineFunctionInfo.h head/contrib/llvm/lib/Target/AMDGPU/SIMachineScheduler.cpp head/contrib/llvm/lib/Target/AMDGPU/SIMachineScheduler.h head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.h head/contrib/llvm/lib/Target/AMDGPU/SIRegisterInfo.td head/contrib/llvm/lib/Target/AMDGPU/SISchedule.td head/contrib/llvm/lib/Target/AMDGPU/SIShrinkInstructions.cpp head/contrib/llvm/lib/Target/AMDGPU/SITypeRewriter.cpp head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.cpp head/contrib/llvm/lib/Target/AMDGPU/Utils/AMDGPUBaseInfo.h head/contrib/llvm/lib/Target/AMDGPU/VIInstrFormats.td head/contrib/llvm/lib/Target/AMDGPU/VIInstructions.td head/contrib/llvm/lib/Target/ARM/A15SDOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARM.h head/contrib/llvm/lib/Target/ARM/ARM.td head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.cpp head/contrib/llvm/lib/Target/ARM/ARMAsmPrinter.h head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMBaseRegisterInfo.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.h head/contrib/llvm/lib/Target/ARM/ARMCallingConv.td head/contrib/llvm/lib/Target/ARM/ARMConstantIslandPass.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.cpp head/contrib/llvm/lib/Target/ARM/ARMConstantPoolValue.h head/contrib/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp head/contrib/llvm/lib/Target/ARM/ARMFastISel.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMFrameLowering.h head/contrib/llvm/lib/Target/ARM/ARMHazardRecognizer.cpp head/contrib/llvm/lib/Target/ARM/ARMISelDAGToDAG.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.cpp head/contrib/llvm/lib/Target/ARM/ARMISelLowering.h head/contrib/llvm/lib/Target/ARM/ARMInstrFormats.td head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.h head/contrib/llvm/lib/Target/ARM/ARMInstrInfo.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb.td head/contrib/llvm/lib/Target/ARM/ARMInstrThumb2.td head/contrib/llvm/lib/Target/ARM/ARMInstrVFP.td head/contrib/llvm/lib/Target/ARM/ARMLoadStoreOptimizer.cpp head/contrib/llvm/lib/Target/ARM/ARMMCInstLower.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMMachineFunctionInfo.h head/contrib/llvm/lib/Target/ARM/ARMOptimizeBarriersPass.cpp head/contrib/llvm/lib/Target/ARM/ARMSchedule.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA8.td head/contrib/llvm/lib/Target/ARM/ARMScheduleA9.td head/contrib/llvm/lib/Target/ARM/ARMScheduleSwift.td head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMSelectionDAGInfo.h head/contrib/llvm/lib/Target/ARM/ARMSubtarget.cpp head/contrib/llvm/lib/Target/ARM/ARMSubtarget.h head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetMachine.h head/contrib/llvm/lib/Target/ARM/ARMTargetObjectFile.h head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp head/contrib/llvm/lib/Target/ARM/ARMTargetTransformInfo.h head/contrib/llvm/lib/Target/ARM/AsmParser/ARMAsmParser.cpp head/contrib/llvm/lib/Target/ARM/Disassembler/ARMDisassembler.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.cpp head/contrib/llvm/lib/Target/ARM/InstPrinter/ARMInstPrinter.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAddressingModes.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackend.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendDarwin.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendELF.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMAsmBackendWinCOFF.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMELFStreamer.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMFixupKinds.h head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCAsmInfo.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCCodeEmitter.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMCTargetDesc.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachORelocationInfo.cpp head/contrib/llvm/lib/Target/ARM/MCTargetDesc/ARMMachObjectWriter.cpp head/contrib/llvm/lib/Target/ARM/MLxExpansionPass.cpp head/contrib/llvm/lib/Target/ARM/TargetInfo/ARMTargetInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.cpp head/contrib/llvm/lib/Target/ARM/Thumb1FrameLowering.h head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb1InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2ITBlockPass.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.cpp head/contrib/llvm/lib/Target/ARM/Thumb2InstrInfo.h head/contrib/llvm/lib/Target/ARM/Thumb2SizeReduction.cpp head/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.cpp head/contrib/llvm/lib/Target/ARM/ThumbRegisterInfo.h head/contrib/llvm/lib/Target/AVR/AVR.h head/contrib/llvm/lib/Target/AVR/AVR.td head/contrib/llvm/lib/Target/AVR/AVRMachineFunctionInfo.h head/contrib/llvm/lib/Target/AVR/AVRSelectionDAGInfo.h head/contrib/llvm/lib/Target/AVR/AVRTargetMachine.cpp head/contrib/llvm/lib/Target/AVR/AVRTargetObjectFile.h head/contrib/llvm/lib/Target/BPF/BPFAsmPrinter.cpp head/contrib/llvm/lib/Target/BPF/BPFFrameLowering.h head/contrib/llvm/lib/Target/BPF/BPFISelDAGToDAG.cpp head/contrib/llvm/lib/Target/BPF/BPFISelLowering.cpp head/contrib/llvm/lib/Target/BPF/BPFISelLowering.h head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.cpp head/contrib/llvm/lib/Target/BPF/BPFInstrInfo.h head/contrib/llvm/lib/Target/BPF/BPFMCInstLower.cpp head/contrib/llvm/lib/Target/BPF/BPFSubtarget.h head/contrib/llvm/lib/Target/BPF/BPFTargetMachine.cpp head/contrib/llvm/lib/Target/BPF/BPFTargetMachine.h head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFAsmBackend.cpp head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFELFObjectWriter.cpp head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCAsmInfo.h head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp head/contrib/llvm/lib/Target/BPF/MCTargetDesc/BPFMCTargetDesc.cpp head/contrib/llvm/lib/Target/Hexagon/AsmParser/HexagonAsmParser.cpp head/contrib/llvm/lib/Target/Hexagon/BitTracker.cpp head/contrib/llvm/lib/Target/Hexagon/BitTracker.h head/contrib/llvm/lib/Target/Hexagon/Disassembler/HexagonDisassembler.cpp head/contrib/llvm/lib/Target/Hexagon/Hexagon.td head/contrib/llvm/lib/Target/Hexagon/HexagonAsmPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonBitSimplify.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonBitTracker.h head/contrib/llvm/lib/Target/Hexagon/HexagonCFGOptimizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCommonGEP.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonCopyToCombine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonEarlyIfConv.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonExpandCondsets.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFixupHwLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonFrameLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonGenExtract.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGenInsert.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGenMux.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonGenPredicate.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonHardwareLoops.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonISelLowering.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrAlias.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormats.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrFormatsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV3.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoV60.td head/contrib/llvm/lib/Target/Hexagon/HexagonInstrInfoVector.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsics.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV5.td head/contrib/llvm/lib/Target/Hexagon/HexagonIntrinsicsV60.td head/contrib/llvm/lib/Target/Hexagon/HexagonMCInstLower.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineFunctionInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonMachineScheduler.h head/contrib/llvm/lib/Target/Hexagon/HexagonNewValueJump.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonOperands.td head/contrib/llvm/lib/Target/Hexagon/HexagonOptimizeSZextends.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonPeephole.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRDF.h head/contrib/llvm/lib/Target/Hexagon/HexagonRDFOpt.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonRegisterInfo.td head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV4.td head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV55.td head/contrib/llvm/lib/Target/Hexagon/HexagonScheduleV60.td head/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSelectionDAGInfo.h head/contrib/llvm/lib/Target/Hexagon/HexagonSplitConst32AndConst64.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSplitDouble.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonStoreWidening.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonSubtarget.h head/contrib/llvm/lib/Target/Hexagon/HexagonSystemInst.td head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetMachine.h head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonTargetObjectFile.h head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.cpp head/contrib/llvm/lib/Target/Hexagon/HexagonVLIWPacketizer.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonAsmBackend.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonBaseInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonELFObjectWriter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonFixupKinds.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCAsmInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCChecker.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCDuplexInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCELFStreamer.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCExpr.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCInstrInfo.h head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCShuffler.cpp head/contrib/llvm/lib/Target/Hexagon/MCTargetDesc/HexagonMCTargetDesc.cpp head/contrib/llvm/lib/Target/Hexagon/RDFCopy.cpp head/contrib/llvm/lib/Target/Hexagon/RDFCopy.h head/contrib/llvm/lib/Target/Hexagon/RDFDeadCode.cpp head/contrib/llvm/lib/Target/Hexagon/RDFDeadCode.h head/contrib/llvm/lib/Target/Hexagon/RDFGraph.cpp head/contrib/llvm/lib/Target/Hexagon/RDFGraph.h head/contrib/llvm/lib/Target/Hexagon/RDFLiveness.cpp head/contrib/llvm/lib/Target/Hexagon/RDFLiveness.h head/contrib/llvm/lib/Target/MSP430/MCTargetDesc/MSP430MCTargetDesc.cpp head/contrib/llvm/lib/Target/MSP430/MSP430BranchSelector.cpp head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430FrameLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.cpp head/contrib/llvm/lib/Target/MSP430/MSP430ISelLowering.h head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.cpp head/contrib/llvm/lib/Target/MSP430/MSP430InstrInfo.h head/contrib/llvm/lib/Target/MSP430/MSP430Subtarget.h head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.cpp head/contrib/llvm/lib/Target/MSP430/MSP430TargetMachine.h head/contrib/llvm/lib/Target/Mips/AsmParser/MipsAsmParser.cpp head/contrib/llvm/lib/Target/Mips/Disassembler/MipsDisassembler.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.cpp head/contrib/llvm/lib/Target/Mips/InstPrinter/MipsInstPrinter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIFlagsSection.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsABIInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsAsmBackend.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsBaseInfo.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsELFObjectWriter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsFixupKinds.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCAsmInfo.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCCodeEmitter.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCExpr.h head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsMCTargetDesc.cpp head/contrib/llvm/lib/Target/Mips/MCTargetDesc/MipsTargetStreamer.cpp head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMips64r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMips64r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsDSPInstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFPU.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MicroMipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips.h head/contrib/llvm/lib/Target/Mips/Mips.td head/contrib/llvm/lib/Target/Mips/Mips16FrameLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16HardFloat.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.cpp head/contrib/llvm/lib/Target/Mips/Mips16ISelLowering.h head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.h head/contrib/llvm/lib/Target/Mips/Mips16InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips16RegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/Mips32r6InstrFormats.td head/contrib/llvm/lib/Target/Mips/Mips32r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64InstrInfo.td head/contrib/llvm/lib/Target/Mips/Mips64r6InstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.cpp head/contrib/llvm/lib/Target/Mips/MipsAsmPrinter.h head/contrib/llvm/lib/Target/Mips/MipsCCState.cpp head/contrib/llvm/lib/Target/Mips/MipsCallingConv.td head/contrib/llvm/lib/Target/Mips/MipsCondMov.td head/contrib/llvm/lib/Target/Mips/MipsConstantIslandPass.cpp head/contrib/llvm/lib/Target/Mips/MipsDSPInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsDSPInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsDelaySlotFiller.cpp head/contrib/llvm/lib/Target/Mips/MipsEVAInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsFastISel.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsFrameLowering.h head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsISelDAGToDAG.h 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/MipsInstrFormats.td head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsLongBranch.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.cpp head/contrib/llvm/lib/Target/Mips/MipsMCInstLower.h head/contrib/llvm/lib/Target/Mips/MipsMSAInstrInfo.td head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.cpp head/contrib/llvm/lib/Target/Mips/MipsMachineFunction.h head/contrib/llvm/lib/Target/Mips/MipsOs16.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.h head/contrib/llvm/lib/Target/Mips/MipsRegisterInfo.td head/contrib/llvm/lib/Target/Mips/MipsSEFrameLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelDAGToDAG.h head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.cpp head/contrib/llvm/lib/Target/Mips/MipsSEISelLowering.h head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSEInstrInfo.h head/contrib/llvm/lib/Target/Mips/MipsSERegisterInfo.cpp head/contrib/llvm/lib/Target/Mips/MipsSchedule.td head/contrib/llvm/lib/Target/Mips/MipsScheduleP5600.td head/contrib/llvm/lib/Target/Mips/MipsSubtarget.cpp head/contrib/llvm/lib/Target/Mips/MipsSubtarget.h head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetMachine.h head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.cpp head/contrib/llvm/lib/Target/Mips/MipsTargetObjectFile.h head/contrib/llvm/lib/Target/Mips/MipsTargetStreamer.h head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCAsmInfo.cpp head/contrib/llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXMCTargetDesc.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTX.h head/contrib/llvm/lib/Target/NVPTX/NVPTX.td head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXAsmPrinter.h head/contrib/llvm/lib/Target/NVPTX/NVPTXFavorNonGenericAddrSpaces.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXFrameLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXGenericToNVVM.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.h head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXISelLowering.h head/contrib/llvm/lib/Target/NVPTX/NVPTXImageOptimizer.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXInstrInfo.td head/contrib/llvm/lib/Target/NVPTX/NVPTXIntrinsics.td head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXLowerKernelArgs.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXMCExpr.h head/contrib/llvm/lib/Target/NVPTX/NVPTXPeephole.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXPrologEpilogPass.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXSection.h head/contrib/llvm/lib/Target/NVPTX/NVPTXSubtarget.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetMachine.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetObjectFile.h head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXTargetTransformInfo.h head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.cpp head/contrib/llvm/lib/Target/NVPTX/NVPTXUtilities.h head/contrib/llvm/lib/Target/NVPTX/NVVMReflect.cpp head/contrib/llvm/lib/Target/PowerPC/AsmParser/PPCAsmParser.cpp head/contrib/llvm/lib/Target/PowerPC/Disassembler/PPCDisassembler.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/InstPrinter/PPCInstPrinter.h head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCAsmBackend.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCELFObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCCodeEmitter.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMCTargetDesc.cpp head/contrib/llvm/lib/Target/PowerPC/MCTargetDesc/PPCMachObjectWriter.cpp head/contrib/llvm/lib/Target/PowerPC/PPC.h head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp head/contrib/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp head/contrib/llvm/lib/Target/PowerPC/PPCBranchSelector.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp head/contrib/llvm/lib/Target/PowerPC/PPCCallingConv.td head/contrib/llvm/lib/Target/PowerPC/PPCEarlyReturn.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFastISel.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCHazardRecognizers.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelDAGToDAG.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.h head/contrib/llvm/lib/Target/PowerPC/PPCInstr64Bit.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrAltivec.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrFormats.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCInstrInfo.td head/contrib/llvm/lib/Target/PowerPC/PPCInstrVSX.td head/contrib/llvm/lib/Target/PowerPC/PPCLoopPreIncPrep.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMIPeephole.cpp head/contrib/llvm/lib/Target/PowerPC/PPCMachineFunctionInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCRegisterInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCSchedule.td head/contrib/llvm/lib/Target/PowerPC/PPCSchedule440.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleA2.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE500mc.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleE5500.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleG5.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP7.td head/contrib/llvm/lib/Target/PowerPC/PPCScheduleP8.td head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTLSDynamicCall.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTOCRegDeps.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetObjectFile.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp head/contrib/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.h head/contrib/llvm/lib/Target/PowerPC/PPCVSXCopy.cpp head/contrib/llvm/lib/Target/PowerPC/PPCVSXFMAMutate.cpp head/contrib/llvm/lib/Target/PowerPC/PPCVSXSwapRemoval.cpp head/contrib/llvm/lib/Target/Sparc/AsmParser/SparcAsmParser.cpp head/contrib/llvm/lib/Target/Sparc/DelaySlotFiller.cpp head/contrib/llvm/lib/Target/Sparc/Disassembler/SparcDisassembler.cpp head/contrib/llvm/lib/Target/Sparc/InstPrinter/SparcInstPrinter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcAsmBackend.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcELFObjectWriter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCCodeEmitter.cpp head/contrib/llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp head/contrib/llvm/lib/Target/Sparc/Sparc.h head/contrib/llvm/lib/Target/Sparc/Sparc.td head/contrib/llvm/lib/Target/Sparc/SparcAsmPrinter.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcFrameLowering.h head/contrib/llvm/lib/Target/Sparc/SparcISelDAGToDAG.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.cpp head/contrib/llvm/lib/Target/Sparc/SparcISelLowering.h head/contrib/llvm/lib/Target/Sparc/SparcInstr64Bit.td head/contrib/llvm/lib/Target/Sparc/SparcInstrAliases.td head/contrib/llvm/lib/Target/Sparc/SparcInstrFormats.td head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.h head/contrib/llvm/lib/Target/Sparc/SparcInstrInfo.td head/contrib/llvm/lib/Target/Sparc/SparcMCInstLower.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.cpp head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.h head/contrib/llvm/lib/Target/Sparc/SparcRegisterInfo.td head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.cpp head/contrib/llvm/lib/Target/Sparc/SparcSubtarget.h head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.cpp head/contrib/llvm/lib/Target/Sparc/SparcTargetMachine.h head/contrib/llvm/lib/Target/SystemZ/AsmParser/SystemZAsmParser.cpp head/contrib/llvm/lib/Target/SystemZ/Disassembler/SystemZDisassembler.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCObjectWriter.cpp head/contrib/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCTargetDesc.cpp head/contrib/llvm/lib/Target/SystemZ/README.txt head/contrib/llvm/lib/Target/SystemZ/SystemZ.h head/contrib/llvm/lib/Target/SystemZ/SystemZAsmPrinter.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.h head/contrib/llvm/lib/Target/SystemZ/SystemZCallingConv.td head/contrib/llvm/lib/Target/SystemZ/SystemZElimCompare.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZFrameLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZISelDAGToDAG.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZISelLowering.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrBuilder.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFP.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrFormats.td head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZInstrInfo.td head/contrib/llvm/lib/Target/SystemZ/SystemZLDCleanup.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZLongBranch.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZMachineFunctionInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZOperands.td head/contrib/llvm/lib/Target/SystemZ/SystemZOperators.td head/contrib/llvm/lib/Target/SystemZ/SystemZProcessors.td head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZRegisterInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSelectionDAGInfo.h head/contrib/llvm/lib/Target/SystemZ/SystemZShortenInst.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZSubtarget.h head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.cpp head/contrib/llvm/lib/Target/SystemZ/SystemZTargetMachine.h head/contrib/llvm/lib/Target/Target.cpp head/contrib/llvm/lib/Target/TargetLoweringObjectFile.cpp head/contrib/llvm/lib/Target/TargetMachine.cpp head/contrib/llvm/lib/Target/TargetMachineC.cpp head/contrib/llvm/lib/Target/TargetRecip.cpp head/contrib/llvm/lib/Target/TargetSubtargetInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/Disassembler/WebAssemblyDisassembler.cpp head/contrib/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.cpp head/contrib/llvm/lib/Target/WebAssembly/InstPrinter/WebAssemblyInstPrinter.h head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyAsmBackend.cpp head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyELFObjectWriter.cpp head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCAsmInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCCodeEmitter.cpp head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.cpp head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyMCTargetDesc.h head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.cpp head/contrib/llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyTargetStreamer.h head/contrib/llvm/lib/Target/WebAssembly/README.txt head/contrib/llvm/lib/Target/WebAssembly/WebAssembly.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyArgumentMove.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyCFGStackify.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFastISel.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyFrameLowering.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISD.def head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelDAGToDAG.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyISelLowering.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrFloat.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInfo.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrInteger.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyLowerBrUnless.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyMachineFunctionInfo.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyPeephole.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegColoring.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegNumbering.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegStackify.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyRegisterInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySelectionDAGInfo.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyStoreResults.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblySubtarget.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetMachine.h head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.cpp head/contrib/llvm/lib/Target/WebAssembly/WebAssemblyTargetTransformInfo.h head/contrib/llvm/lib/Target/WebAssembly/known_gcc_test_failures.txt head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmInstrumentation.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp head/contrib/llvm/lib/Target/X86/AsmParser/X86AsmParserCommon.h head/contrib/llvm/lib/Target/X86/AsmParser/X86Operand.h head/contrib/llvm/lib/Target/X86/Disassembler/X86Disassembler.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.cpp head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoder.h head/contrib/llvm/lib/Target/X86/Disassembler/X86DisassemblerDecoderCommon.h head/contrib/llvm/lib/Target/X86/InstPrinter/X86ATTInstPrinter.cpp head/contrib/llvm/lib/Target/X86/InstPrinter/X86InstComments.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86AsmBackend.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86BaseInfo.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86FixupKinds.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCAsmInfo.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCCodeEmitter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MCTargetDesc.h head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86MachObjectWriter.cpp head/contrib/llvm/lib/Target/X86/MCTargetDesc/X86WinCOFFObjectWriter.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.cpp head/contrib/llvm/lib/Target/X86/Utils/X86ShuffleDecode.h head/contrib/llvm/lib/Target/X86/X86.h head/contrib/llvm/lib/Target/X86/X86.td head/contrib/llvm/lib/Target/X86/X86AsmPrinter.cpp head/contrib/llvm/lib/Target/X86/X86AsmPrinter.h head/contrib/llvm/lib/Target/X86/X86CallFrameOptimization.cpp head/contrib/llvm/lib/Target/X86/X86CallingConv.td head/contrib/llvm/lib/Target/X86/X86ExpandPseudo.cpp head/contrib/llvm/lib/Target/X86/X86FastISel.cpp head/contrib/llvm/lib/Target/X86/X86FixupLEAs.cpp head/contrib/llvm/lib/Target/X86/X86FloatingPoint.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.cpp head/contrib/llvm/lib/Target/X86/X86FrameLowering.h head/contrib/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.cpp head/contrib/llvm/lib/Target/X86/X86ISelLowering.h head/contrib/llvm/lib/Target/X86/X86InstrAVX512.td head/contrib/llvm/lib/Target/X86/X86InstrBuilder.h head/contrib/llvm/lib/Target/X86/X86InstrCompiler.td head/contrib/llvm/lib/Target/X86/X86InstrControl.td head/contrib/llvm/lib/Target/X86/X86InstrFPStack.td head/contrib/llvm/lib/Target/X86/X86InstrFormats.td head/contrib/llvm/lib/Target/X86/X86InstrFragmentsSIMD.td head/contrib/llvm/lib/Target/X86/X86InstrInfo.cpp head/contrib/llvm/lib/Target/X86/X86InstrInfo.h head/contrib/llvm/lib/Target/X86/X86InstrInfo.td head/contrib/llvm/lib/Target/X86/X86InstrMMX.td head/contrib/llvm/lib/Target/X86/X86InstrMPX.td head/contrib/llvm/lib/Target/X86/X86InstrSSE.td head/contrib/llvm/lib/Target/X86/X86InstrSystem.td head/contrib/llvm/lib/Target/X86/X86InstrVMX.td head/contrib/llvm/lib/Target/X86/X86InstrXOP.td head/contrib/llvm/lib/Target/X86/X86IntrinsicsInfo.h head/contrib/llvm/lib/Target/X86/X86MCInstLower.cpp head/contrib/llvm/lib/Target/X86/X86MachineFunctionInfo.h head/contrib/llvm/lib/Target/X86/X86OptimizeLEAs.cpp head/contrib/llvm/lib/Target/X86/X86PadShortFunction.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.cpp head/contrib/llvm/lib/Target/X86/X86RegisterInfo.td head/contrib/llvm/lib/Target/X86/X86Schedule.td head/contrib/llvm/lib/Target/X86/X86ScheduleAtom.td head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.cpp head/contrib/llvm/lib/Target/X86/X86SelectionDAGInfo.h head/contrib/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.cpp head/contrib/llvm/lib/Target/X86/X86ShuffleDecodeConstantPool.h head/contrib/llvm/lib/Target/X86/X86Subtarget.cpp head/contrib/llvm/lib/Target/X86/X86Subtarget.h head/contrib/llvm/lib/Target/X86/X86TargetMachine.cpp head/contrib/llvm/lib/Target/X86/X86TargetMachine.h head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.cpp head/contrib/llvm/lib/Target/X86/X86TargetObjectFile.h head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.cpp head/contrib/llvm/lib/Target/X86/X86TargetTransformInfo.h head/contrib/llvm/lib/Target/X86/X86VZeroUpper.cpp head/contrib/llvm/lib/Target/X86/X86WinEHState.cpp head/contrib/llvm/lib/Target/XCore/Disassembler/XCoreDisassembler.cpp head/contrib/llvm/lib/Target/XCore/MCTargetDesc/XCoreMCTargetDesc.cpp head/contrib/llvm/lib/Target/XCore/XCoreAsmPrinter.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreFrameLowering.h head/contrib/llvm/lib/Target/XCore/XCoreFrameToArgsOffsetElim.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.cpp head/contrib/llvm/lib/Target/XCore/XCoreISelLowering.h head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreInstrInfo.h head/contrib/llvm/lib/Target/XCore/XCoreLowerThreadLocal.cpp head/contrib/llvm/lib/Target/XCore/XCoreSelectionDAGInfo.cpp head/contrib/llvm/lib/Target/XCore/XCoreSelectionDAGInfo.h head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetMachine.h head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.cpp head/contrib/llvm/lib/Target/XCore/XCoreTargetObjectFile.h head/contrib/llvm/lib/Transforms/IPO/ArgumentPromotion.cpp head/contrib/llvm/lib/Transforms/IPO/ConstantMerge.cpp head/contrib/llvm/lib/Transforms/IPO/CrossDSOCFI.cpp head/contrib/llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp head/contrib/llvm/lib/Transforms/IPO/ElimAvailExtern.cpp head/contrib/llvm/lib/Transforms/IPO/ExtractGV.cpp head/contrib/llvm/lib/Transforms/IPO/ForceFunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/FunctionImport.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalDCE.cpp head/contrib/llvm/lib/Transforms/IPO/GlobalOpt.cpp head/contrib/llvm/lib/Transforms/IPO/IPConstantPropagation.cpp head/contrib/llvm/lib/Transforms/IPO/IPO.cpp head/contrib/llvm/lib/Transforms/IPO/InferFunctionAttrs.cpp head/contrib/llvm/lib/Transforms/IPO/InlineAlways.cpp head/contrib/llvm/lib/Transforms/IPO/InlineSimple.cpp head/contrib/llvm/lib/Transforms/IPO/Inliner.cpp head/contrib/llvm/lib/Transforms/IPO/Internalize.cpp head/contrib/llvm/lib/Transforms/IPO/LoopExtractor.cpp head/contrib/llvm/lib/Transforms/IPO/MergeFunctions.cpp head/contrib/llvm/lib/Transforms/IPO/PartialInlining.cpp head/contrib/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp head/contrib/llvm/lib/Transforms/IPO/PruneEH.cpp head/contrib/llvm/lib/Transforms/IPO/SampleProfile.cpp head/contrib/llvm/lib/Transforms/IPO/StripDeadPrototypes.cpp head/contrib/llvm/lib/Transforms/IPO/StripSymbols.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAddSub.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineInternal.h head/contrib/llvm/lib/Transforms/InstCombine/InstCombineLoadStoreAlloca.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp head/contrib/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp head/contrib/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/BoundsChecking.cpp head/contrib/llvm/lib/Transforms/Instrumentation/CFGMST.h head/contrib/llvm/lib/Transforms/Instrumentation/DataFlowSanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/GCOVProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp head/contrib/llvm/lib/Transforms/Instrumentation/Instrumentation.cpp head/contrib/llvm/lib/Transforms/Instrumentation/MemorySanitizer.cpp head/contrib/llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp head/contrib/llvm/lib/Transforms/Instrumentation/SanitizerCoverage.cpp head/contrib/llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp head/contrib/llvm/lib/Transforms/ObjCARC/BlotMapVector.h head/contrib/llvm/lib/Transforms/ObjCARC/DependencyAnalysis.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARC.h head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCAPElim.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCContract.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCExpand.cpp head/contrib/llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp head/contrib/llvm/lib/Transforms/Scalar/ADCE.cpp head/contrib/llvm/lib/Transforms/Scalar/AlignmentFromAssumptions.cpp head/contrib/llvm/lib/Transforms/Scalar/BDCE.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantHoisting.cpp head/contrib/llvm/lib/Transforms/Scalar/ConstantProp.cpp head/contrib/llvm/lib/Transforms/Scalar/CorrelatedValuePropagation.cpp head/contrib/llvm/lib/Transforms/Scalar/DCE.cpp head/contrib/llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/EarlyCSE.cpp head/contrib/llvm/lib/Transforms/Scalar/Float2Int.cpp head/contrib/llvm/lib/Transforms/Scalar/GVN.cpp head/contrib/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/InductiveRangeCheckElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/JumpThreading.cpp head/contrib/llvm/lib/Transforms/Scalar/LICM.cpp head/contrib/llvm/lib/Transforms/Scalar/LoadCombine.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDeletion.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopDistribute.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopIdiomRecognize.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInstSimplify.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopInterchange.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopLoadElimination.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRerollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopRotation.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnrollPass.cpp head/contrib/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp head/contrib/llvm/lib/Transforms/Scalar/LowerAtomic.cpp head/contrib/llvm/lib/Transforms/Scalar/LowerExpectIntrinsic.cpp head/contrib/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp head/contrib/llvm/lib/Transforms/Scalar/MergedLoadStoreMotion.cpp head/contrib/llvm/lib/Transforms/Scalar/NaryReassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/PartiallyInlineLibCalls.cpp head/contrib/llvm/lib/Transforms/Scalar/PlaceSafepoints.cpp head/contrib/llvm/lib/Transforms/Scalar/Reassociate.cpp head/contrib/llvm/lib/Transforms/Scalar/Reg2Mem.cpp head/contrib/llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp head/contrib/llvm/lib/Transforms/Scalar/SCCP.cpp head/contrib/llvm/lib/Transforms/Scalar/SROA.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalar.cpp head/contrib/llvm/lib/Transforms/Scalar/Scalarizer.cpp head/contrib/llvm/lib/Transforms/Scalar/SeparateConstOffsetFromGEP.cpp head/contrib/llvm/lib/Transforms/Scalar/SimplifyCFGPass.cpp head/contrib/llvm/lib/Transforms/Scalar/Sink.cpp head/contrib/llvm/lib/Transforms/Scalar/SpeculativeExecution.cpp head/contrib/llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp head/contrib/llvm/lib/Transforms/Scalar/StructurizeCFG.cpp head/contrib/llvm/lib/Transforms/Scalar/TailRecursionElimination.cpp head/contrib/llvm/lib/Transforms/Utils/ASanStackFrameLayout.cpp head/contrib/llvm/lib/Transforms/Utils/AddDiscriminators.cpp head/contrib/llvm/lib/Transforms/Utils/BasicBlockUtils.cpp head/contrib/llvm/lib/Transforms/Utils/BreakCriticalEdges.cpp head/contrib/llvm/lib/Transforms/Utils/BuildLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/CloneFunction.cpp head/contrib/llvm/lib/Transforms/Utils/CloneModule.cpp head/contrib/llvm/lib/Transforms/Utils/CodeExtractor.cpp head/contrib/llvm/lib/Transforms/Utils/GlobalStatus.cpp head/contrib/llvm/lib/Transforms/Utils/InlineFunction.cpp head/contrib/llvm/lib/Transforms/Utils/InstructionNamer.cpp head/contrib/llvm/lib/Transforms/Utils/IntegerDivision.cpp head/contrib/llvm/lib/Transforms/Utils/LCSSA.cpp head/contrib/llvm/lib/Transforms/Utils/Local.cpp head/contrib/llvm/lib/Transforms/Utils/LoopSimplify.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnroll.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUnrollRuntime.cpp head/contrib/llvm/lib/Transforms/Utils/LoopUtils.cpp head/contrib/llvm/lib/Transforms/Utils/LoopVersioning.cpp head/contrib/llvm/lib/Transforms/Utils/LowerInvoke.cpp head/contrib/llvm/lib/Transforms/Utils/LowerSwitch.cpp head/contrib/llvm/lib/Transforms/Utils/Mem2Reg.cpp head/contrib/llvm/lib/Transforms/Utils/ModuleUtils.cpp head/contrib/llvm/lib/Transforms/Utils/PromoteMemoryToRegister.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyCFG.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyIndVar.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyInstructions.cpp head/contrib/llvm/lib/Transforms/Utils/SimplifyLibCalls.cpp head/contrib/llvm/lib/Transforms/Utils/SplitModule.cpp head/contrib/llvm/lib/Transforms/Utils/SymbolRewriter.cpp head/contrib/llvm/lib/Transforms/Utils/UnifyFunctionExitNodes.cpp head/contrib/llvm/lib/Transforms/Utils/Utils.cpp head/contrib/llvm/lib/Transforms/Utils/ValueMapper.cpp head/contrib/llvm/lib/Transforms/Vectorize/BBVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp head/contrib/llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp head/contrib/llvm/lib/Transforms/Vectorize/Vectorize.cpp head/contrib/llvm/tools/bugpoint/BugDriver.h head/contrib/llvm/tools/bugpoint/CrashDebugger.cpp head/contrib/llvm/tools/bugpoint/ExecutionDriver.cpp head/contrib/llvm/tools/bugpoint/ExtractFunction.cpp head/contrib/llvm/tools/bugpoint/Miscompilation.cpp head/contrib/llvm/tools/bugpoint/OptimizerDriver.cpp head/contrib/llvm/tools/bugpoint/ToolRunner.cpp head/contrib/llvm/tools/bugpoint/bugpoint.cpp head/contrib/llvm/tools/clang/LICENSE.TXT head/contrib/llvm/tools/clang/include/clang-c/Index.h head/contrib/llvm/tools/clang/include/clang/ARCMigrate/ARCMTActions.h head/contrib/llvm/tools/clang/include/clang/AST/ASTConsumer.h head/contrib/llvm/tools/clang/include/clang/AST/ASTContext.h head/contrib/llvm/tools/clang/include/clang/AST/ASTImporter.h head/contrib/llvm/tools/clang/include/clang/AST/ASTMutationListener.h head/contrib/llvm/tools/clang/include/clang/AST/ASTTypeTraits.h head/contrib/llvm/tools/clang/include/clang/AST/Attr.h head/contrib/llvm/tools/clang/include/clang/AST/BaseSubobject.h head/contrib/llvm/tools/clang/include/clang/AST/BuiltinTypes.def head/contrib/llvm/tools/clang/include/clang/AST/CanonicalType.h head/contrib/llvm/tools/clang/include/clang/AST/CharUnits.h head/contrib/llvm/tools/clang/include/clang/AST/Decl.h head/contrib/llvm/tools/clang/include/clang/AST/DeclBase.h head/contrib/llvm/tools/clang/include/clang/AST/DeclCXX.h head/contrib/llvm/tools/clang/include/clang/AST/DeclFriend.h head/contrib/llvm/tools/clang/include/clang/AST/DeclObjC.h head/contrib/llvm/tools/clang/include/clang/AST/DeclOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/DeclTemplate.h head/contrib/llvm/tools/clang/include/clang/AST/DeclarationName.h head/contrib/llvm/tools/clang/include/clang/AST/Expr.h head/contrib/llvm/tools/clang/include/clang/AST/ExprCXX.h head/contrib/llvm/tools/clang/include/clang/AST/ExprObjC.h head/contrib/llvm/tools/clang/include/clang/AST/ExprOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/ExternalASTSource.h head/contrib/llvm/tools/clang/include/clang/AST/GlobalDecl.h head/contrib/llvm/tools/clang/include/clang/AST/LambdaCapture.h head/contrib/llvm/tools/clang/include/clang/AST/Mangle.h head/contrib/llvm/tools/clang/include/clang/AST/OpenMPClause.h head/contrib/llvm/tools/clang/include/clang/AST/OperationKinds.h head/contrib/llvm/tools/clang/include/clang/AST/PrettyPrinter.h head/contrib/llvm/tools/clang/include/clang/AST/RecordLayout.h head/contrib/llvm/tools/clang/include/clang/AST/RecursiveASTVisitor.h head/contrib/llvm/tools/clang/include/clang/AST/Stmt.h head/contrib/llvm/tools/clang/include/clang/AST/StmtCXX.h head/contrib/llvm/tools/clang/include/clang/AST/StmtGraphTraits.h head/contrib/llvm/tools/clang/include/clang/AST/StmtObjC.h head/contrib/llvm/tools/clang/include/clang/AST/StmtOpenMP.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateBase.h head/contrib/llvm/tools/clang/include/clang/AST/TemplateName.h head/contrib/llvm/tools/clang/include/clang/AST/Type.h head/contrib/llvm/tools/clang/include/clang/AST/TypeLoc.h head/contrib/llvm/tools/clang/include/clang/AST/UnresolvedSet.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchFinder.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchers.h head/contrib/llvm/tools/clang/include/clang/ASTMatchers/ASTMatchersInternal.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/Dominators.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/FormatString.h head/contrib/llvm/tools/clang/include/clang/Analysis/Analyses/ThreadSafetyUtil.h head/contrib/llvm/tools/clang/include/clang/Analysis/AnalysisContext.h head/contrib/llvm/tools/clang/include/clang/Analysis/ProgramPoint.h head/contrib/llvm/tools/clang/include/clang/Basic/AddressSpaces.h head/contrib/llvm/tools/clang/include/clang/Basic/Attr.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrDocs.td head/contrib/llvm/tools/clang/include/clang/Basic/AttrKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.def head/contrib/llvm/tools/clang/include/clang/Basic/Builtins.h head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAArch64.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsAMDGPU.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsARM.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsHexagon.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsNVPTX.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsPPC.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsSystemZ.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsWebAssembly.def head/contrib/llvm/tools/clang/include/clang/Basic/BuiltinsX86.def head/contrib/llvm/tools/clang/include/clang/Basic/DeclNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/Diagnostic.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticASTKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticCommonKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticDriverKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticFrontendKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticGroups.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticIDs.h head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticLexKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticParseKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/DiagnosticSemaKinds.td head/contrib/llvm/tools/clang/include/clang/Basic/FileManager.h head/contrib/llvm/tools/clang/include/clang/Basic/IdentifierTable.h head/contrib/llvm/tools/clang/include/clang/Basic/Lambda.h head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.def head/contrib/llvm/tools/clang/include/clang/Basic/LangOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/ObjCRuntime.h head/contrib/llvm/tools/clang/include/clang/Basic/OpenCLExtensions.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/OpenMPKinds.h head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.def head/contrib/llvm/tools/clang/include/clang/Basic/Sanitizers.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceLocation.h head/contrib/llvm/tools/clang/include/clang/Basic/SourceManager.h head/contrib/llvm/tools/clang/include/clang/Basic/Specifiers.h head/contrib/llvm/tools/clang/include/clang/Basic/StmtNodes.td head/contrib/llvm/tools/clang/include/clang/Basic/TargetCXXABI.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetInfo.h head/contrib/llvm/tools/clang/include/clang/Basic/TargetOptions.h head/contrib/llvm/tools/clang/include/clang/Basic/TokenKinds.def head/contrib/llvm/tools/clang/include/clang/Basic/TypeTraits.h head/contrib/llvm/tools/clang/include/clang/Basic/VersionTuple.h head/contrib/llvm/tools/clang/include/clang/Basic/VirtualFileSystem.h head/contrib/llvm/tools/clang/include/clang/Basic/arm_neon.td head/contrib/llvm/tools/clang/include/clang/CodeGen/BackendUtil.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CGFunctionInfo.h head/contrib/llvm/tools/clang/include/clang/CodeGen/CodeGenABITypes.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ModuleBuilder.h head/contrib/llvm/tools/clang/include/clang/CodeGen/ObjectFilePCHContainerOperations.h head/contrib/llvm/tools/clang/include/clang/Driver/Action.h head/contrib/llvm/tools/clang/include/clang/Driver/CC1Options.td head/contrib/llvm/tools/clang/include/clang/Driver/CLCompatOptions.td head/contrib/llvm/tools/clang/include/clang/Driver/Compilation.h head/contrib/llvm/tools/clang/include/clang/Driver/Driver.h head/contrib/llvm/tools/clang/include/clang/Driver/Job.h head/contrib/llvm/tools/clang/include/clang/Driver/Multilib.h head/contrib/llvm/tools/clang/include/clang/Driver/Options.td head/contrib/llvm/tools/clang/include/clang/Driver/SanitizerArgs.h head/contrib/llvm/tools/clang/include/clang/Driver/ToolChain.h head/contrib/llvm/tools/clang/include/clang/Driver/Types.def head/contrib/llvm/tools/clang/include/clang/Format/Format.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Frontend/ASTUnit.h head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.def head/contrib/llvm/tools/clang/include/clang/Frontend/CodeGenOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInstance.h head/contrib/llvm/tools/clang/include/clang/Frontend/CompilerInvocation.h head/contrib/llvm/tools/clang/include/clang/Frontend/DependencyOutputOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendAction.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Frontend/FrontendOptions.h head/contrib/llvm/tools/clang/include/clang/Frontend/LangStandards.def head/contrib/llvm/tools/clang/include/clang/Frontend/MultiplexConsumer.h head/contrib/llvm/tools/clang/include/clang/Frontend/PCHContainerOperations.h head/contrib/llvm/tools/clang/include/clang/Frontend/TextDiagnosticPrinter.h head/contrib/llvm/tools/clang/include/clang/Frontend/Utils.h head/contrib/llvm/tools/clang/include/clang/Index/USRGeneration.h head/contrib/llvm/tools/clang/include/clang/Lex/DirectoryLookup.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderMap.h head/contrib/llvm/tools/clang/include/clang/Lex/HeaderSearch.h head/contrib/llvm/tools/clang/include/clang/Lex/Lexer.h head/contrib/llvm/tools/clang/include/clang/Lex/LiteralSupport.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroArgs.h head/contrib/llvm/tools/clang/include/clang/Lex/MacroInfo.h head/contrib/llvm/tools/clang/include/clang/Lex/ModuleMap.h head/contrib/llvm/tools/clang/include/clang/Lex/Preprocessor.h head/contrib/llvm/tools/clang/include/clang/Lex/Token.h head/contrib/llvm/tools/clang/include/clang/Parse/Parser.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/ASTConsumers.h head/contrib/llvm/tools/clang/include/clang/Rewrite/Frontend/FrontendActions.h head/contrib/llvm/tools/clang/include/clang/Sema/AttributeList.h head/contrib/llvm/tools/clang/include/clang/Sema/CodeCompleteConsumer.h head/contrib/llvm/tools/clang/include/clang/Sema/DeclSpec.h head/contrib/llvm/tools/clang/include/clang/Sema/ExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/Initialization.h head/contrib/llvm/tools/clang/include/clang/Sema/Lookup.h head/contrib/llvm/tools/clang/include/clang/Sema/MultiplexExternalSemaSource.h head/contrib/llvm/tools/clang/include/clang/Sema/ObjCMethodList.h head/contrib/llvm/tools/clang/include/clang/Sema/Overload.h head/contrib/llvm/tools/clang/include/clang/Sema/Ownership.h head/contrib/llvm/tools/clang/include/clang/Sema/ParsedTemplate.h head/contrib/llvm/tools/clang/include/clang/Sema/Scope.h head/contrib/llvm/tools/clang/include/clang/Sema/ScopeInfo.h head/contrib/llvm/tools/clang/include/clang/Sema/Sema.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaInternal.h head/contrib/llvm/tools/clang/include/clang/Sema/SemaLambda.h head/contrib/llvm/tools/clang/include/clang/Sema/TemplateDeduction.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTBitCodes.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTReader.h head/contrib/llvm/tools/clang/include/clang/Serialization/ASTWriter.h head/contrib/llvm/tools/clang/include/clang/Serialization/Module.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/BugReporterVisitor.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/BugReporter/PathDiagnostic.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/Checker.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/CheckerManager.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CallEvent.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CheckerContext.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/CoreEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/Environment.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExplodedGraph.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ExprEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/MemRegion.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SValBuilder.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SVals.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SubEngine.h head/contrib/llvm/tools/clang/include/clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h head/contrib/llvm/tools/clang/include/clang/Tooling/CommonOptionsParser.h head/contrib/llvm/tools/clang/include/clang/Tooling/Core/Replacement.h head/contrib/llvm/tools/clang/include/clang/Tooling/Refactoring.h head/contrib/llvm/tools/clang/include/clang/Tooling/Tooling.h head/contrib/llvm/tools/clang/include/clang/module.modulemap head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/ARCMTActions.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/ObjCMT.cpp head/contrib/llvm/tools/clang/lib/ARCMigrate/TransProperties.cpp head/contrib/llvm/tools/clang/lib/AST/APValue.cpp head/contrib/llvm/tools/clang/lib/AST/ASTConsumer.cpp head/contrib/llvm/tools/clang/lib/AST/ASTContext.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDiagnostic.cpp head/contrib/llvm/tools/clang/lib/AST/ASTDumper.cpp head/contrib/llvm/tools/clang/lib/AST/ASTImporter.cpp head/contrib/llvm/tools/clang/lib/AST/ASTTypeTraits.cpp head/contrib/llvm/tools/clang/lib/AST/CXXInheritance.cpp head/contrib/llvm/tools/clang/lib/AST/Comment.cpp head/contrib/llvm/tools/clang/lib/AST/CommentLexer.cpp head/contrib/llvm/tools/clang/lib/AST/CommentSema.cpp head/contrib/llvm/tools/clang/lib/AST/Decl.cpp head/contrib/llvm/tools/clang/lib/AST/DeclBase.cpp head/contrib/llvm/tools/clang/lib/AST/DeclCXX.cpp head/contrib/llvm/tools/clang/lib/AST/DeclObjC.cpp head/contrib/llvm/tools/clang/lib/AST/DeclOpenMP.cpp head/contrib/llvm/tools/clang/lib/AST/DeclPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/DeclTemplate.cpp head/contrib/llvm/tools/clang/lib/AST/DeclarationName.cpp head/contrib/llvm/tools/clang/lib/AST/Expr.cpp head/contrib/llvm/tools/clang/lib/AST/ExprCXX.cpp head/contrib/llvm/tools/clang/lib/AST/ExprClassification.cpp head/contrib/llvm/tools/clang/lib/AST/ExprConstant.cpp head/contrib/llvm/tools/clang/lib/AST/ItaniumMangle.cpp head/contrib/llvm/tools/clang/lib/AST/Mangle.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/AST/MicrosoftMangle.cpp head/contrib/llvm/tools/clang/lib/AST/NSAPI.cpp head/contrib/llvm/tools/clang/lib/AST/NestedNameSpecifier.cpp head/contrib/llvm/tools/clang/lib/AST/OpenMPClause.cpp head/contrib/llvm/tools/clang/lib/AST/ParentMap.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayout.cpp head/contrib/llvm/tools/clang/lib/AST/RecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/AST/Stmt.cpp head/contrib/llvm/tools/clang/lib/AST/StmtCXX.cpp head/contrib/llvm/tools/clang/lib/AST/StmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/AST/StmtPrinter.cpp head/contrib/llvm/tools/clang/lib/AST/StmtProfile.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateBase.cpp head/contrib/llvm/tools/clang/lib/AST/TemplateName.cpp head/contrib/llvm/tools/clang/lib/AST/Type.cpp head/contrib/llvm/tools/clang/lib/AST/TypeLoc.cpp head/contrib/llvm/tools/clang/lib/AST/TypePrinter.cpp head/contrib/llvm/tools/clang/lib/AST/VTableBuilder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchFinder.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/ASTMatchersInternal.cpp head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Marshallers.h head/contrib/llvm/tools/clang/lib/ASTMatchers/Dynamic/Registry.cpp head/contrib/llvm/tools/clang/lib/Analysis/AnalysisDeclContext.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.cpp head/contrib/llvm/tools/clang/lib/Analysis/BodyFarm.h head/contrib/llvm/tools/clang/lib/Analysis/CFG.cpp head/contrib/llvm/tools/clang/lib/Analysis/CallGraph.cpp head/contrib/llvm/tools/clang/lib/Analysis/Consumed.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/FormatStringParsing.h head/contrib/llvm/tools/clang/lib/Analysis/PrintfFormatString.cpp head/contrib/llvm/tools/clang/lib/Analysis/PseudoConstantAnalysis.cpp head/contrib/llvm/tools/clang/lib/Analysis/ScanfFormatString.cpp head/contrib/llvm/tools/clang/lib/Basic/Builtins.cpp head/contrib/llvm/tools/clang/lib/Basic/Diagnostic.cpp head/contrib/llvm/tools/clang/lib/Basic/DiagnosticIDs.cpp head/contrib/llvm/tools/clang/lib/Basic/FileManager.cpp head/contrib/llvm/tools/clang/lib/Basic/IdentifierTable.cpp head/contrib/llvm/tools/clang/lib/Basic/LangOptions.cpp head/contrib/llvm/tools/clang/lib/Basic/Module.cpp head/contrib/llvm/tools/clang/lib/Basic/OpenMPKinds.cpp head/contrib/llvm/tools/clang/lib/Basic/OperatorPrecedence.cpp head/contrib/llvm/tools/clang/lib/Basic/SourceManager.cpp head/contrib/llvm/tools/clang/lib/Basic/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Basic/Targets.cpp head/contrib/llvm/tools/clang/lib/Basic/Version.cpp head/contrib/llvm/tools/clang/lib/Basic/VirtualFileSystem.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ABIInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/BackendUtil.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGAtomic.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBlocks.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGBuilder.h head/contrib/llvm/tools/clang/lib/CodeGen/CGBuiltin.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDANV.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCUDARuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCXXABI.h head/contrib/llvm/tools/clang/lib/CodeGen/CGCall.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGClass.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGCleanup.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDebugInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGDecl.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGDeclCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGException.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExpr.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprAgg.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprCXX.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprConstant.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGExprScalar.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGLoopInfo.h head/contrib/llvm/tools/clang/lib/CodeGen/CGObjC.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCGNU.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCMac.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGObjCRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenCLRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGOpenMPRuntime.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayout.h head/contrib/llvm/tools/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmt.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGStmtOpenMP.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTT.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGVTables.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CGValue.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenABITypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenAction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenFunction.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenModule.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenPGO.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTBAA.h head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CodeGenTypes.h head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.cpp head/contrib/llvm/tools/clang/lib/CodeGen/CoverageMappingGen.h head/contrib/llvm/tools/clang/lib/CodeGen/EHScopeStack.h head/contrib/llvm/tools/clang/lib/CodeGen/ItaniumCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/MicrosoftCXXABI.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ModuleBuilder.cpp head/contrib/llvm/tools/clang/lib/CodeGen/ObjectFilePCHContainerOperations.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.h head/contrib/llvm/tools/clang/lib/Driver/Action.cpp head/contrib/llvm/tools/clang/lib/Driver/Compilation.cpp head/contrib/llvm/tools/clang/lib/Driver/CrossWindowsToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/Driver.cpp head/contrib/llvm/tools/clang/lib/Driver/Job.cpp head/contrib/llvm/tools/clang/lib/Driver/MSVCToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/SanitizerArgs.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChain.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.cpp head/contrib/llvm/tools/clang/lib/Driver/ToolChains.h head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.h head/contrib/llvm/tools/clang/lib/Driver/Types.cpp head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.cpp head/contrib/llvm/tools/clang/lib/Format/ContinuationIndenter.h head/contrib/llvm/tools/clang/lib/Format/Encoding.h head/contrib/llvm/tools/clang/lib/Format/Format.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.cpp head/contrib/llvm/tools/clang/lib/Format/FormatToken.h head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.cpp head/contrib/llvm/tools/clang/lib/Format/TokenAnnotator.h head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineFormatter.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.cpp head/contrib/llvm/tools/clang/lib/Format/UnwrappedLineParser.h head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.cpp head/contrib/llvm/tools/clang/lib/Format/WhitespaceManager.h head/contrib/llvm/tools/clang/lib/Frontend/ASTConsumers.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTMerge.cpp head/contrib/llvm/tools/clang/lib/Frontend/ASTUnit.cpp head/contrib/llvm/tools/clang/lib/Frontend/CacheTokens.cpp head/contrib/llvm/tools/clang/lib/Frontend/ChainedIncludesSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInstance.cpp head/contrib/llvm/tools/clang/lib/Frontend/CompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp head/contrib/llvm/tools/clang/lib/Frontend/DependencyFile.cpp head/contrib/llvm/tools/clang/lib/Frontend/DiagnosticRenderer.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendAction.cpp head/contrib/llvm/tools/clang/lib/Frontend/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/HeaderIncludeGen.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitHeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Frontend/InitPreprocessor.cpp head/contrib/llvm/tools/clang/lib/Frontend/LayoutOverrideSource.cpp head/contrib/llvm/tools/clang/lib/Frontend/ModuleDependencyCollector.cpp head/contrib/llvm/tools/clang/lib/Frontend/MultiplexConsumer.cpp head/contrib/llvm/tools/clang/lib/Frontend/PCHContainerOperations.cpp head/contrib/llvm/tools/clang/lib/Frontend/PrintPreprocessedOutput.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/FrontendActions.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/HTMLPrint.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/InclusionRewriter.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteModernObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/Rewrite/RewriteObjC.cpp head/contrib/llvm/tools/clang/lib/Frontend/SerializedDiagnosticPrinter.cpp head/contrib/llvm/tools/clang/lib/Frontend/TestModuleFileExtension.cpp head/contrib/llvm/tools/clang/lib/Frontend/TextDiagnostic.cpp head/contrib/llvm/tools/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp head/contrib/llvm/tools/clang/lib/Headers/__clang_cuda_runtime_wrapper.h head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_aes.h head/contrib/llvm/tools/clang/lib/Headers/__wmmintrin_pclmul.h head/contrib/llvm/tools/clang/lib/Headers/altivec.h head/contrib/llvm/tools/clang/lib/Headers/ammintrin.h head/contrib/llvm/tools/clang/lib/Headers/arm_acle.h head/contrib/llvm/tools/clang/lib/Headers/avx2intrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512bwintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512cdintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512dqintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512erintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512fintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlbwintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vldqintrin.h head/contrib/llvm/tools/clang/lib/Headers/avx512vlintrin.h head/contrib/llvm/tools/clang/lib/Headers/avxintrin.h head/contrib/llvm/tools/clang/lib/Headers/bmiintrin.h head/contrib/llvm/tools/clang/lib/Headers/cpuid.h head/contrib/llvm/tools/clang/lib/Headers/cuda_builtin_vars.h head/contrib/llvm/tools/clang/lib/Headers/emmintrin.h head/contrib/llvm/tools/clang/lib/Headers/f16cintrin.h head/contrib/llvm/tools/clang/lib/Headers/float.h head/contrib/llvm/tools/clang/lib/Headers/fma4intrin.h head/contrib/llvm/tools/clang/lib/Headers/fmaintrin.h head/contrib/llvm/tools/clang/lib/Headers/htmintrin.h head/contrib/llvm/tools/clang/lib/Headers/htmxlintrin.h head/contrib/llvm/tools/clang/lib/Headers/ia32intrin.h head/contrib/llvm/tools/clang/lib/Headers/immintrin.h head/contrib/llvm/tools/clang/lib/Headers/inttypes.h head/contrib/llvm/tools/clang/lib/Headers/mm3dnow.h head/contrib/llvm/tools/clang/lib/Headers/mmintrin.h head/contrib/llvm/tools/clang/lib/Headers/module.modulemap head/contrib/llvm/tools/clang/lib/Headers/pkuintrin.h head/contrib/llvm/tools/clang/lib/Headers/pmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/popcntintrin.h head/contrib/llvm/tools/clang/lib/Headers/smmintrin.h head/contrib/llvm/tools/clang/lib/Headers/tbmintrin.h head/contrib/llvm/tools/clang/lib/Headers/tmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/unwind.h head/contrib/llvm/tools/clang/lib/Headers/x86intrin.h head/contrib/llvm/tools/clang/lib/Headers/xmmintrin.h head/contrib/llvm/tools/clang/lib/Headers/xopintrin.h head/contrib/llvm/tools/clang/lib/Index/CommentToXML.cpp head/contrib/llvm/tools/clang/lib/Index/USRGeneration.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderMap.cpp head/contrib/llvm/tools/clang/lib/Lex/HeaderSearch.cpp head/contrib/llvm/tools/clang/lib/Lex/Lexer.cpp head/contrib/llvm/tools/clang/lib/Lex/LiteralSupport.cpp head/contrib/llvm/tools/clang/lib/Lex/MacroInfo.cpp head/contrib/llvm/tools/clang/lib/Lex/ModuleMap.cpp head/contrib/llvm/tools/clang/lib/Lex/PPCaching.cpp head/contrib/llvm/tools/clang/lib/Lex/PPDirectives.cpp head/contrib/llvm/tools/clang/lib/Lex/PPExpressions.cpp head/contrib/llvm/tools/clang/lib/Lex/PPLexerChange.cpp head/contrib/llvm/tools/clang/lib/Lex/PPMacroExpansion.cpp head/contrib/llvm/tools/clang/lib/Lex/Pragma.cpp head/contrib/llvm/tools/clang/lib/Lex/Preprocessor.cpp head/contrib/llvm/tools/clang/lib/Lex/TokenLexer.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseAST.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseCXXInlineMethods.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDecl.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExpr.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseExprCXX.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseInit.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseObjc.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseOpenMP.cpp head/contrib/llvm/tools/clang/lib/Parse/ParsePragma.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmt.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTemplate.cpp head/contrib/llvm/tools/clang/lib/Parse/ParseTentative.cpp head/contrib/llvm/tools/clang/lib/Parse/Parser.cpp head/contrib/llvm/tools/clang/lib/Rewrite/HTMLRewrite.cpp head/contrib/llvm/tools/clang/lib/Rewrite/RewriteRope.cpp head/contrib/llvm/tools/clang/lib/Sema/AnalysisBasedWarnings.cpp head/contrib/llvm/tools/clang/lib/Sema/AttributeList.cpp head/contrib/llvm/tools/clang/lib/Sema/CodeCompleteConsumer.cpp head/contrib/llvm/tools/clang/lib/Sema/DeclSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/IdentifierResolver.cpp head/contrib/llvm/tools/clang/lib/Sema/JumpDiagnostics.cpp head/contrib/llvm/tools/clang/lib/Sema/MultiplexExternalSemaSource.cpp head/contrib/llvm/tools/clang/lib/Sema/Scope.cpp head/contrib/llvm/tools/clang/lib/Sema/ScopeInfo.cpp head/contrib/llvm/tools/clang/lib/Sema/Sema.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAccess.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCUDA.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCXXScopeSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCast.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaChecking.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCodeComplete.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaCoroutine.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaDeclObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExceptionSpec.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExpr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprCXX.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprMember.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaExprObjC.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaInit.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLambda.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaLookup.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaObjCProperty.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOpenMP.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaOverload.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaPseudoObject.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmt.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAsm.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaStmtAttr.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateDeduction.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiate.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaTemplateVariadic.cpp head/contrib/llvm/tools/clang/lib/Sema/SemaType.cpp head/contrib/llvm/tools/clang/lib/Sema/TreeTransform.h head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.cpp head/contrib/llvm/tools/clang/lib/Sema/TypeLocBuilder.h head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTCommon.h head/contrib/llvm/tools/clang/lib/Serialization/ASTReader.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTReaderStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriter.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterDecl.cpp head/contrib/llvm/tools/clang/lib/Serialization/ASTWriterStmt.cpp head/contrib/llvm/tools/clang/lib/Serialization/GeneratePCH.cpp head/contrib/llvm/tools/clang/lib/Serialization/GlobalModuleIndex.cpp head/contrib/llvm/tools/clang/lib/Serialization/Module.cpp head/contrib/llvm/tools/clang/lib/Serialization/ModuleManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/AnalyzerStatsChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ArrayBoundCheckerV2.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/BasicObjCFoundationChecks.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CStringChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckObjCDealloc.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/CheckerDocumentation.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ChrootChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangCheckers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ClangSACheckers.h head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DeadStoresChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DereferenceChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DirectIvarAssignment.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/DynamicTypePropagation.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ExprInspectionChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/IvarInvalidationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/LocalizationChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MacOSXAPIChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/MallocOverflowSecurityChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NSErrorChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/NullabilityChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/ObjCContainersChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PaddingChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/PointerArithChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/RetainCountChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/SimpleStreamChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/StackAddrEscapeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/TraversalChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UndefBranchChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/UnreachableCodeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VLASizeChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/VforkChecker.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporter.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/BugReporterVisitors.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CallEvent.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerContext.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerHelpers.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CheckerRegistry.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExplodedGraph.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngine.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ExprEngineCallAndReturn.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/HTMLDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/IssueHash.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/MemRegion.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PathDiagnostic.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/PlistDiagnostics.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/ProgramState.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/RegionStore.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SValBuilder.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SVals.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/SymbolManager.cpp head/contrib/llvm/tools/clang/lib/StaticAnalyzer/Frontend/AnalysisConsumer.cpp head/contrib/llvm/tools/clang/lib/Tooling/CommonOptionsParser.cpp head/contrib/llvm/tools/clang/lib/Tooling/CompilationDatabase.cpp head/contrib/llvm/tools/clang/lib/Tooling/Core/Replacement.cpp head/contrib/llvm/tools/clang/lib/Tooling/Refactoring.cpp head/contrib/llvm/tools/clang/lib/Tooling/Tooling.cpp head/contrib/llvm/tools/clang/tools/clang-format/ClangFormat.cpp head/contrib/llvm/tools/clang/tools/driver/cc1_main.cpp head/contrib/llvm/tools/clang/tools/driver/cc1as_main.cpp head/contrib/llvm/tools/clang/tools/driver/driver.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangAttrEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/ClangDiagnosticsEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/NeonEmitter.cpp head/contrib/llvm/tools/clang/utils/TableGen/TableGen.cpp head/contrib/llvm/tools/llc/llc.cpp head/contrib/llvm/tools/lldb/include/lldb/API/LLDB.h head/contrib/llvm/tools/lldb/include/lldb/API/SBCommandReturnObject.h head/contrib/llvm/tools/lldb/include/lldb/API/SBDefines.h head/contrib/llvm/tools/lldb/include/lldb/API/SBExpressionOptions.h head/contrib/llvm/tools/lldb/include/lldb/API/SBFileSpec.h head/contrib/llvm/tools/lldb/include/lldb/API/SBHostOS.h head/contrib/llvm/tools/lldb/include/lldb/API/SBInstruction.h head/contrib/llvm/tools/lldb/include/lldb/API/SBLaunchInfo.h head/contrib/llvm/tools/lldb/include/lldb/API/SBListener.h head/contrib/llvm/tools/lldb/include/lldb/API/SBProcess.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStream.h head/contrib/llvm/tools/lldb/include/lldb/API/SBStringList.h head/contrib/llvm/tools/lldb/include/lldb/API/SBTarget.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThread.h head/contrib/llvm/tools/lldb/include/lldb/API/SBThreadCollection.h head/contrib/llvm/tools/lldb/include/lldb/API/SBValue.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocation.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationCollection.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointLocationList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolver.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileLine.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverFileRegex.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointResolverName.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSite.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/BreakpointSiteList.h head/contrib/llvm/tools/lldb/include/lldb/Breakpoint/WatchpointList.h head/contrib/llvm/tools/lldb/include/lldb/Core/ArchSpec.h head/contrib/llvm/tools/lldb/include/lldb/Core/Broadcaster.h head/contrib/llvm/tools/lldb/include/lldb/Core/Communication.h head/contrib/llvm/tools/lldb/include/lldb/Core/ConstString.h head/contrib/llvm/tools/lldb/include/lldb/Core/DataExtractor.h head/contrib/llvm/tools/lldb/include/lldb/Core/Debugger.h head/contrib/llvm/tools/lldb/include/lldb/Core/EmulateInstruction.h head/contrib/llvm/tools/lldb/include/lldb/Core/Event.h head/contrib/llvm/tools/lldb/include/lldb/Core/History.h head/contrib/llvm/tools/lldb/include/lldb/Core/IOHandler.h head/contrib/llvm/tools/lldb/include/lldb/Core/Listener.h head/contrib/llvm/tools/lldb/include/lldb/Core/Logging.h head/contrib/llvm/tools/lldb/include/lldb/Core/MappedHash.h head/contrib/llvm/tools/lldb/include/lldb/Core/Module.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleList.h head/contrib/llvm/tools/lldb/include/lldb/Core/ModuleSpec.h head/contrib/llvm/tools/lldb/include/lldb/Core/RangeMap.h head/contrib/llvm/tools/lldb/include/lldb/Core/RegisterValue.h head/contrib/llvm/tools/lldb/include/lldb/Core/Scalar.h head/contrib/llvm/tools/lldb/include/lldb/Core/SearchFilter.h head/contrib/llvm/tools/lldb/include/lldb/Core/Section.h head/contrib/llvm/tools/lldb/include/lldb/Core/StreamCallback.h head/contrib/llvm/tools/lldb/include/lldb/Core/StreamTee.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeSTLMap.h head/contrib/llvm/tools/lldb/include/lldb/Core/ThreadSafeValue.h head/contrib/llvm/tools/lldb/include/lldb/Core/Timer.h head/contrib/llvm/tools/lldb/include/lldb/Core/UserSettingsController.h head/contrib/llvm/tools/lldb/include/lldb/Core/Value.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObject.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResult.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultCast.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultChild.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectConstResultImpl.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectDynamicValue.h head/contrib/llvm/tools/lldb/include/lldb/Core/ValueObjectSyntheticFilter.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/DumpValueObjectOptions.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatCache.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormatManager.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersContainer.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/FormattersHelpers.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategory.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeCategoryMap.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/TypeSynthetic.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/ValueObjectPrinter.h head/contrib/llvm/tools/lldb/include/lldb/DataFormatters/VectorIterator.h head/contrib/llvm/tools/lldb/include/lldb/Expression/DWARFExpression.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionParser.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionSourceCode.h head/contrib/llvm/tools/lldb/include/lldb/Expression/ExpressionVariable.h head/contrib/llvm/tools/lldb/include/lldb/Expression/FunctionCaller.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRDynamicChecks.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRExecutionUnit.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Expression/IRMemoryMap.h head/contrib/llvm/tools/lldb/include/lldb/Expression/LLVMUserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Expression/UserExpression.h head/contrib/llvm/tools/lldb/include/lldb/Expression/UtilityFunction.h head/contrib/llvm/tools/lldb/include/lldb/Host/Editline.h head/contrib/llvm/tools/lldb/include/lldb/Host/File.h head/contrib/llvm/tools/lldb/include/lldb/Host/FileSpec.h head/contrib/llvm/tools/lldb/include/lldb/Host/FileSystem.h head/contrib/llvm/tools/lldb/include/lldb/Host/Host.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostInfoBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostNativeProcessBase.h head/contrib/llvm/tools/lldb/include/lldb/Host/HostProcess.h head/contrib/llvm/tools/lldb/include/lldb/Host/OptionParser.h head/contrib/llvm/tools/lldb/include/lldb/Host/ProcessRunLock.h head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeBreakpointList.h head/contrib/llvm/tools/lldb/include/lldb/Host/common/NativeProcessProtocol.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/ConnectionFileDescriptorPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostInfoPosix.h head/contrib/llvm/tools/lldb/include/lldb/Host/posix/HostProcessPosix.h head/contrib/llvm/tools/lldb/include/lldb/Initialization/SystemLifetimeManager.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/Args.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandHistory.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObject.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/CommandObjectMultiword.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/OptionGroupValueObjectDisplay.h head/contrib/llvm/tools/lldb/include/lldb/Interpreter/ScriptInterpreter.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ArmUnwindInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Block.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ClangASTImporter.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompactUnwindInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompileUnit.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerDecl.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerDeclContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/CompilerType.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/DWARFCallFrameInfo.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/FuncUnwinders.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Function.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/GoASTContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/LineEntry.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/ObjectFile.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Symbol.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolContext.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolFile.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/SymbolVendor.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Symtab.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Type.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/TypeSystem.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindPlan.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/UnwindTable.h head/contrib/llvm/tools/lldb/include/lldb/Symbol/Variable.h head/contrib/llvm/tools/lldb/include/lldb/Target/ABI.h head/contrib/llvm/tools/lldb/include/lldb/Target/DynamicLoader.h head/contrib/llvm/tools/lldb/include/lldb/Target/ExecutionContext.h head/contrib/llvm/tools/lldb/include/lldb/Target/InstrumentationRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/JITLoaderList.h head/contrib/llvm/tools/lldb/include/lldb/Target/Language.h head/contrib/llvm/tools/lldb/include/lldb/Target/LanguageRuntime.h head/contrib/llvm/tools/lldb/include/lldb/Target/Memory.h head/contrib/llvm/tools/lldb/include/lldb/Target/MemoryRegionInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/PathMappingList.h head/contrib/llvm/tools/lldb/include/lldb/Target/Platform.h head/contrib/llvm/tools/lldb/include/lldb/Target/Process.h head/contrib/llvm/tools/lldb/include/lldb/Target/ProcessLaunchInfo.h head/contrib/llvm/tools/lldb/include/lldb/Target/QueueList.h head/contrib/llvm/tools/lldb/include/lldb/Target/RegisterContext.h head/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadHistory.h head/contrib/llvm/tools/lldb/include/lldb/Target/SectionLoadList.h head/contrib/llvm/tools/lldb/include/lldb/Target/StackFrame.h head/contrib/llvm/tools/lldb/include/lldb/Target/StackFrameList.h head/contrib/llvm/tools/lldb/include/lldb/Target/Target.h head/contrib/llvm/tools/lldb/include/lldb/Target/TargetList.h head/contrib/llvm/tools/lldb/include/lldb/Target/Thread.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadCollection.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadList.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlan.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanPython.h head/contrib/llvm/tools/lldb/include/lldb/Target/ThreadPlanStepInstruction.h head/contrib/llvm/tools/lldb/include/lldb/Target/Unwind.h head/contrib/llvm/tools/lldb/include/lldb/Utility/Iterable.h head/contrib/llvm/tools/lldb/include/lldb/Utility/ProcessStructReader.h head/contrib/llvm/tools/lldb/include/lldb/Utility/SharedCluster.h head/contrib/llvm/tools/lldb/include/lldb/lldb-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-forward.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-enumerations.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-interfaces.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private-types.h head/contrib/llvm/tools/lldb/include/lldb/lldb-private.h head/contrib/llvm/tools/lldb/source/API/SBAddress.cpp head/contrib/llvm/tools/lldb/source/API/SBBlock.cpp head/contrib/llvm/tools/lldb/source/API/SBBreakpoint.cpp head/contrib/llvm/tools/lldb/source/API/SBBreakpointLocation.cpp head/contrib/llvm/tools/lldb/source/API/SBBroadcaster.cpp head/contrib/llvm/tools/lldb/source/API/SBCommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/API/SBCommandReturnObject.cpp head/contrib/llvm/tools/lldb/source/API/SBDebugger.cpp head/contrib/llvm/tools/lldb/source/API/SBExpressionOptions.cpp head/contrib/llvm/tools/lldb/source/API/SBFileSpec.cpp head/contrib/llvm/tools/lldb/source/API/SBFrame.cpp head/contrib/llvm/tools/lldb/source/API/SBFunction.cpp head/contrib/llvm/tools/lldb/source/API/SBHostOS.cpp head/contrib/llvm/tools/lldb/source/API/SBInstruction.cpp head/contrib/llvm/tools/lldb/source/API/SBInstructionList.cpp head/contrib/llvm/tools/lldb/source/API/SBListener.cpp head/contrib/llvm/tools/lldb/source/API/SBModule.cpp head/contrib/llvm/tools/lldb/source/API/SBProcess.cpp head/contrib/llvm/tools/lldb/source/API/SBStringList.cpp head/contrib/llvm/tools/lldb/source/API/SBSymbol.cpp head/contrib/llvm/tools/lldb/source/API/SBTarget.cpp head/contrib/llvm/tools/lldb/source/API/SBThread.cpp head/contrib/llvm/tools/lldb/source/API/SBValue.cpp head/contrib/llvm/tools/lldb/source/API/SBWatchpoint.cpp head/contrib/llvm/tools/lldb/source/API/SystemInitializerFull.cpp head/contrib/llvm/tools/lldb/source/API/liblldb.exports head/contrib/llvm/tools/lldb/source/Breakpoint/Breakpoint.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocation.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationCollection.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointLocationList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolver.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverAddress.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileLine.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverFileRegex.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointResolverName.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSite.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/BreakpointSiteList.cpp head/contrib/llvm/tools/lldb/source/Breakpoint/WatchpointList.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandCompletions.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectApropos.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectArgs.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBreakpointCommand.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectBugreport.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectCommands.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectDisassemble.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectDisassemble.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectExpression.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectFrame.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectHelp.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLanguage.h head/contrib/llvm/tools/lldb/source/Commands/CommandObjectLog.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMemory.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectMultiword.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlatform.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectPlugin.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectProcess.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectQuit.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectRegister.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSettings.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSource.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectSyntax.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectTarget.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectThread.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectType.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectVersion.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpoint.cpp head/contrib/llvm/tools/lldb/source/Commands/CommandObjectWatchpointCommand.cpp head/contrib/llvm/tools/lldb/source/Core/Address.cpp head/contrib/llvm/tools/lldb/source/Core/AddressRange.cpp head/contrib/llvm/tools/lldb/source/Core/AddressResolverName.cpp head/contrib/llvm/tools/lldb/source/Core/ArchSpec.cpp head/contrib/llvm/tools/lldb/source/Core/Broadcaster.cpp head/contrib/llvm/tools/lldb/source/Core/Communication.cpp head/contrib/llvm/tools/lldb/source/Core/ConnectionSharedMemory.cpp head/contrib/llvm/tools/lldb/source/Core/ConstString.cpp head/contrib/llvm/tools/lldb/source/Core/CxaDemangle.cpp head/contrib/llvm/tools/lldb/source/Core/DataBufferHeap.cpp head/contrib/llvm/tools/lldb/source/Core/DataBufferMemoryMap.cpp head/contrib/llvm/tools/lldb/source/Core/DataEncoder.cpp head/contrib/llvm/tools/lldb/source/Core/DataExtractor.cpp head/contrib/llvm/tools/lldb/source/Core/Debugger.cpp head/contrib/llvm/tools/lldb/source/Core/Disassembler.cpp head/contrib/llvm/tools/lldb/source/Core/DynamicLoader.cpp head/contrib/llvm/tools/lldb/source/Core/EmulateInstruction.cpp head/contrib/llvm/tools/lldb/source/Core/Error.cpp head/contrib/llvm/tools/lldb/source/Core/Event.cpp head/contrib/llvm/tools/lldb/source/Core/FastDemangle.cpp head/contrib/llvm/tools/lldb/source/Core/FileSpecList.cpp head/contrib/llvm/tools/lldb/source/Core/FormatEntity.cpp head/contrib/llvm/tools/lldb/source/Core/IOHandler.cpp head/contrib/llvm/tools/lldb/source/Core/Listener.cpp head/contrib/llvm/tools/lldb/source/Core/Log.cpp head/contrib/llvm/tools/lldb/source/Core/Logging.cpp head/contrib/llvm/tools/lldb/source/Core/Mangled.cpp head/contrib/llvm/tools/lldb/source/Core/Module.cpp head/contrib/llvm/tools/lldb/source/Core/ModuleList.cpp head/contrib/llvm/tools/lldb/source/Core/Opcode.cpp head/contrib/llvm/tools/lldb/source/Core/PluginManager.cpp head/contrib/llvm/tools/lldb/source/Core/RegisterValue.cpp head/contrib/llvm/tools/lldb/source/Core/RegularExpression.cpp head/contrib/llvm/tools/lldb/source/Core/Scalar.cpp head/contrib/llvm/tools/lldb/source/Core/SearchFilter.cpp head/contrib/llvm/tools/lldb/source/Core/Section.cpp head/contrib/llvm/tools/lldb/source/Core/StreamCallback.cpp head/contrib/llvm/tools/lldb/source/Core/Timer.cpp head/contrib/llvm/tools/lldb/source/Core/UserSettingsController.cpp head/contrib/llvm/tools/lldb/source/Core/Value.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObject.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResult.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultCast.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultChild.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectConstResultImpl.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectDynamicValue.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectSyntheticFilter.cpp head/contrib/llvm/tools/lldb/source/Core/ValueObjectVariable.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/DumpValueObjectOptions.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatCache.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormatManager.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/FormattersHelpers.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/StringPrinter.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategory.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeCategoryMap.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeFormat.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeSummary.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/TypeSynthetic.cpp head/contrib/llvm/tools/lldb/source/DataFormatters/ValueObjectPrinter.cpp head/contrib/llvm/tools/lldb/source/Expression/DWARFExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/ExpressionSourceCode.cpp head/contrib/llvm/tools/lldb/source/Expression/ExpressionVariable.cpp head/contrib/llvm/tools/lldb/source/Expression/FunctionCaller.cpp head/contrib/llvm/tools/lldb/source/Expression/IRDynamicChecks.cpp head/contrib/llvm/tools/lldb/source/Expression/IRExecutionUnit.cpp head/contrib/llvm/tools/lldb/source/Expression/IRInterpreter.cpp head/contrib/llvm/tools/lldb/source/Expression/IRMemoryMap.cpp head/contrib/llvm/tools/lldb/source/Expression/LLVMUserExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/Materializer.cpp head/contrib/llvm/tools/lldb/source/Expression/REPL.cpp head/contrib/llvm/tools/lldb/source/Expression/UserExpression.cpp head/contrib/llvm/tools/lldb/source/Expression/UtilityFunction.cpp head/contrib/llvm/tools/lldb/source/Host/common/Editline.cpp head/contrib/llvm/tools/lldb/source/Host/common/File.cpp head/contrib/llvm/tools/lldb/source/Host/common/FileSpec.cpp head/contrib/llvm/tools/lldb/source/Host/common/Host.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostInfoBase.cpp head/contrib/llvm/tools/lldb/source/Host/common/HostProcess.cpp head/contrib/llvm/tools/lldb/source/Host/common/MonitoringProcessLauncher.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeBreakpointList.cpp head/contrib/llvm/tools/lldb/source/Host/common/NativeProcessProtocol.cpp head/contrib/llvm/tools/lldb/source/Host/common/OptionParser.cpp head/contrib/llvm/tools/lldb/source/Host/common/Socket.cpp head/contrib/llvm/tools/lldb/source/Host/common/SocketAddress.cpp head/contrib/llvm/tools/lldb/source/Host/common/SoftwareBreakpoint.cpp head/contrib/llvm/tools/lldb/source/Host/common/TCPSocket.cpp head/contrib/llvm/tools/lldb/source/Host/common/UDPSocket.cpp head/contrib/llvm/tools/lldb/source/Host/posix/ConnectionFileDescriptorPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/DomainSocket.cpp head/contrib/llvm/tools/lldb/source/Host/posix/FileSystem.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostInfoPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostProcessPosix.cpp head/contrib/llvm/tools/lldb/source/Host/posix/HostThreadPosix.cpp head/contrib/llvm/tools/lldb/source/Initialization/SystemInitializerCommon.cpp head/contrib/llvm/tools/lldb/source/Initialization/SystemLifetimeManager.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Args.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandHistory.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandInterpreter.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObject.cpp head/contrib/llvm/tools/lldb/source/Interpreter/CommandObjectScript.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionGroupValueObjectDisplay.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueArray.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueFileSpecLIst.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValuePathMappings.cpp head/contrib/llvm/tools/lldb/source/Interpreter/OptionValueProperties.cpp head/contrib/llvm/tools/lldb/source/Interpreter/Options.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm/ABIMacOSX_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-arm64/ABIMacOSX_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/MacOSX-i386/ABIMacOSX_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm/ABISysV_arm.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-arm64/ABISysV_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-hexagon/ABISysV_hexagon.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-i386/ABISysV_i386.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips/ABISysV_mips.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-mips64/ABISysV_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc/ABISysV_ppc.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-ppc64/ABISysV_ppc64.cpp head/contrib/llvm/tools/lldb/source/Plugins/ABI/SysV-x86_64/ABISysV_x86_64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.cpp head/contrib/llvm/tools/lldb/source/Plugins/Disassembler/llvm/DisassemblerLLVMC.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Hexagon-DYLD/DynamicLoaderHexagonDYLD.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/POSIX-DYLD/DynamicLoaderPOSIXDYLD.h head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.cpp head/contrib/llvm/tools/lldb/source/Plugins/DynamicLoader/Static/DynamicLoaderStatic.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTDumper.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ASTResultSynthesizer.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangASTSource.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionDeclMap.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionHelper.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangPersistentVariables.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUserExpression.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/ClangUtilityFunction.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Clang/IRForTarget.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoAST.h head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoUserExpression.cpp head/contrib/llvm/tools/lldb/source/Plugins/ExpressionParser/Go/GoUserExpression.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulateInstructionARM.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM/EmulationStateARM.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.h head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.h head/contrib/llvm/tools/lldb/source/Plugins/InstrumentationRuntime/AddressSanitizer/AddressSanitizerRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/JITLoader/GDB/JITLoaderGDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CxxStringTypes.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxx.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxList.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/LibStdcpp.h head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/CF.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/Cocoa.h head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSArray.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSDictionary.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSError.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSException.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSIndexPath.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/NSSet.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/ObjCLanguage.cpp head/contrib/llvm/tools/lldb/source/Plugins/Language/ObjC/ObjCLanguage.h head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/CPlusPlus/ItaniumABI/ItaniumABILanguageRuntime.h head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/Go/GoLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCClassDescriptorV2.h head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCDeclVendor.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV1.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntimeV2.h head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTrampolineHandler.h head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCTypeEncodingParser.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleThreadPlanStepThroughObjCTrampoline.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.cpp head/contrib/llvm/tools/lldb/source/Plugins/LanguageRuntime/RenderScript/RenderScriptRuntime/RenderScriptRuntime.h head/contrib/llvm/tools/lldb/source/Plugins/MemoryHistory/asan/MemoryHistoryASan.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ELFHeader.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.h head/contrib/llvm/tools/lldb/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Go/OperatingSystemGo.cpp head/contrib/llvm/tools/lldb/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/FreeBSD/PlatformFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/NetBSD/PlatformNetBSD.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/POSIX/PlatformPOSIX.h head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.cpp head/contrib/llvm/tools/lldb/source/Plugins/Platform/gdb-server/PlatformRemoteGDBServer.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/FreeBSDThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessFreeBSD.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/ProcessMonitor.h head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/FreeBSD/RegisterContextPOSIXProcessMonitor_powerpc.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/DynamicRegisterInfo.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryThread.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/HistoryUnwind.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/InferiorCallPOSIX.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextDarwin_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextFreeBSD_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLLDB.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterContextLinux_arm64.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_arm64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_i386.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_mips64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_powerpc.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/RegisterInfos_x86_64.h head/contrib/llvm/tools/lldb/source/Plugins/Process/Utility/StopInfoMachException.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ProcessElfCore.h head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/elf-core/ThreadElfCore.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerCommon.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerPlatform.h head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/GDBRemoteRegisterContext.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.cpp head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/PythonDataObjects.h head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.cpp head/contrib/llvm/tools/lldb/source/Plugins/ScriptInterpreter/Python/ScriptInterpreterPython.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DIERef.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DIERef.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParser.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFASTParserGo.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIE.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIECollection.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDIECollection.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFDeclContext.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/DWARFFormValue.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/HashedNameToDIE.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDebugMap.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.cpp head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h head/contrib/llvm/tools/lldb/source/Plugins/SymbolFile/Symtab/SymbolFileSymtab.cpp head/contrib/llvm/tools/lldb/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp head/contrib/llvm/tools/lldb/source/Symbol/ArmUnwindInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/Block.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangASTImporter.cpp head/contrib/llvm/tools/lldb/source/Symbol/ClangExternalASTSourceCommon.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompactUnwindInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompileUnit.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompilerDecl.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompilerDeclContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/CompilerType.cpp head/contrib/llvm/tools/lldb/source/Symbol/DWARFCallFrameInfo.cpp head/contrib/llvm/tools/lldb/source/Symbol/FuncUnwinders.cpp head/contrib/llvm/tools/lldb/source/Symbol/Function.cpp head/contrib/llvm/tools/lldb/source/Symbol/GoASTContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/LineEntry.cpp head/contrib/llvm/tools/lldb/source/Symbol/LineTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/ObjectFile.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symbol.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolContext.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolFile.cpp head/contrib/llvm/tools/lldb/source/Symbol/SymbolVendor.cpp head/contrib/llvm/tools/lldb/source/Symbol/Symtab.cpp head/contrib/llvm/tools/lldb/source/Symbol/Type.cpp head/contrib/llvm/tools/lldb/source/Symbol/TypeSystem.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindPlan.cpp head/contrib/llvm/tools/lldb/source/Symbol/UnwindTable.cpp head/contrib/llvm/tools/lldb/source/Symbol/Variable.cpp head/contrib/llvm/tools/lldb/source/Target/ABI.cpp head/contrib/llvm/tools/lldb/source/Target/ExecutionContext.cpp head/contrib/llvm/tools/lldb/source/Target/InstrumentationRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/JITLoader.cpp head/contrib/llvm/tools/lldb/source/Target/JITLoaderList.cpp head/contrib/llvm/tools/lldb/source/Target/Language.cpp head/contrib/llvm/tools/lldb/source/Target/LanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Memory.cpp head/contrib/llvm/tools/lldb/source/Target/MemoryHistory.cpp head/contrib/llvm/tools/lldb/source/Target/ObjCLanguageRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/OperatingSystem.cpp head/contrib/llvm/tools/lldb/source/Target/PathMappingList.cpp head/contrib/llvm/tools/lldb/source/Target/Platform.cpp head/contrib/llvm/tools/lldb/source/Target/Process.cpp head/contrib/llvm/tools/lldb/source/Target/ProcessInfo.cpp head/contrib/llvm/tools/lldb/source/Target/ProcessLaunchInfo.cpp head/contrib/llvm/tools/lldb/source/Target/Queue.cpp head/contrib/llvm/tools/lldb/source/Target/QueueList.cpp head/contrib/llvm/tools/lldb/source/Target/RegisterContext.cpp head/contrib/llvm/tools/lldb/source/Target/SectionLoadHistory.cpp head/contrib/llvm/tools/lldb/source/Target/SectionLoadList.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrame.cpp head/contrib/llvm/tools/lldb/source/Target/StackFrameList.cpp head/contrib/llvm/tools/lldb/source/Target/StackID.cpp head/contrib/llvm/tools/lldb/source/Target/StopInfo.cpp head/contrib/llvm/tools/lldb/source/Target/SystemRuntime.cpp head/contrib/llvm/tools/lldb/source/Target/Target.cpp head/contrib/llvm/tools/lldb/source/Target/TargetList.cpp head/contrib/llvm/tools/lldb/source/Target/Thread.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadCollection.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadList.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlan.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanCallUserExpression.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanShouldStopHere.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepInstruction.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepOverRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepRange.cpp head/contrib/llvm/tools/lldb/source/Target/ThreadPlanStepThrough.cpp head/contrib/llvm/tools/lldb/source/Target/UnixSignals.cpp head/contrib/llvm/tools/lldb/source/Target/UnwindAssembly.cpp head/contrib/llvm/tools/lldb/source/Utility/ConvertEnum.cpp head/contrib/llvm/tools/lldb/source/Utility/JSON.cpp head/contrib/llvm/tools/lldb/source/Utility/ModuleCache.cpp head/contrib/llvm/tools/lldb/source/Utility/SharingPtr.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractor.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.cpp head/contrib/llvm/tools/lldb/source/Utility/StringExtractorGDBRemote.h head/contrib/llvm/tools/lldb/source/Utility/TaskPool.cpp head/contrib/llvm/tools/lldb/tools/compact-unwind/compact-unwind-dumper.c head/contrib/llvm/tools/lldb/tools/driver/Driver.cpp head/contrib/llvm/tools/lldb/tools/driver/Driver.h head/contrib/llvm/tools/lldb/tools/driver/Platform.cpp head/contrib/llvm/tools/lldb/tools/driver/Platform.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdBreak.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdData.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdThread.h head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmdCmdVar.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebugSessionInfo.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MICmnLLDBDebuggerHandleEvents.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/MIUtilFileStd.cpp head/contrib/llvm/tools/lldb/tools/lldb-mi/Platform.h head/contrib/llvm/tools/lldb/tools/lldb-server/lldb-gdbserver.cpp head/contrib/llvm/tools/lldb/tools/lldb-server/lldb-server.cpp head/contrib/llvm/tools/lli/ChildTarget/ChildTarget.cpp head/contrib/llvm/tools/lli/OrcLazyJIT.cpp head/contrib/llvm/tools/lli/OrcLazyJIT.h head/contrib/llvm/tools/lli/RemoteJITUtils.h head/contrib/llvm/tools/lli/lli.cpp head/contrib/llvm/tools/llvm-ar/llvm-ar.cpp head/contrib/llvm/tools/llvm-as/llvm-as.cpp head/contrib/llvm/tools/llvm-bcanalyzer/llvm-bcanalyzer.cpp head/contrib/llvm/tools/llvm-cov/CodeCoverage.cpp head/contrib/llvm/tools/llvm-cov/CoverageFilters.h head/contrib/llvm/tools/llvm-cov/CoverageReport.cpp head/contrib/llvm/tools/llvm-cov/CoverageReport.h head/contrib/llvm/tools/llvm-cov/CoverageSummaryInfo.h head/contrib/llvm/tools/llvm-cov/CoverageViewOptions.h head/contrib/llvm/tools/llvm-cov/RenderingSupport.h head/contrib/llvm/tools/llvm-cov/SourceCoverageView.cpp head/contrib/llvm/tools/llvm-cov/SourceCoverageView.h head/contrib/llvm/tools/llvm-cov/TestingSupport.cpp head/contrib/llvm/tools/llvm-cov/gcov.cpp head/contrib/llvm/tools/llvm-cov/llvm-cov.cpp head/contrib/llvm/tools/llvm-cxxdump/Error.cpp head/contrib/llvm/tools/llvm-cxxdump/llvm-cxxdump.cpp head/contrib/llvm/tools/llvm-diff/DiffConsumer.h head/contrib/llvm/tools/llvm-diff/DiffLog.cpp head/contrib/llvm/tools/llvm-diff/DifferenceEngine.cpp head/contrib/llvm/tools/llvm-diff/DifferenceEngine.h head/contrib/llvm/tools/llvm-diff/llvm-diff.cpp head/contrib/llvm/tools/llvm-dis/llvm-dis.cpp head/contrib/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp head/contrib/llvm/tools/llvm-extract/llvm-extract.cpp head/contrib/llvm/tools/llvm-link/llvm-link.cpp head/contrib/llvm/tools/llvm-lto/llvm-lto.cpp head/contrib/llvm/tools/llvm-mc/Disassembler.cpp head/contrib/llvm/tools/llvm-mc/llvm-mc.cpp head/contrib/llvm/tools/llvm-nm/llvm-nm.cpp head/contrib/llvm/tools/llvm-objdump/COFFDump.cpp head/contrib/llvm/tools/llvm-objdump/MachODump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.cpp head/contrib/llvm/tools/llvm-objdump/llvm-objdump.h head/contrib/llvm/tools/llvm-pdbdump/BuiltinDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/BuiltinDumper.h head/contrib/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/ClassDefinitionDumper.h head/contrib/llvm/tools/llvm-pdbdump/CompilandDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/CompilandDumper.h head/contrib/llvm/tools/llvm-pdbdump/EnumDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/EnumDumper.h head/contrib/llvm/tools/llvm-pdbdump/ExternalSymbolDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/ExternalSymbolDumper.h head/contrib/llvm/tools/llvm-pdbdump/FunctionDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/FunctionDumper.h head/contrib/llvm/tools/llvm-pdbdump/LinePrinter.cpp head/contrib/llvm/tools/llvm-pdbdump/LinePrinter.h head/contrib/llvm/tools/llvm-pdbdump/TypeDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/TypeDumper.h head/contrib/llvm/tools/llvm-pdbdump/TypedefDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/TypedefDumper.h head/contrib/llvm/tools/llvm-pdbdump/VariableDumper.cpp head/contrib/llvm/tools/llvm-pdbdump/VariableDumper.h head/contrib/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp head/contrib/llvm/tools/llvm-pdbdump/llvm-pdbdump.h head/contrib/llvm/tools/llvm-profdata/llvm-profdata.cpp head/contrib/llvm/tools/llvm-readobj/ARMAttributeParser.cpp head/contrib/llvm/tools/llvm-readobj/ARMAttributeParser.h head/contrib/llvm/tools/llvm-readobj/ARMEHABIPrinter.h head/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.cpp head/contrib/llvm/tools/llvm-readobj/ARMWinEHPrinter.h head/contrib/llvm/tools/llvm-readobj/COFFDumper.cpp head/contrib/llvm/tools/llvm-readobj/ELFDumper.cpp head/contrib/llvm/tools/llvm-readobj/Error.cpp head/contrib/llvm/tools/llvm-readobj/MachODumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.cpp head/contrib/llvm/tools/llvm-readobj/ObjDumper.h head/contrib/llvm/tools/llvm-readobj/Win64EHDumper.cpp head/contrib/llvm/tools/llvm-readobj/Win64EHDumper.h head/contrib/llvm/tools/llvm-readobj/llvm-readobj.cpp head/contrib/llvm/tools/llvm-readobj/llvm-readobj.h head/contrib/llvm/tools/llvm-rtdyld/llvm-rtdyld.cpp head/contrib/llvm/tools/llvm-stress/llvm-stress.cpp head/contrib/llvm/tools/llvm-symbolizer/llvm-symbolizer.cpp head/contrib/llvm/tools/opt/AnalysisWrappers.cpp head/contrib/llvm/tools/opt/BreakpointPrinter.cpp head/contrib/llvm/tools/opt/NewPMDriver.cpp head/contrib/llvm/tools/opt/NewPMDriver.h head/contrib/llvm/tools/opt/opt.cpp head/contrib/llvm/utils/TableGen/AsmMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterEmitter.cpp head/contrib/llvm/utils/TableGen/AsmWriterInst.cpp head/contrib/llvm/utils/TableGen/AsmWriterInst.h head/contrib/llvm/utils/TableGen/Attributes.cpp head/contrib/llvm/utils/TableGen/CodeEmitterGen.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.cpp head/contrib/llvm/utils/TableGen/CodeGenDAGPatterns.h head/contrib/llvm/utils/TableGen/CodeGenInstruction.cpp head/contrib/llvm/utils/TableGen/CodeGenInstruction.h head/contrib/llvm/utils/TableGen/CodeGenIntrinsics.h head/contrib/llvm/utils/TableGen/CodeGenMapTable.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.cpp head/contrib/llvm/utils/TableGen/CodeGenRegisters.h head/contrib/llvm/utils/TableGen/CodeGenSchedule.cpp head/contrib/llvm/utils/TableGen/CodeGenSchedule.h head/contrib/llvm/utils/TableGen/CodeGenTarget.cpp head/contrib/llvm/utils/TableGen/CodeGenTarget.h head/contrib/llvm/utils/TableGen/DAGISelMatcher.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcher.h head/contrib/llvm/utils/TableGen/DAGISelMatcherEmitter.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherGen.cpp head/contrib/llvm/utils/TableGen/DAGISelMatcherOpt.cpp head/contrib/llvm/utils/TableGen/DFAPacketizerEmitter.cpp head/contrib/llvm/utils/TableGen/DisassemblerEmitter.cpp head/contrib/llvm/utils/TableGen/FastISelEmitter.cpp head/contrib/llvm/utils/TableGen/FixedLenDecoderEmitter.cpp head/contrib/llvm/utils/TableGen/InstrInfoEmitter.cpp head/contrib/llvm/utils/TableGen/IntrinsicEmitter.cpp head/contrib/llvm/utils/TableGen/RegisterInfoEmitter.cpp head/contrib/llvm/utils/TableGen/SequenceToOffsetTable.h head/contrib/llvm/utils/TableGen/SubtargetEmitter.cpp head/contrib/llvm/utils/TableGen/TableGen.cpp head/contrib/llvm/utils/TableGen/TableGenBackends.h head/contrib/llvm/utils/TableGen/X86DisassemblerTables.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.cpp head/contrib/llvm/utils/TableGen/X86RecognizableInstr.h head/etc/mtree/BSD.debug.dist head/etc/mtree/BSD.usr.dist head/lib/clang/Makefile head/lib/clang/clang.build.mk head/lib/clang/freebsd_cc_version.h head/lib/clang/include/clang/Basic/Version.inc head/lib/clang/include/clang/Config/config.h head/lib/clang/include/llvm/Config/AsmParsers.def head/lib/clang/include/llvm/Config/AsmPrinters.def head/lib/clang/include/llvm/Config/Disassemblers.def head/lib/clang/include/llvm/Config/Targets.def head/lib/clang/include/llvm/Config/config.h head/lib/clang/include/llvm/Config/llvm-config.h head/lib/clang/include/llvm/Support/DataTypes.h head/lib/clang/liblldb/Makefile head/lib/libc++/Makefile head/lib/libclang_rt/Makefile head/lib/libclang_rt/Makefile.inc head/lib/libclang_rt/asan-preinit/Makefile head/lib/libclang_rt/asan/Makefile head/lib/libclang_rt/asan_cxx/Makefile head/lib/libclang_rt/asan_dynamic/Makefile head/lib/libclang_rt/include/Makefile head/lib/libclang_rt/profile/Makefile head/lib/libclang_rt/safestack/Makefile head/lib/libclang_rt/ubsan_standalone/Makefile head/lib/libclang_rt/ubsan_standalone_cxx/Makefile head/lib/libcompiler_rt/Makefile head/lib/libcompiler_rt/Makefile.inc head/share/mk/local.gendirdeps.mk head/share/mk/src.opts.mk head/sys/sys/param.h head/targets/pseudo/clang/Makefile.depend head/tools/build/mk/OptionalObsoleteFiles.inc head/usr.bin/clang/Makefile head/usr.bin/clang/bugpoint/Makefile head/usr.bin/clang/clang-format/Makefile head/usr.bin/clang/clang-tblgen/Makefile head/usr.bin/clang/clang.prog.mk head/usr.bin/clang/clang/Makefile head/usr.bin/clang/llc/Makefile head/usr.bin/clang/lldb/Makefile head/usr.bin/clang/lli/Makefile head/usr.bin/clang/llvm-ar/Makefile head/usr.bin/clang/llvm-as/Makefile head/usr.bin/clang/llvm-bcanalyzer/Makefile head/usr.bin/clang/llvm-cov/Makefile head/usr.bin/clang/llvm-cxxdump/Makefile head/usr.bin/clang/llvm-diff/Makefile head/usr.bin/clang/llvm-dis/Makefile head/usr.bin/clang/llvm-dwarfdump/Makefile head/usr.bin/clang/llvm-extract/Makefile head/usr.bin/clang/llvm-link/Makefile head/usr.bin/clang/llvm-lto/Makefile head/usr.bin/clang/llvm-mc/Makefile head/usr.bin/clang/llvm-nm/Makefile head/usr.bin/clang/llvm-objdump/Makefile head/usr.bin/clang/llvm-pdbdump/Makefile head/usr.bin/clang/llvm-profdata/Makefile head/usr.bin/clang/llvm-rtdyld/Makefile head/usr.bin/clang/llvm-symbolizer/Makefile head/usr.bin/clang/llvm-tblgen/Makefile head/usr.bin/clang/opt/Makefile Directory Properties: head/ (props changed) head/MAINTAINERS (props changed) head/cddl/ (props changed) head/cddl/contrib/opensolaris/ (props changed) head/cddl/contrib/opensolaris/cmd/zdb/ (props changed) head/cddl/contrib/opensolaris/cmd/zfs/ (props changed) head/cddl/contrib/opensolaris/lib/libzfs/ (props changed) head/contrib/amd/ (props changed) head/contrib/atf/ (props changed) head/contrib/binutils/ (props changed) head/contrib/bmake/ (props changed) head/contrib/byacc/ (props changed) head/contrib/compiler-rt/ (props changed) head/contrib/dma/ (props changed) head/contrib/elftoolchain/ (props changed) head/contrib/elftoolchain/elfdump/ (props changed) head/contrib/file/ (props changed) head/contrib/gcc/ (props changed) head/contrib/ipfilter/ (props changed) head/contrib/libarchive/ (props changed) head/contrib/libc++/ (props changed) head/contrib/libcxxrt/ (props changed) head/contrib/libexecinfo/ (props changed) head/contrib/libpcap/ (props changed) head/contrib/libucl/ (props changed) head/contrib/llvm/ (props changed) head/contrib/llvm/projects/libunwind/ (props changed) head/contrib/llvm/tools/clang/ (props changed) head/contrib/llvm/tools/lldb/ (props changed) head/contrib/llvm/tools/llvm-dwarfdump/ (props changed) head/contrib/llvm/tools/llvm-lto/ (props changed) head/contrib/mdocml/ (props changed) head/contrib/ncurses/ (props changed) head/contrib/netbsd-tests/ (props changed) head/contrib/ntp/ (props changed) head/contrib/one-true-awk/ (props changed) head/contrib/openbsm/ (props changed) head/contrib/sqlite3/ (props changed) head/contrib/tcpdump/ (props changed) head/contrib/tnftp/ (props changed) head/contrib/top/ (props changed) head/contrib/tzcode/zic/ (props changed) head/contrib/tzdata/ (props changed) head/contrib/unbound/ (props changed) head/crypto/heimdal/ (props changed) head/crypto/openssh/ (props changed) head/crypto/openssl/ (props changed) head/gnu/lib/ (props changed) head/gnu/usr.bin/binutils/ (props changed) head/gnu/usr.bin/cc/cc_tools/ (props changed) head/gnu/usr.bin/gdb/ (props changed) head/lib/libc/locale/ascii.c (props changed) head/sys/amd64/amd64/efirt.c (props changed) head/sys/cddl/contrib/opensolaris/ (props changed) head/sys/contrib/dev/acpica/ (props changed) head/sys/contrib/ipfilter/ (props changed) head/sys/contrib/libfdt/ (props changed) head/sys/contrib/octeon-sdk/ (props changed) head/sys/contrib/x86emu/ (props changed) head/sys/contrib/xz-embedded/ (props changed) head/usr.sbin/bhyve/pci_fbuf.c (props changed) head/usr.sbin/bhyve/pci_xhci.c (props changed) head/usr.sbin/bhyve/vga.c (props changed) Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Thu Nov 24 22:33:18 2016 (r309123) +++ head/Makefile.inc1 Thu Nov 24 22:54:55 2016 (r309124) @@ -1670,13 +1670,12 @@ _gensnmptree= usr.sbin/bsnmpd/gensnmptre # the bootstrap compiler, or as the part of the normal build. .if ${MK_CLANG_BOOTSTRAP} != "no" || ${MK_CLANG} != "no" _clang_tblgen= \ - lib/clang/libllvmsupport \ - lib/clang/libllvmtablegen \ + lib/clang/libllvmminimal \ usr.bin/clang/llvm-tblgen \ usr.bin/clang/clang-tblgen -${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport -${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmtablegen ${_bt}-lib/clang/libllvmsupport +${_bt}-usr.bin/clang/clang-tblgen: ${_bt}-lib/clang/libllvmminimal +${_bt}-usr.bin/clang/llvm-tblgen: ${_bt}-lib/clang/libllvmminimal .endif # Default to building the GPL DTC, but build the BSDL one if users explicitly Modified: head/ObsoleteFiles.inc ============================================================================== --- head/ObsoleteFiles.inc Thu Nov 24 22:33:18 2016 (r309123) +++ head/ObsoleteFiles.inc Thu Nov 24 22:54:55 2016 (r309124) @@ -38,6 +38,98 @@ # xargs -n1 | sort | uniq -d; # done +# 20161124: new clang import which bumps version from 3.8.0 to 3.9.0. +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/allocator_interface.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/asan_interface.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/common_interface_defs.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/coverage_interface.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/dfsan_interface.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/linux_syscall_hooks.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/lsan_interface.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/msan_interface.h +OLD_FILES+=usr/lib/clang/3.8.0/include/sanitizer/tsan_interface_atomic.h +OLD_DIRS+=usr/lib/clang/3.8.0/include/sanitizer +OLD_FILES+=usr/lib/clang/3.8.0/include/__clang_cuda_runtime_wrapper.h +OLD_FILES+=usr/lib/clang/3.8.0/include/__stddef_max_align_t.h +OLD_FILES+=usr/lib/clang/3.8.0/include/__wmmintrin_aes.h +OLD_FILES+=usr/lib/clang/3.8.0/include/__wmmintrin_pclmul.h +OLD_FILES+=usr/lib/clang/3.8.0/include/adxintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/altivec.h +OLD_FILES+=usr/lib/clang/3.8.0/include/ammintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/arm_acle.h +OLD_FILES+=usr/lib/clang/3.8.0/include/arm_neon.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx2intrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512bwintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512cdintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512dqintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512erintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512fintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vlbwintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vldqintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avx512vlintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/avxintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/bmi2intrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/bmiintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/cpuid.h +OLD_FILES+=usr/lib/clang/3.8.0/include/cuda_builtin_vars.h +OLD_FILES+=usr/lib/clang/3.8.0/include/emmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/f16cintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/fma4intrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/fmaintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/fxsrintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/htmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/htmxlintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/ia32intrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/immintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/lzcntintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/mm3dnow.h +OLD_FILES+=usr/lib/clang/3.8.0/include/mm_malloc.h +OLD_FILES+=usr/lib/clang/3.8.0/include/mmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/module.modulemap +OLD_FILES+=usr/lib/clang/3.8.0/include/nmmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/pkuintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/pmmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/popcntintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/prfchwintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/rdseedintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/rtmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/s390intrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/shaintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/smmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/tbmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/tmmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/vadefs.h +OLD_FILES+=usr/lib/clang/3.8.0/include/vecintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/wmmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/x86intrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xmmintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xopintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xsavecintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xsaveintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xsaveoptintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xsavesintrin.h +OLD_FILES+=usr/lib/clang/3.8.0/include/xtestintrin.h +OLD_DIRS+=usr/lib/clang/3.8.0/include +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-i386.so +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-preinit-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-preinit-x86_64.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-x86_64.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan-x86_64.so +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.asan_cxx-x86_64.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-arm.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.profile-x86_64.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.safestack-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.safestack-x86_64.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone-x86_64.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-i386.a +OLD_FILES+=usr/lib/clang/3.8.0/lib/freebsd/libclang_rt.ubsan_standalone_cxx-x86_64.a +OLD_DIRS+=usr/lib/clang/3.8.0/lib/freebsd +OLD_DIRS+=usr/lib/clang/3.8.0/lib +OLD_DIRS+=usr/lib/clang/3.8.0 # 20161121: Hyper-V manuals only apply to amd64 and i386. .if ${TARGET_ARCH} != "amd64" && ${TARGET_ARCH} != "i386" OLD_FILES+=usr/share/man/man4/hv_kvp.4.gz Modified: head/UPDATING ============================================================================== --- head/UPDATING Thu Nov 24 22:33:18 2016 (r309123) +++ head/UPDATING Thu Nov 24 22:54:55 2016 (r309124) @@ -51,6 +51,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 12 ****************************** SPECIAL WARNING: ****************************** +20161124: + Clang, llvm, lldb, compiler-rt and libc++ have been upgraded to 3.9.0. + Please see the 20141231 entry below for information about prerequisites + and upgrading, if you are not already using clang 3.5.0 or higher. + 20161119: The layout of the pmap structure has changed for powerpc to put the pmap statistics at the front for all CPU variations. libkvm(3) and all tools Modified: head/contrib/compiler-rt/LICENSE.TXT ============================================================================== --- head/contrib/compiler-rt/LICENSE.TXT Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/LICENSE.TXT Thu Nov 24 22:54:55 2016 (r309124) @@ -14,7 +14,7 @@ Full text of the relevant licenses is in University of Illinois/NCSA Open Source License -Copyright (c) 2009-2015 by the contributors listed in CREDITS.TXT +Copyright (c) 2009-2016 by the contributors listed in CREDITS.TXT All rights reserved. Modified: head/contrib/compiler-rt/include/sanitizer/allocator_interface.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/allocator_interface.h Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/include/sanitizer/allocator_interface.h Thu Nov 24 22:54:55 2016 (r309124) @@ -59,6 +59,23 @@ extern "C" { deallocation of "ptr". */ void __sanitizer_malloc_hook(const volatile void *ptr, size_t size); void __sanitizer_free_hook(const volatile void *ptr); + + /* Installs a pair of hooks for malloc/free. + Several (currently, 5) hook pairs may be installed, they are executed + in the order they were installed and after calling + __sanitizer_malloc_hook/__sanitizer_free_hook. + Unlike __sanitizer_malloc_hook/__sanitizer_free_hook these hooks can be + chained and do not rely on weak symbols working on the platform, but + require __sanitizer_install_malloc_and_free_hooks to be called at startup + and thus will not be called on malloc/free very early in the process. + Returns the number of hooks currently installed or 0 on failure. + Not thread-safe, should be called in the main thread before starting + other threads. + */ + int __sanitizer_install_malloc_and_free_hooks( + void (*malloc_hook)(const volatile void *, size_t), + void (*free_hook)(const volatile void *)); + #ifdef __cplusplus } // extern "C" #endif Modified: head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/include/sanitizer/common_interface_defs.h Thu Nov 24 22:54:55 2016 (r309124) @@ -41,6 +41,9 @@ extern "C" { // Tell the tools to write their reports to "path." instead of stderr. void __sanitizer_set_report_path(const char *path); + // Tell the tools to write their reports to the provided file descriptor + // (casted to void *). + void __sanitizer_set_report_fd(void *fd); // Notify the tools that the sandbox is going to be turned on. The reserved // parameter will be used in the future to hold a structure with functions @@ -128,8 +131,45 @@ extern "C" { const void *s2, size_t n, int result); void __sanitizer_weak_hook_strncmp(void *called_pc, const char *s1, const char *s2, size_t n, int result); + void __sanitizer_weak_hook_strncasecmp(void *called_pc, const char *s1, + const char *s2, size_t n, int result); void __sanitizer_weak_hook_strcmp(void *called_pc, const char *s1, const char *s2, int result); + void __sanitizer_weak_hook_strcasecmp(void *called_pc, const char *s1, + const char *s2, int result); + void __sanitizer_weak_hook_strstr(void *called_pc, const char *s1, + const char *s2, char *result); + void __sanitizer_weak_hook_strcasestr(void *called_pc, const char *s1, + const char *s2, char *result); + void __sanitizer_weak_hook_memmem(void *called_pc, + const void *s1, size_t len1, + const void *s2, size_t len2, void *result); + + // Prints stack traces for all live heap allocations ordered by total + // allocation size until `top_percent` of total live heap is shown. + // `top_percent` should be between 1 and 100. + // Experimental feature currently available only with asan on Linux/x86_64. + void __sanitizer_print_memory_profile(size_t top_percent); + + // Fiber annotation interface. + // Before switching to a different stack, one must call + // __sanitizer_start_switch_fiber with a pointer to the bottom of the + // destination stack and its size. When code starts running on the new stack, + // it must call __sanitizer_finish_switch_fiber to finalize the switch. + // The start_switch function takes a void** to store the current fake stack if + // there is one (it is needed when detect_stack_use_after_return is enabled). + // When restoring a stack, this pointer must be given to the finish_switch + // function. In most cases, this void* can be stored on the stack just before + // switching. When leaving a fiber definitely, null must be passed as first + // argument to the start_switch function so that the fake stack is destroyed. + // If you do not want support for stack use-after-return detection, you can + // always pass null to these two functions. + // Note that the fake stack mechanism is disabled during fiber switch, so if a + // signal callback runs during the switch, it will not benefit from the stack + // use-after-return detection. + void __sanitizer_start_switch_fiber(void **fake_stack_save, + const void *bottom, size_t size); + void __sanitizer_finish_switch_fiber(void *fake_stack_save); #ifdef __cplusplus } // extern "C" #endif Copied: head/contrib/compiler-rt/include/sanitizer/esan_interface.h (from r309123, projects/clang390-import/contrib/compiler-rt/include/sanitizer/esan_interface.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/contrib/compiler-rt/include/sanitizer/esan_interface.h Thu Nov 24 22:54:55 2016 (r309124, copy of r309123, projects/clang390-import/contrib/compiler-rt/include/sanitizer/esan_interface.h) @@ -0,0 +1,50 @@ +//===-- sanitizer/esan_interface.h ------------------------------*- C++ -*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// +// +// This file is a part of EfficiencySanitizer, a family of performance tuners. +// +// Public interface header. +//===----------------------------------------------------------------------===// +#ifndef SANITIZER_ESAN_INTERFACE_H +#define SANITIZER_ESAN_INTERFACE_H + +#include + +// We declare our interface routines as weak to allow the user to avoid +// ifdefs and instead use this pattern to allow building the same sources +// with and without our runtime library: +// if (__esan_report) +// __esan_report(); +#ifdef _MSC_VER +/* selectany is as close to weak as we'll get. */ +#define COMPILER_RT_WEAK __declspec(selectany) +#elif __GNUC__ +#define COMPILER_RT_WEAK __attribute__((weak)) +#else +#define COMPILER_RT_WEAK +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +// This function can be called mid-run (or at the end of a run for +// a server process that doesn't shut down normally) to request that +// data for that point in the run be reported from the tool. +void COMPILER_RT_WEAK __esan_report(); + +// This function returns the number of samples that the esan tool has collected +// to this point. This is useful for testing. +unsigned int COMPILER_RT_WEAK __esan_get_sample_count(); + +#ifdef __cplusplus +} // extern "C" +#endif + +#endif // SANITIZER_ESAN_INTERFACE_H Modified: head/contrib/compiler-rt/include/sanitizer/linux_syscall_hooks.h ============================================================================== --- head/contrib/compiler-rt/include/sanitizer/linux_syscall_hooks.h Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/include/sanitizer/linux_syscall_hooks.h Thu Nov 24 22:54:55 2016 (r309124) @@ -1835,6 +1835,17 @@ __sanitizer_syscall_pre_impl_vfork() #define __sanitizer_syscall_post_vfork(res) \ __sanitizer_syscall_post_impl_vfork(res) +#define __sanitizer_syscall_pre_sigaction(signum, act, oldact) \ + __sanitizer_syscall_pre_impl_sigaction((long)signum, (long)act, (long)oldact) +#define __sanitizer_syscall_post_sigaction(res, signum, act, oldact) \ + __sanitizer_syscall_post_impl_sigaction(res, (long)signum, (long)act, \ + (long)oldact) +#define __sanitizer_syscall_pre_rt_sigaction(signum, act, oldact, sz) \ + __sanitizer_syscall_pre_impl_rt_sigaction((long)signum, (long)act, \ + (long)oldact, (long)sz) +#define __sanitizer_syscall_post_rt_sigaction(res, signum, act, oldact, sz) \ + __sanitizer_syscall_post_impl_rt_sigaction(res, (long)signum, (long)act, \ + (long)oldact, (long)sz) // And now a few syscalls we don't handle yet. #define __sanitizer_syscall_pre_afs_syscall(...) @@ -1889,7 +1900,6 @@ #define __sanitizer_syscall_pre_query_module(...) #define __sanitizer_syscall_pre_readahead(...) #define __sanitizer_syscall_pre_readdir(...) -#define __sanitizer_syscall_pre_rt_sigaction(...) #define __sanitizer_syscall_pre_rt_sigreturn(...) #define __sanitizer_syscall_pre_rt_sigsuspend(...) #define __sanitizer_syscall_pre_security(...) @@ -1903,7 +1913,6 @@ #define __sanitizer_syscall_pre_setreuid32(...) #define __sanitizer_syscall_pre_set_thread_area(...) #define __sanitizer_syscall_pre_setuid32(...) -#define __sanitizer_syscall_pre_sigaction(...) #define __sanitizer_syscall_pre_sigaltstack(...) #define __sanitizer_syscall_pre_sigreturn(...) #define __sanitizer_syscall_pre_sigsuspend(...) @@ -1971,7 +1980,6 @@ #define __sanitizer_syscall_post_query_module(res, ...) #define __sanitizer_syscall_post_readahead(res, ...) #define __sanitizer_syscall_post_readdir(res, ...) -#define __sanitizer_syscall_post_rt_sigaction(res, ...) #define __sanitizer_syscall_post_rt_sigreturn(res, ...) #define __sanitizer_syscall_post_rt_sigsuspend(res, ...) #define __sanitizer_syscall_post_security(res, ...) @@ -1985,7 +1993,6 @@ #define __sanitizer_syscall_post_setreuid32(res, ...) #define __sanitizer_syscall_post_set_thread_area(res, ...) #define __sanitizer_syscall_post_setuid32(res, ...) -#define __sanitizer_syscall_post_sigaction(res, ...) #define __sanitizer_syscall_post_sigaltstack(res, ...) #define __sanitizer_syscall_post_sigreturn(res, ...) #define __sanitizer_syscall_post_sigsuspend(res, ...) @@ -3062,7 +3069,13 @@ void __sanitizer_syscall_pre_impl_fork() void __sanitizer_syscall_post_impl_fork(long res); void __sanitizer_syscall_pre_impl_vfork(); void __sanitizer_syscall_post_impl_vfork(long res); - +void __sanitizer_syscall_pre_impl_sigaction(long signum, long act, long oldact); +void __sanitizer_syscall_post_impl_sigaction(long res, long signum, long act, + long oldact); +void __sanitizer_syscall_pre_impl_rt_sigaction(long signum, long act, + long oldact, long sz); +void __sanitizer_syscall_post_impl_rt_sigaction(long res, long signum, long act, + long oldact, long sz); #ifdef __cplusplus } // extern "C" #endif Modified: head/contrib/compiler-rt/lib/asan/asan_activation.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_activation.cc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_activation.cc Thu Nov 24 22:54:55 2016 (r309124) @@ -47,6 +47,7 @@ static struct AsanDeactivatedFlags { FlagParser parser; RegisterActivationFlags(&parser, &f, &cf); + cf.SetDefaults(); // Copy the current activation flags. allocator_options.CopyTo(&f, &cf); cf.malloc_context_size = malloc_context_size; @@ -61,7 +62,7 @@ static struct AsanDeactivatedFlags { parser.ParseString(env); } - SetVerbosity(cf.verbosity); + InitializeCommonFlags(&cf); if (Verbosity()) ReportUnrecognizedFlags(); Modified: head/contrib/compiler-rt/lib/asan/asan_allocator.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_allocator.cc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_allocator.cc Thu Nov 24 22:54:55 2016 (r309124) @@ -223,7 +223,7 @@ void AllocatorOptions::CopyTo(Flags *f, struct Allocator { static const uptr kMaxAllowedMallocSize = - FIRST_32_SECOND_64(3UL << 30, 1UL << 40); + FIRST_32_SECOND_64(3UL << 30, 1ULL << 40); static const uptr kMaxThreadLocalQuarantine = FIRST_32_SECOND_64(1 << 18, 1 << 20); @@ -457,29 +457,28 @@ struct Allocator { return res; } - void AtomicallySetQuarantineFlag(AsanChunk *m, void *ptr, + // Set quarantine flag if chunk is allocated, issue ASan error report on + // available and quarantined chunks. Return true on success, false otherwise. + bool AtomicallySetQuarantineFlagIfAllocated(AsanChunk *m, void *ptr, BufferedStackTrace *stack) { u8 old_chunk_state = CHUNK_ALLOCATED; // Flip the chunk_state atomically to avoid race on double-free. - if (!atomic_compare_exchange_strong((atomic_uint8_t*)m, &old_chunk_state, - CHUNK_QUARANTINE, memory_order_acquire)) + if (!atomic_compare_exchange_strong((atomic_uint8_t *)m, &old_chunk_state, + CHUNK_QUARANTINE, + memory_order_acquire)) { ReportInvalidFree(ptr, old_chunk_state, stack); + // It's not safe to push a chunk in quarantine on invalid free. + return false; + } CHECK_EQ(CHUNK_ALLOCATED, old_chunk_state); + return true; } // Expects the chunk to already be marked as quarantined by using - // AtomicallySetQuarantineFlag. + // AtomicallySetQuarantineFlagIfAllocated. void QuarantineChunk(AsanChunk *m, void *ptr, BufferedStackTrace *stack, AllocType alloc_type) { CHECK_EQ(m->chunk_state, CHUNK_QUARANTINE); - - if (m->alloc_type != alloc_type) { - if (atomic_load(&alloc_dealloc_mismatch, memory_order_acquire)) { - ReportAllocTypeMismatch((uptr)ptr, stack, (AllocType)m->alloc_type, - (AllocType)alloc_type); - } - } - CHECK_GE(m->alloc_tid, 0); if (SANITIZER_WORDSIZE == 64) // On 32-bits this resides in user area. CHECK_EQ(m->free_tid, kInvalidTid); @@ -516,13 +515,24 @@ struct Allocator { uptr chunk_beg = p - kChunkHeaderSize; AsanChunk *m = reinterpret_cast(chunk_beg); + + ASAN_FREE_HOOK(ptr); + // Must mark the chunk as quarantined before any changes to its metadata. + // Do not quarantine given chunk if we failed to set CHUNK_QUARANTINE flag. + if (!AtomicallySetQuarantineFlagIfAllocated(m, ptr, stack)) return; + + if (m->alloc_type != alloc_type) { + if (atomic_load(&alloc_dealloc_mismatch, memory_order_acquire)) { + ReportAllocTypeMismatch((uptr)ptr, stack, (AllocType)m->alloc_type, + (AllocType)alloc_type); + } + } + if (delete_size && flags()->new_delete_type_mismatch && delete_size != m->UsedSize()) { - ReportNewDeleteSizeMismatch(p, delete_size, stack); + ReportNewDeleteSizeMismatch(p, m->UsedSize(), delete_size, stack); } - ASAN_FREE_HOOK(ptr); - // Must mark the chunk as quarantined before any changes to its metadata. - AtomicallySetQuarantineFlag(m, ptr, stack); + QuarantineChunk(m, ptr, stack, alloc_type); } @@ -655,6 +665,9 @@ static AsanAllocator &get_allocator() { bool AsanChunkView::IsValid() { return chunk_ && chunk_->chunk_state != CHUNK_AVAILABLE; } +bool AsanChunkView::IsAllocated() { + return chunk_ && chunk_->chunk_state == CHUNK_ALLOCATED; +} uptr AsanChunkView::Beg() { return chunk_->Beg(); } uptr AsanChunkView::End() { return Beg() + UsedSize(); } uptr AsanChunkView::UsedSize() { return chunk_->UsedSize(); } @@ -668,12 +681,15 @@ static StackTrace GetStackTraceFromId(u3 return res; } +u32 AsanChunkView::GetAllocStackId() { return chunk_->alloc_context_id; } +u32 AsanChunkView::GetFreeStackId() { return chunk_->free_context_id; } + StackTrace AsanChunkView::GetAllocStack() { - return GetStackTraceFromId(chunk_->alloc_context_id); + return GetStackTraceFromId(GetAllocStackId()); } StackTrace AsanChunkView::GetFreeStack() { - return GetStackTraceFromId(chunk_->free_context_id); + return GetStackTraceFromId(GetFreeStackId()); } void InitializeAllocator(const AllocatorOptions &options) { @@ -754,7 +770,7 @@ int asan_posix_memalign(void **memptr, u return 0; } -uptr asan_malloc_usable_size(void *ptr, uptr pc, uptr bp) { +uptr asan_malloc_usable_size(const void *ptr, uptr pc, uptr bp) { if (!ptr) return 0; uptr usable_size = instance.AllocationSize(reinterpret_cast(ptr)); if (flags()->check_malloc_usable_size && (usable_size == 0)) { Modified: head/contrib/compiler-rt/lib/asan/asan_allocator.h ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_allocator.h Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_allocator.h Thu Nov 24 22:54:55 2016 (r309124) @@ -49,14 +49,17 @@ void GetAllocatorOptions(AllocatorOption class AsanChunkView { public: explicit AsanChunkView(AsanChunk *chunk) : chunk_(chunk) {} - bool IsValid(); // Checks if AsanChunkView points to a valid allocated - // or quarantined chunk. - uptr Beg(); // First byte of user memory. - uptr End(); // Last byte of user memory. - uptr UsedSize(); // Size requested by the user. + bool IsValid(); // Checks if AsanChunkView points to a valid allocated + // or quarantined chunk. + bool IsAllocated(); // Checks if the memory is currently allocated. + uptr Beg(); // First byte of user memory. + uptr End(); // Last byte of user memory. + uptr UsedSize(); // Size requested by the user. uptr AllocTid(); uptr FreeTid(); bool Eq(const AsanChunkView &c) const { return chunk_ == c.chunk_; } + u32 GetAllocStackId(); + u32 GetFreeStackId(); StackTrace GetAllocStack(); StackTrace GetFreeStack(); bool AddrIsInside(uptr addr, uptr access_size, sptr *offset) { @@ -171,7 +174,7 @@ void *asan_pvalloc(uptr size, BufferedSt int asan_posix_memalign(void **memptr, uptr alignment, uptr size, BufferedStackTrace *stack); -uptr asan_malloc_usable_size(void *ptr, uptr pc, uptr bp); +uptr asan_malloc_usable_size(const void *ptr, uptr pc, uptr bp); uptr asan_mz_size(const void *ptr); void asan_mz_force_lock(); Modified: head/contrib/compiler-rt/lib/asan/asan_fake_stack.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_fake_stack.cc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_fake_stack.cc Thu Nov 24 22:54:55 2016 (r309124) @@ -31,7 +31,7 @@ ALWAYS_INLINE void SetShadow(uptr ptr, u CHECK_EQ(SHADOW_SCALE, 3); // This code expects SHADOW_SCALE=3. u64 *shadow = reinterpret_cast(MemToShadow(ptr)); if (class_id <= 6) { - for (uptr i = 0; i < (1U << class_id); i++) { + for (uptr i = 0; i < (((uptr)1) << class_id); i++) { shadow[i] = magic; // Make sure this does not become memset. SanitizerBreakOptimization(nullptr); @@ -121,7 +121,7 @@ uptr FakeStack::AddrIsInFakeStack(uptr p uptr class_id = (ptr - beg) >> stack_size_log; uptr base = beg + (class_id << stack_size_log); CHECK_LE(base, ptr); - CHECK_LT(ptr, base + (1UL << stack_size_log)); + CHECK_LT(ptr, base + (((uptr)1) << stack_size_log)); uptr pos = (ptr - base) >> (kMinStackFrameSizeLog + class_id); uptr res = base + pos * BytesInSizeClass(class_id); *frame_end = res + BytesInSizeClass(class_id); Modified: head/contrib/compiler-rt/lib/asan/asan_fake_stack.h ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_fake_stack.h Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_fake_stack.h Thu Nov 24 22:54:55 2016 (r309124) @@ -69,12 +69,12 @@ class FakeStack { // stack_size_log is at least 15 (stack_size >= 32K). static uptr SizeRequiredForFlags(uptr stack_size_log) { - return 1UL << (stack_size_log + 1 - kMinStackFrameSizeLog); + return ((uptr)1) << (stack_size_log + 1 - kMinStackFrameSizeLog); } // Each size class occupies stack_size bytes. static uptr SizeRequiredForFrames(uptr stack_size_log) { - return (1ULL << stack_size_log) * kNumberOfSizeClasses; + return (((uptr)1) << stack_size_log) * kNumberOfSizeClasses; } // Number of bytes requires for the whole object. @@ -91,12 +91,12 @@ class FakeStack { // and so on. static uptr FlagsOffset(uptr stack_size_log, uptr class_id) { uptr t = kNumberOfSizeClasses - 1 - class_id; - const uptr all_ones = (1 << (kNumberOfSizeClasses - 1)) - 1; + const uptr all_ones = (((uptr)1) << (kNumberOfSizeClasses - 1)) - 1; return ((all_ones >> t) << t) << (stack_size_log - 15); } static uptr NumberOfFrames(uptr stack_size_log, uptr class_id) { - return 1UL << (stack_size_log - kMinStackFrameSizeLog - class_id); + return ((uptr)1) << (stack_size_log - kMinStackFrameSizeLog - class_id); } // Divide n by the numbe of frames in size class. @@ -114,7 +114,8 @@ class FakeStack { u8 *GetFrame(uptr stack_size_log, uptr class_id, uptr pos) { return reinterpret_cast(this) + kFlagsOffset + SizeRequiredForFlags(stack_size_log) + - (1 << stack_size_log) * class_id + BytesInSizeClass(class_id) * pos; + (((uptr)1) << stack_size_log) * class_id + + BytesInSizeClass(class_id) * pos; } // Allocate the fake frame. @@ -137,7 +138,7 @@ class FakeStack { // Number of bytes in a fake frame of this size class. static uptr BytesInSizeClass(uptr class_id) { - return 1UL << (class_id + kMinStackFrameSizeLog); + return ((uptr)1) << (class_id + kMinStackFrameSizeLog); } // The fake frame is guaranteed to have a right redzone. @@ -159,7 +160,7 @@ class FakeStack { static const uptr kFlagsOffset = 4096; // This is were the flags begin. // Must match the number of uses of DEFINE_STACK_MALLOC_FREE_WITH_CLASS_ID COMPILER_CHECK(kNumberOfSizeClasses == 11); - static const uptr kMaxStackMallocSize = 1 << kMaxStackFrameSizeLog; + static const uptr kMaxStackMallocSize = ((uptr)1) << kMaxStackFrameSizeLog; uptr hint_position_[kNumberOfSizeClasses]; uptr stack_size_log_; Modified: head/contrib/compiler-rt/lib/asan/asan_flags.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_flags.cc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_flags.cc Thu Nov 24 22:54:55 2016 (r309124) @@ -116,7 +116,7 @@ void InitializeFlags() { ubsan_parser.ParseString(GetEnv("UBSAN_OPTIONS")); #endif - SetVerbosity(common_flags()->verbosity); + InitializeCommonFlags(); // TODO(eugenis): dump all flags at verbosity>=2? if (Verbosity()) ReportUnrecognizedFlags(); @@ -159,6 +159,14 @@ void InitializeFlags() { (ASAN_LOW_MEMORY) ? 1UL << 6 : 1UL << 8; f->quarantine_size_mb = kDefaultQuarantineSizeMb; } + if (!f->replace_str && common_flags()->intercept_strlen) { + Report("WARNING: strlen interceptor is enabled even though replace_str=0. " + "Use intercept_strlen=0 to disable it."); + } + if (!f->replace_str && common_flags()->intercept_strchr) { + Report("WARNING: strchr* interceptors are enabled even though " + "replace_str=0. Use intercept_strchr=0 to disable them."); + } } } // namespace __asan Modified: head/contrib/compiler-rt/lib/asan/asan_flags.inc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_flags.inc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_flags.inc Thu Nov 24 22:54:55 2016 (r309124) @@ -43,7 +43,7 @@ ASAN_FLAG( "If set, uses custom wrappers and replacements for libc string functions " "to find more errors.") ASAN_FLAG(bool, replace_intrin, true, - "If set, uses custom wrappers for memset/memcpy/memmove intinsics.") + "If set, uses custom wrappers for memset/memcpy/memmove intrinsics.") ASAN_FLAG(bool, detect_stack_use_after_return, false, "Enables stack-use-after-return checking at run-time.") ASAN_FLAG(int, min_uar_stack_size_log, 16, // We can't do smaller anyway. @@ -77,6 +77,8 @@ ASAN_FLAG(bool, print_stats, false, "Print various statistics after printing an error message or if " "atexit=1.") ASAN_FLAG(bool, print_legend, true, "Print the legend for the shadow bytes.") +ASAN_FLAG(bool, print_scariness, false, + "Print the scariness score. Experimental.") ASAN_FLAG(bool, atexit, false, "If set, prints ASan exit stats even after program terminates " "successfully.") @@ -104,7 +106,7 @@ ASAN_FLAG(bool, alloc_dealloc_mismatch, "Report errors on malloc/delete, new/free, new/delete[], etc.") ASAN_FLAG(bool, new_delete_type_mismatch, true, - "Report errors on mismatch betwen size of new and delete.") + "Report errors on mismatch between size of new and delete.") ASAN_FLAG( bool, strict_init_order, false, "If true, assume that dynamic initializers can never access globals from " @@ -135,3 +137,5 @@ ASAN_FLAG(const char *, suppressions, "" ASAN_FLAG(bool, halt_on_error, true, "Crash the program after printing the first error report " "(WARNING: USE AT YOUR OWN RISK!)") +ASAN_FLAG(bool, use_odr_indicator, false, + "Use special ODR indicator symbol for ODR violation detection") Modified: head/contrib/compiler-rt/lib/asan/asan_globals.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_globals.cc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_globals.cc Thu Nov 24 22:54:55 2016 (r309124) @@ -135,6 +135,70 @@ bool GetInfoForAddressIfGlobal(uptr addr return false; } +enum GlobalSymbolState { + UNREGISTERED = 0, + REGISTERED = 1 +}; + +// Check ODR violation for given global G via special ODR indicator. We use +// this method in case compiler instruments global variables through their +// local aliases. +static void CheckODRViolationViaIndicator(const Global *g) { + u8 *odr_indicator = reinterpret_cast(g->odr_indicator); + if (*odr_indicator == UNREGISTERED) { + *odr_indicator = REGISTERED; + return; + } + // If *odr_indicator is DEFINED, some module have already registered + // externally visible symbol with the same name. This is an ODR violation. + for (ListOfGlobals *l = list_of_all_globals; l; l = l->next) { + if (g->odr_indicator == l->g->odr_indicator && + (flags()->detect_odr_violation >= 2 || g->size != l->g->size) && + !IsODRViolationSuppressed(g->name)) + ReportODRViolation(g, FindRegistrationSite(g), + l->g, FindRegistrationSite(l->g)); + } +} + +// Check ODR violation for given global G by checking if it's already poisoned. +// We use this method in case compiler doesn't use private aliases for global +// variables. +static void CheckODRViolationViaPoisoning(const Global *g) { + if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { + // This check may not be enough: if the first global is much larger + // the entire redzone of the second global may be within the first global. + for (ListOfGlobals *l = list_of_all_globals; l; l = l->next) { + if (g->beg == l->g->beg && + (flags()->detect_odr_violation >= 2 || g->size != l->g->size) && + !IsODRViolationSuppressed(g->name)) + ReportODRViolation(g, FindRegistrationSite(g), + l->g, FindRegistrationSite(l->g)); + } + } +} + +// Clang provides two different ways for global variables protection: +// it can poison the global itself or its private alias. In former +// case we may poison same symbol multiple times, that can help us to +// cheaply detect ODR violation: if we try to poison an already poisoned +// global, we have ODR violation error. +// In latter case, we poison each symbol exactly once, so we use special +// indicator symbol to perform similar check. +// In either case, compiler provides a special odr_indicator field to Global +// structure, that can contain two kinds of values: +// 1) Non-zero value. In this case, odr_indicator is an address of +// corresponding indicator variable for given global. +// 2) Zero. This means that we don't use private aliases for global variables +// and can freely check ODR violation with the first method. +// +// This routine chooses between two different methods of ODR violation +// detection. +static inline bool UseODRIndicator(const Global *g) { + // Use ODR indicator method iff use_odr_indicator flag is set and + // indicator symbol address is not 0. + return flags()->use_odr_indicator && g->odr_indicator > 0; +} + // Register a global variable. // This function may be called more than once for every global // so we store the globals in a map. @@ -144,22 +208,24 @@ static void RegisterGlobal(const Global ReportGlobal(*g, "Added"); CHECK(flags()->report_globals); CHECK(AddrIsInMem(g->beg)); - CHECK(AddrIsAlignedByGranularity(g->beg)); + if (!AddrIsAlignedByGranularity(g->beg)) { + Report("The following global variable is not properly aligned.\n"); + Report("This may happen if another global with the same name\n"); + Report("resides in another non-instrumented module.\n"); + Report("Or the global comes from a C file built w/o -fno-common.\n"); + Report("In either case this is likely an ODR violation bug,\n"); + Report("but AddressSanitizer can not provide more details.\n"); + ReportODRViolation(g, FindRegistrationSite(g), g, FindRegistrationSite(g)); + CHECK(AddrIsAlignedByGranularity(g->beg)); + } CHECK(AddrIsAlignedByGranularity(g->size_with_redzone)); if (flags()->detect_odr_violation) { // Try detecting ODR (One Definition Rule) violation, i.e. the situation // where two globals with the same name are defined in different modules. - if (__asan_region_is_poisoned(g->beg, g->size_with_redzone)) { - // This check may not be enough: if the first global is much larger - // the entire redzone of the second global may be within the first global. - for (ListOfGlobals *l = list_of_all_globals; l; l = l->next) { - if (g->beg == l->g->beg && - (flags()->detect_odr_violation >= 2 || g->size != l->g->size) && - !IsODRViolationSuppressed(g->name)) - ReportODRViolation(g, FindRegistrationSite(g), - l->g, FindRegistrationSite(l->g)); - } - } + if (UseODRIndicator(g)) + CheckODRViolationViaIndicator(g); + else + CheckODRViolationViaPoisoning(g); } if (CanPoisonMemory()) PoisonRedZones(*g); @@ -190,6 +256,12 @@ static void UnregisterGlobal(const Globa // We unpoison the shadow memory for the global but we do not remove it from // the list because that would require O(n^2) time with the current list // implementation. It might not be worth doing anyway. + + // Release ODR indicator. + if (UseODRIndicator(g)) { + u8 *odr_indicator = reinterpret_cast(g->odr_indicator); + *odr_indicator = UNREGISTERED; + } } void StopInitOrderChecking() { @@ -212,6 +284,25 @@ void StopInitOrderChecking() { // ---------------------- Interface ---------------- {{{1 using namespace __asan; // NOLINT + +// Apply __asan_register_globals to all globals found in the same loaded +// executable or shared library as `flag'. The flag tracks whether globals have +// already been registered or not for this image. +void __asan_register_image_globals(uptr *flag) { + if (*flag) + return; + AsanApplyToGlobals(__asan_register_globals, flag); + *flag = 1; +} + +// This mirrors __asan_register_image_globals. +void __asan_unregister_image_globals(uptr *flag) { + if (!*flag) + return; + AsanApplyToGlobals(__asan_unregister_globals, flag); + *flag = 0; +} + // Register an array of globals. void __asan_register_globals(__asan_global *globals, uptr n) { if (!flags()->report_globals) return; Modified: head/contrib/compiler-rt/lib/asan/asan_init_version.h ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_init_version.h Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_init_version.h Thu Nov 24 22:54:55 2016 (r309124) @@ -19,16 +19,20 @@ extern "C" { // Every time the ASan ABI changes we also change the version number in the // __asan_init function name. Objects built with incompatible ASan ABI // versions will not link with run-time. + // // Changes between ABI versions: // v1=>v2: added 'module_name' to __asan_global // v2=>v3: stack frame description (created by the compiler) - // contains the function PC as the 3-rd field (see - // DescribeAddressIfStack). - // v3=>v4: added '__asan_global_source_location' to __asan_global. + // contains the function PC as the 3rd field (see + // DescribeAddressIfStack) + // v3=>v4: added '__asan_global_source_location' to __asan_global // v4=>v5: changed the semantics and format of __asan_stack_malloc_ and - // __asan_stack_free_ functions. + // __asan_stack_free_ functions // v5=>v6: changed the name of the version check symbol - #define __asan_version_mismatch_check __asan_version_mismatch_check_v6 + // v6=>v7: added 'odr_indicator' to __asan_global + // v7=>v8: added '__asan_(un)register_image_globals' functions for dead + // stripping support on Mach-O platforms + #define __asan_version_mismatch_check __asan_version_mismatch_check_v8 } #endif // ASAN_INIT_VERSION_H Modified: head/contrib/compiler-rt/lib/asan/asan_interceptors.cc ============================================================================== --- head/contrib/compiler-rt/lib/asan/asan_interceptors.cc Thu Nov 24 22:33:18 2016 (r309123) +++ head/contrib/compiler-rt/lib/asan/asan_interceptors.cc Thu Nov 24 22:54:55 2016 (r309124) @@ -21,6 +21,7 @@ #include "asan_stack.h" #include "asan_stats.h" #include "asan_suppressions.h" +#include "lsan/lsan_common.h" #include "sanitizer_common/sanitizer_libc.h" #if SANITIZER_POSIX @@ -110,7 +111,7 @@ static inline bool RangesOverlap(const c } while (0) static inline uptr MaybeRealStrnlen(const char *s, uptr maxlen) { -#if ASAN_INTERCEPT_STRNLEN +#if SANITIZER_INTERCEPT_STRNLEN if (REAL(strnlen)) { return REAL(strnlen)(s, maxlen); } @@ -143,6 +144,8 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, (void) ctx; \ #define COMMON_INTERCEPT_FUNCTION(name) ASAN_INTERCEPT_FUNC(name) +#define COMMON_INTERCEPT_FUNCTION_VER(name, ver) \ + ASAN_INTERCEPT_FUNC_VER(name, ver) #define COMMON_INTERCEPTOR_WRITE_RANGE(ctx, ptr, size) \ ASAN_WRITE_RANGE(ctx, ptr, size) #define COMMON_INTERCEPTOR_READ_RANGE(ctx, ptr, size) \ @@ -195,6 +198,10 @@ DECLARE_REAL_AND_INTERCEPTOR(void, free, } else { \ *begin = *end = 0; \ } +// Asan needs custom handling of these: +#undef SANITIZER_INTERCEPT_MEMSET +#undef SANITIZER_INTERCEPT_MEMMOVE +#undef SANITIZER_INTERCEPT_MEMCPY #include "sanitizer_common/sanitizer_common_interceptors.inc" // Syscall interceptors don't have contexts, we don't support suppressions @@ -218,6 +225,7 @@ struct ThreadStartParam { atomic_uintptr_t is_registered; }; +#if ASAN_INTERCEPT_PTHREAD_CREATE static thread_return_t THREAD_CALLING_CONV asan_thread_start(void *arg) { ThreadStartParam *param = reinterpret_cast(arg); AsanThread *t = nullptr; @@ -228,7 +236,6 @@ static thread_return_t THREAD_CALLING_CO return t->ThreadStart(GetTid(), ¶m->is_registered); } -#if ASAN_INTERCEPT_PTHREAD_CREATE INTERCEPTOR(int, pthread_create, void *thread, void *attr, void *(*start_routine)(void*), void *arg) { EnsureMainThreadIDIsCorrect(); @@ -242,7 +249,17 @@ INTERCEPTOR(int, pthread_create, void *t ThreadStartParam param; atomic_store(¶m.t, 0, memory_order_relaxed); atomic_store(¶m.is_registered, 0, memory_order_relaxed); - int result = REAL(pthread_create)(thread, attr, asan_thread_start, ¶m); + int result; + { + // Ignore all allocations made by pthread_create: thread stack/TLS may be + // stored by pthread for future reuse even after thread destruction, and + // the linked list it's stored in doesn't even hold valid pointers to the + // objects, the latter are calculated by obscure pointer arithmetic. +#if CAN_SANITIZE_LEAKS + __lsan::ScopedInterceptorDisabler disabler; +#endif + result = REAL(pthread_create)(thread, attr, asan_thread_start, ¶m); + } if (result == 0) { u32 current_tid = GetCurrentTidOrInvalid(); AsanThread *t = @@ -271,7 +288,8 @@ DEFINE_REAL_PTHREAD_FUNCTIONS #if SANITIZER_ANDROID INTERCEPTOR(void*, bsd_signal, int signum, void *handler) { - if (!IsDeadlySignal(signum) || common_flags()->allow_user_segv_handler) { + if (!IsHandledDeadlySignal(signum) || + common_flags()->allow_user_segv_handler) { return REAL(bsd_signal)(signum, handler); } return 0; @@ -279,7 +297,8 @@ INTERCEPTOR(void*, bsd_signal, int signu #endif INTERCEPTOR(void*, signal, int signum, void *handler) { - if (!IsDeadlySignal(signum) || common_flags()->allow_user_segv_handler) { + if (!IsHandledDeadlySignal(signum) || + common_flags()->allow_user_segv_handler) { return REAL(signal)(signum, handler); } return nullptr; @@ -287,7 +306,8 @@ INTERCEPTOR(void*, signal, int signum, v INTERCEPTOR(int, sigaction, int signum, const struct sigaction *act, struct sigaction *oldact) { - if (!IsDeadlySignal(signum) || common_flags()->allow_user_segv_handler) { + if (!IsHandledDeadlySignal(signum) || + common_flags()->allow_user_segv_handler) { return REAL(sigaction)(signum, act, oldact); } return 0; @@ -453,25 +473,6 @@ INTERCEPTOR(void*, memset, void *block, ASAN_MEMSET_IMPL(ctx, block, c, size); } -INTERCEPTOR(char*, strchr, const char *str, int c) { - void *ctx; - ASAN_INTERCEPTOR_ENTER(ctx, strchr); - if (UNLIKELY(!asan_inited)) return internal_strchr(str, c); - // strchr is called inside create_purgeable_zone() when MallocGuardEdges=1 is - // used. - if (asan_init_is_running) { - return REAL(strchr)(str, c); - } - ENSURE_ASAN_INITED(); - char *result = REAL(strchr)(str, c); - if (flags()->replace_str) { - uptr len = REAL(strlen)(str); - uptr bytes_read = (result ? result - str : len) + 1; - ASAN_READ_STRING_OF_LEN(ctx, str, len, bytes_read); - } - return result; -} - #if ASAN_INTERCEPT_INDEX # if ASAN_USE_ALIAS_ATTRIBUTE_FOR_INDEX INTERCEPTOR(char*, index, const char *string, int c) @@ -549,7 +550,6 @@ INTERCEPTOR(char*, strcpy, char *to, con return REAL(strcpy)(to, from); // NOLINT } -#if ASAN_INTERCEPT_STRDUP INTERCEPTOR(char*, strdup, const char *s) { void *ctx; ASAN_INTERCEPTOR_ENTER(ctx, strdup); @@ -564,29 +564,28 @@ INTERCEPTOR(char*, strdup, const char *s REAL(memcpy)(new_mem, s, length + 1); return reinterpret_cast(new_mem); } -#endif -INTERCEPTOR(SIZE_T, strlen, const char *s) { +#if ASAN_INTERCEPT___STRDUP +INTERCEPTOR(char*, __strdup, const char *s) { void *ctx; - ASAN_INTERCEPTOR_ENTER(ctx, strlen); - if (UNLIKELY(!asan_inited)) return internal_strlen(s); - // strlen is called from malloc_default_purgeable_zone() - // in __asan::ReplaceSystemAlloc() on Mac. - if (asan_init_is_running) { - return REAL(strlen)(s); - } + ASAN_INTERCEPTOR_ENTER(ctx, strdup); + if (UNLIKELY(!asan_inited)) return internal_strdup(s); ENSURE_ASAN_INITED(); - SIZE_T length = REAL(strlen)(s); + uptr length = REAL(strlen)(s); if (flags()->replace_str) { ASAN_READ_RANGE(ctx, s, length + 1); *** DIFF OUTPUT TRUNCATED AT 1000 LINES *** From owner-svn-src-head@freebsd.org Fri Nov 25 00:36:38 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B804CC532E3 for ; Fri, 25 Nov 2016 00:36:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x244.google.com (mail-io0-x244.google.com [IPv6:2607:f8b0:4001:c06::244]) (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 802586E3 for ; Fri, 25 Nov 2016 00:36:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x244.google.com with SMTP id k19so7113611iod.3 for ; Thu, 24 Nov 2016 16:36:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=p2gBmrEg+YU5VvRV5ucDREyM3AtG+ntLkVMhamA+I0o=; b=RlEwNTEeA6fZJIFR61gq8FWb4Or2hHQU45WSu/DKg+pRj3/Cjmx4LcdpffqzFm67/a FCAYBSXzxybsBmODBxCe1NTjk2ylqLhP1TwcdbWeZnP6A5t6t40oMz/yPOvUPp9d3r/P yRcYMWxzLs0xDrA4BEhUbaUzSYM0GIwvT7XvJGvLQj53K9njrrhIP+/Pkj76RRDWt41u Wl0YkW1a82VWSJxkg0+5J9I94e3FdnA4Q2MHcllDOINCi0oe6TJol1y/PSN+Oxe09Kzs ucHaGO32+X0BsrBUiXAJkdMd2MhO2YFWrS/h1BiwTCfTjYoAul4xxMuuo1xnGPR50YiY afKw== 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; bh=p2gBmrEg+YU5VvRV5ucDREyM3AtG+ntLkVMhamA+I0o=; b=gkDcU+MdeIZq+aCUJ4xhvxI+sNH/Aj1B9XAIa0dh8TshaBmN/bCSkS3ask06jT1C/+ nRiGw1v3hvFhBerUU9+fsfFofAtHykF/xHt4EwPEOGfZvq+RFCADdIUC/Z96yVCPgrHd /teorgGGjpO4sjpWUG5VhUk0YUuozuMWB9dNIABIfs/QQJ2BjCLtHDZFwOuAqkl0rkVo LHr/pUpL2FFTGWzfAatXWZyUeleRxKPxdJmeoY1cYiiGo0kfhreAVZTBdxa8AZ7U/cWz TUSo1CdGd7TyYb0o+BvP+PPdHZ/wh+t0hfo39qgnX2wocCkQRNXWPjhwYeszb7tf59d6 BfDA== X-Gm-Message-State: AKaTC01mgVRoONXpojTT1a+v3ClkO7XCeIgLrggHYGgQ+kvPl3aeO0xxKIhOyf8gLOZLrRqw73J/6CLrBeDSng== X-Received: by 10.36.61.207 with SMTP id n198mr4482823itn.60.1480034197829; Thu, 24 Nov 2016 16:36:37 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.134.66 with HTTP; Thu, 24 Nov 2016 16:36:37 -0800 (PST) X-Originating-IP: [2601:280:8104:2940:4408:8e24:16e9:704e] In-Reply-To: References: <201611211947.uALJlbDd022690@repo.freebsd.org> From: Warner Losh Date: Thu, 24 Nov 2016 17:36:37 -0700 X-Google-Sender-Auth: N9LBo359OmEh9Sx3RLdEE2_VcNA Message-ID: Subject: Re: svn commit: r308942 - in head/sys/modules: . bytgpio To: Ed Maste Cc: Oleksandr Tymoshenko , "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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 00:36:38 -0000 On Thu, Nov 24, 2016 at 12:46 PM, Ed Maste wrote: > On 21 November 2016 at 14:47, Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Mon Nov 21 19:47:37 2016 >> New Revision: 308942 >> URL: https://svnweb.freebsd.org/changeset/base/308942 >> >> Log: >> [bytgpio] Add module for bytgpio(4) > > It looks like this breaks tinderbox for PC98: > > In file included from > /scratch/tmp/emaste/freebsd/sys/modules/bytgpio/../../dev/gpio/bytgpio.c:43: > In file included from > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/acpi.h:56: > In file included from > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acenv.h:194: > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acfreebsd.h:72:10: > fatal error: 'machine/acpica_machdep.h' file not found > #include > ^ > 1 error generated. > *** [bytgpio.o] Error code 1 If this is ACPI specific, don't build it for PC98. It's not relevant because PC98 never had ACPI. Warner From owner-svn-src-head@freebsd.org Fri Nov 25 01:24:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B413C396CD; Fri, 25 Nov 2016 01:24:37 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DF1C8E7E; Fri, 25 Nov 2016 01:24:36 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP1OaPB041421; Fri, 25 Nov 2016 01:24:36 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP1OafJ041420; Fri, 25 Nov 2016 01:24:36 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201611250124.uAP1OafJ041420@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 25 Nov 2016 01:24:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309126 - head/usr.bin/clang/lld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 01:24:37 -0000 Author: emaste Date: Fri Nov 25 01:24:35 2016 New Revision: 309126 URL: https://svnweb.freebsd.org/changeset/base/309126 Log: Correct lld llvm-tblgen dependency file name Modified: head/usr.bin/clang/lld/Makefile Modified: head/usr.bin/clang/lld/Makefile ============================================================================== --- head/usr.bin/clang/lld/Makefile Fri Nov 25 00:25:59 2016 (r309125) +++ head/usr.bin/clang/lld/Makefile Fri Nov 25 01:24:35 2016 (r309126) @@ -55,7 +55,7 @@ LLVM_TBLGEN?= llvm-tblgen ELF/Options.inc: ${LLD_SRCS}/ELF/Options.td ${LLVM_TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include \ - -d ${.TARGET:C/\.h$/.d/} -o ${.TARGET} \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ ${LLVM_SRCS}/tools/lld/ELF/Options.td TGHDRS+= ELF/Options.inc From owner-svn-src-head@freebsd.org Fri Nov 25 01:58:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA101C3B15A; Fri, 25 Nov 2016 01:58:16 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from id.bluezbox.com (id.bluezbox.com [45.55.20.155]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A9131DB6; Fri, 25 Nov 2016 01:58:16 +0000 (UTC) (envelope-from gonzo@id.bluezbox.com) Received: from [136.179.10.143] (helo=[10.140.230.85]) by id.bluezbox.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.87 (FreeBSD)) (envelope-from ) id 1cA5mD-000Pud-G5; Thu, 24 Nov 2016 17:58:09 -0800 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r308942 - in head/sys/modules: . bytgpio From: Oleksandr Tymoshenko In-Reply-To: Date: Thu, 24 Nov 2016 17:57:38 -0800 Cc: "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <721588E6-66AE-40D4-80C5-07D0C2C453E7@freebsd.org> References: <201611211947.uALJlbDd022690@repo.freebsd.org> To: Ed Maste X-Mailer: Apple Mail (2.3251) Sender: gonzo@id.bluezbox.com X-Spam-Level: -- X-Spam-Report: Spam detection software, running on the system "id.bluezbox.com", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > On Nov 24, 2016, at 11:46 AM, Ed Maste wrote: > > On 21 November 2016 at 14:47, Oleksandr Tymoshenko wrote: >> Author: gonzo >> Date: Mon Nov 21 19:47:37 2016 >> New Revision: 308942 >> URL: https://svnweb.freebsd.org/changeset/base/308942 >> >> Log: >> [bytgpio] Add module for bytgpio(4) > > It looks like this breaks tinderbox for PC98: > > In file included from > /scratch/tmp/emaste/freebsd/sys/modules/bytgpio/../../dev/gpio/bytgpio.c:43: > In file included from > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/acpi.h:56: > In file included from > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acenv.h:194: > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acfreebsd.h:72:10: > fatal error: 'machine/acpica_machdep.h' file not found > #include > ^ > 1 error generated. > *** [bytgpio.o] Error code 1 [...] Content analysis details: (-2.9 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP 0.0 HEADER_FROM_DIFFERENT_DOMAINS From and EnvelopeFrom 2nd level mail domains are different -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 01:58:16 -0000 > On Nov 24, 2016, at 11:46 AM, Ed Maste wrote: >=20 > On 21 November 2016 at 14:47, Oleksandr Tymoshenko = wrote: >> Author: gonzo >> Date: Mon Nov 21 19:47:37 2016 >> New Revision: 308942 >> URL: https://svnweb.freebsd.org/changeset/base/308942 >>=20 >> Log: >> [bytgpio] Add module for bytgpio(4) >=20 > It looks like this breaks tinderbox for PC98: >=20 > In file included from > = /scratch/tmp/emaste/freebsd/sys/modules/bytgpio/../../dev/gpio/bytgpio.c:4= 3: > In file included from > /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/acpi.h:56: > In file included from > = /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acenv.= h:194: > = /scratch/tmp/emaste/freebsd/sys/contrib/dev/acpica/include/platform/acfree= bsd.h:72:10: > fatal error: 'machine/acpica_machdep.h' file not found > #include > ^ > 1 error generated. > *** [bytgpio.o] Error code 1 Should be fixed by r309112 committed earlier today= From owner-svn-src-head@freebsd.org Fri Nov 25 04:35:42 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3B624C54238; Fri, 25 Nov 2016 04:35:42 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 16268D4F; Fri, 25 Nov 2016 04:35:42 +0000 (UTC) (envelope-from dexuan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP4ZfkN019109; Fri, 25 Nov 2016 04:35:41 GMT (envelope-from dexuan@FreeBSD.org) Received: (from dexuan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP4Zf57019106; Fri, 25 Nov 2016 04:35:41 GMT (envelope-from dexuan@FreeBSD.org) Message-Id: <201611250435.uAP4Zf57019106@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dexuan set sender to dexuan@FreeBSD.org using -f From: Dexuan Cui Date: Fri, 25 Nov 2016 04:35:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309127 - in head/sys/dev/hyperv: pcib vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 04:35:42 -0000 Author: dexuan Date: Fri Nov 25 04:35:40 2016 New Revision: 309127 URL: https://svnweb.freebsd.org/changeset/base/309127 Log: hyperv/vmbus,pcib: unbreak build in case NEW_PCIB is undefined vmbus_pcib requires NEW_PCIB, but in case that's not defined, we at least shouldn't break build. Reviewed by: sephe Approved by: sephe (mentor) MFC after: 3 days Sponsored by: Microsoft Modified: head/sys/dev/hyperv/pcib/vmbus_pcib.c head/sys/dev/hyperv/vmbus/vmbus.c head/sys/dev/hyperv/vmbus/vmbus_var.h Modified: head/sys/dev/hyperv/pcib/vmbus_pcib.c ============================================================================== --- head/sys/dev/hyperv/pcib/vmbus_pcib.c Fri Nov 25 01:24:35 2016 (r309126) +++ head/sys/dev/hyperv/pcib/vmbus_pcib.c Fri Nov 25 04:35:40 2016 (r309127) @@ -27,6 +27,8 @@ #include __FBSDID("$FreeBSD$"); +#ifdef NEW_PCIB + #include #include #include @@ -1789,3 +1791,5 @@ DEFINE_CLASS_0(pcib, vmbus_pcib_driver, DRIVER_MODULE(vmbus_pcib, vmbus, vmbus_pcib_driver, pcib_devclass, 0, 0); MODULE_DEPEND(vmbus_pcib, vmbus, 1, 1, 1); MODULE_DEPEND(vmbus_pcib, pci, 1, 1, 1); + +#endif /* NEW_PCIB */ Modified: head/sys/dev/hyperv/vmbus/vmbus.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus.c Fri Nov 25 01:24:35 2016 (r309126) +++ head/sys/dev/hyperv/vmbus/vmbus.c Fri Nov 25 04:35:40 2016 (r309127) @@ -1020,16 +1020,21 @@ static struct resource * vmbus_alloc_resource(device_t dev, device_t child, int type, int *rid, rman_res_t start, rman_res_t end, rman_res_t count, u_int flags) { - struct vmbus_softc *sc = device_get_softc(dev); device_t parent = device_get_parent(dev); struct resource *res; - if (type != SYS_RES_MEMORY) - res = BUS_ALLOC_RESOURCE(parent, child, type, rid, start, - end, count, flags); - else +#ifdef NEW_PCIB + if (type == SYS_RES_MEMORY) { + struct vmbus_softc *sc = device_get_softc(dev); + res = pcib_host_res_alloc(&sc->vmbus_mmio_res, child, type, rid, start, end, count, flags); + } else +#endif + { + res = BUS_ALLOC_RESOURCE(parent, child, type, rid, start, + end, count, flags); + } return (res); } @@ -1100,6 +1105,7 @@ vmbus_get_vcpu_id_method(device_t bus, d return (VMBUS_PCPU_GET(sc, vcpuid, cpu)); } +#ifdef NEW_PCIB #define VTPM_BASE_ADDR 0xfed40000 #define FOUR_GB (1ULL << 32) @@ -1231,6 +1237,7 @@ vmbus_free_mmio_res(device_t dev) pcib_host_res_free(dev, &sc->vmbus_mmio_res); } +#endif /* NEW_PCIB */ static int vmbus_probe(device_t dev) @@ -1269,7 +1276,9 @@ vmbus_doattach(struct vmbus_softc *sc) if (sc->vmbus_flags & VMBUS_FLAG_ATTACHED) return (0); +#ifdef NEW_PCIB vmbus_get_mmio_res(sc->vmbus_dev); +#endif sc->vmbus_flags |= VMBUS_FLAG_ATTACHED; @@ -1417,7 +1426,9 @@ vmbus_detach(device_t dev) mtx_destroy(&sc->vmbus_prichan_lock); mtx_destroy(&sc->vmbus_chan_lock); +#ifdef NEW_PCIB vmbus_free_mmio_res(dev); +#endif return (0); } Modified: head/sys/dev/hyperv/vmbus/vmbus_var.h ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_var.h Fri Nov 25 01:24:35 2016 (r309126) +++ head/sys/dev/hyperv/vmbus/vmbus_var.h Fri Nov 25 04:35:40 2016 (r309127) @@ -128,8 +128,10 @@ struct vmbus_softc { struct mtx vmbus_chan_lock; TAILQ_HEAD(, vmbus_channel) vmbus_chans; +#ifdef NEW_PCIB /* The list of usable MMIO ranges for PCIe pass-through */ struct pcib_host_resources vmbus_mmio_res; +#endif }; #define VMBUS_FLAG_ATTACHED 0x0001 /* vmbus was attached */ From owner-svn-src-head@freebsd.org Fri Nov 25 05:18:44 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0AD51C54CFC; Fri, 25 Nov 2016 05:18:44 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from mr11p00im-asmtp004.me.com (mr11p00im-asmtp004.me.com [17.110.69.135]) (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 D3BECE7F; Fri, 25 Nov 2016 05:18:43 +0000 (UTC) (envelope-from rpokala@mac.com) Received: from process-dkim-sign-daemon.mr11p00im-asmtp004.me.com by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) id <0OH600300JV8CX00@mr11p00im-asmtp004.me.com>; Fri, 25 Nov 2016 04:18:37 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mac.com; s=4d515a; t=1480047517; bh=/VKkgWYnwsSdkzQzBMxTWc5OETa9B70H5ppOsx+3wZQ=; h=Date:Subject:From:To:Message-id:MIME-version:Content-type; b=JdLf4V7zUeSLa61Re+Ki1e+88xCdc79NR4ELOVFGC/iH/ms+8CWji7aHnRnrrvdCt BFzksLNIcg/UNcSIG7aQ11LMvfQCEaNmPYlQompbhwG9WgKKfA1vNvxfGU3Wq7xg2F aWgTj8EDz1hd0nbio+mrga8lkNcPihXrc1IuPIVW4HLF+qyoTPdk/LaFy3RzdERHFQ fNCl3Itd5WX4ITaamc8mUIE2FQrUjRf12ovRYssrrYRzMXstaYpkJ2+dNbh2Qwm40e o8fG5clxeXB8kemQfmh7271FnKQEAVfJvgwwLlpta12tjpYqyBHB70w9blvqSNwfIc 2D9uXQj9rOznw== Received: from [192.168.1.4] (c-67-188-225-23.hsd1.ca.comcast.net [67.188.225.23]) by mr11p00im-asmtp004.me.com (Oracle Communications Messaging Server 7.0.5.38.0 64bit (built Feb 26 2016)) with ESMTPSA id <0OH600GKCJYZ5320@mr11p00im-asmtp004.me.com>; Fri, 25 Nov 2016 04:18:36 +0000 (GMT) X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-24_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 spamscore=0 clxscore=1034 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1603290000 definitions=main-1611250076 User-Agent: Microsoft-MacOutlook/f.1c.1.161117 Date: Thu, 24 Nov 2016 20:18:35 -0800 Subject: Re: svn commit: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contrib... From: Ravi Pokala Sender: "Pokala, Ravi" To: Dimitry Andric , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-id: <1B60368B-7A11-48E3-829B-664AE0566E1D@panasas.com> Thread-topic: svn commit: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contrib... References: <201611242254.uAOMswkb081748@repo.freebsd.org> In-reply-to: <201611242254.uAOMswkb081748@repo.freebsd.org> MIME-version: 1.0 Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 05:18:44 -0000 This is huge, and a long time coming! Thanks all! -Ravi (rpokala@) -----Original Message----- > From: on behalf of Dimitry Andric > Date: 2016-11-24, Thursday at 14:54 > To: , , > Subject: svn commit: r309124 - in head: . contrib/compiler-rt contrib/compiler-rt/include/sanitizer contrib/compiler-rt/lib/asan contrib/compiler-rt/lib/builtins contrib/compiler-rt/lib/builtins/arm contrib... > > Author: dim > Date: Thu Nov 24 22:54:55 2016 > New Revision: 309124 > URL: https://svnweb.freebsd.org/changeset/base/309124 > > Log: > Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0 > release, and add lld 3.9.0. Also completely revamp the build system for > clang, llvm, lldb and their related tools. > > Please note that from 3.5.0 onwards, clang, llvm and lldb require C++11 > support to build; see UPDATING for more information. > > Release notes for llvm, clang and lld are available here: > > > > > Thanks to Ed Maste, Bryan Drewery, Andrew Turner, Antoine Brodin and Jan > Beich for their help. > > Relnotes: yes > MFC after: 1 month From owner-svn-src-head@freebsd.org Fri Nov 25 05:35:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF984C521DB; Fri, 25 Nov 2016 05:35:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9EFE78E5; Fri, 25 Nov 2016 05:35:30 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP5ZTVD042899; Fri, 25 Nov 2016 05:35:29 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP5ZTo4042898; Fri, 25 Nov 2016 05:35:29 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250535.uAP5ZTo4042898@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 05:35:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309128 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 05:35:30 -0000 Author: sephe Date: Fri Nov 25 05:35:29 2016 New Revision: 309128 URL: https://svnweb.freebsd.org/changeset/base/309128 Log: hyperv/vmbus: Commit the GPADL id only after the connection succeeds. Minor style change. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8563 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 04:35:40 2016 (r309127) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 05:35:29 2016 (r309128) @@ -453,7 +453,7 @@ vmbus_chan_open_br(struct vmbus_channel failed: vmbus_chan_clear_chmap(chan); - if (chan->ch_bufring_gpadl) { + if (chan->ch_bufring_gpadl != 0) { vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); chan->ch_bufring_gpadl = 0; } @@ -500,7 +500,6 @@ vmbus_chan_gpadl_connect(struct vmbus_ch * Allocate GPADL id. */ gpadl = vmbus_gpadl_alloc(sc); - *gpadl0 = gpadl; /* * Connect this GPADL to the target channel. @@ -579,11 +578,13 @@ vmbus_chan_gpadl_connect(struct vmbus_ch vmbus_chan_printf(chan, "gpadl_conn(chan%u) failed: %u\n", chan->ch_id, status); return EIO; - } else { - if (bootverbose) { - vmbus_chan_printf(chan, - "gpadl_conn(chan%u) succeeded\n", chan->ch_id); - } + } + + /* Done; commit the GPADL id. */ + *gpadl0 = gpadl; + if (bootverbose) { + vmbus_chan_printf(chan, "gpadl_conn(chan%u) succeeded\n", + chan->ch_id); } return 0; } From owner-svn-src-head@freebsd.org Fri Nov 25 05:46:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7F78BC52434; Fri, 25 Nov 2016 05:46:16 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F38DD6E; Fri, 25 Nov 2016 05:46:16 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP5kFi5046962; Fri, 25 Nov 2016 05:46:15 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP5kF1K046961; Fri, 25 Nov 2016 05:46:15 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250546.uAP5kF1K046961@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 05:46:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309129 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 05:46:16 -0000 Author: sephe Date: Fri Nov 25 05:46:15 2016 New Revision: 309129 URL: https://svnweb.freebsd.org/changeset/base/309129 Log: hyperv/vmbus: Minor style changes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8564 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 05:35:29 2016 (r309128) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 05:46:15 2016 (r309129) @@ -345,7 +345,7 @@ vmbus_chan_open_br(struct vmbus_channel if (udlen > VMBUS_CHANMSG_CHOPEN_UDATA_SIZE) { vmbus_chan_printf(chan, "invalid udata len %d for chan%u\n", udlen, chan->ch_id); - return EINVAL; + return (EINVAL); } br = cbr->cbr; @@ -442,10 +442,9 @@ vmbus_chan_open_br(struct vmbus_channel vmbus_msghc_put(sc, mh); if (status == 0) { - if (bootverbose) { + if (bootverbose) vmbus_chan_printf(chan, "chan%u opened\n", chan->ch_id); - } - return 0; + return (0); } vmbus_chan_printf(chan, "failed to open chan%u\n", chan->ch_id); @@ -458,7 +457,7 @@ failed: chan->ch_bufring_gpadl = 0; } atomic_clear_int(&chan->ch_stflags, VMBUS_CHAN_ST_OPENED); - return error; + return (error); } int From owner-svn-src-head@freebsd.org Fri Nov 25 06:01:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6E758C5278C; Fri, 25 Nov 2016 06:01:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3E157830; Fri, 25 Nov 2016 06:01:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP61jxc051922; Fri, 25 Nov 2016 06:01:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP61j1i051921; Fri, 25 Nov 2016 06:01:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250601.uAP61j1i051921@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 06:01:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309131 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 06:01:46 -0000 Author: sephe Date: Fri Nov 25 06:01:45 2016 New Revision: 309131 URL: https://svnweb.freebsd.org/changeset/base/309131 Log: hyperv/vmbus: Fix sysctl tree leakage, if channel open fails. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8565 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 05:54:17 2016 (r309130) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 06:01:45 2016 (r309131) @@ -451,6 +451,7 @@ vmbus_chan_open_br(struct vmbus_channel error = ENXIO; failed: + sysctl_ctx_free(&chan->ch_sysctl_ctx); vmbus_chan_clear_chmap(chan); if (chan->ch_bufring_gpadl != 0) { vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); From owner-svn-src-head@freebsd.org Fri Nov 25 06:12:20 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 016F3C52A52; Fri, 25 Nov 2016 06:12:20 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C529ADFA; Fri, 25 Nov 2016 06:12:19 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP6CIRf058185; Fri, 25 Nov 2016 06:12:18 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP6CISX058184; Fri, 25 Nov 2016 06:12:18 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250612.uAP6CISX058184@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 06:12:18 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309132 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 06:12:20 -0000 Author: sephe Date: Fri Nov 25 06:12:18 2016 New Revision: 309132 URL: https://svnweb.freebsd.org/changeset/base/309132 Log: hyperv/vmbus: Don't close unopened channels. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8566 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 06:01:45 2016 (r309131) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 06:12:18 2016 (r309132) @@ -688,10 +688,28 @@ vmbus_chan_close_internal(struct vmbus_c struct vmbus_softc *sc = chan->ch_vmbus; struct vmbus_msghc *mh; struct vmbus_chanmsg_chclose *req; + uint32_t old_stflags; int error; - /* TODO: stringent check */ - atomic_clear_int(&chan->ch_stflags, VMBUS_CHAN_ST_OPENED); + /* + * NOTE: + * Sub-channels are closed upon their primary channel closing, + * so they can be closed even before they are opened. + */ + for (;;) { + old_stflags = chan->ch_stflags; + if (atomic_cmpset_int(&chan->ch_stflags, old_stflags, + old_stflags & ~VMBUS_CHAN_ST_OPENED)) + break; + } + if ((old_stflags & VMBUS_CHAN_ST_OPENED) == 0) { + /* Not opened yet; done */ + if (bootverbose) { + vmbus_chan_printf(chan, "chan%u not opened\n", + chan->ch_id); + } + return; + } /* * Free this channel's sysctl tree attached to its device's From owner-svn-src-head@freebsd.org Fri Nov 25 06:48:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A8A54C54590; Fri, 25 Nov 2016 06:48:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5E4117D; Fri, 25 Nov 2016 06:48:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP6mreH071263; Fri, 25 Nov 2016 06:48:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP6mrPj071262; Fri, 25 Nov 2016 06:48:53 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250648.uAP6mrPj071262@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 06:48:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309133 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 06:48:54 -0000 Author: sephe Date: Fri Nov 25 06:48:53 2016 New Revision: 309133 URL: https://svnweb.freebsd.org/changeset/base/309133 Log: hyperv/vmbus: GPADL disconnect error on a revoked channel is benign. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8567 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 06:12:18 2016 (r309132) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 06:48:53 2016 (r309133) @@ -66,6 +66,8 @@ static int vmbus_chan_release(struct v static void vmbus_chan_set_chmap(struct vmbus_channel *); static void vmbus_chan_clear_chmap(struct vmbus_channel *); static void vmbus_chan_detach(struct vmbus_channel *); +static bool vmbus_chan_wait_revoke( + const struct vmbus_channel *); static void vmbus_chan_ins_prilist(struct vmbus_softc *, struct vmbus_channel *); @@ -589,6 +591,24 @@ vmbus_chan_gpadl_connect(struct vmbus_ch return 0; } +static bool +vmbus_chan_wait_revoke(const struct vmbus_channel *chan) +{ +#define WAIT_COUNT 200 /* 200ms */ + + int i; + + for (i = 0; i < WAIT_COUNT; ++i) { + if (vmbus_chan_is_revoked(chan)) + return (true); + /* Not sure about the context; use busy-wait. */ + DELAY(1000); + } + return (false); + +#undef WAIT_COUNT +} + /* * Disconnect the GPA from the target channel */ @@ -605,7 +625,7 @@ vmbus_chan_gpadl_disconnect(struct vmbus vmbus_chan_printf(chan, "can not get msg hypercall for gpadl_disconn(chan%u)\n", chan->ch_id); - return EBUSY; + return (EBUSY); } req = vmbus_msghc_dataptr(mh); @@ -615,18 +635,29 @@ vmbus_chan_gpadl_disconnect(struct vmbus error = vmbus_msghc_exec(sc, mh); if (error) { + vmbus_msghc_put(sc, mh); + + if (vmbus_chan_wait_revoke(chan)) { + /* + * Error is benign; this channel is revoked, + * so this GPADL will not be touched anymore. + */ + vmbus_chan_printf(chan, + "gpadl_disconn(revoked chan%u) msg hypercall " + "exec failed: %d\n", chan->ch_id, error); + return (0); + } vmbus_chan_printf(chan, "gpadl_disconn(chan%u) msg hypercall exec failed: %d\n", chan->ch_id, error); - vmbus_msghc_put(sc, mh); - return error; + return (error); } vmbus_msghc_wait_result(sc, mh); /* Discard result; no useful information */ vmbus_msghc_put(sc, mh); - return 0; + return (0); } static void From owner-svn-src-head@freebsd.org Fri Nov 25 07:03:46 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C70DC54A05; Fri, 25 Nov 2016 07:03:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4BD79AAE; Fri, 25 Nov 2016 07:03:46 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP73jVU079617; Fri, 25 Nov 2016 07:03:45 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP73j1S079616; Fri, 25 Nov 2016 07:03:45 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250703.uAP73j1S079616@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 07:03:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309134 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 07:03:46 -0000 Author: sephe Date: Fri Nov 25 07:03:45 2016 New Revision: 309134 URL: https://svnweb.freebsd.org/changeset/base/309134 Log: hyperv/vmbus: No stranded bufring GPADL is allowed. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8568 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 06:48:53 2016 (r309133) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 07:03:45 2016 (r309134) @@ -392,6 +392,8 @@ vmbus_chan_open_br(struct vmbus_channel /* * Connect the bufrings, both RX and TX, to this channel. */ + KASSERT(chan->ch_bufring_gpadl == 0, + ("bufring GPADL is still connected")); error = vmbus_chan_gpadl_connect(chan, cbr->cbr_paddr, txbr_size + rxbr_size, &chan->ch_bufring_gpadl); if (error) { From owner-svn-src-head@freebsd.org Fri Nov 25 07:24:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D0DBFC54D92; Fri, 25 Nov 2016 07:24:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 86D3D63E; Fri, 25 Nov 2016 07:24:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP7OBoU087229; Fri, 25 Nov 2016 07:24:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP7OB0Q087227; Fri, 25 Nov 2016 07:24:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250724.uAP7OB0Q087227@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 07:24:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309135 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 07:24:12 -0000 Author: sephe Date: Fri Nov 25 07:24:11 2016 New Revision: 309135 URL: https://svnweb.freebsd.org/changeset/base/309135 Log: hyperv/vmbus: Return EISCONN if the bufring GPADL can't be disconnected. So that the callers of vmbus_chan_open_br() could handle the passed in bufring memory properly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8569 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Fri Nov 25 07:03:45 2016 (r309134) +++ head/sys/dev/hyperv/include/vmbus.h Fri Nov 25 07:24:11 2016 (r309135) @@ -129,6 +129,17 @@ vmbus_get_channel(device_t dev) return device_get_ivars(dev); } +/* + * vmbus_chan_open_br() + * Return values: + * 0 Succeeded. + * EISCONN Failed, and the memory passed through 'br' is still + * connected. Callers must _not_ free the the memory + * passed through 'br', if this error happens. + * other values Failed. The memory passed through 'br' is no longer + * connected. Callers are free to do anything with the + * memory passed through 'br'. + */ int vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 07:03:45 2016 (r309134) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 07:24:11 2016 (r309135) @@ -324,7 +324,21 @@ vmbus_chan_open(struct vmbus_channel *ch error = vmbus_chan_open_br(chan, &cbr, udata, udlen, cb, cbarg); if (error) { - hyperv_dmamem_free(&chan->ch_bufring_dma, chan->ch_bufring); + if (error == EISCONN) { + /* + * XXX + * The bufring GPADL is still connected; abandon + * this bufring, instead of having mysterious + * crash or trashed data later on. + */ + vmbus_chan_printf(chan, "chan%u bufring GPADL " + "is still connected upon channel open error; " + "leak %d bytes memory\n", chan->ch_id, + txbr_size + rxbr_size); + } else { + hyperv_dmamem_free(&chan->ch_bufring_dma, + chan->ch_bufring); + } chan->ch_bufring = NULL; } return (error); @@ -458,7 +472,17 @@ failed: sysctl_ctx_free(&chan->ch_sysctl_ctx); vmbus_chan_clear_chmap(chan); if (chan->ch_bufring_gpadl != 0) { - vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); + int error1; + + error1 = vmbus_chan_gpadl_disconnect(chan, + chan->ch_bufring_gpadl); + if (error1) { + /* + * Give caller a hint that the bufring GPADL is still + * connected. + */ + error = EISCONN; + } chan->ch_bufring_gpadl = 0; } atomic_clear_int(&chan->ch_stflags, VMBUS_CHAN_ST_OPENED); From owner-svn-src-head@freebsd.org Fri Nov 25 07:41:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 99760C54382; Fri, 25 Nov 2016 07:41:43 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 688D5F8F; Fri, 25 Nov 2016 07:41:43 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP7fgv4092390; Fri, 25 Nov 2016 07:41:42 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP7fgMu092389; Fri, 25 Nov 2016 07:41:42 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250741.uAP7fgMu092389@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 07:41:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309136 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 07:41:43 -0000 Author: sephe Date: Fri Nov 25 07:41:42 2016 New Revision: 309136 URL: https://svnweb.freebsd.org/changeset/base/309136 Log: hyperv/vmbus: Don't free the bufring if its GPADL can't be disconnected. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8570 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 07:24:11 2016 (r309135) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 07:41:42 2016 (r309136) @@ -814,8 +814,22 @@ vmbus_chan_close_internal(struct vmbus_c /* * Disconnect the TX+RX bufrings from this channel. */ - if (chan->ch_bufring_gpadl) { - vmbus_chan_gpadl_disconnect(chan, chan->ch_bufring_gpadl); + if (chan->ch_bufring_gpadl != 0) { + int error1; + + error1 = vmbus_chan_gpadl_disconnect(chan, + chan->ch_bufring_gpadl); + if (error1) { + /* + * XXX + * The bufring GPADL is still connected; abandon + * this bufring, instead of having mysterious + * crash or trashed data later on. + */ + vmbus_chan_printf(chan, "chan%u bufring GPADL " + "is still connected after close\n", chan->ch_id); + chan->ch_bufring = NULL; + } chan->ch_bufring_gpadl = 0; } From owner-svn-src-head@freebsd.org Fri Nov 25 08:31:14 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5223DC52361; Fri, 25 Nov 2016 08:31:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1B005C91; Fri, 25 Nov 2016 08:31:14 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP8VDp2012752; Fri, 25 Nov 2016 08:31:13 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP8VDK6012751; Fri, 25 Nov 2016 08:31:13 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250831.uAP8VDK6012751@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 08:31:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309138 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 08:31:14 -0000 Author: sephe Date: Fri Nov 25 08:31:13 2016 New Revision: 309138 URL: https://svnweb.freebsd.org/changeset/base/309138 Log: hyperv/vmbus: Always try disconnect/free bufring memory upon channel close While I'm here, minor wording and style changes. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8598 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 07:43:31 2016 (r309137) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 08:31:13 2016 (r309138) @@ -792,7 +792,7 @@ vmbus_chan_close_internal(struct vmbus_c vmbus_chan_printf(chan, "can not get msg hypercall for chclose(chan%u)\n", chan->ch_id); - return; + goto disconnect; } req = vmbus_msghc_dataptr(mh); @@ -806,11 +806,13 @@ vmbus_chan_close_internal(struct vmbus_c vmbus_chan_printf(chan, "chclose(chan%u) msg hypercall exec failed: %d\n", chan->ch_id, error); - return; - } else if (bootverbose) { - vmbus_chan_printf(chan, "close chan%u\n", chan->ch_id); + goto disconnect; } + if (bootverbose) + vmbus_chan_printf(chan, "chan%u closed\n", chan->ch_id); + +disconnect: /* * Disconnect the TX+RX bufrings from this channel. */ From owner-svn-src-head@freebsd.org Fri Nov 25 08:57:54 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31636C52CA7; Fri, 25 Nov 2016 08:57:54 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DB167E26; Fri, 25 Nov 2016 08:57:53 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP8vriF023740; Fri, 25 Nov 2016 08:57:53 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP8vrUY023739; Fri, 25 Nov 2016 08:57:53 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250857.uAP8vrUY023739@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 08:57:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309139 - head/sys/dev/hyperv/vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 08:57:54 -0000 Author: sephe Date: Fri Nov 25 08:57:52 2016 New Revision: 309139 URL: https://svnweb.freebsd.org/changeset/base/309139 Log: hyperv/vmbus: Propagate close error. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8599 Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 08:31:13 2016 (r309138) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 08:57:52 2016 (r309139) @@ -53,7 +53,7 @@ __FBSDID("$FreeBSD$"); static void vmbus_chan_update_evtflagcnt( struct vmbus_softc *, const struct vmbus_channel *); -static void vmbus_chan_close_internal( +static int vmbus_chan_close_internal( struct vmbus_channel *); static int vmbus_chan_sysctl_mnf(SYSCTL_HANDLER_ARGS); static void vmbus_chan_sysctl_create( @@ -739,7 +739,7 @@ vmbus_chan_set_chmap(struct vmbus_channe chan->ch_vmbus->vmbus_chmap[chan->ch_id] = chan; } -static void +static int vmbus_chan_close_internal(struct vmbus_channel *chan) { struct vmbus_softc *sc = chan->ch_vmbus; @@ -765,7 +765,7 @@ vmbus_chan_close_internal(struct vmbus_c vmbus_chan_printf(chan, "chan%u not opened\n", chan->ch_id); } - return; + return (0); } /* @@ -792,6 +792,7 @@ vmbus_chan_close_internal(struct vmbus_c vmbus_chan_printf(chan, "can not get msg hypercall for chclose(chan%u)\n", chan->ch_id); + error = ENXIO; goto disconnect; } @@ -831,6 +832,11 @@ disconnect: vmbus_chan_printf(chan, "chan%u bufring GPADL " "is still connected after close\n", chan->ch_id); chan->ch_bufring = NULL; + /* + * Give caller a hint that the bufring GPADL is + * still connected. + */ + error = EISCONN; } chan->ch_bufring_gpadl = 0; } @@ -842,6 +848,7 @@ disconnect: hyperv_dmamem_free(&chan->ch_bufring_dma, chan->ch_bufring); chan->ch_bufring = NULL; } + return (error); } /* From owner-svn-src-head@freebsd.org Fri Nov 25 09:13:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2D669C53502; Fri, 25 Nov 2016 09:13:12 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 07F2FB29; Fri, 25 Nov 2016 09:13:11 +0000 (UTC) (envelope-from sephe@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAP9DB0w031698; Fri, 25 Nov 2016 09:13:11 GMT (envelope-from sephe@FreeBSD.org) Received: (from sephe@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAP9DBCO031696; Fri, 25 Nov 2016 09:13:11 GMT (envelope-from sephe@FreeBSD.org) Message-Id: <201611250913.uAP9DBCO031696@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sephe set sender to sephe@FreeBSD.org using -f From: Sepherosa Ziehau Date: Fri, 25 Nov 2016 09:13:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309140 - in head/sys/dev/hyperv: include vmbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 09:13:12 -0000 Author: sephe Date: Fri Nov 25 09:13:10 2016 New Revision: 309140 URL: https://svnweb.freebsd.org/changeset/base/309140 Log: hyperv/vmbus: Add a simplified version of channel close. So that the caller can know the channel close error and react accordingly. MFC after: 1 week Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D8600 Modified: head/sys/dev/hyperv/include/vmbus.h head/sys/dev/hyperv/vmbus/vmbus_chan.c Modified: head/sys/dev/hyperv/include/vmbus.h ============================================================================== --- head/sys/dev/hyperv/include/vmbus.h Fri Nov 25 08:57:52 2016 (r309139) +++ head/sys/dev/hyperv/include/vmbus.h Fri Nov 25 09:13:10 2016 (r309140) @@ -131,6 +131,7 @@ vmbus_get_channel(device_t dev) /* * vmbus_chan_open_br() + * * Return values: * 0 Succeeded. * EISCONN Failed, and the memory passed through 'br' is still @@ -139,6 +140,24 @@ vmbus_get_channel(device_t dev) * other values Failed. The memory passed through 'br' is no longer * connected. Callers are free to do anything with the * memory passed through 'br'. + * + * + * + * vmbus_chan_close_direct() + * + * NOTE: + * Callers of this function _must_ make sure to close all sub-channels before + * closing the primary channel. + * + * Return values: + * 0 Succeeded. + * EISCONN Failed, and the memory associated with the bufring + * is still connected. Callers must _not_ free the the + * memory associated with the bufring, if this error + * happens. + * other values Failed. The memory associated with the bufring is + * no longer connected. Callers are free to do anything + * with the memory associated with the bufring. */ int vmbus_chan_open(struct vmbus_channel *chan, int txbr_size, int rxbr_size, const void *udata, int udlen, @@ -147,6 +166,7 @@ int vmbus_chan_open_br(struct vmbus_cha const struct vmbus_chan_br *cbr, const void *udata, int udlen, vmbus_chan_callback_t cb, void *cbarg); void vmbus_chan_close(struct vmbus_channel *chan); +int vmbus_chan_close_direct(struct vmbus_channel *chan); void vmbus_chan_intr_drain(struct vmbus_channel *chan); void vmbus_chan_run_task(struct vmbus_channel *chan, struct task *task); Modified: head/sys/dev/hyperv/vmbus/vmbus_chan.c ============================================================================== --- head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 08:57:52 2016 (r309139) +++ head/sys/dev/hyperv/vmbus/vmbus_chan.c Fri Nov 25 09:13:10 2016 (r309140) @@ -851,6 +851,41 @@ disconnect: return (error); } +int +vmbus_chan_close_direct(struct vmbus_channel *chan) +{ + int error; + +#ifdef INVARIANTS + if (VMBUS_CHAN_ISPRIMARY(chan)) { + struct vmbus_channel *subchan; + + /* + * All sub-channels _must_ have been closed, or are _not_ + * opened at all. + */ + mtx_lock(&chan->ch_subchan_lock); + TAILQ_FOREACH(subchan, &chan->ch_subchans, ch_sublink) { + KASSERT( + (subchan->ch_stflags & VMBUS_CHAN_ST_OPENED) == 0, + ("chan%u: subchan%u is still opened", + chan->ch_id, subchan->ch_subidx)); + } + mtx_unlock(&chan->ch_subchan_lock); + } +#endif + + error = vmbus_chan_close_internal(chan); + if (!VMBUS_CHAN_ISPRIMARY(chan)) { + /* + * This sub-channel is referenced, when it is linked to + * the primary channel; drop that reference now. + */ + vmbus_chan_detach(chan); + } + return (error); +} + /* * Caller should make sure that all sub-channels have * been added to 'chan' and all to-be-closed channels From owner-svn-src-head@freebsd.org Fri Nov 25 13:15:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0F435C5448A; Fri, 25 Nov 2016 13:15:30 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DDA6AC5C; Fri, 25 Nov 2016 13:15:29 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPDFTWl029913; Fri, 25 Nov 2016 13:15:29 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPDFSVL029907; Fri, 25 Nov 2016 13:15:28 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201611251315.uAPDFSVL029907@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 25 Nov 2016 13:15:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309142 - in head: . gnu/usr.bin/binutils/ld share/mk tools/build/options usr.bin/clang/lld X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 13:15:30 -0000 Author: emaste Date: Fri Nov 25 13:15:28 2016 New Revision: 309142 URL: https://svnweb.freebsd.org/changeset/base/309142 Log: Add WITH_LLD_AS_LD build knob If set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is not capable of linking the world and kernel, but can self-host and link many substantial applications. GNU ld continues to be used for the world and kernel build, regardless of how this knob is set. It is on by default for arm64, and off for all other CPU architectures. Sponsored by: The FreeBSD Foundation Added: head/tools/build/options/WITHOUT_LLD_AS_LD (contents, props changed) head/tools/build/options/WITH_LLD_AS_LD (contents, props changed) Modified: head/Makefile.inc1 head/gnu/usr.bin/binutils/ld/Makefile head/share/mk/src.opts.mk head/usr.bin/clang/lld/Makefile Modified: head/Makefile.inc1 ============================================================================== --- head/Makefile.inc1 Fri Nov 25 10:40:48 2016 (r309141) +++ head/Makefile.inc1 Fri Nov 25 13:15:28 2016 (r309142) @@ -516,7 +516,7 @@ TMAKE= MAKEOBJDIRPREFIX=${OBJTREE} \ # cross-tools stage XMAKE= TOOLS_PREFIX=${WORLDTMP} ${BMAKE} \ TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} \ - MK_GDB=no MK_TESTS=no + MK_GDB=no MK_TESTS=no MK_LLD_AS_LD=no # kernel-tools stage KTMAKEENV= INSTALL="sh ${.CURDIR}/tools/install.sh" \ Modified: head/gnu/usr.bin/binutils/ld/Makefile ============================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile Fri Nov 25 10:40:48 2016 (r309141) +++ head/gnu/usr.bin/binutils/ld/Makefile Fri Nov 25 13:15:28 2016 (r309142) @@ -49,7 +49,9 @@ CLEANFILES+= ldemul-list.h stringify.sed FILES= ${LDSCRIPTS:S|^|ldscripts/|} FILESDIR= ${SCRIPTDIR} +.if ${MK_LLD_AS_LD} == "no" LINKS= ${BINDIR}/ld.bfd ${BINDIR}/ld +.endif HOST= ${TARGET_TUPLE} LIBSEARCHPATH= \"=/lib\":\"=/usr/lib\" Modified: head/share/mk/src.opts.mk ============================================================================== --- head/share/mk/src.opts.mk Fri Nov 25 10:40:48 2016 (r309141) +++ head/share/mk/src.opts.mk Fri Nov 25 13:15:28 2016 (r309142) @@ -250,6 +250,11 @@ __DEFAULT_YES_OPTIONS+=LLVM_LIBUNWIND .else __DEFAULT_NO_OPTIONS+=LLVM_LIBUNWIND .endif +.if ${__T} == "aarch64" +__DEFAULT_YES_OPTIONS+=LLD_AS_LD +.else +__DEFAULT_NO_OPTIONS+=LLD_AS_LD +.endif .if ${__T} == "aarch64" || ${__T} == "amd64" __DEFAULT_YES_OPTIONS+=LLD LLDB .else Added: head/tools/build/options/WITHOUT_LLD_AS_LD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITHOUT_LLD_AS_LD Fri Nov 25 13:15:28 2016 (r309142) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to use GNU binutils ld as the system linker, instead of LLVM's LLD. Added: head/tools/build/options/WITH_LLD_AS_LD ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/tools/build/options/WITH_LLD_AS_LD Fri Nov 25 13:15:28 2016 (r309142) @@ -0,0 +1,2 @@ +.\" $FreeBSD$ +Set to use LLVM's LLD as the system linker, instead of GNU binutils ld. Modified: head/usr.bin/clang/lld/Makefile ============================================================================== --- head/usr.bin/clang/lld/Makefile Fri Nov 25 10:40:48 2016 (r309141) +++ head/usr.bin/clang/lld/Makefile Fri Nov 25 13:15:28 2016 (r309142) @@ -1,10 +1,15 @@ # $FreeBSD$ +.include + LLVM_SRCS= ${SRCTOP}/contrib/llvm LLD_SRCS= ${LLVM_SRCS}/tools/lld PROG_CXX= ld.lld MAN= +.if ${MK_LLD_AS_LD} != "no" +SYMLINKS= ${PROG_CXX} ${BINDIR}/ld +.endif CFLAGS+= -I${LLD_SRCS}/include CFLAGS+= -I${.OBJDIR} From owner-svn-src-head@freebsd.org Fri Nov 25 13:49:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5D2CAC54F98; Fri, 25 Nov 2016 13:49:34 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1F563D90; Fri, 25 Nov 2016 13:49:34 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPDnXuV042111; Fri, 25 Nov 2016 13:49:33 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPDnX09042110; Fri, 25 Nov 2016 13:49:33 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201611251349.uAPDnX09042110@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Fri, 25 Nov 2016 13:49:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309143 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 13:49:34 -0000 Author: fabient Date: Fri Nov 25 13:49:33 2016 New Revision: 309143 URL: https://svnweb.freebsd.org/changeset/base/309143 Log: In a dual processor system (2*6 cores) during IPSec throughput tests, we see a lot of contention on the arc4 lock, used to generate the IV of the ESP output packets. The idea of this patch is to split this mutex in order to reduce the contention on this lock. Reviewed by: delphij, markm, ache Approved by: so Obtained from: emeric.poupon@stormshield.eu MFC after: 1 month Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D8130 Modified: head/sys/libkern/arc4random.c Modified: head/sys/libkern/arc4random.c ============================================================================== --- head/sys/libkern/arc4random.c Fri Nov 25 13:15:28 2016 (r309142) +++ head/sys/libkern/arc4random.c Fri Nov 25 13:49:33 2016 (r309143) @@ -19,6 +19,8 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include +#include #define ARC4_RESEED_BYTES 65536 #define ARC4_RESEED_SECONDS 300 @@ -26,13 +28,23 @@ __FBSDID("$FreeBSD$"); int arc4rand_iniseed_state = ARC4_ENTR_NONE; -static u_int8_t arc4_i, arc4_j; -static int arc4_numruns = 0; -static u_int8_t arc4_sbox[256]; -static time_t arc4_t_reseed; -static struct mtx arc4_mtx; +MALLOC_DEFINE(M_ARC4RANDOM, "arc4random", "arc4random structures"); -static u_int8_t arc4_randbyte(void); +struct arc4_s { + u_int8_t i, j; + int numruns; + u_int8_t sbox[256]; + time_t t_reseed; + + struct mtx mtx; +}; + +static struct arc4_s *arc4inst = NULL; + +#define ARC4_FOREACH(_arc4) \ + for (_arc4 = &arc4inst[0]; _arc4 <= &arc4inst[mp_maxid]; _arc4++) + +static u_int8_t arc4_randbyte(struct arc4_s *arc4); static __inline void arc4_swap(u_int8_t *a, u_int8_t *b) @@ -48,7 +60,7 @@ arc4_swap(u_int8_t *a, u_int8_t *b) * Stir our S-box. */ static void -arc4_randomstir(void) +arc4_randomstir(struct arc4_s* arc4) { u_int8_t key[ARC4_KEYBYTES]; int n; @@ -60,15 +72,15 @@ arc4_randomstir(void) */ (void)read_random(key, ARC4_KEYBYTES); getmicrouptime(&tv_now); - mtx_lock(&arc4_mtx); + mtx_lock(&arc4->mtx); for (n = 0; n < 256; n++) { - arc4_j = (arc4_j + arc4_sbox[n] + key[n]) % 256; - arc4_swap(&arc4_sbox[n], &arc4_sbox[arc4_j]); + arc4->j = (arc4->j + arc4->sbox[n] + key[n]) % 256; + arc4_swap(&arc4->sbox[n], &arc4->sbox[arc4->j]); } - arc4_i = arc4_j = 0; + arc4->i = arc4->j = 0; /* Reset for next reseed cycle. */ - arc4_t_reseed = tv_now.tv_sec + ARC4_RESEED_SECONDS; - arc4_numruns = 0; + arc4->t_reseed = tv_now.tv_sec + ARC4_RESEED_SECONDS; + arc4->numruns = 0; /* * Throw away the first N words of output, as suggested in the * paper "Weaknesses in the Key Scheduling Algorithm of RC4" @@ -77,8 +89,9 @@ arc4_randomstir(void) * http://dl.acm.org/citation.cfm?id=646557.694759 */ for (n = 0; n < 256*4; n++) - arc4_randbyte(); - mtx_unlock(&arc4_mtx); + arc4_randbyte(arc4); + + mtx_unlock(&arc4->mtx); } /* @@ -87,33 +100,57 @@ arc4_randomstir(void) static void arc4_init(void) { + struct arc4_s *arc4; int n; - mtx_init(&arc4_mtx, "arc4_mtx", NULL, MTX_DEF); - arc4_i = arc4_j = 0; - for (n = 0; n < 256; n++) - arc4_sbox[n] = (u_int8_t) n; + arc4inst = malloc((mp_maxid + 1) * sizeof(struct arc4_s), + M_ARC4RANDOM, M_NOWAIT | M_ZERO); + KASSERT(arc4inst != NULL, ("arc4_init: memory allocation error")); + + ARC4_FOREACH(arc4) { + mtx_init(&arc4->mtx, "arc4_mtx", NULL, MTX_DEF); + + arc4->i = arc4->j = 0; + for (n = 0; n < 256; n++) + arc4->sbox[n] = (u_int8_t) n; - arc4_t_reseed = 0; + arc4->t_reseed = -1; + arc4->numruns = 0; + } } +SYSINIT(arc4, SI_SUB_LOCK, SI_ORDER_ANY, arc4_init, NULL); + + +static void +arc4_uninit(void) +{ + struct arc4_s *arc4; + + ARC4_FOREACH(arc4) { + mtx_destroy(&arc4->mtx); + } + + free(arc4inst, M_ARC4RANDOM); +} + +SYSUNINIT(arc4, SI_SUB_LOCK, SI_ORDER_ANY, arc4_uninit, NULL); -SYSINIT(arc4_init, SI_SUB_LOCK, SI_ORDER_ANY, arc4_init, NULL); /* * Generate a random byte. */ static u_int8_t -arc4_randbyte(void) +arc4_randbyte(struct arc4_s *arc4) { u_int8_t arc4_t; - arc4_i = (arc4_i + 1) % 256; - arc4_j = (arc4_j + arc4_sbox[arc4_i]) % 256; + arc4->i = (arc4->i + 1) % 256; + arc4->j = (arc4->j + arc4->sbox[arc4->i]) % 256; - arc4_swap(&arc4_sbox[arc4_i], &arc4_sbox[arc4_j]); + arc4_swap(&arc4->sbox[arc4->i], &arc4->sbox[arc4->j]); - arc4_t = (arc4_sbox[arc4_i] + arc4_sbox[arc4_j]) % 256; - return arc4_sbox[arc4_t]; + arc4_t = (arc4->sbox[arc4->i] + arc4->sbox[arc4->j]) % 256; + return arc4->sbox[arc4_t]; } /* @@ -124,20 +161,26 @@ arc4rand(void *ptr, u_int len, int resee { u_char *p; struct timeval tv; + struct arc4_s *arc4; + + if (reseed || atomic_cmpset_int(&arc4rand_iniseed_state, + ARC4_ENTR_HAVE, ARC4_ENTR_SEED)) { + ARC4_FOREACH(arc4) + arc4_randomstir(arc4); + } + arc4 = &arc4inst[curcpu]; getmicrouptime(&tv); - if (atomic_cmpset_int(&arc4rand_iniseed_state, ARC4_ENTR_HAVE, - ARC4_ENTR_SEED) || reseed || - (arc4_numruns > ARC4_RESEED_BYTES) || - (tv.tv_sec > arc4_t_reseed)) - arc4_randomstir(); + if ((arc4->numruns > ARC4_RESEED_BYTES) || + (tv.tv_sec > arc4->t_reseed)) + arc4_randomstir(arc4); - mtx_lock(&arc4_mtx); - arc4_numruns += len; + mtx_lock(&arc4->mtx); + arc4->numruns += len; p = ptr; while (len--) - *p++ = arc4_randbyte(); - mtx_unlock(&arc4_mtx); + *p++ = arc4_randbyte(arc4); + mtx_unlock(&arc4->mtx); } uint32_t From owner-svn-src-head@freebsd.org Fri Nov 25 14:44:51 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 16EA3C54039; Fri, 25 Nov 2016 14:44:51 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D9D3EE02; Fri, 25 Nov 2016 14:44:50 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPEioP5066032; Fri, 25 Nov 2016 14:44:50 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPEinKb066023; Fri, 25 Nov 2016 14:44:49 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201611251444.uAPEinKb066023@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Fri, 25 Nov 2016 14:44:49 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309144 - in head: lib/libipsec sys/net sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 14:44:51 -0000 Author: fabient Date: Fri Nov 25 14:44:49 2016 New Revision: 309144 URL: https://svnweb.freebsd.org/changeset/base/309144 Log: IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets. Since the previous algorithm, based on bit shifting, does not scale with large replay windows, the algorithm used here is based on RFC 6479: IPsec Anti-Replay Algorithm without Bit Shifting. The replay window will be fast to be updated, but will cost as many bits in RAM as its size. The previous implementation did not provide a lock on the replay window, which may lead to replay issues. Reviewed by: ae Obtained from: emeric.poupon@stormshield.eu Sponsored by: Stormshield Differential Revision: https://reviews.freebsd.org/D8468 Modified: head/lib/libipsec/pfkey.c head/lib/libipsec/pfkey_dump.c head/sys/net/pfkeyv2.h head/sys/netipsec/ipsec.c head/sys/netipsec/key.c head/sys/netipsec/key_debug.c head/sys/netipsec/keydb.h head/sys/netipsec/xform_ah.c head/sys/netipsec/xform_esp.c Modified: head/lib/libipsec/pfkey.c ============================================================================== --- head/lib/libipsec/pfkey.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/lib/libipsec/pfkey.c Fri Nov 25 14:44:49 2016 (r309144) @@ -1776,6 +1776,7 @@ pfkey_align(msg, mhp) case SADB_EXT_SPIRANGE: case SADB_X_EXT_POLICY: case SADB_X_EXT_SA2: + case SADB_X_EXT_SA_REPLAY: mhp[ext->sadb_ext_type] = (caddr_t)ext; break; case SADB_X_EXT_NAT_T_TYPE: Modified: head/lib/libipsec/pfkey_dump.c ============================================================================== --- head/lib/libipsec/pfkey_dump.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/lib/libipsec/pfkey_dump.c Fri Nov 25 14:44:49 2016 (r309144) @@ -219,6 +219,7 @@ pfkey_sadump(m) struct sadb_key *m_auth, *m_enc; struct sadb_ident *m_sid, *m_did; struct sadb_sens *m_sens; + struct sadb_x_sa_replay *m_sa_replay; /* check pfkey message. */ if (pfkey_align(m, mhp)) { @@ -243,6 +244,7 @@ pfkey_sadump(m) m_sid = (struct sadb_ident *)mhp[SADB_EXT_IDENTITY_SRC]; m_did = (struct sadb_ident *)mhp[SADB_EXT_IDENTITY_DST]; m_sens = (struct sadb_sens *)mhp[SADB_EXT_SENSITIVITY]; + m_sa_replay = (struct sadb_x_sa_replay *)mhp[SADB_X_EXT_SA_REPLAY]; /* source address */ if (m_saddr == NULL) { @@ -306,7 +308,8 @@ pfkey_sadump(m) /* replay windoe size & flags */ printf("\tseq=0x%08x replay=%u flags=0x%08x ", m_sa2->sadb_x_sa2_sequence, - m_sa->sadb_sa_replay, + m_sa_replay ? (m_sa_replay->sadb_x_sa_replay_replay >> 3) : + m_sa->sadb_sa_replay, m_sa->sadb_sa_flags); /* state */ Modified: head/sys/net/pfkeyv2.h ============================================================================== --- head/sys/net/pfkeyv2.h Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/net/pfkeyv2.h Fri Nov 25 14:44:49 2016 (r309144) @@ -283,6 +283,14 @@ struct sadb_x_nat_t_frag { }; _Static_assert(sizeof(struct sadb_x_nat_t_frag) == 8, "struct size mismatch"); +/* Additional large replay window support + */ +struct sadb_x_sa_replay { + u_int16_t sadb_x_sa_replay_len; + u_int16_t sadb_x_sa_replay_exttype; + u_int32_t sadb_x_sa_replay_replay; /* in packets */ +}; +_Static_assert(sizeof(struct sadb_x_sa_replay) == 8, "struct size mismatch"); #define SADB_EXT_RESERVED 0 #define SADB_EXT_SA 1 @@ -311,7 +319,8 @@ _Static_assert(sizeof(struct sadb_x_nat_ #define SADB_X_EXT_NAT_T_OAI 23 /* Peer's NAT_OA for src of SA. */ #define SADB_X_EXT_NAT_T_OAR 24 /* Peer's NAT_OA for dst of SA. */ #define SADB_X_EXT_NAT_T_FRAG 25 /* Manual MTU override. */ -#define SADB_EXT_MAX 25 +#define SADB_X_EXT_SA_REPLAY 26 /* Replay window override. */ +#define SADB_EXT_MAX 26 #define SADB_SATYPE_UNSPEC 0 #define SADB_SATYPE_AH 2 Modified: head/sys/netipsec/ipsec.c ============================================================================== --- head/sys/netipsec/ipsec.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/netipsec/ipsec.c Fri Nov 25 14:44:49 2016 (r309144) @@ -251,7 +251,6 @@ static int ipsec6_setspidx_ipaddr(const #endif static void ipsec_delpcbpolicy(struct inpcbpolicy *); static struct secpolicy *ipsec_deepcopy_policy(struct secpolicy *src); -static void vshiftl(unsigned char *, int, int); MALLOC_DEFINE(M_IPSEC_INPCB, "inpcbpolicy", "inpcb-resident ipsec policy"); @@ -1476,57 +1475,70 @@ ipsec_hdrsiz(const struct mbuf *m, u_int * beforehand). * 0 (zero) is returned if packet disallowed, 1 if packet permitted. * - * Based on RFC 2401. + * Based on RFC 6479. Blocks are 32 bits unsigned integers */ + +#define IPSEC_BITMAP_INDEX_MASK(w) (w - 1) +#define IPSEC_REDUNDANT_BIT_SHIFTS 5 +#define IPSEC_REDUNDANT_BITS (1 << IPSEC_REDUNDANT_BIT_SHIFTS) +#define IPSEC_BITMAP_LOC_MASK (IPSEC_REDUNDANT_BITS - 1) + int ipsec_chkreplay(u_int32_t seq, struct secasvar *sav) { const struct secreplay *replay; - u_int32_t diff; - int fr; - u_int32_t wsizeb; /* Constant: bits of window size. */ - int frlast; /* Constant: last frame. */ + u_int32_t wsizeb; /* Constant: window size. */ + int ret, index, bit_location; IPSEC_ASSERT(sav != NULL, ("Null SA")); IPSEC_ASSERT(sav->replay != NULL, ("Null replay state")); + SECASVAR_LOCK(sav); + + ret = 0; replay = sav->replay; + /* No need to check replay if disabled. */ if (replay->wsize == 0) - return (1); /* No need to check replay. */ + goto allowed; /* Constant. */ - frlast = replay->wsize - 1; wsizeb = replay->wsize << 3; /* Sequence number of 0 is invalid. */ if (seq == 0) - return (0); + goto end; /* First time is always okay. */ if (replay->count == 0) - return (1); - - if (seq > replay->lastseq) { - /* Larger sequences are okay. */ - return (1); - } else { - /* seq is equal or less than lastseq. */ - diff = replay->lastseq - seq; + goto allowed; - /* Over range to check, i.e. too old or wrapped. */ - if (diff >= wsizeb) - return (0); - - fr = frlast - diff / 8; - - /* This packet already seen? */ - if ((replay->bitmap)[fr] & (1 << (diff % 8))) - return (0); + /* Larger sequences are okay. */ + if (seq > replay->lastseq) + goto allowed; + + /* Over range to check, i.e. too old or wrapped. */ + if (replay->lastseq - seq >= wsizeb) + goto end; + + /* The sequence is inside the sliding window + * now check the bit in the bitmap + * bit location only depends on the sequence number + */ + bit_location = seq & IPSEC_BITMAP_LOC_MASK; + index = (seq >> IPSEC_REDUNDANT_BIT_SHIFTS) + & IPSEC_BITMAP_INDEX_MASK(replay->bitmap_size); + + /* This packet already seen? */ + if ((replay->bitmap)[index] & (1 << bit_location)) + goto end; + +allowed: + ret = 1; +end: + SECASVAR_UNLOCK(sav); - /* Out of order but good. */ - return (1); - } + return (ret); } /* @@ -1539,72 +1551,61 @@ ipsec_updatereplay(u_int32_t seq, struct { char buf[128]; struct secreplay *replay; - u_int32_t diff; - int fr; - u_int32_t wsizeb; /* Constant: bits of window size. */ - int frlast; /* Constant: last frame. */ + u_int32_t wsizeb; /* Constant: window size. */ + int ret, diff, index, bit_location; IPSEC_ASSERT(sav != NULL, ("Null SA")); IPSEC_ASSERT(sav->replay != NULL, ("Null replay state")); + SECASVAR_LOCK(sav); + + ret = 1; replay = sav->replay; if (replay->wsize == 0) goto ok; /* No need to check replay. */ /* Constant. */ - frlast = replay->wsize - 1; wsizeb = replay->wsize << 3; /* Sequence number of 0 is invalid. */ if (seq == 0) - return (1); + goto end; - /* First time. */ - if (replay->count == 0) { - replay->lastseq = seq; - bzero(replay->bitmap, replay->wsize); - (replay->bitmap)[frlast] = 1; + /* The packet is too old, no need to update */ + if (wsizeb + seq < replay->lastseq) goto ok; - } + /* Now update the bit */ + index = (seq >> IPSEC_REDUNDANT_BIT_SHIFTS); + + /* First check if the sequence number is in the range */ if (seq > replay->lastseq) { - /* seq is larger than lastseq. */ - diff = seq - replay->lastseq; + int id; + int index_cur = replay->lastseq >> IPSEC_REDUNDANT_BIT_SHIFTS; - /* New larger sequence number. */ - if (diff < wsizeb) { - /* In window. */ - /* Set bit for this packet. */ - vshiftl(replay->bitmap, diff, replay->wsize); - (replay->bitmap)[frlast] |= 1; - } else { - /* This packet has a "way larger". */ - bzero(replay->bitmap, replay->wsize); - (replay->bitmap)[frlast] = 1; + diff = index - index_cur; + if (diff > replay->bitmap_size) { + /* something unusual in this case */ + diff = replay->bitmap_size; } - replay->lastseq = seq; - /* Larger is good. */ - } else { - /* seq is equal or less than lastseq. */ - diff = replay->lastseq - seq; - - /* Over range to check, i.e. too old or wrapped. */ - if (diff >= wsizeb) - return (1); + for (id = 0; id < diff; ++id) { + replay->bitmap[(id + index_cur + 1) + & IPSEC_BITMAP_INDEX_MASK(replay->bitmap_size)] = 0; + } - fr = frlast - diff / 8; + replay->lastseq = seq; + } - /* This packet already seen? */ - if ((replay->bitmap)[fr] & (1 << (diff % 8))) - return (1); + index &= IPSEC_BITMAP_INDEX_MASK(replay->bitmap_size); + bit_location = seq & IPSEC_BITMAP_LOC_MASK; - /* Mark as seen. */ - (replay->bitmap)[fr] |= (1 << (diff % 8)); + /* this packet has already been received */ + if (replay->bitmap[index] & (1 << bit_location)) + goto end; - /* Out of order but good. */ - } + replay->bitmap[index] |= (1 << bit_location); ok: if (replay->count == ~0) { @@ -1614,39 +1615,18 @@ ok: /* Don't increment, no more packets accepted. */ if ((sav->flags & SADB_X_EXT_CYCSEQ) == 0) - return (1); + goto end; ipseclog((LOG_WARNING, "%s: replay counter made %d cycle. %s\n", __func__, replay->overflow, ipsec_logsastr(sav, buf, sizeof(buf)))); } - replay->count++; - - return (0); -} + ret = 0; -/* - * Shift variable length buffer to left. - * IN: bitmap: pointer to the buffer - * nbit: the number of to shift. - * wsize: buffer size (bytes). - */ -static void -vshiftl(unsigned char *bitmap, int nbit, int wsize) -{ - int s, j, i; - unsigned char over; - - for (j = 0; j < nbit; j += 8) { - s = (nbit - j < 8) ? (nbit - j): 8; - bitmap[0] <<= s; - for (i = 1; i < wsize; i++) { - over = (bitmap[i] >> (8 - s)); - bitmap[i] <<= s; - bitmap[i-1] |= over; - } - } +end: + SECASVAR_UNLOCK(sav); + return (ret); } /* Return a printable string for the address. */ Modified: head/sys/netipsec/key.c ============================================================================== --- head/sys/netipsec/key.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/netipsec/key.c Fri Nov 25 14:44:49 2016 (r309144) @@ -243,7 +243,10 @@ static const int minsize[] = { sizeof(struct sadb_address), /* SADB_X_EXT_NAT_T_OAI */ sizeof(struct sadb_address), /* SADB_X_EXT_NAT_T_OAR */ sizeof(struct sadb_x_nat_t_frag),/* SADB_X_EXT_NAT_T_FRAG */ + sizeof(struct sadb_x_sa_replay), /* SADB_X_EXT_SA_REPLAY */ }; +_Static_assert(sizeof(minsize)/sizeof(int) == SADB_EXT_MAX + 1, "minsize size mismatch"); + static const int maxsize[] = { sizeof(struct sadb_msg), /* SADB_EXT_RESERVED */ sizeof(struct sadb_sa), /* SADB_EXT_SA */ @@ -271,7 +274,9 @@ static const int maxsize[] = { 0, /* SADB_X_EXT_NAT_T_OAI */ 0, /* SADB_X_EXT_NAT_T_OAR */ sizeof(struct sadb_x_nat_t_frag),/* SADB_X_EXT_NAT_T_FRAG */ + sizeof(struct sadb_x_sa_replay), /* SADB_X_EXT_SA_REPLAY */ }; +_Static_assert(sizeof(maxsize)/sizeof(int) == SADB_EXT_MAX + 1, "minsize size mismatch"); static VNET_DEFINE(int, ipsec_esp_keymin) = 256; static VNET_DEFINE(int, ipsec_esp_auth) = 0; @@ -472,6 +477,7 @@ static void key_porttosaddr(struct socka #define KEY_PORTTOSADDR(saddr, port) \ key_porttosaddr((struct sockaddr *)(saddr), (port)) static struct mbuf *key_setsadbxsa2(u_int8_t, u_int32_t, u_int32_t); +static struct mbuf *key_setsadbxsareplay(u_int32_t); static struct mbuf *key_setsadbxpolicy(u_int16_t, u_int8_t, u_int32_t, u_int32_t); static struct seckey *key_dup_keymsg(const struct sadb_key *, u_int, @@ -2940,6 +2946,8 @@ key_cleansav(struct secasvar *sav) sav->sched = NULL; } if (sav->replay != NULL) { + if (sav->replay->bitmap != NULL) + free(sav->replay->bitmap, M_IPSEC_MISC); free(sav->replay, M_IPSEC_MISC); sav->replay = NULL; } @@ -3108,6 +3116,7 @@ key_setsaval(struct secasvar *sav, struc /* SA */ if (mhp->ext[SADB_EXT_SA] != NULL) { const struct sadb_sa *sa0; + u_int32_t replay; sa0 = (const struct sadb_sa *)mhp->ext[SADB_EXT_SA]; if (mhp->extlen[SADB_EXT_SA] < sizeof(*sa0)) { @@ -3119,19 +3128,57 @@ key_setsaval(struct secasvar *sav, struc sav->alg_enc = sa0->sadb_sa_encrypt; sav->flags = sa0->sadb_sa_flags; - /* replay window */ - if ((sa0->sadb_sa_flags & SADB_X_EXT_OLD) == 0) { - sav->replay = (struct secreplay *) - malloc(sizeof(struct secreplay)+sa0->sadb_sa_replay, M_IPSEC_MISC, M_NOWAIT|M_ZERO); - if (sav->replay == NULL) { + /* Optional replay window */ + replay = 0; + if ((sa0->sadb_sa_flags & SADB_X_EXT_OLD) == 0) + replay = sa0->sadb_sa_replay; + if ((mhp->ext[SADB_X_EXT_SA_REPLAY]) != NULL) { + replay = ((const struct sadb_x_sa_replay *) + mhp->ext[SADB_X_EXT_SA_REPLAY])->sadb_x_sa_replay_replay; + + if (replay > UINT32_MAX - 32) { + ipseclog((LOG_DEBUG, "%s: replay window too big.\n", + __func__)); + error = EINVAL; + goto fail; + } + + replay = (replay + 7) >> 3; + } + + sav->replay = (struct secreplay *) + malloc(sizeof(struct secreplay), + M_IPSEC_MISC, M_NOWAIT|M_ZERO); + if (sav->replay == NULL) { + ipseclog((LOG_DEBUG, "%s: No more memory.\n", + __func__)); + error = ENOBUFS; + goto fail; + } + + if (replay != 0) { + /* number of 32b blocks to be allocated */ + u_int32_t bitmap_size; + + /* RFC 6479: + * - the allocated replay window size must be a power of two + * - use an extra 32b block as a redundant window + */ + bitmap_size = 1; + while (replay + 4 > bitmap_size) + bitmap_size <<= 1; + bitmap_size = bitmap_size / 4; + + sav->replay->bitmap = malloc(bitmap_size*sizeof(u_int32_t), + M_IPSEC_MISC, M_NOWAIT|M_ZERO); + if (sav->replay->bitmap == NULL) { ipseclog((LOG_DEBUG, "%s: No more memory.\n", __func__)); error = ENOBUFS; goto fail; } - if (sa0->sadb_sa_replay != 0) - sav->replay->bitmap = (caddr_t)(sav->replay+1); - sav->replay->wsize = sa0->sadb_sa_replay; + sav->replay->bitmap_size = bitmap_size; + sav->replay->wsize = replay; } } @@ -3406,7 +3453,7 @@ key_setdumpsa(struct secasvar *sav, u_in struct mbuf *result = NULL, *tres = NULL, *m; int i; int dumporder[] = { - SADB_EXT_SA, SADB_X_EXT_SA2, + SADB_EXT_SA, SADB_X_EXT_SA2, SADB_X_EXT_SA_REPLAY, SADB_EXT_LIFETIME_HARD, SADB_EXT_LIFETIME_SOFT, SADB_EXT_LIFETIME_CURRENT, SADB_EXT_ADDRESS_SRC, SADB_EXT_ADDRESS_DST, SADB_EXT_ADDRESS_PROXY, SADB_EXT_KEY_AUTH, @@ -3419,6 +3466,7 @@ key_setdumpsa(struct secasvar *sav, u_in SADB_X_EXT_NAT_T_FRAG, #endif }; + u_int32_t replay_count; m = key_setsadbmsg(type, 0, satype, seq, pid, sav->refcnt); if (m == NULL) @@ -3435,13 +3483,25 @@ key_setdumpsa(struct secasvar *sav, u_in break; case SADB_X_EXT_SA2: - m = key_setsadbxsa2(sav->sah->saidx.mode, - sav->replay ? sav->replay->count : 0, + SECASVAR_LOCK(sav); + replay_count = sav->replay ? sav->replay->count : 0; + SECASVAR_UNLOCK(sav); + m = key_setsadbxsa2(sav->sah->saidx.mode, replay_count, sav->sah->saidx.reqid); if (!m) goto fail; break; + case SADB_X_EXT_SA_REPLAY: + if (sav->replay == NULL || + sav->replay->wsize <= UINT8_MAX) + continue; + + m = key_setsadbxsareplay(sav->replay->wsize); + if (!m) + goto fail; + break; + case SADB_EXT_ADDRESS_SRC: m = key_setsadbaddr(SADB_EXT_ADDRESS_SRC, &sav->sah->saidx.src.sa, @@ -3634,7 +3694,9 @@ key_setsadbsa(struct secasvar *sav) p->sadb_sa_len = PFKEY_UNIT64(len); p->sadb_sa_exttype = SADB_EXT_SA; p->sadb_sa_spi = sav->spi; - p->sadb_sa_replay = (sav->replay != NULL ? sav->replay->wsize : 0); + p->sadb_sa_replay = sav->replay ? + (sav->replay->wsize > UINT8_MAX ? + UINT8_MAX : sav->replay->wsize) : 0; p->sadb_sa_state = sav->state; p->sadb_sa_auth = sav->alg_auth; p->sadb_sa_encrypt = sav->alg_enc; @@ -3719,6 +3781,32 @@ key_setsadbxsa2(u_int8_t mode, u_int32_t return m; } +/* + * Set data into sadb_x_sa_replay. + */ +static struct mbuf * +key_setsadbxsareplay(u_int32_t replay) +{ + struct mbuf *m; + struct sadb_x_sa_replay *p; + size_t len; + + len = PFKEY_ALIGN8(sizeof(struct sadb_x_sa_replay)); + m = m_get2(len, M_NOWAIT, MT_DATA, 0); + if (m == NULL) + return (NULL); + m_align(m, len); + m->m_len = len; + p = mtod(m, struct sadb_x_sa_replay *); + + bzero(p, len); + p->sadb_x_sa_replay_len = PFKEY_UNIT64(len); + p->sadb_x_sa_replay_exttype = SADB_X_EXT_SA_REPLAY; + p->sadb_x_sa_replay_replay = (replay << 3); + + return m; +} + #ifdef IPSEC_NAT_T /* * Set a type in sadb_x_nat_t_type. @@ -6853,6 +6941,7 @@ key_expire(struct secasvar *sav, int har int len; int error = -1; struct sadb_lifetime *lt; + u_int32_t replay_count; IPSEC_ASSERT (sav != NULL, ("null sav")); IPSEC_ASSERT (sav->sah != NULL, ("null sa header")); @@ -6876,8 +6965,11 @@ key_expire(struct secasvar *sav, int har m_cat(result, m); /* create SA extension */ - m = key_setsadbxsa2(sav->sah->saidx.mode, - sav->replay ? sav->replay->count : 0, + SECASVAR_LOCK(sav); + replay_count = sav->replay ? sav->replay->count : 0; + SECASVAR_UNLOCK(sav); + + m = key_setsadbxsa2(sav->sah->saidx.mode, replay_count, sav->sah->saidx.reqid); if (!m) { error = ENOBUFS; @@ -6885,6 +6977,15 @@ key_expire(struct secasvar *sav, int har } m_cat(result, m); + if (sav->replay && sav->replay->wsize > UINT8_MAX) { + m = key_setsadbxsareplay(sav->replay->wsize); + if (!m) { + error = ENOBUFS; + goto fail; + } + m_cat(result, m); + } + /* create lifetime extension (current and soft) */ len = PFKEY_ALIGN8(sizeof(*lt)) * 2; m = m_get2(len, M_NOWAIT, MT_DATA, 0); @@ -7560,6 +7661,7 @@ key_align(struct mbuf *m, struct sadb_ms case SADB_X_EXT_NAT_T_OAR: case SADB_X_EXT_NAT_T_FRAG: #endif + case SADB_X_EXT_SA_REPLAY: /* duplicate check */ /* * XXX Are there duplication payloads of either Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/netipsec/key_debug.c Fri Nov 25 14:44:49 2016 (r309144) @@ -570,8 +570,11 @@ kdebug_secasv(struct secasvar *sav) if (sav->key_enc != NULL) kdebug_sadb_key((struct sadb_ext *)sav->key_enc); - if (sav->replay != NULL) + if (sav->replay != NULL) { + SECASVAR_LOCK(sav); kdebug_secreplay(sav->replay); + SECASVAR_UNLOCK(sav); + } if (sav->lft_c != NULL) kdebug_sec_lifetime(sav->lft_c); if (sav->lft_h != NULL) @@ -595,8 +598,8 @@ kdebug_secreplay(struct secreplay *rpl) if (rpl == NULL) panic("%s: NULL pointer was passed.\n", __func__); - printf(" secreplay{ count=%u wsize=%u seq=%u lastseq=%u", - rpl->count, rpl->wsize, rpl->seq, rpl->lastseq); + printf(" secreplay{ count=%u bitmap_size=%u wsize=%u seq=%u lastseq=%u", + rpl->count, rpl->bitmap_size, rpl->wsize, rpl->seq, rpl->lastseq); if (rpl->bitmap == NULL) { printf(" }\n"); @@ -605,7 +608,7 @@ kdebug_secreplay(struct secreplay *rpl) printf("\n bitmap { "); - for (len = 0; len < rpl->wsize; len++) { + for (len = 0; len < rpl->bitmap_size*4; len++) { for (l = 7; l >= 0; l--) printf("%u", (((rpl->bitmap)[len] >> l) & 1) ? 1 : 0); } Modified: head/sys/netipsec/keydb.h ============================================================================== --- head/sys/netipsec/keydb.h Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/netipsec/keydb.h Fri Nov 25 14:44:49 2016 (r309144) @@ -35,6 +35,8 @@ #ifdef _KERNEL +#include + #include #ifndef _SOCKADDR_UNION_DEFINED @@ -170,14 +172,18 @@ struct secasvar { #define SAV_ISCTR(_sav) ((_sav)->alg_enc == SADB_X_EALG_AESCTR) #define SAV_ISCTRORGCM(_sav) (SAV_ISCTR((_sav)) || SAV_ISGCM((_sav))) -/* replay prevention */ +/* Replay prevention, protected by SECASVAR_LOCK: + * (m) locked by mtx + * (c) read only except during creation / free + */ struct secreplay { - u_int32_t count; - u_int wsize; /* window size, i.g. 4 bytes */ - u_int32_t seq; /* used by sender */ - u_int32_t lastseq; /* used by receiver */ - caddr_t bitmap; /* used by receiver */ - int overflow; /* overflow flag */ + u_int32_t count; /* (m) */ + u_int wsize; /* (c) window size, i.g. 4 bytes */ + u_int32_t seq; /* (m) used by sender */ + u_int32_t lastseq; /* (m) used by receiver */ + u_int32_t *bitmap; /* (m) used by receiver */ + u_int bitmap_size; /* (c) size of the bitmap array */ + int overflow; /* (m) overflow flag */ }; /* socket table due to send PF_KEY messages. */ Modified: head/sys/netipsec/xform_ah.c ============================================================================== --- head/sys/netipsec/xform_ah.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/netipsec/xform_ah.c Fri Nov 25 14:44:49 2016 (r309144) @@ -961,8 +961,11 @@ ah_output(struct mbuf *m, struct ipsecre /* Insert packet replay counter, as requested. */ if (sav->replay) { + SECASVAR_LOCK(sav); + if (sav->replay->count == ~0 && (sav->flags & SADB_X_EXT_CYCSEQ) == 0) { + SECASVAR_UNLOCK(sav); DPRINTF(("%s: replay counter wrapped for SA %s/%08lx\n", __func__, ipsec_address(&sav->sah->saidx.dst, buf, sizeof(buf)), (u_long) ntohl(sav->spi))); @@ -976,6 +979,8 @@ ah_output(struct mbuf *m, struct ipsecre #endif sav->replay->count++; ah->ah_seq = htonl(sav->replay->count); + + SECASVAR_UNLOCK(sav); } /* Get crypto descriptors. */ Modified: head/sys/netipsec/xform_esp.c ============================================================================== --- head/sys/netipsec/xform_esp.c Fri Nov 25 13:49:33 2016 (r309143) +++ head/sys/netipsec/xform_esp.c Fri Nov 25 14:44:49 2016 (r309144) @@ -762,12 +762,14 @@ esp_output(struct mbuf *m, struct ipsecr if (sav->replay) { u_int32_t replay; + SECASVAR_LOCK(sav); #ifdef REGRESSION /* Emulate replay attack when ipsec_replay is TRUE. */ if (!V_ipsec_replay) #endif sav->replay->count++; replay = htonl(sav->replay->count); + SECASVAR_UNLOCK(sav); bcopy((caddr_t) &replay, mtod(mo, caddr_t) + roff + sizeof(u_int32_t), sizeof(u_int32_t)); From owner-svn-src-head@freebsd.org Fri Nov 25 16:00:16 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 72FF0C54732; Fri, 25 Nov 2016 16:00:16 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-wj0-x242.google.com (mail-wj0-x242.google.com [IPv6:2a00:1450:400c:c01::242]) (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 08965755; Fri, 25 Nov 2016 16:00:16 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: by mail-wj0-x242.google.com with SMTP id kp2so6074934wjc.0; Fri, 25 Nov 2016 08:00:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=lBJg3Yd0WaOtG5TBkeDJzzHcKY95kDUbDtLissso0e4=; b=zHNQNGkHu334LIwKuDlB9u/tzC4adqSYyCBBRg9qN4sdfCc6DCt6QCxTe6Y+7qHKu5 WTfk6wSM3DuPAJBkKdwiQF9j5UCxpf1VhCAkwc9EM4GJcAJ5ZLq9qRgxfz3GEFJ6Hda/ eS/On86NJZ00Kt4AbWZkHqYfY0m17eOmoE8PA7tZW7HKCI5fpnup/pQgWCIEMR3sPW7O DDO+R+oVVTEqQcbiCNCzgFh33MWt2Xp+1qfpmbEinhrkaTexdv5NlO66oZS1HEoPdJDs MKBPj8d6bXT8tgnpgSVSJZe48wVE6uRNZB++m4VFLubTdBaUwwn/E3E0rLDZnHWUL1EU r2mQ== 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-disposition:in-reply-to:user-agent; bh=lBJg3Yd0WaOtG5TBkeDJzzHcKY95kDUbDtLissso0e4=; b=dPtPBEo64v1aipKgEatvoqT7K0RrmK1snmcczSu/QGMn5H3Ho4zAp5TPgSId9k8dqq XbuIvmtcw+CMzMbYzWXvPKS1i8H6HpAXqhmgsn4MWzp6yMlkGe8iPj/R8ClYwW3qJkM8 40ORsQ1Re3SHcQtZE5kD5wQIlIBvpNbVctPSaT3bYglrlJDB8cQ2H4p9txpBeN9l4H5A MjMb4xVjmNctnwm/2tIrqKg4Rrppu00wCZwwcDhMzFn4mpE8vAVprVy2WnS+5Pcs2vPH vq6PUoF7FU6AwiJfEh9eMSoMhSv3VCQHe0ZU2Lbbpl08qOaWFesiejMQQuwmbcIMQ1Qx yynQ== X-Gm-Message-State: AKaTC00bWj+VPPXadSSUw7MyNLqG+YcnLbx8bj2sbL3eK3z/r+5O+NJ0ZJnoH61Ue54tQQ== X-Received: by 10.194.71.69 with SMTP id s5mr8137316wju.197.1480089613565; Fri, 25 Nov 2016 08:00:13 -0800 (PST) Received: from dft-labs.eu (n1x0n-1-pt.tunnel.tserv5.lon1.ipv6.he.net. [2001:470:1f08:1f7::2]) by smtp.gmail.com with ESMTPSA id kp5sm47684621wjb.8.2016.11.25.08.00.12 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 25 Nov 2016 08:00:12 -0800 (PST) Date: Fri, 25 Nov 2016 17:00:10 +0100 From: Mateusz Guzik To: Fabien Thomas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309143 - head/sys/libkern Message-ID: <20161125160010.GA3307@dft-labs.eu> References: <201611251349.uAPDnX09042110@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <201611251349.uAPDnX09042110@repo.freebsd.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 16:00:16 -0000 On Fri, Nov 25, 2016 at 01:49:33PM +0000, Fabien Thomas wrote: > Author: fabient > Date: Fri Nov 25 13:49:33 2016 > New Revision: 309143 > URL: https://svnweb.freebsd.org/changeset/base/309143 > > Log: > In a dual processor system (2*6 cores) during IPSec throughput tests, > we see a lot of contention on the arc4 lock, used to generate the IV > of the ESP output packets. > > The idea of this patch is to split this mutex in order to reduce the > contention on this lock. > > +MALLOC_DEFINE(M_ARC4RANDOM, "arc4random", "arc4random structures"); > > -static u_int8_t arc4_randbyte(void); > +struct arc4_s { > + u_int8_t i, j; > + int numruns; > + u_int8_t sbox[256]; > + time_t t_reseed; > + > + struct mtx mtx; > +}; > + Why is the lock at the end? Right now you got false sharing with the next entry. That said, I suggest: 1. moving thelock to the beginning 2. annotating the struct with __aligned(CACHE_LINE_SIZE) -- Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Nov 25 16:04:37 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D9213C5490C; Fri, 25 Nov 2016 16:04:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A89C5B86; Fri, 25 Nov 2016 16:04:37 +0000 (UTC) (envelope-from andrew@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPG4ads097791; Fri, 25 Nov 2016 16:04:36 GMT (envelope-from andrew@FreeBSD.org) Received: (from andrew@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPG4aSQ097790; Fri, 25 Nov 2016 16:04:36 GMT (envelope-from andrew@FreeBSD.org) Message-Id: <201611251604.uAPG4aSQ097790@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: andrew set sender to andrew@FreeBSD.org using -f From: Andrew Turner Date: Fri, 25 Nov 2016 16:04:36 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309145 - head/sys/arm64/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 16:04:38 -0000 Author: andrew Date: Fri Nov 25 16:04:36 2016 New Revision: 309145 URL: https://svnweb.freebsd.org/changeset/base/309145 Log: Fix the TLB conflict abort value. This should be a no-op as we don't use this value in the code. Modified: head/sys/arm64/include/armreg.h Modified: head/sys/arm64/include/armreg.h ============================================================================== --- head/sys/arm64/include/armreg.h Fri Nov 25 14:44:49 2016 (r309144) +++ head/sys/arm64/include/armreg.h Fri Nov 25 16:04:36 2016 (r309145) @@ -115,7 +115,7 @@ #define ISS_DATA_DFSC_ECC_L2 (0x1e << 0) #define ISS_DATA_DFSC_ECC_L3 (0x1f << 0) #define ISS_DATA_DFSC_ALIGN (0x21 << 0) -#define ISS_DATA_DFSC_TLB_CONFLICT (0x28 << 0) +#define ISS_DATA_DFSC_TLB_CONFLICT (0x30 << 0) #define ESR_ELx_IL (0x01 << 25) #define ESR_ELx_EC_SHIFT 26 #define ESR_ELx_EC_MASK (0x3f << 26) From owner-svn-src-head@freebsd.org Fri Nov 25 17:20:25 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 151D0C5431F; Fri, 25 Nov 2016 17:20:25 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8C56BCC; Fri, 25 Nov 2016 17:20:24 +0000 (UTC) (envelope-from fabient@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPHKOl6026673; Fri, 25 Nov 2016 17:20:24 GMT (envelope-from fabient@FreeBSD.org) Received: (from fabient@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPHKOUe026672; Fri, 25 Nov 2016 17:20:24 GMT (envelope-from fabient@FreeBSD.org) Message-Id: <201611251720.uAPHKOUe026672@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: fabient set sender to fabient@FreeBSD.org using -f From: Fabien Thomas Date: Fri, 25 Nov 2016 17:20:24 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309146 - head/sys/libkern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 17:20:25 -0000 Author: fabient Date: Fri Nov 25 17:20:23 2016 New Revision: 309146 URL: https://svnweb.freebsd.org/changeset/base/309146 Log: Update r309143 to prevent false sharing. Reported by: mjg Approved by: so MFC after: 1 month Modified: head/sys/libkern/arc4random.c Modified: head/sys/libkern/arc4random.c ============================================================================== --- head/sys/libkern/arc4random.c Fri Nov 25 16:04:36 2016 (r309145) +++ head/sys/libkern/arc4random.c Fri Nov 25 17:20:23 2016 (r309146) @@ -31,13 +31,13 @@ int arc4rand_iniseed_state = ARC4_ENTR_N MALLOC_DEFINE(M_ARC4RANDOM, "arc4random", "arc4random structures"); struct arc4_s { + struct mtx mtx; u_int8_t i, j; int numruns; u_int8_t sbox[256]; time_t t_reseed; - struct mtx mtx; -}; +} __aligned(CACHE_LINE_SIZE); static struct arc4_s *arc4inst = NULL; From owner-svn-src-head@freebsd.org Fri Nov 25 17:20:43 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7EFEC54387; Fri, 25 Nov 2016 17:20:43 +0000 (UTC) (envelope-from fabient@freebsd.org) Received: from work.stormshield.eu (gwlille.netasq.com [91.212.116.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A3F12D58; Fri, 25 Nov 2016 17:20:42 +0000 (UTC) (envelope-from fabient@freebsd.org) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTPS id B39C4376088E; Fri, 25 Nov 2016 18:13:30 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id A5EC63760882; Fri, 25 Nov 2016 18:13:30 +0100 (CET) Received: from work.stormshield.eu ([127.0.0.1]) by localhost (work.stormshield.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id H_aHapcOjKkP; Fri, 25 Nov 2016 18:13:30 +0100 (CET) Received: from deadbeef.netasq.com (unknown [91.212.116.2]) by work.stormshield.eu (Postfix) with ESMTPSA id 8DEAE3760376; Fri, 25 Nov 2016 18:13:30 +0100 (CET) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.1 \(3251\)) Subject: Re: svn commit: r309143 - head/sys/libkern From: Fabien Thomas In-Reply-To: <20161125160010.GA3307@dft-labs.eu> Date: Fri, 25 Nov 2016 18:20:40 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: <4E934AF1-62E7-4C85-80D0-50548AD4E696@freebsd.org> References: <201611251349.uAPDnX09042110@repo.freebsd.org> <20161125160010.GA3307@dft-labs.eu> To: Mateusz Guzik X-Mailer: Apple Mail (2.3251) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 17:20:44 -0000 > Le 25 nov. 2016 =C3=A0 17:00, Mateusz Guzik a = =C3=A9crit : >=20 > On Fri, Nov 25, 2016 at 01:49:33PM +0000, Fabien Thomas wrote: >> Author: fabient >> Date: Fri Nov 25 13:49:33 2016 >> New Revision: 309143 >> URL: https://svnweb.freebsd.org/changeset/base/309143 >>=20 >> Log: >> In a dual processor system (2*6 cores) during IPSec throughput = tests, >> we see a lot of contention on the arc4 lock, used to generate the IV >> of the ESP output packets. >>=20 >> The idea of this patch is to split this mutex in order to reduce the >> contention on this lock. >>=20 >> +MALLOC_DEFINE(M_ARC4RANDOM, "arc4random", "arc4random structures"); >>=20 >> -static u_int8_t arc4_randbyte(void); >> +struct arc4_s { >> + u_int8_t i, j; >> + int numruns; >> + u_int8_t sbox[256]; >> + time_t t_reseed; >> + >> + struct mtx mtx; >> +}; >> + >=20 > Why is the lock at the end? Right now you got false sharing with the > next entry. >=20 > That said, I suggest: > 1. moving thelock to the beginning > 2. annotating the struct with __aligned(CACHE_LINE_SIZE) Yes good catch, it will be better that way. Committed as r309146. Thanks >=20 > --=20 > Mateusz Guzik From owner-svn-src-head@freebsd.org Fri Nov 25 18:01:33 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 563A6C55075; Fri, 25 Nov 2016 18:01:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1EF6A364; Fri, 25 Nov 2016 18:01:33 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPI1W8Q043502; Fri, 25 Nov 2016 18:01:32 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPI1W34043485; Fri, 25 Nov 2016 18:01:32 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251801.uAPI1W34043485@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 18:01:32 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309147 - head/contrib/llvm/lib/Target/PowerPC X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 18:01:33 -0000 Author: dim Date: Fri Nov 25 18:01:32 2016 New Revision: 309147 URL: https://svnweb.freebsd.org/changeset/base/309147 Log: Pull in r282174 from upstream llvm trunk (by Krzysztof Parzyszek): [PPC] Set SP after loading data from stack frame, if no red zone is present Follow-up to r280705: Make sure that the SP is only restored after all data is loaded from the stack frame, if there is no red zone. This completes the fix for https://llvm.org/bugs/show_bug.cgi?id=26519. Differential Revision: https://reviews.llvm.org/D24466 Reported by: Mark Millard PR: 214433 Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Modified: head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Fri Nov 25 17:20:23 2016 (r309146) +++ head/contrib/llvm/lib/Target/PowerPC/PPCFrameLowering.cpp Fri Nov 25 18:01:32 2016 (r309147) @@ -927,7 +927,7 @@ void PPCFrameLowering::emitPrologue(Mach } // Have we generated a STUX instruction to claim stack frame? If so, - // the frame size will be placed in ScratchReg. + // the negated frame size will be placed in ScratchReg. bool HasSTUX = false; // This condition must be kept in sync with canUseAsPrologue. @@ -987,33 +987,88 @@ void PPCFrameLowering::emitPrologue(Mach if (!HasRedZone) { assert(!isPPC64 && "A red zone is always available on PPC64"); if (HasSTUX) { - // The frame size is in ScratchReg, and the SPReg has been advanced - // (downwards) by the frame size: SPReg = old SPReg + ScratchReg. - // Set ScratchReg to the original SPReg: ScratchReg = SPReg - ScratchReg. + // The negated frame size is in ScratchReg, and the SPReg has been + // decremented by the frame size: SPReg = old SPReg + ScratchReg. + // Since FPOffset, PBPOffset, etc. are relative to the beginning of + // the stack frame (i.e. the old SP), ideally, we would put the old + // SP into a register and use it as the base for the stores. The + // problem is that the only available register may be ScratchReg, + // which could be R0, and R0 cannot be used as a base address. + + // First, set ScratchReg to the old SP. This may need to be modified + // later. BuildMI(MBB, MBBI, dl, TII.get(PPC::SUBF), ScratchReg) .addReg(ScratchReg, RegState::Kill) .addReg(SPReg); - // Now that the stack frame has been allocated, save all the necessary - // registers using ScratchReg as the base address. - if (HasFP) - BuildMI(MBB, MBBI, dl, StoreInst) - .addReg(FPReg) - .addImm(FPOffset) - .addReg(ScratchReg); - if (FI->usesPICBase()) - BuildMI(MBB, MBBI, dl, StoreInst) - .addReg(PPC::R30) - .addImm(PBPOffset) - .addReg(ScratchReg); - if (HasBP) { - BuildMI(MBB, MBBI, dl, StoreInst) - .addReg(BPReg) - .addImm(BPOffset) - .addReg(ScratchReg); - BuildMI(MBB, MBBI, dl, OrInst, BPReg) - .addReg(ScratchReg, RegState::Kill) - .addReg(ScratchReg); + if (ScratchReg == PPC::R0) { + // R0 cannot be used as a base register, but it can be used as an + // index in a store-indexed. + int LastOffset = 0; + if (HasFP) { + // R0 += (FPOffset-LastOffset). + // Need addic, since addi treats R0 as 0. + BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), ScratchReg) + .addReg(ScratchReg) + .addImm(FPOffset-LastOffset); + LastOffset = FPOffset; + // Store FP into *R0. + BuildMI(MBB, MBBI, dl, TII.get(PPC::STWX)) + .addReg(FPReg, RegState::Kill) // Save FP. + .addReg(PPC::ZERO) + .addReg(ScratchReg); // This will be the index (R0 is ok here). + } + if (FI->usesPICBase()) { + // R0 += (PBPOffset-LastOffset). + BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), ScratchReg) + .addReg(ScratchReg) + .addImm(PBPOffset-LastOffset); + LastOffset = PBPOffset; + BuildMI(MBB, MBBI, dl, TII.get(PPC::STWX)) + .addReg(PPC::R30, RegState::Kill) // Save PIC base pointer. + .addReg(PPC::ZERO) + .addReg(ScratchReg); // This will be the index (R0 is ok here). + } + if (HasBP) { + // R0 += (BPOffset-LastOffset). + BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), ScratchReg) + .addReg(ScratchReg) + .addImm(BPOffset-LastOffset); + LastOffset = BPOffset; + BuildMI(MBB, MBBI, dl, TII.get(PPC::STWX)) + .addReg(BPReg, RegState::Kill) // Save BP. + .addReg(PPC::ZERO) + .addReg(ScratchReg); // This will be the index (R0 is ok here). + // BP = R0-LastOffset + BuildMI(MBB, MBBI, dl, TII.get(PPC::ADDIC), BPReg) + .addReg(ScratchReg, RegState::Kill) + .addImm(-LastOffset); + } + } else { + // ScratchReg is not R0, so use it as the base register. It is + // already set to the old SP, so we can use the offsets directly. + + // Now that the stack frame has been allocated, save all the necessary + // registers using ScratchReg as the base address. + if (HasFP) + BuildMI(MBB, MBBI, dl, StoreInst) + .addReg(FPReg) + .addImm(FPOffset) + .addReg(ScratchReg); + if (FI->usesPICBase()) + BuildMI(MBB, MBBI, dl, StoreInst) + .addReg(PPC::R30) + .addImm(PBPOffset) + .addReg(ScratchReg); + if (HasBP) { + BuildMI(MBB, MBBI, dl, StoreInst) + .addReg(BPReg) + .addImm(BPOffset) + .addReg(ScratchReg); + BuildMI(MBB, MBBI, dl, OrInst, BPReg) + .addReg(ScratchReg, RegState::Kill) + .addReg(ScratchReg); + } } } else { // The frame size is a known 16-bit constant (fitting in the immediate @@ -1191,6 +1246,7 @@ void PPCFrameLowering::emitEpilogue(Mach // Do we have a frame pointer and/or base pointer for this function? bool HasFP = hasFP(MF); bool HasBP = RegInfo->hasBasePointer(MF); + bool HasRedZone = Subtarget.isPPC64() || !Subtarget.isSVR4ABI(); unsigned SPReg = isPPC64 ? PPC::X1 : PPC::R1; unsigned BPReg = RegInfo->getBaseRegister(MF); @@ -1203,6 +1259,8 @@ void PPCFrameLowering::emitEpilogue(Mach : PPC::LWZ ); const MCInstrDesc& LoadImmShiftedInst = TII.get( isPPC64 ? PPC::LIS8 : PPC::LIS ); + const MCInstrDesc& OrInst = TII.get(isPPC64 ? PPC::OR8 + : PPC::OR ); const MCInstrDesc& OrImmInst = TII.get( isPPC64 ? PPC::ORI8 : PPC::ORI ); const MCInstrDesc& AddImmInst = TII.get( isPPC64 ? PPC::ADDI8 @@ -1224,10 +1282,9 @@ void PPCFrameLowering::emitEpilogue(Mach if (HasFP) { if (isSVR4ABI) { - MachineFrameInfo *FFI = MF.getFrameInfo(); int FPIndex = FI->getFramePointerSaveIndex(); assert(FPIndex && "No Frame Pointer Save Slot!"); - FPOffset = FFI->getObjectOffset(FPIndex); + FPOffset = MFI->getObjectOffset(FPIndex); } else { FPOffset = getFramePointerSaveOffset(); } @@ -1236,10 +1293,9 @@ void PPCFrameLowering::emitEpilogue(Mach int BPOffset = 0; if (HasBP) { if (isSVR4ABI) { - MachineFrameInfo *FFI = MF.getFrameInfo(); int BPIndex = FI->getBasePointerSaveIndex(); assert(BPIndex && "No Base Pointer Save Slot!"); - BPOffset = FFI->getObjectOffset(BPIndex); + BPOffset = MFI->getObjectOffset(BPIndex); } else { BPOffset = getBasePointerSaveOffset(); } @@ -1247,10 +1303,9 @@ void PPCFrameLowering::emitEpilogue(Mach int PBPOffset = 0; if (FI->usesPICBase()) { - MachineFrameInfo *FFI = MF.getFrameInfo(); int PBPIndex = FI->getPICBasePointerSaveIndex(); assert(PBPIndex && "No PIC Base Pointer Save Slot!"); - PBPOffset = FFI->getObjectOffset(PBPIndex); + PBPOffset = MFI->getObjectOffset(PBPIndex); } bool IsReturnBlock = (MBBI != MBB.end() && MBBI->isReturn()); @@ -1283,9 +1338,25 @@ void PPCFrameLowering::emitEpilogue(Mach // indexed into with a simple LD/LWZ immediate offset operand. bool isLargeFrame = !isInt<16>(FrameSize); + // On targets without red zone, the SP needs to be restored last, so that + // all live contents of the stack frame are upwards of the SP. This means + // that we cannot restore SP just now, since there may be more registers + // to restore from the stack frame (e.g. R31). If the frame size is not + // a simple immediate value, we will need a spare register to hold the + // restored SP. If the frame size is known and small, we can simply adjust + // the offsets of the registers to be restored, and still use SP to restore + // them. In such case, the final update of SP will be to add the frame + // size to it. + // To simplify the code, set RBReg to the base register used to restore + // values from the stack, and set SPAdd to the value that needs to be added + // to the SP at the end. The default values are as if red zone was present. + unsigned RBReg = SPReg; + unsigned SPAdd = 0; + if (FrameSize) { - // In the prologue, the loaded (or persistent) stack pointer value is offset - // by the STDU/STDUX/STWU/STWUX instruction. Add this offset back now. + // In the prologue, the loaded (or persistent) stack pointer value is + // offset by the STDU/STDUX/STWU/STWUX instruction. For targets with red + // zone add this offset back now. // If this function contained a fastcc call and GuaranteedTailCallOpt is // enabled (=> hasFastCall()==true) the fastcc call might contain a tail @@ -1293,8 +1364,10 @@ void PPCFrameLowering::emitEpilogue(Mach // value of R31 in this case. if (FI->hasFastCall()) { assert(HasFP && "Expecting a valid frame pointer."); + if (!HasRedZone) + RBReg = FPReg; if (!isLargeFrame) { - BuildMI(MBB, MBBI, dl, AddImmInst, SPReg) + BuildMI(MBB, MBBI, dl, AddImmInst, RBReg) .addReg(FPReg).addImm(FrameSize); } else { BuildMI(MBB, MBBI, dl, LoadImmShiftedInst, ScratchReg) @@ -1303,27 +1376,55 @@ void PPCFrameLowering::emitEpilogue(Mach .addReg(ScratchReg, RegState::Kill) .addImm(FrameSize & 0xFFFF); BuildMI(MBB, MBBI, dl, AddInst) - .addReg(SPReg) + .addReg(RBReg) .addReg(FPReg) .addReg(ScratchReg); } } else if (!isLargeFrame && !HasBP && !MFI->hasVarSizedObjects()) { - BuildMI(MBB, MBBI, dl, AddImmInst, SPReg) - .addReg(SPReg) - .addImm(FrameSize); + if (HasRedZone) { + BuildMI(MBB, MBBI, dl, AddImmInst, SPReg) + .addReg(SPReg) + .addImm(FrameSize); + } else { + // Make sure that adding FrameSize will not overflow the max offset + // size. + assert(FPOffset <= 0 && BPOffset <= 0 && PBPOffset <= 0 && + "Local offsets should be negative"); + SPAdd = FrameSize; + FPOffset += FrameSize; + BPOffset += FrameSize; + PBPOffset += FrameSize; + } } else { - BuildMI(MBB, MBBI, dl, LoadInst, SPReg) + // We don't want to use ScratchReg as a base register, because it + // could happen to be R0. Use FP instead, but make sure to preserve it. + if (!HasRedZone) { + // If FP is not saved, copy it to ScratchReg. + if (!HasFP) + BuildMI(MBB, MBBI, dl, OrInst, ScratchReg) + .addReg(FPReg) + .addReg(FPReg); + RBReg = FPReg; + } + BuildMI(MBB, MBBI, dl, LoadInst, RBReg) .addImm(0) .addReg(SPReg); } } + assert(RBReg != ScratchReg && "Should have avoided ScratchReg"); + // If there is no red zone, ScratchReg may be needed for holding a useful + // value (although not the base register). Make sure it is not overwritten + // too early. assert((isPPC64 || !MustSaveCR) && "Epilogue CR restoring supported only in 64-bit mode"); - // If we need to save both the LR and the CR and we only have one available - // scratch register, we must do them one at a time. + // If we need to restore both the LR and the CR and we only have one + // available scratch register, we must do them one at a time. if (MustSaveCR && SingleScratchReg && MustSaveLR) { + // Here TempReg == ScratchReg, and in the absence of red zone ScratchReg + // is live here. + assert(HasRedZone && "Expecting red zone"); BuildMI(MBB, MBBI, dl, TII.get(PPC::LWZ8), TempReg) .addImm(8) .addReg(SPReg); @@ -1332,33 +1433,77 @@ void PPCFrameLowering::emitEpilogue(Mach .addReg(TempReg, getKillRegState(i == e-1)); } - if (MustSaveLR) + // Delay restoring of the LR if ScratchReg is needed. This is ok, since + // LR is stored in the caller's stack frame. ScratchReg will be needed + // if RBReg is anything other than SP. We shouldn't use ScratchReg as + // a base register anyway, because it may happen to be R0. + bool LoadedLR = false; + if (MustSaveLR && RBReg == SPReg && isInt<16>(LROffset+SPAdd)) { BuildMI(MBB, MBBI, dl, LoadInst, ScratchReg) - .addImm(LROffset) - .addReg(SPReg); + .addImm(LROffset+SPAdd) + .addReg(RBReg); + LoadedLR = true; + } - if (MustSaveCR && - !(SingleScratchReg && MustSaveLR)) // will only occur for PPC64 + if (MustSaveCR && !(SingleScratchReg && MustSaveLR)) { + // This will only occur for PPC64. + assert(isPPC64 && "Expecting 64-bit mode"); + assert(RBReg == SPReg && "Should be using SP as a base register"); BuildMI(MBB, MBBI, dl, TII.get(PPC::LWZ8), TempReg) .addImm(8) - .addReg(SPReg); + .addReg(RBReg); + } - if (HasFP) - BuildMI(MBB, MBBI, dl, LoadInst, FPReg) - .addImm(FPOffset) - .addReg(SPReg); + if (HasFP) { + // If there is red zone, restore FP directly, since SP has already been + // restored. Otherwise, restore the value of FP into ScratchReg. + if (HasRedZone || RBReg == SPReg) + BuildMI(MBB, MBBI, dl, LoadInst, FPReg) + .addImm(FPOffset) + .addReg(SPReg); + else + BuildMI(MBB, MBBI, dl, LoadInst, ScratchReg) + .addImm(FPOffset) + .addReg(RBReg); + } if (FI->usesPICBase()) - // FIXME: On PPC32 SVR4, we must not spill before claiming the stackframe. BuildMI(MBB, MBBI, dl, LoadInst) .addReg(PPC::R30) .addImm(PBPOffset) - .addReg(SPReg); + .addReg(RBReg); if (HasBP) BuildMI(MBB, MBBI, dl, LoadInst, BPReg) .addImm(BPOffset) - .addReg(SPReg); + .addReg(RBReg); + + // There is nothing more to be loaded from the stack, so now we can + // restore SP: SP = RBReg + SPAdd. + if (RBReg != SPReg || SPAdd != 0) { + assert(!HasRedZone && "This should not happen with red zone"); + // If SPAdd is 0, generate a copy. + if (SPAdd == 0) + BuildMI(MBB, MBBI, dl, OrInst, SPReg) + .addReg(RBReg) + .addReg(RBReg); + else + BuildMI(MBB, MBBI, dl, AddImmInst, SPReg) + .addReg(RBReg) + .addImm(SPAdd); + + assert(RBReg != ScratchReg && "Should be using FP or SP as base register"); + if (RBReg == FPReg) + BuildMI(MBB, MBBI, dl, OrInst, FPReg) + .addReg(ScratchReg) + .addReg(ScratchReg); + + // Now load the LR from the caller's stack frame. + if (MustSaveLR && !LoadedLR) + BuildMI(MBB, MBBI, dl, LoadInst, ScratchReg) + .addImm(LROffset) + .addReg(SPReg); + } if (MustSaveCR && !(SingleScratchReg && MustSaveLR)) // will only occur for PPC64 From owner-svn-src-head@freebsd.org Fri Nov 25 18:02:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37C65C55103; Fri, 25 Nov 2016 18:02:45 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E319594C; Fri, 25 Nov 2016 18:02:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPI2ijD047190; Fri, 25 Nov 2016 18:02:44 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPI2hSg047188; Fri, 25 Nov 2016 18:02:43 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201611251802.uAPI2hSg047188@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Fri, 25 Nov 2016 18:02:43 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309148 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 18:02:45 -0000 Author: jhb Date: Fri Nov 25 18:02:43 2016 New Revision: 309148 URL: https://svnweb.freebsd.org/changeset/base/309148 Log: Permit timed sleeps for threads other than thread0 before timers are working. The callout subsystem already handles early callouts and schedules the first clock interrupt appropriately based on the currently pending callouts. The one nit to fix was that callouts scheduled via C_HARDCLOCK during early boot could fire too early once timers were enabled as the per-CPU base time is always zero until timers are initialized. The change in callout_when() handles this case by using the current uptime as the base time of the callout during bootup if the per-CPU base time is zero. Reviewed by: kib MFC after: 2 weeks Sponsored by: Netflix Modified: head/sys/kern/kern_timeout.c head/sys/kern/subr_sleepqueue.c Modified: head/sys/kern/kern_timeout.c ============================================================================== --- head/sys/kern/kern_timeout.c Fri Nov 25 18:01:32 2016 (r309147) +++ head/sys/kern/kern_timeout.c Fri Nov 25 18:02:43 2016 (r309148) @@ -981,6 +981,8 @@ callout_when(sbintime_t sbt, sbintime_t spinlock_exit(); #endif #endif + if (cold && to_sbt == 0) + to_sbt = sbinuptime(); if ((flags & C_HARDCLOCK) == 0) to_sbt += tick_sbt; } else Modified: head/sys/kern/subr_sleepqueue.c ============================================================================== --- head/sys/kern/subr_sleepqueue.c Fri Nov 25 18:01:32 2016 (r309147) +++ head/sys/kern/subr_sleepqueue.c Fri Nov 25 18:02:43 2016 (r309148) @@ -386,7 +386,7 @@ sleepq_set_timeout_sbt(void *wchan, sbin MPASS(TD_ON_SLEEPQ(td)); MPASS(td->td_sleepqueue == NULL); MPASS(wchan != NULL); - if (cold) + if (cold && td == &thread0) panic("timed sleep before timers are working"); KASSERT(td->td_sleeptimo == 0, ("td %d %p td_sleeptimo %jx", td->td_tid, td, (uintmax_t)td->td_sleeptimo)); From owner-svn-src-head@freebsd.org Fri Nov 25 18:12:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 42841C55274; Fri, 25 Nov 2016 18:12:15 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 114F6E47; Fri, 25 Nov 2016 18:12:14 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPICEfk051061; Fri, 25 Nov 2016 18:12:14 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPICDfM051054; Fri, 25 Nov 2016 18:12:13 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251812.uAPICDfM051054@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 18:12:13 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309149 - in head/contrib/llvm: lib/Target/PowerPC tools/clang/lib/CodeGen 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 18:12:15 -0000 Author: dim Date: Fri Nov 25 18:12:13 2016 New Revision: 309149 URL: https://svnweb.freebsd.org/changeset/base/309149 Log: Pull in r283060 from upstream llvm trunk (by Hal Finkel): [PowerPC] Refactor soft-float support, and enable PPC64 soft float This change enables soft-float for PowerPC64, and also makes soft-float disable all vector instruction sets for both 32-bit and 64-bit modes. This latter part is necessary because the PPC backend canonicalizes many Altivec vector types to floating-point types, and so soft-float breaks scalarization support for many operations. Both for embedded targets and for operating-system kernels desiring soft-float support, it seems reasonable that disabling hardware floating-point also disables vector instructions (embedded targets without hardware floating point support are unlikely to have Altivec, etc. and operating system kernels desiring not to use floating-point registers to lower syscall cost are unlikely to want to use vector registers either). If someone needs this to work, we'll need to change the fact that we promote many Altivec operations to act on v4f32. To make it possible to disable Altivec when soft-float is enabled, hardware floating-point support needs to be expressed as a positive feature, like the others, and not a negative feature, because target features cannot have dependencies on the disabling of some other feature. So +soft-float has now become -hard-float. Fixes PR26970. Pull in r283061 from upstream clang trunk (by Hal Finkel): [PowerPC] Enable soft-float for PPC64, and +soft-float -> -hard-float Enable soft-float support on PPC64, as the backend now supports it. Also, the backend now uses -hard-float instead of +soft-float, so set the target features accordingly. Fixes PR26970. Reported by: Mark Millard PR: 214433 Modified: head/contrib/llvm/lib/Target/PowerPC/PPC.td head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Modified: head/contrib/llvm/lib/Target/PowerPC/PPC.td ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPC.td Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/lib/Target/PowerPC/PPC.td Fri Nov 25 18:12:13 2016 (r309149) @@ -53,40 +53,52 @@ def DirectivePwr9: SubtargetFeature<"", def Feature64Bit : SubtargetFeature<"64bit","Has64BitSupport", "true", "Enable 64-bit instructions">; -def FeatureSoftFloat : SubtargetFeature<"soft-float", "UseSoftFloat", "true", - "Use software emulation for floating point">; +def FeatureHardFloat : SubtargetFeature<"hard-float", "HasHardFloat", "true", + "Enable floating-point instructions">; def Feature64BitRegs : SubtargetFeature<"64bitregs","Use64BitRegs", "true", "Enable 64-bit registers usage for ppc32 [beta]">; def FeatureCRBits : SubtargetFeature<"crbits", "UseCRBits", "true", "Use condition-register bits individually">; def FeatureAltivec : SubtargetFeature<"altivec","HasAltivec", "true", - "Enable Altivec instructions">; + "Enable Altivec instructions", + [FeatureHardFloat]>; def FeatureSPE : SubtargetFeature<"spe","HasSPE", "true", - "Enable SPE instructions">; + "Enable SPE instructions", + [FeatureHardFloat]>; def FeatureMFOCRF : SubtargetFeature<"mfocrf","HasMFOCRF", "true", "Enable the MFOCRF instruction">; def FeatureFSqrt : SubtargetFeature<"fsqrt","HasFSQRT", "true", - "Enable the fsqrt instruction">; + "Enable the fsqrt instruction", + [FeatureHardFloat]>; def FeatureFCPSGN : SubtargetFeature<"fcpsgn", "HasFCPSGN", "true", - "Enable the fcpsgn instruction">; + "Enable the fcpsgn instruction", + [FeatureHardFloat]>; def FeatureFRE : SubtargetFeature<"fre", "HasFRE", "true", - "Enable the fre instruction">; + "Enable the fre instruction", + [FeatureHardFloat]>; def FeatureFRES : SubtargetFeature<"fres", "HasFRES", "true", - "Enable the fres instruction">; + "Enable the fres instruction", + [FeatureHardFloat]>; def FeatureFRSQRTE : SubtargetFeature<"frsqrte", "HasFRSQRTE", "true", - "Enable the frsqrte instruction">; + "Enable the frsqrte instruction", + [FeatureHardFloat]>; def FeatureFRSQRTES : SubtargetFeature<"frsqrtes", "HasFRSQRTES", "true", - "Enable the frsqrtes instruction">; + "Enable the frsqrtes instruction", + [FeatureHardFloat]>; def FeatureRecipPrec : SubtargetFeature<"recipprec", "HasRecipPrec", "true", "Assume higher precision reciprocal estimates">; def FeatureSTFIWX : SubtargetFeature<"stfiwx","HasSTFIWX", "true", - "Enable the stfiwx instruction">; + "Enable the stfiwx instruction", + [FeatureHardFloat]>; def FeatureLFIWAX : SubtargetFeature<"lfiwax","HasLFIWAX", "true", - "Enable the lfiwax instruction">; + "Enable the lfiwax instruction", + [FeatureHardFloat]>; def FeatureFPRND : SubtargetFeature<"fprnd", "HasFPRND", "true", - "Enable the fri[mnpz] instructions">; + "Enable the fri[mnpz] instructions", + [FeatureHardFloat]>; def FeatureFPCVT : SubtargetFeature<"fpcvt", "HasFPCVT", "true", - "Enable fc[ft]* (unsigned and single-precision) and lfiwzx instructions">; + "Enable fc[ft]* (unsigned and single-precision) and lfiwzx instructions", + [FeatureHardFloat]>; def FeatureISEL : SubtargetFeature<"isel","HasISEL", "true", "Enable the isel instruction">; def FeatureBPERMD : SubtargetFeature<"bpermd", "HasBPERMD", "true", @@ -112,7 +124,8 @@ def FeaturePPC4xx : SubtargetFeature< def FeaturePPC6xx : SubtargetFeature<"ppc6xx", "IsPPC6xx", "true", "Enable PPC 6xx instructions">; def FeatureQPX : SubtargetFeature<"qpx","HasQPX", "true", - "Enable QPX instructions">; + "Enable QPX instructions", + [FeatureHardFloat]>; def FeatureVSX : SubtargetFeature<"vsx","HasVSX", "true", "Enable VSX instructions", [FeatureAltivec]>; @@ -282,7 +295,8 @@ include "PPCInstrInfo.td" // PowerPC processors supported. // -def : Processor<"generic", G3Itineraries, [Directive32, FeatureMFTB]>; +def : Processor<"generic", G3Itineraries, [Directive32, FeatureHardFloat, + FeatureMFTB]>; def : ProcessorModel<"440", PPC440Model, [Directive440, FeatureISEL, FeatureFRES, FeatureFRSQRTE, FeatureICBT, FeatureBookE, @@ -291,8 +305,8 @@ def : ProcessorModel<"450", PPC440Model, FeatureFRES, FeatureFRSQRTE, FeatureICBT, FeatureBookE, FeatureMSYNC, FeatureMFTB]>; -def : Processor<"601", G3Itineraries, [Directive601]>; -def : Processor<"602", G3Itineraries, [Directive602, +def : Processor<"601", G3Itineraries, [Directive601, FeatureHardFloat]>; +def : Processor<"602", G3Itineraries, [Directive602, FeatureHardFloat, FeatureMFTB]>; def : Processor<"603", G3Itineraries, [Directive603, FeatureFRES, FeatureFRSQRTE, @@ -406,7 +420,10 @@ def : ProcessorModel<"pwr7", P7Model, Pr def : ProcessorModel<"pwr8", P8Model, ProcessorFeatures.Power8FeatureList>; // FIXME: Same as P8 until the POWER9 scheduling info is available def : ProcessorModel<"pwr9", P8Model, ProcessorFeatures.Power9FeatureList>; -def : Processor<"ppc", G3Itineraries, [Directive32, FeatureMFTB]>; +def : Processor<"ppc", G3Itineraries, [Directive32, FeatureHardFloat, + FeatureMFTB]>; +def : Processor<"ppc32", G3Itineraries, [Directive32, FeatureHardFloat, + FeatureMFTB]>; def : ProcessorModel<"ppc64", G5Model, [Directive64, FeatureAltivec, FeatureMFOCRF, FeatureFSqrt, FeatureFRES, Modified: head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/lib/Target/PowerPC/PPCISelLowering.cpp Fri Nov 25 18:12:13 2016 (r309149) @@ -3144,7 +3144,7 @@ SDValue PPCTargetLowering::LowerFormalAr }; const unsigned Num_GPR_Regs = array_lengthof(GPR); - const unsigned Num_FPR_Regs = 13; + const unsigned Num_FPR_Regs = useSoftFloat() ? 0 : 13; const unsigned Num_VR_Regs = array_lengthof(VR); const unsigned Num_QFPR_Regs = Num_FPR_Regs; @@ -3557,7 +3557,7 @@ SDValue PPCTargetLowering::LowerFormalAr }; const unsigned Num_GPR_Regs = array_lengthof(GPR_32); - const unsigned Num_FPR_Regs = 13; + const unsigned Num_FPR_Regs = useSoftFloat() ? 0 : 13; const unsigned Num_VR_Regs = array_lengthof( VR); unsigned GPR_idx = 0, FPR_idx = 0, VR_idx = 0; @@ -10340,7 +10340,7 @@ SDValue PPCTargetLowering::combineFPToIn N->getOpcode() == ISD::UINT_TO_FP) && "Need an int -> FP conversion node here"); - if (!Subtarget.has64BitSupport()) + if (useSoftFloat() || !Subtarget.has64BitSupport()) return SDValue(); SelectionDAG &DAG = DCI.DAG; Modified: head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.cpp Fri Nov 25 18:12:13 2016 (r309149) @@ -62,7 +62,7 @@ void PPCSubtarget::initializeEnvironment Has64BitSupport = false; Use64BitRegs = false; UseCRBits = false; - UseSoftFloat = false; + HasHardFloat = false; HasAltivec = false; HasSPE = false; HasQPX = false; Modified: head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/lib/Target/PowerPC/PPCSubtarget.h Fri Nov 25 18:12:13 2016 (r309149) @@ -91,7 +91,7 @@ protected: bool Has64BitSupport; bool Use64BitRegs; bool UseCRBits; - bool UseSoftFloat; + bool HasHardFloat; bool IsPPC64; bool HasAltivec; bool HasSPE; @@ -205,7 +205,7 @@ public: /// instructions, regardless of whether we are in 32-bit or 64-bit mode. bool has64BitSupport() const { return Has64BitSupport; } // useSoftFloat - Return true if soft-float option is turned on. - bool useSoftFloat() const { return UseSoftFloat; } + bool useSoftFloat() const { return !HasHardFloat; } /// use64BitRegs - Return true if in 64-bit mode or if we should use 64-bit /// registers in 32-bit mode when possible. This can only true if Modified: head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp ============================================================================== --- head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/lib/Target/PowerPC/PPCTargetMachine.cpp Fri Nov 25 18:12:13 2016 (r309149) @@ -268,7 +268,7 @@ PPCTargetMachine::getSubtargetImpl(const // If the soft float attribute is set on the function turn on the soft float // subtarget feature. if (SoftFloat) - FS += FS.empty() ? "+soft-float" : ",+soft-float"; + FS += FS.empty() ? "-hard-float" : ",-hard-float"; auto &I = SubtargetMap[CPU + FS]; if (!I) { Modified: head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/tools/clang/lib/CodeGen/TargetInfo.cpp Fri Nov 25 18:12:13 2016 (r309149) @@ -3859,6 +3859,7 @@ private: static const unsigned GPRBits = 64; ABIKind Kind; bool HasQPX; + bool IsSoftFloatABI; // A vector of float or double will be promoted to <4 x f32> or <4 x f64> and // will be passed in a QPX register. @@ -3889,8 +3890,10 @@ private: } public: - PPC64_SVR4_ABIInfo(CodeGen::CodeGenTypes &CGT, ABIKind Kind, bool HasQPX) - : ABIInfo(CGT), Kind(Kind), HasQPX(HasQPX) {} + PPC64_SVR4_ABIInfo(CodeGen::CodeGenTypes &CGT, ABIKind Kind, bool HasQPX, + bool SoftFloatABI) + : ABIInfo(CGT), Kind(Kind), HasQPX(HasQPX), + IsSoftFloatABI(SoftFloatABI) {} bool isPromotableTypeForABI(QualType Ty) const; CharUnits getParamTypeAlignment(QualType Ty) const; @@ -3938,8 +3941,10 @@ class PPC64_SVR4_TargetCodeGenInfo : pub public: PPC64_SVR4_TargetCodeGenInfo(CodeGenTypes &CGT, - PPC64_SVR4_ABIInfo::ABIKind Kind, bool HasQPX) - : TargetCodeGenInfo(new PPC64_SVR4_ABIInfo(CGT, Kind, HasQPX)) {} + PPC64_SVR4_ABIInfo::ABIKind Kind, bool HasQPX, + bool SoftFloatABI) + : TargetCodeGenInfo(new PPC64_SVR4_ABIInfo(CGT, Kind, HasQPX, + SoftFloatABI)) {} int getDwarfEHStackPointer(CodeGen::CodeGenModule &M) const override { // This is recovered from gcc output. @@ -4157,8 +4162,11 @@ bool PPC64_SVR4_ABIInfo::isHomogeneousAg if (const BuiltinType *BT = Ty->getAs()) { if (BT->getKind() == BuiltinType::Float || BT->getKind() == BuiltinType::Double || - BT->getKind() == BuiltinType::LongDouble) + BT->getKind() == BuiltinType::LongDouble) { + if (IsSoftFloatABI) + return false; return true; + } } if (const VectorType *VT = Ty->getAs()) { if (getContext().getTypeSize(VT) == 128 || IsQPXVectorTy(Ty)) @@ -7964,8 +7972,10 @@ const TargetCodeGenInfo &CodeGenModule:: if (getTarget().getABI() == "elfv2") Kind = PPC64_SVR4_ABIInfo::ELFv2; bool HasQPX = getTarget().getABI() == "elfv1-qpx"; + bool IsSoftFloat = CodeGenOpts.FloatABI == "soft"; - return SetCGInfo(new PPC64_SVR4_TargetCodeGenInfo(Types, Kind, HasQPX)); + return SetCGInfo(new PPC64_SVR4_TargetCodeGenInfo(Types, Kind, HasQPX, + IsSoftFloat)); } else return SetCGInfo(new PPC64TargetCodeGenInfo(Types)); case llvm::Triple::ppc64le: { @@ -7974,8 +7984,10 @@ const TargetCodeGenInfo &CodeGenModule:: if (getTarget().getABI() == "elfv1" || getTarget().getABI() == "elfv1-qpx") Kind = PPC64_SVR4_ABIInfo::ELFv1; bool HasQPX = getTarget().getABI() == "elfv1-qpx"; + bool IsSoftFloat = CodeGenOpts.FloatABI == "soft"; - return SetCGInfo(new PPC64_SVR4_TargetCodeGenInfo(Types, Kind, HasQPX)); + return SetCGInfo(new PPC64_SVR4_TargetCodeGenInfo(Types, Kind, HasQPX, + IsSoftFloat)); } case llvm::Triple::nvptx: Modified: head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp ============================================================================== --- head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Fri Nov 25 18:02:43 2016 (r309148) +++ head/contrib/llvm/tools/clang/lib/Driver/Tools.cpp Fri Nov 25 18:12:13 2016 (r309149) @@ -1601,15 +1601,8 @@ static void getPPCTargetFeatures(const D handleTargetFeaturesGroup(Args, Features, options::OPT_m_ppc_Features_Group); ppc::FloatABI FloatABI = ppc::getPPCFloatABI(D, Args); - if (FloatABI == ppc::FloatABI::Soft && - !(Triple.getArch() == llvm::Triple::ppc64 || - Triple.getArch() == llvm::Triple::ppc64le)) - Features.push_back("+soft-float"); - else if (FloatABI == ppc::FloatABI::Soft && - (Triple.getArch() == llvm::Triple::ppc64 || - Triple.getArch() == llvm::Triple::ppc64le)) - D.Diag(diag::err_drv_invalid_mfloat_abi) - << "soft float is not supported for ppc64"; + if (FloatABI == ppc::FloatABI::Soft) + Features.push_back("-hard-float"); // Altivec is a bit weird, allow overriding of the Altivec feature here. AddTargetFeature(Args, Features, options::OPT_faltivec, From owner-svn-src-head@freebsd.org Fri Nov 25 18:12:58 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4EDCCC553D1; Fri, 25 Nov 2016 18:12:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1ECE8FE0; Fri, 25 Nov 2016 18:12:58 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPICvff051153; Fri, 25 Nov 2016 18:12:57 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPICvkX051152; Fri, 25 Nov 2016 18:12:57 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611251812.uAPICvkX051152@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 18:12:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309150 - head/lib/clang X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 18:12:58 -0000 Author: dim Date: Fri Nov 25 18:12:57 2016 New Revision: 309150 URL: https://svnweb.freebsd.org/changeset/base/309150 Log: Bump FREEBSD_CC_VERSION again for r309147 and 309149. Modified: head/lib/clang/freebsd_cc_version.h Modified: head/lib/clang/freebsd_cc_version.h ============================================================================== --- head/lib/clang/freebsd_cc_version.h Fri Nov 25 18:12:13 2016 (r309149) +++ head/lib/clang/freebsd_cc_version.h Fri Nov 25 18:12:57 2016 (r309150) @@ -1,3 +1,3 @@ /* $FreeBSD$ */ -#define FREEBSD_CC_VERSION 1200003 +#define FREEBSD_CC_VERSION 1200004 From owner-svn-src-head@freebsd.org Fri Nov 25 18:57:15 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D3BA2C55EA7; Fri, 25 Nov 2016 18:57:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id A0DE1863; Fri, 25 Nov 2016 18:57:15 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPIvEaR067878; Fri, 25 Nov 2016 18:57:14 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPIvE1k067877; Fri, 25 Nov 2016 18:57:14 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201611251857.uAPIvE1k067877@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Fri, 25 Nov 2016 18:57:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309151 - head/sys/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 18:57:15 -0000 Author: emaste Date: Fri Nov 25 18:57:14 2016 New Revision: 309151 URL: https://svnweb.freebsd.org/changeset/base/309151 Log: Use explicit 0x200000 instead of MAXPAGESIZE for the amd64 kernel physaddr MAXPAGESIZE is not well defined by the GNU ld documentation. Different linkers, and different versions of the same linker, use different MAXPAGESIZE values. Current versions of GNU gold and LLVM's lld use 4K. When set to 4K the kernel panics at boot due to an issue with x86bios. Here we want the kernel physaddr to be the amd64 superpage size, so use that value (2MB) explicitly. With this change GNU gold and LLVM lld can link a working amd64 kernel. PR: 214718 (x86bios) Differential Revision: https://reviews.freebsd.org/D8610 Modified: head/sys/conf/ldscript.amd64 Modified: head/sys/conf/ldscript.amd64 ============================================================================== --- head/sys/conf/ldscript.amd64 Fri Nov 25 18:12:57 2016 (r309150) +++ head/sys/conf/ldscript.amd64 Fri Nov 25 18:57:14 2016 (r309151) @@ -6,7 +6,7 @@ SEARCH_DIR("/usr/lib"); SECTIONS { /* Read-only sections, merged into text segment: */ - kernphys = CONSTANT (MAXPAGESIZE); + kernphys = 0x200000; . = kernbase + kernphys + SIZEOF_HEADERS; /* * Use the AT keyword in order to set the right LMA that contains From owner-svn-src-head@freebsd.org Fri Nov 25 19:36:28 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE221C55026; Fri, 25 Nov 2016 19:36:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D4BF635; Fri, 25 Nov 2016 19:36:28 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPJaR27084671; Fri, 25 Nov 2016 19:36:27 GMT (envelope-from jhibbits@FreeBSD.org) Received: (from jhibbits@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPJaRg0084670; Fri, 25 Nov 2016 19:36:27 GMT (envelope-from jhibbits@FreeBSD.org) Message-Id: <201611251936.uAPJaRg0084670@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: jhibbits set sender to jhibbits@FreeBSD.org using -f From: Justin Hibbits Date: Fri, 25 Nov 2016 19:36:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309167 - head/sys/powerpc/include X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:36:28 -0000 Author: jhibbits Date: Fri Nov 25 19:36:27 2016 New Revision: 309167 URL: https://svnweb.freebsd.org/changeset/base/309167 Log: Add an isync to after mtsrin, required by the MPC750 errata MPC750 User Manual Errata (rev 1) adds a note to C.4.2.2 noting that mtsr, mtsrin, and mtmsr all require a isync after the instruction and before data address translation uses any of the segment registers. This should make FreeBSD run correctly on the G3 again. Reported by: Mark Millard MFC after: 1 week Modified: head/sys/powerpc/include/cpufunc.h Modified: head/sys/powerpc/include/cpufunc.h ============================================================================== --- head/sys/powerpc/include/cpufunc.h Fri Nov 25 19:25:20 2016 (r309166) +++ head/sys/powerpc/include/cpufunc.h Fri Nov 25 19:36:27 2016 (r309167) @@ -82,7 +82,7 @@ static __inline void mtsrin(vm_offset_t va, register_t value) { - __asm __volatile ("mtsrin %0,%1" :: "r"(value), "r"(va)); + __asm __volatile ("mtsrin %0,%1; isync" :: "r"(value), "r"(va)); } static __inline register_t From owner-svn-src-head@freebsd.org Fri Nov 25 19:38:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BC571C550C3; Fri, 25 Nov 2016 19:38:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::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 85BAE84D; Fri, 25 Nov 2016 19:38:10 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x231.google.com with SMTP id c21so133910209ioj.1; Fri, 25 Nov 2016 11:38:10 -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; bh=b2L5AOqYSMRZaO9qmZ3HyDJX1gwxbGhEBv9GgTksLkA=; b=vWuLiQlfxV+Z1hGEnJcVxAyh2yQakDfw5Jpd3bwQMpIgD92kR4bDUmc58H0+7KvR9o jbU2cDw4dAdUxhGiY4WgHWiFB7T/zYi+QObHMVUcjyw+ybS7tntoET7XN0YjXvWVSHkk igczGos74WF/73vCuG+tGrWo7xTwu85yz8GwCcbF5OkTWT4HbJBrv7CxIy7OLjrSQZ8U KTBmXR1i7svHUX6WbpR5yTdjPo5pBRaUdPaY/AVfQhbAEJkzLA9QMkMyWd3jKY5i80KO WBQza2pWF15bgLVZHzmmqq5CvL6ljz2qO3BhYi88qPCyJfHD2OjisdGPKbkZ0SaU3N6H v/Mg== 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; bh=b2L5AOqYSMRZaO9qmZ3HyDJX1gwxbGhEBv9GgTksLkA=; b=UkW09zPe3Rq0F+vVSqGj4SRQ9hKX+amwdxRGtL7SBX+ruWNwhVi0VdngKlcKtrj8Fh 1PlkLSeHdEk9uK4bxvfhkX8DJx9kXwIbggqTpO8ugGrlR4kG5ahLbQWZ8WioKGEIW5ao oQcOeHMTiQAOUphjkZG+U6/wLjCjs0ZpKuLmw6ZQrvU1PDeYWWqiEzQHT8g5qE7Nul+E T+JGUxR8PGEaCvl9Wjo60Ic8zcwu3duK848b89X6SJwTX9nJxntgg4RM/Rgb3gdsBiBU BJNuHm47FWeEwgfetJhSQ/ODPaQ34ZIt5jkuKrvgUhqJi2nbXHVvazJDnYflJUqJeqC/ rbng== X-Gm-Message-State: AKaTC00WtVzGYkZlMbzjYWGQHuf3UlM6G2nhhD8sD7iVIHh4YN46Zu8NEEMKH7bpEB3kpwhEMH9veHC0q3daTA== X-Received: by 10.36.33.151 with SMTP id e145mr7943878ita.14.1480102689841; Fri, 25 Nov 2016 11:38:09 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.212 with HTTP; Fri, 25 Nov 2016 11:37:49 -0800 (PST) In-Reply-To: <201611251315.uAPDFSVL029907@repo.freebsd.org> References: <201611251315.uAPDFSVL029907@repo.freebsd.org> From: Ed Maste Date: Fri, 25 Nov 2016 14:37:49 -0500 X-Google-Sender-Auth: HqQ7vwxbaZ1Z4SogV0rERmjqLpo Message-ID: Subject: Re: svn commit: r309142 - in head: . gnu/usr.bin/binutils/ld share/mk tools/build/options usr.bin/clang/lld 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 19:38:10 -0000 On 25 November 2016 at 08:15, Ed Maste wrote: > Author: emaste > Date: Fri Nov 25 13:15:28 2016 > New Revision: 309142 > URL: https://svnweb.freebsd.org/changeset/base/309142 > > Log: > Add WITH_LLD_AS_LD build knob > > If set it installs LLD as /usr/bin/ld. LLD (as of version 3.9) is not > capable of linking the world and kernel, but can self-host and link many > substantial applications. GNU ld continues to be used for the world and > kernel build, regardless of how this knob is set. There was some confusion on IRC about this, so let me clarify. LLD 3.9 can link many applications on FreeBSD, including itself, Clang, etc. It cannot link (all of) the FreeBSD kernel and world. Additional changes have been made in LLD's subversion repo (after the 3.9 release), including improved linker script expression handling and symbol version map support. These changes are needed to build FreeBSD with lld. With a recent LLD built from source it's possible to build a working FreeBSD kernel and world excluding the boot loaders. I tested at FreeBSD r309151 and LLD r287869. The WITH_LLD_AS_LD knob does not affect buildworld. It will still build a bootstrap GNU ld and use it to link all of the userland to be installed. When WITH_LLD_AS_LD=yes installworld will install lld as /usr/bin/ld in the resulting system. The knob is being made available now for testing and experimentation, and to provide a linker in arm64 images that can be used to bootstrap either GNU ld or a later version of LLD. From owner-svn-src-head@freebsd.org Fri Nov 25 21:24:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 08DD3C55BC9; Fri, 25 Nov 2016 21:24:30 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: from lath.rinet.ru (lath.rinet.ru [195.54.192.90]) by mx1.freebsd.org (Postfix) with ESMTP id BA7F4DB; Fri, 25 Nov 2016 21:24:29 +0000 (UTC) (envelope-from oleg@lath.rinet.ru) Received: by lath.rinet.ru (Postfix, from userid 222) id D6913ECA; Sat, 26 Nov 2016 00:17:20 +0300 (MSK) Date: Sat, 26 Nov 2016 00:17:20 +0300 From: Oleg Bulyzhin To: Fabien Thomas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309143 - head/sys/libkern Message-ID: <20161125211720.GA66671@lath.rinet.ru> References: <201611251349.uAPDnX09042110@repo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201611251349.uAPDnX09042110@repo.freebsd.org> User-Agent: Mutt/1.7.1 (2016-10-04) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 21:24:30 -0000 On Fri, Nov 25, 2016 at 01:49:33PM +0000, Fabien Thomas wrote: > + if (reseed || atomic_cmpset_int(&arc4rand_iniseed_state, > + ARC4_ENTR_HAVE, ARC4_ENTR_SEED)) { > + ARC4_FOREACH(arc4) > + arc4_randomstir(arc4); > + } How about eliminating this atomic? Converting it to: if (reseed || arc4rand_iniseed_state == ARC4_ENTR_HAVE) { arc4rand_iniseed_state = ARC4_ENTR_SEED; ARC4_FOREACH(arc4); arc4_randomstir(arc4); } should give you free performance boost. Having locked cmpxchg in main path is not cheap (and as i can see it's really used only once, when randomdev unblocks). P.S. quick and dirty test gives me 10-30% of extra perfomance. -- Oleg. ================================================================ === Oleg Bulyzhin -- OBUL-RIPN -- OBUL-RIPE -- oleg@rinet.ru === ================================================================ From owner-svn-src-head@freebsd.org Fri Nov 25 21:39:39 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7E8CCC55F60; Fri, 25 Nov 2016 21:39:39 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-wj0-x244.google.com (mail-wj0-x244.google.com [IPv6:2a00:1450:400c:c01::244]) (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 1B10BA7B; Fri, 25 Nov 2016 21:39:39 +0000 (UTC) (envelope-from kubito@gmail.com) Received: by mail-wj0-x244.google.com with SMTP id o2so3055251wje.2; Fri, 25 Nov 2016 13:39:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=5kJAkoq8uemaam81B29fZULwzGPgysSt+U+LD8J4zXI=; b=0OrQ6JqksgnOKEvsqRwozOto/uR00qp+A6vVLf7cVQNgiasD+S1XAE+DTlklQfyf5c 1IyJI+146r0c5+hpeLiljgO14OZkLHbJj7TnzdEXl1cDsuCkCixZu1yqf8T8k/eW7Itc rsxAS3YHfxHaBvl7iMBzwOdlYmVBNUtk1m1895f2PNIIxtbxAFFz4SHUdPXRwjUNTVE7 loTvTd3RVYhs1ODn4/yWPamZgO8YY0Sfrw+ZfbF9JRlVNGMeciFjjF0jthPOQmkBJb6/ +0+vMpU3dhsN7FqRPy4F5o7v/mxc1j0oGilsj93IzWAV6PC1W9EEaecoEwQ45TDufWt9 JAWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=5kJAkoq8uemaam81B29fZULwzGPgysSt+U+LD8J4zXI=; b=dzzRLLv4bCpV7zNaNjDxMAZ67va2UlE6TAF9phjNzuGxIOecXZo96aZDMSLCWZOKZh 83iGm7FAru5r/6UZcrIhCm9Vy7KFjOhfVrYj6zOCsny9q7IzQSSkkBM01NCmUCr9Ftiu zwdfTGyIxW4oZk7vnxJ/vGgzHR6ymW92tM0eZdsRqdR8I1FgIhNrVaM5kHCPZllB+u4G 1dfvYKmO9R5jjQrEazuzygPwekwsytv2VQ/rbopxLBf96Ha8i//TczkMLJsRETwhZHQn NjhT5sJXq3AAsYiJcS2UuAAvK1SQ886AurRxxhShdCb9ED8JvZTccV0ceR7x6qkHJqII iKlA== X-Gm-Message-State: AKaTC01w359f4bL+K+plDknDZXO7Gb9sBESWPgPjcnuJrhjIXq/uPUjf7jx9FAd8es6pyQ== X-Received: by 10.194.75.227 with SMTP id f3mr8774614wjw.19.1480109976452; Fri, 25 Nov 2016 13:39:36 -0800 (PST) Received: from orwell.gmail.com (dhcp-077-248-147-050.chello.nl. [77.248.147.50]) by smtp.gmail.com with ESMTPSA id k2sm49015110wjv.11.2016.11.25.13.39.35 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 25 Nov 2016 13:39:35 -0800 (PST) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: Fabien Thomas Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309144 - in head: lib/libipsec sys/net sys/netipsec In-Reply-To: <201611251444.uAPEinKb066023@repo.freebsd.org> (Fabien Thomas's message of "Fri, 25 Nov 2016 14:44:49 +0000 (UTC)") References: <201611251444.uAPEinKb066023@repo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (berkeley-unix) Date: Fri, 25 Nov 2016 22:39:06 +0100 Message-ID: <8660nbfddx.fsf@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 21:39:39 -0000 Fabien Thomas writes: > Author: fabient > Date: Fri Nov 25 14:44:49 2016 > New Revision: 309144 > URL: https://svnweb.freebsd.org/changeset/base/309144 > > Log: > IPsec RFC6479 support for replay window sizes up to 2^32 - 32 packets. > > Since the previous algorithm, based on bit shifting, does not scale > with large replay windows, the algorithm used here is based on > RFC 6479: IPsec Anti-Replay Algorithm without Bit Shifting. > The replay window will be fast to be updated, but will cost as many bits > in RAM as its size. > > The previous implementation did not provide a lock on the replay window, > which may lead to replay issues. This broke the build here: In file included from /usr/src/sys/netipsec/key_debug.c:54: In file included from /usr/src/sys/netipsec/ipsec.h:46: In file included from /usr/src/sys/netipsec/keydb.h:38: /usr/src/sys/sys/mutex.h:367:2: error: LOCK_DEBUG not defined, include before #error LOCK_DEBUG not defined, include before From owner-svn-src-head@freebsd.org Fri Nov 25 22:33:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 058BAC55FC7; Fri, 25 Nov 2016 22:33:17 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AFF8B1A06; Fri, 25 Nov 2016 22:33:16 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPMXFRK057200; Fri, 25 Nov 2016 22:33:15 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPMXF1X057199; Fri, 25 Nov 2016 22:33:15 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201611252233.uAPMXF1X057199@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 25 Nov 2016 22:33:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309169 - in head/contrib/llvm/tools: llvm-dwarfdump llvm-lto X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 22:33:17 -0000 Author: dim Date: Fri Nov 25 22:33:15 2016 New Revision: 309169 URL: https://svnweb.freebsd.org/changeset/base/309169 Log: Get rid of separate Subversion mergeinfo properties for llvm-dwarfdump and llvm-lto. The mergeinfo confuses Subversion enormously, and these directories will just use the mergeinfo for llvm itself. Modified: Directory Properties: head/contrib/llvm/tools/llvm-dwarfdump/ (props changed) head/contrib/llvm/tools/llvm-lto/ (props changed) From owner-svn-src-head@freebsd.org Fri Nov 25 23:28:10 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DF65CC54F16; Fri, 25 Nov 2016 23:28:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id AEBF31D6; Fri, 25 Nov 2016 23:28:10 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAPNS9UL077298; Fri, 25 Nov 2016 23:28:09 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAPNS9GM077297; Fri, 25 Nov 2016 23:28:09 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201611252328.uAPNS9GM077297@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Fri, 25 Nov 2016 23:28:09 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309171 - head/sys/fs/nfs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Nov 2016 23:28:11 -0000 Author: rmacklem Date: Fri Nov 25 23:28:09 2016 New Revision: 309171 URL: https://svnweb.freebsd.org/changeset/base/309171 Log: Stop "nfsstat -z" from clearing counts of NFSv4 state structures. The "-z" option on nfsstats was erroneously zeroing out the counts of NFSv4 state structures. These counts will normally go back down to zero as state is released. When zeroed out by "-z", these counts can go negative. This patch fixes this problem. MFC after: 2 weeks Modified: head/sys/fs/nfs/nfs_commonport.c Modified: head/sys/fs/nfs/nfs_commonport.c ============================================================================== --- head/sys/fs/nfs/nfs_commonport.c Fri Nov 25 22:36:07 2016 (r309170) +++ head/sys/fs/nfs/nfs_commonport.c Fri Nov 25 23:28:09 2016 (r309171) @@ -608,21 +608,6 @@ nfssvc_call(struct thread *p, struct nfs nfsstatsv1.srvcache_nonidemdonehits = 0; nfsstatsv1.srvcache_misses = 0; nfsstatsv1.srvcache_tcppeak = 0; - nfsstatsv1.srvclients = 0; - nfsstatsv1.srvopenowners = 0; - nfsstatsv1.srvopens = 0; - nfsstatsv1.srvlockowners = 0; - nfsstatsv1.srvlocks = 0; - nfsstatsv1.srvdelegates = 0; - nfsstatsv1.clopenowners = 0; - nfsstatsv1.clopens = 0; - nfsstatsv1.cllockowners = 0; - nfsstatsv1.cllocks = 0; - nfsstatsv1.cldelegates = 0; - nfsstatsv1.cllocalopenowners = 0; - nfsstatsv1.cllocalopens = 0; - nfsstatsv1.cllocallockowners = 0; - nfsstatsv1.cllocallocks = 0; bzero(nfsstatsv1.srvrpccnt, sizeof(nfsstatsv1.srvrpccnt)); bzero(nfsstatsv1.cbrpccnt, From owner-svn-src-head@freebsd.org Sat Nov 26 00:59:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 4C799C52643; Sat, 26 Nov 2016 00:59:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1BEB5CEA; Sat, 26 Nov 2016 00:59:02 +0000 (UTC) (envelope-from emaste@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQ0x1GZ013081; Sat, 26 Nov 2016 00:59:01 GMT (envelope-from emaste@FreeBSD.org) Received: (from emaste@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQ0x1hs013080; Sat, 26 Nov 2016 00:59:01 GMT (envelope-from emaste@FreeBSD.org) Message-Id: <201611260059.uAQ0x1hs013080@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: emaste set sender to emaste@FreeBSD.org using -f From: Ed Maste Date: Sat, 26 Nov 2016 00:59:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309174 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 00:59:02 -0000 Author: emaste Date: Sat Nov 26 00:59:01 2016 New Revision: 309174 URL: https://svnweb.freebsd.org/changeset/base/309174 Log: netipsec: fix build after 309144 Reported by: rakuco Modified: head/sys/netipsec/key_debug.c Modified: head/sys/netipsec/key_debug.c ============================================================================== --- head/sys/netipsec/key_debug.c Sat Nov 26 00:56:03 2016 (r309173) +++ head/sys/netipsec/key_debug.c Sat Nov 26 00:59:01 2016 (r309174) @@ -39,8 +39,10 @@ #include #ifdef _KERNEL #include +#include #include #include +#include #include #endif #include From owner-svn-src-head@freebsd.org Sat Nov 26 01:31:09 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F0E1DC53CF5; Sat, 26 Nov 2016 01:31:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io0-x243.google.com (mail-io0-x243.google.com [IPv6:2607:f8b0:4001:c06::243]) (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 C701016EB; Sat, 26 Nov 2016 01:31:09 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-io0-x243.google.com with SMTP id h133so12366708ioe.2; Fri, 25 Nov 2016 17:31:09 -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-transfer-encoding; bh=Eln8uNCVGxbi0ytf5vmYpusKLOlfij7div4BhMPjC94=; b=lYTEvyc4wF07GTljvKMI5YX7W9iWKZ64iFnEXA/OaTbIEsBg18TKVME4CXqkumAGAM EiMY31LhqqY5rqqJAPH+m4eeKKj4hxIxxzytuft1qTreOgkMzuSjxmwFXPmDGQqQJLS1 VRD9+odE1KD/iOPXXk2pxBLlWf5i+OAZWZ/NOm/jlDMSUrIdwvEq1fmW5XE8HNRtmwTZ YMhoWnI0r1Dbmm5+JWR1oFmDJJ0XHXg5rcV/a4NYiPtFlDAb0F240QnghBZoLje5yrYz iDZnrQ0hxHKHpTHHo+UNe0K2dtqSrILiPwM/N/e5smTS10rrkaX7XTvOSRtWV0R1C2Ob HJpw== 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-transfer-encoding; bh=Eln8uNCVGxbi0ytf5vmYpusKLOlfij7div4BhMPjC94=; b=mwA5ZPCdB4lvYuREqBhrnMvRHPNqz6kabFSJLDogUOyCShni1H/4I2C4F0odSERbVP 0Kt22CPAMFta4AwtQJRxPO3B5UFucBWiYmxJYS4fFDBHAH0qc7mjFRqZHXBqBMyUQKoY oMcyJqeSs/gSccHYY1FRJgx2+qRoDM9OYluH1V/Z1FOajN7fWWkdeWFRfIy4hzzAo0nk DvafBS9KETkNJzzeuYke7TsrQncViyfdWmV9vZHR9RLQofmaZ3sV218qyxsudQ0Hd0cR kmEq7DoaKZtGwf2xQRJ3IyXSwwKusg1TDiizm0XRty351alpCc5R84LrJi8K1YauxYhT glmA== X-Gm-Message-State: AKaTC01j+QjN6EaxAWLMdsFuHiwNIxAdKG8PQn+m15JVp3vkCxpDIcVwZ3VvtNvfR1FngHqcrTwui5/M9EfpGQ== X-Received: by 10.107.19.164 with SMTP id 36mr9839897iot.155.1480123868840; Fri, 25 Nov 2016 17:31:08 -0800 (PST) MIME-Version: 1.0 Sender: carpeddiem@gmail.com Received: by 10.107.27.212 with HTTP; Fri, 25 Nov 2016 17:30:48 -0800 (PST) In-Reply-To: <86vavc3bwm.fsf@desk.des.no> References: <201611241450.uAOEoLA5079215@repo.freebsd.org> <861sy0n8re.fsf@desk.des.no> <2094160.1ufjjsmd6m@ralph.baldwin.cx> <86vavc3bwm.fsf@desk.des.no> From: Ed Maste Date: Fri, 25 Nov 2016 20:30:48 -0500 X-Google-Sender-Auth: tG7dmoU8E07_zRRzOCF2TRADv14 Message-ID: Subject: Re: svn commit: r309109 - head/lib/libutil To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: John Baldwin , Marcelo Araujo , Marcelo Araujo , "src-committers@freebsd.org" , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 01:31:10 -0000 On 24 November 2016 at 14:39, Dag-Erling Sm=C3=B8rgrav wrote: > > Precisely. If memory serves, I wrote that comment after receiving a > patch from someone who made the same mistake that I had already made and > reverted *twice*. It's the logical, sane thing to do: replace a BSD > primitive with the equivalent POSIX primitive, except the latter has > subtly different semantics and works in some of flopen(3)'s typical use > cases, but not all, and crucially, not in the pidfile(3) case. In other words, nobody else has changed this code, and in one case where someone proposed a broken patch they did it by contacting you directly. This seems like exactly the desired behaviour, without needing any warning in the code. The comment added in r309109 hardly seems appropriate for this case, especially given that the revision history doesn't offer much insight. Please rephrase the comment to explain instead why the "obvious" improvements are not appropriate. > I just remembered that I wrote a unit test for flopen(3). So maybe the > comment is redundant... if you assume that people build and run the > tests, and I'm willing to bet that they don't, because our test > framework is not very developer-friendly. I share your frustration with the lack of developer friendliness in our tests. But running the test suite must be a part of the release checklist and if the test detects a regression here our process must prevent it from making it into a release. From owner-svn-src-head@freebsd.org Sat Nov 26 02:06:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 686F3C554D5; Sat, 26 Nov 2016 02:06:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F42CE1A; Sat, 26 Nov 2016 02:06:34 +0000 (UTC) (envelope-from pfg@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQ26Xqk040856; Sat, 26 Nov 2016 02:06:33 GMT (envelope-from pfg@FreeBSD.org) Received: (from pfg@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQ26XYK040855; Sat, 26 Nov 2016 02:06:33 GMT (envelope-from pfg@FreeBSD.org) Message-Id: <201611260206.uAQ26XYK040855@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: pfg set sender to pfg@FreeBSD.org using -f From: "Pedro F. Giffuni" Date: Sat, 26 Nov 2016 02:06:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309179 - 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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 02:06:34 -0000 Author: pfg Date: Sat Nov 26 02:06:33 2016 New Revision: 309179 URL: https://svnweb.freebsd.org/changeset/base/309179 Log: ext2: avoid possible overflow when calculating malloc size. This is inspired on r308064 for case of reloading UFS. MFC after: 1 week Modified: head/sys/fs/ext2fs/ext2_vfsops.c Modified: head/sys/fs/ext2fs/ext2_vfsops.c ============================================================================== --- head/sys/fs/ext2fs/ext2_vfsops.c Sat Nov 26 01:17:03 2016 (r309178) +++ head/sys/fs/ext2fs/ext2_vfsops.c Sat Nov 26 02:06:33 2016 (r309179) @@ -537,7 +537,8 @@ ext2_mountfs(struct vnode *devvp, struct struct csum *sump; int error; int ronly; - int i, size; + int i; + u_long size; int32_t *lp; int32_t e2fs_maxcontig; From owner-svn-src-head@freebsd.org Sat Nov 26 07:02:45 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 82B02C56BED; Sat, 26 Nov 2016 07:02:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 5D5E2A32; Sat, 26 Nov 2016 07:02:45 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQ72iBD060408; Sat, 26 Nov 2016 07:02:44 GMT (envelope-from delphij@FreeBSD.org) Received: (from delphij@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQ72iH3060407; Sat, 26 Nov 2016 07:02:44 GMT (envelope-from delphij@FreeBSD.org) Message-Id: <201611260702.uAQ72iH3060407@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: delphij set sender to delphij@FreeBSD.org using -f From: Xin LI Date: Sat, 26 Nov 2016 07:02:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309184 - head/usr.bin/gzip X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 07:02:45 -0000 Author: delphij Date: Sat Nov 26 07:02:44 2016 New Revision: 309184 URL: https://svnweb.freebsd.org/changeset/base/309184 Log: style(9) indent changes, no actual code change. MFC after: 2 weeks Modified: head/usr.bin/gzip/unpack.c Modified: head/usr.bin/gzip/unpack.c ============================================================================== --- head/usr.bin/gzip/unpack.c Sat Nov 26 03:39:02 2016 (r309183) +++ head/usr.bin/gzip/unpack.c Sat Nov 26 07:02:44 2016 (r309184) @@ -68,22 +68,22 @@ * leaf nodes count. */ typedef struct { - int symbol_size; /* Size of the symbol table */ - int treelevels; /* Levels for the huffman tree */ + int symbol_size; /* Size of the symbol table */ + int treelevels; /* Levels for the huffman tree */ - int *symbolsin; /* Table of leaf symbols count in - each level */ - int *inodesin; /* Table of internal nodes count in - each level */ - - char *symbol; /* The symbol table */ - char *symbol_eob; /* Pointer to the EOB symbol */ - char **tree; /* Decoding huffman tree (pointers to - first symbol of each tree level */ - - off_t uncompressed_size; /* Uncompressed size */ - FILE *fpIn; /* Input stream */ - FILE *fpOut; /* Output stream */ + int *symbolsin; /* Table of leaf symbols count in each + * level */ + int *inodesin; /* Table of internal nodes count in + * each level */ + + char *symbol; /* The symbol table */ + char *symbol_eob; /* Pointer to the EOB symbol */ + char **tree; /* Decoding huffman tree (pointers to + * first symbol of each tree level */ + + off_t uncompressed_size; /* Uncompressed size */ + FILE *fpIn; /* Input stream */ + FILE *fpOut; /* Output stream */ } unpack_descriptor_t; /* @@ -122,7 +122,7 @@ unpackd_fill_inodesin(const unpack_descr if (level < unpackd->treelevels) { unpackd_fill_inodesin(unpackd, level + 1); unpackd->inodesin[level] = (unpackd->inodesin[level + 1] + - unpackd->symbolsin[level + 1]) / 2; + unpackd->symbolsin[level + 1]) / 2; } else unpackd->inodesin[level] = 0; } @@ -163,7 +163,7 @@ unpack_parse_header(int in, int out, cha accepted_bytes(bytes_in, PACK_HEADER_LENGTH); - /* Obtain uncompressed length (bytes 2,3,4,5)*/ + /* Obtain uncompressed length (bytes 2,3,4,5) */ unpackd->uncompressed_size = 0; for (i = 2; i <= 5; i++) { unpackd->uncompressed_size <<= 8; @@ -187,7 +187,7 @@ unpack_parse_header(int in, int out, cha unpackd->symbolsin = calloc(unpackd->treelevels, sizeof(*(unpackd->symbolsin))); unpackd->tree = - calloc(unpackd->treelevels, (sizeof (*(unpackd->tree)))); + calloc(unpackd->treelevels, (sizeof(*(unpackd->tree)))); if (unpackd->inodesin == NULL || unpackd->symbolsin == NULL || unpackd->tree == NULL) maybe_err("calloc"); @@ -196,7 +196,7 @@ unpack_parse_header(int in, int out, cha unpackd->treelevels--; /* Read the levels symbol count table and calculate total */ - unpackd->symbol_size = 1; /* EOB */ + unpackd->symbol_size = 1; /* EOB */ for (i = 0; i <= unpackd->treelevels; i++) { if ((thisbyte = fgetc(unpackd->fpIn)) == EOF) maybe_err("File appears to be truncated"); @@ -310,7 +310,7 @@ finished: static off_t unpack(int in, int out, char *pre, size_t prelen, off_t *bytes_in) { - unpack_descriptor_t unpackd; + unpack_descriptor_t unpackd; in = dup(in); if (in == -1) @@ -326,4 +326,3 @@ unpack(int in, int out, char *pre, size_ /* If we reached here, the unpack was successful */ return (unpackd.uncompressed_size); } - From owner-svn-src-head@freebsd.org Sat Nov 26 10:04:07 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29A34C54EB0; Sat, 26 Nov 2016 10:04:07 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id ED680AC8; Sat, 26 Nov 2016 10:04:06 +0000 (UTC) (envelope-from ae@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQA46nr032317; Sat, 26 Nov 2016 10:04:06 GMT (envelope-from ae@FreeBSD.org) Received: (from ae@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQA46ej032316; Sat, 26 Nov 2016 10:04:06 GMT (envelope-from ae@FreeBSD.org) Message-Id: <201611261004.uAQA46ej032316@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ae set sender to ae@FreeBSD.org using -f From: "Andrey V. Elsukov" Date: Sat, 26 Nov 2016 10:04:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309187 - head/sys/netpfil/ipfw/nat64 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 10:04:07 -0000 Author: ae Date: Sat Nov 26 10:04:05 2016 New Revision: 309187 URL: https://svnweb.freebsd.org/changeset/base/309187 Log: Fix ICMPv6 Time Exceeded error message translation. Obtained from: Yandex LLC Sponsored by: Yandex LLC Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c Modified: head/sys/netpfil/ipfw/nat64/nat64_translate.c ============================================================================== --- head/sys/netpfil/ipfw/nat64/nat64_translate.c Sat Nov 26 07:59:57 2016 (r309186) +++ head/sys/netpfil/ipfw/nat64/nat64_translate.c Sat Nov 26 10:04:05 2016 (r309187) @@ -1256,9 +1256,9 @@ nat64_handle_icmp6(struct mbuf *m, int h */ mtu -= sizeof(struct ip6_hdr) - sizeof(struct ip); break; - case ICMP6_TIME_EXCEED_TRANSIT: + case ICMP6_TIME_EXCEEDED: type = ICMP_TIMXCEED; - code = ICMP_TIMXCEED_INTRANS; + code = icmp6->icmp6_code; break; case ICMP6_PARAM_PROB: switch (icmp6->icmp6_code) { From owner-svn-src-head@freebsd.org Sat Nov 26 10:20:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C6782C55406; Sat, 26 Nov 2016 10:20:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 965691D7; Sat, 26 Nov 2016 10:20:34 +0000 (UTC) (envelope-from br@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQAKXkw037170; Sat, 26 Nov 2016 10:20:33 GMT (envelope-from br@FreeBSD.org) Received: (from br@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQAKXOd037168; Sat, 26 Nov 2016 10:20:33 GMT (envelope-from br@FreeBSD.org) Message-Id: <201611261020.uAQAKXOd037168@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: br set sender to br@FreeBSD.org using -f From: Ruslan Bukin Date: Sat, 26 Nov 2016 10:20:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309188 - head/sys/mips/conf X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 10:20:34 -0000 Author: br Date: Sat Nov 26 10:20:33 2016 New Revision: 309188 URL: https://svnweb.freebsd.org/changeset/base/309188 Log: Don't build Ingenic kernels until we have non-static FDT support for them. Sponsored by: DARPA, AFRL Modified: head/sys/mips/conf/JZ4780 head/sys/mips/conf/X1000 Modified: head/sys/mips/conf/JZ4780 ============================================================================== --- head/sys/mips/conf/JZ4780 Sat Nov 26 10:04:05 2016 (r309187) +++ head/sys/mips/conf/JZ4780 Sat Nov 26 10:20:33 2016 (r309188) @@ -2,6 +2,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident JZ4780 machine mips mipsel cpu CPU_XBURST Modified: head/sys/mips/conf/X1000 ============================================================================== --- head/sys/mips/conf/X1000 Sat Nov 26 10:04:05 2016 (r309187) +++ head/sys/mips/conf/X1000 Sat Nov 26 10:20:33 2016 (r309188) @@ -2,6 +2,8 @@ # # $FreeBSD$ +#NO_UNIVERSE + ident X1000 machine mips mipsel cpu CPU_XBURST From owner-svn-src-head@freebsd.org Sat Nov 26 10:33:55 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 37281C55BFF; Sat, 26 Nov 2016 10:33:55 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E98EB10BB; Sat, 26 Nov 2016 10:33:54 +0000 (UTC) (envelope-from kib@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQAXswj045483; Sat, 26 Nov 2016 10:33:54 GMT (envelope-from kib@FreeBSD.org) Received: (from kib@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQAXsX2045482; Sat, 26 Nov 2016 10:33:54 GMT (envelope-from kib@FreeBSD.org) Message-Id: <201611261033.uAQAXsX2045482@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kib set sender to kib@FreeBSD.org using -f From: Konstantin Belousov Date: Sat, 26 Nov 2016 10:33:54 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309189 - head/sys/x86/x86 X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 10:33:55 -0000 Author: kib Date: Sat Nov 26 10:33:53 2016 New Revision: 309189 URL: https://svnweb.freebsd.org/changeset/base/309189 Log: Fix automatic eventtimer hardware selection when ARAT (APIC-Timer-always-running) is not implemented. If machine has ncpus >= 8 and non-FSB interrupt routing from HPET, default HPET eventtimer quality 450 is reduced by 100, i.e. it is 350. On the other hand, LAPIC default quality is 600 and it is reduced by 200 if ARAT is not reported. We end up with HPET quality 350 < LAPIC quality 400, despite ARAT is not set. Then, since deep Cx states are active by default, eventtimer fail. E.g., on Nehalem Core i7 CPU and X58 chipset, LAPIC only works in C0/C1/C1E and HPET does not implement FSB mode, which otherwise requires manual switch to HPET to get working system. Set LAPIC eventtimer quality to 100 if no ARAT. While there, do not ignore deadlint TSC mode for LAPIC timer if ARAT is not implemented. If user manually selected LAPIC eventtimer on such CPU, there is no reason to not use deadline if available and not disabled administratively. Sponsored by: The FreeBSD Foundation MFC after: 1 week Modified: head/sys/x86/x86/local_apic.c Modified: head/sys/x86/x86/local_apic.c ============================================================================== --- head/sys/x86/x86/local_apic.c Sat Nov 26 10:20:33 2016 (r309188) +++ head/sys/x86/x86/local_apic.c Sat Nov 26 10:33:53 2016 (r309189) @@ -478,8 +478,9 @@ native_lapic_init(vm_paddr_t addr) lapic_et.et_quality = 600; if (!arat) { lapic_et.et_flags |= ET_FLAGS_C3STOP; - lapic_et.et_quality -= 200; - } else if ((cpu_feature & CPUID_TSC) != 0 && + lapic_et.et_quality = 100; + } + if ((cpu_feature & CPUID_TSC) != 0 && (cpu_feature2 & CPUID2_TSCDLT) != 0 && tsc_is_invariant && tsc_freq != 0) { lapic_timer_tsc_deadline = 1; From owner-svn-src-head@freebsd.org Sat Nov 26 10:36:50 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0438AC561B4; Sat, 26 Nov 2016 10:36:50 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D2E9B1CA; Sat, 26 Nov 2016 10:36:49 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQAanZk047293; Sat, 26 Nov 2016 10:36:49 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQAam0Z047291; Sat, 26 Nov 2016 10:36:48 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201611261036.uAQAam0Z047291@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Sat, 26 Nov 2016 10:36:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309190 - head/sys/arm/allwinner/clk X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 10:36:50 -0000 Author: manu Date: Sat Nov 26 10:36:48 2016 New Revision: 309190 URL: https://svnweb.freebsd.org/changeset/base/309190 Log: PLL3 have a fractional mode where an explicit frequency (297Mhz or 270) can be selected for it. If the desired frequency is one of those two, use this mode instead of the integer one. When calculating the PLL3 freq for the dotclock, check if it is a multiple of the fracional frequencies. MFC after: 2 weeks Modified: head/sys/arm/allwinner/clk/aw_lcdclk.c head/sys/arm/allwinner/clk/aw_pll.c Modified: head/sys/arm/allwinner/clk/aw_lcdclk.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_lcdclk.c Sat Nov 26 10:33:53 2016 (r309189) +++ head/sys/arm/allwinner/clk/aw_lcdclk.c Sat Nov 26 10:36:48 2016 (r309190) @@ -78,6 +78,8 @@ __FBSDID("$FreeBSD$"); #define CH1_CLK_DIV_RATIO_M_SHIFT 0 #define TCON_PLLREF 3000000ULL +#define TCON_PLLREF_FRAC1 297000000ULL +#define TCON_PLLREF_FRAC2 270000000ULL #define TCON_PLL_M_MIN 1 #define TCON_PLL_M_MAX 15 #define TCON_PLL_N_MIN 9 @@ -290,7 +292,7 @@ aw_lcdclk_recalc_freq(struct clknode *cl } static void -calc_tcon_pll(uint64_t fin, uint64_t fout, uint32_t *pm, uint32_t *pn) +calc_tcon_pll_integer(uint64_t fin, uint64_t fout, uint32_t *pm, uint32_t *pn) { int64_t diff, fcur, best; int m, n; @@ -310,14 +312,86 @@ calc_tcon_pll(uint64_t fin, uint64_t fou } static int +calc_tcon_pll_fractional(uint64_t fin, uint64_t fout, int *clk_div) +{ + int m; + + /* Test for 1X match */ + for (m = TCON_PLL_M_MIN; m <= TCON_PLL_M_MAX; m++) { + if (fout == (fin / m)) { + *clk_div = m; + return (CH0_CLK_SRC_SEL_PLL3_1X); + } + } + + /* Test for 2X match */ + for (m = TCON_PLL_M_MIN; m <= TCON_PLL_M_MAX; m++) { + if (fout == ((fin * 2) / m)) { + *clk_div = m; + return (CH0_CLK_SRC_SEL_PLL3_2X); + } + } + + return (-1); +} + +static int +calc_tcon_pll(uint64_t fin, uint64_t fout, uint64_t *pll_freq, int *tcon_pll_div) +{ + uint32_t m, m2, n, n2; + uint64_t fsingle, fdouble; + int src_sel; + bool dbl; + + /* Test fractional freq first */ + src_sel = calc_tcon_pll_fractional(TCON_PLLREF_FRAC1, fout, + tcon_pll_div); + if (src_sel != -1) { + *pll_freq = TCON_PLLREF_FRAC1; + return src_sel; + } + src_sel = calc_tcon_pll_fractional(TCON_PLLREF_FRAC2, fout, + tcon_pll_div); + if (src_sel != -1) { + *pll_freq = TCON_PLLREF_FRAC2; + return src_sel; + } + + m = n = m2 = n2 = 0; + dbl = false; + + /* Find the frequency closes to the target dot clock, using + * both 1X and 2X PLL inputs as possible candidates. + */ + calc_tcon_pll_integer(TCON_PLLREF, fout, &m, &n); + calc_tcon_pll_integer(TCON_PLLREF * 2, fout, &m2, &n2); + + fsingle = m ? (n * TCON_PLLREF) / m : 0; + fdouble = m2 ? (n2 * TCON_PLLREF * 2) / m2 : 0; + + if (fdouble > fsingle) { + dbl = true; + m = m2; + n = n2; + } + + /* Set desired parent frequency */ + *pll_freq = n * TCON_PLLREF; + *tcon_pll_div = m; + + /* Return the desired source clock */ + return (dbl ? CH0_CLK_SRC_SEL_PLL3_2X : + CH0_CLK_SRC_SEL_PLL3_1X); +} + +static int aw_lcdclk_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, int flags, int *stop) { struct aw_lcdclk_softc *sc; - uint32_t val, m, m2, n, n2, src_sel; - uint64_t fsingle, fdouble; - int error; - bool dbl; + uint64_t pll_freq; + uint32_t val, src_sel; + int error, tcon_pll_div; sc = clknode_get_softc(clk); @@ -329,26 +403,7 @@ aw_lcdclk_set_freq(struct clknode *clk, if (sc->id != CLK_IDX_CH1_SCLK2) return (ENXIO); - m = n = m2 = n2 = 0; - dbl = false; - - /* Find the frequency closes to the target dot clock, using - * both 1X and 2X PLL inputs as possible candidates. - */ - calc_tcon_pll(TCON_PLLREF, *fout, &m, &n); - calc_tcon_pll(TCON_PLLREF * 2, *fout, &m2, &n2); - - fsingle = m ? (n * TCON_PLLREF) / m : 0; - fdouble = m2 ? (n2 * TCON_PLLREF * 2) / m2 : 0; - - if (fdouble > fsingle) { - dbl = true; - m = m2; - n = n2; - } - - src_sel = dbl ? CH0_CLK_SRC_SEL_PLL3_2X : - CH0_CLK_SRC_SEL_PLL3_1X; + src_sel = calc_tcon_pll(fin, *fout, &pll_freq, &tcon_pll_div); /* Switch parent clock if necessary */ if (src_sel != clknode_get_parent_idx(clk)) { @@ -357,10 +412,8 @@ aw_lcdclk_set_freq(struct clknode *clk, return (error); } - /* Set desired parent frequency */ - fin = n * TCON_PLLREF; - - error = clknode_set_freq(clknode_get_parent(clk), fin, 0, 0); + error = clknode_set_freq(clknode_get_parent(clk), pll_freq, + 0, 0); if (error != 0) return (error); @@ -369,7 +422,7 @@ aw_lcdclk_set_freq(struct clknode *clk, return (error); /* Fetch new input frequency */ - error = clknode_get_freq(clknode_get_parent(clk), &fin); + error = clknode_get_freq(clknode_get_parent(clk), &pll_freq); if (error != 0) return (error); @@ -377,11 +430,11 @@ aw_lcdclk_set_freq(struct clknode *clk, DEVICE_LOCK(sc); LCDCLK_READ(sc, &val); val &= ~CH1_CLK_DIV_RATIO_M; - val |= ((m - 1) << CH1_CLK_DIV_RATIO_M_SHIFT); + val |= ((tcon_pll_div - 1) << CH1_CLK_DIV_RATIO_M_SHIFT); LCDCLK_WRITE(sc, val); DEVICE_UNLOCK(sc); - *fout = fin / m; + *fout = pll_freq / tcon_pll_div; *stop = 1; break; Modified: head/sys/arm/allwinner/clk/aw_pll.c ============================================================================== --- head/sys/arm/allwinner/clk/aw_pll.c Sat Nov 26 10:33:53 2016 (r309189) +++ head/sys/arm/allwinner/clk/aw_pll.c Sat Nov 26 10:36:48 2016 (r309190) @@ -482,11 +482,20 @@ a10_pll3_set_freq(struct aw_pll_sc *sc, { uint32_t val, m, mode, func; - m = *fout / A10_PLL3_REF_FREQ; - - mode = A10_PLL3_MODE_SEL_INT; - func = 0; - *fout = m * A10_PLL3_REF_FREQ; + if (*fout == 297000000) { + func = A10_PLL3_FUNC_SET_297MHZ; + mode = A10_PLL3_MODE_SEL_FRACT; + m = 0; + } else if (*fout == 270000000) { + func = A10_PLL3_FUNC_SET_270MHZ; + mode = A10_PLL3_MODE_SEL_FRACT; + m = 0; + } else { + mode = A10_PLL3_MODE_SEL_INT; + func = 0; + m = *fout / A10_PLL3_REF_FREQ; + *fout = m * A10_PLL3_REF_FREQ; + } DEVICE_LOCK(sc); PLL_READ(sc, &val); From owner-svn-src-head@freebsd.org Sat Nov 26 11:12:59 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 93110C5405D; Sat, 26 Nov 2016 11:12:59 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.blih.net", Issuer "mail.blih.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id AA96D955; Sat, 26 Nov 2016 11:12:58 +0000 (UTC) (envelope-from manu@bidouilliste.com) Received: from mail.blih.net (mail.blih.net [212.83.177.182]) by mail.blih.net (OpenSMTPD) with ESMTP id e36ca4a8; Sat, 26 Nov 2016 12:12:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=bidouilliste.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=mail; bh=kM/MtCIIEyKi tiBrZUcKIXh27Vk=; b=mRY2+kmGbROplX44wlKByum1bPZl9q508F1sKPLsTnZH WG2lmTOWfrFoiqRbdbLedKf2DfdcsgHe4qOrkJQFz1VY1nP3wyg4mRUwwC1m1Fqn 39CGajSVQNDHw+h6q9x44rdCCuupnKaSABqCvxGo8PmOmpfv81bS8XClURZHQ4k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=bidouilliste.com; h=date :from:to:subject:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=mail; b=in2utB iXUW92y3l7p/0J7ZmTWHvxW6Nlv7+mEJyVaahIlMvHCOXNrWrGGnZbQuctnmQIcz I9LXNeqZSttftBCnza2SJlcLvO2LMAPMVFO2jkykURZfjul75MgqoVCtHONvVP0t VYonnna14qV7tu28v+dWJwvDggLaf0SjQw+TU= Received: from knuckles.blih.net (ip-54.net-82-216-203.roubaix.rev.numericable.fr [82.216.203.54]) by mail.blih.net (OpenSMTPD) with ESMTPSA id 2cf6621a TLS version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO; Sat, 26 Nov 2016 12:12:49 +0100 (CET) Date: Sat, 26 Nov 2016 12:12:49 +0100 From: Emmanuel Vadot To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r309190 - head/sys/arm/allwinner/clk Message-Id: <20161126121249.de3b773a1da87c67458f61d2@bidouilliste.com> In-Reply-To: <201611261036.uAQAam0Z047291@repo.freebsd.org> References: <201611261036.uAQAam0Z047291@repo.freebsd.org> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.29; amd64-portbld-freebsd12.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 11:12:59 -0000 I should have added that this fix HDMI video output when booting in non-verbose. The PLL wasn't correctly calculated because of the non-usage of the fractional mode. The issue doesn't appears on verbose because the clock framework print out the clock value when created. To get the clock value it calls the recalc_freq method of the clock, which read directly the divisor and other factor from the register. As U-Boot leave the clock enable and setup, the clock framework will get the value set by U-Boot. When choosing the best video mode, we usually end up with the same choice as U-Boot (because both U-Boot and the driver use EDID to get the monitor capabilities), meaning we will get the same dotclock frequency. When setting the PLL to the dotclock frequency, the clock framework first compare the current and desired frequency, as they are the same the underlying methods for setting the clock weren't called. When booting in non-verbose mode, the current clock wasn't known so the methods were called but they wrongly calculated the best frequency for the dotclock. On Sat, 26 Nov 2016 10:36:48 +0000 (UTC) Emmanuel Vadot wrote: > Author: manu > Date: Sat Nov 26 10:36:48 2016 > New Revision: 309190 > URL: https://svnweb.freebsd.org/changeset/base/309190 > > Log: > PLL3 have a fractional mode where an explicit frequency (297Mhz or 270) > can be selected for it. If the desired frequency is one of those two, use > this mode instead of the integer one. > When calculating the PLL3 freq for the dotclock, check if it is a multiple > of the fracional frequencies. > > MFC after: 2 weeks > > Modified: > head/sys/arm/allwinner/clk/aw_lcdclk.c > head/sys/arm/allwinner/clk/aw_pll.c > > Modified: head/sys/arm/allwinner/clk/aw_lcdclk.c > ============================================================================== > --- head/sys/arm/allwinner/clk/aw_lcdclk.c Sat Nov 26 10:33:53 2016 (r309189) > +++ head/sys/arm/allwinner/clk/aw_lcdclk.c Sat Nov 26 10:36:48 2016 (r309190) > @@ -78,6 +78,8 @@ __FBSDID("$FreeBSD$"); > #define CH1_CLK_DIV_RATIO_M_SHIFT 0 > > #define TCON_PLLREF 3000000ULL > +#define TCON_PLLREF_FRAC1 297000000ULL > +#define TCON_PLLREF_FRAC2 270000000ULL > #define TCON_PLL_M_MIN 1 > #define TCON_PLL_M_MAX 15 > #define TCON_PLL_N_MIN 9 > @@ -290,7 +292,7 @@ aw_lcdclk_recalc_freq(struct clknode *cl > } > > static void > -calc_tcon_pll(uint64_t fin, uint64_t fout, uint32_t *pm, uint32_t *pn) > +calc_tcon_pll_integer(uint64_t fin, uint64_t fout, uint32_t *pm, uint32_t *pn) > { > int64_t diff, fcur, best; > int m, n; > @@ -310,14 +312,86 @@ calc_tcon_pll(uint64_t fin, uint64_t fou > } > > static int > +calc_tcon_pll_fractional(uint64_t fin, uint64_t fout, int *clk_div) > +{ > + int m; > + > + /* Test for 1X match */ > + for (m = TCON_PLL_M_MIN; m <= TCON_PLL_M_MAX; m++) { > + if (fout == (fin / m)) { > + *clk_div = m; > + return (CH0_CLK_SRC_SEL_PLL3_1X); > + } > + } > + > + /* Test for 2X match */ > + for (m = TCON_PLL_M_MIN; m <= TCON_PLL_M_MAX; m++) { > + if (fout == ((fin * 2) / m)) { > + *clk_div = m; > + return (CH0_CLK_SRC_SEL_PLL3_2X); > + } > + } > + > + return (-1); > +} > + > +static int > +calc_tcon_pll(uint64_t fin, uint64_t fout, uint64_t *pll_freq, int *tcon_pll_div) > +{ > + uint32_t m, m2, n, n2; > + uint64_t fsingle, fdouble; > + int src_sel; > + bool dbl; > + > + /* Test fractional freq first */ > + src_sel = calc_tcon_pll_fractional(TCON_PLLREF_FRAC1, fout, > + tcon_pll_div); > + if (src_sel != -1) { > + *pll_freq = TCON_PLLREF_FRAC1; > + return src_sel; > + } > + src_sel = calc_tcon_pll_fractional(TCON_PLLREF_FRAC2, fout, > + tcon_pll_div); > + if (src_sel != -1) { > + *pll_freq = TCON_PLLREF_FRAC2; > + return src_sel; > + } > + > + m = n = m2 = n2 = 0; > + dbl = false; > + > + /* Find the frequency closes to the target dot clock, using > + * both 1X and 2X PLL inputs as possible candidates. > + */ > + calc_tcon_pll_integer(TCON_PLLREF, fout, &m, &n); > + calc_tcon_pll_integer(TCON_PLLREF * 2, fout, &m2, &n2); > + > + fsingle = m ? (n * TCON_PLLREF) / m : 0; > + fdouble = m2 ? (n2 * TCON_PLLREF * 2) / m2 : 0; > + > + if (fdouble > fsingle) { > + dbl = true; > + m = m2; > + n = n2; > + } > + > + /* Set desired parent frequency */ > + *pll_freq = n * TCON_PLLREF; > + *tcon_pll_div = m; > + > + /* Return the desired source clock */ > + return (dbl ? CH0_CLK_SRC_SEL_PLL3_2X : > + CH0_CLK_SRC_SEL_PLL3_1X); > +} > + > +static int > aw_lcdclk_set_freq(struct clknode *clk, uint64_t fin, uint64_t *fout, > int flags, int *stop) > { > struct aw_lcdclk_softc *sc; > - uint32_t val, m, m2, n, n2, src_sel; > - uint64_t fsingle, fdouble; > - int error; > - bool dbl; > + uint64_t pll_freq; > + uint32_t val, src_sel; > + int error, tcon_pll_div; > > sc = clknode_get_softc(clk); > > @@ -329,26 +403,7 @@ aw_lcdclk_set_freq(struct clknode *clk, > if (sc->id != CLK_IDX_CH1_SCLK2) > return (ENXIO); > > - m = n = m2 = n2 = 0; > - dbl = false; > - > - /* Find the frequency closes to the target dot clock, using > - * both 1X and 2X PLL inputs as possible candidates. > - */ > - calc_tcon_pll(TCON_PLLREF, *fout, &m, &n); > - calc_tcon_pll(TCON_PLLREF * 2, *fout, &m2, &n2); > - > - fsingle = m ? (n * TCON_PLLREF) / m : 0; > - fdouble = m2 ? (n2 * TCON_PLLREF * 2) / m2 : 0; > - > - if (fdouble > fsingle) { > - dbl = true; > - m = m2; > - n = n2; > - } > - > - src_sel = dbl ? CH0_CLK_SRC_SEL_PLL3_2X : > - CH0_CLK_SRC_SEL_PLL3_1X; > + src_sel = calc_tcon_pll(fin, *fout, &pll_freq, &tcon_pll_div); > > /* Switch parent clock if necessary */ > if (src_sel != clknode_get_parent_idx(clk)) { > @@ -357,10 +412,8 @@ aw_lcdclk_set_freq(struct clknode *clk, > return (error); > } > > - /* Set desired parent frequency */ > - fin = n * TCON_PLLREF; > - > - error = clknode_set_freq(clknode_get_parent(clk), fin, 0, 0); > + error = clknode_set_freq(clknode_get_parent(clk), pll_freq, > + 0, 0); > if (error != 0) > return (error); > > @@ -369,7 +422,7 @@ aw_lcdclk_set_freq(struct clknode *clk, > return (error); > > /* Fetch new input frequency */ > - error = clknode_get_freq(clknode_get_parent(clk), &fin); > + error = clknode_get_freq(clknode_get_parent(clk), &pll_freq); > if (error != 0) > return (error); > > @@ -377,11 +430,11 @@ aw_lcdclk_set_freq(struct clknode *clk, > DEVICE_LOCK(sc); > LCDCLK_READ(sc, &val); > val &= ~CH1_CLK_DIV_RATIO_M; > - val |= ((m - 1) << CH1_CLK_DIV_RATIO_M_SHIFT); > + val |= ((tcon_pll_div - 1) << CH1_CLK_DIV_RATIO_M_SHIFT); > LCDCLK_WRITE(sc, val); > DEVICE_UNLOCK(sc); > > - *fout = fin / m; > + *fout = pll_freq / tcon_pll_div; > *stop = 1; > > break; > > Modified: head/sys/arm/allwinner/clk/aw_pll.c > ============================================================================== > --- head/sys/arm/allwinner/clk/aw_pll.c Sat Nov 26 10:33:53 2016 (r309189) > +++ head/sys/arm/allwinner/clk/aw_pll.c Sat Nov 26 10:36:48 2016 (r309190) > @@ -482,11 +482,20 @@ a10_pll3_set_freq(struct aw_pll_sc *sc, > { > uint32_t val, m, mode, func; > > - m = *fout / A10_PLL3_REF_FREQ; > - > - mode = A10_PLL3_MODE_SEL_INT; > - func = 0; > - *fout = m * A10_PLL3_REF_FREQ; > + if (*fout == 297000000) { > + func = A10_PLL3_FUNC_SET_297MHZ; > + mode = A10_PLL3_MODE_SEL_FRACT; > + m = 0; > + } else if (*fout == 270000000) { > + func = A10_PLL3_FUNC_SET_270MHZ; > + mode = A10_PLL3_MODE_SEL_FRACT; > + m = 0; > + } else { > + mode = A10_PLL3_MODE_SEL_INT; > + func = 0; > + m = *fout / A10_PLL3_REF_FREQ; > + *fout = m * A10_PLL3_REF_FREQ; > + } > > DEVICE_LOCK(sc); > PLL_READ(sc, &val); -- Emmanuel Vadot From owner-svn-src-head@freebsd.org Sat Nov 26 12:36:13 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 156D6C5574E; Sat, 26 Nov 2016 12:36:13 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D8F9FC61; Sat, 26 Nov 2016 12:36:12 +0000 (UTC) (envelope-from rakuco@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQCaCYM097611; Sat, 26 Nov 2016 12:36:12 GMT (envelope-from rakuco@FreeBSD.org) Received: (from rakuco@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQCaCd7097610; Sat, 26 Nov 2016 12:36:12 GMT (envelope-from rakuco@FreeBSD.org) Message-Id: <201611261236.uAQCaCd7097610@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rakuco set sender to rakuco@FreeBSD.org using -f From: Raphael Kubo da Costa Date: Sat, 26 Nov 2016 12:36:12 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309191 - head/usr.bin/dtc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 12:36:13 -0000 Author: rakuco (ports committer) Date: Sat Nov 26 12:36:11 2016 New Revision: 309191 URL: https://svnweb.freebsd.org/changeset/base/309191 Log: fdt: Expect strchr() to return a const char* In C, strchr(3) returns a char*, whereas C++ defines two overloads: * const char *strchr(const char*, int) * char *strchr(char*, int) Building fdt.cc (with the WITHOUT_GPL_DTC knob set) with libc++ 3.9.0 (imported in r309124) was failing because libc++ r260377 added the first overload to string.h, leading to failures such as: fdt.cc:1638:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' Just define val as a const char* to fix it. Upstreamed in https://github.com/davidchisnall/dtc/pull/14 Reviewed by: emaste Approved by: emaste Modified: head/usr.bin/dtc/fdt.cc Modified: head/usr.bin/dtc/fdt.cc ============================================================================== --- head/usr.bin/dtc/fdt.cc Sat Nov 26 10:36:48 2016 (r309190) +++ head/usr.bin/dtc/fdt.cc Sat Nov 26 12:36:11 2016 (r309191) @@ -1635,7 +1635,7 @@ device_tree::parse_dts(const string &fn, bool device_tree::parse_define(const char *def) { - char *val = strchr(def, '='); + const char *val = strchr(def, '='); if (!val) { if (strlen(def) != 0) From owner-svn-src-head@freebsd.org Sat Nov 26 13:26:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98A62C56AF1; Sat, 26 Nov 2016 13:26:30 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 68217C3D; Sat, 26 Nov 2016 13:26:30 +0000 (UTC) (envelope-from sevan@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQDQToT018040; Sat, 26 Nov 2016 13:26:29 GMT (envelope-from sevan@FreeBSD.org) Received: (from sevan@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQDQTbw018039; Sat, 26 Nov 2016 13:26:29 GMT (envelope-from sevan@FreeBSD.org) Message-Id: <201611261326.uAQDQTbw018039@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: sevan set sender to sevan@FreeBSD.org using -f From: Sevan Janiyan Date: Sat, 26 Nov 2016 13:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309192 - head/usr.sbin/makefs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 13:26:30 -0000 Author: sevan (doc committer) Date: Sat Nov 26 13:26:29 2016 New Revision: 309192 URL: https://svnweb.freebsd.org/changeset/base/309192 Log: Fix null dereference when running out of nodes during rename. PR: 212370 Submitted by: Sascha Wildner Reviewed by: bcr (mentor) Approved by: bapt Obtained from: NetBSD MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8643 Modified: head/usr.sbin/makefs/cd9660.c Modified: head/usr.sbin/makefs/cd9660.c ============================================================================== --- head/usr.sbin/makefs/cd9660.c Sat Nov 26 12:36:11 2016 (r309191) +++ head/usr.sbin/makefs/cd9660.c Sat Nov 26 13:26:29 2016 (r309192) @@ -1070,7 +1070,7 @@ cd9660_rename_filename(cd9660node *iter, tmp = malloc(ISO_FILENAME_MAXLENGTH_WITH_PADDING); - while (i < num) { + while (i < num && iter) { powers = 1; count = 0; digits = 1; From owner-svn-src-head@freebsd.org Sat Nov 26 15:50:01 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 31F8FC5576E; Sat, 26 Nov 2016 15:50:01 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0181C179; Sat, 26 Nov 2016 15:50:00 +0000 (UTC) (envelope-from bapt@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQFo0nG074017; Sat, 26 Nov 2016 15:50:00 GMT (envelope-from bapt@FreeBSD.org) Received: (from bapt@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQFo0HC074016; Sat, 26 Nov 2016 15:50:00 GMT (envelope-from bapt@FreeBSD.org) Message-Id: <201611261550.uAQFo0HC074016@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: bapt set sender to bapt@FreeBSD.org using -f From: Baptiste Daroussin Date: Sat, 26 Nov 2016 15:50:00 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309194 - head/usr.sbin/syslogd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 15:50:01 -0000 Author: bapt Date: Sat Nov 26 15:49:59 2016 New Revision: 309194 URL: https://svnweb.freebsd.org/changeset/base/309194 Log: initialize *nextp which could be left uninitialized in case the configuration file cannot be open/read Reported by: Coverity via cem MFC after: 2 days CID: 1365665 Modified: head/usr.sbin/syslogd/syslogd.c Modified: head/usr.sbin/syslogd/syslogd.c ============================================================================== --- head/usr.sbin/syslogd/syslogd.c Sat Nov 26 15:01:35 2016 (r309193) +++ head/usr.sbin/syslogd/syslogd.c Sat Nov 26 15:49:59 2016 (r309194) @@ -1835,6 +1835,7 @@ init(int signo) free((char *)f); } Files = NULL; + *nextp = NULL; /* open the configuration file */ if ((cf = fopen(ConfFile, "r")) == NULL) { From owner-svn-src-head@freebsd.org Sat Nov 26 16:58:18 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C3A0AC57179; Sat, 26 Nov 2016 16:58:18 +0000 (UTC) (envelope-from fabien.thomas@stormshield.eu) Received: from work.stormshield.eu (gwlille.netasq.com [91.212.116.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E2C5FEEA; Sat, 26 Nov 2016 16:58:16 +0000 (UTC) (envelope-from fabien.thomas@stormshield.eu) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTPS id 0AECC37611B4; Sat, 26 Nov 2016 17:50:55 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id F13F737610C6; Sat, 26 Nov 2016 17:50:54 +0100 (CET) Received: from work.stormshield.eu ([127.0.0.1]) by localhost (work.stormshield.eu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id CyN3SIW_ZdsU; Sat, 26 Nov 2016 17:50:54 +0100 (CET) Received: from work.stormshield.eu (localhost [127.0.0.1]) by work.stormshield.eu (Postfix) with ESMTP id DC3B43760F31; Sat, 26 Nov 2016 17:50:54 +0100 (CET) From: Fabien THOMAS MIME-Version: 1.0 Subject: Re: svn commit: r309144 - in head: lib/libipsec sys/net sys/netipsec Message-Id: <528A24DF-BB88-45FA-926F-EE2DE9965C47@stormshield.eu> Date: Sat, 26 Nov 2016 17:50:54 +0100 (CET) References: <201611251444.uAPEinKb066023@repo.freebsd.org> <8660nbfddx.fsf@FreeBSD.org> To: Raphael Kubo da Costa In-Reply-To: <8660nbfddx.fsf@FreeBSD.org> Cc: Fabien Thomas , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: base64 Content-Type: text/plain; charset=utf-8 Thread-Topic: svn commit: r309144 - in head: lib/libipsec sys/net sys/netipsec Thread-Index: YmbjepoKFot9J+q+1AKMMr7VSPqUfw== X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 16:58:18 -0000 SGksDQoNClNvcnJ5IGFib3V0IHRoYXQuIE5vcm1hbGx5IHdlIGJ1aWxkIHVuaXZlcnNlIHdpdGgg aXQgYnV0IGl0IHNlZW1zIHdlIG1pc3NlZCBzb21ldGhpbmcuLi4NCkkndmUgbm90IGFjY2VzcyB0 byBhIG1hY2hpbmUgdG8gZml4aXQgYmVmb3JlIG1vbmRheS4uLg0KDQpGYWJpZW4NCg0KPiBMZSAy NSBub3YuIDIwMTYgw6AgMjI6MzIsIFJhcGhhZWwgS3VibyBkYSBDb3N0YSA8cmFrdWNvQEZyZWVC U0Qub3JnPiBhIMOpY3JpdCA6DQo+IA0KPiBGYWJpZW4gVGhvbWFzIDxmYWJpZW50QEZyZWVCU0Qu b3JnPiB3cml0ZXM6DQo+IA0KPj4gQXV0aG9yOiBmYWJpZW50DQo+PiBEYXRlOiBGcmkgTm92IDI1 IDE0OjQ0OjQ5IDIwMTYNCj4+IE5ldyBSZXZpc2lvbjogMzA5MTQ0DQo+PiBVUkw6IGh0dHBzOi8v c3Zud2ViLmZyZWVic2Qub3JnL2NoYW5nZXNldC9iYXNlLzMwOTE0NA0KPj4gDQo+PiBMb2c6DQo+ PiAgSVBzZWMgUkZDNjQ3OSBzdXBwb3J0IGZvciByZXBsYXkgd2luZG93IHNpemVzIHVwIHRvIDJe MzIgLSAzMiBwYWNrZXRzLg0KPj4gDQo+PiAgU2luY2UgdGhlIHByZXZpb3VzIGFsZ29yaXRobSwg YmFzZWQgb24gYml0IHNoaWZ0aW5nLCBkb2VzIG5vdCBzY2FsZQ0KPj4gIHdpdGggbGFyZ2UgcmVw bGF5IHdpbmRvd3MsIHRoZSBhbGdvcml0aG0gdXNlZCBoZXJlIGlzIGJhc2VkIG9uDQo+PiAgUkZD IDY0Nzk6IElQc2VjIEFudGktUmVwbGF5IEFsZ29yaXRobSB3aXRob3V0IEJpdCBTaGlmdGluZy4N Cj4+ICBUaGUgcmVwbGF5IHdpbmRvdyB3aWxsIGJlIGZhc3QgdG8gYmUgdXBkYXRlZCwgYnV0IHdp bGwgY29zdCBhcyBtYW55IGJpdHMNCj4+ICBpbiBSQU0gYXMgaXRzIHNpemUuDQo+PiANCj4+ICBU aGUgcHJldmlvdXMgaW1wbGVtZW50YXRpb24gZGlkIG5vdCBwcm92aWRlIGEgbG9jayBvbiB0aGUg cmVwbGF5IHdpbmRvdywNCj4+ICB3aGljaCBtYXkgbGVhZCB0byByZXBsYXkgaXNzdWVzLg0KPiAN Cj4gVGhpcyBicm9rZSB0aGUgYnVpbGQgaGVyZToNCj4gDQo+IEluIGZpbGUgaW5jbHVkZWQgZnJv bSAvdXNyL3NyYy9zeXMvbmV0aXBzZWMva2V5X2RlYnVnLmM6NTQ6DQo+IEluIGZpbGUgaW5jbHVk ZWQgZnJvbSAvdXNyL3NyYy9zeXMvbmV0aXBzZWMvaXBzZWMuaDo0NjoNCj4gSW4gZmlsZSBpbmNs dWRlZCBmcm9tIC91c3Ivc3JjL3N5cy9uZXRpcHNlYy9rZXlkYi5oOjM4Og0KPiAvdXNyL3NyYy9z eXMvc3lzL211dGV4Lmg6MzY3OjI6IGVycm9yOiBMT0NLX0RFQlVHIG5vdCBkZWZpbmVkLCBpbmNs dWRlIDxzeXMvbG9jay5oPiBiZWZvcmUgPHN5cy9tdXRleC5oPg0KPiAjZXJyb3IgTE9DS19ERUJV RyBub3QgZGVmaW5lZCwgaW5jbHVkZSA8c3lzL2xvY2suaD4gYmVmb3JlIDxzeXMvbXV0ZXguaD4N Cg== From owner-svn-src-head@freebsd.org Sat Nov 26 17:55:47 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B2213C578A5; Sat, 26 Nov 2016 17:55:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 81C4564F; Sat, 26 Nov 2016 17:55:47 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQHtk2l027693; Sat, 26 Nov 2016 17:55:46 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQHtkDH027691; Sat, 26 Nov 2016 17:55:46 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201611261755.uAQHtkDH027691@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sat, 26 Nov 2016 17:55:46 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309195 - head/sys/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-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 17:55:47 -0000 Author: ian Date: Sat Nov 26 17:55:46 2016 New Revision: 309195 URL: https://svnweb.freebsd.org/changeset/base/309195 Log: Add an ethernet0 alias pointing to the /aix/usb/hub/ethernet node. This is required for u-boot to locate the ethernet node when it's doing fixup of the mac-address property when the user has overridden the default addr. Modified: head/sys/boot/fdt/dts/arm/rpi.dts head/sys/boot/fdt/dts/arm/rpi2.dts Modified: head/sys/boot/fdt/dts/arm/rpi.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi.dts Sat Nov 26 15:49:59 2016 (r309194) +++ head/sys/boot/fdt/dts/arm/rpi.dts Sat Nov 26 17:55:46 2016 (r309195) @@ -298,7 +298,7 @@ reg = <0x00000001>; #address-cells = <1>; #size-cells = <0>; - ethernet { + ethernet: ethernet { compatible = "net,ethernet", "usb,device"; reg = <0x00000001>; @@ -386,6 +386,7 @@ aliases { uart0 = &uart0; + ethernet0 = ðernet; }; chosen { Modified: head/sys/boot/fdt/dts/arm/rpi2.dts ============================================================================== --- head/sys/boot/fdt/dts/arm/rpi2.dts Sat Nov 26 15:49:59 2016 (r309194) +++ head/sys/boot/fdt/dts/arm/rpi2.dts Sat Nov 26 17:55:46 2016 (r309195) @@ -315,7 +315,7 @@ reg = <0x00000001>; #address-cells = <1>; #size-cells = <0>; - ethernet { + ethernet: ethernet { compatible = "net,ethernet", "usb,device"; reg = <0x00000001>; @@ -397,6 +397,7 @@ aliases { uart0 = &uart0; + ethernet0 = ðernet; }; chosen { From owner-svn-src-head@freebsd.org Sat Nov 26 18:07:35 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 78CC9C57BFA; Sat, 26 Nov 2016 18:07:35 +0000 (UTC) (envelope-from kubito@gmail.com) Received: from mail-wj0-x243.google.com (mail-wj0-x243.google.com [IPv6:2a00:1450:400c:c01::243]) (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 1D8C2CFE; Sat, 26 Nov 2016 18:07:35 +0000 (UTC) (envelope-from kubito@gmail.com) Received: by mail-wj0-x243.google.com with SMTP id kp2so9123205wjc.0; Sat, 26 Nov 2016 10:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version; bh=ziuchNryXQ3wsfWjFcHd9RXYpgyv0ZFgRkOte/YIxRk=; b=J21rQBC7Td/dcf/5h2Ezu1li3LszLAeD50hnwTV7Bf5UGnoE4bFsxd6V5gW+/fp18x qp7lSL+nYp34WCZBztQ62+4pIQ9XyI0DDs3w1ZF1cCtAdsdFS2bIASQV0z+VjlwPiEQ/ zvsJuiet/JttAoaqBlwnsxYNNfXCdnIQruUKIUmwo4gUViio42rfG4c6ODEnRZf/tvwa 8Sw66rSUi5aCC4IZ5YN+bullSUkyZ/dpVT0KxkuOHDuRWhMDA3op7yyFqA/or9e9wyDi O7rvtq/RGiGdmCJB9rqo6OkRJn62s1Yn2x20EiAmfsXki830EpmVfvYnLbfWHaCLgxda 9rWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:references:date :in-reply-to:message-id:user-agent:mime-version; bh=ziuchNryXQ3wsfWjFcHd9RXYpgyv0ZFgRkOte/YIxRk=; b=ezPSQcbYqCMr53t4ymlw53wTrFAZGt8jhbhZdd7uSOnkqlpMMZ/znl9Z2HA811gvk4 qg6WzepFC1bK+J8NeSR9z9tCNitn6BRnXR4RP3CpVEa82fhd4evI+kpjRyFdiUsvTMGc mWtm176ttrOtXe3WlTKoGhpQhXEYTcpw+QbCvrTdvzD4X1tcUzbRwqTMjfIJkAy26gpb eCjt/PVK5NOC1GpczQg/yDpO3P/MWQsUkUqnSbWpz8u+6B5FnwhdHZni+WiamSi7OBmO z+hqRLE+p+P00hj0FSV+ZHiMLaXZPKk9d+kM3s0oREVFuedE43lQc/4U3fOsOCKRREJB DX2A== X-Gm-Message-State: AKaTC02s1vzNk1NodSNPwijroK8WRBqQ60UNQgQs0wiAMyJGj5eLzAmL3+BqnCuLyBO6Xg== X-Received: by 10.194.115.226 with SMTP id jr2mr12024830wjb.75.1480183653289; Sat, 26 Nov 2016 10:07:33 -0800 (PST) Received: from orwell.gmail.com (dhcp-077-248-147-050.chello.nl. [77.248.147.50]) by smtp.gmail.com with ESMTPSA id r138sm19708522wme.9.2016.11.26.10.07.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 26 Nov 2016 10:07:32 -0800 (PST) Sender: Raphael Kubo da Costa From: Raphael Kubo da Costa To: Fabien THOMAS Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org, Fabien Thomas Subject: Re: svn commit: r309144 - in head: lib/libipsec sys/net sys/netipsec References: <201611251444.uAPEinKb066023@repo.freebsd.org> <8660nbfddx.fsf@FreeBSD.org> <528A24DF-BB88-45FA-926F-EE2DE9965C47__46659.0864853517$1480179504$gmane$org@stormshield.eu> Date: Sat, 26 Nov 2016 19:07:01 +0100 In-Reply-To: <528A24DF-BB88-45FA-926F-EE2DE9965C47__46659.0864853517$1480179504$gmane$org@stormshield.eu> (Fabien THOMAS's message of "Sat, 26 Nov 2016 17:50:54 +0100 (CET)") Message-ID: <86shqedsje.fsf@FreeBSD.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2.50 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 18:07:35 -0000 Fabien THOMAS writes: > Hi, > > Sorry about that. Normally we build universe with it but it seems we missed something... > I've not access to a machine to fixit before monday... Don't worry, emaste fixed it in r309174 :-) From owner-svn-src-head@freebsd.org Sat Nov 26 20:26:30 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B9839C57D78; Sat, 26 Nov 2016 20:26:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8901DCE3; Sat, 26 Nov 2016 20:26:30 +0000 (UTC) (envelope-from avos@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQKQTgk087366; Sat, 26 Nov 2016 20:26:29 GMT (envelope-from avos@FreeBSD.org) Received: (from avos@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQKQTjO087365; Sat, 26 Nov 2016 20:26:29 GMT (envelope-from avos@FreeBSD.org) Message-Id: <201611262026.uAQKQTjO087365@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: avos set sender to avos@FreeBSD.org using -f From: Andriy Voskoboinyk Date: Sat, 26 Nov 2016 20:26:29 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309196 - head/sys/dev/usb/wlan X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 20:26:30 -0000 Author: avos Date: Sat Nov 26 20:26:29 2016 New Revision: 309196 URL: https://svnweb.freebsd.org/changeset/base/309196 Log: rsu: fix R92S_TXDW1_QSEL_H2C definition (0x1f -> 0x13). Without this fix firmware ignores all but first 32 commands (= almost everything (except plain Tx / Rx) stops working). Tested with ASUS USB-N10. Modified: head/sys/dev/usb/wlan/if_rsureg.h Modified: head/sys/dev/usb/wlan/if_rsureg.h ============================================================================== --- head/sys/dev/usb/wlan/if_rsureg.h Sat Nov 26 17:55:46 2016 (r309195) +++ head/sys/dev/usb/wlan/if_rsureg.h Sat Nov 26 20:26:29 2016 (r309196) @@ -573,7 +573,7 @@ struct r92s_tx_desc { #define R92S_TXDW1_QSEL_M 0x00001f00 #define R92S_TXDW1_QSEL_S 8 #define R92S_TXDW1_QSEL_BE 0x03 -#define R92S_TXDW1_QSEL_H2C 0x1f +#define R92S_TXDW1_QSEL_H2C 0x13 #define R92S_TXDW1_NONQOS 0x00010000 #define R92S_TXDW1_KEYIDX_M 0x00060000 #define R92S_TXDW1_KEYIDX_S 17 From owner-svn-src-head@freebsd.org Sat Nov 26 20:47:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9DFA8C5759D; Sat, 26 Nov 2016 20:47:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6CB2D8DA; Sat, 26 Nov 2016 20:47:12 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQKlBNl095404; Sat, 26 Nov 2016 20:47:11 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQKlBb1095403; Sat, 26 Nov 2016 20:47:11 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201611262047.uAQKlBb1095403@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 26 Nov 2016 20:47:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309197 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 20:47:12 -0000 Author: rmacklem Date: Sat Nov 26 20:47:11 2016 New Revision: 309197 URL: https://svnweb.freebsd.org/changeset/base/309197 Log: Add a -E flag to nfsstat.c so that it prints out the NFSv4.1 procedure/operation counts. It also avoids clipping the counts at 9 digits. Reviewed by: bcr (doc parts) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8626 Modified: head/usr.bin/nfsstat/nfsstat.c Modified: head/usr.bin/nfsstat/nfsstat.c ============================================================================== --- head/usr.bin/nfsstat/nfsstat.c Sat Nov 26 20:26:29 2016 (r309196) +++ head/usr.bin/nfsstat/nfsstat.c Sat Nov 26 20:47:11 2016 (r309197) @@ -113,6 +113,7 @@ static void usage(void); static char *sperc1(int, int); static char *sperc2(int, int); static void exp_intpr(int, int); +static void exp41_intpr(int, int); static void exp_sidewaysintpr(u_int, int, int, int); static void compute_new_stats(struct nfsstatsv1 *cur_stats, struct nfsstatsv1 *prev_stats, int curop, long double etime, @@ -155,7 +156,7 @@ main(int argc, char **argv) interval = 0; memf = nlistf = NULL; - while ((ch = getopt(argc, argv, "cdesWM:mN:w:z")) != -1) + while ((ch = getopt(argc, argv, "cdEesWM:mN:w:z")) != -1) switch(ch) { case 'M': memf = optarg; @@ -208,7 +209,14 @@ main(int argc, char **argv) case 'z': zflag = 1; break; + case 'E': + if (extra_output != 0) + errx(1, "-e and -E are mutually exclusive"); + extra_output = 2; + break; case 'e': + if (extra_output != 0) + errx(1, "-e and -E are mutually exclusive"); extra_output = 1; break; case '?': @@ -236,7 +244,9 @@ main(int argc, char **argv) exp_sidewaysintpr(interval, clientOnly, serverOnly, newStats); } else { - if (extra_output != 0) + if (extra_output == 2) + exp41_intpr(clientOnly, serverOnly); + else if (extra_output == 1) exp_intpr(clientOnly, serverOnly); else intpr(clientOnly, serverOnly); @@ -795,6 +805,362 @@ exp_intpr(int clientOnly, int serverOnly } } +/* + * Print a description of the nfs stats for the client/server, + * including NFSv4.1. + */ +static void +exp41_intpr(int clientOnly, int serverOnly) +{ + int nfssvc_flag; + + nfssvc_flag = NFSSVC_GETSTATS | NFSSVC_NEWSTRUCT; + if (zflag != 0) { + if (clientOnly != 0) + nfssvc_flag |= NFSSVC_ZEROCLTSTATS; + if (serverOnly != 0) + nfssvc_flag |= NFSSVC_ZEROSRVSTATS; + } + ext_nfsstats.vers = NFSSTATS_V1; + if (nfssvc(nfssvc_flag, &ext_nfsstats) < 0) + err(1, "Can't get stats"); + if (clientOnly != 0) { + if (printtitle) { + printf("Client Info:\n"); + printf("RPC Counts:\n"); + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Getattr", "Setattr", "Lookup", "Readlink", "Read", + "Write"); + } + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETATTR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOOKUP], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READLINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READ], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_WRITE]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Create", "Remove", "Rename", "Link", "Symlink", + "Mkdir"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_REMOVE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RENAME], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SYMLINK], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKDIR]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Rmdir", "Readdir", "RdirPlus", "Access", "Mknod", + "Fsstat"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RMDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDIR], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDIRPLUS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_ACCESS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_MKNOD], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FSSTAT]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Fsinfo", "PathConf", "Commit", "SetClId", + "SetClIdCf", "Lock"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FSINFO], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_PATHCONF], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMIT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETCLIENTID], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETCLIENTIDCFRM], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOCK]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "LockT", "LockU", "Open", "OpenCfr", "OpenDownGr", + "Close"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOCKT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LOCKU], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPEN], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENCONFIRM], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_OPENDOWNGRADE], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CLOSE]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "RelLckOwn", "FreeStateID", "PutRootFH", "DelegRet", + "GetACL", "SetACL"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RELEASELCKOWN], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_FREESTATEID], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_PUTROOTFH], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_DELEGRETURN], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETACL], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_SETACL]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "ExchangeID", "CreateSess", "DestroySess", + "DestroyClId", "LayoutGet", "GetDevInfo"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_EXCHANGEID], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_CREATESESSION], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_DESTROYSESSION], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_DESTROYCLIENT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LAYOUTGET], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_GETDEVICEINFO]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "LayoutCommit", "LayoutReturn", "ReclaimCompl", + "ReadDataS", "WriteDataS", "CommitDataS"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LAYOUTCOMMIT], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_LAYOUTRETURN], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_RECLAIMCOMPL], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_READDS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_WRITEDS], + (uintmax_t)ext_nfsstats.rpccnt[NFSPROC_COMMITDS]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "OpenOwner", "Opens", "LockOwner", "Locks", + "Delegs", "LocalOwn"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.clopenowners, + (uintmax_t)ext_nfsstats.clopens, + (uintmax_t)ext_nfsstats.cllockowners, + (uintmax_t)ext_nfsstats.cllocks, + (uintmax_t)ext_nfsstats.cldelegates, + (uintmax_t)ext_nfsstats.cllocalopenowners); + if (printtitle) + printf("%12.12s %12.12s %12.12s\n", + "LocalOpen", "LocalLOwn", "LocalLock"); + printf("%12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.cllocalopens, + (uintmax_t)ext_nfsstats.cllocallockowners, + (uintmax_t)ext_nfsstats.cllocallocks); + if (printtitle) { + printf("Rpc Info:\n"); + printf("%12.12s %12.12s %12.12s %12.12s %12.12s\n", + "TimedOut", "Invalid", "X Replies", "Retries", + "Requests"); + } + printf("%12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.rpctimeouts, + (uintmax_t)ext_nfsstats.rpcinvalid, + (uintmax_t)ext_nfsstats.rpcunexpected, + (uintmax_t)ext_nfsstats.rpcretries, + (uintmax_t)ext_nfsstats.rpcrequests); + if (printtitle) { + printf("Cache Info:\n"); + printf("%12.12s %12.12s %12.12s %12.12s\n", + "Attr Hits", "Misses", "Lkup Hits", "Misses"); + } + printf("%12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.attrcache_hits, + (uintmax_t)ext_nfsstats.attrcache_misses, + (uintmax_t)ext_nfsstats.lookupcache_hits, + (uintmax_t)ext_nfsstats.lookupcache_misses); + if (printtitle) + printf("%12.12s %12.12s %12.12s %12.12s\n", + "BioR Hits", "Misses", "BioW Hits", "Misses"); + printf("%12ju %12ju %12ju %12ju\n", + (uintmax_t)(ext_nfsstats.biocache_reads - + ext_nfsstats.read_bios), + (uintmax_t)ext_nfsstats.read_bios, + (uintmax_t)(ext_nfsstats.biocache_writes - + ext_nfsstats.write_bios), + (uintmax_t)ext_nfsstats.write_bios); + if (printtitle) + printf("%12.12s %12.12s %12.12s %12.12s\n", + "BioRLHits", "Misses", "BioD Hits", "Misses"); + printf("%12ju %12ju %12ju %12ju\n", + (uintmax_t)(ext_nfsstats.biocache_readlinks - + ext_nfsstats.readlink_bios), + (uintmax_t)ext_nfsstats.readlink_bios, + (uintmax_t)(ext_nfsstats.biocache_readdirs - + ext_nfsstats.readdir_bios), + (uintmax_t)ext_nfsstats.readdir_bios); + if (printtitle) + printf("%12.12s %12.12s\n", "DirE Hits", "Misses"); + printf("%12ju %12ju\n", + (uintmax_t)ext_nfsstats.direofcache_hits, + (uintmax_t)ext_nfsstats.direofcache_misses); + } + if (serverOnly != 0) { + if (printtitle) { + printf("\nServer Info:\n"); + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Getattr", "Setattr", "Lookup", "Readlink", + "Read", "Write"); + } + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUP], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READLINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READ], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_WRITE]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Create", "Remove", "Rename", "Link", "Symlink", + "Mkdir"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_V3CREATE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_REMOVE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RENAME], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SYMLINK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_MKDIR]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Rmdir", "Readdir", "RdirPlus", "Access", "Mknod", + "Fsstat"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RMDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READDIR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_READDIRPLUS], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_ACCESS], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_MKNOD], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FSSTAT]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Fsinfo", "PathConf", "Commit", "LookupP", + "SetClId", "SetClIdCf"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FSINFO], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PATHCONF], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_COMMIT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOOKUPP], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETCLIENTID], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETCLIENTIDCFRM]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Open", "OpenAttr", "OpenDwnGr", "OpenCfrm", + "DelePurge", "DeleRet"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPEN], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPENATTR], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPENDOWNGRADE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_OPENCONFIRM], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_DELEGPURGE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_DELEGRETURN]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "GetFH", "Lock", "LockT", "LockU", "Close", + "Verify"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOCK], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOCKT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LOCKU], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_CLOSE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_VERIFY]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "NVerify", "PutFH", "PutPubFH", "PutRootFH", + "Renew", "RestoreFH"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_NVERIFY], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PUTFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PUTPUBFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_PUTROOTFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RENEW], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RESTOREFH]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "SaveFH", "Secinfo", "RelLckOwn", "V4Create", + "BackChannelCtrl", "BindConnToSess"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SAVEFH], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SECINFO], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RELEASELCKOWN], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_CREATE], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_BACKCHANNELCTL], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_BINDCONNTOSESS]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "ExchangeID", "CreateSess", "DestroySess", + "FreeStateID", "GetDirDeleg", "GetDevInfo"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_EXCHANGEID], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_CREATESESSION], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_DESTROYSESSION], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_FREESTATEID], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETDIRDELEG], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETDEVINFO]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "GetDevList", "LayoutCommit", "LayoutGet", + "LayoutReturn", "SecInfNoName", "Sequence"); + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_GETDEVLIST], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LAYOUTCOMMIT], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LAYOUTGET], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_LAYOUTRETURN], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SECINFONONAME], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SEQUENCE]); + if (printtitle) + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s\n", + "SetSSV", "TestStateID", "WantDeleg", + "DestroyClID", "ReclaimCompl"); + printf("%12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_SETSSV], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_TESTSTATEID], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_WANTDELEG], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_DESTROYCLIENTID], + (uintmax_t)ext_nfsstats.srvrpccnt[NFSV4OP_RECLAIMCOMPL]); + if (printtitle) { + printf("Server:\n"); + printf("%12.12s %12.12s %12.12s\n", + "Retfailed", "Faults", "Clients"); + } + printf("%12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srv_errs, + (uintmax_t)ext_nfsstats.srvrpc_errs, + (uintmax_t)ext_nfsstats.srvclients); + if (printtitle) + printf("%12.12s %12.12s %12.12s %12.12s %12.12s\n", + "OpenOwner", "Opens", "LockOwner", + "Locks", "Delegs"); + printf("%12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvopenowners, + (uintmax_t)ext_nfsstats.srvopens, + (uintmax_t)ext_nfsstats.srvlockowners, + (uintmax_t)ext_nfsstats.srvlocks, + (uintmax_t)ext_nfsstats.srvdelegates); + if (printtitle) { + printf("Server Cache Stats:\n"); + printf( + "%12.12s %12.12s %12.12s %12.12s %12.12s %12.12s\n", + "Inprog", "Idem", "Non-idem", "Misses", + "CacheSize", "TCPPeak"); + } + printf("%12ju %12ju %12ju %12ju %12ju %12ju\n", + (uintmax_t)ext_nfsstats.srvcache_inproghits, + (uintmax_t)ext_nfsstats.srvcache_idemdonehits, + (uintmax_t)ext_nfsstats.srvcache_nonidemdonehits, + (uintmax_t)ext_nfsstats.srvcache_misses, + (uintmax_t)ext_nfsstats.srvcache_size, + (uintmax_t)ext_nfsstats.srvcache_tcppeak); + } +} + static void compute_totals(struct nfsstatsv1 *total_stats, struct nfsstatsv1 *cur_stats) { From owner-svn-src-head@freebsd.org Sat Nov 26 20:53:23 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A9F9BC5784A; Sat, 26 Nov 2016 20:53:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7964AD51; Sat, 26 Nov 2016 20:53:23 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQKrMq8099326; Sat, 26 Nov 2016 20:53:22 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQKrMjZ099325; Sat, 26 Nov 2016 20:53:22 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201611262053.uAQKrMjZ099325@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 26 Nov 2016 20:53:22 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309198 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 20:53:23 -0000 Author: rmacklem Date: Sat Nov 26 20:53:22 2016 New Revision: 309198 URL: https://svnweb.freebsd.org/changeset/base/309198 Log: Document the -E flag for nfsstat. This is a content change. Reviewed by: bcr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D8626 Modified: head/usr.bin/nfsstat/nfsstat.1 Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Sat Nov 26 20:47:11 2016 (r309197) +++ head/usr.bin/nfsstat/nfsstat.1 Sat Nov 26 20:53:22 2016 (r309198) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd August 13, 2016 +.Dd Nov 23, 2016 .Dt NFSSTAT 1 .Os .Sh NAME @@ -38,7 +38,7 @@ statistics .Sh SYNOPSIS .Nm -.Op Fl cdemszW +.Op Fl cdEemszW .Op Fl M Ar core .Op Fl N Ar system .Op Fl w Ar wait @@ -82,6 +82,16 @@ will increase by more than the measureme .It Fl e Report the extra statistics collected by the NFS client and server for NFSv4. +.It Fl E +Similar to +.Fl e +except that the statistics include NFSv4.1 and the numbers aren't clipped +at one billion. +Only one of +.Fl e +or +.Fl E +can be specified. .It Fl M Extract values associated with the name list from the specified core instead of the default From owner-svn-src-head@freebsd.org Sat Nov 26 20:55:03 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 992FBC57922 for ; Sat, 26 Nov 2016 20:55:03 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: from mail-yw0-x229.google.com (mail-yw0-x229.google.com [IPv6:2607:f8b0:4002: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 630B4EE8 for ; Sat, 26 Nov 2016 20:55:03 +0000 (UTC) (envelope-from ed@nuxi.nl) Received: by mail-yw0-x229.google.com with SMTP id i145so86976209ywg.2 for ; Sat, 26 Nov 2016 12:55:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nuxi-nl.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=VQ8gQHoomwbiQPryjyEa3AXSMkn3YS/FJAmrhnjV/0g=; b=EPXHPAZwIp9IaISuXpGkt4as/7Fx+UA5dPyVi6lWHoXimdrGlcdEwKcAZtdb9+Vxav Ydu4MyCnI4+6lgNZRnPYDcSBuyJLRG4+QarK9ivJElaBLuF1Ggbo2pAr6m/RqtuJK62B nEYyDW5zouy7yIpWOexb74BP9ljxtoOeZfyjqw+Mi7WsQHyBCO5h+oNhQB3czEy0yqs6 l9gLKgN5YimZZD2mY4IMHyOxQ4TZ2WVIATIzP8t9l9xKqgB1G3mmKfa8hxSDpn2x18Nv U+9i1Y2Y5+jTEPXzH71HRefadQAOLkH/g4LQuou7e3QxzEQjahdab+OTWJvviZVmVQ+L nHtQ== 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:from:date :message-id:subject:to:cc; bh=VQ8gQHoomwbiQPryjyEa3AXSMkn3YS/FJAmrhnjV/0g=; b=EGgHuotQyJiWUxhLb5gU4ggk3rLSgbeiolmCpdmaoBVY09Xz0TAGDxU38VGQQ2rU8D qECwHRvWBwDPjmrvNxkpzaI/GOdr7E4EkODyCN9GbqCtsMureSL5fN6rxY8ltlAo4jPY 6VY2efxc/wMfFxVR/HPL9pCamcYf3+fr6VuErDpv/dHCwSmELSP1yya3a921koWASpB0 V7VckfTlltB/Uy5BilqVFkznLdm/bVM6Tz/LNdvle324w6Fnmv/wkAhLDtxzLk2uNGGy YtgGDS/LcswCV0sczfXQLzEHwRpu7TiGPT0XWxe9rSrAYQcS0X1JkLH6nNUAoQH9h3Hw NV1w== X-Gm-Message-State: AKaTC03wz5qB4HUFsGbTG/w9ctYkeQEqNgY1Lua69oeXkFWc1I+ihdtJgzH5/k2W5SbRiBM7GUb+qjuRtYMf8Q== X-Received: by 10.13.221.215 with SMTP id g206mr19330139ywe.350.1480193702287; Sat, 26 Nov 2016 12:55:02 -0800 (PST) MIME-Version: 1.0 Received: by 10.129.31.213 with HTTP; Sat, 26 Nov 2016 12:54:31 -0800 (PST) In-Reply-To: <201611262053.uAQKrMjZ099325@repo.freebsd.org> References: <201611262053.uAQKrMjZ099325@repo.freebsd.org> From: Ed Schouten Date: Sat, 26 Nov 2016 21:54:31 +0100 Message-ID: Subject: Re: svn commit: r309198 - head/usr.bin/nfsstat To: Rick Macklem Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 20:55:03 -0000 2016-11-26 21:53 GMT+01:00 Rick Macklem : > -.Dd August 13, 2016 > +.Dd Nov 23, 2016 Shouldn't this use 'November' instead of 'Nov'? -- Ed Schouten Nuxi, 's-Hertogenbosch, the Netherlands KvK-nr.: 62051717 From owner-svn-src-head@freebsd.org Sat Nov 26 20:58:06 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 51FF8C579B3; Sat, 26 Nov 2016 20:58:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2163F107C; Sat, 26 Nov 2016 20:58:06 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQKw5YZ099562; Sat, 26 Nov 2016 20:58:05 GMT (envelope-from rmacklem@FreeBSD.org) Received: (from rmacklem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQKw57A099561; Sat, 26 Nov 2016 20:58:05 GMT (envelope-from rmacklem@FreeBSD.org) Message-Id: <201611262058.uAQKw57A099561@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: rmacklem set sender to rmacklem@FreeBSD.org using -f From: Rick Macklem Date: Sat, 26 Nov 2016 20:58:05 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309199 - head/usr.bin/nfsstat X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 20:58:06 -0000 Author: rmacklem Date: Sat Nov 26 20:58:05 2016 New Revision: 309199 URL: https://svnweb.freebsd.org/changeset/base/309199 Log: Use November instead of the abbreviation. Requested by: Ed Shouten MFC after: 2 weeks Modified: head/usr.bin/nfsstat/nfsstat.1 Modified: head/usr.bin/nfsstat/nfsstat.1 ============================================================================== --- head/usr.bin/nfsstat/nfsstat.1 Sat Nov 26 20:53:22 2016 (r309198) +++ head/usr.bin/nfsstat/nfsstat.1 Sat Nov 26 20:58:05 2016 (r309199) @@ -28,7 +28,7 @@ .\" From: @(#)nfsstat.1 8.1 (Berkeley) 6/6/93 .\" $FreeBSD$ .\" -.Dd Nov 23, 2016 +.Dd November 23, 2016 .Dt NFSSTAT 1 .Os .Sh NAME From owner-svn-src-head@freebsd.org Sat Nov 26 21:00:29 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1C4F1C57A73; Sat, 26 Nov 2016 21:00:29 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id C5FC6124B; Sat, 26 Nov 2016 21:00:28 +0000 (UTC) (envelope-from markj@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQL0Rp6099727; Sat, 26 Nov 2016 21:00:27 GMT (envelope-from markj@FreeBSD.org) Received: (from markj@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQL0RLq099725; Sat, 26 Nov 2016 21:00:27 GMT (envelope-from markj@FreeBSD.org) Message-Id: <201611262100.uAQL0RLq099725@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: markj set sender to markj@FreeBSD.org using -f From: Mark Johnston Date: Sat, 26 Nov 2016 21:00:27 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309200 - in head: lib/libc/sys sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 21:00:29 -0000 Author: markj Date: Sat Nov 26 21:00:27 2016 New Revision: 309200 URL: https://svnweb.freebsd.org/changeset/base/309200 Log: Launder VPO_NOSYNC pages upon vnode deactivation. As of r234483, vnode deactivation causes non-VPO_NOSYNC pages to be laundered. This behaviour has two problems: 1. Dirty VPO_NOSYNC pages must be laundered before the vnode can be reclaimed, and this work may be unfairly deferred to the vnlru process or an unrelated application when the system is under vnode pressure. 2. Deactivation of a vnode with dirty VPO_NOSYNC pages requires a scan of the corresponding VM object's memq for non-VPO_NOSYNC dirty pages; if the laundry thread needs to launder pages from an unreferenced such vnode, it will reactivate and deactivate the vnode with each laundering, potentially resulting in a large number of expensive scans. Therefore, ensure that all dirty pages are laundered upon deactivation, i.e., when all maps of the vnode are removed and all references are released. Reviewed by: alc, kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D8641 Modified: head/lib/libc/sys/mmap.2 head/sys/kern/vfs_subr.c Modified: head/lib/libc/sys/mmap.2 ============================================================================== --- head/lib/libc/sys/mmap.2 Sat Nov 26 20:58:05 2016 (r309199) +++ head/lib/libc/sys/mmap.2 Sat Nov 26 21:00:27 2016 (r309200) @@ -28,7 +28,7 @@ .\" @(#)mmap.2 8.4 (Berkeley) 5/11/95 .\" $FreeBSD$ .\" -.Dd February 18, 2015 +.Dd November 25, 2016 .Dt MMAP 2 .Os .Sh NAME @@ -189,6 +189,8 @@ this option any VM pages you dirty may b (every 30-60 seconds usually) which can create performance problems if you do not need that to occur (such as when you are using shared file-backed mmap regions for IPC purposes). +Dirty data will be flushed automatically when all mappings of an object are +removed and all descriptors referencing the object are closed. Note that VM/file system coherency is maintained whether you use .Dv MAP_NOSYNC Modified: head/sys/kern/vfs_subr.c ============================================================================== --- head/sys/kern/vfs_subr.c Sat Nov 26 20:58:05 2016 (r309199) +++ head/sys/kern/vfs_subr.c Sat Nov 26 21:00:27 2016 (r309200) @@ -3002,7 +3002,7 @@ vinactive(struct vnode *vp, struct threa obj = vp->v_object; if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) { VM_OBJECT_WLOCK(obj); - vm_object_page_clean(obj, 0, 0, OBJPC_NOSYNC); + vm_object_page_clean(obj, 0, 0, 0); VM_OBJECT_WUNLOCK(obj); } VOP_INACTIVE(vp, td); From owner-svn-src-head@freebsd.org Sat Nov 26 23:15:12 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AE928C574C3; Sat, 26 Nov 2016 23:15:12 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 7E4636E6; Sat, 26 Nov 2016 23:15:12 +0000 (UTC) (envelope-from scottl@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQNFBGE055335; Sat, 26 Nov 2016 23:15:11 GMT (envelope-from scottl@FreeBSD.org) Received: (from scottl@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQNFBSu055334; Sat, 26 Nov 2016 23:15:11 GMT (envelope-from scottl@FreeBSD.org) Message-Id: <201611262315.uAQNFBSu055334@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: scottl set sender to scottl@FreeBSD.org using -f From: Scott Long Date: Sat, 26 Nov 2016 23:15:11 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309201 - head/sys/netipsec X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 23:15:12 -0000 Author: scottl Date: Sat Nov 26 23:15:11 2016 New Revision: 309201 URL: https://svnweb.freebsd.org/changeset/base/309201 Log: Add a missing header Modified: head/sys/netipsec/keydb.h Modified: head/sys/netipsec/keydb.h ============================================================================== --- head/sys/netipsec/keydb.h Sat Nov 26 21:00:27 2016 (r309200) +++ head/sys/netipsec/keydb.h Sat Nov 26 23:15:11 2016 (r309201) @@ -35,6 +35,7 @@ #ifdef _KERNEL +#include #include #include From owner-svn-src-head@freebsd.org Sat Nov 26 23:22:34 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id ADFE5C578DB; Sat, 26 Nov 2016 23:22:34 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 43D7AD11; Sat, 26 Nov 2016 23:22:34 +0000 (UTC) (envelope-from landonf@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uAQNMXoQ059115; Sat, 26 Nov 2016 23:22:33 GMT (envelope-from landonf@FreeBSD.org) Received: (from landonf@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uAQNMXR2059108; Sat, 26 Nov 2016 23:22:33 GMT (envelope-from landonf@FreeBSD.org) Message-Id: <201611262322.uAQNMXR2059108@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: landonf set sender to landonf@FreeBSD.org using -f From: "Landon J. Fuller" Date: Sat, 26 Nov 2016 23:22:33 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r309202 - in head/sys: conf dev/bhnd dev/bhnd/nvram dev/bhnd/tools dev/bwn mips/broadcom modules/bhnd X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2016 23:22:34 -0000 Author: landonf Date: Sat Nov 26 23:22:32 2016 New Revision: 309202 URL: https://svnweb.freebsd.org/changeset/base/309202 Log: bhnd(4): Unify NVRAM/SPROM parsing, implement compact SPROM layout encoding. - Defined an abstract NVRAM I/O API (bhnd_nvram_io), decoupling NVRAM/SPROM parsing from the actual underlying NVRAM data provider (e.g. CFE firmware devices). - Defined an abstract NVRAM data API (bhnd_nvram_data), decoupling higher-level NVRAM operations (indexed lookup, data conversion, etc) from the underlying NVRAM file format parsing/serialization. - Implemented a new high-level bhnd_nvram_store API, providing indexed variable lookup, pending write tracking, etc on top of an arbitrary bhnd_nvram_data instance. - Migrated all bhnd(4) NVRAM device drivers to the common bhnd_nvram_store API. - Implemented a common bhnd_nvram_val API for parsing/encoding NVRAM variable values, including applying format-specific behavior when converting to/from the NVRAM string representations. - Dropped the now unnecessary bhnd_nvram driver, and moved the broadcom/mips-specific CFE NVRAM driver out into sys/mips/broadcom. - Implemented a new nvram_map file format: - Variable definitions are now defined separately from the SPROM layout. This will also allow us to define CIS tuple NVRAM mappings referencing the common NVRAM variable definitions. - Variables can now be defined within arbitrary named groups. - Textual descriptions and help information can be defined inline for both variables and variable groups. - Implemented a new, compact encoding of SPROM image layout offsets. - Source-level (but not build system) support for building the NVRAM file format APIs (bhnd_nvram_io, bhnd_nvram_data, bhnd_nvram_store) as a userspace library. The new compact SPROM image layout encoding is loosely modeled on Apple dyld compressed LINKEDIT symbol binding opcodes; it provides a compact state-machine encoding of the mapping between NVRAM variables and the SPROM image offset, mask, and shift instructions necessary to decode or encode the SPROM variable data. The compact encoding reduces the size of the generated SPROM layout data from roughly 60KB to 3KB. The sequential nature SPROM layout opcode tables also simplify iteration of the SPROM variables, as it's no longer neccessary to iterate the full NVRAM variable definition table, but instead simply scan the SPROM revision's layout opcode table. Approved by: adrian (mentor) Differential Revision: https://reviews.freebsd.org/D8645 Added: head/sys/dev/bhnd/nvram/bhnd_nvram_data.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcm.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcmraw.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcmreg.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcmvar.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_btxt.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_sprom.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_spromvar.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_tlv.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_data_tlvreg.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_datavar.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_io.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_io.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_iobuf.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_iores.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_iovar.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_private.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_store.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_store.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_storevar.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_subr.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_value.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_value.h (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_value_fmts.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_value_prf.c (contents, props changed) head/sys/dev/bhnd/nvram/bhnd_nvram_valuevar.h (contents, props changed) head/sys/mips/broadcom/bcm_nvram_cfe.c (contents, props changed) head/sys/mips/broadcom/bcm_nvram_cfevar.h (contents, props changed) Deleted: head/sys/dev/bhnd/nvram/bhnd_nvram.c head/sys/dev/bhnd/nvram/bhnd_nvram_cfe.c head/sys/dev/bhnd/nvram/bhnd_nvram_common.c head/sys/dev/bhnd/nvram/bhnd_nvram_common.h head/sys/dev/bhnd/nvram/bhnd_nvram_parser.c head/sys/dev/bhnd/nvram/bhnd_nvram_parser.h head/sys/dev/bhnd/nvram/bhnd_nvram_parserreg.h head/sys/dev/bhnd/nvram/bhnd_nvram_parservar.h head/sys/dev/bhnd/nvram/bhnd_nvramvar.h head/sys/dev/bhnd/nvram/bhnd_sprom_parser.c head/sys/dev/bhnd/nvram/bhnd_sprom_parser.h head/sys/dev/bhnd/nvram/bhnd_sprom_parservar.h Modified: head/sys/conf/files head/sys/dev/bhnd/bhnd_subr.c head/sys/dev/bhnd/nvram/bhnd_nvram.h head/sys/dev/bhnd/nvram/bhnd_sprom.c head/sys/dev/bhnd/nvram/bhnd_spromvar.h head/sys/dev/bhnd/nvram/nvram_map head/sys/dev/bhnd/tools/nvram_map_gen.awk head/sys/dev/bwn/bwn_mac.c head/sys/mips/broadcom/files.broadcom head/sys/modules/bhnd/Makefile Modified: head/sys/conf/files ============================================================================== --- head/sys/conf/files Sat Nov 26 23:15:11 2016 (r309201) +++ head/sys/conf/files Sat Nov 26 23:22:32 2016 (r309202) @@ -1220,14 +1220,22 @@ dev/bhnd/cores/pmu/bhnd_pmu.c optional dev/bhnd/cores/pmu/bhnd_pmu_core.c optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_if.m optional bhnd dev/bhnd/cores/pmu/bhnd_pmu_subr.c optional bhnd -dev/bhnd/nvram/bhnd_nvram.c optional bhnd -dev/bhnd/nvram/bhnd_nvram_common.c optional bhnd -dev/bhnd/nvram/bhnd_nvram_cfe.c optional bhnd siba_nexus cfe | \ - bhnd bcma_nexus cfe +dev/bhnd/nvram/bhnd_nvram_data.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_data_bcm.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_data_bcmraw.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_data_btxt.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_data_sprom.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_data_tlv.c optional bhnd dev/bhnd/nvram/bhnd_nvram_if.m optional bhnd -dev/bhnd/nvram/bhnd_nvram_parser.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_io.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_iobuf.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_iores.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_store.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_subr.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_value.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_value_fmts.c optional bhnd +dev/bhnd/nvram/bhnd_nvram_value_prf.c optional bhnd dev/bhnd/nvram/bhnd_sprom.c optional bhnd -dev/bhnd/nvram/bhnd_sprom_parser.c optional bhnd dev/bhnd/siba/siba.c optional siba bhnd dev/bhnd/siba/siba_bhndb.c optional siba bhnd bhndb dev/bhnd/siba/siba_erom.c optional siba bhnd Modified: head/sys/dev/bhnd/bhnd_subr.c ============================================================================== --- head/sys/dev/bhnd/bhnd_subr.c Sat Nov 26 23:15:11 2016 (r309201) +++ head/sys/dev/bhnd/bhnd_subr.c Sat Nov 26 23:22:32 2016 (r309202) @@ -1057,7 +1057,8 @@ bhnd_nvram_getvar_str(device_t dev, cons int error; larg = len; - error = bhnd_nvram_getvar(dev, name, buf, &larg, BHND_NVRAM_TYPE_CSTR); + error = bhnd_nvram_getvar(dev, name, buf, &larg, + BHND_NVRAM_TYPE_STRING); if (rlen != NULL) *rlen = larg; Modified: head/sys/dev/bhnd/nvram/bhnd_nvram.h ============================================================================== --- head/sys/dev/bhnd/nvram/bhnd_nvram.h Sat Nov 26 23:15:11 2016 (r309201) +++ head/sys/dev/bhnd/nvram/bhnd_nvram.h Sat Nov 26 23:22:32 2016 (r309202) @@ -32,11 +32,17 @@ #ifndef _BHND_NVRAM_BHND_NVRAM_H_ #define _BHND_NVRAM_BHND_NVRAM_H_ +#ifdef _KERNEL +#include +#else /* !_KERNEL */ +#include +#include +#endif /* _KERNEL */ + /** * NVRAM data sources supported by bhnd(4) devices. */ typedef enum { - BHND_NVRAM_SRC_OTP, /**< On-chip one-time-programmable * memory. */ @@ -67,50 +73,52 @@ typedef enum { */ } bhnd_nvram_src; -/** Supported NVRAM formats. */ -typedef enum { - BHND_NVRAM_FMT_BCM = 0, /**< Broadcom NUL-delimited key=value pairs */ - BHND_NVRAM_FMT_TLV = 1, /**< CFE TLV encoding, as used on WGT634U */ - BHND_NVRAM_FMT_BTXT = 2, /**< Broadcom board text file. This is used - to provide external NVRAM data for some - fullmac WiFi devices. */ - BHND_NVRAM_FMT_SPROM = 3, /**< SPROM/OTP-specific encoding used by - Broadcom network adapters */ - BHND_NVRAM_FMT_CIS = 4, /**< A mostly CIS-compatible encoding used - on some Broadcom network adapters */ - BHND_NVRAM_FMT_UNKNOWN = 5 /**< Unknown or unrecognized format */ -} bhnd_nvram_format; - - -/** bhnd_nvram_type bit flags */ -enum { - BHND_NVRAM_TF_SIGNED = (1<<7), -}; - -#define BHND_NVRAM_TYPE_ID_MASK 0xF -#define BHND_NVRAM_TYPE_FLAGS_MASK 0x70 - -#define BHND_NVRAM_TYPE_ID(_id, _flags) \ - (((_id) & BHND_NVRAM_TYPE_ID_MASK) | \ - ((_flags) & BHND_NVRAM_TYPE_FLAGS_MASK)) - -/** Supported NVRAM data types */ +/** + * NVRAM data types. + * + * @internal + * + * All primitive (non-array) constants should be representable as a 4-bit + * integer (e.g. 0-15) to support SPROM_OPCODE_TYPE_IMM encoding as used by + * nvram_map_gen.awk. + */ typedef enum { - BHND_NVRAM_TYPE_UINT8 = BHND_NVRAM_TYPE_ID(0, 0), /**< unsigned 8-bit integer */ - BHND_NVRAM_TYPE_UINT16 = BHND_NVRAM_TYPE_ID(1, 0), /**< unsigned 16-bit integer */ - BHND_NVRAM_TYPE_UINT32 = BHND_NVRAM_TYPE_ID(2, 0), /**< unsigned 32-bit integer */ - BHND_NVRAM_TYPE_INT8 = BHND_NVRAM_TYPE_ID(4, BHND_NVRAM_TF_SIGNED), /**< signed 8-bit integer */ - BHND_NVRAM_TYPE_INT16 = BHND_NVRAM_TYPE_ID(5, BHND_NVRAM_TF_SIGNED), /**< signed 16-bit integer */ - BHND_NVRAM_TYPE_INT32 = BHND_NVRAM_TYPE_ID(6, BHND_NVRAM_TF_SIGNED), /**< signed 32-bit integer */ - BHND_NVRAM_TYPE_CHAR = BHND_NVRAM_TYPE_ID(7, BHND_NVRAM_TF_SIGNED), /**< ASCII character */ - BHND_NVRAM_TYPE_CSTR = BHND_NVRAM_TYPE_ID(8, 0), /**< NUL-terminated C string */ + BHND_NVRAM_TYPE_UINT8 = 0, /**< unsigned 8-bit integer */ + BHND_NVRAM_TYPE_UINT16 = 1, /**< unsigned 16-bit integer */ + BHND_NVRAM_TYPE_UINT32 = 2, /**< unsigned 32-bit integer */ + BHND_NVRAM_TYPE_UINT64 = 3, /**< signed 64-bit integer */ + BHND_NVRAM_TYPE_INT8 = 4, /**< signed 8-bit integer */ + BHND_NVRAM_TYPE_INT16 = 5, /**< signed 16-bit integer */ + BHND_NVRAM_TYPE_INT32 = 6, /**< signed 32-bit integer */ + BHND_NVRAM_TYPE_INT64 = 7, /**< signed 64-bit integer */ + BHND_NVRAM_TYPE_CHAR = 8, /**< ASCII/UTF-8 character */ + BHND_NVRAM_TYPE_STRING = 9, /**< ASCII/UTF-8 NUL-terminated + string */ + + /* 10-15 reserved for primitive (non-array) types */ + + BHND_NVRAM_TYPE_UINT8_ARRAY = 16, /**< array of uint8 integers */ + BHND_NVRAM_TYPE_UINT16_ARRAY = 17, /**< array of uint16 integers */ + BHND_NVRAM_TYPE_UINT32_ARRAY = 18, /**< array of uint32 integers */ + BHND_NVRAM_TYPE_UINT64_ARRAY = 19, /**< array of uint64 integers */ + BHND_NVRAM_TYPE_INT8_ARRAY = 20, /**< array of int8 integers */ + BHND_NVRAM_TYPE_INT16_ARRAY = 21, /**< array of int16 integers */ + BHND_NVRAM_TYPE_INT32_ARRAY = 22, /**< array of int32 integers */ + BHND_NVRAM_TYPE_INT64_ARRAY = 23, /**< array of int64 integers */ + BHND_NVRAM_TYPE_CHAR_ARRAY = 24, /**< array of ASCII/UTF-8 + characters */ + BHND_NVRAM_TYPE_STRING_ARRAY = 25, /**< array of ASCII/UTF-8 + NUL-terminated strings */ } bhnd_nvram_type; -#undef BHND_NVRAM_TYPE_ID_MASK -#undef BHND_NVRAM_TYPE_FLAGS_MASK -#undef BHND_NVRAM_TYPE_ID +const char *bhnd_nvram_string_array_next(const char *inp, size_t ilen, + const char *prev); -#define BHND_NVRAM_SIGNED_TYPE(_type) \ - (((_type) & BHND_NVRAM_TF_SIGNED) == BHND_NVRAM_TF_SIGNED) +bool bhnd_nvram_is_signed_type(bhnd_nvram_type type); +bool bhnd_nvram_is_unsigned_type(bhnd_nvram_type type); +bool bhnd_nvram_is_int_type(bhnd_nvram_type type); +bool bhnd_nvram_is_array_type(bhnd_nvram_type type); +bhnd_nvram_type bhnd_nvram_base_type(bhnd_nvram_type type); +const char *bhnd_nvram_type_name(bhnd_nvram_type type); #endif /* _BHND_NVRAM_BHND_NVRAM_H_ */ Added: head/sys/dev/bhnd/nvram/bhnd_nvram_data.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bhnd/nvram/bhnd_nvram_data.c Sat Nov 26 23:22:32 2016 (r309202) @@ -0,0 +1,527 @@ +/*- + * Copyright (c) 2015-2016 Landon Fuller + * 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 + * 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 NONINFRINGEMENT, 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. + */ + +#include +__FBSDID("$FreeBSD$"); + + +#ifdef _KERNEL + +#include +#include + +#include + +#else /* !_KERNEL */ + +#include +#include +#include +#include + +#endif /* _KERNEL */ + +#include "bhnd_nvram_private.h" +#include "bhnd_nvram_io.h" + +#include "bhnd_nvram_datavar.h" +#include "bhnd_nvram_data.h" + +/** + * Return a human-readable description for the given NVRAM data class. + * + * @param cls The NVRAM class. + */ +const char * +bhnd_nvram_data_class_desc(bhnd_nvram_data_class_t *cls) +{ + return (cls->desc); +} + +/** + * Probe to see if this NVRAM data class class supports the data mapped by the + * given I/O context, returning a BHND_NVRAM_DATA_PROBE probe result. + * + * @param cls The NVRAM class. + * @param io An I/O context mapping the NVRAM data. + * + * @retval 0 if this is the only possible NVRAM data class for @p io. + * @retval negative if the probe succeeds, a negative value should be returned; + * the class returning the highest negative value should be selected to handle + * NVRAM parsing. + * @retval ENXIO If the NVRAM format is not handled by @p cls. + * @retval positive if an error occurs during probing, a regular unix error + * code should be returned. + */ +int +bhnd_nvram_data_probe(bhnd_nvram_data_class_t *cls, struct bhnd_nvram_io *io) +{ + return (cls->op_probe(io)); +} + +/** + * Probe to see if an NVRAM data class in @p classes supports parsing + * of the data mapped by @p io, returning the parsed data in @p data. + * + * The caller is responsible for deallocating the returned instance via + * bhnd_nvram_data_release(). + * + * @param[out] data On success, the parsed NVRAM data instance. + * @param io An I/O context mapping the NVRAM data to be copied and parsed. + * @param classes An array of NVRAM data classes to be probed, or NULL to + * probe the default supported set. + * @param num_classes The number of NVRAM data classes in @p classes. + * + * @retval 0 success + * @retval ENXIO if no class is found capable of parsing @p io. + * @retval non-zero if an error otherwise occurs during allocation, + * initialization, or parsing of the NVRAM data, a regular unix error code + * will be returned. + */ +int +bhnd_nvram_data_probe_classes(struct bhnd_nvram_data **data, + struct bhnd_nvram_io *io, bhnd_nvram_data_class_t *classes[], + size_t num_classes) +{ + bhnd_nvram_data_class_t *cls; + int error, prio, result; + + cls = NULL; + prio = 0; + *data = NULL; + + /* If class array is NULL, default to our linker set */ + if (classes == NULL) { + classes = SET_BEGIN(bhnd_nvram_data_class_set); + num_classes = SET_COUNT(bhnd_nvram_data_class_set); + } + + /* Try to find the best data class capable of parsing io */ + for (size_t i = 0; i < num_classes; i++) { + bhnd_nvram_data_class_t *next_cls; + + next_cls = classes[i]; + + /* Try to probe */ + result = bhnd_nvram_data_probe(next_cls, io); + + /* The parser did not match if an error was returned */ + if (result > 0) + continue; + + /* Lower priority than previous match; keep + * searching */ + if (cls != NULL && result <= prio) + continue; + + /* Drop any previously parsed data */ + if (*data != NULL) { + bhnd_nvram_data_release(*data); + *data = NULL; + } + + /* If this is a 'maybe' match, attempt actual parsing to + * verify that this does in fact match */ + if (result <= BHND_NVRAM_DATA_PROBE_MAYBE) { + /* If parsing fails, keep searching */ + error = bhnd_nvram_data_new(next_cls, data, io); + if (error) + continue; + } + + /* Record best new match */ + prio = result; + cls = next_cls; + + + /* Terminate search immediately on + * BHND_NVRAM_DATA_PROBE_SPECIFIC */ + if (result == BHND_NVRAM_DATA_PROBE_SPECIFIC) + break; + } + + /* If no match, return error */ + if (cls == NULL) + return (ENXIO); + + /* If the NVRAM data was not parsed above, do so now */ + if (*data == NULL) { + if ((error = bhnd_nvram_data_new(cls, data, io))) + return (error); + } + + return (0); +} + +/** + * Allocate and initialize a new instance of data class @p cls, copying and + * parsing NVRAM data from @p io. + * + * The caller is responsible for releasing the returned parser instance + * reference via bhnd_nvram_data_release(). + * + * @param cls If non-NULL, the data class to be allocated. If NULL, + * bhnd_nvram_data_probe_classes() will be used to determine the data format. + * @param[out] nv On success, a pointer to the newly allocated NVRAM data instance. + * @param io An I/O context mapping the NVRAM data to be copied and parsed. + * + * @retval 0 success + * @retval non-zero if an error occurs during allocation or initialization, a + * regular unix error code will be returned. + */ +int +bhnd_nvram_data_new(bhnd_nvram_data_class_t *cls, + struct bhnd_nvram_data **nv, struct bhnd_nvram_io *io) +{ + struct bhnd_nvram_data *data; + int error; + + /* If NULL, try to identify the appropriate class */ + if (cls == NULL) + return (bhnd_nvram_data_probe_classes(nv, io, NULL, 0)); + + /* Allocate new instance */ + BHND_NV_ASSERT(sizeof(struct bhnd_nvram_data) <= cls->size, + ("instance size %zu less than minimum %zu", cls->size, + sizeof(struct bhnd_nvram_data))); + + data = bhnd_nv_calloc(1, cls->size); + data->cls = cls; + refcount_init(&data->refs, 1); + + /* Let the class handle initialization */ + if ((error = cls->op_new(data, io))) { + bhnd_nv_free(data); + return (error); + } + + *nv = data; + return (0); +} + +/** + * Retain and return a reference to the given data instance. + * + * @param nv The reference to be retained. + */ +struct bhnd_nvram_data * +bhnd_nvram_data_retain(struct bhnd_nvram_data *nv) +{ + refcount_acquire(&nv->refs); + return (nv); +} + +/** + * Release a reference to the given data instance. + * + * If this is the last reference, the data instance and its associated + * resources will be freed. + * + * @param nv The reference to be released. + */ +void +bhnd_nvram_data_release(struct bhnd_nvram_data *nv) +{ + if (!refcount_release(&nv->refs)) + return; + + /* Free any internal resources */ + nv->cls->op_free(nv); + + /* Free the instance allocation */ + bhnd_nv_free(nv); +} + +/** + * Return a pointer to @p nv's data class. + * + * @param nv The NVRAM data instance to be queried. + */ +bhnd_nvram_data_class_t * +bhnd_nvram_data_class(struct bhnd_nvram_data *nv) +{ + return (nv->cls); +} + +/** + * Return the number of variables in @p nv. + * + * @param nv The NVRAM data to be queried. + */ +size_t +bhnd_nvram_data_count(struct bhnd_nvram_data *nv) +{ + return (nv->cls->op_count(nv)); +} + +/** + * Compute the size of the serialized form of @p nv. + * + * Serialization may be performed via bhnd_nvram_data_serialize(). + * + * @param nv The NVRAM data to be queried. + * @param[out] len On success, will be set to the computed size. + * + * @retval 0 success + * @retval non-zero if computing the serialized size otherwise fails, a + * regular unix error code will be returned. + */ +int +bhnd_nvram_data_size(struct bhnd_nvram_data *nv, size_t *len) +{ + return (nv->cls->op_size(nv, len)); +} + +/** + * Serialize the NVRAM data to @p buf, using the NVRAM data class' native + * format. + * + * The resulting serialization may be reparsed with @p nv's BHND NVRAM data + * class. + * + * @param nv The NVRAM data to be serialized. + * @param[out] buf On success, the serialed NVRAM data will be + * written to this buffer. This argment may be + * NULL if the value is not desired. + * @param[in,out] len The capacity of @p buf. On success, will be set + * to the actual length of the serialized data. + * + * @retval 0 success + * @retval ENOMEM If @p buf is non-NULL and a buffer of @p len is too + * small to hold the serialized data. + * @retval non-zero If serialization otherwise fails, a regular unix error + * code will be returned. + */ +int +bhnd_nvram_data_serialize(struct bhnd_nvram_data *nv, + void *buf, size_t *len) +{ + return (nv->cls->op_serialize(nv, buf, len)); +} + +/** + * Return the capability flags (@see BHND_NVRAM_DATA_CAP_*) for @p nv. + * + * @param nv The NVRAM data to be queried. + */ +uint32_t +bhnd_nvram_data_caps(struct bhnd_nvram_data *nv) +{ + return (nv->cls->op_caps(nv)); +} + +/** + * Iterate over @p nv, returning the names of subsequent variables. + * + * @param nv The NVRAM data to be iterated. + * @param[in,out] cookiep A pointer to a cookiep value previously returned + * by bhnd_nvram_data_next(), or a NULL value to + * begin iteration. + * + * @return Returns the next variable name, or NULL if there are no more + * variables defined in @p nv. + */ +const char * +bhnd_nvram_data_next(struct bhnd_nvram_data *nv, void **cookiep) +{ + return (nv->cls->op_next(nv, cookiep)); +} + +/** + * Search @p nv for a named variable, returning the variable's opaque reference + * if found, or NULL if unavailable. + * + * The BHND_NVRAM_DATA_CAP_INDEXED capability flag will be returned by + * bhnd_nvram_data_caps() if @p nv supports effecient name-based + * lookups. + * + * @param nv The NVRAM data to search. + * @param name The name to search for. + * + * @retval non-NULL If @p name is found, the opaque cookie value will be + * returned. + * @retval NULL If @p name is not found. + */ +void * +bhnd_nvram_data_find(struct bhnd_nvram_data *nv, const char *name) +{ + return (nv->cls->op_find(nv, name)); +} + +/** + * A generic implementation of bhnd_nvram_data_find(). + * + * This implementation will use bhnd_nvram_data_next() to perform a + * simple O(n) case-insensitve search for @p name. + */ +void * +bhnd_nvram_data_generic_find(struct bhnd_nvram_data *nv, const char *name) +{ + const char *next; + void *cookiep; + + cookiep = NULL; + while ((next = bhnd_nvram_data_next(nv, &cookiep))) { + if (strcasecmp(name, next) == 0) + return (cookiep); + } + + /* Not found */ + return (NULL); +} + +/** + * Read a variable and decode as @p type. + * + * @param nv The NVRAM data. + * @param cookiep An NVRAM variable cookie previously returned + * via bhnd_nvram_data_next() or + * bhnd_nvram_data_find(). + * @param[out] buf On success, the requested value will be written + * to this buffer. This argment may be NULL if + * the value is not desired. + * @param[in,out] len The capacity of @p buf. On success, will be set + * to the actual size of the requested value. + * @param type The data type to be written to @p buf. + * + * @retval 0 success + * @retval ENOMEM If @p buf is non-NULL and a buffer of @p len is too + * small to hold the requested value. + * @retval EFTYPE If the variable data cannot be coerced to @p type. + * @retval ERANGE If value coercion would overflow @p type. + */ +int +bhnd_nvram_data_getvar(struct bhnd_nvram_data *nv, void *cookiep, void *buf, + size_t *len, bhnd_nvram_type type) +{ + return (nv->cls->op_getvar(nv, cookiep, buf, len, type)); +} + +/** + * A generic implementation of bhnd_nvram_data_getvar(). + * + * This implementation will call bhnd_nvram_data_getvar_ptr() to fetch + * a pointer to the variable data and perform data coercion on behalf + * of the caller. + * + * If a variable definition for the requested variable is available via + * bhnd_nvram_find_vardefn(), the definition will be used to provide + * formatting hints to bhnd_nvram_coerce_value(). + */ +int +bhnd_nvram_data_generic_rp_getvar(struct bhnd_nvram_data *nv, void *cookiep, + void *outp, size_t *olen, bhnd_nvram_type otype) +{ + bhnd_nvram_val_t val; + const struct bhnd_nvram_vardefn *vdefn; + const bhnd_nvram_val_fmt_t *fmt; + const char *name; + const void *vptr; + bhnd_nvram_type vtype; + size_t vlen; + int error; + + BHND_NV_ASSERT(bhnd_nvram_data_caps(nv) & BHND_NVRAM_DATA_CAP_READ_PTR, + ("instance does not advertise READ_PTR support")); + + /* Fetch pointer to our variable data */ + vptr = bhnd_nvram_data_getvar_ptr(nv, cookiep, &vlen, &vtype); + if (vptr == NULL) + return (EINVAL); + + /* Use the NVRAM string support */ + switch (vtype) { + case BHND_NVRAM_TYPE_STRING: + case BHND_NVRAM_TYPE_STRING_ARRAY: + fmt = &bhnd_nvram_val_bcm_string_fmt; + break; + default: + fmt = NULL; + } + + /* Check the variable definition table for a matching entry; if + * it exists, use it to populate the value format. */ + name = bhnd_nvram_data_getvar_name(nv, cookiep); + vdefn = bhnd_nvram_find_vardefn(name); + if (vdefn != NULL) + fmt = vdefn->fmt; + + /* Attempt value coercion */ + error = bhnd_nvram_val_init(&val, fmt, vptr, vlen, vtype, + BHND_NVRAM_VAL_BORROW_DATA); + if (error) + return (error); + + error = bhnd_nvram_val_encode(&val, outp, olen, otype); + + /* Clean up */ + bhnd_nvram_val_release(&val); + return (error); +} + +/** + * If available and supported by the NVRAM data instance, return a reference + * to the internal buffer containing an entry's variable data, + * + * Note that string values may not be NUL terminated. + * + * @param nv The NVRAM data. + * @param cookiep An NVRAM variable cookie previously returned + * via bhnd_nvram_data_next() or + * bhnd_nvram_data_find(). + * @param[out] len On success, will be set to the actual size of + * the requested value. + * @param[out] type The data type of the entry data. + * + * @retval non-NULL success + * @retval NULL if direct data access is unsupported by @p nv, or + * unavailable for @p cookiep. + */ +const void * +bhnd_nvram_data_getvar_ptr(struct bhnd_nvram_data *nv, void *cookiep, + size_t *len, bhnd_nvram_type *type) +{ + return (nv->cls->op_getvar_ptr(nv, cookiep, len, type)); +} + + +/** + * Return the variable name associated with a given @p cookiep. + * @param nv The NVRAM data to be iterated. + * @param[in,out] cookiep A pointer to a cookiep value previously returned + * via bhnd_nvram_data_next() or + * bhnd_nvram_data_find(). + * + * @return Returns the variable's name. + */ +const char * +bhnd_nvram_data_getvar_name(struct bhnd_nvram_data *nv, void *cookiep) +{ + return (nv->cls->op_getvar_name(nv, cookiep)); +} Added: head/sys/dev/bhnd/nvram/bhnd_nvram_data.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bhnd/nvram/bhnd_nvram_data.h Sat Nov 26 23:22:32 2016 (r309202) @@ -0,0 +1,137 @@ +/*- + * Copyright (c) 2015-2016 Landon Fuller + * 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 + * 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 NONINFRINGEMENT, 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. + * + * $FreeBSD$ + */ + +#ifndef _BHND_NVRAM_BHND_NVRAM_DATA_H_ +#define _BHND_NVRAM_BHND_NVRAM_DATA_H_ + +#ifdef _KERNEL +#include +#include +#else /* !_KERNEL */ +#include + +#include +#include +#endif /* _KERNEL */ + +#include "bhnd_nvram.h" +#include "bhnd_nvram_io.h" + +/* NVRAM data class */ +typedef struct bhnd_nvram_data_class bhnd_nvram_data_class_t; + +/* NVRAM data instance */ +struct bhnd_nvram_data; + +/** Declare a bhnd_nvram_data_class with name @p _n */ +#define BHND_NVRAM_DATA_CLASS_DECL(_n) \ + extern struct bhnd_nvram_data_class bhnd_nvram_ ## _n ## _class + +BHND_NVRAM_DATA_CLASS_DECL(bcm); +BHND_NVRAM_DATA_CLASS_DECL(bcmraw); +BHND_NVRAM_DATA_CLASS_DECL(tlv); +BHND_NVRAM_DATA_CLASS_DECL(btxt); +BHND_NVRAM_DATA_CLASS_DECL(sprom); + +/** bhnd_nvram_data capabilities */ +enum { + /** Supports efficient lookup of variables by name */ + BHND_NVRAM_DATA_CAP_INDEXED = (1<<0), + + /** Supports direct access to backing buffer */ + BHND_NVRAM_DATA_CAP_READ_PTR = (1<<1), + + /** Supports device path prefixed variables */ + BHND_NVRAM_DATA_CAP_DEVPATHS = (1<<2), +}; + +/** + * A standard set of probe priorities returned by bhnd_nvram_data_probe(). + * + * Priority is defined in ascending order, with 0 being the highest priority. + * Return values greater than zero are interpreted as regular unix error codes. + */ +enum { + BHND_NVRAM_DATA_PROBE_MAYBE = -40, /**< Possible match */ + BHND_NVRAM_DATA_PROBE_DEFAULT = -20, /**< Definite match of a base + OS-supplied data class */ + BHND_NVRAM_DATA_PROBE_SPECIFIC = 0, /**< Terminate search and use + this data class for + parsing */ +}; + +const char *bhnd_nvram_data_class_desc( + bhnd_nvram_data_class_t *cls); + +int bhnd_nvram_data_probe(bhnd_nvram_data_class_t *cls, + struct bhnd_nvram_io *io); +int bhnd_nvram_data_probe_classes( + struct bhnd_nvram_data **data, + struct bhnd_nvram_io *io, + bhnd_nvram_data_class_t *classes[], + size_t num_classes); + +int bhnd_nvram_data_new(bhnd_nvram_data_class_t *cls, + struct bhnd_nvram_data **nv, + struct bhnd_nvram_io *io); + +struct bhnd_nvram_data *bhnd_nvram_data_retain(struct bhnd_nvram_data *nv); +void bhnd_nvram_data_release(struct bhnd_nvram_data *nv); + +bhnd_nvram_data_class_t *bhnd_nvram_data_class(struct bhnd_nvram_data *nv); + +size_t bhnd_nvram_data_count(struct bhnd_nvram_data *nv); + +int bhnd_nvram_data_size(struct bhnd_nvram_data *nv, + size_t *size); + +int bhnd_nvram_data_serialize(struct bhnd_nvram_data *nv, + void *buf, size_t *len); + +uint32_t bhnd_nvram_data_caps(struct bhnd_nvram_data *nv); + +const char *bhnd_nvram_data_next(struct bhnd_nvram_data *nv, + void **cookiep); + +void *bhnd_nvram_data_find(struct bhnd_nvram_data *nv, + const char *name); + +int bhnd_nvram_data_getvar(struct bhnd_nvram_data *nv, + void *cookiep, void *buf, size_t *len, + bhnd_nvram_type type); + +const void *bhnd_nvram_data_getvar_ptr(struct bhnd_nvram_data *nv, + void *cookiep, size_t *len, bhnd_nvram_type *type); + +const char *bhnd_nvram_data_getvar_name(struct bhnd_nvram_data *nv, + void *cookiep); + +#endif /* _BHND_NVRAM_BHND_NVRAM_DATA_H_ */ Added: head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcm.c ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sys/dev/bhnd/nvram/bhnd_nvram_data_bcm.c Sat Nov 26 23:22:32 2016 (r309202) @@ -0,0 +1,748 @@ +/*- + * Copyright (c) 2016 Landon Fuller + * 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 + * 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 NONINFRINGEMENT, 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. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include + +#ifdef _KERNEL + +#include +#include +#include +#include + +#else /* !_KERNEL */ + +#include +#include +#include +#include +#include + +#endif /* _KERNEL */ + +#include "bhnd_nvram_private.h" + +#include "bhnd_nvram_datavar.h" + +#include "bhnd_nvram_data_bcmreg.h" +#include "bhnd_nvram_data_bcmvar.h" + +/* + * Broadcom NVRAM data class. + * + * The Broadcom NVRAM NUL-delimited ASCII format is used by most + * Broadcom SoCs. + * + * The NVRAM data is encoded as a standard header, followed by series of + * NUL-terminated 'key=value' strings; the end of the stream is denoted + * by a single extra NUL character. + */ + +struct bhnd_nvram_bcm; + +static struct bhnd_nvram_bcm_hvar *bhnd_nvram_bcm_gethdrvar( + struct bhnd_nvram_bcm *bcm, + const char *name); +static struct bhnd_nvram_bcm_hvar *bhnd_nvram_bcm_to_hdrvar( + struct bhnd_nvram_bcm *bcm, + void *cookiep); +static size_t bhnd_nvram_bcm_hdrvar_index( + struct bhnd_nvram_bcm *bcm, + struct bhnd_nvram_bcm_hvar *hvar); +/* + * Set of BCM NVRAM header values that are required to be mirrored in the + * NVRAM data itself. + * + * If they're not included in the parsed NVRAM data, we need to vend the + * header-parsed values with their appropriate keys, and add them in any + * updates to the NVRAM data. + * + * If they're modified in NVRAM, we need to sync the changes with the + * the NVRAM header values. + */ +static const struct bhnd_nvram_bcm_hvar bhnd_nvram_bcm_hvars[] = { + { + .name = BCM_NVRAM_CFG0_SDRAM_INIT_VAR, + .type = BHND_NVRAM_TYPE_UINT16, + .len = sizeof(uint16_t), + .nelem = 1, + }, + { + .name = BCM_NVRAM_CFG1_SDRAM_CFG_VAR, + .type = BHND_NVRAM_TYPE_UINT16, + .len = sizeof(uint16_t), + .nelem = 1, + }, + { + .name = BCM_NVRAM_CFG1_SDRAM_REFRESH_VAR, + .type = BHND_NVRAM_TYPE_UINT16, + .len = sizeof(uint16_t), + .nelem = 1, + }, + { + .name = BCM_NVRAM_SDRAM_NCDL_VAR, + .type = BHND_NVRAM_TYPE_UINT32, + .len = sizeof(uint32_t), + .nelem = 1, + }, +}; + +/** BCM NVRAM data class instance */ +struct bhnd_nvram_bcm { + struct bhnd_nvram_data nv; /**< common instance state */ + struct bhnd_nvram_io *data; /**< backing buffer */ + + /** BCM header values */ + struct bhnd_nvram_bcm_hvar hvars[nitems(bhnd_nvram_bcm_hvars)]; + + size_t count; /**< total variable count */ +}; + +BHND_NVRAM_DATA_CLASS_DEFN(bcm, "Broadcom", sizeof(struct bhnd_nvram_bcm)) + +static int +bhnd_nvram_bcm_probe(struct bhnd_nvram_io *io) +{ + struct bhnd_nvram_bcmhdr hdr; + int error; + + if ((error = bhnd_nvram_io_read(io, 0x0, &hdr, sizeof(hdr)))) + return (error); + + if (le32toh(hdr.magic) != BCM_NVRAM_MAGIC) + return (ENXIO); + + return (BHND_NVRAM_DATA_PROBE_DEFAULT); +} + +/** + * Initialize @p bcm with the provided NVRAM data mapped by @p src. + * + * @param bcm A newly allocated data instance. + */ +static int +bhnd_nvram_bcm_init(struct bhnd_nvram_bcm *bcm, struct bhnd_nvram_io *src) +{ + struct bhnd_nvram_bcmhdr hdr; + uint8_t *p; + void *ptr; + size_t io_offset, io_size; + uint8_t crc, valid; + int error; + + if ((error = bhnd_nvram_io_read(src, 0x0, &hdr, sizeof(hdr)))) + return (error); + + if (le32toh(hdr.magic) != BCM_NVRAM_MAGIC) + return (ENXIO); + + /* Fetch the actual NVRAM image size */ *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***