aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--Makefile.inc111
-rw-r--r--ObsoleteFiles.inc16
-rw-r--r--bin/cat/tests/Makefile.depend11
-rw-r--r--bin/date/tests/Makefile.depend11
-rw-r--r--bin/dd/tests/Makefile.depend11
-rw-r--r--bin/expr/tests/Makefile.depend11
-rw-r--r--bin/ls/tests/Makefile.depend11
-rw-r--r--bin/mv/tests/Makefile.depend11
-rw-r--r--bin/pax/tests/Makefile.depend11
-rw-r--r--bin/pkill/tests/Makefile.depend11
-rw-r--r--bin/sh/options.c6
-rw-r--r--bin/sh/tests/Makefile.depend11
-rw-r--r--bin/sh/tests/builtins/Makefile1
-rw-r--r--bin/sh/tests/builtins/Makefile.depend11
-rw-r--r--bin/sh/tests/builtins/set3.04
-rw-r--r--bin/sh/tests/errors/Makefile.depend11
-rw-r--r--bin/sh/tests/execution/Makefile.depend11
-rw-r--r--bin/sh/tests/expansion/Makefile.depend11
-rw-r--r--bin/sh/tests/parameters/Makefile.depend11
-rw-r--r--bin/sh/tests/parser/Makefile.depend11
-rw-r--r--bin/sh/tests/set-e/Makefile.depend11
-rw-r--r--bin/sleep/tests/Makefile.depend11
-rw-r--r--bin/test/tests/Makefile.depend11
-rw-r--r--bin/tests/Makefile.depend11
-rw-r--r--cddl/contrib/opensolaris/cmd/zdb/zdb.c1
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c6
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs_main.c58
-rw-r--r--cddl/contrib/opensolaris/cmd/zinject/zinject.c111
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c8
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_main.c38
-rw-r--r--cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c10
-rw-r--r--cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c1
-rw-r--r--cddl/contrib/opensolaris/cmd/ztest/ztest.c1
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h3
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c3
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c3
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c7
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c14
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c3
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c21
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c4
-rw-r--r--cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c1
-rw-r--r--cddl/lib/tests/Makefile.depend11
-rw-r--r--cddl/sbin/tests/Makefile.depend11
-rw-r--r--cddl/tests/Makefile.depend11
-rw-r--r--cddl/usr.bin/tests/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/aggs/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/arrays/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/assocs/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/begin/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/buffering/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/cg/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/clauses/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/cpc/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/decls/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/drops/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/end/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/enum/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/error/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/exit/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/funcs/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/grammar/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/include/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/inline/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/io/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/ip/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/java_api/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/json/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/lexer/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/mdb/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/mib/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/misc/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/operators/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/pid/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/pointers/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/pragma/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/predicates/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/print/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/printa/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/printf/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/privs/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/probes/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/proc/Makefile.depend20
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile.depend16
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/providers/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/raise/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/rates/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/safety/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/scalars/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/sched/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/scripting/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/sdt/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/speculation/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/stability/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/stack/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/stop/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/strlen/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/struct/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/syscall/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/trace/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/translators/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/typedef/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/types/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/uctf/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/union/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/usdt/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/ustack/Makefile.depend17
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/vars/Makefile.depend11
-rw-r--r--cddl/usr.sbin/dtrace/tests/common/version/Makefile.depend11
-rw-r--r--cddl/usr.sbin/tests/Makefile.depend11
-rw-r--r--contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c2
-rw-r--r--contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c2
-rw-r--r--etc/mtree/BSD.tests.dist2
-rwxr-xr-xetc/rc.d/abi5
-rw-r--r--gnu/lib/tests/Makefile.depend11
-rw-r--r--gnu/tests/Makefile.depend11
-rw-r--r--gnu/usr.bin/diff/tests/Makefile.depend11
-rw-r--r--gnu/usr.bin/tests/Makefile.depend11
-rw-r--r--lib/atf/libatf-c++/tests/Makefile.depend23
-rw-r--r--lib/atf/libatf-c++/tests/detail/Makefile.depend23
-rw-r--r--lib/atf/libatf-c/tests/Makefile.depend19
-rw-r--r--lib/atf/libatf-c/tests/detail/Makefile.depend19
-rw-r--r--lib/atf/tests/Makefile.depend11
-rw-r--r--lib/atf/tests/test-programs/Makefile.depend23
-rw-r--r--lib/clang/libclangcodegen/Makefile.depend2
-rw-r--r--lib/clang/libclangdriver/Makefile.depend2
-rw-r--r--lib/clang/libclangfrontend/Makefile.depend2
-rw-r--r--lib/clang/libclangfrontendtool/Makefile.depend2
-rw-r--r--lib/clang/liblldbExpression/Makefile.depend2
-rw-r--r--lib/clang/liblldbInitialization/Makefile.depend1
-rw-r--r--lib/clang/liblldbPluginExpressionParserClang/Makefile.depend17
-rw-r--r--lib/clang/liblldbPluginExpressionParserGo/Makefile.depend15
-rw-r--r--lib/clang/liblldbPluginLanguageCPlusPlus/Makefile.depend16
-rw-r--r--lib/clang/liblldbPluginLanguageObjC/Makefile.depend16
-rw-r--r--lib/clang/liblldbPluginScriptInterpreterNone/Makefile.depend15
-rw-r--r--lib/clang/liblldbPluginSymbolFileDWARF/Makefile.depend2
-rw-r--r--lib/clang/libllvmaarch64asmparser/Makefile.depend2
-rw-r--r--lib/clang/libllvmaarch64asmprinter/Makefile.depend12
-rw-r--r--lib/clang/libllvmaarch64codegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmaarch64desc/Makefile.depend2
-rw-r--r--lib/clang/libllvmaarch64disassembler/Makefile.depend2
-rw-r--r--lib/clang/libllvmaarch64info/Makefile.depend2
-rw-r--r--lib/clang/libllvmaarch64utils/Makefile.depend2
-rw-r--r--lib/clang/libllvmanalysis/Makefile.depend2
-rw-r--r--lib/clang/libllvmarmasmparser/Makefile.depend2
-rw-r--r--lib/clang/libllvmarmasmprinter/Makefile.depend10
-rw-r--r--lib/clang/libllvmarmcodegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmarmdesc/Makefile.depend2
-rw-r--r--lib/clang/libllvmarmdisassembler/Makefile.depend2
-rw-r--r--lib/clang/libllvmarminfo/Makefile.depend2
-rw-r--r--lib/clang/libllvmasmparser/Makefile.depend1
-rw-r--r--lib/clang/libllvmasmprinter/Makefile.depend2
-rw-r--r--lib/clang/libllvmbitreader/Makefile.depend2
-rw-r--r--lib/clang/libllvmbitwriter/Makefile.depend1
-rw-r--r--lib/clang/libllvmcodegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmcore/Makefile.depend2
-rw-r--r--lib/clang/libllvmexecutionengine/Makefile.depend1
-rw-r--r--lib/clang/libllvminstcombine/Makefile.depend2
-rw-r--r--lib/clang/libllvminstrumentation/Makefile.depend2
-rw-r--r--lib/clang/libllvminterpreter/Makefile.depend2
-rw-r--r--lib/clang/libllvmipo/Makefile.depend2
-rw-r--r--lib/clang/libllvmirreader/Makefile.depend1
-rw-r--r--lib/clang/libllvmlibdriver/Makefile.depend2
-rw-r--r--lib/clang/libllvmlinker/Makefile.depend1
-rw-r--r--lib/clang/libllvmlto/Makefile.depend2
-rw-r--r--lib/clang/libllvmmcjit/Makefile.depend1
-rw-r--r--lib/clang/libllvmmipsasmparser/Makefile.depend2
-rw-r--r--lib/clang/libllvmmipsasmprinter/Makefile.depend10
-rw-r--r--lib/clang/libllvmmipscodegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmmipsdesc/Makefile.depend2
-rw-r--r--lib/clang/libllvmmipsdisassembler/Makefile.depend2
-rw-r--r--lib/clang/libllvmmipsinfo/Makefile.depend2
-rw-r--r--lib/clang/libllvmmirparser/Makefile.depend1
-rw-r--r--lib/clang/libllvmobjcarcopts/Makefile.depend2
-rw-r--r--lib/clang/libllvmobject/Makefile.depend1
-rw-r--r--lib/clang/libllvmorcjit/Makefile.depend1
-rw-r--r--lib/clang/libllvmpasses/Makefile.depend2
-rw-r--r--lib/clang/libllvmpowerpcasmparser/Makefile.depend2
-rw-r--r--lib/clang/libllvmpowerpcasmprinter/Makefile.depend10
-rw-r--r--lib/clang/libllvmpowerpccodegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmpowerpcdesc/Makefile.depend2
-rw-r--r--lib/clang/libllvmpowerpcdisassembler/Makefile.depend2
-rw-r--r--lib/clang/libllvmpowerpcinfo/Makefile.depend2
-rw-r--r--lib/clang/libllvmprofiledata/Makefile.depend1
-rw-r--r--lib/clang/libllvmscalaropts/Makefile.depend2
-rw-r--r--lib/clang/libllvmselectiondag/Makefile.depend2
-rw-r--r--lib/clang/libllvmsparcasmparser/Makefile.depend2
-rw-r--r--lib/clang/libllvmsparcasmprinter/Makefile.depend10
-rw-r--r--lib/clang/libllvmsparccodegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmsparcdesc/Makefile.depend2
-rw-r--r--lib/clang/libllvmsparcdisassembler/Makefile.depend2
-rw-r--r--lib/clang/libllvmsparcinfo/Makefile.depend2
-rw-r--r--lib/clang/libllvmsymbolize/Makefile.depend15
-rw-r--r--lib/clang/libllvmtarget/Makefile.depend2
-rw-r--r--lib/clang/libllvmtransformutils/Makefile.depend2
-rw-r--r--lib/clang/libllvmvectorize/Makefile.depend2
-rw-r--r--lib/clang/libllvmx86asmparser/Makefile.depend2
-rw-r--r--lib/clang/libllvmx86asmprinter/Makefile.depend24
-rw-r--r--lib/clang/libllvmx86codegen/Makefile.depend2
-rw-r--r--lib/clang/libllvmx86desc/Makefile.depend2
-rw-r--r--lib/clang/libllvmx86disassembler/Makefile.depend2
-rw-r--r--lib/clang/libllvmx86info/Makefile.depend2
-rw-r--r--lib/libarchive/tests/Makefile.depend26
-rw-r--r--lib/libc/amd64/sys/cerror.S1
-rw-r--r--lib/libc/i386/sys/cerror.S1
-rw-r--r--lib/libc/sys/getdirentries.24
-rw-r--r--lib/libc/tests/Makefile1
-rw-r--r--lib/libc/tests/Makefile.depend11
-rw-r--r--lib/libc/tests/c063/Makefile.depend20
-rw-r--r--lib/libc/tests/db/Makefile.depend18
-rw-r--r--lib/libc/tests/gen/Makefile.depend23
-rw-r--r--lib/libc/tests/gen/execve/Makefile.depend20
-rw-r--r--lib/libc/tests/gen/posix_spawn/Makefile.depend20
-rw-r--r--lib/libc/tests/hash/Makefile.depend22
-rw-r--r--lib/libc/tests/inet/Makefile.depend21
-rw-r--r--lib/libc/tests/locale/Makefile.depend21
-rw-r--r--lib/libc/tests/net/Makefile.depend21
-rw-r--r--lib/libc/tests/nss/Makefile.depend21
-rw-r--r--lib/libc/tests/regex/Makefile.depend21
-rw-r--r--lib/libc/tests/resolv/Makefile.depend20
-rw-r--r--lib/libc/tests/rpc/Makefile.depend23
-rw-r--r--lib/libc/tests/setjmp/Makefile.depend20
-rw-r--r--lib/libc/tests/ssp/Makefile.depend21
-rw-r--r--lib/libc/tests/stdio/Makefile.depend21
-rw-r--r--lib/libc/tests/stdlib/Makefile.depend22
-rw-r--r--lib/libc/tests/string/Makefile.depend21
-rw-r--r--lib/libc/tests/sys/Makefile.depend24
-rw-r--r--lib/libc/tests/termios/Makefile.depend20
-rw-r--r--lib/libc/tests/time/Makefile.depend20
-rw-r--r--lib/libc/tests/tls/Makefile.depend22
-rw-r--r--lib/libc/tests/tls_dso/Makefile.depend17
-rw-r--r--lib/libc/tests/ttyio/Makefile.depend21
-rw-r--r--lib/libclang_rt/asan_dynamic/Makefile.depend23
-rw-r--r--lib/libcrypt/tests/Makefile.depend1
-rw-r--r--lib/libmp/tests/Makefile.depend20
-rw-r--r--lib/libnv/tests/Makefile.depend24
-rw-r--r--lib/libpam/libpam/tests/Makefile.depend19
-rw-r--r--lib/libproc/tests/Makefile.depend26
-rw-r--r--lib/librt/tests/Makefile.depend22
-rw-r--r--lib/libthr/tests/Makefile.depend23
-rw-r--r--lib/libthr/tests/dlopen/Makefile.depend21
-rw-r--r--lib/libthr/tests/dlopen/dso/Makefile.depend19
-rw-r--r--lib/libutil/tests/Makefile.depend20
-rw-r--r--lib/libxo/tests/Makefile.depend20
-rw-r--r--lib/msun/tests/Makefile.depend21
-rw-r--r--lib/tests/Makefile.depend11
-rw-r--r--libexec/atf/atf-check/tests/Makefile.depend11
-rw-r--r--libexec/atf/atf-sh/tests/Makefile.depend11
-rw-r--r--libexec/atf/tests/Makefile.depend11
-rw-r--r--libexec/rtld-elf/tests/Makefile.depend19
-rw-r--r--libexec/tests/Makefile.depend11
-rw-r--r--sbin/devd/tests/Makefile.depend19
-rw-r--r--sbin/dhclient/tests/Makefile.depend20
-rw-r--r--sbin/growfs/tests/Makefile.depend11
-rw-r--r--sbin/ifconfig/tests/Makefile.depend11
-rw-r--r--sbin/ipfw/ipfw2.c1
-rw-r--r--sbin/mdconfig/tests/Makefile.depend11
-rw-r--r--sbin/tests/Makefile.depend11
-rw-r--r--sbin/tunefs/tunefs.c2
-rw-r--r--secure/lib/tests/Makefile.depend11
-rw-r--r--secure/libexec/tests/Makefile.depend11
-rw-r--r--secure/tests/Makefile.depend11
-rw-r--r--secure/usr.bin/tests/Makefile.depend11
-rw-r--r--secure/usr.sbin/tests/Makefile.depend11
-rw-r--r--share/examples/tests/Makefile.depend11
-rw-r--r--share/examples/tests/tests/Makefile.depend11
-rw-r--r--share/examples/tests/tests/atf/Makefile.depend19
-rw-r--r--share/examples/tests/tests/plain/Makefile.depend18
-rw-r--r--share/man/man4/filemon.418
-rw-r--r--share/man/man5/resolver.53
-rw-r--r--share/man/man9/bus_adjust_resource.95
-rw-r--r--share/man/man9/bus_alloc_resource.96
-rw-r--r--share/mk/bsd.confs.mk6
-rw-r--r--share/mk/bsd.files.mk6
-rw-r--r--share/mk/bsd.incs.mk6
-rw-r--r--share/mk/bsd.lib.mk4
-rw-r--r--share/mk/bsd.progs.mk41
-rw-r--r--share/mk/bsd.sys.mk2
-rw-r--r--share/mk/bsd.test.mk4
-rw-r--r--share/mk/local.dirdeps.mk61
-rw-r--r--share/mk/local.meta.sys.mk2
-rw-r--r--share/tests/Makefile.depend11
-rw-r--r--sys/amd64/cloudabi64/cloudabi64_sysvec.c2
-rw-r--r--sys/arm64/cloudabi64/cloudabi64_sysvec.c2
-rw-r--r--sys/boot/efi/boot1/Makefile2
-rw-r--r--sys/boot/uboot/common/main.c7
-rw-r--r--sys/boot/uboot/lib/glue.c35
-rw-r--r--sys/boot/uboot/lib/glue.h1
-rw-r--r--sys/cam/cam_ccb.h10
-rw-r--r--sys/cam/cam_xpt.c1
-rw-r--r--sys/cam/ctl/scsi_ctl.c1
-rw-r--r--sys/cddl/compat/opensolaris/sys/callo.h37
-rw-r--r--sys/cddl/compat/opensolaris/sys/systm.h3
-rw-r--r--sys/cddl/compat/opensolaris/sys/time.h3
-rw-r--r--sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c3
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c1
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h1
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c493
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h72
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c1
-rw-r--r--sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c77
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c19
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c10
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c8
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c11
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c49
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c32
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c60
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c3
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h7
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h5
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c5
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c5
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c6
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c14
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c53
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c6
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c257
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h4
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h1
-rw-r--r--sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c21
-rw-r--r--sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c13
-rw-r--r--sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c1595
-rw-r--r--sys/cddl/contrib/opensolaris/uts/sparc/sys/fasttrap_isa.h94
-rw-r--r--sys/cddl/dev/dtrace/dtrace_ioctl.c4
-rw-r--r--sys/compat/freebsd32/freebsd32_proto.h44
-rw-r--r--sys/compat/freebsd32/freebsd32_syscall.h10
-rw-r--r--sys/compat/freebsd32/freebsd32_syscalls.c10
-rw-r--r--sys/compat/freebsd32/freebsd32_sysent.c28
-rw-r--r--sys/compat/freebsd32/freebsd32_systrace_args.c90
-rw-r--r--sys/compat/freebsd32/syscalls.master28
-rw-r--r--sys/compat/linux/linux_fork.c12
-rw-r--r--sys/compat/linux/linux_misc.c10
-rw-r--r--sys/compat/linux/linux_socket.c79
-rw-r--r--sys/compat/linux/linux_socket.h25
-rw-r--r--sys/conf/Makefile.riscv2
-rw-r--r--sys/conf/files.riscv4
-rw-r--r--sys/conf/options.mips5
-rw-r--r--sys/dev/agp/agp_i810.c220
-rw-r--r--sys/dev/agp/agp_i810.h34
-rw-r--r--sys/dev/amr/amr.c2
-rw-r--r--sys/dev/bxe/bxe.c147
-rw-r--r--sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c2
-rw-r--r--sys/dev/cxgbe/adapter.h49
-rw-r--r--sys/dev/cxgbe/common/common.h136
-rw-r--r--sys/dev/cxgbe/common/t4_hw.c6393
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/device.c19
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/iw_cxgbe.h1
-rw-r--r--sys/dev/cxgbe/iw_cxgbe/qp.c6
-rw-r--r--sys/dev/cxgbe/osdep.h14
-rw-r--r--sys/dev/cxgbe/t4_ioctl.h11
-rw-r--r--sys/dev/cxgbe/t4_main.c1282
-rw-r--r--sys/dev/cxgbe/t4_netmap.c18
-rw-r--r--sys/dev/cxgbe/t4_sge.c155
-rw-r--r--sys/dev/drm2/drmP.h13
-rw-r--r--sys/dev/drm2/drm_atomic.h7
-rw-r--r--sys/dev/drm2/drm_dp_iic_helper.c4
-rw-r--r--sys/dev/drm2/drm_drv.c8
-rw-r--r--sys/dev/drm2/drm_linux_list.h120
-rw-r--r--sys/dev/drm2/drm_mem_util.h59
-rw-r--r--sys/dev/drm2/drm_os_freebsd.c114
-rw-r--r--sys/dev/drm2/drm_os_freebsd.h332
-rw-r--r--sys/dev/drm2/drm_pciids.h134
-rw-r--r--sys/dev/drm2/i915/dvo.h155
-rw-r--r--sys/dev/drm2/i915/dvo_ch7017.c418
-rw-r--r--sys/dev/drm2/i915/dvo_ch7xxx.c347
-rw-r--r--sys/dev/drm2/i915/dvo_ivch.c439
-rw-r--r--sys/dev/drm2/i915/dvo_ns2501.c601
-rw-r--r--sys/dev/drm2/i915/dvo_sil164.c282
-rw-r--r--sys/dev/drm2/i915/dvo_tfp410.c321
-rw-r--r--sys/dev/drm2/i915/i915_debug.c891
-rw-r--r--sys/dev/drm2/i915/i915_dma.c881
-rw-r--r--sys/dev/drm2/i915/i915_drm.h251
-rw-r--r--sys/dev/drm2/i915/i915_drv.c994
-rw-r--r--sys/dev/drm2/i915/i915_drv.h1456
-rw-r--r--sys/dev/drm2/i915/i915_gem.c2058
-rw-r--r--sys/dev/drm2/i915/i915_gem_context.c25
-rw-r--r--sys/dev/drm2/i915/i915_gem_evict.c55
-rw-r--r--sys/dev/drm2/i915/i915_gem_execbuffer.c798
-rw-r--r--sys/dev/drm2/i915/i915_gem_gtt.c605
-rw-r--r--sys/dev/drm2/i915/i915_gem_stolen.c92
-rw-r--r--sys/dev/drm2/i915/i915_gem_tiling.c34
-rw-r--r--sys/dev/drm2/i915/i915_irq.c743
-rw-r--r--sys/dev/drm2/i915/i915_reg.h103
-rw-r--r--sys/dev/drm2/i915/i915_suspend.c775
-rw-r--r--sys/dev/drm2/i915/intel_acpi.c256
-rw-r--r--sys/dev/drm2/i915/intel_bios.c94
-rw-r--r--sys/dev/drm2/i915/intel_bios.h7
-rw-r--r--sys/dev/drm2/i915/intel_crt.c378
-rw-r--r--sys/dev/drm2/i915/intel_ddi.c1140
-rw-r--r--sys/dev/drm2/i915/intel_display.c5003
-rw-r--r--sys/dev/drm2/i915/intel_dp.c1579
-rw-r--r--sys/dev/drm2/i915/intel_drv.h323
-rw-r--r--sys/dev/drm2/i915/intel_dvo.c534
-rw-r--r--sys/dev/drm2/i915/intel_fb.c88
-rw-r--r--sys/dev/drm2/i915/intel_hdmi.c651
-rw-r--r--sys/dev/drm2/i915/intel_iic.c446
-rw-r--r--sys/dev/drm2/i915/intel_lvds.c426
-rw-r--r--sys/dev/drm2/i915/intel_modes.c64
-rw-r--r--sys/dev/drm2/i915/intel_opregion.c179
-rw-r--r--sys/dev/drm2/i915/intel_overlay.c332
-rw-r--r--sys/dev/drm2/i915/intel_panel.c245
-rw-r--r--sys/dev/drm2/i915/intel_pm.c1481
-rw-r--r--sys/dev/drm2/i915/intel_ringbuffer.c694
-rw-r--r--sys/dev/drm2/i915/intel_ringbuffer.h95
-rw-r--r--sys/dev/drm2/i915/intel_sdvo.c714
-rw-r--r--sys/dev/drm2/i915/intel_sprite.c151
-rw-r--r--sys/dev/drm2/i915/intel_tv.c165
-rw-r--r--sys/dev/fdc/fdc.c35
-rw-r--r--sys/dev/filemon/filemon.c16
-rw-r--r--sys/dev/filemon/filemon_wrapper.c3
-rw-r--r--sys/dev/firewire/fwmem.c2
-rw-r--r--sys/dev/hyperv/netvsc/hv_net_vsc.h6
-rw-r--r--sys/dev/hyperv/netvsc/hv_netvsc_drv_freebsd.c109
-rw-r--r--sys/dev/isp/isp_freebsd.c1
-rw-r--r--sys/dev/md/md.c3
-rw-r--r--sys/dev/nvd/nvd.c2
-rw-r--r--sys/dev/nvme/nvme.h1
-rw-r--r--sys/dev/nvme/nvme_ns.c18
-rw-r--r--sys/dev/nvme/nvme_sysctl.c16
-rw-r--r--sys/dev/vnic/nicvf_queues.c9
-rw-r--r--sys/geom/geom_disk.c10
-rw-r--r--sys/geom/geom_io.c8
-rw-r--r--sys/geom/sched/g_sched.c10
-rw-r--r--sys/geom/sched/gs_rr.c2
-rw-r--r--sys/kern/init_sysent.c28
-rw-r--r--sys/kern/kern_descrip.c3
-rw-r--r--sys/kern/link_elf_obj.c133
-rw-r--r--sys/kern/posix4_mib.c9
-rw-r--r--sys/kern/syscalls.c8
-rw-r--r--sys/kern/syscalls.master26
-rw-r--r--sys/kern/systrace_args.c78
-rw-r--r--sys/kern/vfs_aio.c111
-rw-r--r--sys/kern/vfs_default.c3
-rw-r--r--sys/kern/vfs_syscalls.c14
-rw-r--r--sys/mips/cavium/octeon_ebt3000_cf.c43
-rw-r--r--sys/mips/rt305x/rt305x_machdep.c2
-rw-r--r--sys/modules/drm2/i915kms/Makefile10
-rw-r--r--sys/modules/md/Makefile2
-rw-r--r--sys/netinet/sctp_usrreq.c1
-rw-r--r--sys/netinet/tcp_stacks/fastpath.c2
-rw-r--r--sys/riscv/conf/GENERIC6
-rw-r--r--sys/riscv/htif/htif_console.c29
-rw-r--r--sys/riscv/include/db_machdep.h46
-rw-r--r--sys/riscv/include/riscv_opcode.h116
-rw-r--r--sys/riscv/include/riscvreg.h7
-rw-r--r--sys/riscv/include/stack.h51
-rw-r--r--sys/riscv/riscv/db_disasm.c475
-rw-r--r--sys/riscv/riscv/db_interface.c163
-rw-r--r--sys/riscv/riscv/db_trace.c135
-rw-r--r--sys/riscv/riscv/stack_machdep.c37
-rw-r--r--sys/riscv/riscv/trap.c11
-rw-r--r--sys/riscv/riscv/unwind.c57
-rw-r--r--sys/sys/fdcio.h1
-rw-r--r--sys/sys/signalvar.h2
-rw-r--r--sys/sys/syscall.h8
-rw-r--r--sys/sys/syscall.mk8
-rw-r--r--sys/sys/sysproto.h38
-rw-r--r--sys/sys/unistd.h2
-rw-r--r--sys/sys/vnode.h1
-rw-r--r--targets/pseudo/clang/Makefile.depend3
-rw-r--r--targets/pseudo/hosttools/Makefile.depend2
-rw-r--r--targets/pseudo/tests/Makefile3
-rw-r--r--targets/pseudo/tests/Makefile.depend337
-rw-r--r--targets/pseudo/the-lot/Makefile.depend6
-rw-r--r--tests/Makefile.depend11
-rw-r--r--tests/etc/Makefile.depend11
-rw-r--r--tests/etc/rc.d/Makefile.depend11
-rw-r--r--tests/sys/Makefile.depend11
-rw-r--r--tests/sys/acl/Makefile.depend11
-rw-r--r--tests/sys/aio/Makefile.depend20
-rw-r--r--tests/sys/fifo/Makefile.depend18
-rw-r--r--tests/sys/file/Makefile.depend20
-rw-r--r--tests/sys/geom/Makefile.depend11
-rw-r--r--tests/sys/geom/class/Makefile.depend11
-rw-r--r--tests/sys/geom/class/concat/Makefile.depend11
-rw-r--r--tests/sys/geom/class/eli/Makefile.depend11
-rw-r--r--tests/sys/geom/class/gate/Makefile.depend11
-rw-r--r--tests/sys/geom/class/mirror/Makefile.depend11
-rw-r--r--tests/sys/geom/class/nop/Makefile.depend11
-rw-r--r--tests/sys/geom/class/raid3/Makefile.depend11
-rw-r--r--tests/sys/geom/class/shsec/Makefile.depend11
-rw-r--r--tests/sys/geom/class/stripe/Makefile.depend11
-rw-r--r--tests/sys/geom/class/uzip/Makefile.depend11
-rw-r--r--tests/sys/kern/Makefile.depend22
-rw-r--r--tests/sys/kern/acct/Makefile.depend20
-rw-r--r--tests/sys/kern/execve/Makefile.depend17
-rw-r--r--tests/sys/kern/pipe/Makefile.depend18
-rw-r--r--tests/sys/kqueue/Makefile.depend18
-rw-r--r--tests/sys/mac/Makefile.depend11
-rw-r--r--tests/sys/mac/bsdextended/Makefile.depend19
-rw-r--r--tests/sys/mac/portacl/Makefile.depend11
-rw-r--r--tests/sys/mqueue/Makefile.depend21
-rw-r--r--tests/sys/netinet/Makefile.depend19
-rw-r--r--tests/sys/opencrypto/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/chflags/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/chmod/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/chown/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/ftruncate/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/granular/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/link/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/mkdir/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/mkfifo/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/mknod/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/open/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/rename/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/rmdir/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/symlink/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/truncate/Makefile.depend11
-rw-r--r--tests/sys/pjdfstest/tests/unlink/Makefile.depend11
-rw-r--r--tests/sys/posixshm/Makefile.depend19
-rw-r--r--tests/sys/vfs/Makefile.depend11
-rw-r--r--tests/sys/vm/Makefile.depend19
-rw-r--r--tools/regression/filemon/Makefile85
-rw-r--r--tools/regression/filemon/filemontest.c84
-rwxr-xr-xtools/regression/filemon/test_script.sh44
-rw-r--r--tools/regression/filemon/timed-forkb.c177
-rw-r--r--tools/tools/cxgbetool/cxgbetool.c185
-rw-r--r--tools/tools/cxgbetool/reg_defs_t4.c182
-rw-r--r--tools/tools/cxgbetool/reg_defs_t4vf.c55
-rw-r--r--tools/tools/cxgbetool/reg_defs_t5.c162
-rw-r--r--tools/tools/cxgbetool/reg_defs_t6.c57337
-rw-r--r--tools/tools/nanobsd/embedded/common3
-rw-r--r--usr.bin/apply/tests/Makefile.depend11
-rw-r--r--usr.bin/basename/tests/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/archives/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/archives/fmt_44bsd/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/archives/fmt_44bsd_mod/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/archives/fmt_oldbsd/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/basic/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/basic/t0/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/basic/t1/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/basic/t2/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/basic/t3/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/execution/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/execution/ellipsis/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/execution/empty/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/execution/joberr/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/execution/plus/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/builtin/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/meta/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/path/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/path_select/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/replace/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/shell/select/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/suffixes/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/suffixes/basic/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/suffixes/src_wild1/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/suffixes/src_wild2/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/syntax/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/syntax/directive-t0/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/syntax/enl/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/syntax/funny-targets/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/syntax/semi/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/1/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/2/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t0/mk/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/1/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/2/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t1/mk/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/1/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/2/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/sysmk/t2/mk/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/variables/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/variables/modifier_M/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/variables/modifier_t/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/variables/opt_V/Makefile.depend11
-rw-r--r--usr.bin/bmake/tests/variables/t0/Makefile.depend11
-rw-r--r--usr.bin/calendar/tests/Makefile.depend11
-rw-r--r--usr.bin/clang/bugpoint/Makefile.depend4
-rw-r--r--usr.bin/clang/clang/Makefile.depend17
-rw-r--r--usr.bin/clang/llc/Makefile.depend16
-rw-r--r--usr.bin/clang/lldb/Makefile.depend18
-rw-r--r--usr.bin/clang/lli/Makefile.depend5
-rw-r--r--usr.bin/clang/llvm-ar/Makefile.depend15
-rw-r--r--usr.bin/clang/llvm-as/Makefile.depend1
-rw-r--r--usr.bin/clang/llvm-bcanalyzer/Makefile.depend1
-rw-r--r--usr.bin/clang/llvm-cov/Makefile.depend1
-rw-r--r--usr.bin/clang/llvm-cxxdump/Makefile.depend14
-rw-r--r--usr.bin/clang/llvm-diff/Makefile.depend1
-rw-r--r--usr.bin/clang/llvm-dis/Makefile.depend2
-rw-r--r--usr.bin/clang/llvm-extract/Makefile.depend3
-rw-r--r--usr.bin/clang/llvm-link/Makefile.depend5
-rw-r--r--usr.bin/clang/llvm-lto/Makefile.depend17
-rw-r--r--usr.bin/clang/llvm-mc/Makefile.depend14
-rw-r--r--usr.bin/clang/llvm-nm/Makefile.depend15
-rw-r--r--usr.bin/clang/llvm-objdump/Makefile.depend14
-rw-r--r--usr.bin/clang/llvm-profdata/Makefile.depend2
-rw-r--r--usr.bin/clang/llvm-rtdyld/Makefile.depend14
-rw-r--r--usr.bin/clang/llvm-symbolizer/Makefile.depend1
-rw-r--r--usr.bin/clang/opt/Makefile.depend16
-rw-r--r--usr.bin/cmp/tests/Makefile.depend11
-rw-r--r--usr.bin/col/tests/Makefile.depend11
-rw-r--r--usr.bin/comm/tests/Makefile.depend11
-rw-r--r--usr.bin/cpio/tests/Makefile.depend25
-rw-r--r--usr.bin/cut/tests/Makefile.depend11
-rw-r--r--usr.bin/dirname/tests/Makefile.depend11
-rw-r--r--usr.bin/file2c/tests/Makefile.depend11
-rw-r--r--usr.bin/grep/tests/Makefile.depend11
-rw-r--r--usr.bin/gzip/tests/Makefile.depend11
-rw-r--r--usr.bin/ident/tests/Makefile.depend11
-rw-r--r--usr.bin/join/tests/Makefile.depend11
-rw-r--r--usr.bin/jot/tests/Makefile.depend11
-rw-r--r--usr.bin/kdump/kdump.c11
-rw-r--r--usr.bin/lastcomm/tests/Makefile.depend11
-rw-r--r--usr.bin/limits/tests/Makefile.depend11
-rw-r--r--usr.bin/m4/tests/Makefile.depend11
-rw-r--r--usr.bin/mkimg/tests/Makefile.depend11
-rw-r--r--usr.bin/ncal/tests/Makefile.depend11
-rw-r--r--usr.bin/printf/tests/Makefile.depend11
-rw-r--r--usr.bin/script/script.c36
-rw-r--r--usr.bin/sed/tests/Makefile.depend11
-rw-r--r--usr.bin/sed/tests/regress.multitest.out/Makefile.depend11
-rw-r--r--usr.bin/soelim/tests/Makefile.depend11
-rw-r--r--usr.bin/tar/tests/Makefile.depend19
-rw-r--r--usr.bin/tests/Makefile.depend11
-rw-r--r--usr.bin/timeout/tests/Makefile.depend11
-rw-r--r--usr.bin/tr/tests/Makefile.depend11
-rw-r--r--usr.bin/truncate/tests/Makefile.depend11
-rw-r--r--usr.bin/truss/setup.c203
-rw-r--r--usr.bin/truss/syscalls.c10
-rw-r--r--usr.bin/truss/truss.h4
-rw-r--r--usr.bin/units/tests/Makefile.depend11
-rw-r--r--usr.bin/uudecode/tests/Makefile.depend11
-rw-r--r--usr.bin/uuencode/tests/Makefile.depend11
-rw-r--r--usr.bin/xargs/tests/Makefile.depend11
-rw-r--r--usr.bin/xo/tests/Makefile.depend11
-rw-r--r--usr.bin/yacc/tests/Makefile.depend11
-rw-r--r--usr.sbin/chown/tests/Makefile.depend11
-rw-r--r--usr.sbin/etcupdate/tests/Makefile.depend11
-rw-r--r--usr.sbin/fstyp/tests/Makefile.depend11
-rw-r--r--usr.sbin/makefs/tests/Makefile.depend11
-rw-r--r--usr.sbin/newsyslog/tests/Makefile.depend11
-rw-r--r--usr.sbin/nmtree/tests/Makefile.depend11
-rw-r--r--usr.sbin/pw/tests/Makefile.depend11
-rw-r--r--usr.sbin/rpcbind/tests/Makefile.depend21
-rw-r--r--usr.sbin/sa/tests/Makefile.depend11
-rw-r--r--usr.sbin/tests/Makefile.depend11
699 files changed, 91231 insertions, 14881 deletions
diff --git a/Makefile b/Makefile
index 31313d54df36..d18eedef01b4 100644
--- a/Makefile
+++ b/Makefile
@@ -148,7 +148,7 @@ TGTS+= ${BITGTS}
PATH= /sbin:/bin:/usr/sbin:/usr/bin
MAKEOBJDIRPREFIX?= /usr/obj
-_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} ${MAKE} \
+_MAKEOBJDIRPREFIX!= /usr/bin/env -i PATH=${PATH} MK_AUTO_OBJ=no ${MAKE} \
${.MAKEFLAGS:MMAKEOBJDIRPREFIX=*} __MAKE_CONF=${__MAKE_CONF} \
-f /dev/null -V MAKEOBJDIRPREFIX dummy
.if !empty(_MAKEOBJDIRPREFIX)
diff --git a/Makefile.inc1 b/Makefile.inc1
index f2ba7a735223..40bc9fe5b1a9 100644
--- a/Makefile.inc1
+++ b/Makefile.inc1
@@ -179,9 +179,9 @@ OSRELDATE= 0
.endif
# Set VERSION for CTFMERGE to use via the default CTFFLAGS=-L VERSION.
-.if !defined(VERSION) && !make(showconfig)
-REVISION!= ${MAKE} -C ${SRCDIR}/release -V REVISION
-BRANCH!= ${MAKE} -C ${SRCDIR}/release -V BRANCH
+.if !defined(VERSION)
+REVISION!= MK_AUTO_OBJ=no ${MAKE} -C ${SRCDIR}/release -V REVISION
+BRANCH!= MK_AUTO_OBJ=no ${MAKE} -C ${SRCDIR}/release -V BRANCH
SRCRELDATE!= awk '/^\#define[[:space:]]*__FreeBSD_version/ { print $$3 }' \
${SRCDIR}/sys/sys/param.h
VERSION= FreeBSD ${REVISION}-${BRANCH:C/-p[0-9]+$//} ${TARGET_ARCH} ${SRCRELDATE}
@@ -244,14 +244,11 @@ _TARGET_CPUTYPE=${TARGET_CPUTYPE}
.else
_TARGET_CPUTYPE=dummy
.endif
-# Skip for showconfig as it is just wasted time and may invoke auto.obj.mk.
-.if !make(showconfig)
-_CPUTYPE!= MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
+_CPUTYPE!= MK_AUTO_OBJ=no MAKEFLAGS= CPUTYPE=${_TARGET_CPUTYPE} ${MAKE} \
-f /dev/null -m ${.CURDIR}/share/mk -V CPUTYPE
.if ${_CPUTYPE} != ${_TARGET_CPUTYPE}
.error CPUTYPE global should be set with ?=.
.endif
-.endif
.if make(buildworld)
BUILD_ARCH!= uname -p
.if ${MACHINE_ARCH} != ${BUILD_ARCH}
diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 53a1e08225e7..e53a91aaa24d 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -7843,22 +7843,6 @@ OLD_FILES+=usr/share/bsnmp/mibs/FOKUS-MIB.txt
OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-MIB.txt
OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-SNMPD.txt
OLD_FILES+=usr/share/bsnmp/mibs/BEGEMOT-NETGRAPH.txt
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.x
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xbn
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xn
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xr
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xs
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xu
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xc
-OLD_FILES+=usr/libdata/ldscripts/elf64_sparc.xsc
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.x
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xbn
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xn
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xr
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xs
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xu
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xc
-OLD_FILES+=usr/libdata/ldscripts/elf32_sparc.xsc
OLD_FILES+=usr/libdata/msdosfs/iso22dos
OLD_FILES+=usr/libdata/msdosfs/iso72dos
OLD_FILES+=usr/libdata/msdosfs/koi2dos
diff --git a/bin/cat/tests/Makefile.depend b/bin/cat/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/cat/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/date/tests/Makefile.depend b/bin/date/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/date/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/dd/tests/Makefile.depend b/bin/dd/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/dd/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/expr/tests/Makefile.depend b/bin/expr/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/expr/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/ls/tests/Makefile.depend b/bin/ls/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/ls/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/mv/tests/Makefile.depend b/bin/mv/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/mv/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/pax/tests/Makefile.depend b/bin/pax/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/pax/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/pkill/tests/Makefile.depend b/bin/pkill/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/pkill/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/options.c b/bin/sh/options.c
index 70a09c3c91d9..340d7e0b30ea 100644
--- a/bin/sh/options.c
+++ b/bin/sh/options.c
@@ -285,7 +285,7 @@ minus_o(char *name, int val)
static void
setoptionbyindex(int idx, int val)
{
- if (optletter[idx] == 'p' && !val && privileged) {
+ if (&optval[idx] == &privileged && !val && privileged) {
if (setgid(getgid()) == -1)
error("setgid");
if (setuid(getuid()) == -1)
@@ -294,9 +294,9 @@ setoptionbyindex(int idx, int val)
optval[idx] = val;
if (val) {
/* #%$ hack for ksh semantics */
- if (optletter[idx] == 'V')
+ if (&optval[idx] == &Vflag)
Eflag = 0;
- else if (optletter[idx] == 'E')
+ else if (&optval[idx] == &Eflag)
Vflag = 0;
}
}
diff --git a/bin/sh/tests/Makefile.depend b/bin/sh/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile
index c2f00a5460ce..11cea5f10af9 100644
--- a/bin/sh/tests/builtins/Makefile
+++ b/bin/sh/tests/builtins/Makefile
@@ -143,6 +143,7 @@ FILES+= return7.4
FILES+= return8.0
FILES+= set1.0
FILES+= set2.0
+FILES+= set3.0
FILES+= trap1.0
FILES+= trap10.0
FILES+= trap11.0
diff --git a/bin/sh/tests/builtins/Makefile.depend b/bin/sh/tests/builtins/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/builtins/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/builtins/set3.0 b/bin/sh/tests/builtins/set3.0
new file mode 100644
index 000000000000..c5536e96b7a1
--- /dev/null
+++ b/bin/sh/tests/builtins/set3.0
@@ -0,0 +1,4 @@
+# $FreeBSD$
+
+settings1=$(set +o) && set -o nolog && settings2=$(set +o) &&
+[ "$settings1" != "$settings2" ]
diff --git a/bin/sh/tests/errors/Makefile.depend b/bin/sh/tests/errors/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/errors/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/execution/Makefile.depend b/bin/sh/tests/execution/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/execution/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/expansion/Makefile.depend b/bin/sh/tests/expansion/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/expansion/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/parameters/Makefile.depend b/bin/sh/tests/parameters/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/parameters/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/parser/Makefile.depend b/bin/sh/tests/parser/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/parser/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sh/tests/set-e/Makefile.depend b/bin/sh/tests/set-e/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sh/tests/set-e/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/sleep/tests/Makefile.depend b/bin/sleep/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/sleep/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/test/tests/Makefile.depend b/bin/test/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/test/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/bin/tests/Makefile.depend b/bin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/bin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/contrib/opensolaris/cmd/zdb/zdb.c b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
index 346d817f3e86..bb45b5e90d80 100644
--- a/cddl/contrib/opensolaris/cmd/zdb/zdb.c
+++ b/cddl/contrib/opensolaris/cmd/zdb/zdb.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <stdio.h>
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
index 626d69c5b657..317063e890fb 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_iter.c
@@ -93,7 +93,7 @@ static int
zfs_callback(zfs_handle_t *zhp, void *data)
{
callback_data_t *cb = data;
- boolean_t dontclose = B_FALSE;
+ boolean_t should_close = B_TRUE;
boolean_t include_snaps = zfs_include_snapshots(zhp, cb);
boolean_t include_bmarks = (cb->cb_types & ZFS_TYPE_BOOKMARK);
@@ -121,7 +121,7 @@ zfs_callback(zfs_handle_t *zhp, void *data)
}
}
uu_avl_insert(cb->cb_avl, node, idx);
- dontclose = B_TRUE;
+ should_close = B_FALSE;
} else {
free(node);
}
@@ -147,7 +147,7 @@ zfs_callback(zfs_handle_t *zhp, void *data)
cb->cb_depth--;
}
- if (!dontclose)
+ if (should_close)
zfs_close(zhp);
return (0);
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
index 99f9a1e5441c..1d8b77c396ab 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs_main.c
@@ -29,6 +29,8 @@
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
*/
#include <assert.h>
@@ -751,7 +753,7 @@ zfs_do_create(int argc, char **argv)
{
zfs_type_t type = ZFS_TYPE_FILESYSTEM;
zfs_handle_t *zhp = NULL;
- uint64_t volsize;
+ uint64_t volsize = 0;
int c;
boolean_t noreserve = B_FALSE;
boolean_t bflag = B_FALSE;
@@ -846,14 +848,14 @@ zfs_do_create(int argc, char **argv)
if (type == ZFS_TYPE_VOLUME && !noreserve) {
zpool_handle_t *zpool_handle;
- nvlist_t *real_props;
+ nvlist_t *real_props = NULL;
uint64_t spa_version;
char *p;
zfs_prop_t resv_prop;
char *strval;
char msg[1024];
- if (p = strchr(argv[0], '/'))
+ if ((p = strchr(argv[0], '/')) != NULL)
*p = '\0';
zpool_handle = zpool_open(g_zfs, argv[0]);
if (p != NULL)
@@ -2360,6 +2362,9 @@ us_compare(const void *larg, const void *rarg, void *unused)
if (rv64 != lv64)
rc = (rv64 < lv64) ? 1 : -1;
break;
+
+ default:
+ break;
}
if (rc != 0) {
@@ -2415,7 +2420,7 @@ userspace_cb(void *arg, const char *domain, uid_t rid, uint64_t space)
nvlist_t *props;
us_node_t *n;
zfs_sort_column_t *sortcol = cb->cb_sortcol;
- unsigned type;
+ unsigned type = 0;
const char *typestr;
size_t namelen;
size_t typelen;
@@ -3973,7 +3978,7 @@ zfs_do_send(int argc, char **argv)
static int
zfs_do_receive(int argc, char **argv)
{
- int c, err;
+ int c, err = 0;
recvflags_t flags = { 0 };
boolean_t abort_resumable = B_FALSE;
@@ -4233,7 +4238,7 @@ deleg_perm_type(zfs_deleg_note_t note)
}
}
-static int inline
+static int
who_type2weight(zfs_deleg_who_type_t who_type)
{
int res;
@@ -4453,7 +4458,7 @@ fs_perm_fini(fs_perm_t *fsperm)
uu_avl_destroy(fsperm->fsp_uge_avl);
}
-static void inline
+static void
set_deleg_perm_node(uu_avl_t *avl, deleg_perm_node_t *node,
zfs_deleg_who_type_t who_type, const char *name, char locality)
{
@@ -4521,7 +4526,7 @@ parse_fs_perm(fs_perm_t *fsperm, nvlist_t *nvl)
nvlist_t *nvl2 = NULL;
const char *name = nvpair_name(nvp);
uu_avl_t *avl = NULL;
- uu_avl_pool_t *avl_pool;
+ uu_avl_pool_t *avl_pool = NULL;
zfs_deleg_who_type_t perm_type = name[0];
char perm_locality = name[1];
const char *perm_name = name + 3;
@@ -4550,6 +4555,9 @@ parse_fs_perm(fs_perm_t *fsperm, nvlist_t *nvl)
avl_pool = fspset->fsps_who_perm_avl_pool;
avl = fsperm->fsp_uge_avl;
break;
+
+ default:
+ assert(!"unhandled zfs_deleg_who_type_t");
}
if (is_set) {
@@ -4585,6 +4593,9 @@ parse_fs_perm(fs_perm_t *fsperm, nvlist_t *nvl)
if (g)
nice_name = g->gr_name;
break;
+
+ default:
+ break;
}
if (nice_name != NULL)
@@ -4853,11 +4864,12 @@ parse_allow_args(int argc, char **argv, boolean_t un, struct allow_opts *opts)
allow_usage(un, B_FALSE,
gettext("-u, -g, and -e are mutually exclusive\n"));
- if (opts->prt_usage)
+ if (opts->prt_usage) {
if (argc == 0 && all_sum == 0)
allow_usage(un, B_TRUE, NULL);
else
usage(B_FALSE);
+ }
if (opts->set) {
if (csuge_sum > 1)
@@ -4906,8 +4918,8 @@ store_allow_perm(zfs_deleg_who_type_t type, boolean_t local, boolean_t descend,
int i;
char ld[2] = { '\0', '\0' };
char who_buf[ZFS_MAXNAMELEN+32];
- char base_type;
- char set_type;
+ char base_type = '\0';
+ char set_type = '\0';
nvlist_t *base_nvl = NULL;
nvlist_t *set_nvl = NULL;
nvlist_t *nvl;
@@ -4956,6 +4968,10 @@ store_allow_perm(zfs_deleg_who_type_t type, boolean_t local, boolean_t descend,
ld[0] = ZFS_DELEG_LOCAL;
if (descend)
ld[1] = ZFS_DELEG_DESCENDENT;
+ break;
+
+ default:
+ assert(set_type != '\0' && base_type != '\0');
}
if (perms != NULL) {
@@ -5060,7 +5076,7 @@ construct_fsacl_list(boolean_t un, struct allow_opts *opts, nvlist_t **nvlp)
while (curr < end) {
const char *who;
- zfs_deleg_who_type_t who_type;
+ zfs_deleg_who_type_t who_type = ZFS_DELEG_WHO_UNKNOWN;
char *endch;
char *delim = strchr(curr, ',');
char errbuf[256];
@@ -5110,12 +5126,13 @@ construct_fsacl_list(boolean_t un, struct allow_opts *opts, nvlist_t **nvlp)
p = getpwuid(rid);
}
- if (p == NULL)
+ if (p == NULL) {
if (*endch != '\0') {
g = getgrnam(curr);
} else {
g = getgrgid(rid);
}
+ }
if (p != NULL) {
who_type = ZFS_DELEG_USER;
@@ -5188,7 +5205,7 @@ print_set_creat_perms(uu_avl_t *who_avl)
}
}
-static void inline
+static void
print_uge_deleg_perms(uu_avl_t *who_avl, boolean_t local, boolean_t descend,
const char *title)
{
@@ -5239,6 +5256,10 @@ print_uge_deleg_perms(uu_avl_t *who_avl, boolean_t local, boolean_t descend,
case ZFS_DELEG_EVERYONE:
who = gettext("everyone");
who_name = NULL;
+ break;
+
+ default:
+ assert(who != NULL);
}
prt_who = B_FALSE;
@@ -5407,8 +5428,7 @@ zfs_do_allow_unallow_impl(int argc, char **argv, boolean_t un)
cleanup0:
nvlist_free(perm_nvl);
- if (update_perm_nvl != NULL)
- nvlist_free(update_perm_nvl);
+ nvlist_free(update_perm_nvl);
cleanup1:
fs_perm_set_fini(&fs_perm_set);
cleanup2:
@@ -5956,7 +5976,7 @@ share_mount_one(zfs_handle_t *zhp, int op, int flags, char *protocol,
shared_nfs = zfs_is_shared_nfs(zhp, NULL);
shared_smb = zfs_is_shared_smb(zhp, NULL);
- if (shared_nfs && shared_smb ||
+ if ((shared_nfs && shared_smb) ||
(shared_nfs && strcmp(shareopts, "on") == 0 &&
strcmp(smbshareopts, "off") == 0) ||
(shared_smb && strcmp(smbshareopts, "on") == 0 &&
@@ -6430,7 +6450,7 @@ unshare_unmount(int op, int argc, char **argv)
*/
struct mnttab entry;
uu_avl_pool_t *pool;
- uu_avl_t *tree;
+ uu_avl_t *tree = NULL;
unshare_unmount_node_t *node;
uu_avl_index_t idx;
uu_avl_walk_t *walk;
@@ -6924,7 +6944,7 @@ zfs_do_diff(int argc, char **argv)
if (copy == NULL)
usage(B_FALSE);
- if (atp = strchr(copy, '@'))
+ if ((atp = strchr(copy, '@')) != NULL)
*atp = '\0';
if ((zhp = zfs_open(g_zfs, copy, ZFS_TYPE_FILESYSTEM)) == NULL)
diff --git a/cddl/contrib/opensolaris/cmd/zinject/zinject.c b/cddl/contrib/opensolaris/cmd/zinject/zinject.c
index ddcdb1ffd564..bf42bc483830 100644
--- a/cddl/contrib/opensolaris/cmd/zinject/zinject.c
+++ b/cddl/contrib/opensolaris/cmd/zinject/zinject.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
*/
/*
@@ -229,21 +229,57 @@ usage(void)
"\t\tall records if 'all' is specificed.\n"
"\n"
"\tzinject -p <function name> pool\n"
+ "\n"
"\t\tInject a panic fault at the specified function. Only \n"
"\t\tfunctions which call spa_vdev_config_exit(), or \n"
"\t\tspa_vdev_exit() will trigger a panic.\n"
"\n"
"\tzinject -d device [-e errno] [-L <nvlist|uber|pad1|pad2>] [-F]\n"
"\t [-T <read|write|free|claim|all> pool\n"
+ "\n"
"\t\tInject a fault into a particular device or the device's\n"
"\t\tlabel. Label injection can either be 'nvlist', 'uber',\n "
"\t\t'pad1', or 'pad2'.\n"
"\t\t'errno' can be 'nxio' (the default), 'io', or 'dtl'.\n"
"\n"
"\tzinject -d device -A <degrade|fault> pool\n"
+ "\n"
"\t\tPerform a specific action on a particular device\n"
"\n"
+ "\tzinject -d device -D latency:lanes pool\n"
+ "\n"
+ "\t\tAdd an artificial delay to IO requests on a particular\n"
+ "\t\tdevice, such that the requests take a minimum of 'latency'\n"
+ "\t\tmilliseconds to complete. Each delay has an associated\n"
+ "\t\tnumber of 'lanes' which defines the number of concurrent\n"
+ "\t\tIO requests that can be processed.\n"
+ "\n"
+ "\t\tFor example, with a single lane delay of 10 ms (-D 10:1),\n"
+ "\t\tthe device will only be able to service a single IO request\n"
+ "\t\tat a time with each request taking 10 ms to complete. So,\n"
+ "\t\tif only a single request is submitted every 10 ms, the\n"
+ "\t\taverage latency will be 10 ms; but if more than one request\n"
+ "\t\tis submitted every 10 ms, the average latency will be more\n"
+ "\t\tthan 10 ms.\n"
+ "\n"
+ "\t\tSimilarly, if a delay of 10 ms is specified to have two\n"
+ "\t\tlanes (-D 10:2), then the device will be able to service\n"
+ "\t\ttwo requests at a time, each with a minimum latency of\n"
+ "\t\t10 ms. So, if two requests are submitted every 10 ms, then\n"
+ "\t\tthe average latency will be 10 ms; but if more than two\n"
+ "\t\trequests are submitted every 10 ms, the average latency\n"
+ "\t\twill be more than 10 ms.\n"
+ "\n"
+ "\t\tAlso note, these delays are additive. So two invocations\n"
+ "\t\tof '-D 10:1', is roughly equivalent to a single invocation\n"
+ "\t\tof '-D 10:2'. This also means, one can specify multiple\n"
+ "\t\tlanes with differing target latencies. For example, an\n"
+ "\t\tinvocation of '-D 10:1' followed by '-D 25:2' will\n"
+ "\t\tcreate 3 lanes on the device; one lane with a latency\n"
+ "\t\tof 10 ms and two lanes with a 25 ms latency.\n"
+ "\n"
"\tzinject -I [-s <seconds> | -g <txgs>] pool\n"
+ "\n"
"\t\tCause the pool to stop writing blocks yet not\n"
"\t\treport errors for a duration. Simulates buggy hardware\n"
"\t\tthat fails to honor cache flush requests.\n"
@@ -357,6 +393,9 @@ print_device_handler(int id, const char *pool, zinject_record_t *record,
if (record->zi_guid == 0 || record->zi_func[0] != '\0')
return (0);
+ if (record->zi_cmd == ZINJECT_DELAY_IO)
+ return (0);
+
if (*count == 0) {
(void) printf("%3s %-15s %s\n", "ID", "POOL", "GUID");
(void) printf("--- --------------- ----------------\n");
@@ -371,6 +410,35 @@ print_device_handler(int id, const char *pool, zinject_record_t *record,
}
static int
+print_delay_handler(int id, const char *pool, zinject_record_t *record,
+ void *data)
+{
+ int *count = data;
+
+ if (record->zi_guid == 0 || record->zi_func[0] != '\0')
+ return (0);
+
+ if (record->zi_cmd != ZINJECT_DELAY_IO)
+ return (0);
+
+ if (*count == 0) {
+ (void) printf("%3s %-15s %-15s %-15s %s\n",
+ "ID", "POOL", "DELAY (ms)", "LANES", "GUID");
+ (void) printf("--- --------------- --------------- "
+ "--------------- ----------------\n");
+ }
+
+ *count += 1;
+
+ (void) printf("%3d %-15s %-15llu %-15llu %llx\n", id, pool,
+ (u_longlong_t)NSEC2MSEC(record->zi_timer),
+ (u_longlong_t)record->zi_nlanes,
+ (u_longlong_t)record->zi_guid);
+
+ return (0);
+}
+
+static int
print_panic_handler(int id, const char *pool, zinject_record_t *record,
void *data)
{
@@ -407,6 +475,13 @@ print_all_handlers(void)
count = 0;
}
+ (void) iter_handlers(print_delay_handler, &count);
+ if (count > 0) {
+ total += count;
+ (void) printf("\n");
+ count = 0;
+ }
+
(void) iter_handlers(print_data_handler, &count);
if (count > 0) {
total += count;
@@ -549,6 +624,35 @@ perform_action(const char *pool, zinject_record_t *record, int cmd)
return (1);
}
+static int
+parse_delay(char *str, uint64_t *delay, uint64_t *nlanes)
+{
+ unsigned long scan_delay;
+ unsigned long scan_nlanes;
+
+ if (sscanf(str, "%lu:%lu", &scan_delay, &scan_nlanes) != 2)
+ return (1);
+
+ /*
+ * We explicitly disallow a delay of zero here, because we key
+ * off this value being non-zero in translate_device(), to
+ * determine if the fault is a ZINJECT_DELAY_IO fault or not.
+ */
+ if (scan_delay == 0)
+ return (1);
+
+ /*
+ * The units for the CLI delay parameter is milliseconds, but
+ * the data passed to the kernel is interpreted as nanoseconds.
+ * Thus we scale the milliseconds to nanoseconds here, and this
+ * nanosecond value is used to pass the delay to the kernel.
+ */
+ *delay = MSEC2NSEC(scan_delay);
+ *nlanes = scan_nlanes;
+
+ return (0);
+}
+
int
main(int argc, char **argv)
{
@@ -632,8 +736,9 @@ main(int argc, char **argv)
device = optarg;
break;
case 'D':
- record.zi_timer = strtoull(optarg, &end, 10);
- if (errno != 0 || *end != '\0') {
+ ret = parse_delay(optarg, &record.zi_timer,
+ &record.zi_nlanes);
+ if (ret != 0) {
(void) fprintf(stderr, "invalid i/o delay "
"value: '%s'\n", optarg);
usage();
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c
index 6ba91b105fe9..2f7de933ed41 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_iter.c
@@ -22,8 +22,9 @@
* Copyright 2007 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
-
-#pragma ident "%Z%%M% %I% %E% SMI"
+/*
+ * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
+ */
#include <solaris.h>
#include <libintl.h>
@@ -132,7 +133,8 @@ pool_list_get(int argc, char **argv, zprop_list_t **proplist, int *err)
for (i = 0; i < argc; i++) {
zpool_handle_t *zhp;
- if (zhp = zpool_open_canfail(g_zfs, argv[i])) {
+ if ((zhp = zpool_open_canfail(g_zfs, argv[i])) !=
+ NULL) {
if (add_pool(zhp, zlp) != 0)
*err = B_TRUE;
} else {
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
index c6662637c150..b979833f9924 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_main.c
@@ -26,6 +26,7 @@
* Copyright (c) 2012 by Frederik Wessels. All rights reserved.
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 by Prasad Joshi (sTec). All rights reserved.
+ * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
*/
#include <solaris.h>
@@ -3171,33 +3172,6 @@ zpool_do_list(int argc, char **argv)
return (ret);
}
-static nvlist_t *
-zpool_get_vdev_by_name(nvlist_t *nv, char *name)
-{
- nvlist_t **child;
- uint_t c, children;
- nvlist_t *match;
- char *path;
-
- if (nvlist_lookup_nvlist_array(nv, ZPOOL_CONFIG_CHILDREN,
- &child, &children) != 0) {
- verify(nvlist_lookup_string(nv, ZPOOL_CONFIG_PATH, &path) == 0);
- if (strncmp(name, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
- name += sizeof(_PATH_DEV) - 1;
- if (strncmp(path, _PATH_DEV, sizeof(_PATH_DEV) - 1) == 0)
- path += sizeof(_PATH_DEV) - 1;
- if (strcmp(name, path) == 0)
- return (nv);
- return (NULL);
- }
-
- for (c = 0; c < children; c++)
- if ((match = zpool_get_vdev_by_name(child[c], name)) != NULL)
- return (match);
-
- return (NULL);
-}
-
static int
zpool_do_attach_or_replace(int argc, char **argv, int replacing)
{
@@ -3413,8 +3387,7 @@ zpool_do_split(int argc, char **argv)
if (add_prop_list(
zpool_prop_to_name(ZPOOL_PROP_ALTROOT), optarg,
&props, B_TRUE) != 0) {
- if (props)
- nvlist_free(props);
+ nvlist_free(props);
usage(B_FALSE);
}
break;
@@ -3427,8 +3400,7 @@ zpool_do_split(int argc, char **argv)
propval++;
if (add_prop_list(optarg, propval,
&props, B_TRUE) != 0) {
- if (props)
- nvlist_free(props);
+ nvlist_free(props);
usage(B_FALSE);
}
} else {
@@ -3928,7 +3900,7 @@ print_scan_status(pool_scan_stat_t *ps)
*/
if (ps->pss_state == DSS_FINISHED) {
uint64_t minutes_taken = (end - start) / 60;
- char *fmt;
+ char *fmt = NULL;
if (ps->pss_func == POOL_SCAN_SCRUB) {
fmt = gettext("scrub repaired %s in %lluh%um with "
@@ -5562,7 +5534,7 @@ find_command_idx(char *command, int *idx)
int
main(int argc, char **argv)
{
- int ret;
+ int ret = 0;
int i;
char *cmdname;
diff --git a/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c b/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
index efd828f49f36..227d25abff92 100644
--- a/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
+++ b/cddl/contrib/opensolaris/cmd/zpool/zpool_vdev.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013 by Delphix. All rights reserved.
+ * Copyright 2016 Igor Kozhukhov <ikozhukhov@gmail.com>.
*/
/*
@@ -588,7 +589,9 @@ get_replication(nvlist_t *nvroot, boolean_t fatal)
uint_t c, children;
nvlist_t *nv;
char *type;
- replication_level_t lastrep, rep, *ret;
+ replication_level_t lastrep = {0};
+ replication_level_t rep;
+ replication_level_t *ret;
boolean_t dontreport;
ret = safe_malloc(sizeof (replication_level_t));
@@ -1080,7 +1083,7 @@ is_device_in_use(nvlist_t *config, nvlist_t *nv, boolean_t force,
nvlist_t **child;
uint_t c, children;
char *type, *path;
- int ret;
+ int ret = 0;
char buf[MAXPATHLEN];
uint64_t wholedisk;
boolean_t anyinuse = B_FALSE;
@@ -1449,8 +1452,7 @@ split_mirror_vdev(zpool_handle_t *zhp, char *newname, nvlist_t *props,
}
if (zpool_vdev_split(zhp, newname, &newroot, props, flags) != 0) {
- if (newroot != NULL)
- nvlist_free(newroot);
+ nvlist_free(newroot);
return (NULL);
}
diff --git a/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c b/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c
index 83a5b54b001d..32e370dde374 100644
--- a/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c
+++ b/cddl/contrib/opensolaris/cmd/zstreamdump/zstreamdump.c
@@ -26,6 +26,7 @@
/*
* Copyright (c) 2013, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <ctype.h>
diff --git a/cddl/contrib/opensolaris/cmd/ztest/ztest.c b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
index 7cc8d5f3639a..211348cf7426 100644
--- a/cddl/contrib/opensolaris/cmd/ztest/ztest.c
+++ b/cddl/contrib/opensolaris/cmd/ztest/ztest.c
@@ -24,6 +24,7 @@
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/*
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
index 8ab15461c8ee..1b4b46c1dd08 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
@@ -28,6 +28,7 @@
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _LIBZFS_H
@@ -326,7 +327,7 @@ typedef enum {
ZPOOL_STATUS_VERSION_OLDER, /* older legacy on-disk version */
ZPOOL_STATUS_FEAT_DISABLED, /* supported features are disabled */
ZPOOL_STATUS_RESILVERING, /* device being resilvered */
- ZPOOL_STATUS_OFFLINE_DEV, /* device online */
+ ZPOOL_STATUS_OFFLINE_DEV, /* device offline */
ZPOOL_STATUS_REMOVED_DEV, /* removed device */
ZPOOL_STATUS_NON_NATIVE_ASHIFT, /* (e.g. 512e dev with ashift of 9) */
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
index 833e1b675741..b9ecd9dccfa0 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_compat.c
@@ -74,6 +74,9 @@ zcmd_ioctl(int fd, int request, zfs_cmd_t *zc)
if (zfs_ioctl_version >= ZFS_IOCVER_DEADMAN) {
switch (zfs_ioctl_version) {
+ case ZFS_IOCVER_RESUME:
+ cflag = ZFS_CMD_COMPAT_RESUME;
+ break;
case ZFS_IOCVER_EDBP:
cflag = ZFS_CMD_COMPAT_EDBP;
break;
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c
index c3dafd6a777c..2f332a8b8c9a 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_config.c
@@ -318,8 +318,7 @@ zpool_refresh_stats(zpool_handle_t *zhp, boolean_t *missing)
verify(nvlist_lookup_uint64(config,
ZPOOL_CONFIG_POOL_TXG, &newtxg) == 0);
- if (zhp->zpool_old_config != NULL)
- nvlist_free(zhp->zpool_old_config);
+ nvlist_free(zhp->zpool_old_config);
if (oldtxg != newtxg) {
nvlist_free(zhp->zpool_config);
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
index 234d2cd5bf97..504db96f8283 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
@@ -29,6 +29,7 @@
* Copyright (c) 2012 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <ctype.h>
@@ -2063,8 +2064,7 @@ get_numeric_property(zfs_handle_t *zhp, zfs_prop_t prop, zprop_source_t *src,
zcmd_free_nvlists(&zc);
return (-1);
}
- if (zplprops)
- nvlist_free(zplprops);
+ nvlist_free(zplprops);
zcmd_free_nvlists(&zc);
break;
@@ -4339,8 +4339,7 @@ zfs_smb_acl_mgmt(libzfs_handle_t *hdl, char *dataset, char *path,
return (-1);
}
error = ioctl(hdl->libzfs_fd, ZFS_IOC_SMB_ACL, &zc);
- if (nvlist)
- nvlist_free(nvlist);
+ nvlist_free(nvlist);
return (error);
}
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
index bb49eba0f835..28b1e2e12e6b 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_diff.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
+ * Copyright 2016 Joyent, Inc.
*/
/*
@@ -136,12 +137,13 @@ get_stats_for_obj(differ_info_t *di, const char *dsname, uint64_t obj,
static void
stream_bytes(FILE *fp, const char *string)
{
- while (*string) {
- if (*string > ' ' && *string != '\\' && *string < '\177')
- (void) fprintf(fp, "%c", *string++);
- else {
- (void) fprintf(fp, "\\%03hho",
- (unsigned char)*string++);
+ char c;
+
+ while ((c = *string++) != '\0') {
+ if (c > ' ' && c != '\\' && c < '\177') {
+ (void) fprintf(fp, "%c", c);
+ } else {
+ (void) fprintf(fp, "\\%03o", (uint8_t)c);
}
}
}
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
index 09870242295f..133cc6f248db 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_import.c
@@ -1331,8 +1331,7 @@ error:
venext = ve->ve_next;
for (ce = ve->ve_configs; ce != NULL; ce = cenext) {
cenext = ce->ce_next;
- if (ce->ce_config)
- nvlist_free(ce->ce_config);
+ nvlist_free(ce->ce_config);
free(ce);
}
free(ve);
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
index 7cdcfc90feca..4dc48fa88f91 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_pool.c
@@ -1054,12 +1054,9 @@ zpool_open(libzfs_handle_t *hdl, const char *pool)
void
zpool_close(zpool_handle_t *zhp)
{
- if (zhp->zpool_config)
- nvlist_free(zhp->zpool_config);
- if (zhp->zpool_old_config)
- nvlist_free(zhp->zpool_old_config);
- if (zhp->zpool_props)
- nvlist_free(zhp->zpool_props);
+ nvlist_free(zhp->zpool_config);
+ nvlist_free(zhp->zpool_old_config);
+ nvlist_free(zhp->zpool_props);
free(zhp);
}
@@ -1577,8 +1574,7 @@ zpool_import(libzfs_handle_t *hdl, nvlist_t *config, const char *newname,
ret = zpool_import_props(hdl, config, newname, props,
ZFS_IMPORT_NORMAL);
- if (props)
- nvlist_free(props);
+ nvlist_free(props);
return (ret);
}
@@ -2901,8 +2897,7 @@ zpool_vdev_split(zpool_handle_t *zhp, char *newname, nvlist_t **newroot,
&children) != 0) {
zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
"Source pool is missing vdev tree"));
- if (zc_props)
- nvlist_free(zc_props);
+ nvlist_free(zc_props);
return (-1);
}
@@ -3050,10 +3045,8 @@ out:
free(varray);
}
zcmd_free_nvlists(&zc);
- if (zc_props)
- nvlist_free(zc_props);
- if (newconfig)
- nvlist_free(newconfig);
+ nvlist_free(zc_props);
+ nvlist_free(newconfig);
if (freelist) {
nvlist_free(*newroot);
*newroot = NULL;
diff --git a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
index 4fbab42917c0..723cd4299abf 100644
--- a/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
+++ b/cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
@@ -27,6 +27,7 @@
* All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright 2015, OmniTI Computer Consulting, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <assert.h>
@@ -2793,8 +2794,7 @@ zfs_receive_package(libzfs_handle_t *hdl, int fd, const char *destname,
out:
fsavl_destroy(stream_avl);
- if (stream_nv)
- nvlist_free(stream_nv);
+ nvlist_free(stream_nv);
if (softerr)
error = -2;
if (anyerr)
diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
index 69d332a5f8eb..3accb2c3f056 100644
--- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
+++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/*
diff --git a/cddl/lib/tests/Makefile.depend b/cddl/lib/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/lib/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/sbin/tests/Makefile.depend b/cddl/sbin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/sbin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/tests/Makefile.depend b/cddl/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.bin/tests/Makefile.depend b/cddl/usr.bin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.bin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/Makefile.depend b/cddl/usr.sbin/dtrace/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/aggs/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/arithmetic/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/arrays/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/assocs/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/begin/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/begin/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/begin/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/bitfields/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/buffering/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/builtinvar/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/cg/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/cg/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/cg/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/clauses/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/cpc/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/decls/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/decls/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/decls/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/docsExamples/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/drops/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/drops/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/drops/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/dtraceUtil/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/end/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/end/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/end/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/enum/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/enum/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/enum/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/error/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/error/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/error/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/exit/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/exit/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/exit/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/fbtprovider/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/funcs/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/grammar/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/include/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/include/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/include/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/inline/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/inline/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/inline/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/io/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/io/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/io/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/ip/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/ip/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/ip/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/java_api/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/json/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/json/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/json/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/lexer/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/llquantize/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/mdb/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/mib/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/mib/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/mib/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/misc/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/misc/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/misc/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/multiaggs/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/offsetof/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/operators/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/operators/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/operators/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/pid/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/pid/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/pid/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/plockstat/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/pointers/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/pragma/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/predicates/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/preprocessor/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/print/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/print/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/print/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/printa/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/printa/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/printa/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/printf/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/printf/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/printf/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/privs/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/privs/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/privs/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/probes/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/probes/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/probes/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/proc/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/proc/Makefile.depend
new file mode 100644
index 000000000000..7543607a575c
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/proc/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/librt \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile.depend
new file mode 100644
index 000000000000..43d71f8b2760
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile.depend
@@ -0,0 +1,16 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/providers/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/providers/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/providers/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/raise/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/raise/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/raise/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/rates/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/rates/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/rates/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/safety/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/safety/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/safety/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/scalars/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/sched/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/sched/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/sched/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/scripting/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/sdt/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/sizeof/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/speculation/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/stability/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/stability/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/stability/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/stack/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/stack/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/stack/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/stackdepth/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/stop/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/stop/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/stop/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/strlen/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/strtoll/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/struct/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/struct/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/struct/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/syscall/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/tick-n/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/trace/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/trace/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/trace/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/tracemem/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/translators/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/translators/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/translators/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/typedef/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/types/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/types/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/types/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/uctf/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/union/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/union/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/union/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/usdt/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/ustack/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/vars/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/vars/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/vars/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/dtrace/tests/common/version/Makefile.depend b/cddl/usr.sbin/dtrace/tests/common/version/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/dtrace/tests/common/version/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/cddl/usr.sbin/tests/Makefile.depend b/cddl/usr.sbin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/cddl/usr.sbin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c b/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c
index 4d2a93bab004..34fd5cca9581 100644
--- a/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c
+++ b/contrib/netbsd-tests/lib/libc/setjmp/t_setjmp.c
@@ -87,7 +87,7 @@ __RCSID("$NetBSD: t_setjmp.c,v 1.1 2010/12/27 19:35:31 pgoyette Exp $");
static int expectsignal;
static void
-aborthandler(int signo)
+aborthandler(int signo __unused)
{
ATF_REQUIRE_MSG(expectsignal, "kill(SIGABRT) succeeded");
atf_tc_pass();
diff --git a/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c b/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c
index 4437c927214e..2014470747a8 100644
--- a/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c
+++ b/contrib/netbsd-tests/lib/libc/setjmp/t_threadjmp.c
@@ -91,7 +91,7 @@ static pthread_t myself = NULL;
static int expectsignal;
static void
-aborthandler(int signo)
+aborthandler(int signo __unused)
{
ATF_REQUIRE(myself == pthread_self());
ATF_REQUIRE_MSG(expectsignal, "kill(SIGABRT) succeeded");
diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist
index ea10412a94e9..d4410dbc4282 100644
--- a/etc/mtree/BSD.tests.dist
+++ b/etc/mtree/BSD.tests.dist
@@ -283,6 +283,8 @@
..
ssp
..
+ setjmp
+ ..
stdio
..
stdlib
diff --git a/etc/rc.d/abi b/etc/rc.d/abi
index 3765b058114f..5021843841fd 100755
--- a/etc/rc.d/abi
+++ b/etc/rc.d/abi
@@ -27,6 +27,11 @@ linux_start()
echo -n ' linux'
load_kld -e 'linux(aout|elf)' linux
+ case `sysctl -n hw.machine_arch` in
+ amd64)
+ load_kld -e 'linux64elf' linux64
+ ;;
+ esac
if [ -x /compat/linux/sbin/ldconfigDisabled ]; then
_tmpdir=`mktemp -d -t linux-ldconfig`
/compat/linux/sbin/ldconfig -C ${_tmpdir}/ld.so.cache
diff --git a/gnu/lib/tests/Makefile.depend b/gnu/lib/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/gnu/lib/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/gnu/tests/Makefile.depend b/gnu/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/gnu/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/gnu/usr.bin/diff/tests/Makefile.depend b/gnu/usr.bin/diff/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/gnu/usr.bin/diff/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/gnu/usr.bin/tests/Makefile.depend b/gnu/usr.bin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/gnu/usr.bin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/atf/libatf-c++/tests/Makefile.depend b/lib/atf/libatf-c++/tests/Makefile.depend
new file mode 100644
index 000000000000..494810e117f6
--- /dev/null
+++ b/lib/atf/libatf-c++/tests/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/atf/libatf-c++ \
+ lib/libc \
+ lib/libc++ \
+ lib/libcompiler_rt \
+ lib/libcxxrt \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/atf/libatf-c++/tests/detail/Makefile.depend b/lib/atf/libatf-c++/tests/detail/Makefile.depend
new file mode 100644
index 000000000000..494810e117f6
--- /dev/null
+++ b/lib/atf/libatf-c++/tests/detail/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/atf/libatf-c++ \
+ lib/libc \
+ lib/libc++ \
+ lib/libcompiler_rt \
+ lib/libcxxrt \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/atf/libatf-c/tests/Makefile.depend b/lib/atf/libatf-c/tests/Makefile.depend
new file mode 100644
index 000000000000..74074b9588ec
--- /dev/null
+++ b/lib/atf/libatf-c/tests/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/atf/libatf-c/tests/detail/Makefile.depend b/lib/atf/libatf-c/tests/detail/Makefile.depend
new file mode 100644
index 000000000000..74074b9588ec
--- /dev/null
+++ b/lib/atf/libatf-c/tests/detail/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/atf/tests/Makefile.depend b/lib/atf/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/lib/atf/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/atf/tests/test-programs/Makefile.depend b/lib/atf/tests/test-programs/Makefile.depend
new file mode 100644
index 000000000000..494810e117f6
--- /dev/null
+++ b/lib/atf/tests/test-programs/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/atf/libatf-c++ \
+ lib/libc \
+ lib/libc++ \
+ lib/libcompiler_rt \
+ lib/libcxxrt \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libclangcodegen/Makefile.depend b/lib/clang/libclangcodegen/Makefile.depend
index 9a1b84e49bcb..7bd22d4fd361 100644
--- a/lib/clang/libclangcodegen/Makefile.depend
+++ b/lib/clang/libclangcodegen/Makefile.depend
@@ -7,7 +7,7 @@ DIRDEPS = \
lib/libc++ \
lib/msun \
usr.bin/clang/clang-tblgen.host \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libclangdriver/Makefile.depend b/lib/clang/libclangdriver/Makefile.depend
index 9a1b84e49bcb..7bd22d4fd361 100644
--- a/lib/clang/libclangdriver/Makefile.depend
+++ b/lib/clang/libclangdriver/Makefile.depend
@@ -7,7 +7,7 @@ DIRDEPS = \
lib/libc++ \
lib/msun \
usr.bin/clang/clang-tblgen.host \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libclangfrontend/Makefile.depend b/lib/clang/libclangfrontend/Makefile.depend
index 9a1b84e49bcb..7bd22d4fd361 100644
--- a/lib/clang/libclangfrontend/Makefile.depend
+++ b/lib/clang/libclangfrontend/Makefile.depend
@@ -7,7 +7,7 @@ DIRDEPS = \
lib/libc++ \
lib/msun \
usr.bin/clang/clang-tblgen.host \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libclangfrontendtool/Makefile.depend b/lib/clang/libclangfrontendtool/Makefile.depend
index 9a1b84e49bcb..7bd22d4fd361 100644
--- a/lib/clang/libclangfrontendtool/Makefile.depend
+++ b/lib/clang/libclangfrontendtool/Makefile.depend
@@ -7,7 +7,7 @@ DIRDEPS = \
lib/libc++ \
lib/msun \
usr.bin/clang/clang-tblgen.host \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/liblldbExpression/Makefile.depend b/lib/clang/liblldbExpression/Makefile.depend
index 9a1b84e49bcb..7bd22d4fd361 100644
--- a/lib/clang/liblldbExpression/Makefile.depend
+++ b/lib/clang/liblldbExpression/Makefile.depend
@@ -7,7 +7,7 @@ DIRDEPS = \
lib/libc++ \
lib/msun \
usr.bin/clang/clang-tblgen.host \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/liblldbInitialization/Makefile.depend b/lib/clang/liblldbInitialization/Makefile.depend
index 3e7f3f5e7165..264ede1c30ce 100644
--- a/lib/clang/liblldbInitialization/Makefile.depend
+++ b/lib/clang/liblldbInitialization/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/clang-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/liblldbPluginExpressionParserClang/Makefile.depend b/lib/clang/liblldbPluginExpressionParserClang/Makefile.depend
new file mode 100644
index 000000000000..7bd22d4fd361
--- /dev/null
+++ b/lib/clang/liblldbPluginExpressionParserClang/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+ usr.bin/clang/clang-tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/liblldbPluginExpressionParserGo/Makefile.depend b/lib/clang/liblldbPluginExpressionParserGo/Makefile.depend
new file mode 100644
index 000000000000..3e7f3f5e7165
--- /dev/null
+++ b/lib/clang/liblldbPluginExpressionParserGo/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/liblldbPluginLanguageCPlusPlus/Makefile.depend b/lib/clang/liblldbPluginLanguageCPlusPlus/Makefile.depend
new file mode 100644
index 000000000000..264ede1c30ce
--- /dev/null
+++ b/lib/clang/liblldbPluginLanguageCPlusPlus/Makefile.depend
@@ -0,0 +1,16 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+ usr.bin/clang/clang-tblgen.host \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/liblldbPluginLanguageObjC/Makefile.depend b/lib/clang/liblldbPluginLanguageObjC/Makefile.depend
new file mode 100644
index 000000000000..264ede1c30ce
--- /dev/null
+++ b/lib/clang/liblldbPluginLanguageObjC/Makefile.depend
@@ -0,0 +1,16 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+ usr.bin/clang/clang-tblgen.host \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/liblldbPluginScriptInterpreterNone/Makefile.depend b/lib/clang/liblldbPluginScriptInterpreterNone/Makefile.depend
new file mode 100644
index 000000000000..3e7f3f5e7165
--- /dev/null
+++ b/lib/clang/liblldbPluginScriptInterpreterNone/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/liblldbPluginSymbolFileDWARF/Makefile.depend b/lib/clang/liblldbPluginSymbolFileDWARF/Makefile.depend
index 9a1b84e49bcb..7bd22d4fd361 100644
--- a/lib/clang/liblldbPluginSymbolFileDWARF/Makefile.depend
+++ b/lib/clang/liblldbPluginSymbolFileDWARF/Makefile.depend
@@ -7,7 +7,7 @@ DIRDEPS = \
lib/libc++ \
lib/msun \
usr.bin/clang/clang-tblgen.host \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmaarch64asmparser/Makefile.depend b/lib/clang/libllvmaarch64asmparser/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmaarch64asmparser/Makefile.depend
+++ b/lib/clang/libllvmaarch64asmparser/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmaarch64asmprinter/Makefile.depend b/lib/clang/libllvmaarch64asmprinter/Makefile.depend
index 56c8d3928ee0..00c24e795655 100644
--- a/lib/clang/libllvmaarch64asmprinter/Makefile.depend
+++ b/lib/clang/libllvmaarch64asmprinter/Makefile.depend
@@ -6,21 +6,11 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
-AArch64InstPrinter.o: AArch64GenAsmWriter.inc.h
-AArch64InstPrinter.o: AArch64GenAsmWriter1.inc.h
-AArch64InstPrinter.o: AArch64GenInstrInfo.inc.h
-AArch64InstPrinter.o: AArch64GenRegisterInfo.inc.h
-AArch64InstPrinter.o: AArch64GenSubtargetInfo.inc.h
-AArch64InstPrinter.po: AArch64GenAsmWriter.inc.h
-AArch64InstPrinter.po: AArch64GenAsmWriter1.inc.h
-AArch64InstPrinter.po: AArch64GenInstrInfo.inc.h
-AArch64InstPrinter.po: AArch64GenRegisterInfo.inc.h
-AArch64InstPrinter.po: AArch64GenSubtargetInfo.inc.h
.endif
diff --git a/lib/clang/libllvmaarch64codegen/Makefile.depend b/lib/clang/libllvmaarch64codegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmaarch64codegen/Makefile.depend
+++ b/lib/clang/libllvmaarch64codegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmaarch64desc/Makefile.depend b/lib/clang/libllvmaarch64desc/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmaarch64desc/Makefile.depend
+++ b/lib/clang/libllvmaarch64desc/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmaarch64disassembler/Makefile.depend b/lib/clang/libllvmaarch64disassembler/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmaarch64disassembler/Makefile.depend
+++ b/lib/clang/libllvmaarch64disassembler/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmaarch64info/Makefile.depend b/lib/clang/libllvmaarch64info/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmaarch64info/Makefile.depend
+++ b/lib/clang/libllvmaarch64info/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmaarch64utils/Makefile.depend b/lib/clang/libllvmaarch64utils/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmaarch64utils/Makefile.depend
+++ b/lib/clang/libllvmaarch64utils/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmanalysis/Makefile.depend b/lib/clang/libllvmanalysis/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmanalysis/Makefile.depend
+++ b/lib/clang/libllvmanalysis/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmarmasmparser/Makefile.depend b/lib/clang/libllvmarmasmparser/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmarmasmparser/Makefile.depend
+++ b/lib/clang/libllvmarmasmparser/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmarmasmprinter/Makefile.depend b/lib/clang/libllvmarmasmprinter/Makefile.depend
index ba60d0695ac5..00c24e795655 100644
--- a/lib/clang/libllvmarmasmprinter/Makefile.depend
+++ b/lib/clang/libllvmarmasmprinter/Makefile.depend
@@ -6,19 +6,11 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
-ARMInstPrinter.o: ARMGenAsmWriter.inc.h
-ARMInstPrinter.o: ARMGenInstrInfo.inc.h
-ARMInstPrinter.o: ARMGenRegisterInfo.inc.h
-ARMInstPrinter.o: ARMGenSubtargetInfo.inc.h
-ARMInstPrinter.po: ARMGenAsmWriter.inc.h
-ARMInstPrinter.po: ARMGenInstrInfo.inc.h
-ARMInstPrinter.po: ARMGenRegisterInfo.inc.h
-ARMInstPrinter.po: ARMGenSubtargetInfo.inc.h
.endif
diff --git a/lib/clang/libllvmarmcodegen/Makefile.depend b/lib/clang/libllvmarmcodegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmarmcodegen/Makefile.depend
+++ b/lib/clang/libllvmarmcodegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmarmdesc/Makefile.depend b/lib/clang/libllvmarmdesc/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmarmdesc/Makefile.depend
+++ b/lib/clang/libllvmarmdesc/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmarmdisassembler/Makefile.depend b/lib/clang/libllvmarmdisassembler/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmarmdisassembler/Makefile.depend
+++ b/lib/clang/libllvmarmdisassembler/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmarminfo/Makefile.depend b/lib/clang/libllvmarminfo/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmarminfo/Makefile.depend
+++ b/lib/clang/libllvmarminfo/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmasmparser/Makefile.depend b/lib/clang/libllvmasmparser/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmasmparser/Makefile.depend
+++ b/lib/clang/libllvmasmparser/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmasmprinter/Makefile.depend b/lib/clang/libllvmasmprinter/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmasmprinter/Makefile.depend
+++ b/lib/clang/libllvmasmprinter/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmbitreader/Makefile.depend b/lib/clang/libllvmbitreader/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmbitreader/Makefile.depend
+++ b/lib/clang/libllvmbitreader/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmbitwriter/Makefile.depend b/lib/clang/libllvmbitwriter/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmbitwriter/Makefile.depend
+++ b/lib/clang/libllvmbitwriter/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmcodegen/Makefile.depend b/lib/clang/libllvmcodegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmcodegen/Makefile.depend
+++ b/lib/clang/libllvmcodegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmcore/Makefile.depend b/lib/clang/libllvmcore/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmcore/Makefile.depend
+++ b/lib/clang/libllvmcore/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmexecutionengine/Makefile.depend b/lib/clang/libllvmexecutionengine/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmexecutionengine/Makefile.depend
+++ b/lib/clang/libllvmexecutionengine/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvminstcombine/Makefile.depend b/lib/clang/libllvminstcombine/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvminstcombine/Makefile.depend
+++ b/lib/clang/libllvminstcombine/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvminstrumentation/Makefile.depend b/lib/clang/libllvminstrumentation/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvminstrumentation/Makefile.depend
+++ b/lib/clang/libllvminstrumentation/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvminterpreter/Makefile.depend b/lib/clang/libllvminterpreter/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvminterpreter/Makefile.depend
+++ b/lib/clang/libllvminterpreter/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmipo/Makefile.depend b/lib/clang/libllvmipo/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmipo/Makefile.depend
+++ b/lib/clang/libllvmipo/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmirreader/Makefile.depend b/lib/clang/libllvmirreader/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmirreader/Makefile.depend
+++ b/lib/clang/libllvmirreader/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmlibdriver/Makefile.depend b/lib/clang/libllvmlibdriver/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmlibdriver/Makefile.depend
+++ b/lib/clang/libllvmlibdriver/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmlinker/Makefile.depend b/lib/clang/libllvmlinker/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmlinker/Makefile.depend
+++ b/lib/clang/libllvmlinker/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmlto/Makefile.depend b/lib/clang/libllvmlto/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmlto/Makefile.depend
+++ b/lib/clang/libllvmlto/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmcjit/Makefile.depend b/lib/clang/libllvmmcjit/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmmcjit/Makefile.depend
+++ b/lib/clang/libllvmmcjit/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmipsasmparser/Makefile.depend b/lib/clang/libllvmmipsasmparser/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmmipsasmparser/Makefile.depend
+++ b/lib/clang/libllvmmipsasmparser/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmipsasmprinter/Makefile.depend b/lib/clang/libllvmmipsasmprinter/Makefile.depend
index 2426018a3582..00c24e795655 100644
--- a/lib/clang/libllvmmipsasmprinter/Makefile.depend
+++ b/lib/clang/libllvmmipsasmprinter/Makefile.depend
@@ -6,19 +6,11 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
-MipsInstPrinter.o: MipsGenAsmWriter.inc.h
-MipsInstPrinter.o: MipsGenInstrInfo.inc.h
-MipsInstPrinter.o: MipsGenRegisterInfo.inc.h
-MipsInstPrinter.o: MipsGenSubtargetInfo.inc.h
-MipsInstPrinter.po: MipsGenAsmWriter.inc.h
-MipsInstPrinter.po: MipsGenInstrInfo.inc.h
-MipsInstPrinter.po: MipsGenRegisterInfo.inc.h
-MipsInstPrinter.po: MipsGenSubtargetInfo.inc.h
.endif
diff --git a/lib/clang/libllvmmipscodegen/Makefile.depend b/lib/clang/libllvmmipscodegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmmipscodegen/Makefile.depend
+++ b/lib/clang/libllvmmipscodegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmipsdesc/Makefile.depend b/lib/clang/libllvmmipsdesc/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmmipsdesc/Makefile.depend
+++ b/lib/clang/libllvmmipsdesc/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmipsdisassembler/Makefile.depend b/lib/clang/libllvmmipsdisassembler/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmmipsdisassembler/Makefile.depend
+++ b/lib/clang/libllvmmipsdisassembler/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmipsinfo/Makefile.depend b/lib/clang/libllvmmipsinfo/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmmipsinfo/Makefile.depend
+++ b/lib/clang/libllvmmipsinfo/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmmirparser/Makefile.depend b/lib/clang/libllvmmirparser/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmmirparser/Makefile.depend
+++ b/lib/clang/libllvmmirparser/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmobjcarcopts/Makefile.depend b/lib/clang/libllvmobjcarcopts/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmobjcarcopts/Makefile.depend
+++ b/lib/clang/libllvmobjcarcopts/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmobject/Makefile.depend b/lib/clang/libllvmobject/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmobject/Makefile.depend
+++ b/lib/clang/libllvmobject/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmorcjit/Makefile.depend b/lib/clang/libllvmorcjit/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmorcjit/Makefile.depend
+++ b/lib/clang/libllvmorcjit/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmpasses/Makefile.depend b/lib/clang/libllvmpasses/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmpasses/Makefile.depend
+++ b/lib/clang/libllvmpasses/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmpowerpcasmparser/Makefile.depend b/lib/clang/libllvmpowerpcasmparser/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmpowerpcasmparser/Makefile.depend
+++ b/lib/clang/libllvmpowerpcasmparser/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmpowerpcasmprinter/Makefile.depend b/lib/clang/libllvmpowerpcasmprinter/Makefile.depend
index 9ddadfa29259..00c24e795655 100644
--- a/lib/clang/libllvmpowerpcasmprinter/Makefile.depend
+++ b/lib/clang/libllvmpowerpcasmprinter/Makefile.depend
@@ -6,19 +6,11 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
-PPCInstPrinter.o: PPCGenAsmWriter.inc.h
-PPCInstPrinter.o: PPCGenInstrInfo.inc.h
-PPCInstPrinter.o: PPCGenRegisterInfo.inc.h
-PPCInstPrinter.o: PPCGenSubtargetInfo.inc.h
-PPCInstPrinter.po: PPCGenAsmWriter.inc.h
-PPCInstPrinter.po: PPCGenInstrInfo.inc.h
-PPCInstPrinter.po: PPCGenRegisterInfo.inc.h
-PPCInstPrinter.po: PPCGenSubtargetInfo.inc.h
.endif
diff --git a/lib/clang/libllvmpowerpccodegen/Makefile.depend b/lib/clang/libllvmpowerpccodegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmpowerpccodegen/Makefile.depend
+++ b/lib/clang/libllvmpowerpccodegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmpowerpcdesc/Makefile.depend b/lib/clang/libllvmpowerpcdesc/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmpowerpcdesc/Makefile.depend
+++ b/lib/clang/libllvmpowerpcdesc/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmpowerpcdisassembler/Makefile.depend b/lib/clang/libllvmpowerpcdisassembler/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmpowerpcdisassembler/Makefile.depend
+++ b/lib/clang/libllvmpowerpcdisassembler/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmpowerpcinfo/Makefile.depend b/lib/clang/libllvmpowerpcinfo/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmpowerpcinfo/Makefile.depend
+++ b/lib/clang/libllvmpowerpcinfo/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmprofiledata/Makefile.depend b/lib/clang/libllvmprofiledata/Makefile.depend
index 3e7f3f5e7165..00c24e795655 100644
--- a/lib/clang/libllvmprofiledata/Makefile.depend
+++ b/lib/clang/libllvmprofiledata/Makefile.depend
@@ -6,6 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmscalaropts/Makefile.depend b/lib/clang/libllvmscalaropts/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmscalaropts/Makefile.depend
+++ b/lib/clang/libllvmscalaropts/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmselectiondag/Makefile.depend b/lib/clang/libllvmselectiondag/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmselectiondag/Makefile.depend
+++ b/lib/clang/libllvmselectiondag/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmsparcasmparser/Makefile.depend b/lib/clang/libllvmsparcasmparser/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmsparcasmparser/Makefile.depend
+++ b/lib/clang/libllvmsparcasmparser/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmsparcasmprinter/Makefile.depend b/lib/clang/libllvmsparcasmprinter/Makefile.depend
index 6571fb427ac3..00c24e795655 100644
--- a/lib/clang/libllvmsparcasmprinter/Makefile.depend
+++ b/lib/clang/libllvmsparcasmprinter/Makefile.depend
@@ -6,19 +6,11 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
-SparcInstPrinter.o: SparcGenAsmWriter.inc.h
-SparcInstPrinter.o: SparcGenInstrInfo.inc.h
-SparcInstPrinter.o: SparcGenRegisterInfo.inc.h
-SparcInstPrinter.o: SparcGenSubtargetInfo.inc.h
-SparcInstPrinter.po: SparcGenAsmWriter.inc.h
-SparcInstPrinter.po: SparcGenInstrInfo.inc.h
-SparcInstPrinter.po: SparcGenRegisterInfo.inc.h
-SparcInstPrinter.po: SparcGenSubtargetInfo.inc.h
.endif
diff --git a/lib/clang/libllvmsparccodegen/Makefile.depend b/lib/clang/libllvmsparccodegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmsparccodegen/Makefile.depend
+++ b/lib/clang/libllvmsparccodegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmsparcdesc/Makefile.depend b/lib/clang/libllvmsparcdesc/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmsparcdesc/Makefile.depend
+++ b/lib/clang/libllvmsparcdesc/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmsparcdisassembler/Makefile.depend b/lib/clang/libllvmsparcdisassembler/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmsparcdisassembler/Makefile.depend
+++ b/lib/clang/libllvmsparcdisassembler/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmsparcinfo/Makefile.depend b/lib/clang/libllvmsparcinfo/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmsparcinfo/Makefile.depend
+++ b/lib/clang/libllvmsparcinfo/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmsymbolize/Makefile.depend b/lib/clang/libllvmsymbolize/Makefile.depend
new file mode 100644
index 000000000000..3e7f3f5e7165
--- /dev/null
+++ b/lib/clang/libllvmsymbolize/Makefile.depend
@@ -0,0 +1,15 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ include \
+ include/xlocale \
+ lib/libc++ \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/clang/libllvmtarget/Makefile.depend b/lib/clang/libllvmtarget/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmtarget/Makefile.depend
+++ b/lib/clang/libllvmtarget/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmtransformutils/Makefile.depend b/lib/clang/libllvmtransformutils/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmtransformutils/Makefile.depend
+++ b/lib/clang/libllvmtransformutils/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmvectorize/Makefile.depend b/lib/clang/libllvmvectorize/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmvectorize/Makefile.depend
+++ b/lib/clang/libllvmvectorize/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmx86asmparser/Makefile.depend b/lib/clang/libllvmx86asmparser/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmx86asmparser/Makefile.depend
+++ b/lib/clang/libllvmx86asmparser/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmx86asmprinter/Makefile.depend b/lib/clang/libllvmx86asmprinter/Makefile.depend
index dfc7c0f6b050..00c24e795655 100644
--- a/lib/clang/libllvmx86asmprinter/Makefile.depend
+++ b/lib/clang/libllvmx86asmprinter/Makefile.depend
@@ -6,33 +6,11 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
.if ${DEP_RELDIR} == ${_DEP_RELDIR}
# local dependencies - needed for -jN in clean tree
-X86ATTInstPrinter.o: X86GenAsmWriter.inc.h
-X86ATTInstPrinter.o: X86GenInstrInfo.inc.h
-X86ATTInstPrinter.o: X86GenRegisterInfo.inc.h
-X86ATTInstPrinter.o: X86GenSubtargetInfo.inc.h
-X86ATTInstPrinter.po: X86GenAsmWriter.inc.h
-X86ATTInstPrinter.po: X86GenInstrInfo.inc.h
-X86ATTInstPrinter.po: X86GenRegisterInfo.inc.h
-X86ATTInstPrinter.po: X86GenSubtargetInfo.inc.h
-X86InstComments.o: X86GenInstrInfo.inc.h
-X86InstComments.o: X86GenRegisterInfo.inc.h
-X86InstComments.o: X86GenSubtargetInfo.inc.h
-X86InstComments.po: X86GenInstrInfo.inc.h
-X86InstComments.po: X86GenRegisterInfo.inc.h
-X86InstComments.po: X86GenSubtargetInfo.inc.h
-X86IntelInstPrinter.o: X86GenAsmWriter1.inc.h
-X86IntelInstPrinter.o: X86GenInstrInfo.inc.h
-X86IntelInstPrinter.o: X86GenRegisterInfo.inc.h
-X86IntelInstPrinter.o: X86GenSubtargetInfo.inc.h
-X86IntelInstPrinter.po: X86GenAsmWriter1.inc.h
-X86IntelInstPrinter.po: X86GenInstrInfo.inc.h
-X86IntelInstPrinter.po: X86GenRegisterInfo.inc.h
-X86IntelInstPrinter.po: X86GenSubtargetInfo.inc.h
.endif
diff --git a/lib/clang/libllvmx86codegen/Makefile.depend b/lib/clang/libllvmx86codegen/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmx86codegen/Makefile.depend
+++ b/lib/clang/libllvmx86codegen/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmx86desc/Makefile.depend b/lib/clang/libllvmx86desc/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmx86desc/Makefile.depend
+++ b/lib/clang/libllvmx86desc/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmx86disassembler/Makefile.depend b/lib/clang/libllvmx86disassembler/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmx86disassembler/Makefile.depend
+++ b/lib/clang/libllvmx86disassembler/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/clang/libllvmx86info/Makefile.depend b/lib/clang/libllvmx86info/Makefile.depend
index 385072f8a695..00c24e795655 100644
--- a/lib/clang/libllvmx86info/Makefile.depend
+++ b/lib/clang/libllvmx86info/Makefile.depend
@@ -6,7 +6,7 @@ DIRDEPS = \
include/xlocale \
lib/libc++ \
lib/msun \
- usr.bin/clang/tblgen.host \
+ usr.bin/clang/llvm-tblgen.host \
.include <dirdeps.mk>
diff --git a/lib/libarchive/tests/Makefile.depend b/lib/libarchive/tests/Makefile.depend
new file mode 100644
index 000000000000..d61a89fbe1b0
--- /dev/null
+++ b/lib/libarchive/tests/Makefile.depend
@@ -0,0 +1,26 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libarchive \
+ lib/libbz2 \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libexpat \
+ lib/liblzma \
+ lib/libmd \
+ lib/libthr \
+ lib/libz \
+ secure/lib/libcrypto \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/amd64/sys/cerror.S b/lib/libc/amd64/sys/cerror.S
index d01cf4a763f3..d28a13998b4b 100644
--- a/lib/libc/amd64/sys/cerror.S
+++ b/lib/libc/amd64/sys/cerror.S
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include "SYS.h"
.globl HIDENAME(cerror)
+ .hidden HIDENAME(cerror)
/*
* The __error() function is thread aware. For non-threaded
diff --git a/lib/libc/i386/sys/cerror.S b/lib/libc/i386/sys/cerror.S
index ad3a0333a3bb..5101e9e00530 100644
--- a/lib/libc/i386/sys/cerror.S
+++ b/lib/libc/i386/sys/cerror.S
@@ -39,6 +39,7 @@ __FBSDID("$FreeBSD$");
#include "SYS.h"
.globl HIDENAME(cerror)
+ .hidden HIDENAME(cerror)
/*
* The __error() function is thread aware. For non-threaded
diff --git a/lib/libc/sys/getdirentries.2 b/lib/libc/sys/getdirentries.2
index ab60ed2d71df..e4f61dbe82da 100644
--- a/lib/libc/sys/getdirentries.2
+++ b/lib/libc/sys/getdirentries.2
@@ -75,7 +75,7 @@ uint32_t d_fileno;
uint16_t d_reclen;
uint8_t d_type;
uint8_t d_namlen;
-char d_name[MAXNAMELEN + 1]; /* see below */
+char d_name[MAXNAMLEN + 1]; /* see below */
.Ed
.Pp
The
@@ -103,7 +103,7 @@ entry specifies the length of the file name excluding the null byte.
Thus the actual size of
.Fa d_name
may vary from 1 to
-.Dv MAXNAMELEN
+.Dv MAXNAMLEN
\&+ 1.
.Pp
Entries may be separated by extra space.
diff --git a/lib/libc/tests/Makefile b/lib/libc/tests/Makefile
index 53d741989b27..8276422cc7f4 100644
--- a/lib/libc/tests/Makefile
+++ b/lib/libc/tests/Makefile
@@ -18,6 +18,7 @@ TESTS_SUBDIRS+= nss
TESTS_SUBDIRS+= regex
TESTS_SUBDIRS+= resolv
TESTS_SUBDIRS+= rpc
+TESTS_SUBDIRS+= setjmp
TESTS_SUBDIRS+= stdio
TESTS_SUBDIRS+= stdlib
TESTS_SUBDIRS+= string
diff --git a/lib/libc/tests/Makefile.depend b/lib/libc/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/lib/libc/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/c063/Makefile.depend b/lib/libc/tests/c063/Makefile.depend
new file mode 100644
index 000000000000..e8ee295f115a
--- /dev/null
+++ b/lib/libc/tests/c063/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/db/Makefile.depend b/lib/libc/tests/db/Makefile.depend
new file mode 100644
index 000000000000..3646e2e2b1af
--- /dev/null
+++ b/lib/libc/tests/db/Makefile.depend
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/gen/Makefile.depend b/lib/libc/tests/gen/Makefile.depend
new file mode 100644
index 000000000000..7826828c8155
--- /dev/null
+++ b/lib/libc/tests/gen/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libthr \
+ lib/libutil \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/gen/execve/Makefile.depend b/lib/libc/tests/gen/execve/Makefile.depend
new file mode 100644
index 000000000000..e8ee295f115a
--- /dev/null
+++ b/lib/libc/tests/gen/execve/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/gen/posix_spawn/Makefile.depend b/lib/libc/tests/gen/posix_spawn/Makefile.depend
new file mode 100644
index 000000000000..e8ee295f115a
--- /dev/null
+++ b/lib/libc/tests/gen/posix_spawn/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/hash/Makefile.depend b/lib/libc/tests/hash/Makefile.depend
new file mode 100644
index 000000000000..b1a491e414cc
--- /dev/null
+++ b/lib/libc/tests/hash/Makefile.depend
@@ -0,0 +1,22 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libmd \
+ lib/libnetbsd \
+ secure/lib/libcrypto \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/inet/Makefile.depend b/lib/libc/tests/inet/Makefile.depend
new file mode 100644
index 000000000000..08e76dc00e2a
--- /dev/null
+++ b/lib/libc/tests/inet/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/locale/Makefile.depend b/lib/libc/tests/locale/Makefile.depend
new file mode 100644
index 000000000000..68a9dd09c55e
--- /dev/null
+++ b/lib/libc/tests/locale/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/net/Makefile.depend b/lib/libc/tests/net/Makefile.depend
new file mode 100644
index 000000000000..949a9f66ea92
--- /dev/null
+++ b/lib/libc/tests/net/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/nss/Makefile.depend b/lib/libc/tests/nss/Makefile.depend
new file mode 100644
index 000000000000..4d038059d9d9
--- /dev/null
+++ b/lib/libc/tests/nss/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/rpc \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/regex/Makefile.depend b/lib/libc/tests/regex/Makefile.depend
new file mode 100644
index 000000000000..5212dd0e39f5
--- /dev/null
+++ b/lib/libc/tests/regex/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/resolv/Makefile.depend b/lib/libc/tests/resolv/Makefile.depend
new file mode 100644
index 000000000000..505fe5ac3403
--- /dev/null
+++ b/lib/libc/tests/resolv/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/rpc/Makefile.depend b/lib/libc/tests/rpc/Makefile.depend
new file mode 100644
index 000000000000..7cd75155dd46
--- /dev/null
+++ b/lib/libc/tests/rpc/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/rpc \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/librpcsvc \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/setjmp/Makefile.depend b/lib/libc/tests/setjmp/Makefile.depend
new file mode 100644
index 000000000000..e8ee295f115a
--- /dev/null
+++ b/lib/libc/tests/setjmp/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/ssp/Makefile.depend b/lib/libc/tests/ssp/Makefile.depend
new file mode 100644
index 000000000000..bb203f1bf8c2
--- /dev/null
+++ b/lib/libc/tests/ssp/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/librt \
+ lib/libthr \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/stdio/Makefile.depend b/lib/libc/tests/stdio/Makefile.depend
new file mode 100644
index 000000000000..68a9dd09c55e
--- /dev/null
+++ b/lib/libc/tests/stdio/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/stdlib/Makefile.depend b/lib/libc/tests/stdlib/Makefile.depend
new file mode 100644
index 000000000000..1555e0fb24d9
--- /dev/null
+++ b/lib/libc/tests/stdlib/Makefile.depend
@@ -0,0 +1,22 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libutil \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/string/Makefile.depend b/lib/libc/tests/string/Makefile.depend
new file mode 100644
index 000000000000..fbc70c89a626
--- /dev/null
+++ b/lib/libc/tests/string/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libmd \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/sys/Makefile.depend b/lib/libc/tests/sys/Makefile.depend
new file mode 100644
index 000000000000..ae11679ef381
--- /dev/null
+++ b/lib/libc/tests/sys/Makefile.depend
@@ -0,0 +1,24 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libkvm \
+ lib/libnetbsd \
+ lib/librt \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/termios/Makefile.depend b/lib/libc/tests/termios/Makefile.depend
new file mode 100644
index 000000000000..e8ee295f115a
--- /dev/null
+++ b/lib/libc/tests/termios/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/time/Makefile.depend b/lib/libc/tests/time/Makefile.depend
new file mode 100644
index 000000000000..e8ee295f115a
--- /dev/null
+++ b/lib/libc/tests/time/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/tls/Makefile.depend b/lib/libc/tests/tls/Makefile.depend
new file mode 100644
index 000000000000..933417c3fdd8
--- /dev/null
+++ b/lib/libc/tests/tls/Makefile.depend
@@ -0,0 +1,22 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libc/tests/tls_dso \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/tls_dso/Makefile.depend b/lib/libc/tests/tls_dso/Makefile.depend
new file mode 100644
index 000000000000..9cb890b58360
--- /dev/null
+++ b/lib/libc/tests/tls_dso/Makefile.depend
@@ -0,0 +1,17 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libc/tests/ttyio/Makefile.depend b/lib/libc/tests/ttyio/Makefile.depend
new file mode 100644
index 000000000000..5212dd0e39f5
--- /dev/null
+++ b/lib/libc/tests/ttyio/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libclang_rt/asan_dynamic/Makefile.depend b/lib/libclang_rt/asan_dynamic/Makefile.depend
new file mode 100644
index 000000000000..98f4a5fec371
--- /dev/null
+++ b/lib/libclang_rt/asan_dynamic/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libc++ \
+ lib/libcompiler_rt \
+ lib/libcxxrt \
+ lib/msun \
+ lib/ncurses/ncursesw \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libcrypt/tests/Makefile.depend b/lib/libcrypt/tests/Makefile.depend
index dd2539c25251..2945c88dbc67 100644
--- a/lib/libcrypt/tests/Makefile.depend
+++ b/lib/libcrypt/tests/Makefile.depend
@@ -11,6 +11,7 @@ DIRDEPS = \
lib/libc \
lib/libcompiler_rt \
lib/libcrypt \
+ lib/libnetbsd \
.include <dirdeps.mk>
diff --git a/lib/libmp/tests/Makefile.depend b/lib/libmp/tests/Makefile.depend
new file mode 100644
index 000000000000..bd34832143dd
--- /dev/null
+++ b/lib/libmp/tests/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libmp \
+ secure/lib/libcrypto \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libnv/tests/Makefile.depend b/lib/libnv/tests/Makefile.depend
new file mode 100644
index 000000000000..e6cfb180bb83
--- /dev/null
+++ b/lib/libnv/tests/Makefile.depend
@@ -0,0 +1,24 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/atf/libatf-c++ \
+ lib/libc \
+ lib/libc++ \
+ lib/libcompiler_rt \
+ lib/libcxxrt \
+ lib/libnv \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libpam/libpam/tests/Makefile.depend b/lib/libpam/libpam/tests/Makefile.depend
new file mode 100644
index 000000000000..8e0956024b47
--- /dev/null
+++ b/lib/libpam/libpam/tests/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libpam/libpam \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libproc/tests/Makefile.depend b/lib/libproc/tests/Makefile.depend
new file mode 100644
index 000000000000..c61b2341db16
--- /dev/null
+++ b/lib/libproc/tests/Makefile.depend
@@ -0,0 +1,26 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ cddl/lib/libctf \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libcxxrt \
+ lib/libelf \
+ lib/libproc \
+ lib/librtld_db \
+ lib/libutil \
+ lib/libz \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/librt/tests/Makefile.depend b/lib/librt/tests/Makefile.depend
new file mode 100644
index 000000000000..e2d637cb0fc5
--- /dev/null
+++ b/lib/librt/tests/Makefile.depend
@@ -0,0 +1,22 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/librt \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libthr/tests/Makefile.depend b/lib/libthr/tests/Makefile.depend
new file mode 100644
index 000000000000..a3fc96831d57
--- /dev/null
+++ b/lib/libthr/tests/Makefile.depend
@@ -0,0 +1,23 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/librt \
+ lib/libthr \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libthr/tests/dlopen/Makefile.depend b/lib/libthr/tests/dlopen/Makefile.depend
new file mode 100644
index 000000000000..949a9f66ea92
--- /dev/null
+++ b/lib/libthr/tests/dlopen/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libthr/tests/dlopen/dso/Makefile.depend b/lib/libthr/tests/dlopen/dso/Makefile.depend
new file mode 100644
index 000000000000..7b92dbd89f4a
--- /dev/null
+++ b/lib/libthr/tests/dlopen/dso/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libthr \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libutil/tests/Makefile.depend b/lib/libutil/tests/Makefile.depend
new file mode 100644
index 000000000000..a79b1eb12b7b
--- /dev/null
+++ b/lib/libutil/tests/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libutil \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/libxo/tests/Makefile.depend b/lib/libxo/tests/Makefile.depend
new file mode 100644
index 000000000000..137678c21e46
--- /dev/null
+++ b/lib/libxo/tests/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libutil \
+ lib/libxo \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/msun/tests/Makefile.depend b/lib/msun/tests/Makefile.depend
new file mode 100644
index 000000000000..68a9dd09c55e
--- /dev/null
+++ b/lib/msun/tests/Makefile.depend
@@ -0,0 +1,21 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libnetbsd \
+ lib/msun \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/lib/tests/Makefile.depend b/lib/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/lib/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/libexec/atf/atf-check/tests/Makefile.depend b/libexec/atf/atf-check/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/libexec/atf/atf-check/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/libexec/atf/atf-sh/tests/Makefile.depend b/libexec/atf/atf-sh/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/libexec/atf/atf-sh/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/libexec/atf/tests/Makefile.depend b/libexec/atf/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/libexec/atf/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/libexec/rtld-elf/tests/Makefile.depend b/libexec/rtld-elf/tests/Makefile.depend
new file mode 100644
index 000000000000..74074b9588ec
--- /dev/null
+++ b/libexec/rtld-elf/tests/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/libexec/tests/Makefile.depend b/libexec/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/libexec/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/devd/tests/Makefile.depend b/sbin/devd/tests/Makefile.depend
new file mode 100644
index 000000000000..74074b9588ec
--- /dev/null
+++ b/sbin/devd/tests/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/dhclient/tests/Makefile.depend b/sbin/dhclient/tests/Makefile.depend
new file mode 100644
index 000000000000..7de116d21d37
--- /dev/null
+++ b/sbin/dhclient/tests/Makefile.depend
@@ -0,0 +1,20 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/arpa \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+ lib/libutil \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/growfs/tests/Makefile.depend b/sbin/growfs/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/sbin/growfs/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/ifconfig/tests/Makefile.depend b/sbin/ifconfig/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/sbin/ifconfig/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/ipfw/ipfw2.c b/sbin/ipfw/ipfw2.c
index f6a969217c6d..95a96adb18b2 100644
--- a/sbin/ipfw/ipfw2.c
+++ b/sbin/ipfw/ipfw2.c
@@ -424,6 +424,7 @@ bp_flush(struct buf_pr *b)
b->ptr = b->buf;
b->avail = b->size;
+ b->buf[0] = '\0';
}
/*
diff --git a/sbin/mdconfig/tests/Makefile.depend b/sbin/mdconfig/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/sbin/mdconfig/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/tests/Makefile.depend b/sbin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/sbin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sbin/tunefs/tunefs.c b/sbin/tunefs/tunefs.c
index 15c6cf075bca..b03cdde7b65c 100644
--- a/sbin/tunefs/tunefs.c
+++ b/sbin/tunefs/tunefs.c
@@ -316,7 +316,7 @@ main(int argc, char *argv[])
}
if (Lflag) {
name = "volume label";
- strlcpy(sblock.fs_volname, Lvalue, MAXVOLLEN);
+ strncpy(sblock.fs_volname, Lvalue, MAXVOLLEN);
}
if (aflag) {
name = "POSIX.1e ACLs";
diff --git a/secure/lib/tests/Makefile.depend b/secure/lib/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/secure/lib/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/secure/libexec/tests/Makefile.depend b/secure/libexec/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/secure/libexec/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/secure/tests/Makefile.depend b/secure/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/secure/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/secure/usr.bin/tests/Makefile.depend b/secure/usr.bin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/secure/usr.bin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/secure/usr.sbin/tests/Makefile.depend b/secure/usr.sbin/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/secure/usr.sbin/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/share/examples/tests/Makefile.depend b/share/examples/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/share/examples/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/share/examples/tests/tests/Makefile.depend b/share/examples/tests/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/share/examples/tests/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/share/examples/tests/tests/atf/Makefile.depend b/share/examples/tests/tests/atf/Makefile.depend
new file mode 100644
index 000000000000..74074b9588ec
--- /dev/null
+++ b/share/examples/tests/tests/atf/Makefile.depend
@@ -0,0 +1,19 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/atf/libatf-c \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/share/examples/tests/tests/plain/Makefile.depend b/share/examples/tests/tests/plain/Makefile.depend
new file mode 100644
index 000000000000..3646e2e2b1af
--- /dev/null
+++ b/share/examples/tests/tests/plain/Makefile.depend
@@ -0,0 +1,18 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+ gnu/lib/csu \
+ gnu/lib/libgcc \
+ include \
+ include/xlocale \
+ lib/${CSU_DIR} \
+ lib/libc \
+ lib/libcompiler_rt \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/share/man/man4/filemon.4 b/share/man/man4/filemon.4
index c0b4a51c5b4a..3287a47aab6a 100644
--- a/share/man/man4/filemon.4
+++ b/share/man/man4/filemon.4
@@ -31,7 +31,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd January 28, 2016
+.Dd March 9, 2016
.Dt FILEMON 4
.Os
.Sh NAME
@@ -125,6 +125,19 @@ function returns the value 0 if successful;
otherwise the value \-1 is returned and the global variable
.Va errno
is set to indicate the error.
+.Sh ERRORS
+The
+.Fn ioctl
+system call
+with
+.Dv FILEMON_SET_FD
+will fail if:
+.Bl -tag -width Er
+.It Bq Er EEXIST
+The
+.Nm
+handle is already associated with a file descriptor.
+.El
.Sh FILES
.Bl -tag -width ".Pa /dev/filemon"
.It Pa /dev/filemon
@@ -194,3 +207,6 @@ Only children of the set process are logged.
Processes can escape being traced by double forking.
This is not seen as a problem as the intended use is build monitoring, which
does not make sense to have daemons for.
+.Pp
+Unloading the module may panic the system, thus requires using
+.Ic kldunload -f .
diff --git a/share/man/man5/resolver.5 b/share/man/man5/resolver.5
index a3c5e05cf7bd..8306309b831e 100644
--- a/share/man/man5/resolver.5
+++ b/share/man/man5/resolver.5
@@ -218,7 +218,8 @@ resides in
.Sh SEE ALSO
.Xr gethostbyname 3 ,
.Xr resolver 3 ,
-.Xr hostname 7
+.Xr hostname 7 ,
+.Xr resolvconf 8
.Rs
.%T "Name Server Operations Guide for BIND"
.Re
diff --git a/share/man/man9/bus_adjust_resource.9 b/share/man/man9/bus_adjust_resource.9
index 6f561b938f37..681faf61ebb4 100644
--- a/share/man/man9/bus_adjust_resource.9
+++ b/share/man/man9/bus_adjust_resource.9
@@ -27,7 +27,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd April 29, 2011
+.Dd March 10, 2016
.Dt BUS_ADJUST_RESOURCE 9
.Os
.Sh NAME
@@ -41,8 +41,7 @@
.In sys/rman.h
.In machine/resource.h
.Ft int
-.Fo bus_adjust_resource
-.Fa "device_t dev" "int type" "struct resource *r" "rman_res_t start" "rman_res_t end"
+.Fn bus_adjust_resource "device_t dev" "int type" "struct resource *r" "rman_res_t start" "rman_res_t end"
.Sh DESCRIPTION
This function is used to ask the parent bus to adjust the resource range
assigned to an allocated resource.
diff --git a/share/man/man9/bus_alloc_resource.9 b/share/man/man9/bus_alloc_resource.9
index 92c589d6f81a..c8418b0a3953 100644
--- a/share/man/man9/bus_alloc_resource.9
+++ b/share/man/man9/bus_alloc_resource.9
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd May 18, 2000
+.Dd March 10, 2016
.Dt BUS_ALLOC_RESOURCE 9
.Os
.Sh NAME
@@ -50,10 +50,8 @@
.Fc
.Ft struct resource *
.Fn bus_alloc_resource_any "device_t dev" "int type" "int *rid" "u_int flags"
-.Fc
.Ft struct resource *
-.Fn bus_alloc_resource_anywhere
-.Fa "device_t dev" "int type" "int *rid" "rman_res_t count" "u_int flags"
+.Fn bus_alloc_resource_anywhere "device_t dev" "int type" "int *rid" "rman_res_t count" "u_int flags"
.Sh DESCRIPTION
This is an easy interface to the resource-management functions.
It hides the indirection through the parent's method table.
diff --git a/share/mk/bsd.confs.mk b/share/mk/bsd.confs.mk
index 20a97824fdfd..6fe2ad29bb4b 100644
--- a/share/mk/bsd.confs.mk
+++ b/share/mk/bsd.confs.mk
@@ -6,8 +6,10 @@
CONFGROUPS?= CONFS
+_CONFGROUPS= ${CONFGROUPS:C,[/*],_,g}
+
.if !target(buildconfig)
-.for group in ${CONFGROUPS}
+.for group in ${_CONFGROUPS}
buildconfig: ${${group}}
.endfor
.endif
@@ -17,7 +19,7 @@ all: buildconfig
.endif
.if !target(installconfig)
-.for group in ${CONFGROUPS}
+.for group in ${_CONFGROUPS}
.if defined(${group}) && !empty(${group})
${group}OWN?= ${SHAREOWN}
diff --git a/share/mk/bsd.files.mk b/share/mk/bsd.files.mk
index 4080eddc2c0d..d4fd5095c0d4 100644
--- a/share/mk/bsd.files.mk
+++ b/share/mk/bsd.files.mk
@@ -9,7 +9,9 @@ __<bsd.files.mk>__:
FILESGROUPS?= FILES
-.for group in ${FILESGROUPS}
+_FILESGROUPS= ${FILESGROUPS:C,[/*],_,g}
+
+.for group in ${_FILESGROUPS}
# Add in foo.yes and remove duplicates from all the groups
${${group}}:= ${${group}} ${${group}.yes}
${${group}}:= ${${group}:O:u}
@@ -20,7 +22,7 @@ buildfiles: ${${group}}
all: buildfiles
.endif
-.for group in ${FILESGROUPS}
+.for group in ${_FILESGROUPS}
.if defined(${group}) && !empty(${group})
installfiles: installfiles-${group}
diff --git a/share/mk/bsd.incs.mk b/share/mk/bsd.incs.mk
index cd3e58327356..c5c852ac5a15 100644
--- a/share/mk/bsd.incs.mk
+++ b/share/mk/bsd.incs.mk
@@ -8,6 +8,8 @@
INCSGROUPS?= INCS
+_INCSGROUPS= ${INCSGROUPS:C,[/*],_,g}
+
.if defined(NO_ROOT)
.if !defined(TAGS) || ! ${TAGS:Mpackage=*}
TAGS+= package=${PACKAGE:Uruntime}
@@ -16,7 +18,7 @@ TAG_ARGS= -T ${TAGS:[*]:S/ /,/g}
.endif
.if !target(buildincludes)
-.for group in ${INCSGROUPS}
+.for group in ${_INCSGROUPS}
buildincludes: ${${group}}
.endfor
.endif
@@ -26,7 +28,7 @@ all: buildincludes
.endif
.if !target(installincludes)
-.for group in ${INCSGROUPS}
+.for group in ${_INCSGROUPS}
.if defined(${group}) && !empty(${group})
${group}OWN?= ${BINOWN}
diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk
index c5118564f06c..29a95e5a7df1 100644
--- a/share/mk/bsd.lib.mk
+++ b/share/mk/bsd.lib.mk
@@ -453,12 +453,13 @@ OBJS_DEPEND_GUESS.${_S:R}.So= ${_S}
.include <bsd.dep.mk>
-.if defined(LIB) && !empty(LIB)
.if ${MK_FAST_DEPEND} == "no" && !exists(${.OBJDIR}/${DEPENDFILE})
+.if defined(LIB) && !empty(LIB)
${OBJS} ${STATICOBJS} ${POBJS}: ${OBJS_DEPEND_GUESS}
.for _S in ${SRCS:N*.[hly]}
${_S:R}.po: ${OBJS_DEPEND_GUESS.${_S:R}.po}
.endfor
+.endif
.if defined(SHLIB_NAME) || \
defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB)
${SOBJS}: ${OBJS_DEPEND_GUESS}
@@ -467,7 +468,6 @@ ${_S:R}.So: ${OBJS_DEPEND_GUESS.${_S:R}.So}
.endfor
.endif
.endif
-.endif
.include <bsd.clang-analyze.mk>
.include <bsd.obj.mk>
diff --git a/share/mk/bsd.progs.mk b/share/mk/bsd.progs.mk
index 7560e7ffc5b7..c5639b410128 100644
--- a/share/mk/bsd.progs.mk
+++ b/share/mk/bsd.progs.mk
@@ -20,13 +20,6 @@
# we really only use PROGS below...
PROGS += ${PROGS_CXX}
-# In meta mode, we can capture dependenices for _one_ of the progs.
-# if makefile doesn't nominate one, we use the first.
-.ifndef UPDATE_DEPENDFILE_PROG
-UPDATE_DEPENDFILE_PROG = ${PROGS:[1]}
-.export UPDATE_DEPENDFILE_PROG
-.endif
-
.if defined(PROG)
# just one of many
PROG_OVERRIDE_VARS += BINDIR BINGRP BINOWN BINMODE DPSRCS MAN NO_WERROR \
@@ -45,11 +38,20 @@ $v ?=
.endif
.endfor
-# for meta mode, there can be only one!
-.if ${PROG} == ${UPDATE_DEPENDFILE_PROG}
-UPDATE_DEPENDFILE ?= yes
+.if ${MK_DIRDEPS_BUILD} == "yes"
+# Leave updating the Makefile.depend to the parent.
+UPDATE_DEPENDFILE = NO
+
+# Record our meta files for the parent to use.
+CLEANFILES+= ${PROG}.meta_files
+${PROG}.meta_files: .NOMETA $${.MAKE.META.CREATED} ${_this}
+ @echo "Updating ${.TARGET}: ${.OODATE:T:[1..8]}"
+ @echo ${.MAKE.META.FILES} > ${.TARGET}
+
+.if !defined(_SKIP_BUILD)
+.END: ${PROG}.meta_files
.endif
-UPDATE_DEPENDFILE ?= NO
+.endif # ${MK_DIRDEPS_BUILD} == "yes"
# prog.mk will do the rest
.else # !defined(PROG)
@@ -57,14 +59,17 @@ UPDATE_DEPENDFILE ?= NO
all: ${PROGS}
.endif
-# We cannot capture dependencies for meta mode here
-UPDATE_DEPENDFILE = NO
+META_XTRAS+= ${cat ${PROGS:S/$/*.meta_files/} 2>/dev/null || true:L:sh}
-.if ${MK_STAGING} != "no"
-.if !empty(PROGS)
-stage_files.prog: ${PROGS}
-.endif
-.endif # ${MK_STAGING} != "no"
+.if ${MK_STAGING} != "no" && !empty(PROGS)
+# Stage from parent while respecting PROGNAME and BINDIR overrides.
+.for _prog in ${PROGS}
+STAGE_DIR.prog.${_prog}= ${STAGE_OBJTOP}${BINDIR.${_prog}:UBINDIR_${_prog}:U${BINDIR}}
+STAGE_AS_SETS+= prog.${_prog}
+STAGE_AS_prog.${_prog}= ${PROGNAME.${_prog}:UPROGNAME_${_prog}:U${_prog}}
+stage_as.prog.${_prog}: ${_prog}
+.endfor
+.endif # ${MK_STAGING} != "no" && !empty(PROGS)
.endif
.endif # PROGS || PROGS_CXX
diff --git a/share/mk/bsd.sys.mk b/share/mk/bsd.sys.mk
index 4a59274fdfe3..be4c52fe471f 100644
--- a/share/mk/bsd.sys.mk
+++ b/share/mk/bsd.sys.mk
@@ -208,7 +208,7 @@ staging: beforeinstall
.if ${MK_STAGING_PROG} != "no" && !defined(INTERNALPROG)
STAGE_DIR.prog= ${STAGE_OBJTOP}${BINDIR}
-.if !empty(PROG) || !empty(PROGS)
+.if !empty(PROG)
.if defined(PROGNAME)
STAGE_AS_SETS+= prog
STAGE_AS_${PROG}= ${PROGNAME}
diff --git a/share/mk/bsd.test.mk b/share/mk/bsd.test.mk
index d697097f25a7..97240ccbd11e 100644
--- a/share/mk/bsd.test.mk
+++ b/share/mk/bsd.test.mk
@@ -77,10 +77,6 @@ SUBDIR_PARALLEL= t
MAN=
.endif
-# tell progs.mk we might want to install things
-PROG_VARS+= BINDIR
-PROGS_TARGETS+= install
-
.if !defined(NOT_FOR_TEST_SUITE)
.include <suite.test.mk>
.endif
diff --git a/share/mk/local.dirdeps.mk b/share/mk/local.dirdeps.mk
index ba800a4cc909..af7cf77041cb 100644
--- a/share/mk/local.dirdeps.mk
+++ b/share/mk/local.dirdeps.mk
@@ -90,7 +90,8 @@ DIRDEPS += \
# used will be added in and handled via [local.]gendirdeps.mk. This is not
# done for MACHINE=host builds.
# XXX: Include this in local.autodep.mk as well for gendirdeps without filemon.
-.if ${RELDIR} == ${DEP_RELDIR} # Only do this for main build target
+# Only do this for main build target
+.if ${RELDIR} == ${DEP_RELDIR} && !defined(_RECURSING_PROGS)
.for _depfile in ${.MAKE.DEPENDFILE_PREFERENCE:T}
.if !defined(_have_depfile) && exists(${.CURDIR}/${_depfile})
_have_depfile=
@@ -99,6 +100,35 @@ _have_depfile=
.if !defined(_have_depfile)
# KMOD does not use any stdlibs.
.if !defined(KMOD)
+# Gather PROGS dependencies first
+.if !empty(PROGS)
+_PROGS_LIBADD=
+_PROGS_DPADD=
+_PROGS_SRCS=
+.for _prog in ${PROGS}
+.for s in . _
+.if !empty(LIBADD${s}${_prog})
+_PROGS_LIBADD+= ${LIBADD${s}${_prog}}
+.endif
+.if !empty(DPADD${s}${_prog})
+_PROGS_DPADD+= ${DPADD${s}${_prog}}
+.endif
+.if !empty(SRCS${s}${_prog})
+_PROGS_SRCS+= ${SRCS${s}${_prog}}
+.endif
+.endfor # .for s in . _
+# Add in assumed source (bsd.prog.mk)
+.if !target(${_prog})
+.if defined(PROG_CXX)
+_PROGS_SRCS+= ${_prog}.cc
+.else
+_PROGS_SRCS+= ${_prog}.c
+.endif
+.endif # !target(${_prog})
+.endfor # .for _prog in ${PROGS}
+.endif # !empty(PROGS)
+_SRCS= ${SRCS} ${_PROGS_SRCS}
+
# Has C files. The C_DIRDEPS are shared with C++ files as well.
C_DIRDEPS= \
gnu/lib/csu \
@@ -118,12 +148,12 @@ C_DIRDEPS= \
C_DIRDEPS+= include/gssapi
.endif
-.if !empty(SRCS:M*.c)
+.if !empty(_SRCS:M*.c)
DIRDEPS+= ${C_DIRDEPS}
.endif
# Has C++ files
-.if !empty(SRCS:M*.cc) || !empty(SRCS:M*.C) || !empty(SRCS:M*.cpp) || \
- !empty(SRCS:M*.cxx)
+.if !empty(_SRCS:M*.cc) || !empty(_SRCS:M*.C) || !empty(_SRCS:M*.cpp) || \
+ !empty(_SRCS:M*.cxx)
DIRDEPS+= ${C_DIRDEPS}
.if ${MK_CLANG} == "yes"
DIRDEPS+= lib/libc++ lib/libcxxrt
@@ -135,28 +165,15 @@ DIRDEPS+= lib/msun
.endif # CXX
.endif # !defined(KMOD)
# Has yacc files.
-.if !empty(SRCS:M*.y)
+.if !empty(_SRCS:M*.y)
DIRDEPS+= usr.bin/yacc.host
.endif
-# Gather PROGS dependencies
-.if !empty(PROGS)
-_PROGS_LIBADD=
-_PROGS_DPADD=
-.for _prog in ${PROGS}
-.if !empty(LIBADD.${_prog})
-_PROGS_LIBADD+= ${LIBADD.${_prog}}
-.endif
-.if !empty(DPADD.${_prog})
-_PROGS_DPADD+= ${DPADD.${_prog}}
-.endif
-.endfor
-.endif # !empty(PROGS)
-.if !empty(DPADD)
+_DPADD= ${DPADD} ${_PROGS_DPADD}
+.if !empty(_DPADD)
# Taken from meta.autodep.mk (where it only does something with
# BUILD_AT_LEVEL0, which we don't use).
# This only works for DPADD with full OBJ/SRC paths, which is mostly just
# _INTERNALLIBS.
-_DPADD= ${DPADD} ${_PROGS_DPADD}
_DP_DIRDEPS= \
${_DPADD:O:u:M${OBJTOP}*:H:N.:tA:C,${OBJTOP}[^/]*/,,:N.:O:u} \
${_DPADD:O:u:M${OBJROOT}*:N${OBJTOP}*:N${STAGE_ROOT}/*:H:S,${OBJROOT},,:C,^([^/]+)/(.*),\2.\1,:S,${HOST_TARGET}$,host,:N.*:O:u}
@@ -165,9 +182,9 @@ _DP_DIRDEPS= \
DIRDEPS+= ${_DP_DIRDEPS:C,^,${SRCTOP}/,:tA:C,^${SRCTOP}/,,}
.endif
.endif # !empty(DPADD)
-.if !empty(LIBADD)
-# Also handle LIBADD for non-internal libraries.
_ALL_LIBADD= ${LIBADD} ${_PROGS_LIBADD}
+.if !empty(_ALL_LIBADD)
+# Also handle LIBADD for non-internal libraries.
.for _lib in ${_ALL_LIBADD:O:u}
_lib${_lib}reldir= ${LIB${_lib:tu}DIR:C,${OBJTOP}/,,}
.if defined(LIB${_lib:tu}DIR) && ${DIRDEPS:M${_lib${_lib}reldir}} == "" && \
diff --git a/share/mk/local.meta.sys.mk b/share/mk/local.meta.sys.mk
index bf4fcbc0b004..9f000f58b803 100644
--- a/share/mk/local.meta.sys.mk
+++ b/share/mk/local.meta.sys.mk
@@ -205,7 +205,9 @@ CSU_DIR := ${CSU_DIR.${MACHINE_ARCH}}
.if !empty(TIME_STAMP)
TRACER= ${TIME_STAMP} ${:U}
.endif
+.if !defined(_RECURSING_PROGS)
WITH_META_STATS= t
+.endif
# toolchains can be a pain - especially bootstrappping them
.if ${MACHINE} == "host"
diff --git a/share/tests/Makefile.depend b/share/tests/Makefile.depend
new file mode 100644
index 000000000000..f80275d86ab1
--- /dev/null
+++ b/share/tests/Makefile.depend
@@ -0,0 +1,11 @@
+# $FreeBSD$
+# Autogenerated - do NOT edit!
+
+DIRDEPS = \
+
+
+.include <dirdeps.mk>
+
+.if ${DEP_RELDIR} == ${_DEP_RELDIR}
+# local dependencies - needed for -jN in clean tree
+.endif
diff --git a/sys/amd64/cloudabi64/cloudabi64_sysvec.c b/sys/amd64/cloudabi64/cloudabi64_sysvec.c
index 30a2bbf78498..70754884638d 100644
--- a/sys/amd64/cloudabi64/cloudabi64_sysvec.c
+++ b/sys/amd64/cloudabi64/cloudabi64_sysvec.c
@@ -143,7 +143,7 @@ static struct sysentvec cloudabi64_elf_sysvec = {
.sv_usrstack = USRSTACK,
.sv_stackprot = VM_PROT_READ | VM_PROT_WRITE,
.sv_copyout_strings = cloudabi64_copyout_strings,
- .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM,
+ .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM | SV_LP64,
.sv_set_syscall_retval = cloudabi64_set_syscall_retval,
.sv_fetch_syscall_args = cloudabi64_fetch_syscall_args,
.sv_syscallnames = cloudabi64_syscallnames,
diff --git a/sys/arm64/cloudabi64/cloudabi64_sysvec.c b/sys/arm64/cloudabi64/cloudabi64_sysvec.c
index 10b98209a291..cb569cd44460 100644
--- a/sys/arm64/cloudabi64/cloudabi64_sysvec.c
+++ b/sys/arm64/cloudabi64/cloudabi64_sysvec.c
@@ -144,7 +144,7 @@ static struct sysentvec cloudabi64_elf_sysvec = {
.sv_usrstack = USRSTACK,
.sv_stackprot = VM_PROT_READ | VM_PROT_WRITE,
.sv_copyout_strings = cloudabi64_copyout_strings,
- .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM,
+ .sv_flags = SV_ABI_CLOUDABI | SV_CAPSICUM | SV_LP64,
.sv_set_syscall_retval = cloudabi64_set_syscall_retval,
.sv_fetch_syscall_args = cloudabi64_fetch_syscall_args,
.sv_syscallnames = cloudabi64_syscallnames,
diff --git a/sys/boot/efi/boot1/Makefile b/sys/boot/efi/boot1/Makefile
index 5455e1a369ed..c4c92cba8932 100644
--- a/sys/boot/efi/boot1/Makefile
+++ b/sys/boot/efi/boot1/Makefile
@@ -53,7 +53,7 @@ FILES= boot1.efi boot1.efifat
FILESMODE_boot1.efi= ${BINMODE}
LDSCRIPT= ${.CURDIR}/../loader/arch/${MACHINE}/ldscript.${MACHINE}
-LDFLAGS= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
+LDFLAGS+= -Wl,-T${LDSCRIPT} -Wl,-Bsymbolic -shared
.if ${MACHINE_CPUARCH} == "aarch64"
CFLAGS+= -msoft-float -mgeneral-regs-only
diff --git a/sys/boot/uboot/common/main.c b/sys/boot/uboot/common/main.c
index f4fe214e7e99..d5c76644b0c7 100644
--- a/sys/boot/uboot/common/main.c
+++ b/sys/boot/uboot/common/main.c
@@ -387,7 +387,7 @@ probe_disks(int devidx, int load_type, int load_unit, int load_slice,
}
int
-main(void)
+main(int argc, char **argv)
{
struct api_signature *sig = NULL;
int load_type, load_unit, load_slice, load_partition;
@@ -395,12 +395,15 @@ main(void)
const char *ldev;
/*
+ * We first check if a command line argument was passed to us containing
+ * API's signature address. If it wasn't then we try to search for the
+ * API signature via the usual hinted address.
* If we can't find the magic signature and related info, exit with a
* unique error code that U-Boot reports as "## Application terminated,
* rc = 0xnnbadab1". Hopefully 'badab1' looks enough like "bad api" to
* provide a clue. It's better than 0xffffffff anyway.
*/
- if (!api_search_sig(&sig))
+ if (!api_parse_cmdline_sig(argc, argv, &sig) && !api_search_sig(&sig))
return (0x01badab1);
syscall_ptr = sig->syscall;
diff --git a/sys/boot/uboot/lib/glue.c b/sys/boot/uboot/lib/glue.c
index 4c843f0c422d..07db23dba0a7 100644
--- a/sys/boot/uboot/lib/glue.c
+++ b/sys/boot/uboot/lib/glue.c
@@ -68,6 +68,41 @@ valid_sig(struct api_signature *sig)
}
/*
+ * Checks to see if API signature's address was given to us as a command line
+ * argument by U-Boot.
+ *
+ * returns 1/0 depending on found/not found result
+ */
+int
+api_parse_cmdline_sig(int argc, char **argv, struct api_signature **sig)
+{
+ unsigned long api_address;
+ int c;
+
+ api_address = 0;
+ opterr = 0;
+ optreset = 1;
+ optind = 1;
+
+ while ((c = getopt (argc, argv, "a:")) != -1)
+ switch (c) {
+ case 'a':
+ api_address = strtoul(optarg, NULL, 16);
+ break;
+ default:
+ break;
+ }
+
+ if (api_address != 0) {
+ *sig = (struct api_signature *)api_address;
+ if (valid_sig(*sig))
+ return (1);
+ }
+
+ return (0);
+}
+
+/*
* Searches for the U-Boot API signature
*
* returns 1/0 depending on found/not found result
diff --git a/sys/boot/uboot/lib/glue.h b/sys/boot/uboot/lib/glue.h
index b9c60b625c0b..4c2da66ccb27 100644
--- a/sys/boot/uboot/lib/glue.h
+++ b/sys/boot/uboot/lib/glue.h
@@ -58,6 +58,7 @@
int syscall(int, int *, ...);
void *syscall_ptr;
+int api_parse_cmdline_sig(int argc, char **argv, struct api_signature **sig);
int api_search_sig(struct api_signature **sig);
#define UB_MAX_MR 16 /* max mem regions number */
diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h
index 28abc30beaad..4e1e6a220a21 100644
--- a/sys/cam/cam_ccb.h
+++ b/sys/cam/cam_ccb.h
@@ -189,16 +189,18 @@ typedef enum {
XPT_ATA_IO = 0x18 | XPT_FC_DEV_QUEUED,
/* Execute the requested ATA I/O operation */
- XPT_GET_SIM_KNOB = 0x18,
- /*
- * Get SIM specific knob values.
- */
+ XPT_GET_SIM_KNOB_OLD = 0x18, /* Compat only */
XPT_SET_SIM_KNOB = 0x19,
/*
* Set SIM specific knob values.
*/
+ XPT_GET_SIM_KNOB = 0x1a,
+ /*
+ * Get SIM specific knob values.
+ */
+
XPT_SMP_IO = 0x1b | XPT_FC_DEV_QUEUED,
/* Serial Management Protocol */
diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c
index c2dd6a5d3c50..e811fe6e305b 100644
--- a/sys/cam/cam_xpt.c
+++ b/sys/cam/cam_xpt.c
@@ -2610,6 +2610,7 @@ xpt_action_default(union ccb *start_ccb)
case XPT_RESET_BUS:
case XPT_IMMEDIATE_NOTIFY:
case XPT_NOTIFY_ACKNOWLEDGE:
+ case XPT_GET_SIM_KNOB_OLD:
case XPT_GET_SIM_KNOB:
case XPT_SET_SIM_KNOB:
case XPT_GET_TRAN_SETTINGS:
diff --git a/sys/cam/ctl/scsi_ctl.c b/sys/cam/ctl/scsi_ctl.c
index 27052407295b..98966e8fefce 100644
--- a/sys/cam/ctl/scsi_ctl.c
+++ b/sys/cam/ctl/scsi_ctl.c
@@ -1557,6 +1557,7 @@ ctlfedone(struct cam_periph *periph, union ccb *done_ccb)
break;
case XPT_SET_SIM_KNOB:
case XPT_GET_SIM_KNOB:
+ case XPT_GET_SIM_KNOB_OLD:
break;
default:
panic("%s: unexpected CCB type %#x", __func__,
diff --git a/sys/cddl/compat/opensolaris/sys/callo.h b/sys/cddl/compat/opensolaris/sys/callo.h
new file mode 100644
index 000000000000..df2ae694cc20
--- /dev/null
+++ b/sys/cddl/compat/opensolaris/sys/callo.h
@@ -0,0 +1,37 @@
+/*-
+ * Copyright (c) 2016 Alexander Motin <mav@FreeBSD.org>
+ * 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 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 _OPENSOLARIS_SYS_CALLO_H_
+#define _OPENSOLARIS_SYS_CALLO_H_
+
+#include_next <sys/callout.h>
+
+#define CALLOUT_REALTIME 0 /* realtime callout type */
+#define CALLOUT_NORMAL 1 /* normal callout type */
+
+#endif /* !_OPENSOLARIS_SYS_CALLO_H_ */
diff --git a/sys/cddl/compat/opensolaris/sys/systm.h b/sys/cddl/compat/opensolaris/sys/systm.h
index fe0e1998c2c4..f6a0dce4502b 100644
--- a/sys/cddl/compat/opensolaris/sys/systm.h
+++ b/sys/cddl/compat/opensolaris/sys/systm.h
@@ -42,6 +42,9 @@
#define delay(x) pause("soldelay", (x))
+#define timeout_generic(type, fn, arg, t, r, f) \
+ timeout(fn, arg, t / (NANOSEC/hz) + 1)
+
#endif /* _KERNEL */
#endif /* _OPENSOLARIS_SYS_SYSTM_H_ */
diff --git a/sys/cddl/compat/opensolaris/sys/time.h b/sys/cddl/compat/opensolaris/sys/time.h
index b54780c45f39..6116d5bd877d 100644
--- a/sys/cddl/compat/opensolaris/sys/time.h
+++ b/sys/cddl/compat/opensolaris/sys/time.h
@@ -40,6 +40,9 @@
#define MSEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / MILLISEC))
#define NSEC2MSEC(n) ((n) / (NANOSEC / MILLISEC))
+#define NSEC2SEC(n) ((n) / (NANOSEC / SEC))
+#define SEC2NSEC(m) ((hrtime_t)(m) * (NANOSEC / SEC))
+
typedef longlong_t hrtime_t;
#if defined(__i386__) || defined(__powerpc__)
diff --git a/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c b/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c
index 7038f7f9f156..4bba05ad9b2c 100644
--- a/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c
+++ b/sys/cddl/contrib/opensolaris/common/nvpair/opensolaris_nvpair.c
@@ -544,8 +544,7 @@ nvpair_free(nvpair_t *nvp)
int i;
for (i = 0; i < NVP_NELEM(nvp); i++)
- if (nvlp[i] != NULL)
- nvlist_free(nvlp[i]);
+ nvlist_free(nvlp[i]);
break;
}
default:
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c b/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
index 6eade2a3a4a8..57e5f5e579dc 100644
--- a/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
+++ b/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.c
@@ -24,6 +24,7 @@
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2014, Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifdef _KERNEL
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h b/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
index 56f3da7d43f9..eea60f37e9bd 100644
--- a/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
+++ b/sys/cddl/contrib/opensolaris/common/zfs/zfeature_common.h
@@ -23,6 +23,7 @@
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _ZFEATURE_COMMON_H
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c b/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c
index 39ad7ce5f104..0d8971cde1b3 100644
--- a/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c
+++ b/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.c
@@ -54,8 +54,69 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_t addr, const int cflag)
zfs_cmd_deadman_t *zcdm_c;
zfs_cmd_zcmd_t *zcmd_c;
zfs_cmd_edbp_t *edbp_c;
+ zfs_cmd_resume_t *resume_c;
switch (cflag) {
+ case ZFS_CMD_COMPAT_RESUME:
+ resume_c = (void *)addr;
+ /* zc */
+ strlcpy(zc->zc_name, resume_c->zc_name, MAXPATHLEN);
+ strlcpy(zc->zc_value, resume_c->zc_value, MAXPATHLEN * 2);
+ strlcpy(zc->zc_string, resume_c->zc_string, MAXPATHLEN);
+
+#define FIELD_COPY(field) zc->field = resume_c->field
+ FIELD_COPY(zc_nvlist_src);
+ FIELD_COPY(zc_nvlist_src_size);
+ FIELD_COPY(zc_nvlist_dst);
+ FIELD_COPY(zc_nvlist_dst_size);
+ FIELD_COPY(zc_nvlist_dst_filled);
+ FIELD_COPY(zc_pad2);
+ FIELD_COPY(zc_history);
+ FIELD_COPY(zc_guid);
+ FIELD_COPY(zc_nvlist_conf);
+ FIELD_COPY(zc_nvlist_conf_size);
+ FIELD_COPY(zc_cookie);
+ FIELD_COPY(zc_objset_type);
+ FIELD_COPY(zc_perm_action);
+ FIELD_COPY(zc_history_len);
+ FIELD_COPY(zc_history_offset);
+ FIELD_COPY(zc_obj);
+ FIELD_COPY(zc_iflags);
+ FIELD_COPY(zc_share);
+ FIELD_COPY(zc_jailid);
+ FIELD_COPY(zc_objset_stats);
+ FIELD_COPY(zc_begin_record);
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(zc->zc_inject_record.zi_func,
+ resume_c->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ zc->zc_inject_record.zi_nlanes = 1;
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
+ FIELD_COPY(zc_defer_destroy);
+ FIELD_COPY(zc_flags);
+ FIELD_COPY(zc_action_handle);
+ FIELD_COPY(zc_cleanup_fd);
+ FIELD_COPY(zc_simple);
+ FIELD_COPY(zc_resumable);
+ FIELD_COPY(zc_sendobj);
+ FIELD_COPY(zc_fromobj);
+ FIELD_COPY(zc_createtxg);
+ FIELD_COPY(zc_stat);
+#undef FIELD_COPY
+ break;
+
case ZFS_CMD_COMPAT_EDBP:
edbp_c = (void *)addr;
/* zc */
@@ -63,40 +124,57 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_t addr, const int cflag)
strlcpy(zc->zc_value, edbp_c->zc_value, MAXPATHLEN * 2);
strlcpy(zc->zc_string, edbp_c->zc_string, MAXPATHLEN);
-#define ZCMD_COPY(field) zc->field = edbp_c->field
- ZCMD_COPY(zc_nvlist_src);
- ZCMD_COPY(zc_nvlist_src_size);
- ZCMD_COPY(zc_nvlist_dst);
- ZCMD_COPY(zc_nvlist_dst_size);
- ZCMD_COPY(zc_nvlist_dst_filled);
- ZCMD_COPY(zc_pad2);
- ZCMD_COPY(zc_history);
- ZCMD_COPY(zc_guid);
- ZCMD_COPY(zc_nvlist_conf);
- ZCMD_COPY(zc_nvlist_conf_size);
- ZCMD_COPY(zc_cookie);
- ZCMD_COPY(zc_objset_type);
- ZCMD_COPY(zc_perm_action);
- ZCMD_COPY(zc_history_len);
- ZCMD_COPY(zc_history_offset);
- ZCMD_COPY(zc_obj);
- ZCMD_COPY(zc_iflags);
- ZCMD_COPY(zc_share);
- ZCMD_COPY(zc_jailid);
- ZCMD_COPY(zc_objset_stats);
+#define FIELD_COPY(field) zc->field = edbp_c->field
+ FIELD_COPY(zc_nvlist_src);
+ FIELD_COPY(zc_nvlist_src_size);
+ FIELD_COPY(zc_nvlist_dst);
+ FIELD_COPY(zc_nvlist_dst_size);
+ FIELD_COPY(zc_nvlist_dst_filled);
+ FIELD_COPY(zc_pad2);
+ FIELD_COPY(zc_history);
+ FIELD_COPY(zc_guid);
+ FIELD_COPY(zc_nvlist_conf);
+ FIELD_COPY(zc_nvlist_conf_size);
+ FIELD_COPY(zc_cookie);
+ FIELD_COPY(zc_objset_type);
+ FIELD_COPY(zc_perm_action);
+ FIELD_COPY(zc_history_len);
+ FIELD_COPY(zc_history_offset);
+ FIELD_COPY(zc_obj);
+ FIELD_COPY(zc_iflags);
+ FIELD_COPY(zc_share);
+ FIELD_COPY(zc_jailid);
+ FIELD_COPY(zc_objset_stats);
zc->zc_begin_record.drr_u.drr_begin = edbp_c->zc_begin_record;
- ZCMD_COPY(zc_inject_record);
- ZCMD_COPY(zc_defer_destroy);
- ZCMD_COPY(zc_flags);
- ZCMD_COPY(zc_action_handle);
- ZCMD_COPY(zc_cleanup_fd);
- ZCMD_COPY(zc_simple);
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(zc->zc_inject_record.zi_func,
+ edbp_c->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ zc->zc_inject_record.zi_nlanes = 1;
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
+ FIELD_COPY(zc_defer_destroy);
+ FIELD_COPY(zc_flags);
+ FIELD_COPY(zc_action_handle);
+ FIELD_COPY(zc_cleanup_fd);
+ FIELD_COPY(zc_simple);
zc->zc_resumable = B_FALSE;
- ZCMD_COPY(zc_sendobj);
- ZCMD_COPY(zc_fromobj);
- ZCMD_COPY(zc_createtxg);
- ZCMD_COPY(zc_stat);
-#undef ZCMD_COPY
+ FIELD_COPY(zc_sendobj);
+ FIELD_COPY(zc_fromobj);
+ FIELD_COPY(zc_createtxg);
+ FIELD_COPY(zc_stat);
+#undef FIELD_COPY
break;
case ZFS_CMD_COMPAT_ZCMD:
@@ -106,43 +184,60 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_t addr, const int cflag)
strlcpy(zc->zc_value, zcmd_c->zc_value, MAXPATHLEN * 2);
strlcpy(zc->zc_string, zcmd_c->zc_string, MAXPATHLEN);
-#define ZCMD_COPY(field) zc->field = zcmd_c->field
- ZCMD_COPY(zc_nvlist_src);
- ZCMD_COPY(zc_nvlist_src_size);
- ZCMD_COPY(zc_nvlist_dst);
- ZCMD_COPY(zc_nvlist_dst_size);
- ZCMD_COPY(zc_nvlist_dst_filled);
- ZCMD_COPY(zc_pad2);
- ZCMD_COPY(zc_history);
- ZCMD_COPY(zc_guid);
- ZCMD_COPY(zc_nvlist_conf);
- ZCMD_COPY(zc_nvlist_conf_size);
- ZCMD_COPY(zc_cookie);
- ZCMD_COPY(zc_objset_type);
- ZCMD_COPY(zc_perm_action);
- ZCMD_COPY(zc_history_len);
- ZCMD_COPY(zc_history_offset);
- ZCMD_COPY(zc_obj);
- ZCMD_COPY(zc_iflags);
- ZCMD_COPY(zc_share);
- ZCMD_COPY(zc_jailid);
- ZCMD_COPY(zc_objset_stats);
+#define FIELD_COPY(field) zc->field = zcmd_c->field
+ FIELD_COPY(zc_nvlist_src);
+ FIELD_COPY(zc_nvlist_src_size);
+ FIELD_COPY(zc_nvlist_dst);
+ FIELD_COPY(zc_nvlist_dst_size);
+ FIELD_COPY(zc_nvlist_dst_filled);
+ FIELD_COPY(zc_pad2);
+ FIELD_COPY(zc_history);
+ FIELD_COPY(zc_guid);
+ FIELD_COPY(zc_nvlist_conf);
+ FIELD_COPY(zc_nvlist_conf_size);
+ FIELD_COPY(zc_cookie);
+ FIELD_COPY(zc_objset_type);
+ FIELD_COPY(zc_perm_action);
+ FIELD_COPY(zc_history_len);
+ FIELD_COPY(zc_history_offset);
+ FIELD_COPY(zc_obj);
+ FIELD_COPY(zc_iflags);
+ FIELD_COPY(zc_share);
+ FIELD_COPY(zc_jailid);
+ FIELD_COPY(zc_objset_stats);
zc->zc_begin_record.drr_u.drr_begin = zcmd_c->zc_begin_record;
- ZCMD_COPY(zc_inject_record);
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(zc->zc_inject_record.zi_func,
+ zcmd_c->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ zc->zc_inject_record.zi_nlanes = 1;
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
/* boolean_t -> uint32_t */
zc->zc_defer_destroy = (uint32_t)(zcmd_c->zc_defer_destroy);
zc->zc_flags = 0;
- ZCMD_COPY(zc_action_handle);
- ZCMD_COPY(zc_cleanup_fd);
- ZCMD_COPY(zc_simple);
+ FIELD_COPY(zc_action_handle);
+ FIELD_COPY(zc_cleanup_fd);
+ FIELD_COPY(zc_simple);
zc->zc_resumable = B_FALSE;
- ZCMD_COPY(zc_sendobj);
- ZCMD_COPY(zc_fromobj);
- ZCMD_COPY(zc_createtxg);
- ZCMD_COPY(zc_stat);
-#undef ZCMD_COPY
+ FIELD_COPY(zc_sendobj);
+ FIELD_COPY(zc_fromobj);
+ FIELD_COPY(zc_createtxg);
+ FIELD_COPY(zc_stat);
+#undef FIELD_COPY
break;
@@ -152,6 +247,8 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_t addr, const int cflag)
strlcpy(zc->zc_name, zcdm_c->zc_name, MAXPATHLEN);
strlcpy(zc->zc_value, zcdm_c->zc_value, MAXPATHLEN * 2);
strlcpy(zc->zc_string, zcdm_c->zc_string, MAXPATHLEN);
+
+#define FIELD_COPY(field) zc->field = zcdm_c->field
zc->zc_guid = zcdm_c->zc_guid;
zc->zc_nvlist_conf = zcdm_c->zc_nvlist_conf;
zc->zc_nvlist_conf_size = zcdm_c->zc_nvlist_conf_size;
@@ -181,12 +278,28 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_t addr, const int cflag)
zc->zc_fromobj = zcdm_c->zc_fromobj;
zc->zc_createtxg = zcdm_c->zc_createtxg;
zc->zc_stat = zcdm_c->zc_stat;
-
- /* zc_inject_record doesn't change in libzfs_core */
- zcdm_c->zc_inject_record = zc->zc_inject_record;
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(zc->zc_inject_record.zi_func,
+ resume_c->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ zc->zc_inject_record.zi_nlanes = 1;
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
/* we always assume zc_nvlist_dst_filled is true */
zc->zc_nvlist_dst_filled = B_TRUE;
+#undef FIELD_COPY
break;
case ZFS_CMD_COMPAT_V28:
@@ -255,6 +368,7 @@ zfs_cmd_compat_get(zfs_cmd_t *zc, caddr_t addr, const int cflag)
zc28_c->zc_inject_record.zi_duration;
zc->zc_inject_record.zi_timer =
zc28_c->zc_inject_record.zi_timer;
+ zc->zc_inject_record.zi_nlanes = 1;
zc->zc_inject_record.zi_cmd = ZINJECT_UNINITIALIZED;
zc->zc_inject_record.zi_pad = 0;
break;
@@ -319,47 +433,121 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_t addr, const int request,
zfs_cmd_deadman_t *zcdm_c;
zfs_cmd_zcmd_t *zcmd_c;
zfs_cmd_edbp_t *edbp_c;
+ zfs_cmd_resume_t *resume_c;
switch (cflag) {
+ case ZFS_CMD_COMPAT_RESUME:
+ resume_c = (void *)addr;
+ strlcpy(resume_c->zc_name, zc->zc_name, MAXPATHLEN);
+ strlcpy(resume_c->zc_value, zc->zc_value, MAXPATHLEN * 2);
+ strlcpy(resume_c->zc_string, zc->zc_string, MAXPATHLEN);
+
+#define FIELD_COPY(field) resume_c->field = zc->field
+ FIELD_COPY(zc_nvlist_src);
+ FIELD_COPY(zc_nvlist_src_size);
+ FIELD_COPY(zc_nvlist_dst);
+ FIELD_COPY(zc_nvlist_dst_size);
+ FIELD_COPY(zc_nvlist_dst_filled);
+ FIELD_COPY(zc_pad2);
+ FIELD_COPY(zc_history);
+ FIELD_COPY(zc_guid);
+ FIELD_COPY(zc_nvlist_conf);
+ FIELD_COPY(zc_nvlist_conf_size);
+ FIELD_COPY(zc_cookie);
+ FIELD_COPY(zc_objset_type);
+ FIELD_COPY(zc_perm_action);
+ FIELD_COPY(zc_history_len);
+ FIELD_COPY(zc_history_offset);
+ FIELD_COPY(zc_obj);
+ FIELD_COPY(zc_iflags);
+ FIELD_COPY(zc_share);
+ FIELD_COPY(zc_jailid);
+ FIELD_COPY(zc_objset_stats);
+ FIELD_COPY(zc_begin_record);
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(resume_c->zc_inject_record.zi_func,
+ zc->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
+ FIELD_COPY(zc_defer_destroy);
+ FIELD_COPY(zc_flags);
+ FIELD_COPY(zc_action_handle);
+ FIELD_COPY(zc_cleanup_fd);
+ FIELD_COPY(zc_simple);
+ FIELD_COPY(zc_sendobj);
+ FIELD_COPY(zc_fromobj);
+ FIELD_COPY(zc_createtxg);
+ FIELD_COPY(zc_stat);
+#undef FIELD_COPY
+ break;
+
case ZFS_CMD_COMPAT_EDBP:
edbp_c = (void *)addr;
strlcpy(edbp_c->zc_name, zc->zc_name, MAXPATHLEN);
strlcpy(edbp_c->zc_value, zc->zc_value, MAXPATHLEN * 2);
strlcpy(edbp_c->zc_string, zc->zc_string, MAXPATHLEN);
-#define ZCMD_COPY(field) edbp_c->field = zc->field
- ZCMD_COPY(zc_nvlist_src);
- ZCMD_COPY(zc_nvlist_src_size);
- ZCMD_COPY(zc_nvlist_dst);
- ZCMD_COPY(zc_nvlist_dst_size);
- ZCMD_COPY(zc_nvlist_dst_filled);
- ZCMD_COPY(zc_pad2);
- ZCMD_COPY(zc_history);
- ZCMD_COPY(zc_guid);
- ZCMD_COPY(zc_nvlist_conf);
- ZCMD_COPY(zc_nvlist_conf_size);
- ZCMD_COPY(zc_cookie);
- ZCMD_COPY(zc_objset_type);
- ZCMD_COPY(zc_perm_action);
- ZCMD_COPY(zc_history_len);
- ZCMD_COPY(zc_history_offset);
- ZCMD_COPY(zc_obj);
- ZCMD_COPY(zc_iflags);
- ZCMD_COPY(zc_share);
- ZCMD_COPY(zc_jailid);
- ZCMD_COPY(zc_objset_stats);
+#define FIELD_COPY(field) edbp_c->field = zc->field
+ FIELD_COPY(zc_nvlist_src);
+ FIELD_COPY(zc_nvlist_src_size);
+ FIELD_COPY(zc_nvlist_dst);
+ FIELD_COPY(zc_nvlist_dst_size);
+ FIELD_COPY(zc_nvlist_dst_filled);
+ FIELD_COPY(zc_pad2);
+ FIELD_COPY(zc_history);
+ FIELD_COPY(zc_guid);
+ FIELD_COPY(zc_nvlist_conf);
+ FIELD_COPY(zc_nvlist_conf_size);
+ FIELD_COPY(zc_cookie);
+ FIELD_COPY(zc_objset_type);
+ FIELD_COPY(zc_perm_action);
+ FIELD_COPY(zc_history_len);
+ FIELD_COPY(zc_history_offset);
+ FIELD_COPY(zc_obj);
+ FIELD_COPY(zc_iflags);
+ FIELD_COPY(zc_share);
+ FIELD_COPY(zc_jailid);
+ FIELD_COPY(zc_objset_stats);
edbp_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin;
- ZCMD_COPY(zc_inject_record);
- ZCMD_COPY(zc_defer_destroy);
- ZCMD_COPY(zc_flags);
- ZCMD_COPY(zc_action_handle);
- ZCMD_COPY(zc_cleanup_fd);
- ZCMD_COPY(zc_simple);
- ZCMD_COPY(zc_sendobj);
- ZCMD_COPY(zc_fromobj);
- ZCMD_COPY(zc_createtxg);
- ZCMD_COPY(zc_stat);
-#undef ZCMD_COPY
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(resume_c->zc_inject_record.zi_func,
+ zc->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
+ FIELD_COPY(zc_defer_destroy);
+ FIELD_COPY(zc_flags);
+ FIELD_COPY(zc_action_handle);
+ FIELD_COPY(zc_cleanup_fd);
+ FIELD_COPY(zc_simple);
+ FIELD_COPY(zc_sendobj);
+ FIELD_COPY(zc_fromobj);
+ FIELD_COPY(zc_createtxg);
+ FIELD_COPY(zc_stat);
+#undef FIELD_COPY
break;
case ZFS_CMD_COMPAT_ZCMD:
@@ -369,42 +557,58 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_t addr, const int request,
strlcpy(zcmd_c->zc_value, zc->zc_value, MAXPATHLEN * 2);
strlcpy(zcmd_c->zc_string, zc->zc_string, MAXPATHLEN);
-#define ZCMD_COPY(field) zcmd_c->field = zc->field
- ZCMD_COPY(zc_nvlist_src);
- ZCMD_COPY(zc_nvlist_src_size);
- ZCMD_COPY(zc_nvlist_dst);
- ZCMD_COPY(zc_nvlist_dst_size);
- ZCMD_COPY(zc_nvlist_dst_filled);
- ZCMD_COPY(zc_pad2);
- ZCMD_COPY(zc_history);
- ZCMD_COPY(zc_guid);
- ZCMD_COPY(zc_nvlist_conf);
- ZCMD_COPY(zc_nvlist_conf_size);
- ZCMD_COPY(zc_cookie);
- ZCMD_COPY(zc_objset_type);
- ZCMD_COPY(zc_perm_action);
- ZCMD_COPY(zc_history_len);
- ZCMD_COPY(zc_history_offset);
- ZCMD_COPY(zc_obj);
- ZCMD_COPY(zc_iflags);
- ZCMD_COPY(zc_share);
- ZCMD_COPY(zc_jailid);
- ZCMD_COPY(zc_objset_stats);
+#define FIELD_COPY(field) zcmd_c->field = zc->field
+ FIELD_COPY(zc_nvlist_src);
+ FIELD_COPY(zc_nvlist_src_size);
+ FIELD_COPY(zc_nvlist_dst);
+ FIELD_COPY(zc_nvlist_dst_size);
+ FIELD_COPY(zc_nvlist_dst_filled);
+ FIELD_COPY(zc_pad2);
+ FIELD_COPY(zc_history);
+ FIELD_COPY(zc_guid);
+ FIELD_COPY(zc_nvlist_conf);
+ FIELD_COPY(zc_nvlist_conf_size);
+ FIELD_COPY(zc_cookie);
+ FIELD_COPY(zc_objset_type);
+ FIELD_COPY(zc_perm_action);
+ FIELD_COPY(zc_history_len);
+ FIELD_COPY(zc_history_offset);
+ FIELD_COPY(zc_obj);
+ FIELD_COPY(zc_iflags);
+ FIELD_COPY(zc_share);
+ FIELD_COPY(zc_jailid);
+ FIELD_COPY(zc_objset_stats);
zcmd_c->zc_begin_record = zc->zc_begin_record.drr_u.drr_begin;
- ZCMD_COPY(zc_inject_record);
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(resume_c->zc_inject_record.zi_func,
+ zc->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
/* boolean_t -> uint32_t */
zcmd_c->zc_defer_destroy = (uint32_t)(zc->zc_defer_destroy);
zcmd_c->zc_temphold = 0;
- ZCMD_COPY(zc_action_handle);
- ZCMD_COPY(zc_cleanup_fd);
- ZCMD_COPY(zc_simple);
- ZCMD_COPY(zc_sendobj);
- ZCMD_COPY(zc_fromobj);
- ZCMD_COPY(zc_createtxg);
- ZCMD_COPY(zc_stat);
-#undef ZCMD_COPY
+ FIELD_COPY(zc_action_handle);
+ FIELD_COPY(zc_cleanup_fd);
+ FIELD_COPY(zc_simple);
+ FIELD_COPY(zc_sendobj);
+ FIELD_COPY(zc_fromobj);
+ FIELD_COPY(zc_createtxg);
+ FIELD_COPY(zc_stat);
+#undef FIELD_COPY
break;
@@ -414,6 +618,8 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_t addr, const int request,
strlcpy(zcdm_c->zc_name, zc->zc_name, MAXPATHLEN);
strlcpy(zcdm_c->zc_value, zc->zc_value, MAXPATHLEN * 2);
strlcpy(zcdm_c->zc_string, zc->zc_string, MAXPATHLEN);
+
+#define FIELD_COPY(field) zcdm_c->field = zc->field
zcdm_c->zc_guid = zc->zc_guid;
zcdm_c->zc_nvlist_conf = zc->zc_nvlist_conf;
zcdm_c->zc_nvlist_conf_size = zc->zc_nvlist_conf_size;
@@ -442,9 +648,24 @@ zfs_cmd_compat_put(zfs_cmd_t *zc, caddr_t addr, const int request,
zcdm_c->zc_fromobj = zc->zc_fromobj;
zcdm_c->zc_createtxg = zc->zc_createtxg;
zcdm_c->zc_stat = zc->zc_stat;
-
- /* zc_inject_record doesn't change in libzfs_core */
- zc->zc_inject_record = zcdm_c->zc_inject_record;
+ FIELD_COPY(zc_inject_record.zi_objset);
+ FIELD_COPY(zc_inject_record.zi_object);
+ FIELD_COPY(zc_inject_record.zi_start);
+ FIELD_COPY(zc_inject_record.zi_end);
+ FIELD_COPY(zc_inject_record.zi_guid);
+ FIELD_COPY(zc_inject_record.zi_level);
+ FIELD_COPY(zc_inject_record.zi_error);
+ FIELD_COPY(zc_inject_record.zi_type);
+ FIELD_COPY(zc_inject_record.zi_freq);
+ FIELD_COPY(zc_inject_record.zi_failfast);
+ strlcpy(resume_c->zc_inject_record.zi_func,
+ zc->zc_inject_record.zi_func, MAXNAMELEN);
+ FIELD_COPY(zc_inject_record.zi_iotype);
+ FIELD_COPY(zc_inject_record.zi_duration);
+ FIELD_COPY(zc_inject_record.zi_timer);
+ FIELD_COPY(zc_inject_record.zi_cmd);
+ FIELD_COPY(zc_inject_record.zi_pad);
+#undef FIELD_COPY
#ifndef _KERNEL
if (request == ZFS_IOC_RECV)
strlcpy(zcdm_c->zc_top_ds,
@@ -766,6 +987,12 @@ zcmd_ioctl_compat(int fd, int request, zfs_cmd_t *zc, const int cflag)
zp.zfs_cmd_size = sizeof(zfs_cmd_t);
zp.zfs_ioctl_version = ZFS_IOCVER_CURRENT;
return (ioctl(fd, ncmd, &zp));
+ case ZFS_CMD_COMPAT_RESUME:
+ ncmd = _IOWR('Z', request, struct zfs_iocparm);
+ zp.zfs_cmd = (uint64_t)zc;
+ zp.zfs_cmd_size = sizeof(zfs_cmd_resume_t);
+ zp.zfs_ioctl_version = ZFS_IOCVER_RESUME;
+ return (ioctl(fd, ncmd, &zp));
case ZFS_CMD_COMPAT_EDBP:
ncmd = _IOWR('Z', request, struct zfs_iocparm);
zp.zfs_cmd = (uint64_t)zc;
@@ -876,7 +1103,8 @@ zfs_ioctl_compat_innvl(zfs_cmd_t *zc, nvlist_t * innvl, const int vec,
int err;
if (cflag == ZFS_CMD_COMPAT_NONE || cflag == ZFS_CMD_COMPAT_LZC ||
- cflag == ZFS_CMD_COMPAT_ZCMD || cflag == ZFS_CMD_COMPAT_EDBP)
+ cflag == ZFS_CMD_COMPAT_ZCMD || cflag == ZFS_CMD_COMPAT_EDBP ||
+ cflag == ZFS_CMD_COMPAT_RESUME)
goto out;
switch (vec) {
@@ -1028,7 +1256,8 @@ zfs_ioctl_compat_outnvl(zfs_cmd_t *zc, nvlist_t * outnvl, const int vec,
nvlist_t *tmpnvl;
if (cflag == ZFS_CMD_COMPAT_NONE || cflag == ZFS_CMD_COMPAT_LZC ||
- cflag == ZFS_CMD_COMPAT_ZCMD || cflag == ZFS_CMD_COMPAT_EDBP)
+ cflag == ZFS_CMD_COMPAT_ZCMD || cflag == ZFS_CMD_COMPAT_EDBP ||
+ cflag == ZFS_CMD_COMPAT_RESUME)
return (outnvl);
switch (vec) {
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h b/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h
index 8361aa32b459..6f24380a79db 100644
--- a/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h
+++ b/sys/cddl/contrib/opensolaris/common/zfs/zfs_ioctl_compat.h
@@ -53,7 +53,8 @@ extern "C" {
#define ZFS_IOCVER_ZCMD 3
#define ZFS_IOCVER_EDBP 4
#define ZFS_IOCVER_RESUME 5
-#define ZFS_IOCVER_CURRENT ZFS_IOCVER_RESUME
+#define ZFS_IOCVER_INLANES 6
+#define ZFS_IOCVER_CURRENT ZFS_IOCVER_INLANES
/* compatibility conversion flag */
#define ZFS_CMD_COMPAT_NONE 0
@@ -63,6 +64,7 @@ extern "C" {
#define ZFS_CMD_COMPAT_LZC 4
#define ZFS_CMD_COMPAT_ZCMD 5
#define ZFS_CMD_COMPAT_EDBP 6
+#define ZFS_CMD_COMPAT_RESUME 7
#define ZFS_IOC_COMPAT_PASS 254
#define ZFS_IOC_COMPAT_FAIL 255
@@ -167,6 +169,25 @@ typedef struct zfs_cmd_v28 {
zfs_stat_t zc_stat;
} zfs_cmd_v28_t;
+typedef struct zinject_record_deadman {
+ uint64_t zi_objset;
+ uint64_t zi_object;
+ uint64_t zi_start;
+ uint64_t zi_end;
+ uint64_t zi_guid;
+ uint32_t zi_level;
+ uint32_t zi_error;
+ uint64_t zi_type;
+ uint32_t zi_freq;
+ uint32_t zi_failfast;
+ char zi_func[MAXNAMELEN];
+ uint32_t zi_iotype;
+ int32_t zi_duration;
+ uint64_t zi_timer;
+ uint32_t zi_cmd;
+ uint32_t zi_pad;
+} zinject_record_deadman_t;
+
typedef struct zfs_cmd_deadman {
char zc_name[MAXPATHLEN];
char zc_value[MAXPATHLEN * 2];
@@ -192,7 +213,7 @@ typedef struct zfs_cmd_deadman {
dmu_objset_stats_t zc_objset_stats;
struct drr_begin zc_begin_record;
/* zc_inject_record doesn't change in libzfs_core */
- zinject_record_t zc_inject_record;
+ zinject_record_deadman_t zc_inject_record;
boolean_t zc_defer_destroy;
boolean_t zc_temphold;
uint64_t zc_action_handle;
@@ -235,7 +256,7 @@ typedef struct zfs_cmd_zcmd {
uint64_t zc_jailid;
dmu_objset_stats_t zc_objset_stats;
struct drr_begin zc_begin_record;
- zinject_record_t zc_inject_record;
+ zinject_record_deadman_t zc_inject_record;
boolean_t zc_defer_destroy;
boolean_t zc_temphold;
uint64_t zc_action_handle;
@@ -278,7 +299,7 @@ typedef struct zfs_cmd_edbp {
uint64_t zc_jailid;
dmu_objset_stats_t zc_objset_stats;
struct drr_begin zc_begin_record;
- zinject_record_t zc_inject_record;
+ zinject_record_deadman_t zc_inject_record;
uint32_t zc_defer_destroy;
uint32_t zc_flags;
uint64_t zc_action_handle;
@@ -291,6 +312,49 @@ typedef struct zfs_cmd_edbp {
zfs_stat_t zc_stat;
} zfs_cmd_edbp_t;
+typedef struct zfs_cmd_resume {
+ char zc_name[MAXPATHLEN]; /* name of pool or dataset */
+ uint64_t zc_nvlist_src; /* really (char *) */
+ uint64_t zc_nvlist_src_size;
+ uint64_t zc_nvlist_dst; /* really (char *) */
+ uint64_t zc_nvlist_dst_size;
+ boolean_t zc_nvlist_dst_filled; /* put an nvlist in dst? */
+ int zc_pad2;
+
+ /*
+ * The following members are for legacy ioctls which haven't been
+ * converted to the new method.
+ */
+ uint64_t zc_history; /* really (char *) */
+ char zc_value[MAXPATHLEN * 2];
+ char zc_string[MAXNAMELEN];
+ uint64_t zc_guid;
+ uint64_t zc_nvlist_conf; /* really (char *) */
+ uint64_t zc_nvlist_conf_size;
+ uint64_t zc_cookie;
+ uint64_t zc_objset_type;
+ uint64_t zc_perm_action;
+ uint64_t zc_history_len;
+ uint64_t zc_history_offset;
+ uint64_t zc_obj;
+ uint64_t zc_iflags; /* internal to zfs(7fs) */
+ zfs_share_t zc_share;
+ uint64_t zc_jailid;
+ dmu_objset_stats_t zc_objset_stats;
+ dmu_replay_record_t zc_begin_record;
+ zinject_record_deadman_t zc_inject_record;
+ uint32_t zc_defer_destroy;
+ uint32_t zc_flags;
+ uint64_t zc_action_handle;
+ int zc_cleanup_fd;
+ uint8_t zc_simple;
+ boolean_t zc_resumable;
+ uint64_t zc_sendobj;
+ uint64_t zc_fromobj;
+ uint64_t zc_createtxg;
+ zfs_stat_t zc_stat;
+} zfs_cmd_resume_t;
+
#ifdef _KERNEL
unsigned static long zfs_ioctl_v15_to_v28[] = {
0, /* 0 ZFS_IOC_POOL_CREATE */
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c b/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
index 20b54d84dbc4..c310a67b2721 100644
--- a/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
+++ b/sys/cddl/contrib/opensolaris/common/zfs/zfs_prop.c
@@ -23,6 +23,7 @@
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c b/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
index 4d906b02bc02..9c717442ed7a 100644
--- a/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
+++ b/sys/cddl/contrib/opensolaris/common/zfs/zpool_prop.c
@@ -22,6 +22,7 @@
* Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zio.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
index 2719a475c85c..d3bce0e7ae54 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c
@@ -23,7 +23,7 @@
/*
* Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2015, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2016, Joyent, Inc. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
*/
@@ -678,10 +678,12 @@ dtrace_error(uint32_t *counter)
* Use the DTRACE_LOADFUNC macro to define functions for each of loading a
* uint8_t, a uint16_t, a uint32_t and a uint64_t.
*/
+/* BEGIN CSTYLED */
DTRACE_LOADFUNC(8)
DTRACE_LOADFUNC(16)
DTRACE_LOADFUNC(32)
DTRACE_LOADFUNC(64)
+/* END CSTYLED */
static int
dtrace_inscratch(uintptr_t dest, size_t size, dtrace_mstate_t *mstate)
@@ -765,6 +767,7 @@ dtrace_canstore(uint64_t addr, size_t sz, dtrace_mstate_t *mstate,
uintptr_t base = (uintptr_t)dstate->dtds_base +
(dstate->dtds_hashsize * sizeof (dtrace_dynhash_t));
uintptr_t chunkoffs;
+ dtrace_dynvar_t *dvar;
/*
* Before we assume that we can store here, we need to make
@@ -781,6 +784,8 @@ dtrace_canstore(uint64_t addr, size_t sz, dtrace_mstate_t *mstate,
*
* (3) Not span a chunk boundary
*
+ * (4) Not be in the tuple space of a dynamic variable
+ *
*/
if (addr < base)
return (0);
@@ -793,6 +798,15 @@ dtrace_canstore(uint64_t addr, size_t sz, dtrace_mstate_t *mstate,
if (chunkoffs + sz > dstate->dtds_chunksize)
return (0);
+ dvar = (dtrace_dynvar_t *)((uintptr_t)addr - chunkoffs);
+
+ if (dvar->dtdv_hashval == DTRACE_DYNHASH_FREE)
+ return (0);
+
+ if (chunkoffs < sizeof (dtrace_dynvar_t) +
+ ((dvar->dtdv_tuple.dtt_nkeys - 1) * sizeof (dtrace_key_t)))
+ return (0);
+
return (1);
}
@@ -5632,6 +5646,12 @@ next:
ipaddr_t ip4;
uint8_t *ptr8, val;
+ if (!dtrace_canload(tupregs[argi].dttk_value,
+ sizeof (ipaddr_t), mstate, vstate)) {
+ regs[rd] = 0;
+ break;
+ }
+
/*
* Safely load the IPv4 address.
*/
@@ -5685,6 +5705,12 @@ next:
* just the IPv4 string is returned for inet_ntoa6.
*/
+ if (!dtrace_canload(tupregs[argi].dttk_value,
+ sizeof (struct in6_addr), mstate, vstate)) {
+ regs[rd] = 0;
+ break;
+ }
+
/*
* Safely load the IPv6 address.
*/
@@ -6248,6 +6274,7 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate,
ASSERT(id >= DIF_VAR_OTHER_UBASE);
id -= DIF_VAR_OTHER_UBASE;
+ VERIFY(id < vstate->dtvs_nglobals);
svar = vstate->dtvs_globals[id];
ASSERT(svar != NULL);
v = &svar->dtsv_var;
@@ -6339,7 +6366,7 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate,
ASSERT(id >= DIF_VAR_OTHER_UBASE);
id -= DIF_VAR_OTHER_UBASE;
- ASSERT(id < vstate->dtvs_nlocals);
+ VERIFY(id < vstate->dtvs_nlocals);
ASSERT(vstate->dtvs_locals != NULL);
svar = vstate->dtvs_locals[id];
@@ -6417,6 +6444,7 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate,
id = DIF_INSTR_VAR(instr);
ASSERT(id >= DIF_VAR_OTHER_UBASE);
id -= DIF_VAR_OTHER_UBASE;
+ VERIFY(id < vstate->dtvs_ntlocals);
key = &tupregs[DIF_DTR_NREGS];
key[0].dttk_value = (uint64_t)id;
@@ -6530,8 +6558,10 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate,
if (DIF_INSTR_OP(instr) == DIF_OP_LDTAA) {
DTRACE_TLS_THRKEY(key[nkeys].dttk_value);
key[nkeys++].dttk_size = 0;
+ VERIFY(id < vstate->dtvs_ntlocals);
v = &vstate->dtvs_tlocals[id];
} else {
+ VERIFY(id < vstate->dtvs_nglobals);
v = &vstate->dtvs_globals[id]->dtsv_var;
}
@@ -6570,8 +6600,10 @@ dtrace_dif_emulate(dtrace_difo_t *difo, dtrace_mstate_t *mstate,
if (DIF_INSTR_OP(instr) == DIF_OP_STTAA) {
DTRACE_TLS_THRKEY(key[nkeys].dttk_value);
key[nkeys++].dttk_size = 0;
+ VERIFY(id < vstate->dtvs_ntlocals);
v = &vstate->dtvs_tlocals[id];
} else {
+ VERIFY(id < vstate->dtvs_nglobals);
v = &vstate->dtvs_globals[id]->dtsv_var;
}
@@ -9584,6 +9616,7 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
int (*efunc)(uint_t pc, const char *, ...) = dtrace_difo_err;
int kcheckload;
uint_t pc;
+ int maxglobal = -1, maxlocal = -1, maxtlocal = -1;
kcheckload = cr == NULL ||
(vstate->dtvs_state->dts_cred.dcr_visible & DTRACE_CRV_KERNEL) == 0;
@@ -9913,6 +9946,9 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
switch (v->dtdv_scope) {
case DIFV_SCOPE_GLOBAL:
+ if (maxglobal == -1 || ndx > maxglobal)
+ maxglobal = ndx;
+
if (ndx < vstate->dtvs_nglobals) {
dtrace_statvar_t *svar;
@@ -9923,11 +9959,17 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
break;
case DIFV_SCOPE_THREAD:
+ if (maxtlocal == -1 || ndx > maxtlocal)
+ maxtlocal = ndx;
+
if (ndx < vstate->dtvs_ntlocals)
existing = &vstate->dtvs_tlocals[ndx];
break;
case DIFV_SCOPE_LOCAL:
+ if (maxlocal == -1 || ndx > maxlocal)
+ maxlocal = ndx;
+
if (ndx < vstate->dtvs_nlocals) {
dtrace_statvar_t *svar;
@@ -9976,6 +10018,37 @@ dtrace_difo_validate(dtrace_difo_t *dp, dtrace_vstate_t *vstate, uint_t nregs,
}
}
+ for (pc = 0; pc < dp->dtdo_len && err == 0; pc++) {
+ dif_instr_t instr = dp->dtdo_buf[pc];
+
+ uint_t v = DIF_INSTR_VAR(instr);
+ uint_t op = DIF_INSTR_OP(instr);
+
+ switch (op) {
+ case DIF_OP_LDGS:
+ case DIF_OP_LDGAA:
+ case DIF_OP_STGS:
+ case DIF_OP_STGAA:
+ if (v > DIF_VAR_OTHER_UBASE + maxglobal)
+ err += efunc(pc, "invalid variable %u\n", v);
+ break;
+ case DIF_OP_LDTS:
+ case DIF_OP_LDTAA:
+ case DIF_OP_STTS:
+ case DIF_OP_STTAA:
+ if (v > DIF_VAR_OTHER_UBASE + maxtlocal)
+ err += efunc(pc, "invalid variable %u\n", v);
+ break;
+ case DIF_OP_LDLS:
+ case DIF_OP_STLS:
+ if (v > DIF_VAR_OTHER_UBASE + maxlocal)
+ err += efunc(pc, "invalid variable %u\n", v);
+ break;
+ default:
+ break;
+ }
+ }
+
return (err);
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
index 758ce0b21893..51db19ba3c9c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/fasttrap.c
@@ -63,13 +63,16 @@
#ifndef illumos
#include <sys/dtrace_bsd.h>
#include <sys/eventhandler.h>
+#include <sys/rmlock.h>
#include <sys/sysctl.h>
#include <sys/u8_textprep.h>
#include <sys/user.h>
+
#include <vm/vm.h>
#include <vm/pmap.h>
#include <vm/vm_map.h>
#include <vm/vm_param.h>
+
#include <cddl/dev/dtrace/dtrace_cddl.h>
#endif
@@ -224,7 +227,7 @@ static void fasttrap_thread_dtor(void *, struct thread *);
#define FASTTRAP_PROCS_INDEX(pid) ((pid) & fasttrap_procs.fth_mask)
#ifndef illumos
-static kmutex_t fasttrap_cpuc_pid_lock[MAXCPU];
+struct rmlock fasttrap_tp_lock;
static eventhandler_tag fasttrap_thread_dtor_tag;
#endif
@@ -439,10 +442,15 @@ fasttrap_mod_barrier(uint64_t gen)
fasttrap_mod_gen++;
+#ifdef illumos
CPU_FOREACH(i) {
mutex_enter(&fasttrap_cpuc_pid_lock[i]);
mutex_exit(&fasttrap_cpuc_pid_lock[i]);
}
+#else
+ rm_wlock(&fasttrap_tp_lock);
+ rm_wunlock(&fasttrap_tp_lock);
+#endif
}
/*
@@ -2574,10 +2582,7 @@ fasttrap_load(void)
mutex_init(&fasttrap_procs.fth_table[i].ftb_mtx,
"processes bucket mtx", MUTEX_DEFAULT, NULL);
- CPU_FOREACH(i) {
- mutex_init(&fasttrap_cpuc_pid_lock[i], "fasttrap barrier",
- MUTEX_DEFAULT, NULL);
- }
+ rm_init(&fasttrap_tp_lock, "fasttrap tracepoint");
/*
* This event handler must run before kdtrace_thread_dtor() since it
@@ -2710,9 +2715,7 @@ fasttrap_unload(void)
#ifndef illumos
destroy_dev(fasttrap_cdev);
mutex_destroy(&fasttrap_count_mtx);
- CPU_FOREACH(i) {
- mutex_destroy(&fasttrap_cpuc_pid_lock[i]);
- }
+ rm_destroy(&fasttrap_tp_lock);
#endif
return (0);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
index fad9874d3cd2..f9449037af99 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/arc.c
@@ -3606,7 +3606,7 @@ arc_kmem_reap_now(void)
static void
arc_reclaim_thread(void *dummy __unused)
{
- clock_t growtime = 0;
+ hrtime_t growtime = 0;
callb_cpr_t cpr;
CALLB_CPR_INIT(&cpr, &arc_reclaim_lock, callb_generic_cpr, FTAG);
@@ -3627,7 +3627,7 @@ arc_reclaim_thread(void *dummy __unused)
* Wait at least zfs_grow_retry (default 60) seconds
* before considering growing.
*/
- growtime = ddi_get_lbolt() + (arc_grow_retry * hz);
+ growtime = gethrtime() + SEC2NSEC(arc_grow_retry);
arc_kmem_reap_now();
@@ -3647,7 +3647,7 @@ arc_reclaim_thread(void *dummy __unused)
}
} else if (free_memory < arc_c >> arc_no_grow_shift) {
arc_no_grow = B_TRUE;
- } else if (ddi_get_lbolt() >= growtime) {
+ } else if (gethrtime() >= growtime) {
arc_no_grow = B_FALSE;
}
@@ -3681,8 +3681,8 @@ arc_reclaim_thread(void *dummy __unused)
* even if we aren't being signalled)
*/
CALLB_CPR_SAFE_BEGIN(&cpr);
- (void) cv_timedwait(&arc_reclaim_thread_cv,
- &arc_reclaim_lock, hz);
+ (void) cv_timedwait_hires(&arc_reclaim_thread_cv,
+ &arc_reclaim_lock, SEC2NSEC(1), MSEC2NSEC(1), 0);
CALLB_CPR_SAFE_END(&cpr, &arc_reclaim_lock);
}
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
index 7a747b389a98..c706a3850b7f 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bpobj.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/bpobj.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c
index b2b98877420a..a69fcc3760be 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/bptree.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/arc.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
index ac7ef3dc742d..a563d7496093 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c
@@ -25,6 +25,7 @@
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c
index 6ca021eecb1d..2c9802f51eff 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_object.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2013, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2013, 2015 by Delphix. All rights reserved.
* Copyright 2014 HybridCluster. All rights reserved.
*/
@@ -50,6 +50,12 @@ dmu_object_alloc(objset_t *os, dmu_object_type_t ot, int blocksize,
* reasonably sparse (at most 1/4 full). Look from the
* beginning once, but after that keep looking from here.
* If we can't find one, just keep going from here.
+ *
+ * Note that dmu_traverse depends on the behavior that we use
+ * multiple blocks of the dnode object before going back to
+ * reuse objects. Any change to this algorithm should preserve
+ * that property or find another solution to the issues
+ * described in traverse_visitbp.
*/
if (P2PHASE(object, L2_dnode_count) == 0) {
uint64_t offset = restarted ? object << DNODE_SHIFT : 0;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
index 85465ec94334..367dbcb9c235 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
@@ -26,6 +26,7 @@
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2015, STRATO AG, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
index 00f52d6ebe38..188810b89111 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
@@ -25,6 +25,8 @@
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2012, Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright 2014 HybridCluster. All rights reserved.
+ * Copyright 2016 RackTop Systems.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/dmu.h>
@@ -64,6 +66,12 @@
int zfs_send_corrupt_data = B_FALSE;
int zfs_send_queue_length = 16 * 1024 * 1024;
int zfs_recv_queue_length = 16 * 1024 * 1024;
+/* Set this tunable to FALSE to disable setting of DRR_FLAG_FREERECORDS */
+int zfs_send_set_freerecords_bit = B_TRUE;
+
+#ifdef _KERNEL
+TUNABLE_INT("vfs.zfs.send_set_freerecords_bit", &zfs_send_set_freerecords_bit);
+#endif
static char *dmu_recv_tag = "dmu_recv_tag";
const char *recv_clone_name = "%recv";
@@ -771,7 +779,8 @@ dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *to_ds,
drr->drr_u.drr_begin.drr_toguid = dsl_dataset_phys(to_ds)->ds_guid;
if (dsl_dataset_phys(to_ds)->ds_flags & DS_FLAG_CI_DATASET)
drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_CI_DATA;
- drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_FREERECORDS;
+ if (zfs_send_set_freerecords_bit)
+ drr->drr_u.drr_begin.drr_flags |= DRR_FLAG_FREERECORDS;
if (ancestor_zb != NULL) {
drr->drr_u.drr_begin.drr_fromguid =
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
index 2c718df04897..dd0644a37ff6 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2016 by Delphix. All rights reserved.
* Copyright (c) 2015 Chunwei Chen. All rights reserved.
*/
@@ -63,6 +63,7 @@ typedef struct traverse_data {
uint64_t td_hole_birth_enabled_txg;
blkptr_cb_t *td_func;
void *td_arg;
+ boolean_t td_realloc_possible;
} traverse_data_t;
static int traverse_dnode(traverse_data_t *td, const dnode_phys_t *dnp,
@@ -232,18 +233,30 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
if (bp->blk_birth == 0) {
/*
- * Since this block has a birth time of 0 it must be a
- * hole created before the SPA_FEATURE_HOLE_BIRTH
- * feature was enabled. If SPA_FEATURE_HOLE_BIRTH
- * was enabled before the min_txg for this traveral we
- * know the hole must have been created before the
- * min_txg for this traveral, so we can skip it. If
- * SPA_FEATURE_HOLE_BIRTH was enabled after the min_txg
- * for this traveral we cannot tell if the hole was
- * created before or after the min_txg for this
- * traversal, so we cannot skip it.
+ * Since this block has a birth time of 0 it must be one of
+ * two things: a hole created before the
+ * SPA_FEATURE_HOLE_BIRTH feature was enabled, or a hole
+ * which has always been a hole in an object.
+ *
+ * If a file is written sparsely, then the unwritten parts of
+ * the file were "always holes" -- that is, they have been
+ * holes since this object was allocated. However, we (and
+ * our callers) can not necessarily tell when an object was
+ * allocated. Therefore, if it's possible that this object
+ * was freed and then its object number reused, we need to
+ * visit all the holes with birth==0.
+ *
+ * If it isn't possible that the object number was reused,
+ * then if SPA_FEATURE_HOLE_BIRTH was enabled before we wrote
+ * all the blocks we will visit as part of this traversal,
+ * then this hole must have always existed, so we can skip
+ * it. We visit blocks born after (exclusive) td_min_txg.
+ *
+ * Note that the meta-dnode cannot be reallocated.
*/
- if (td->td_hole_birth_enabled_txg < td->td_min_txg)
+ if ((!td->td_realloc_possible ||
+ zb->zb_object == DMU_META_DNODE_OBJECT) &&
+ td->td_hole_birth_enabled_txg <= td->td_min_txg)
return (0);
} else if (bp->blk_birth <= td->td_min_txg) {
return (0);
@@ -338,6 +351,15 @@ traverse_visitbp(traverse_data_t *td, const dnode_phys_t *dnp,
objset_phys_t *osp = buf->b_data;
prefetch_dnode_metadata(td, &osp->os_meta_dnode, zb->zb_objset,
DMU_META_DNODE_OBJECT);
+ /*
+ * See the block comment above for the goal of this variable.
+ * If the maxblkid of the meta-dnode is 0, then we know that
+ * we've never had more than DNODES_PER_BLOCK objects in the
+ * dataset, which means we can't have reused any object ids.
+ */
+ if (osp->os_meta_dnode.dn_maxblkid == 0)
+ td->td_realloc_possible = B_FALSE;
+
if (arc_buf_size(buf) >= sizeof (objset_phys_t)) {
prefetch_dnode_metadata(td, &osp->os_groupused_dnode,
zb->zb_objset, DMU_GROUPUSED_OBJECT);
@@ -544,12 +566,13 @@ traverse_impl(spa_t *spa, dsl_dataset_t *ds, uint64_t objset, blkptr_t *rootbp,
td.td_pfd = &pd;
td.td_flags = flags;
td.td_paused = B_FALSE;
+ td.td_realloc_possible = (txg_start == 0 ? B_FALSE : B_TRUE);
if (spa_feature_is_active(spa, SPA_FEATURE_HOLE_BIRTH)) {
VERIFY(spa_feature_enabled_txg(spa,
SPA_FEATURE_HOLE_BIRTH, &td.td_hole_birth_enabled_txg));
} else {
- td.td_hole_birth_enabled_txg = 0;
+ td.td_hole_birth_enabled_txg = UINT64_MAX;
}
pd.pd_flags = flags;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
index 65a017f368ee..bea484f0fcc1 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/dmu.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
index 01f2d146cd7e..39bef756733c 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
index 95e53923896a..00b9c7e4ce49 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c
@@ -25,6 +25,8 @@
* Copyright (c) 2014, Joyent, Inc. All rights reserved.
* Copyright (c) 2014 RackTop Systems.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2016, OmniTI Computer Consulting, Inc. All rights reserved.
*/
#include <sys/dmu_objset.h>
@@ -84,6 +86,8 @@ SYSCTL_INT(_vfs_zfs, OID_AUTO, max_recordsize, CTLFLAG_RWTUN,
extern inline dsl_dataset_phys_t *dsl_dataset_phys(dsl_dataset_t *ds);
+extern int spa_asize_inflation;
+
/*
* 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
@@ -2896,6 +2900,11 @@ int
dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone,
dsl_dataset_t *origin_head, boolean_t force, void *owner, dmu_tx_t *tx)
{
+ /*
+ * "slack" factor for received datasets with refquota set on them.
+ * See the bottom of this function for details on its use.
+ */
+ uint64_t refquota_slack = DMU_MAX_ACCESS * spa_asize_inflation;
int64_t unused_refres_delta;
/* they should both be heads */
@@ -2938,10 +2947,22 @@ dsl_dataset_clone_swap_check_impl(dsl_dataset_t *clone,
dsl_dir_space_available(origin_head->ds_dir, NULL, 0, TRUE))
return (SET_ERROR(ENOSPC));
- /* clone can't be over the head's refquota */
+ /*
+ * The clone can't be too much over the head's refquota.
+ *
+ * To ensure that the entire refquota can be used, we allow one
+ * transaction to exceed the the refquota. Therefore, this check
+ * needs to also allow for the space referenced to be more than the
+ * refquota. The maximum amount of space that one transaction can use
+ * on disk is DMU_MAX_ACCESS * spa_asize_inflation. Allowing this
+ * overage ensures that we are able to receive a filesystem that
+ * exceeds the refquota on the source system.
+ *
+ * So that overage is the refquota_slack we use below.
+ */
if (origin_head->ds_quota != 0 &&
dsl_dataset_phys(clone)->ds_referenced_bytes >
- origin_head->ds_quota)
+ origin_head->ds_quota + refquota_slack)
return (SET_ERROR(EDQUOT));
return (0);
@@ -2955,8 +2976,13 @@ dsl_dataset_clone_swap_sync_impl(dsl_dataset_t *clone,
int64_t unused_refres_delta;
ASSERT(clone->ds_reserved == 0);
+ /*
+ * NOTE: On DEBUG kernels there could be a race between this and
+ * the check function if spa_asize_inflation is adjusted...
+ */
ASSERT(origin_head->ds_quota == 0 ||
- dsl_dataset_phys(clone)->ds_unique_bytes <= origin_head->ds_quota);
+ dsl_dataset_phys(clone)->ds_unique_bytes <= origin_head->ds_quota +
+ DMU_MAX_ACCESS * spa_asize_inflation);
ASSERT3P(clone->ds_prev, ==, origin_head->ds_prev);
/*
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
index d26c6cd35797..7e3a122c9554 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c
@@ -22,6 +22,7 @@
* Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/dsl_dataset.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
index 7de98450797f..b8971761d7a9 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c
@@ -23,6 +23,7 @@
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright (c) 2013 by Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
index 189ca19f5aab..30a07105b35d 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c
@@ -23,6 +23,7 @@
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/dsl_pool.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
index 402398572e48..d56bd13d3317 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
+ * Copyright 2016 Gary Mills
*/
#include <sys/dsl_scan.h>
@@ -846,7 +847,16 @@ dsl_scan_ds_destroyed(dsl_dataset_t *ds, dmu_tx_t *tx)
if (scn->scn_phys.scn_bookmark.zb_objset == ds->ds_object) {
if (ds->ds_is_snapshot) {
- /* Note, scn_cur_{min,max}_txg stays the same. */
+ /*
+ * Note:
+ * - scn_cur_{min,max}_txg stays the same.
+ * - Setting the flag is not really necessary if
+ * scn_cur_max_txg == scn_max_txg, because there
+ * is nothing after this snapshot that we care
+ * about. However, we set it anyway and then
+ * ignore it when we retraverse it in
+ * dsl_scan_visitds().
+ */
scn->scn_phys.scn_bookmark.zb_objset =
dsl_dataset_phys(ds)->ds_next_snap_obj;
zfs_dbgmsg("destroying ds %llu; currently traversing; "
@@ -886,9 +896,6 @@ dsl_scan_ds_destroyed(dsl_dataset_t *ds, dmu_tx_t *tx)
zfs_dbgmsg("destroying ds %llu; in queue; removing",
(u_longlong_t)ds->ds_object);
}
- } else {
- zfs_dbgmsg("destroying ds %llu; ignoring",
- (u_longlong_t)ds->ds_object);
}
/*
@@ -1041,6 +1048,46 @@ dsl_scan_visitds(dsl_scan_t *scn, uint64_t dsobj, dmu_tx_t *tx)
VERIFY3U(0, ==, dsl_dataset_hold_obj(dp, dsobj, FTAG, &ds));
+ if (scn->scn_phys.scn_cur_min_txg >=
+ scn->scn_phys.scn_max_txg) {
+ /*
+ * This can happen if this snapshot was created after the
+ * scan started, and we already completed a previous snapshot
+ * that was created after the scan started. This snapshot
+ * only references blocks with:
+ *
+ * birth < our ds_creation_txg
+ * cur_min_txg is no less than ds_creation_txg.
+ * We have already visited these blocks.
+ * or
+ * birth > scn_max_txg
+ * The scan requested not to visit these blocks.
+ *
+ * Subsequent snapshots (and clones) can reference our
+ * blocks, or blocks with even higher birth times.
+ * Therefore we do not need to visit them either,
+ * so we do not add them to the work queue.
+ *
+ * Note that checking for cur_min_txg >= cur_max_txg
+ * is not sufficient, because in that case we may need to
+ * visit subsequent snapshots. This happens when min_txg > 0,
+ * which raises cur_min_txg. In this case we will visit
+ * this dataset but skip all of its blocks, because the
+ * rootbp's birth time is < cur_min_txg. Then we will
+ * add the next snapshots/clones to the work queue.
+ */
+ char *dsname = kmem_alloc(MAXNAMELEN, KM_SLEEP);
+ dsl_dataset_name(ds, dsname);
+ zfs_dbgmsg("scanning dataset %llu (%s) is unnecessary because "
+ "cur_min_txg (%llu) >= max_txg (%llu)",
+ dsobj, dsname,
+ scn->scn_phys.scn_cur_min_txg,
+ scn->scn_phys.scn_max_txg);
+ kmem_free(dsname, MAXNAMELEN);
+
+ goto out;
+ }
+
if (dmu_objset_from_ds(ds, &os))
goto out;
@@ -1545,7 +1592,8 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
}
if (err != 0)
return;
- if (!scn->scn_async_destroying && zfs_free_leak_on_eio &&
+ if (dp->dp_free_dir != NULL && !scn->scn_async_destroying &&
+ zfs_free_leak_on_eio &&
(dsl_dir_phys(dp->dp_free_dir)->dd_used_bytes != 0 ||
dsl_dir_phys(dp->dp_free_dir)->dd_compressed_bytes != 0 ||
dsl_dir_phys(dp->dp_free_dir)->dd_uncompressed_bytes != 0)) {
@@ -1571,7 +1619,7 @@ dsl_scan_sync(dsl_pool_t *dp, dmu_tx_t *tx)
-dsl_dir_phys(dp->dp_free_dir)->dd_compressed_bytes,
-dsl_dir_phys(dp->dp_free_dir)->dd_uncompressed_bytes, tx);
}
- if (!scn->scn_async_destroying) {
+ if (dp->dp_free_dir != NULL && !scn->scn_async_destroying) {
/* finished; verify that space accounting went to zero */
ASSERT0(dsl_dir_phys(dp->dp_free_dir)->dd_used_bytes);
ASSERT0(dsl_dir_phys(dp->dp_free_dir)->dd_compressed_bytes);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
index 6a20d25667de..41d54e03554d 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/metaslab.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c
index 200369216947..e11dd4db0185 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c
@@ -24,6 +24,7 @@
* Portions Copyright 2011 iXsystems, Inc
* Copyright (c) 2013 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
index 9caed4d5c95a..f69a5e7268f1 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
@@ -26,6 +26,7 @@
* Copyright (c) 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/*
@@ -6343,8 +6344,7 @@ spa_sync_config_object(spa_t *spa, dmu_tx_t *tx)
spa_config_exit(spa, SCL_STATE, FTAG);
- if (spa->spa_config_syncing)
- nvlist_free(spa->spa_config_syncing);
+ nvlist_free(spa->spa_config_syncing);
spa->spa_config_syncing = config;
spa_sync_nvlist(spa, spa->spa_config_object, config, tx);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
index be1e528f7f42..a5c17a56461a 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_config.c
@@ -367,8 +367,7 @@ void
spa_config_set(spa_t *spa, nvlist_t *config)
{
mutex_enter(&spa->spa_props_lock);
- if (spa->spa_config != NULL)
- nvlist_free(spa->spa_config);
+ nvlist_free(spa->spa_config);
spa->spa_config = config;
mutex_exit(&spa->spa_props_lock);
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
index ecd5435b5480..8965686e68ed 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c
@@ -22,6 +22,7 @@
/*
* Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/spa.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
index d5764bc96ec1..608059492206 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_misc.c
@@ -25,6 +25,7 @@
* Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
index 226e8f79da94..3bbe18f9b776 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h
@@ -28,6 +28,7 @@
* Copyright 2014 HybridCluster. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
index 8a263a39e6b3..f05b2cf453f5 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_objset.h
@@ -23,6 +23,7 @@
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h
index 2865e82913a2..19464a5571c7 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu_send.h
@@ -24,6 +24,7 @@
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _DMU_SEND_H
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
index d7df05b309be..766ae3c81142 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h
@@ -24,6 +24,7 @@
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _SYS_DSL_DATASET_H
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
index 6dc2b118baed..105f8897bccd 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/spa.h
@@ -24,6 +24,7 @@
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
* Copyright 2013 Saso Kiselkov. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _SYS_SPA_H
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h
index 09b052ec4880..6af259fa8da4 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _SYS_ZAP_IMPL_H
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
index 510204042719..17503d8d6005 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_context.h
@@ -94,10 +94,8 @@ extern "C" {
#include <sys/sunddi.h>
#ifdef illumos
#include <sys/cyclic.h>
-#include <sys/callo.h>
-#else /* FreeBSD */
-#include <sys/callout.h>
#endif
+#include <sys/callo.h>
#include <sys/disp.h>
#include <machine/stdarg.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
index 2a50e191b01e..f42df1772551 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_ioctl.h
@@ -21,6 +21,8 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
+ * Copyright 2016 RackTop Systems.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _SYS_ZFS_IOCTL_H
@@ -124,6 +126,10 @@ typedef enum dmu_send_resume_token_version {
#define DMU_BACKUP_MAGIC 0x2F5bacbacULL
+/*
+ * Send stream flags. Bits 24-31 are reserved for vendor-specific
+ * implementations and should not be used.
+ */
#define DRR_FLAG_CLONE (1<<0)
#define DRR_FLAG_CI_DATA (1<<1)
/*
@@ -308,6 +314,7 @@ typedef struct zinject_record {
uint32_t zi_iotype;
int32_t zi_duration;
uint64_t zi_timer;
+ uint64_t zi_nlanes;
uint32_t zi_cmd;
uint32_t zi_pad;
} zinject_record_t;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
index c8e3105ff0b2..3e72ec449fb4 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zfs_znode.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#ifndef _SYS_FS_ZFS_ZNODE_H
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
index d3fe6e9653d2..1642da08197f 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
index b5c666c02b73..ac908bd322ef 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zil_impl.h
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
index eac4b905c708..56c821a0a96e 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zio.h
@@ -455,6 +455,7 @@ struct zio {
uint64_t io_offset;
hrtime_t io_timestamp;
+ hrtime_t io_target_timestamp;
avl_node_t io_queue_node;
avl_node_t io_offset_node;
@@ -548,6 +549,8 @@ extern int zio_wait(zio_t *zio);
extern void zio_nowait(zio_t *zio);
extern void zio_execute(zio_t *zio);
extern void zio_interrupt(zio_t *zio);
+extern void zio_delay_init(zio_t *zio);
+extern void zio_delay_interrupt(zio_t *zio);
extern zio_t *zio_walk_parents(zio_t *cio);
extern zio_t *zio_walk_children(zio_t *pio);
@@ -609,7 +612,7 @@ extern int zio_handle_fault_injection(zio_t *zio, int error);
extern int zio_handle_device_injection(vdev_t *vd, zio_t *zio, int error);
extern int zio_handle_label_injection(zio_t *zio, int error);
extern void zio_handle_ignored_writes(zio_t *zio);
-extern uint64_t zio_handle_io_delay(zio_t *zio);
+extern hrtime_t zio_handle_io_delay(zio_t *zio);
/*
* Checksum ereport functions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
index 429d31e1024c..28ff6c91594f 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev.c
@@ -24,6 +24,7 @@
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright 2015 Nexenta Systems, Inc. All rights reserved.
* Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
index c397891d4857..681a670461f2 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_disk.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013 Joyent, Inc. All rights reserved.
*/
@@ -691,7 +691,7 @@ vdev_disk_io_intr(buf_t *bp)
kmem_free(vb, sizeof (vdev_buf_t));
- zio_interrupt(zio);
+ zio_delay_interrupt(zio);
}
static void
@@ -797,6 +797,7 @@ vdev_disk_io_start(zio_t *zio)
}
ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE);
+ zio->io_target_timestamp = zio_handle_io_delay(zio);
vb = kmem_alloc(sizeof (vdev_buf_t), KM_SLEEP);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
index 01ef7563eb2a..8228af1e152b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_file.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2015 by Delphix. All rights reserved.
*/
#include <sys/zfs_context.h>
@@ -188,6 +188,7 @@ vdev_file_io_start(zio_t *zio)
}
ASSERT(zio->io_type == ZIO_TYPE_READ || zio->io_type == ZIO_TYPE_WRITE);
+ zio->io_target_timestamp = zio_handle_io_delay(zio);
zio->io_error = vn_rdwr(zio->io_type == ZIO_TYPE_READ ?
UIO_READ : UIO_WRITE, vp, zio->io_data, zio->io_size,
@@ -196,7 +197,7 @@ vdev_file_io_start(zio_t *zio)
if (resid != 0 && zio->io_error == 0)
zio->io_error = ENOSPC;
- zio_interrupt(zio);
+ zio_delay_interrupt(zio);
#ifdef illumos
VERIFY3U(taskq_dispatch(system_taskq, vdev_file_io_strategy, bp,
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
index 3df15e29778b..1fd962357020 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
@@ -811,7 +811,8 @@ vdev_geom_open(vdev_t *vd, uint64_t *psize, uint64_t *max_psize,
*/
*logical_ashift = highbit(MAX(pp->sectorsize, SPA_MINBLOCKSIZE)) - 1;
*physical_ashift = 0;
- if (pp->stripesize)
+ if (pp->stripesize > (1 << *logical_ashift) && ISP2(pp->stripesize) &&
+ pp->stripesize <= (1 << SPA_MAXASHIFT) && pp->stripeoffset == 0)
*physical_ashift = highbit(pp->stripesize) - 1;
/*
@@ -885,7 +886,7 @@ vdev_geom_io_intr(struct bio *bp)
break;
}
g_destroy_bio(bp);
- zio_interrupt(zio);
+ zio_delay_interrupt(zio);
}
static void
@@ -948,6 +949,7 @@ sendreq:
switch (zio->io_type) {
case ZIO_TYPE_READ:
case ZIO_TYPE_WRITE:
+ zio->io_target_timestamp = zio_handle_io_delay(zio);
bp->bio_cmd = zio->io_type == ZIO_TYPE_READ ? BIO_READ : BIO_WRITE;
bp->bio_data = zio->io_data;
bp->bio_offset = zio->io_offset;
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
index 8981b10691ca..112d698079f3 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_queue.c
@@ -25,6 +25,7 @@
/*
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
@@ -871,9 +872,6 @@ vdev_queue_io_done(zio_t *zio)
vdev_queue_t *vq = &zio->io_vd->vdev_queue;
zio_t *nio;
- if (zio_injection_enabled)
- delay(SEC_TO_TICK(zio_handle_io_delay(zio)));
-
mutex_enter(&vq->vq_lock);
vdev_queue_pending_remove(vq, zio);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
index 6b538cf56d61..a755f3a2f0e8 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_raidz.c
@@ -23,6 +23,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zfs_context.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
index 8ca68b88c6f3..ea3d86933625 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
* Copyright (c) 2014 Spectra Logic Corporation, All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/zio.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
index 8c6fb974f0cc..c24836e4867b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
@@ -31,6 +31,7 @@
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright (c) 2013 by Saso Kiselkov. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/*
@@ -1601,8 +1602,7 @@ zfs_ioc_pool_import(zfs_cmd_t *zc)
nvlist_free(config);
- if (props)
- nvlist_free(props);
+ nvlist_free(props);
return (error);
}
@@ -3972,7 +3972,7 @@ zfs_check_settable(const char *dsname, nvpair_t *pair, cred_t *cr)
return (SET_ERROR(EINVAL));
/* check prop value is enabled in features */
- feature = zio_checksum_to_feature(intval);
+ feature = zio_checksum_to_feature(intval & ZIO_CHECKSUM_MASK);
if (feature == SPA_FEATURE_NONE)
break;
@@ -6221,6 +6221,14 @@ zfsdev_ioctl(struct cdev *dev, u_long zcmd, caddr_t arg, int flag,
goto out;
}
break;
+ case ZFS_IOCVER_RESUME:
+ if (zc_iocparm->zfs_cmd_size != sizeof(zfs_cmd_resume_t)) {
+ error = SET_ERROR(EFAULT);
+ goto out;
+ }
+ compat = B_TRUE;
+ cflag = ZFS_CMD_COMPAT_RESUME;
+ break;
case ZFS_IOCVER_EDBP:
if (zc_iocparm->zfs_cmd_size != sizeof(zfs_cmd_edbp_t)) {
error = SET_ERROR(EFAULT);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
index 30b3b5270abd..6933ccdacd16 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_log.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/types.h>
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
index e8bcaf53d3b0..78d3fdcdb74b 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vfsops.c
@@ -23,6 +23,7 @@
* Copyright (c) 2011 Pawel Jakub Dawidek <pawel@dawidek.net>.
* All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
index 9df85a741af1..5c2b66d0aa05 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2015 by Delphix. All rights reserved.
* Copyright 2014 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2007 Jeremy Teo */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
index 0a985c3a210c..04f0b6c1687d 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_znode.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2007 Jeremy Teo */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
index a8a6d655d20d..993a4682e010 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zil.c
@@ -21,6 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
index 901e618efdcd..25fba19dea15 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio.c
@@ -22,6 +22,7 @@
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2015 by Delphix. All rights reserved.
* Copyright (c) 2011 Nexenta Systems, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
#include <sys/sysmacros.h>
@@ -1442,6 +1443,58 @@ zio_interrupt(zio_t *zio)
zio_taskq_dispatch(zio, ZIO_TASKQ_INTERRUPT, B_FALSE);
}
+void
+zio_delay_interrupt(zio_t *zio)
+{
+ /*
+ * The timeout_generic() function isn't defined in userspace, so
+ * rather than trying to implement the function, the zio delay
+ * functionality has been disabled for userspace builds.
+ */
+
+#ifdef _KERNEL
+ /*
+ * If io_target_timestamp is zero, then no delay has been registered
+ * for this IO, thus jump to the end of this function and "skip" the
+ * delay; issuing it directly to the zio layer.
+ */
+ if (zio->io_target_timestamp != 0) {
+ hrtime_t now = gethrtime();
+
+ if (now >= zio->io_target_timestamp) {
+ /*
+ * This IO has already taken longer than the target
+ * delay to complete, so we don't want to delay it
+ * any longer; we "miss" the delay and issue it
+ * directly to the zio layer. This is likely due to
+ * the target latency being set to a value less than
+ * the underlying hardware can satisfy (e.g. delay
+ * set to 1ms, but the disks take 10ms to complete an
+ * IO request).
+ */
+
+ DTRACE_PROBE2(zio__delay__miss, zio_t *, zio,
+ hrtime_t, now);
+
+ zio_interrupt(zio);
+ } else {
+ hrtime_t diff = zio->io_target_timestamp - now;
+
+ DTRACE_PROBE3(zio__delay__hit, zio_t *, zio,
+ hrtime_t, now, hrtime_t, diff);
+
+ (void) timeout_generic(CALLOUT_NORMAL,
+ (void (*)(void *))zio_interrupt, zio, diff, 1, 0);
+ }
+
+ return;
+ }
+#endif
+
+ DTRACE_PROBE1(zio__delay__skip, zio_t *, zio);
+ zio_interrupt(zio);
+}
+
/*
* Execute the I/O pipeline until one of the following occurs:
*
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c
index 6ba64e085b40..dac118af67e1 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_checksum.c
@@ -138,10 +138,16 @@ zio_checksum_info_t zio_checksum_table[ZIO_CHECKSUM_FUNCTIONS] = {
#endif
};
+/*
+ * The flag corresponding to the "verify" in dedup=[checksum,]verify
+ * must be cleared first, so callers should use ZIO_CHECKSUM_MASK.
+ */
spa_feature_t
zio_checksum_to_feature(enum zio_checksum cksum)
{
#ifdef illumos
+ VERIFY((cksum & ~ZIO_CHECKSUM_MASK) == 0);
+
switch (cksum) {
case ZIO_CHECKSUM_SHA512:
return (SPA_FEATURE_SHA512);
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c
index 0a7f4e4b3b17..26f59af9968f 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zio_inject.c
@@ -20,7 +20,7 @@
*/
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
+ * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
*/
/*
@@ -49,15 +49,53 @@
uint32_t zio_injection_enabled;
+/*
+ * Data describing each zinject handler registered on the system, and
+ * contains the list node linking the handler in the global zinject
+ * handler list.
+ */
typedef struct inject_handler {
int zi_id;
spa_t *zi_spa;
zinject_record_t zi_record;
+ uint64_t *zi_lanes;
+ int zi_next_lane;
list_node_t zi_link;
} inject_handler_t;
+/*
+ * List of all zinject handlers registered on the system, protected by
+ * the inject_lock defined below.
+ */
static list_t inject_handlers;
+
+/*
+ * This protects insertion into, and traversal of, the inject handler
+ * list defined above; as well as the inject_delay_count. Any time a
+ * handler is inserted or removed from the list, this lock should be
+ * taken as a RW_WRITER; and any time traversal is done over the list
+ * (without modification to it) this lock should be taken as a RW_READER.
+ */
static krwlock_t inject_lock;
+
+/*
+ * This holds the number of zinject delay handlers that have been
+ * registered on the system. It is protected by the inject_lock defined
+ * above. Thus modifications to this count must be a RW_WRITER of the
+ * inject_lock, and reads of this count must be (at least) a RW_READER
+ * of the lock.
+ */
+static int inject_delay_count = 0;
+
+/*
+ * This lock is used only in zio_handle_io_delay(), refer to the comment
+ * in that function for more details.
+ */
+static kmutex_t inject_delay_mtx;
+
+/*
+ * Used to assign unique identifying numbers to each new zinject handler.
+ */
static int inject_next_id = 1;
/*
@@ -360,32 +398,164 @@ spa_handle_ignored_writes(spa_t *spa)
rw_exit(&inject_lock);
}
-uint64_t
+hrtime_t
zio_handle_io_delay(zio_t *zio)
{
vdev_t *vd = zio->io_vd;
- inject_handler_t *handler;
- uint64_t seconds = 0;
-
- if (zio_injection_enabled == 0)
- return (0);
+ inject_handler_t *min_handler = NULL;
+ hrtime_t min_target = 0;
rw_enter(&inject_lock, RW_READER);
- for (handler = list_head(&inject_handlers); handler != NULL;
- handler = list_next(&inject_handlers, handler)) {
+ /*
+ * inject_delay_count is a subset of zio_injection_enabled that
+ * is only incremented for delay handlers. These checks are
+ * mainly added to remind the reader why we're not explicitly
+ * checking zio_injection_enabled like the other functions.
+ */
+ IMPLY(inject_delay_count > 0, zio_injection_enabled > 0);
+ IMPLY(zio_injection_enabled == 0, inject_delay_count == 0);
+
+ /*
+ * If there aren't any inject delay handlers registered, then we
+ * can short circuit and simply return 0 here. A value of zero
+ * informs zio_delay_interrupt() that this request should not be
+ * delayed. This short circuit keeps us from acquiring the
+ * inject_delay_mutex unnecessarily.
+ */
+ if (inject_delay_count == 0) {
+ rw_exit(&inject_lock);
+ return (0);
+ }
+
+ /*
+ * Each inject handler has a number of "lanes" associated with
+ * it. Each lane is able to handle requests independently of one
+ * another, and at a latency defined by the inject handler
+ * record's zi_timer field. Thus if a handler in configured with
+ * a single lane with a 10ms latency, it will delay requests
+ * such that only a single request is completed every 10ms. So,
+ * if more than one request is attempted per each 10ms interval,
+ * the average latency of the requests will be greater than
+ * 10ms; but if only a single request is submitted each 10ms
+ * interval the average latency will be 10ms.
+ *
+ * We need to acquire this mutex to prevent multiple concurrent
+ * threads being assigned to the same lane of a given inject
+ * handler. The mutex allows us to perform the following two
+ * operations atomically:
+ *
+ * 1. determine the minimum handler and minimum target
+ * value of all the possible handlers
+ * 2. update that minimum handler's lane array
+ *
+ * Without atomicity, two (or more) threads could pick the same
+ * lane in step (1), and then conflict with each other in step
+ * (2). This could allow a single lane handler to process
+ * multiple requests simultaneously, which shouldn't be possible.
+ */
+ mutex_enter(&inject_delay_mtx);
+ for (inject_handler_t *handler = list_head(&inject_handlers);
+ handler != NULL; handler = list_next(&inject_handlers, handler)) {
if (handler->zi_record.zi_cmd != ZINJECT_DELAY_IO)
continue;
- if (vd->vdev_guid == handler->zi_record.zi_guid) {
- seconds = handler->zi_record.zi_timer;
- break;
+ if (vd->vdev_guid != handler->zi_record.zi_guid)
+ continue;
+
+ /*
+ * Defensive; should never happen as the array allocation
+ * occurs prior to inserting this handler on the list.
+ */
+ ASSERT3P(handler->zi_lanes, !=, NULL);
+
+ /*
+ * This should never happen, the zinject command should
+ * prevent a user from setting an IO delay with zero lanes.
+ */
+ ASSERT3U(handler->zi_record.zi_nlanes, !=, 0);
+
+ ASSERT3U(handler->zi_record.zi_nlanes, >,
+ handler->zi_next_lane);
+
+ /*
+ * We want to issue this IO to the lane that will become
+ * idle the soonest, so we compare the soonest this
+ * specific handler can complete the IO with all other
+ * handlers, to find the lowest value of all possible
+ * lanes. We then use this lane to submit the request.
+ *
+ * Since each handler has a constant value for its
+ * delay, we can just use the "next" lane for that
+ * handler; as it will always be the lane with the
+ * lowest value for that particular handler (i.e. the
+ * lane that will become idle the soonest). This saves a
+ * scan of each handler's lanes array.
+ *
+ * There's two cases to consider when determining when
+ * this specific IO request should complete. If this
+ * lane is idle, we want to "submit" the request now so
+ * it will complete after zi_timer milliseconds. Thus,
+ * we set the target to now + zi_timer.
+ *
+ * If the lane is busy, we want this request to complete
+ * zi_timer milliseconds after the lane becomes idle.
+ * Since the 'zi_lanes' array holds the time at which
+ * each lane will become idle, we use that value to
+ * determine when this request should complete.
+ */
+ hrtime_t idle = handler->zi_record.zi_timer + gethrtime();
+ hrtime_t busy = handler->zi_record.zi_timer +
+ handler->zi_lanes[handler->zi_next_lane];
+ hrtime_t target = MAX(idle, busy);
+
+ if (min_handler == NULL) {
+ min_handler = handler;
+ min_target = target;
+ continue;
}
+ ASSERT3P(min_handler, !=, NULL);
+ ASSERT3U(min_target, !=, 0);
+
+ /*
+ * We don't yet increment the "next lane" variable since
+ * we still might find a lower value lane in another
+ * handler during any remaining iterations. Once we're
+ * sure we've selected the absolute minimum, we'll claim
+ * the lane and increment the handler's "next lane"
+ * field below.
+ */
+
+ if (target < min_target) {
+ min_handler = handler;
+ min_target = target;
+ }
}
+
+ /*
+ * 'min_handler' will be NULL if no IO delays are registered for
+ * this vdev, otherwise it will point to the handler containing
+ * the lane that will become idle the soonest.
+ */
+ if (min_handler != NULL) {
+ ASSERT3U(min_target, !=, 0);
+ min_handler->zi_lanes[min_handler->zi_next_lane] = min_target;
+
+ /*
+ * If we've used all possible lanes for this handler,
+ * loop back and start using the first lane again;
+ * otherwise, just increment the lane index.
+ */
+ min_handler->zi_next_lane = (min_handler->zi_next_lane + 1) %
+ min_handler->zi_record.zi_nlanes;
+ }
+
+ mutex_exit(&inject_delay_mtx);
rw_exit(&inject_lock);
- return (seconds);
+
+ return (min_target);
}
/*
@@ -409,6 +579,24 @@ zio_inject_fault(char *name, int flags, int *id, zinject_record_t *record)
if ((error = spa_reset(name)) != 0)
return (error);
+ if (record->zi_cmd == ZINJECT_DELAY_IO) {
+ /*
+ * A value of zero for the number of lanes or for the
+ * delay time doesn't make sense.
+ */
+ if (record->zi_timer == 0 || record->zi_nlanes == 0)
+ return (SET_ERROR(EINVAL));
+
+ /*
+ * The number of lanes is directly mapped to the size of
+ * an array used by the handler. Thus, to ensure the
+ * user doesn't trigger an allocation that's "too large"
+ * we cap the number of lanes here.
+ */
+ if (record->zi_nlanes >= UINT16_MAX)
+ return (SET_ERROR(EINVAL));
+ }
+
if (!(flags & ZINJECT_NULL)) {
/*
* spa_inject_ref() will add an injection reference, which will
@@ -420,11 +608,34 @@ zio_inject_fault(char *name, int flags, int *id, zinject_record_t *record)
handler = kmem_alloc(sizeof (inject_handler_t), KM_SLEEP);
+ handler->zi_spa = spa;
+ handler->zi_record = *record;
+
+ if (handler->zi_record.zi_cmd == ZINJECT_DELAY_IO) {
+ handler->zi_lanes = kmem_zalloc(
+ sizeof (*handler->zi_lanes) *
+ handler->zi_record.zi_nlanes, KM_SLEEP);
+ handler->zi_next_lane = 0;
+ } else {
+ handler->zi_lanes = NULL;
+ handler->zi_next_lane = 0;
+ }
+
rw_enter(&inject_lock, RW_WRITER);
+ /*
+ * We can't move this increment into the conditional
+ * above because we need to hold the RW_WRITER lock of
+ * inject_lock, and we don't want to hold that while
+ * allocating the handler's zi_lanes array.
+ */
+ if (handler->zi_record.zi_cmd == ZINJECT_DELAY_IO) {
+ ASSERT3S(inject_delay_count, >=, 0);
+ inject_delay_count++;
+ ASSERT3S(inject_delay_count, >, 0);
+ }
+
*id = handler->zi_id = inject_next_id++;
- handler->zi_spa = spa;
- handler->zi_record = *record;
list_insert_tail(&inject_handlers, handler);
atomic_inc_32(&zio_injection_enabled);
@@ -502,9 +713,23 @@ zio_clear_fault(int id)
return (SET_ERROR(ENOENT));
}
+ if (handler->zi_record.zi_cmd == ZINJECT_DELAY_IO) {
+ ASSERT3S(inject_delay_count, >, 0);
+ inject_delay_count--;
+ ASSERT3S(inject_delay_count, >=, 0);
+ }
+
list_remove(&inject_handlers, handler);
rw_exit(&inject_lock);
+ if (handler->zi_record.zi_cmd == ZINJECT_DELAY_IO) {
+ ASSERT3P(handler->zi_lanes, !=, NULL);
+ kmem_free(handler->zi_lanes, sizeof (*handler->zi_lanes) *
+ handler->zi_record.zi_nlanes);
+ } else {
+ ASSERT3P(handler->zi_lanes, ==, NULL);
+ }
+
spa_inject_delref(handler->zi_spa);
kmem_free(handler, sizeof (inject_handler_t));
atomic_dec_32(&zio_injection_enabled);
@@ -516,6 +741,7 @@ void
zio_inject_init(void)
{
rw_init(&inject_lock, NULL, RW_DEFAULT, NULL);
+ mutex_init(&inject_delay_mtx, NULL, MUTEX_DEFAULT, NULL);
list_create(&inject_handlers, sizeof (inject_handler_t),
offsetof(inject_handler_t, zi_link));
}
@@ -524,5 +750,6 @@ void
zio_inject_fini(void)
{
list_destroy(&inject_handlers);
+ mutex_destroy(&inject_delay_mtx);
rw_destroy(&inject_lock);
}
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
index 5eb9df13d611..0c3cfce6ba9f 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
+++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c
@@ -29,6 +29,7 @@
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2012, 2014 by Delphix. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2011 Martin Matuska <mm@FreeBSD.org> */
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h b/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h
index cae919377c20..c104e7994bbe 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/fasttrap_impl.h
@@ -206,6 +206,10 @@ extern fasttrap_scrspace_t *fasttrap_scraddr(struct thread *,
extern dtrace_id_t fasttrap_probe_id;
extern fasttrap_hash_t fasttrap_tpoints;
+#ifndef illumos
+extern struct rmlock fasttrap_tp_lock;
+#endif
+
#define FASTTRAP_TPOINTS_INDEX(pid, pc) \
(((pc) / sizeof (fasttrap_instr_t) + (pid)) & fasttrap_tpoints.fth_mask)
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h b/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
index 809ce9bc5ffe..3818616d41bb 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h
@@ -25,6 +25,7 @@
* Copyright 2011 Nexenta Systems, Inc. All rights reserved.
* Copyright (c) 2013, Joyent, Inc. All rights reserved.
* Copyright (c) 2012, Martin Matuska <mm@FreeBSD.org>. All rights reserved.
+ * Copyright (c) 2014 Integros [integros.com]
*/
/* Portions Copyright 2010 Robert Milkowski */
diff --git a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
index 4c9fc0f93a7d..5b3f485e1b50 100644
--- a/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
+++ b/sys/cddl/contrib/opensolaris/uts/intel/dtrace/fasttrap_isa.c
@@ -46,6 +46,7 @@
#include <cddl/dev/dtrace/dtrace_cddl.h>
#include <sys/types.h>
#include <sys/proc.h>
+#include <sys/rmlock.h>
#include <sys/dtrace_bsd.h>
#include <cddl/dev/dtrace/x86/regset.h>
#include <machine/segments.h>
@@ -737,11 +738,13 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid,
fasttrap_id_t *id;
#ifdef illumos
kmutex_t *pid_mtx;
-#endif
-#ifdef illumos
pid_mtx = &cpu_core[CPU->cpu_id].cpuc_pid_lock;
mutex_enter(pid_mtx);
+#else
+ struct rm_priotracker tracker;
+
+ rm_rlock(&fasttrap_tp_lock, &tracker);
#endif
bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
@@ -759,6 +762,8 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid,
if (tp == NULL) {
#ifdef illumos
mutex_exit(pid_mtx);
+#else
+ rm_runlock(&fasttrap_tp_lock, &tracker);
#endif
return;
}
@@ -782,6 +787,8 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid,
#ifdef illumos
mutex_exit(pid_mtx);
+#else
+ rm_runlock(&fasttrap_tp_lock, &tracker);
#endif
}
@@ -990,6 +997,7 @@ fasttrap_pid_probe(struct reg *rp)
{
proc_t *p = curproc;
#ifndef illumos
+ struct rm_priotracker tracker;
proc_t *pp;
#endif
uintptr_t pc = rp->r_rip - 1;
@@ -1049,8 +1057,7 @@ fasttrap_pid_probe(struct reg *rp)
sx_sunlock(&proctree_lock);
pp = NULL;
- PROC_LOCK(p);
- _PHOLD(p);
+ rm_rlock(&fasttrap_tp_lock, &tracker);
#endif
bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
@@ -1073,8 +1080,7 @@ fasttrap_pid_probe(struct reg *rp)
#ifdef illumos
mutex_exit(pid_mtx);
#else
- _PRELE(p);
- PROC_UNLOCK(p);
+ rm_runlock(&fasttrap_tp_lock, &tracker);
#endif
return (-1);
}
@@ -1200,7 +1206,7 @@ fasttrap_pid_probe(struct reg *rp)
#ifdef illumos
mutex_exit(pid_mtx);
#else
- PROC_UNLOCK(p);
+ rm_runlock(&fasttrap_tp_lock, &tracker);
#endif
tp = &tp_local;
@@ -1813,7 +1819,6 @@ done:
#ifndef illumos
PROC_LOCK(p);
proc_write_regs(curthread, rp);
- _PRELE(p);
PROC_UNLOCK(p);
#endif
diff --git a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
index 8e4c647199ce..e8dd684a4530 100644
--- a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
+++ b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
@@ -33,6 +33,7 @@
#include <sys/types.h>
#include <sys/uio.h>
#include <sys/ptrace.h>
+#include <sys/rmlock.h>
#include <sys/sysent.h>
#define OP(x) ((x) >> 26)
@@ -288,10 +289,12 @@ static void
fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid,
uintptr_t new_pc)
{
+ struct rm_priotracker tracker;
fasttrap_tracepoint_t *tp;
fasttrap_bucket_t *bucket;
fasttrap_id_t *id;
+ rm_rlock(&fasttrap_tp_lock, &tracker);
bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) {
@@ -306,6 +309,7 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid,
* is not essential to the correct execution of the process.
*/
if (tp == NULL) {
+ rm_runlock(&fasttrap_tp_lock, &tracker);
return;
}
@@ -323,6 +327,7 @@ fasttrap_return_common(struct reg *rp, uintptr_t pc, pid_t pid,
pc - id->fti_probe->ftp_faddr,
rp->fixreg[3], rp->fixreg[4], 0, 0);
}
+ rm_runlock(&fasttrap_tp_lock, &tracker);
}
@@ -351,6 +356,7 @@ fasttrap_branch_taken(int bo, int bi, struct reg *regs)
int
fasttrap_pid_probe(struct reg *rp)
{
+ struct rm_priotracker tracker;
proc_t *p = curproc;
uintptr_t pc = rp->pc;
uintptr_t new_pc = 0;
@@ -381,8 +387,7 @@ fasttrap_pid_probe(struct reg *rp)
curthread->t_dtrace_scrpc = 0;
curthread->t_dtrace_astpc = 0;
-
- PROC_LOCK(p);
+ rm_rlock(&fasttrap_tp_lock, &tracker);
pid = p->p_pid;
bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
@@ -401,7 +406,7 @@ fasttrap_pid_probe(struct reg *rp)
* fasttrap_ioctl), or somehow we have mislaid this tracepoint.
*/
if (tp == NULL) {
- PROC_UNLOCK(p);
+ rm_runlock(&fasttrap_tp_lock, &tracker);
return (-1);
}
@@ -455,7 +460,7 @@ fasttrap_pid_probe(struct reg *rp)
* tracepoint again later if we need to light up any return probes.
*/
tp_local = *tp;
- PROC_UNLOCK(p);
+ rm_runlock(&fasttrap_tp_lock, &tracker);
tp = &tp_local;
/*
diff --git a/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c
deleted file mode 100644
index 43315a010205..000000000000
--- a/sys/cddl/contrib/opensolaris/uts/sparc/dtrace/fasttrap_isa.c
+++ /dev/null
@@ -1,1595 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License (the "License").
- * You may not use this file except in compliance with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-
-/*
- * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#include <sys/fasttrap_isa.h>
-#include <sys/fasttrap_impl.h>
-#include <sys/dtrace.h>
-#include <sys/dtrace_impl.h>
-#include <sys/cmn_err.h>
-#include <sys/frame.h>
-#include <sys/stack.h>
-#include <sys/sysmacros.h>
-#include <sys/trap.h>
-
-#include <v9/sys/machpcb.h>
-#include <v9/sys/privregs.h>
-
-/*
- * Lossless User-Land Tracing on SPARC
- * -----------------------------------
- *
- * The Basic Idea
- *
- * The most important design constraint is, of course, correct execution of
- * the user thread above all else. The next most important goal is rapid
- * execution. We combine execution of instructions in user-land with
- * emulation of certain instructions in the kernel to aim for complete
- * correctness and maximal performance.
- *
- * We take advantage of the split PC/NPC architecture to speed up logical
- * single-stepping; when we copy an instruction out to the scratch space in
- * the ulwp_t structure (held in the %g7 register on SPARC), we can
- * effectively single step by setting the PC to our scratch space and leaving
- * the NPC alone. This executes the replaced instruction and then continues
- * on without having to reenter the kernel as with single- stepping. The
- * obvious caveat is for instructions whose execution is PC dependant --
- * branches, call and link instructions (call and jmpl), and the rdpc
- * instruction. These instructions cannot be executed in the manner described
- * so they must be emulated in the kernel.
- *
- * Emulation for this small set of instructions if fairly simple; the most
- * difficult part being emulating branch conditions.
- *
- *
- * A Cache Heavy Portfolio
- *
- * It's important to note at this time that copying an instruction out to the
- * ulwp_t scratch space in user-land is rather complicated. SPARC has
- * separate data and instruction caches so any writes to the D$ (using a
- * store instruction for example) aren't necessarily reflected in the I$.
- * The flush instruction can be used to synchronize the two and must be used
- * for any self-modifying code, but the flush instruction only applies to the
- * primary address space (the absence of a flusha analogue to the flush
- * instruction that accepts an ASI argument is an obvious omission from SPARC
- * v9 where the notion of the alternate address space was introduced on
- * SPARC). To correctly copy out the instruction we must use a block store
- * that doesn't allocate in the D$ and ensures synchronization with the I$;
- * see dtrace_blksuword32() for the implementation (this function uses
- * ASI_BLK_COMMIT_S to write a block through the secondary ASI in the manner
- * described). Refer to the UltraSPARC I/II manual for details on the
- * ASI_BLK_COMMIT_S ASI.
- *
- *
- * Return Subtleties
- *
- * When we're firing a return probe we need to expose the value returned by
- * the function being traced. Since the function can set the return value
- * in its last instruction, we need to fire the return probe only _after_
- * the effects of the instruction are apparent. For instructions that we
- * emulate, we can call dtrace_probe() after we've performed the emulation;
- * for instructions that we execute after we return to user-land, we set
- * %pc to the instruction we copied out (as described above) and set %npc
- * to a trap instruction stashed in the ulwp_t structure. After the traced
- * instruction is executed, the trap instruction returns control to the
- * kernel where we can fire the return probe.
- *
- * This need for a second trap in cases where we execute the traced
- * instruction makes it all the more important to emulate the most common
- * instructions to avoid the second trip in and out of the kernel.
- *
- *
- * Making it Fast
- *
- * Since copying out an instruction is neither simple nor inexpensive for the
- * CPU, we should attempt to avoid doing it in as many cases as possible.
- * Since function entry and return are usually the most interesting probe
- * sites, we attempt to tune the performance of the fasttrap provider around
- * instructions typically in those places.
- *
- * Looking at a bunch of functions in libraries and executables reveals that
- * most functions begin with either a save or a sethi (to setup a larger
- * argument to the save) and end with a restore or an or (in the case of leaf
- * functions). To try to improve performance, we emulate all of these
- * instructions in the kernel.
- *
- * The save and restore instructions are a little tricky since they perform
- * register window maniplulation. Rather than trying to tinker with the
- * register windows from the kernel, we emulate the implicit add that takes
- * place as part of those instructions and set the %pc to point to a simple
- * save or restore we've hidden in the ulwp_t structure. If we're in a return
- * probe so want to make it seem as though the tracepoint has been completely
- * executed we need to remember that we've pulled this trick with restore and
- * pull registers from the previous window (the one that we'll switch to once
- * the simple store instruction is executed) rather than the current one. This
- * is why in the case of emulating a restore we set the DTrace CPU flag
- * CPU_DTRACE_FAKERESTORE before calling dtrace_probe() for the return probes
- * (see fasttrap_return_common()).
- */
-
-#define OP(x) ((x) >> 30)
-#define OP2(x) (((x) >> 22) & 0x07)
-#define OP3(x) (((x) >> 19) & 0x3f)
-#define RCOND(x) (((x) >> 25) & 0x07)
-#define COND(x) (((x) >> 25) & 0x0f)
-#define A(x) (((x) >> 29) & 0x01)
-#define I(x) (((x) >> 13) & 0x01)
-#define RD(x) (((x) >> 25) & 0x1f)
-#define RS1(x) (((x) >> 14) & 0x1f)
-#define RS2(x) (((x) >> 0) & 0x1f)
-#define CC(x) (((x) >> 20) & 0x03)
-#define DISP16(x) ((((x) >> 6) & 0xc000) | ((x) & 0x3fff))
-#define DISP22(x) ((x) & 0x3fffff)
-#define DISP19(x) ((x) & 0x7ffff)
-#define DISP30(x) ((x) & 0x3fffffff)
-#define SW_TRAP(x) ((x) & 0x7f)
-
-#define OP3_OR 0x02
-#define OP3_RD 0x28
-#define OP3_JMPL 0x38
-#define OP3_RETURN 0x39
-#define OP3_TCC 0x3a
-#define OP3_SAVE 0x3c
-#define OP3_RESTORE 0x3d
-
-#define OP3_PREFETCH 0x2d
-#define OP3_CASA 0x3c
-#define OP3_PREFETCHA 0x3d
-#define OP3_CASXA 0x3e
-
-#define OP2_ILLTRAP 0x0
-#define OP2_BPcc 0x1
-#define OP2_Bicc 0x2
-#define OP2_BPr 0x3
-#define OP2_SETHI 0x4
-#define OP2_FBPfcc 0x5
-#define OP2_FBfcc 0x6
-
-#define R_G0 0
-#define R_O0 8
-#define R_SP 14
-#define R_I0 24
-#define R_I1 25
-#define R_I2 26
-#define R_I3 27
-#define R_I4 28
-
-/*
- * Check the comment in fasttrap.h when changing these offsets or adding
- * new instructions.
- */
-#define FASTTRAP_OFF_SAVE 64
-#define FASTTRAP_OFF_RESTORE 68
-#define FASTTRAP_OFF_FTRET 72
-#define FASTTRAP_OFF_RETURN 76
-
-#define BREAKPOINT_INSTR 0x91d02001 /* ta 1 */
-
-/*
- * Tunable to let users turn off the fancy save instruction optimization.
- * If a program is non-ABI compliant, there's a possibility that the save
- * instruction optimization could cause an error.
- */
-int fasttrap_optimize_save = 1;
-
-static uint64_t
-fasttrap_anarg(struct regs *rp, int argno)
-{
- uint64_t value;
-
- if (argno < 6)
- return ((&rp->r_o0)[argno]);
-
- if (curproc->p_model == DATAMODEL_NATIVE) {
- struct frame *fr = (struct frame *)(rp->r_sp + STACK_BIAS);
-
- DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
- value = dtrace_fulword(&fr->fr_argd[argno]);
- DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR |
- CPU_DTRACE_BADALIGN);
- } else {
- struct frame32 *fr = (struct frame32 *)rp->r_sp;
-
- DTRACE_CPUFLAG_SET(CPU_DTRACE_NOFAULT);
- value = dtrace_fuword32(&fr->fr_argd[argno]);
- DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_NOFAULT | CPU_DTRACE_BADADDR |
- CPU_DTRACE_BADALIGN);
- }
-
- return (value);
-}
-
-static ulong_t fasttrap_getreg(struct regs *, uint_t);
-static void fasttrap_putreg(struct regs *, uint_t, ulong_t);
-
-static void
-fasttrap_usdt_args(fasttrap_probe_t *probe, struct regs *rp,
- uint_t fake_restore, int argc, uintptr_t *argv)
-{
- int i, x, cap = MIN(argc, probe->ftp_nargs);
- int inc = (fake_restore ? 16 : 0);
-
- /*
- * The only way we'll hit the fake_restore case is if a USDT probe is
- * invoked as a tail-call. While it wouldn't be incorrect, we can
- * avoid a call to fasttrap_getreg(), and safely use rp->r_sp
- * directly since a tail-call can't be made if the invoked function
- * would use the argument dump space (i.e. if there were more than
- * 6 arguments). We take this shortcut because unconditionally rooting
- * around for R_FP (R_SP + 16) would be unnecessarily painful.
- */
-
- if (curproc->p_model == DATAMODEL_NATIVE) {
- struct frame *fr = (struct frame *)(rp->r_sp + STACK_BIAS);
- uintptr_t v;
-
- for (i = 0; i < cap; i++) {
- x = probe->ftp_argmap[i];
-
- if (x < 6)
- argv[i] = fasttrap_getreg(rp, R_O0 + x + inc);
- else if (fasttrap_fulword(&fr->fr_argd[x], &v) != 0)
- argv[i] = 0;
- }
-
- } else {
- struct frame32 *fr = (struct frame32 *)rp->r_sp;
- uint32_t v;
-
- for (i = 0; i < cap; i++) {
- x = probe->ftp_argmap[i];
-
- if (x < 6)
- argv[i] = fasttrap_getreg(rp, R_O0 + x + inc);
- else if (fasttrap_fuword32(&fr->fr_argd[x], &v) != 0)
- argv[i] = 0;
- }
- }
-
- for (; i < argc; i++) {
- argv[i] = 0;
- }
-}
-
-static void
-fasttrap_return_common(struct regs *rp, uintptr_t pc, pid_t pid,
- uint_t fake_restore)
-{
- fasttrap_tracepoint_t *tp;
- fasttrap_bucket_t *bucket;
- fasttrap_id_t *id;
- kmutex_t *pid_mtx;
- dtrace_icookie_t cookie;
-
- pid_mtx = &cpu_core[CPU->cpu_id].cpuc_pid_lock;
- mutex_enter(pid_mtx);
- bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
-
- for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) {
- if (pid == tp->ftt_pid && pc == tp->ftt_pc &&
- tp->ftt_proc->ftpc_acount != 0)
- break;
- }
-
- /*
- * Don't sweat it if we can't find the tracepoint again; unlike
- * when we're in fasttrap_pid_probe(), finding the tracepoint here
- * is not essential to the correct execution of the process.
- */
- if (tp == NULL || tp->ftt_retids == NULL) {
- mutex_exit(pid_mtx);
- return;
- }
-
- for (id = tp->ftt_retids; id != NULL; id = id->fti_next) {
- fasttrap_probe_t *probe = id->fti_probe;
-
- if (id->fti_ptype == DTFTP_POST_OFFSETS) {
- if (probe->ftp_argmap != NULL && fake_restore) {
- uintptr_t t[5];
-
- fasttrap_usdt_args(probe, rp, fake_restore,
- sizeof (t) / sizeof (t[0]), t);
-
- cookie = dtrace_interrupt_disable();
- DTRACE_CPUFLAG_SET(CPU_DTRACE_FAKERESTORE);
- dtrace_probe(probe->ftp_id, t[0], t[1],
- t[2], t[3], t[4]);
- DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_FAKERESTORE);
- dtrace_interrupt_enable(cookie);
-
- } else if (probe->ftp_argmap != NULL) {
- uintptr_t t[5];
-
- fasttrap_usdt_args(probe, rp, fake_restore,
- sizeof (t) / sizeof (t[0]), t);
-
- dtrace_probe(probe->ftp_id, t[0], t[1],
- t[2], t[3], t[4]);
-
- } else if (fake_restore) {
- uintptr_t arg0 = fasttrap_getreg(rp, R_I0);
- uintptr_t arg1 = fasttrap_getreg(rp, R_I1);
- uintptr_t arg2 = fasttrap_getreg(rp, R_I2);
- uintptr_t arg3 = fasttrap_getreg(rp, R_I3);
- uintptr_t arg4 = fasttrap_getreg(rp, R_I4);
-
- cookie = dtrace_interrupt_disable();
- DTRACE_CPUFLAG_SET(CPU_DTRACE_FAKERESTORE);
- dtrace_probe(probe->ftp_id, arg0, arg1,
- arg2, arg3, arg4);
- DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_FAKERESTORE);
- dtrace_interrupt_enable(cookie);
-
- } else {
- dtrace_probe(probe->ftp_id, rp->r_o0, rp->r_o1,
- rp->r_o2, rp->r_o3, rp->r_o4);
- }
-
- continue;
- }
-
- /*
- * If this is only a possible return point, we must
- * be looking at a potential tail call in leaf context.
- * If the %npc is still within this function, then we
- * must have misidentified a jmpl as a tail-call when it
- * is, in fact, part of a jump table. It would be nice to
- * remove this tracepoint, but this is neither the time
- * nor the place.
- */
- if ((tp->ftt_flags & FASTTRAP_F_RETMAYBE) &&
- rp->r_npc - probe->ftp_faddr < probe->ftp_fsize)
- continue;
-
- /*
- * It's possible for a function to branch to the delay slot
- * of an instruction that we've identified as a return site.
- * We can dectect this spurious return probe activation by
- * observing that in this case %npc will be %pc + 4 and %npc
- * will be inside the current function (unless the user is
- * doing _crazy_ instruction picking in which case there's
- * very little we can do). The second check is important
- * in case the last instructions of a function make a tail-
- * call to the function located immediately subsequent.
- */
- if (rp->r_npc == rp->r_pc + 4 &&
- rp->r_npc - probe->ftp_faddr < probe->ftp_fsize)
- continue;
-
- /*
- * The first argument is the offset of return tracepoint
- * in the function; the remaining arguments are the return
- * values.
- *
- * If fake_restore is set, we need to pull the return values
- * out of the %i's rather than the %o's -- a little trickier.
- */
- if (!fake_restore) {
- dtrace_probe(probe->ftp_id, pc - probe->ftp_faddr,
- rp->r_o0, rp->r_o1, rp->r_o2, rp->r_o3);
- } else {
- uintptr_t arg0 = fasttrap_getreg(rp, R_I0);
- uintptr_t arg1 = fasttrap_getreg(rp, R_I1);
- uintptr_t arg2 = fasttrap_getreg(rp, R_I2);
- uintptr_t arg3 = fasttrap_getreg(rp, R_I3);
-
- cookie = dtrace_interrupt_disable();
- DTRACE_CPUFLAG_SET(CPU_DTRACE_FAKERESTORE);
- dtrace_probe(probe->ftp_id, pc - probe->ftp_faddr,
- arg0, arg1, arg2, arg3);
- DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_FAKERESTORE);
- dtrace_interrupt_enable(cookie);
- }
- }
-
- mutex_exit(pid_mtx);
-}
-
-int
-fasttrap_pid_probe(struct regs *rp)
-{
- proc_t *p = curproc;
- fasttrap_tracepoint_t *tp, tp_local;
- fasttrap_id_t *id;
- pid_t pid;
- uintptr_t pc = rp->r_pc;
- uintptr_t npc = rp->r_npc;
- uintptr_t orig_pc = pc;
- fasttrap_bucket_t *bucket;
- kmutex_t *pid_mtx;
- uint_t fake_restore = 0, is_enabled = 0;
- dtrace_icookie_t cookie;
-
- /*
- * It's possible that a user (in a veritable orgy of bad planning)
- * could redirect this thread's flow of control before it reached the
- * return probe fasttrap. In this case we need to kill the process
- * since it's in a unrecoverable state.
- */
- if (curthread->t_dtrace_step) {
- ASSERT(curthread->t_dtrace_on);
- fasttrap_sigtrap(p, curthread, pc);
- return (0);
- }
-
- /*
- * Clear all user tracing flags.
- */
- curthread->t_dtrace_ft = 0;
- curthread->t_dtrace_pc = 0;
- curthread->t_dtrace_npc = 0;
- curthread->t_dtrace_scrpc = 0;
- curthread->t_dtrace_astpc = 0;
-
- /*
- * Treat a child created by a call to vfork(2) as if it were its
- * parent. We know that there's only one thread of control in such a
- * process: this one.
- */
- while (p->p_flag & SVFORK) {
- p = p->p_parent;
- }
-
- pid = p->p_pid;
- pid_mtx = &cpu_core[CPU->cpu_id].cpuc_pid_lock;
- mutex_enter(pid_mtx);
- bucket = &fasttrap_tpoints.fth_table[FASTTRAP_TPOINTS_INDEX(pid, pc)];
-
- /*
- * Lookup the tracepoint that the process just hit.
- */
- for (tp = bucket->ftb_data; tp != NULL; tp = tp->ftt_next) {
- if (pid == tp->ftt_pid && pc == tp->ftt_pc &&
- tp->ftt_proc->ftpc_acount != 0)
- break;
- }
-
- /*
- * If we couldn't find a matching tracepoint, either a tracepoint has
- * been inserted without using the pid<pid> ioctl interface (see
- * fasttrap_ioctl), or somehow we have mislaid this tracepoint.
- */
- if (tp == NULL) {
- mutex_exit(pid_mtx);
- return (-1);
- }
-
- for (id = tp->ftt_ids; id != NULL; id = id->fti_next) {
- fasttrap_probe_t *probe = id->fti_probe;
- int isentry = (id->fti_ptype == DTFTP_ENTRY);
-
- if (id->fti_ptype == DTFTP_IS_ENABLED) {
- is_enabled = 1;
- continue;
- }
-
- /*
- * We note that this was an entry probe to help ustack() find
- * the first caller.
- */
- if (isentry) {
- cookie = dtrace_interrupt_disable();
- DTRACE_CPUFLAG_SET(CPU_DTRACE_ENTRY);
- }
- dtrace_probe(probe->ftp_id, rp->r_o0, rp->r_o1, rp->r_o2,
- rp->r_o3, rp->r_o4);
- if (isentry) {
- DTRACE_CPUFLAG_CLEAR(CPU_DTRACE_ENTRY);
- dtrace_interrupt_enable(cookie);
- }
- }
-
- /*
- * We're about to do a bunch of work so we cache a local copy of
- * the tracepoint to emulate the instruction, and then find the
- * tracepoint again later if we need to light up any return probes.
- */
- tp_local = *tp;
- mutex_exit(pid_mtx);
- tp = &tp_local;
-
- /*
- * If there's an is-enabled probe conntected to this tracepoint it
- * means that there was a 'mov %g0, %o0' instruction that was placed
- * there by DTrace when the binary was linked. As this probe is, in
- * fact, enabled, we need to stuff 1 into %o0. Accordingly, we can
- * bypass all the instruction emulation logic since we know the
- * inevitable result. It's possible that a user could construct a
- * scenario where the 'is-enabled' probe was on some other
- * instruction, but that would be a rather exotic way to shoot oneself
- * in the foot.
- */
- if (is_enabled) {
- rp->r_o0 = 1;
- pc = rp->r_npc;
- npc = pc + 4;
- goto done;
- }
-
- /*
- * We emulate certain types of instructions to ensure correctness
- * (in the case of position dependent instructions) or optimize
- * common cases. The rest we have the thread execute back in user-
- * land.
- */
- switch (tp->ftt_type) {
- case FASTTRAP_T_SAVE:
- {
- int32_t imm;
-
- /*
- * This an optimization to let us handle function entry
- * probes more efficiently. Many functions begin with a save
- * instruction that follows the pattern:
- * save %sp, <imm>, %sp
- *
- * Meanwhile, we've stashed the instruction:
- * save %g1, %g0, %sp
- *
- * off of %g7, so all we have to do is stick the right value
- * into %g1 and reset %pc to point to the instruction we've
- * cleverly hidden (%npc should not be touched).
- */
-
- imm = tp->ftt_instr << 19;
- imm >>= 19;
- rp->r_g1 = rp->r_sp + imm;
- pc = rp->r_g7 + FASTTRAP_OFF_SAVE;
- break;
- }
-
- case FASTTRAP_T_RESTORE:
- {
- ulong_t value;
- uint_t rd;
-
- /*
- * This is an optimization to let us handle function
- * return probes more efficiently. Most non-leaf functions
- * end with the sequence:
- * ret
- * restore <reg>, <reg_or_imm>, %oX
- *
- * We've stashed the instruction:
- * restore %g0, %g0, %g0
- *
- * off of %g7 so we just need to place the correct value
- * in the right %i register (since after our fake-o
- * restore, the %i's will become the %o's) and set the %pc
- * to point to our hidden restore. We also set fake_restore to
- * let fasttrap_return_common() know that it will find the
- * return values in the %i's rather than the %o's.
- */
-
- if (I(tp->ftt_instr)) {
- int32_t imm;
-
- imm = tp->ftt_instr << 19;
- imm >>= 19;
- value = fasttrap_getreg(rp, RS1(tp->ftt_instr)) + imm;
- } else {
- value = fasttrap_getreg(rp, RS1(tp->ftt_instr)) +
- fasttrap_getreg(rp, RS2(tp->ftt_instr));
- }
-
- /*
- * Convert %o's to %i's; leave %g's as they are.
- */
- rd = RD(tp->ftt_instr);
- fasttrap_putreg(rp, ((rd & 0x18) == 0x8) ? rd + 16 : rd, value);
-
- pc = rp->r_g7 + FASTTRAP_OFF_RESTORE;
- fake_restore = 1;
- break;
- }
-
- case FASTTRAP_T_RETURN:
- {
- uintptr_t target;
-
- /*
- * A return instruction is like a jmpl (without the link
- * part) that executes an implicit restore. We've stashed
- * the instruction:
- * return %o0
- *
- * off of %g7 so we just need to place the target in %o0
- * and set the %pc to point to the stashed return instruction.
- * We use %o0 since that register disappears after the return
- * executes, erasing any evidence of this tampering.
- */
- if (I(tp->ftt_instr)) {
- int32_t imm;
-
- imm = tp->ftt_instr << 19;
- imm >>= 19;
- target = fasttrap_getreg(rp, RS1(tp->ftt_instr)) + imm;
- } else {
- target = fasttrap_getreg(rp, RS1(tp->ftt_instr)) +
- fasttrap_getreg(rp, RS2(tp->ftt_instr));
- }
-
- fasttrap_putreg(rp, R_O0, target);
-
- pc = rp->r_g7 + FASTTRAP_OFF_RETURN;
- fake_restore = 1;
- break;
- }
-
- case FASTTRAP_T_OR:
- {
- ulong_t value;
-
- if (I(tp->ftt_instr)) {
- int32_t imm;
-
- imm = tp->ftt_instr << 19;
- imm >>= 19;
- value = fasttrap_getreg(rp, RS1(tp->ftt_instr)) | imm;
- } else {
- value = fasttrap_getreg(rp, RS1(tp->ftt_instr)) |
- fasttrap_getreg(rp, RS2(tp->ftt_instr));
- }
-
- fasttrap_putreg(rp, RD(tp->ftt_instr), value);
- pc = rp->r_npc;
- npc = pc + 4;
- break;
- }
-
- case FASTTRAP_T_SETHI:
- if (RD(tp->ftt_instr) != R_G0) {
- uint32_t imm32 = tp->ftt_instr << 10;
- fasttrap_putreg(rp, RD(tp->ftt_instr), (ulong_t)imm32);
- }
- pc = rp->r_npc;
- npc = pc + 4;
- break;
-
- case FASTTRAP_T_CCR:
- {
- uint_t c, v, z, n, taken;
- uint_t ccr = rp->r_tstate >> TSTATE_CCR_SHIFT;
-
- if (tp->ftt_cc != 0)
- ccr >>= 4;
-
- c = (ccr >> 0) & 1;
- v = (ccr >> 1) & 1;
- z = (ccr >> 2) & 1;
- n = (ccr >> 3) & 1;
-
- switch (tp->ftt_code) {
- case 0x0: /* BN */
- taken = 0; break;
- case 0x1: /* BE */
- taken = z; break;
- case 0x2: /* BLE */
- taken = z | (n ^ v); break;
- case 0x3: /* BL */
- taken = n ^ v; break;
- case 0x4: /* BLEU */
- taken = c | z; break;
- case 0x5: /* BCS (BLU) */
- taken = c; break;
- case 0x6: /* BNEG */
- taken = n; break;
- case 0x7: /* BVS */
- taken = v; break;
- case 0x8: /* BA */
- /*
- * We handle the BA case differently since the annul
- * bit means something slightly different.
- */
- panic("fasttrap: mishandled a branch");
- taken = 1; break;
- case 0x9: /* BNE */
- taken = ~z; break;
- case 0xa: /* BG */
- taken = ~(z | (n ^ v)); break;
- case 0xb: /* BGE */
- taken = ~(n ^ v); break;
- case 0xc: /* BGU */
- taken = ~(c | z); break;
- case 0xd: /* BCC (BGEU) */
- taken = ~c; break;
- case 0xe: /* BPOS */
- taken = ~n; break;
- case 0xf: /* BVC */
- taken = ~v; break;
- }
-
- if (taken & 1) {
- pc = rp->r_npc;
- npc = tp->ftt_dest;
- } else if (tp->ftt_flags & FASTTRAP_F_ANNUL) {
- /*
- * Untaken annulled branches don't execute the
- * instruction in the delay slot.
- */
- pc = rp->r_npc + 4;
- npc = pc + 4;
- } else {
- pc = rp->r_npc;
- npc = pc + 4;
- }
- break;
- }
-
- case FASTTRAP_T_FCC:
- {
- uint_t fcc;
- uint_t taken;
- uint64_t fsr;
-
- dtrace_getfsr(&fsr);
-
- if (tp->ftt_cc == 0) {
- fcc = (fsr >> 10) & 0x3;
- } else {
- uint_t shift;
- ASSERT(tp->ftt_cc <= 3);
- shift = 30 + tp->ftt_cc * 2;
- fcc = (fsr >> shift) & 0x3;
- }
-
- switch (tp->ftt_code) {
- case 0x0: /* FBN */
- taken = (1 << fcc) & (0|0|0|0); break;
- case 0x1: /* FBNE */
- taken = (1 << fcc) & (8|4|2|0); break;
- case 0x2: /* FBLG */
- taken = (1 << fcc) & (0|4|2|0); break;
- case 0x3: /* FBUL */
- taken = (1 << fcc) & (8|0|2|0); break;
- case 0x4: /* FBL */
- taken = (1 << fcc) & (0|0|2|0); break;
- case 0x5: /* FBUG */
- taken = (1 << fcc) & (8|4|0|0); break;
- case 0x6: /* FBG */
- taken = (1 << fcc) & (0|4|0|0); break;
- case 0x7: /* FBU */
- taken = (1 << fcc) & (8|0|0|0); break;
- case 0x8: /* FBA */
- /*
- * We handle the FBA case differently since the annul
- * bit means something slightly different.
- */
- panic("fasttrap: mishandled a branch");
- taken = (1 << fcc) & (8|4|2|1); break;
- case 0x9: /* FBE */
- taken = (1 << fcc) & (0|0|0|1); break;
- case 0xa: /* FBUE */
- taken = (1 << fcc) & (8|0|0|1); break;
- case 0xb: /* FBGE */
- taken = (1 << fcc) & (0|4|0|1); break;
- case 0xc: /* FBUGE */
- taken = (1 << fcc) & (8|4|0|1); break;
- case 0xd: /* FBLE */
- taken = (1 << fcc) & (0|0|2|1); break;
- case 0xe: /* FBULE */
- taken = (1 << fcc) & (8|0|2|1); break;
- case 0xf: /* FBO */
- taken = (1 << fcc) & (0|4|2|1); break;
- }
-
- if (taken) {
- pc = rp->r_npc;
- npc = tp->ftt_dest;
- } else if (tp->ftt_flags & FASTTRAP_F_ANNUL) {
- /*
- * Untaken annulled branches don't execute the
- * instruction in the delay slot.
- */
- pc = rp->r_npc + 4;
- npc = pc + 4;
- } else {
- pc = rp->r_npc;
- npc = pc + 4;
- }
- break;
- }
-
- case FASTTRAP_T_REG:
- {
- int64_t value;
- uint_t taken;
- uint_t reg = RS1(tp->ftt_instr);
-
- /*
- * An ILP32 process shouldn't be using a branch predicated on
- * an %i or an %l since it would violate the ABI. It's a
- * violation of the ABI because we can't ensure deterministic
- * behavior. We should have identified this case when we
- * enabled the probe.
- */
- ASSERT(p->p_model == DATAMODEL_LP64 || reg < 16);
-
- value = (int64_t)fasttrap_getreg(rp, reg);
-
- switch (tp->ftt_code) {
- case 0x1: /* BRZ */
- taken = (value == 0); break;
- case 0x2: /* BRLEZ */
- taken = (value <= 0); break;
- case 0x3: /* BRLZ */
- taken = (value < 0); break;
- case 0x5: /* BRNZ */
- taken = (value != 0); break;
- case 0x6: /* BRGZ */
- taken = (value > 0); break;
- case 0x7: /* BRGEZ */
- taken = (value >= 0); break;
- default:
- case 0x0:
- case 0x4:
- panic("fasttrap: mishandled a branch");
- }
-
- if (taken) {
- pc = rp->r_npc;
- npc = tp->ftt_dest;
- } else if (tp->ftt_flags & FASTTRAP_F_ANNUL) {
- /*
- * Untaken annulled branches don't execute the
- * instruction in the delay slot.
- */
- pc = rp->r_npc + 4;
- npc = pc + 4;
- } else {
- pc = rp->r_npc;
- npc = pc + 4;
- }
- break;
- }
-
- case FASTTRAP_T_ALWAYS:
- /*
- * BAs, BA,As...
- */
-
- if (tp->ftt_flags & FASTTRAP_F_ANNUL) {
- /*
- * Annulled branch always instructions never execute
- * the instruction in the delay slot.
- */
- pc = tp->ftt_dest;
- npc = tp->ftt_dest + 4;
- } else {
- pc = rp->r_npc;
- npc = tp->ftt_dest;
- }
- break;
-
- case FASTTRAP_T_RDPC:
- fasttrap_putreg(rp, RD(tp->ftt_instr), rp->r_pc);
- pc = rp->r_npc;
- npc = pc + 4;
- break;
-
- case FASTTRAP_T_CALL:
- /*
- * It's a call _and_ link remember...
- */
- rp->r_o7 = rp->r_pc;
- pc = rp->r_npc;
- npc = tp->ftt_dest;
- break;
-
- case FASTTRAP_T_JMPL:
- pc = rp->r_npc;
-
- if (I(tp->ftt_instr)) {
- uint_t rs1 = RS1(tp->ftt_instr);
- int32_t imm;
-
- imm = tp->ftt_instr << 19;
- imm >>= 19;
- npc = fasttrap_getreg(rp, rs1) + imm;
- } else {
- uint_t rs1 = RS1(tp->ftt_instr);
- uint_t rs2 = RS2(tp->ftt_instr);
-
- npc = fasttrap_getreg(rp, rs1) +
- fasttrap_getreg(rp, rs2);
- }
-
- /*
- * Do the link part of the jump-and-link instruction.
- */
- fasttrap_putreg(rp, RD(tp->ftt_instr), rp->r_pc);
-
- break;
-
- case FASTTRAP_T_COMMON:
- {
- curthread->t_dtrace_scrpc = rp->r_g7;
- curthread->t_dtrace_astpc = rp->r_g7 + FASTTRAP_OFF_FTRET;
-
- /*
- * Copy the instruction to a reserved location in the
- * user-land thread structure, then set the PC to that
- * location and leave the NPC alone. We take pains to ensure
- * consistency in the instruction stream (See SPARC
- * Architecture Manual Version 9, sections 8.4.7, A.20, and
- * H.1.6; UltraSPARC I/II User's Manual, sections 3.1.1.1,
- * and 13.6.4) by using the ASI ASI_BLK_COMMIT_S to copy the
- * instruction into the user's address space without
- * bypassing the I$. There's no AS_USER version of this ASI
- * (as exist for other ASIs) so we use the lofault
- * mechanism to catch faults.
- */
- if (dtrace_blksuword32(rp->r_g7, &tp->ftt_instr, 1) == -1) {
- /*
- * If the copyout fails, then the process's state
- * is not consistent (the effects of the traced
- * instruction will never be seen). This process
- * cannot be allowed to continue execution.
- */
- fasttrap_sigtrap(curproc, curthread, pc);
- return (0);
- }
-
- curthread->t_dtrace_pc = pc;
- curthread->t_dtrace_npc = npc;
- curthread->t_dtrace_on = 1;
-
- pc = curthread->t_dtrace_scrpc;
-
- if (tp->ftt_retids != NULL) {
- curthread->t_dtrace_step = 1;
- curthread->t_dtrace_ret = 1;
- npc = curthread->t_dtrace_astpc;
- }
- break;
- }
-
- default:
- panic("fasttrap: mishandled an instruction");
- }
-
- /*
- * This bit me in the ass a couple of times, so lets toss this
- * in as a cursory sanity check.
- */
- ASSERT(pc != rp->r_g7 + 4);
- ASSERT(pc != rp->r_g7 + 8);
-
-done:
- /*
- * If there were no return probes when we first found the tracepoint,
- * we should feel no obligation to honor any return probes that were
- * subsequently enabled -- they'll just have to wait until the next
- * time around.
- */
- if (tp->ftt_retids != NULL) {
- /*
- * We need to wait until the results of the instruction are
- * apparent before invoking any return probes. If this
- * instruction was emulated we can just call
- * fasttrap_return_common(); if it needs to be executed, we
- * need to wait until we return to the kernel.
- */
- if (tp->ftt_type != FASTTRAP_T_COMMON) {
- fasttrap_return_common(rp, orig_pc, pid, fake_restore);
- } else {
- ASSERT(curthread->t_dtrace_ret != 0);
- ASSERT(curthread->t_dtrace_pc == orig_pc);
- ASSERT(curthread->t_dtrace_scrpc == rp->r_g7);
- ASSERT(npc == curthread->t_dtrace_astpc);
- }
- }
-
- ASSERT(pc != 0);
- rp->r_pc = pc;
- rp->r_npc = npc;
-
- return (0);
-}
-
-int
-fasttrap_return_probe(struct regs *rp)
-{
- proc_t *p = ttoproc(curthread);
- pid_t pid;
- uintptr_t pc = curthread->t_dtrace_pc;
- uintptr_t npc = curthread->t_dtrace_npc;
-
- curthread->t_dtrace_pc = 0;
- curthread->t_dtrace_npc = 0;
- curthread->t_dtrace_scrpc = 0;
- curthread->t_dtrace_astpc = 0;
-
- /*
- * Treat a child created by a call to vfork(2) as if it were its
- * parent. We know there's only one thread of control in such a
- * process: this one.
- */
- while (p->p_flag & SVFORK) {
- p = p->p_parent;
- }
-
- /*
- * We set the %pc and %npc to their values when the traced
- * instruction was initially executed so that it appears to
- * dtrace_probe() that we're on the original instruction, and so that
- * the user can't easily detect our complex web of lies.
- * dtrace_return_probe() (our caller) will correctly set %pc and %npc
- * after we return.
- */
- rp->r_pc = pc;
- rp->r_npc = npc;
-
- pid = p->p_pid;
- fasttrap_return_common(rp, pc, pid, 0);
-
- return (0);
-}
-
-int
-fasttrap_tracepoint_install(proc_t *p, fasttrap_tracepoint_t *tp)
-{
- fasttrap_instr_t instr = FASTTRAP_INSTR;
-
- if (uwrite(p, &instr, 4, tp->ftt_pc) != 0)
- return (-1);
-
- return (0);
-}
-
-int
-fasttrap_tracepoint_remove(proc_t *p, fasttrap_tracepoint_t *tp)
-{
- fasttrap_instr_t instr;
-
- /*
- * Distinguish between read or write failures and a changed
- * instruction.
- */
- if (uread(p, &instr, 4, tp->ftt_pc) != 0)
- return (0);
- if (instr != FASTTRAP_INSTR && instr != BREAKPOINT_INSTR)
- return (0);
- if (uwrite(p, &tp->ftt_instr, 4, tp->ftt_pc) != 0)
- return (-1);
-
- return (0);
-}
-
-int
-fasttrap_tracepoint_init(proc_t *p, fasttrap_tracepoint_t *tp, uintptr_t pc,
- fasttrap_probe_type_t type)
-{
- uint32_t instr;
- int32_t disp;
-
- /*
- * Read the instruction at the given address out of the process's
- * address space. We don't have to worry about a debugger
- * changing this instruction before we overwrite it with our trap
- * instruction since P_PR_LOCK is set.
- */
- if (uread(p, &instr, 4, pc) != 0)
- return (-1);
-
- /*
- * Decode the instruction to fill in the probe flags. We can have
- * the process execute most instructions on its own using a pc/npc
- * trick, but pc-relative control transfer present a problem since
- * we're relocating the instruction. We emulate these instructions
- * in the kernel. We assume a default type and over-write that as
- * needed.
- *
- * pc-relative instructions must be emulated for correctness;
- * other instructions (which represent a large set of commonly traced
- * instructions) are emulated or otherwise optimized for performance.
- */
- tp->ftt_type = FASTTRAP_T_COMMON;
- if (OP(instr) == 1) {
- /*
- * Call instructions.
- */
- tp->ftt_type = FASTTRAP_T_CALL;
- disp = DISP30(instr) << 2;
- tp->ftt_dest = pc + (intptr_t)disp;
-
- } else if (OP(instr) == 0) {
- /*
- * Branch instructions.
- *
- * Unconditional branches need careful attention when they're
- * annulled: annulled unconditional branches never execute
- * the instruction in the delay slot.
- */
- switch (OP2(instr)) {
- case OP2_ILLTRAP:
- case 0x7:
- /*
- * The compiler may place an illtrap after a call to
- * a function that returns a structure. In the case of
- * a returned structure, the compiler places an illtrap
- * whose const22 field is the size of the returned
- * structure immediately following the delay slot of
- * the call. To stay out of the way, we refuse to
- * place tracepoints on top of illtrap instructions.
- *
- * This is one of the dumbest architectural decisions
- * I've ever had to work around.
- *
- * We also identify the only illegal op2 value (See
- * SPARC Architecture Manual Version 9, E.2 table 31).
- */
- return (-1);
-
- case OP2_BPcc:
- if (COND(instr) == 8) {
- tp->ftt_type = FASTTRAP_T_ALWAYS;
- } else {
- /*
- * Check for an illegal instruction.
- */
- if (CC(instr) & 1)
- return (-1);
- tp->ftt_type = FASTTRAP_T_CCR;
- tp->ftt_cc = CC(instr);
- tp->ftt_code = COND(instr);
- }
-
- if (A(instr) != 0)
- tp->ftt_flags |= FASTTRAP_F_ANNUL;
-
- disp = DISP19(instr);
- disp <<= 13;
- disp >>= 11;
- tp->ftt_dest = pc + (intptr_t)disp;
- break;
-
- case OP2_Bicc:
- if (COND(instr) == 8) {
- tp->ftt_type = FASTTRAP_T_ALWAYS;
- } else {
- tp->ftt_type = FASTTRAP_T_CCR;
- tp->ftt_cc = 0;
- tp->ftt_code = COND(instr);
- }
-
- if (A(instr) != 0)
- tp->ftt_flags |= FASTTRAP_F_ANNUL;
-
- disp = DISP22(instr);
- disp <<= 10;
- disp >>= 8;
- tp->ftt_dest = pc + (intptr_t)disp;
- break;
-
- case OP2_BPr:
- /*
- * Check for an illegal instruction.
- */
- if ((RCOND(instr) & 3) == 0)
- return (-1);
-
- /*
- * It's a violation of the v8plus ABI to use a
- * register-predicated branch in a 32-bit app if
- * the register used is an %l or an %i (%gs and %os
- * are legit because they're not saved to the stack
- * in 32-bit words when we take a trap).
- */
- if (p->p_model == DATAMODEL_ILP32 && RS1(instr) >= 16)
- return (-1);
-
- tp->ftt_type = FASTTRAP_T_REG;
- if (A(instr) != 0)
- tp->ftt_flags |= FASTTRAP_F_ANNUL;
- disp = DISP16(instr);
- disp <<= 16;
- disp >>= 14;
- tp->ftt_dest = pc + (intptr_t)disp;
- tp->ftt_code = RCOND(instr);
- break;
-
- case OP2_SETHI:
- tp->ftt_type = FASTTRAP_T_SETHI;
- break;
-
- case OP2_FBPfcc:
- if (COND(instr) == 8) {
- tp->ftt_type = FASTTRAP_T_ALWAYS;
- } else {
- tp->ftt_type = FASTTRAP_T_FCC;
- tp->ftt_cc = CC(instr);
- tp->ftt_code = COND(instr);
- }
-
- if (A(instr) != 0)
- tp->ftt_flags |= FASTTRAP_F_ANNUL;
-
- disp = DISP19(instr);
- disp <<= 13;
- disp >>= 11;
- tp->ftt_dest = pc + (intptr_t)disp;
- break;
-
- case OP2_FBfcc:
- if (COND(instr) == 8) {
- tp->ftt_type = FASTTRAP_T_ALWAYS;
- } else {
- tp->ftt_type = FASTTRAP_T_FCC;
- tp->ftt_cc = 0;
- tp->ftt_code = COND(instr);
- }
-
- if (A(instr) != 0)
- tp->ftt_flags |= FASTTRAP_F_ANNUL;
-
- disp = DISP22(instr);
- disp <<= 10;
- disp >>= 8;
- tp->ftt_dest = pc + (intptr_t)disp;
- break;
- }
-
- } else if (OP(instr) == 2) {
- switch (OP3(instr)) {
- case OP3_RETURN:
- tp->ftt_type = FASTTRAP_T_RETURN;
- break;
-
- case OP3_JMPL:
- tp->ftt_type = FASTTRAP_T_JMPL;
- break;
-
- case OP3_RD:
- if (RS1(instr) == 5)
- tp->ftt_type = FASTTRAP_T_RDPC;
- break;
-
- case OP3_SAVE:
- /*
- * We optimize for save instructions at function
- * entry; see the comment in fasttrap_pid_probe()
- * (near FASTTRAP_T_SAVE) for details.
- */
- if (fasttrap_optimize_save != 0 &&
- type == DTFTP_ENTRY &&
- I(instr) == 1 && RD(instr) == R_SP)
- tp->ftt_type = FASTTRAP_T_SAVE;
- break;
-
- case OP3_RESTORE:
- /*
- * We optimize restore instructions at function
- * return; see the comment in fasttrap_pid_probe()
- * (near FASTTRAP_T_RESTORE) for details.
- *
- * rd must be an %o or %g register.
- */
- if ((RD(instr) & 0x10) == 0)
- tp->ftt_type = FASTTRAP_T_RESTORE;
- break;
-
- case OP3_OR:
- /*
- * A large proportion of instructions in the delay
- * slot of retl instructions are or's so we emulate
- * these downstairs as an optimization.
- */
- tp->ftt_type = FASTTRAP_T_OR;
- break;
-
- case OP3_TCC:
- /*
- * Breakpoint instructions are effectively position-
- * dependent since the debugger uses the %pc value
- * to lookup which breakpoint was executed. As a
- * result, we can't actually instrument breakpoints.
- */
- if (SW_TRAP(instr) == ST_BREAKPOINT)
- return (-1);
- break;
-
- case 0x19:
- case 0x1d:
- case 0x29:
- case 0x33:
- case 0x3f:
- /*
- * Identify illegal instructions (See SPARC
- * Architecture Manual Version 9, E.2 table 32).
- */
- return (-1);
- }
- } else if (OP(instr) == 3) {
- uint32_t op3 = OP3(instr);
-
- /*
- * Identify illegal instructions (See SPARC Architecture
- * Manual Version 9, E.2 table 33).
- */
- if ((op3 & 0x28) == 0x28) {
- if (op3 != OP3_PREFETCH && op3 != OP3_CASA &&
- op3 != OP3_PREFETCHA && op3 != OP3_CASXA)
- return (-1);
- } else {
- if ((op3 & 0x0f) == 0x0c || (op3 & 0x3b) == 0x31)
- return (-1);
- }
- }
-
- tp->ftt_instr = instr;
-
- /*
- * We don't know how this tracepoint is going to be used, but in case
- * it's used as part of a function return probe, we need to indicate
- * whether it's always a return site or only potentially a return
- * site. If it's part of a return probe, it's always going to be a
- * return from that function if it's a restore instruction or if
- * the previous instruction was a return. If we could reliably
- * distinguish jump tables from return sites, this wouldn't be
- * necessary.
- */
- if (tp->ftt_type != FASTTRAP_T_RESTORE &&
- (uread(p, &instr, 4, pc - sizeof (instr)) != 0 ||
- !(OP(instr) == 2 && OP3(instr) == OP3_RETURN)))
- tp->ftt_flags |= FASTTRAP_F_RETMAYBE;
-
- return (0);
-}
-
-/*ARGSUSED*/
-uint64_t
-fasttrap_pid_getarg(void *arg, dtrace_id_t id, void *parg, int argno,
- int aframes)
-{
- return (fasttrap_anarg(ttolwp(curthread)->lwp_regs, argno));
-}
-
-/*ARGSUSED*/
-uint64_t
-fasttrap_usdt_getarg(void *arg, dtrace_id_t id, void *parg, int argno,
- int aframes)
-{
- return (fasttrap_anarg(ttolwp(curthread)->lwp_regs, argno));
-}
-
-static uint64_t fasttrap_getreg_fast_cnt;
-static uint64_t fasttrap_getreg_mpcb_cnt;
-static uint64_t fasttrap_getreg_slow_cnt;
-
-static ulong_t
-fasttrap_getreg(struct regs *rp, uint_t reg)
-{
- ulong_t value;
- dtrace_icookie_t cookie;
- struct machpcb *mpcb;
- extern ulong_t dtrace_getreg_win(uint_t, uint_t);
-
- /*
- * We have the %os and %gs in our struct regs, but if we need to
- * snag a %l or %i we need to go scrounging around in the process's
- * address space.
- */
- if (reg == 0)
- return (0);
-
- if (reg < 16)
- return ((&rp->r_g1)[reg - 1]);
-
- /*
- * Before we look at the user's stack, we'll check the register
- * windows to see if the information we want is in there.
- */
- cookie = dtrace_interrupt_disable();
- if (dtrace_getotherwin() > 0) {
- value = dtrace_getreg_win(reg, 1);
- dtrace_interrupt_enable(cookie);
-
- atomic_inc_64(&fasttrap_getreg_fast_cnt);
-
- return (value);
- }
- dtrace_interrupt_enable(cookie);
-
- /*
- * First check the machpcb structure to see if we've already read
- * in the register window we're looking for; if we haven't, (and
- * we probably haven't) try to copy in the value of the register.
- */
- /* LINTED - alignment */
- mpcb = (struct machpcb *)((caddr_t)rp - REGOFF);
-
- if (get_udatamodel() == DATAMODEL_NATIVE) {
- struct frame *fr = (struct frame *)(rp->r_sp + STACK_BIAS);
-
- if (mpcb->mpcb_wbcnt > 0) {
- struct rwindow *rwin = (void *)mpcb->mpcb_wbuf;
- int i = mpcb->mpcb_wbcnt;
- do {
- i--;
- if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp)
- continue;
-
- atomic_inc_64(&fasttrap_getreg_mpcb_cnt);
- return (rwin[i].rw_local[reg - 16]);
- } while (i > 0);
- }
-
- if (fasttrap_fulword(&fr->fr_local[reg - 16], &value) != 0)
- goto err;
- } else {
- struct frame32 *fr =
- (struct frame32 *)(uintptr_t)(caddr32_t)rp->r_sp;
- uint32_t *v32 = (uint32_t *)&value;
-
- if (mpcb->mpcb_wbcnt > 0) {
- struct rwindow32 *rwin = (void *)mpcb->mpcb_wbuf;
- int i = mpcb->mpcb_wbcnt;
- do {
- i--;
- if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp)
- continue;
-
- atomic_inc_64(&fasttrap_getreg_mpcb_cnt);
- return (rwin[i].rw_local[reg - 16]);
- } while (i > 0);
- }
-
- if (fasttrap_fuword32(&fr->fr_local[reg - 16], &v32[1]) != 0)
- goto err;
-
- v32[0] = 0;
- }
-
- atomic_inc_64(&fasttrap_getreg_slow_cnt);
- return (value);
-
-err:
- /*
- * If the copy in failed, the process will be in a irrecoverable
- * state, and we have no choice but to kill it.
- */
- kern_psignal(ttoproc(curthread), SIGILL);
- return (0);
-}
-
-static uint64_t fasttrap_putreg_fast_cnt;
-static uint64_t fasttrap_putreg_mpcb_cnt;
-static uint64_t fasttrap_putreg_slow_cnt;
-
-static void
-fasttrap_putreg(struct regs *rp, uint_t reg, ulong_t value)
-{
- dtrace_icookie_t cookie;
- struct machpcb *mpcb;
- extern void dtrace_putreg_win(uint_t, ulong_t);
-
- if (reg == 0)
- return;
-
- if (reg < 16) {
- (&rp->r_g1)[reg - 1] = value;
- return;
- }
-
- /*
- * If the user process is still using some register windows, we
- * can just place the value in the correct window.
- */
- cookie = dtrace_interrupt_disable();
- if (dtrace_getotherwin() > 0) {
- dtrace_putreg_win(reg, value);
- dtrace_interrupt_enable(cookie);
- atomic_inc_64(&fasttrap_putreg_fast_cnt);
- return;
- }
- dtrace_interrupt_enable(cookie);
-
- /*
- * First see if there's a copy of the register window in the
- * machpcb structure that we can modify; if there isn't try to
- * copy out the value. If that fails, we try to create a new
- * register window in the machpcb structure. While this isn't
- * _precisely_ the intended use of the machpcb structure, it
- * can't cause any problems since we know at this point in the
- * code that all of the user's data have been flushed out of the
- * register file (since %otherwin is 0).
- */
- /* LINTED - alignment */
- mpcb = (struct machpcb *)((caddr_t)rp - REGOFF);
-
- if (get_udatamodel() == DATAMODEL_NATIVE) {
- struct frame *fr = (struct frame *)(rp->r_sp + STACK_BIAS);
- /* LINTED - alignment */
- struct rwindow *rwin = (struct rwindow *)mpcb->mpcb_wbuf;
-
- if (mpcb->mpcb_wbcnt > 0) {
- int i = mpcb->mpcb_wbcnt;
- do {
- i--;
- if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp)
- continue;
-
- rwin[i].rw_local[reg - 16] = value;
- atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
- return;
- } while (i > 0);
- }
-
- if (fasttrap_sulword(&fr->fr_local[reg - 16], value) != 0) {
- if (mpcb->mpcb_wbcnt >= MAXWIN || copyin(fr,
- &rwin[mpcb->mpcb_wbcnt], sizeof (*rwin)) != 0)
- goto err;
-
- rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = value;
- mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp;
- mpcb->mpcb_wbcnt++;
- atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
- return;
- }
- } else {
- struct frame32 *fr =
- (struct frame32 *)(uintptr_t)(caddr32_t)rp->r_sp;
- /* LINTED - alignment */
- struct rwindow32 *rwin = (struct rwindow32 *)mpcb->mpcb_wbuf;
- uint32_t v32 = (uint32_t)value;
-
- if (mpcb->mpcb_wbcnt > 0) {
- int i = mpcb->mpcb_wbcnt;
- do {
- i--;
- if ((long)mpcb->mpcb_spbuf[i] != rp->r_sp)
- continue;
-
- rwin[i].rw_local[reg - 16] = v32;
- atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
- return;
- } while (i > 0);
- }
-
- if (fasttrap_suword32(&fr->fr_local[reg - 16], v32) != 0) {
- if (mpcb->mpcb_wbcnt >= MAXWIN || copyin(fr,
- &rwin[mpcb->mpcb_wbcnt], sizeof (*rwin)) != 0)
- goto err;
-
- rwin[mpcb->mpcb_wbcnt].rw_local[reg - 16] = v32;
- mpcb->mpcb_spbuf[mpcb->mpcb_wbcnt] = (caddr_t)rp->r_sp;
- mpcb->mpcb_wbcnt++;
- atomic_inc_64(&fasttrap_putreg_mpcb_cnt);
- return;
- }
- }
-
- atomic_inc_64(&fasttrap_putreg_slow_cnt);
- return;
-
-err:
- /*
- * If we couldn't record this register's value, the process is in an
- * irrecoverable state and we have no choice but to euthanize it.
- */
- kern_psignal(ttoproc(curthread), SIGILL);
-}
diff --git a/sys/cddl/contrib/opensolaris/uts/sparc/sys/fasttrap_isa.h b/sys/cddl/contrib/opensolaris/uts/sparc/sys/fasttrap_isa.h
deleted file mode 100644
index 10361cbed8de..000000000000
--- a/sys/cddl/contrib/opensolaris/uts/sparc/sys/fasttrap_isa.h
+++ /dev/null
@@ -1,94 +0,0 @@
-/*
- * CDDL HEADER START
- *
- * The contents of this file are subject to the terms of the
- * Common Development and Distribution License, Version 1.0 only
- * (the "License"). You may not use this file except in compliance
- * with the License.
- *
- * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
- * or http://www.opensolaris.org/os/licensing.
- * See the License for the specific language governing permissions
- * and limitations under the License.
- *
- * When distributing Covered Code, include this CDDL HEADER in each
- * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
- * If applicable, add the following below this CDDL HEADER, with the
- * fields enclosed by brackets "[]" replaced with your own identifying
- * information: Portions Copyright [yyyy] [name of copyright owner]
- *
- * CDDL HEADER END
- */
-/*
- * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
- * Use is subject to license terms.
- */
-
-#ifndef _FASTTRAP_ISA_H
-#define _FASTTRAP_ISA_H
-
-#pragma ident "%Z%%M% %I% %E% SMI"
-
-#include <sys/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/*
- * This is our reserved trap instruction: ta 0x38
- */
-#define FASTTRAP_INSTR 0x91d02038
-
-#define FASTTRAP_SUNWDTRACE_SIZE 128
-
-typedef uint32_t fasttrap_instr_t;
-
-typedef struct fasttrap_machtp {
- fasttrap_instr_t ftmt_instr; /* original instruction */
- uintptr_t ftmt_dest; /* destination of DCTI */
- uint8_t ftmt_type; /* emulation type */
- uint8_t ftmt_flags; /* emulation flags */
- uint8_t ftmt_cc; /* which cc to look at */
- uint8_t ftmt_code; /* branch condition */
-} fasttrap_machtp_t;
-
-#define ftt_instr ftt_mtp.ftmt_instr
-#define ftt_dest ftt_mtp.ftmt_dest
-#define ftt_type ftt_mtp.ftmt_type
-#define ftt_flags ftt_mtp.ftmt_flags
-#define ftt_cc ftt_mtp.ftmt_cc
-#define ftt_code ftt_mtp.ftmt_code
-
-#define FASTTRAP_T_COMMON 0x00 /* common case -- no emulation */
-#define FASTTRAP_T_CCR 0x01 /* integer condition code branch */
-#define FASTTRAP_T_FCC 0x02 /* floating-point branch */
-#define FASTTRAP_T_REG 0x03 /* register predicated branch */
-#define FASTTRAP_T_ALWAYS 0x04 /* branch always */
-#define FASTTRAP_T_CALL 0x05 /* call instruction */
-#define FASTTRAP_T_JMPL 0x06 /* jmpl instruction */
-#define FASTTRAP_T_RDPC 0x07 /* rdpc instruction */
-#define FASTTRAP_T_RETURN 0x08 /* return instruction */
-
-/*
- * For performance rather than correctness.
- */
-#define FASTTRAP_T_SAVE 0x10 /* save instruction (func entry only) */
-#define FASTTRAP_T_RESTORE 0x11 /* restore instruction */
-#define FASTTRAP_T_OR 0x12 /* mov instruction */
-#define FASTTRAP_T_SETHI 0x13 /* sethi instruction (includes nop) */
-
-#define FASTTRAP_F_ANNUL 0x01 /* branch is annulled */
-#define FASTTRAP_F_RETMAYBE 0x02 /* not definitely a return site */
-
-#define FASTTRAP_AFRAMES 3
-#define FASTTRAP_RETURN_AFRAMES 4
-#define FASTTRAP_ENTRY_AFRAMES 3
-#define FASTTRAP_OFFSET_AFRAMES 3
-
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _FASTTRAP_ISA_H */
diff --git a/sys/cddl/dev/dtrace/dtrace_ioctl.c b/sys/cddl/dev/dtrace/dtrace_ioctl.c
index 666c0774592d..6e2b558ca88a 100644
--- a/sys/cddl/dev/dtrace/dtrace_ioctl.c
+++ b/sys/cddl/dev/dtrace/dtrace_ioctl.c
@@ -47,14 +47,14 @@ dtrace_ioctl_helper(struct cdev *dev, u_long cmd, caddr_t addr, int flags,
/* FALLTHROUGH */
case DTRACEHIOC_ADD:
p = curproc;
- if (p->p_pid == dhp->dofhp_pid) {
+ if (dhp == NULL || p->p_pid == dhp->dofhp_pid) {
dof = dtrace_dof_copyin((uintptr_t)addr, &rval);
} else {
p = pfind(dhp->dofhp_pid);
if (p == NULL)
return (EINVAL);
if (!P_SHOULDSTOP(p) ||
- (p->p_flag & P_TRACED|P_WEXIT) == 0 ||
+ (p->p_flag & (P_TRACED | P_WEXIT)) != P_TRACED ||
p->p_pptr != curproc) {
PROC_UNLOCK(p);
return (EINVAL);
diff --git a/sys/compat/freebsd32/freebsd32_proto.h b/sys/compat/freebsd32/freebsd32_proto.h
index bf9253dc3471..023dac837871 100644
--- a/sys/compat/freebsd32/freebsd32_proto.h
+++ b/sys/compat/freebsd32/freebsd32_proto.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb
*/
#ifndef _FREEBSD32_SYSPROTO_H_
@@ -285,25 +285,9 @@ struct freebsd32_aio_suspend_args {
char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
char timeout_l_[PADL_(const struct timespec32 *)]; const struct timespec32 * timeout; char timeout_r_[PADR_(const struct timespec32 *)];
};
-struct freebsd32_aio_cancel_args {
- char fd_l_[PADL_(int)]; int fd; char fd_r_[PADR_(int)];
- char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
-};
struct freebsd32_aio_error_args {
char aiocbp_l_[PADL_(struct aiocb32 *)]; struct aiocb32 * aiocbp; char aiocbp_r_[PADR_(struct aiocb32 *)];
};
-struct freebsd32_oaio_read_args {
- char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
-};
-struct freebsd32_oaio_write_args {
- char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
-};
-struct freebsd32_olio_listio_args {
- char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
- char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)];
- char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
- char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)];
-};
struct freebsd32_jail_args {
char jail_l_[PADL_(struct jail32 *)]; struct jail32 * jail; char jail_r_[PADR_(struct jail32 *)];
};
@@ -755,11 +739,7 @@ int freebsd32_modstat(struct thread *, struct freebsd32_modstat_args *);
int freebsd32_kldstat(struct thread *, struct freebsd32_kldstat_args *);
int freebsd32_aio_return(struct thread *, struct freebsd32_aio_return_args *);
int freebsd32_aio_suspend(struct thread *, struct freebsd32_aio_suspend_args *);
-int freebsd32_aio_cancel(struct thread *, struct freebsd32_aio_cancel_args *);
int freebsd32_aio_error(struct thread *, struct freebsd32_aio_error_args *);
-int freebsd32_oaio_read(struct thread *, struct freebsd32_oaio_read_args *);
-int freebsd32_oaio_write(struct thread *, struct freebsd32_oaio_write_args *);
-int freebsd32_olio_listio(struct thread *, struct freebsd32_olio_listio_args *);
int freebsd32_jail(struct thread *, struct freebsd32_jail_args *);
int freebsd32_sigtimedwait(struct thread *, struct freebsd32_sigtimedwait_args *);
int freebsd32_sigwaitinfo(struct thread *, struct freebsd32_sigwaitinfo_args *);
@@ -1043,6 +1023,18 @@ struct freebsd6_freebsd32_ftruncate_args {
char length1_l_[PADL_(uint32_t)]; uint32_t length1; char length1_r_[PADR_(uint32_t)];
char length2_l_[PADL_(uint32_t)]; uint32_t length2; char length2_r_[PADR_(uint32_t)];
};
+struct freebsd6_freebsd32_aio_read_args {
+ char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
+};
+struct freebsd6_freebsd32_aio_write_args {
+ char aiocbp_l_[PADL_(struct oaiocb32 *)]; struct oaiocb32 * aiocbp; char aiocbp_r_[PADR_(struct oaiocb32 *)];
+};
+struct freebsd6_freebsd32_lio_listio_args {
+ char mode_l_[PADL_(int)]; int mode; char mode_r_[PADR_(int)];
+ char acb_list_l_[PADL_(struct oaiocb32 *const *)]; struct oaiocb32 *const * acb_list; char acb_list_r_[PADR_(struct oaiocb32 *const *)];
+ char nent_l_[PADL_(int)]; int nent; char nent_r_[PADR_(int)];
+ char sig_l_[PADL_(struct osigevent32 *)]; struct osigevent32 * sig; char sig_r_[PADR_(struct osigevent32 *)];
+};
#ifdef PAD64_REQUIRED
#else
#endif
@@ -1061,6 +1053,9 @@ int freebsd6_freebsd32_mmap(struct thread *, struct freebsd6_freebsd32_mmap_args
int freebsd6_freebsd32_lseek(struct thread *, struct freebsd6_freebsd32_lseek_args *);
int freebsd6_freebsd32_truncate(struct thread *, struct freebsd6_freebsd32_truncate_args *);
int freebsd6_freebsd32_ftruncate(struct thread *, struct freebsd6_freebsd32_ftruncate_args *);
+int freebsd6_freebsd32_aio_read(struct thread *, struct freebsd6_freebsd32_aio_read_args *);
+int freebsd6_freebsd32_aio_write(struct thread *, struct freebsd6_freebsd32_aio_write_args *);
+int freebsd6_freebsd32_lio_listio(struct thread *, struct freebsd6_freebsd32_lio_listio_args *);
#endif /* COMPAT_FREEBSD6 */
@@ -1181,11 +1176,10 @@ int freebsd7_freebsd32_shmctl(struct thread *, struct freebsd7_freebsd32_shmctl_
#define FREEBSD32_SYS_AUE_freebsd32_kldstat AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_aio_return AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_aio_suspend AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_aio_cancel AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd32_aio_error AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_oaio_read AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_oaio_write AUE_NULL
-#define FREEBSD32_SYS_AUE_freebsd32_olio_listio AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_aio_read AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_aio_write AUE_NULL
+#define FREEBSD32_SYS_AUE_freebsd6_freebsd32_lio_listio AUE_NULL
#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sendfile AUE_SENDFILE
#define FREEBSD32_SYS_AUE_freebsd32_jail AUE_JAIL
#define FREEBSD32_SYS_AUE_freebsd4_freebsd32_sigaction AUE_SIGACTION
diff --git a/sys/compat/freebsd32/freebsd32_syscall.h b/sys/compat/freebsd32/freebsd32_syscall.h
index 91bf4b7b4503..54851d35b8e3 100644
--- a/sys/compat/freebsd32/freebsd32_syscall.h
+++ b/sys/compat/freebsd32/freebsd32_syscall.h
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb
*/
#define FREEBSD32_SYS_syscall 0
@@ -253,11 +253,11 @@
/* 313 is obsolete signanosleep */
#define FREEBSD32_SYS_freebsd32_aio_return 314
#define FREEBSD32_SYS_freebsd32_aio_suspend 315
-#define FREEBSD32_SYS_freebsd32_aio_cancel 316
+#define FREEBSD32_SYS_aio_cancel 316
#define FREEBSD32_SYS_freebsd32_aio_error 317
-#define FREEBSD32_SYS_freebsd32_oaio_read 318
-#define FREEBSD32_SYS_freebsd32_oaio_write 319
-#define FREEBSD32_SYS_freebsd32_olio_listio 320
+#define FREEBSD32_SYS_freebsd6_freebsd32_aio_read 318
+#define FREEBSD32_SYS_freebsd6_freebsd32_aio_write 319
+#define FREEBSD32_SYS_freebsd6_freebsd32_lio_listio 320
#define FREEBSD32_SYS_yield 321
/* 322 is obsolete thr_sleep */
/* 323 is obsolete thr_wakeup */
diff --git a/sys/compat/freebsd32/freebsd32_syscalls.c b/sys/compat/freebsd32/freebsd32_syscalls.c
index 5b5b52f144f4..2d56d496d3d2 100644
--- a/sys/compat/freebsd32/freebsd32_syscalls.c
+++ b/sys/compat/freebsd32/freebsd32_syscalls.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb
*/
const char *freebsd32_syscallnames[] = {
@@ -326,11 +326,11 @@ const char *freebsd32_syscallnames[] = {
"obs_signanosleep", /* 313 = obsolete signanosleep */
"freebsd32_aio_return", /* 314 = freebsd32_aio_return */
"freebsd32_aio_suspend", /* 315 = freebsd32_aio_suspend */
- "freebsd32_aio_cancel", /* 316 = freebsd32_aio_cancel */
+ "aio_cancel", /* 316 = aio_cancel */
"freebsd32_aio_error", /* 317 = freebsd32_aio_error */
- "freebsd32_oaio_read", /* 318 = freebsd32_oaio_read */
- "freebsd32_oaio_write", /* 319 = freebsd32_oaio_write */
- "freebsd32_olio_listio", /* 320 = freebsd32_olio_listio */
+ "compat6.freebsd32_aio_read", /* 318 = freebsd6 freebsd32_aio_read */
+ "compat6.freebsd32_aio_write", /* 319 = freebsd6 freebsd32_aio_write */
+ "compat6.freebsd32_lio_listio", /* 320 = freebsd6 freebsd32_lio_listio */
"yield", /* 321 = yield */
"obs_thr_sleep", /* 322 = obsolete thr_sleep */
"obs_thr_wakeup", /* 323 = obsolete thr_wakeup */
diff --git a/sys/compat/freebsd32/freebsd32_sysent.c b/sys/compat/freebsd32/freebsd32_sysent.c
index 14d357cd2f3a..51ba0501d101 100644
--- a/sys/compat/freebsd32/freebsd32_sysent.c
+++ b/sys/compat/freebsd32/freebsd32_sysent.c
@@ -3,7 +3,7 @@
*
* DO NOT EDIT-- this file is automatically generated.
* $FreeBSD$
- * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 277610 2015-01-23 21:07:08Z jilles
+ * created from FreeBSD: head/sys/compat/freebsd32/syscalls.master 296572 2016-03-09 19:05:11Z jhb
*/
#include "opt_compat.h"
@@ -302,9 +302,9 @@ struct sysent freebsd32_sysent[] = {
{ AS(openbsd_poll_args), (sy_call_t *)sys_openbsd_poll, AUE_POLL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 252 = openbsd_poll */
{ 0, (sy_call_t *)sys_issetugid, AUE_ISSETUGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 253 = issetugid */
{ AS(lchown_args), (sy_call_t *)sys_lchown, AUE_LCHOWN, NULL, 0, 0, 0, SY_THR_STATIC }, /* 254 = lchown */
- { AS(freebsd32_aio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 255 = freebsd32_aio_read */
- { AS(freebsd32_aio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 256 = freebsd32_aio_write */
- { AS(freebsd32_lio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 257 = freebsd32_lio_listio */
+ { AS(freebsd32_aio_read_args), (sy_call_t *)freebsd32_aio_read, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 255 = freebsd32_aio_read */
+ { AS(freebsd32_aio_write_args), (sy_call_t *)freebsd32_aio_write, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 256 = freebsd32_aio_write */
+ { AS(freebsd32_lio_listio_args), (sy_call_t *)freebsd32_lio_listio, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 257 = freebsd32_lio_listio */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 258 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 259 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 260 = nosys */
@@ -361,13 +361,13 @@ struct sysent freebsd32_sysent[] = {
{ AS(setresuid_args), (sy_call_t *)sys_setresuid, AUE_SETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 311 = setresuid */
{ AS(setresgid_args), (sy_call_t *)sys_setresgid, AUE_SETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 312 = setresgid */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 313 = obsolete signanosleep */
- { AS(freebsd32_aio_return_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 314 = freebsd32_aio_return */
- { AS(freebsd32_aio_suspend_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 315 = freebsd32_aio_suspend */
- { AS(freebsd32_aio_cancel_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 316 = freebsd32_aio_cancel */
- { AS(freebsd32_aio_error_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 317 = freebsd32_aio_error */
- { AS(freebsd32_oaio_read_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 318 = freebsd32_oaio_read */
- { AS(freebsd32_oaio_write_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 319 = freebsd32_oaio_write */
- { AS(freebsd32_olio_listio_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 320 = freebsd32_olio_listio */
+ { AS(freebsd32_aio_return_args), (sy_call_t *)freebsd32_aio_return, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 314 = freebsd32_aio_return */
+ { AS(freebsd32_aio_suspend_args), (sy_call_t *)freebsd32_aio_suspend, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 315 = freebsd32_aio_suspend */
+ { AS(aio_cancel_args), (sy_call_t *)sys_aio_cancel, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 316 = aio_cancel */
+ { AS(freebsd32_aio_error_args), (sy_call_t *)freebsd32_aio_error, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 317 = freebsd32_aio_error */
+ { compat6(AS(freebsd6_freebsd32_aio_read_args),freebsd32_aio_read), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 318 = freebsd6 freebsd32_aio_read */
+ { compat6(AS(freebsd6_freebsd32_aio_write_args),freebsd32_aio_write), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 319 = freebsd6 freebsd32_aio_write */
+ { compat6(AS(freebsd6_freebsd32_lio_listio_args),freebsd32_lio_listio), AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 320 = freebsd6 freebsd32_lio_listio */
{ 0, (sy_call_t *)sys_yield, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 321 = yield */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 322 = obsolete thr_sleep */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 323 = obsolete thr_wakeup */
@@ -406,7 +406,7 @@ struct sysent freebsd32_sysent[] = {
{ AS(extattr_set_file_args), (sy_call_t *)sys_extattr_set_file, AUE_EXTATTR_SET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 356 = extattr_set_file */
{ AS(extattr_get_file_args), (sy_call_t *)sys_extattr_get_file, AUE_EXTATTR_GET_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 357 = extattr_get_file */
{ AS(extattr_delete_file_args), (sy_call_t *)sys_extattr_delete_file, AUE_EXTATTR_DELETE_FILE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 358 = extattr_delete_file */
- { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 359 = freebsd32_aio_waitcomplete */
+ { AS(freebsd32_aio_waitcomplete_args), (sy_call_t *)freebsd32_aio_waitcomplete, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 359 = freebsd32_aio_waitcomplete */
{ AS(getresuid_args), (sy_call_t *)sys_getresuid, AUE_GETRESUID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 360 = getresuid */
{ AS(getresgid_args), (sy_call_t *)sys_getresgid, AUE_GETRESGID, NULL, 0, 0, 0, SY_THR_STATIC }, /* 361 = getresgid */
{ 0, (sy_call_t *)sys_kqueue, AUE_KQUEUE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 362 = kqueue */
@@ -512,7 +512,7 @@ struct sysent freebsd32_sysent[] = {
{ AS(kmq_unlink_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 462 = kmq_unlink */
{ AS(abort2_args), (sy_call_t *)sys_abort2, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 463 = abort2 */
{ AS(thr_set_name_args), (sy_call_t *)sys_thr_set_name, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 464 = thr_set_name */
- { AS(freebsd32_aio_fsync_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 465 = freebsd32_aio_fsync */
+ { AS(freebsd32_aio_fsync_args), (sy_call_t *)freebsd32_aio_fsync, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 465 = freebsd32_aio_fsync */
{ AS(rtprio_thread_args), (sy_call_t *)sys_rtprio_thread, AUE_RTPRIO, NULL, 0, 0, 0, SY_THR_STATIC }, /* 466 = rtprio_thread */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 467 = nosys */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 468 = nosys */
@@ -609,7 +609,7 @@ struct sysent freebsd32_sysent[] = {
{ AS(chflagsat_args), (sy_call_t *)sys_chflagsat, AUE_CHFLAGSAT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 540 = chflagsat */
{ AS(accept4_args), (sy_call_t *)sys_accept4, AUE_ACCEPT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 541 = accept4 */
{ AS(pipe2_args), (sy_call_t *)sys_pipe2, AUE_PIPE, NULL, 0, 0, 0, SY_THR_STATIC }, /* 542 = pipe2 */
- { AS(freebsd32_aio_mlock_args), (sy_call_t *)lkmressys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 543 = freebsd32_aio_mlock */
+ { AS(freebsd32_aio_mlock_args), (sy_call_t *)freebsd32_aio_mlock, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 543 = freebsd32_aio_mlock */
#ifdef PAD64_REQUIRED
{ AS(freebsd32_procctl_args), (sy_call_t *)freebsd32_procctl, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 544 = freebsd32_procctl */
#else
diff --git a/sys/compat/freebsd32/freebsd32_systrace_args.c b/sys/compat/freebsd32/freebsd32_systrace_args.c
index 26e7a6d017a4..765f5d521334 100644
--- a/sys/compat/freebsd32/freebsd32_systrace_args.c
+++ b/sys/compat/freebsd32/freebsd32_systrace_args.c
@@ -1556,11 +1556,11 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 3;
break;
}
- /* freebsd32_aio_cancel */
+ /* aio_cancel */
case 316: {
- struct freebsd32_aio_cancel_args *p = params;
+ struct aio_cancel_args *p = params;
iarg[0] = p->fd; /* int */
- uarg[1] = (intptr_t) p->aiocbp; /* struct aiocb32 * */
+ uarg[1] = (intptr_t) p->aiocbp; /* struct aiocb * */
*n_args = 2;
break;
}
@@ -1571,30 +1571,6 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args)
*n_args = 1;
break;
}
- /* freebsd32_oaio_read */
- case 318: {
- struct freebsd32_oaio_read_args *p = params;
- uarg[0] = (intptr_t) p->aiocbp; /* struct oaiocb32 * */
- *n_args = 1;
- break;
- }
- /* freebsd32_oaio_write */
- case 319: {
- struct freebsd32_oaio_write_args *p = params;
- uarg[0] = (intptr_t) p->aiocbp; /* struct oaiocb32 * */
- *n_args = 1;
- break;
- }
- /* freebsd32_olio_listio */
- case 320: {
- struct freebsd32_olio_listio_args *p = params;
- iarg[0] = p->mode; /* int */
- uarg[1] = (intptr_t) p->acb_list; /* struct oaiocb32 *const * */
- iarg[2] = p->nent; /* int */
- uarg[3] = (intptr_t) p->sig; /* struct osigevent32 * */
- *n_args = 4;
- break;
- }
/* yield */
case 321: {
*n_args = 0;
@@ -5813,14 +5789,14 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* freebsd32_aio_cancel */
+ /* aio_cancel */
case 316:
switch(ndx) {
case 0:
p = "int";
break;
case 1:
- p = "struct aiocb32 *";
+ p = "struct aiocb *";
break;
default:
break;
@@ -5836,45 +5812,6 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
break;
};
break;
- /* freebsd32_oaio_read */
- case 318:
- switch(ndx) {
- case 0:
- p = "struct oaiocb32 *";
- break;
- default:
- break;
- };
- break;
- /* freebsd32_oaio_write */
- case 319:
- switch(ndx) {
- case 0:
- p = "struct oaiocb32 *";
- break;
- default:
- break;
- };
- break;
- /* freebsd32_olio_listio */
- case 320:
- switch(ndx) {
- case 0:
- p = "int";
- break;
- case 1:
- p = "struct oaiocb32 *const *";
- break;
- case 2:
- p = "int";
- break;
- case 3:
- p = "struct osigevent32 *";
- break;
- default:
- break;
- };
- break;
/* yield */
case 321:
break;
@@ -9884,7 +9821,7 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* freebsd32_aio_cancel */
+ /* aio_cancel */
case 316:
if (ndx == 0 || ndx == 1)
p = "int";
@@ -9894,21 +9831,6 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz)
if (ndx == 0 || ndx == 1)
p = "int";
break;
- /* freebsd32_oaio_read */
- case 318:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* freebsd32_oaio_write */
- case 319:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
- /* freebsd32_olio_listio */
- case 320:
- if (ndx == 0 || ndx == 1)
- p = "int";
- break;
/* yield */
case 321:
/* mlockall */
diff --git a/sys/compat/freebsd32/syscalls.master b/sys/compat/freebsd32/syscalls.master
index 23c28263c575..2303591fa41f 100644
--- a/sys/compat/freebsd32/syscalls.master
+++ b/sys/compat/freebsd32/syscalls.master
@@ -477,11 +477,11 @@
u_int nfds, int timeout); }
253 AUE_ISSETUGID NOPROTO { int issetugid(void); }
254 AUE_LCHOWN NOPROTO { int lchown(char *path, int uid, int gid); }
-255 AUE_NULL NOSTD { int freebsd32_aio_read( \
+255 AUE_NULL STD { int freebsd32_aio_read( \
struct aiocb32 *aiocbp); }
-256 AUE_NULL NOSTD { int freebsd32_aio_write( \
+256 AUE_NULL STD { int freebsd32_aio_write( \
struct aiocb32 *aiocbp); }
-257 AUE_NULL NOSTD { int freebsd32_lio_listio(int mode, \
+257 AUE_NULL STD { int freebsd32_lio_listio(int mode, \
struct aiocb32 * const *acb_list, \
int nent, struct sigevent32 *sig); }
258 AUE_NULL UNIMPL nosys
@@ -562,20 +562,20 @@
312 AUE_SETRESGID NOPROTO { int setresgid(gid_t rgid, gid_t egid, \
gid_t sgid); }
313 AUE_NULL OBSOL signanosleep
-314 AUE_NULL NOSTD { int freebsd32_aio_return( \
+314 AUE_NULL STD { int freebsd32_aio_return( \
struct aiocb32 *aiocbp); }
-315 AUE_NULL NOSTD { int freebsd32_aio_suspend( \
+315 AUE_NULL STD { int freebsd32_aio_suspend( \
struct aiocb32 * const * aiocbp, int nent, \
const struct timespec32 *timeout); }
-316 AUE_NULL NOSTD { int freebsd32_aio_cancel(int fd, \
+316 AUE_NULL NOPROTO { int aio_cancel(int fd, \
+ struct aiocb *aiocbp); }
+317 AUE_NULL STD { int freebsd32_aio_error( \
struct aiocb32 *aiocbp); }
-317 AUE_NULL NOSTD { int freebsd32_aio_error( \
- struct aiocb32 *aiocbp); }
-318 AUE_NULL NOSTD { int freebsd32_oaio_read( \
+318 AUE_NULL COMPAT6 { int freebsd32_aio_read( \
struct oaiocb32 *aiocbp); }
-319 AUE_NULL NOSTD { int freebsd32_oaio_write( \
+319 AUE_NULL COMPAT6 { int freebsd32_aio_write( \
struct oaiocb32 *aiocbp); }
-320 AUE_NULL NOSTD { int freebsd32_olio_listio(int mode, \
+320 AUE_NULL COMPAT6 { int freebsd32_lio_listio(int mode, \
struct oaiocb32 * const *acb_list, \
int nent, struct osigevent32 *sig); }
321 AUE_NULL NOPROTO { int yield(void); }
@@ -653,7 +653,7 @@
358 AUE_EXTATTR_DELETE_FILE NOPROTO { int extattr_delete_file( \
const char *path, int attrnamespace, \
const char *attrname); }
-359 AUE_NULL NOSTD { int freebsd32_aio_waitcomplete( \
+359 AUE_NULL STD { int freebsd32_aio_waitcomplete( \
struct aiocb32 **aiocbp, \
struct timespec32 *timeout); }
360 AUE_GETRESUID NOPROTO { int getresuid(uid_t *ruid, uid_t *euid, \
@@ -837,7 +837,7 @@
462 AUE_NULL NOPROTO|NOSTD { int kmq_unlink(const char *path); }
463 AUE_NULL NOPROTO { int abort2(const char *why, int nargs, void **args); }
464 AUE_NULL NOPROTO { int thr_set_name(long id, const char *name); }
-465 AUE_NULL NOSTD { int freebsd32_aio_fsync(int op, \
+465 AUE_NULL STD { int freebsd32_aio_fsync(int op, \
struct aiocb32 *aiocbp); }
466 AUE_RTPRIO NOPROTO { int rtprio_thread(int function, \
lwpid_t lwpid, struct rtprio *rtp); }
@@ -1055,7 +1055,7 @@
__socklen_t * __restrict anamelen, \
int flags); }
542 AUE_PIPE NOPROTO { int pipe2(int *fildes, int flags); }
-543 AUE_NULL NOSTD { int freebsd32_aio_mlock( \
+543 AUE_NULL STD { int freebsd32_aio_mlock( \
struct aiocb32 *aiocbp); }
#ifdef PAD64_REQUIRED
544 AUE_NULL STD { int freebsd32_procctl(int idtype, int pad, \
diff --git a/sys/compat/linux/linux_fork.c b/sys/compat/linux/linux_fork.c
index c12f198fe79b..94d9df5d8020 100644
--- a/sys/compat/linux/linux_fork.c
+++ b/sys/compat/linux/linux_fork.c
@@ -222,6 +222,18 @@ linux_clone_proc(struct thread *td, struct linux_clone_args *args)
if (args->flags & LINUX_CLONE_SETTLS)
linux_set_cloned_tls(td2, args->tls);
+ /*
+ * If CLONE_PARENT is set, then the parent of the new process will be
+ * the same as that of the calling process.
+ */
+ if (args->flags & LINUX_CLONE_PARENT) {
+ sx_xlock(&proctree_lock);
+ PROC_LOCK(p2);
+ proc_reparent(p2, td->td_proc->p_pptr);
+ PROC_UNLOCK(p2);
+ sx_xunlock(&proctree_lock);
+ }
+
#ifdef DEBUG
if (ldebug(clone))
printf(LMSG("clone: successful rfork to %d, "
diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c
index fe4dbf642427..7e9a0d573943 100644
--- a/sys/compat/linux/linux_misc.c
+++ b/sys/compat/linux/linux_misc.c
@@ -191,7 +191,6 @@ linux_alarm(struct thread *td, struct linux_alarm_args *args)
{
struct itimerval it, old_it;
u_int secs;
- int error;
#ifdef DEBUG
if (ldebug(alarm))
@@ -207,9 +206,12 @@ linux_alarm(struct thread *td, struct linux_alarm_args *args)
it.it_value.tv_usec = 0;
it.it_interval.tv_sec = 0;
it.it_interval.tv_usec = 0;
- error = kern_setitimer(td, ITIMER_REAL, &it, &old_it);
- if (error)
- return (error);
+ /*
+ * According to POSIX and Linux implementation
+ * the alarm() system call is always successfull.
+ * Ignore errors and return 0 as a Linux does.
+ */
+ kern_setitimer(td, ITIMER_REAL, &it, &old_it);
if (timevalisset(&old_it.it_value)) {
if (old_it.it_value.tv_usec != 0)
old_it.it_value.tv_sec++;
diff --git a/sys/compat/linux/linux_socket.c b/sys/compat/linux/linux_socket.c
index a3f3d0e58a5e..01b007c8464f 100644
--- a/sys/compat/linux/linux_socket.c
+++ b/sys/compat/linux/linux_socket.c
@@ -289,6 +289,63 @@ linux_to_bsd_ip_sockopt(int opt)
}
static int
+linux_to_bsd_ip6_sockopt(int opt)
+{
+
+ switch (opt) {
+ case LINUX_IPV6_NEXTHOP:
+ return (IPV6_NEXTHOP);
+ case LINUX_IPV6_UNICAST_HOPS:
+ return (IPV6_UNICAST_HOPS);
+ case LINUX_IPV6_MULTICAST_IF:
+ return (IPV6_MULTICAST_IF);
+ case LINUX_IPV6_MULTICAST_HOPS:
+ return (IPV6_MULTICAST_HOPS);
+ case LINUX_IPV6_MULTICAST_LOOP:
+ return (IPV6_MULTICAST_LOOP);
+ case LINUX_IPV6_ADD_MEMBERSHIP:
+ return (IPV6_JOIN_GROUP);
+ case LINUX_IPV6_DROP_MEMBERSHIP:
+ return (IPV6_LEAVE_GROUP);
+ case LINUX_IPV6_V6ONLY:
+ return (IPV6_V6ONLY);
+ case LINUX_IPV6_DONTFRAG:
+ return (IPV6_DONTFRAG);
+#if 0
+ case LINUX_IPV6_CHECKSUM:
+ return (IPV6_CHECKSUM);
+ case LINUX_IPV6_RECVPKTINFO:
+ return (IPV6_RECVPKTINFO);
+ case LINUX_IPV6_PKTINFO:
+ return (IPV6_PKTINFO);
+ case LINUX_IPV6_RECVHOPLIMIT:
+ return (IPV6_RECVHOPLIMIT);
+ case LINUX_IPV6_HOPLIMIT:
+ return (IPV6_HOPLIMIT);
+ case LINUX_IPV6_RECVHOPOPTS:
+ return (IPV6_RECVHOPOPTS);
+ case LINUX_IPV6_HOPOPTS:
+ return (IPV6_HOPOPTS);
+ case LINUX_IPV6_RTHDRDSTOPTS:
+ return (IPV6_RTHDRDSTOPTS);
+ case LINUX_IPV6_RECVRTHDR:
+ return (IPV6_RECVRTHDR);
+ case LINUX_IPV6_RTHDR:
+ return (IPV6_RTHDR);
+ case LINUX_IPV6_RECVDSTOPTS:
+ return (IPV6_RECVDSTOPTS);
+ case LINUX_IPV6_DSTOPTS:
+ return (IPV6_DSTOPTS);
+ case LINUX_IPV6_RECVPATHMTU:
+ return (IPV6_RECVPATHMTU);
+ case LINUX_IPV6_PATHMTU:
+ return (IPV6_PATHMTU);
+#endif
+ }
+ return (-1);
+}
+
+static int
linux_to_bsd_so_sockopt(int opt)
{
@@ -781,7 +838,10 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
socklen_t * __restrict anamelen;
int flags;
} */ bsd_args;
- int error;
+ cap_rights_t rights;
+ struct socket *so;
+ struct file *fp;
+ int error, error1;
bsd_args.s = s;
/* XXX: */
@@ -796,6 +856,17 @@ linux_accept_common(struct thread *td, int s, l_uintptr_t addr,
if (error) {
if (error == EFAULT && namelen != sizeof(struct sockaddr_in))
return (EINVAL);
+ if (error == EINVAL) {
+ error1 = getsock_cap(td, s, &rights, &fp, NULL);
+ if (error1 != 0)
+ return (error1);
+ so = fp->f_data;
+ if (so->so_type == SOCK_DGRAM) {
+ fdrop(fp, td);
+ return (EOPNOTSUPP);
+ }
+ fdrop(fp, td);
+ }
return (error);
}
if (addr)
@@ -1515,6 +1586,9 @@ linux_setsockopt(struct thread *td, struct linux_setsockopt_args *args)
case IPPROTO_IP:
name = linux_to_bsd_ip_sockopt(args->optname);
break;
+ case IPPROTO_IPV6:
+ name = linux_to_bsd_ip6_sockopt(args->optname);
+ break;
case IPPROTO_TCP:
name = linux_to_bsd_tcp_sockopt(args->optname);
break;
@@ -1601,6 +1675,9 @@ linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args)
case IPPROTO_IP:
name = linux_to_bsd_ip_sockopt(args->optname);
break;
+ case IPPROTO_IPV6:
+ name = linux_to_bsd_ip6_sockopt(args->optname);
+ break;
case IPPROTO_TCP:
name = linux_to_bsd_tcp_sockopt(args->optname);
break;
diff --git a/sys/compat/linux/linux_socket.h b/sys/compat/linux/linux_socket.h
index b32a9694dff2..25c0ec3d686a 100644
--- a/sys/compat/linux/linux_socket.h
+++ b/sys/compat/linux/linux_socket.h
@@ -302,6 +302,31 @@ int linux_getsockopt(struct thread *td, struct linux_getsockopt_args *args);
#define LINUX_IP_ADD_MEMBERSHIP 35
#define LINUX_IP_DROP_MEMBERSHIP 36
+#define LINUX_IPV6_CHECKSUM 7
+#define LINUX_IPV6_NEXTHOP 9
+#define LINUX_IPV6_UNICAST_HOPS 16
+#define LINUX_IPV6_MULTICAST_IF 17
+#define LINUX_IPV6_MULTICAST_HOPS 18
+#define LINUX_IPV6_MULTICAST_LOOP 19
+#define LINUX_IPV6_ADD_MEMBERSHIP 20
+#define LINUX_IPV6_DROP_MEMBERSHIP 21
+#define LINUX_IPV6_V6ONLY 26
+
+#define LINUX_IPV6_RECVPKTINFO 49
+#define LINUX_IPV6_PKTINFO 50
+#define LINUX_IPV6_RECVHOPLIMIT 51
+#define LINUX_IPV6_HOPLIMIT 52
+#define LINUX_IPV6_RECVHOPOPTS 53
+#define LINUX_IPV6_HOPOPTS 54
+#define LINUX_IPV6_RTHDRDSTOPTS 55
+#define LINUX_IPV6_RECVRTHDR 56
+#define LINUX_IPV6_RTHDR 57
+#define LINUX_IPV6_RECVDSTOPTS 58
+#define LINUX_IPV6_DSTOPTS 59
+#define LINUX_IPV6_RECVPATHMTU 60
+#define LINUX_IPV6_PATHMTU 61
+#define LINUX_IPV6_DONTFRAG 62
+
#define LINUX_TCP_NODELAY 1
#define LINUX_TCP_MAXSEG 2
#define LINUX_TCP_KEEPIDLE 4
diff --git a/sys/conf/Makefile.riscv b/sys/conf/Makefile.riscv
index 27338b470413..8721b53893c1 100644
--- a/sys/conf/Makefile.riscv
+++ b/sys/conf/Makefile.riscv
@@ -29,7 +29,7 @@ S= ../../..
INCLUDES+= -I$S/contrib/libfdt
.if !empty(DDB_ENABLED)
-CFLAGS += -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer
+CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
.endif
%BEFORE_DEPEND
diff --git a/sys/conf/files.riscv b/sys/conf/files.riscv
index cfce99bea3ae..7b1a04056bd2 100644
--- a/sys/conf/files.riscv
+++ b/sys/conf/files.riscv
@@ -23,6 +23,9 @@ riscv/riscv/clock.c standard
riscv/riscv/copyinout.S standard
riscv/riscv/copystr.c standard
riscv/riscv/cpufunc_asm.S standard
+riscv/riscv/db_disasm.c optional ddb
+riscv/riscv/db_interface.c optional ddb
+riscv/riscv/db_trace.c optional ddb
riscv/riscv/devmap.c standard
riscv/riscv/dump_machdep.c standard
riscv/riscv/elf_machdep.c standard
@@ -44,4 +47,5 @@ riscv/riscv/trap.c standard
riscv/riscv/timer.c standard
riscv/riscv/uio_machdep.c standard
riscv/riscv/uma_machdep.c standard
+riscv/riscv/unwind.c optional ddb | kdtrace_hooks | stack
riscv/riscv/vm_machdep.c standard
diff --git a/sys/conf/options.mips b/sys/conf/options.mips
index e85f5b1327e2..69708ccafea0 100644
--- a/sys/conf/options.mips
+++ b/sys/conf/options.mips
@@ -140,3 +140,8 @@ RT305X_USE_UART opt_rt305x.h
# Options that affect the pmap.
#
PV_STATS opt_pmap.h
+
+#
+# Options to use INTRNG code
+#
+MIPS_INTRNG opt_global.h
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index 0db332bbec92..c9ebcc5f327b 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -250,6 +250,10 @@ struct agp_i810_driver {
void (*chipset_flush)(device_t);
};
+static struct {
+ struct intel_gtt base;
+} intel_private;
+
static const struct agp_i810_driver agp_i810_i810_driver = {
.chiptype = CHIP_I810,
.gen = 1,
@@ -526,6 +530,29 @@ static const struct agp_i810_driver agp_i810_hsw_driver = {
.chipset_flush = agp_i810_chipset_flush,
};
+static const struct agp_i810_driver agp_i810_valleyview_driver = {
+ .chiptype = CHIP_SB,
+ .gen = 7,
+ .busdma_addr_mask_sz = 40,
+ .res_spec = agp_g4x_res_spec,
+ .check_active = agp_sb_check_active,
+ .set_desc = agp_i810_set_desc,
+ .dump_regs = agp_sb_dump_regs,
+ .get_stolen_size = agp_sb_get_stolen_size,
+ .get_gtt_mappable_entries = agp_i915_get_gtt_mappable_entries,
+ .get_gtt_total_entries = agp_sb_get_gtt_total_entries,
+ .install_gatt = agp_g4x_install_gatt,
+ .deinstall_gatt = agp_i830_deinstall_gatt,
+ .write_gtt = agp_sb_write_gtt,
+ .install_gtt_pte = agp_sb_install_gtt_pte,
+ .read_gtt_pte = agp_g4x_read_gtt_pte,
+ .read_gtt_pte_paddr = agp_sb_read_gtt_pte_paddr,
+ .set_aperture = agp_i915_set_aperture,
+ .chipset_flush_setup = agp_i810_chipset_flush_setup,
+ .chipset_flush_teardown = agp_i810_chipset_flush_teardown,
+ .chipset_flush = agp_i810_chipset_flush,
+};
+
/* For adding new devices, devid is the id of the graphics controller
* (pci:0:2:0, for example). The placeholder (usually at pci:0:2:1) for the
* second head should never be added. The bridge_offset is the offset to
@@ -763,40 +790,200 @@ static const struct agp_i810_match {
},
{
.devid = 0x04028086,
- .name = "Haswell desktop GT1",
+ .name = "Haswell GT1 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x04068086,
+ .name = "Haswell GT1 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x040A8086,
+ .name = "Haswell GT1 server",
.driver = &agp_i810_hsw_driver
},
{
.devid = 0x04128086,
- .name = "Haswell desktop GT2",
+ .name = "Haswell GT2 desktop",
.driver = &agp_i810_hsw_driver
},
{
- .devid = 0x040a8086,
- .name = "Haswell server GT1",
+ .devid = 0x04168086,
+ .name = "Haswell GT2 mobile",
.driver = &agp_i810_hsw_driver
},
{
- .devid = 0x041a8086,
- .name = "Haswell server GT2",
+ .devid = 0x041A8086,
+ .name = "Haswell GT2 server",
.driver = &agp_i810_hsw_driver
},
{
- .devid = 0x04068086,
- .name = "Haswell mobile GT1",
+ .devid = 0x04228086,
+ .name = "Haswell GT2 desktop",
.driver = &agp_i810_hsw_driver
},
{
- .devid = 0x04168086,
- .name = "Haswell mobile GT2",
+ .devid = 0x04268086,
+ .name = "Haswell GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x042A8086,
+ .name = "Haswell GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A028086,
+ .name = "Haswell ULT GT1 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A068086,
+ .name = "Haswell ULT GT1 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A0A8086,
+ .name = "Haswell ULT GT1 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A128086,
+ .name = "Haswell ULT GT2 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A168086,
+ .name = "Haswell ULT GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A1A8086,
+ .name = "Haswell ULT GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A228086,
+ .name = "Haswell ULT GT2 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A268086,
+ .name = "Haswell ULT GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0A2A8086,
+ .name = "Haswell ULT GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C028086,
+ .name = "Haswell SDV GT1 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C068086,
+ .name = "Haswell SDV GT1 mobile",
.driver = &agp_i810_hsw_driver
},
{
- .devid = 0x0c168086,
- .name = "Haswell SDV",
+ .devid = 0x0C0A8086,
+ .name = "Haswell SDV GT1 server",
.driver = &agp_i810_hsw_driver
},
{
+ .devid = 0x0C128086,
+ .name = "Haswell SDV GT2 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C168086,
+ .name = "Haswell SDV GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C1A8086,
+ .name = "Haswell SDV GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C228086,
+ .name = "Haswell SDV GT2 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C268086,
+ .name = "Haswell SDV GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0C2A8086,
+ .name = "Haswell SDV GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D028086,
+ .name = "Haswell CRW GT1 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D068086,
+ .name = "Haswell CRW GT1 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D0A8086,
+ .name = "Haswell CRW GT1 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D128086,
+ .name = "Haswell CRW GT2 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D168086,
+ .name = "Haswell CRW GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D1A8086,
+ .name = "Haswell CRW GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D228086,
+ .name = "Haswell CRW GT2 desktop",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D268086,
+ .name = "Haswell CRW GT2 mobile",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x0D2A8086,
+ .name = "Haswell CRW GT2 server",
+ .driver = &agp_i810_hsw_driver
+ },
+ {
+ .devid = 0x01558086,
+ .name = "Valleyview (desktop)",
+ .driver = &agp_i810_valleyview_driver
+ },
+ {
+ .devid = 0x01578086,
+ .name = "Valleyview (mobile)",
+ .driver = &agp_i810_valleyview_driver
+ },
+ {
+ .devid = 0x0F308086,
+ .name = "Valleyview (mobile)",
+ .driver = &agp_i810_valleyview_driver
+ },
+ {
.devid = 0,
}
};
@@ -2285,6 +2472,10 @@ agp_intel_gtt_get(device_t dev)
res.gtt_mappable_entries = sc->gtt_mappable_entries;
res.do_idle_maps = 0;
res.scratch_page_dma = VM_PAGE_TO_PHYS(bogus_page);
+ if (sc->agp.as_aperture != NULL)
+ res.gma_bus_addr = rman_get_start(sc->agp.as_aperture);
+ else
+ res.gma_bus_addr = 0;
return (res);
}
@@ -2588,11 +2779,12 @@ intel_gtt_insert_pages(u_int first_entry, u_int num_entries, vm_page_t *pages,
pages, flags);
}
-struct intel_gtt
+struct intel_gtt *
intel_gtt_get(void)
{
- return (agp_intel_gtt_get(intel_agp));
+ intel_private.base = agp_intel_gtt_get(intel_agp);
+ return (&intel_private.base);
}
int
diff --git a/sys/dev/agp/agp_i810.h b/sys/dev/agp/agp_i810.h
index 68cad87a1589..2cb71eb65027 100644
--- a/sys/dev/agp/agp_i810.h
+++ b/sys/dev/agp/agp_i810.h
@@ -33,6 +33,7 @@
#define AGP_AGP_I810_H
#include <sys/param.h>
+#include <sys/rman.h>
#include <sys/sglist.h>
#include <vm/vm.h>
@@ -51,24 +52,23 @@
struct intel_gtt {
/* Size of memory reserved for graphics by the BIOS */
- u_int stolen_size;
+ unsigned int stolen_size;
/* Total number of gtt entries. */
- u_int gtt_total_entries;
- /*
- * Part of the gtt that is mappable by the cpu, for those
- * chips where this is not the full gtt.
- */
- u_int gtt_mappable_entries;
-
- /*
- * Always false.
- */
- u_int do_idle_maps;
-
- /*
- * Share the scratch page dma with ppgtts.
- */
+ unsigned int gtt_total_entries;
+ /* Part of the gtt that is mappable by the cpu, for those chips where
+ * this is not the full gtt. */
+ unsigned int gtt_mappable_entries;
+ /* Whether i915 needs to use the dmar apis or not. */
+ unsigned int needs_dmar : 1;
+ /* Whether we idle the gpu before mapping/unmapping */
+ unsigned int do_idle_maps : 1;
+ /* Share the scratch page dma with ppgtts. */
vm_paddr_t scratch_page_dma;
+ vm_page_t scratch_page;
+ /* for ppgtt PDE access */
+ uint32_t *gtt;
+ /* needed for ioremap in drm/i915 */
+ bus_addr_t gma_bus_addr;
};
struct intel_gtt agp_intel_gtt_get(device_t dev);
@@ -83,7 +83,7 @@ void agp_intel_gtt_insert_sg_entries(device_t dev, struct sglist *sg_list,
void agp_intel_gtt_insert_pages(device_t dev, u_int first_entry,
u_int num_entries, vm_page_t *pages, u_int flags);
-struct intel_gtt intel_gtt_get(void);
+struct intel_gtt *intel_gtt_get(void);
int intel_gtt_chipset_flush(void);
void intel_gtt_unmap_memory(struct sglist *sg_list);
void intel_gtt_clear_range(u_int first_entry, u_int num_entries);
diff --git a/sys/dev/amr/amr.c b/sys/dev/amr/amr.c
index faa92d07e436..0b52d9f8f065 100644
--- a/sys/dev/amr/amr.c
+++ b/sys/dev/amr/amr.c
@@ -1319,7 +1319,7 @@ amr_bio_command(struct amr_softc *sc, struct amr_command **acp)
blkcount = (bio->bio_bcount + AMR_BLKSIZE - 1) / AMR_BLKSIZE;
ac->ac_mailbox.mb_command = cmd;
- if (bio->bio_cmd & (BIO_READ|BIO_WRITE)) {
+ if (bio->bio_cmd == BIO_READ || bio->bio_cmd == BIO_WRITE) {
ac->ac_mailbox.mb_blkcount = blkcount;
ac->ac_mailbox.mb_lba = bio->bio_pblkno;
if ((bio->bio_pblkno + blkcount) > sc->amr_drive[driveno].al_size) {
diff --git a/sys/dev/bxe/bxe.c b/sys/dev/bxe/bxe.c
index 12d802542480..d944395a2a99 100644
--- a/sys/dev/bxe/bxe.c
+++ b/sys/dev/bxe/bxe.c
@@ -669,6 +669,8 @@ static void bxe_handle_fp_tq(void *context, int pending);
static int bxe_add_cdev(struct bxe_softc *sc);
static void bxe_del_cdev(struct bxe_softc *sc);
static int bxe_grc_dump(struct bxe_softc *sc);
+static int bxe_alloc_buf_rings(struct bxe_softc *sc);
+static void bxe_free_buf_rings(struct bxe_softc *sc);
/* calculate crc32 on a buffer (NOTE: crc32_length MUST be aligned to 8) */
uint32_t
@@ -4193,9 +4195,20 @@ bxe_nic_unload(struct bxe_softc *sc,
{
uint8_t global = FALSE;
uint32_t val;
+ int i;
BXE_CORE_LOCK_ASSERT(sc);
+ if_setdrvflagbits(sc->ifp, 0, IFF_DRV_RUNNING);
+
+ for (i = 0; i < sc->num_queues; i++) {
+ struct bxe_fastpath *fp;
+
+ fp = &sc->fp[i];
+ BXE_FP_TX_LOCK(fp);
+ BXE_FP_TX_UNLOCK(fp);
+ }
+
BLOGD(sc, DBG_LOAD, "Starting NIC unload...\n");
/* mark driver as unloaded in shmem2 */
@@ -5726,7 +5739,7 @@ bxe_tx_mq_start_locked(struct bxe_softc *sc,
}
if (!sc->link_vars.link_up ||
- (ifp->if_drv_flags &
+ (if_getdrvflags(ifp) &
(IFF_DRV_RUNNING | IFF_DRV_OACTIVE)) != IFF_DRV_RUNNING) {
rc = drbr_enqueue_drv(ifp, tx_br, m);
goto bxe_tx_mq_start_locked_exit;
@@ -6239,8 +6252,6 @@ bxe_free_fp_buffers(struct bxe_softc *sc)
m_freem(m);
BXE_FP_TX_UNLOCK(fp);
}
- buf_ring_free(fp->tx_br, M_DEVBUF);
- fp->tx_br = NULL;
}
#endif
@@ -6270,14 +6281,6 @@ bxe_free_fp_buffers(struct bxe_softc *sc)
}
/* XXX verify all mbufs were reclaimed */
-
- if (mtx_initialized(&fp->tx_mtx)) {
- mtx_destroy(&fp->tx_mtx);
- }
-
- if (mtx_initialized(&fp->rx_mtx)) {
- mtx_destroy(&fp->rx_mtx);
- }
}
}
@@ -6499,15 +6502,6 @@ bxe_alloc_fp_buffers(struct bxe_softc *sc)
for (i = 0; i < sc->num_queues; i++) {
fp = &sc->fp[i];
-#if __FreeBSD_version >= 800000
- fp->tx_br = buf_ring_alloc(BXE_BR_SIZE, M_DEVBUF,
- M_NOWAIT, &fp->tx_mtx);
- if (fp->tx_br == NULL) {
- BLOGE(sc, "buf_ring alloc fail for fp[%02d]\n", i);
- goto bxe_alloc_fp_buffers_error;
- }
-#endif
-
ring_prod = cqe_ring_prod = 0;
fp->rx_bd_cons = 0;
fp->rx_cq_cons = 0;
@@ -9615,14 +9609,6 @@ bxe_init_eth_fp(struct bxe_softc *sc,
fp->sc = sc;
fp->index = idx;
- snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name),
- "bxe%d_fp%d_tx_lock", sc->unit, idx);
- mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF);
-
- snprintf(fp->rx_mtx_name, sizeof(fp->rx_mtx_name),
- "bxe%d_fp%d_rx_lock", sc->unit, idx);
- mtx_init(&fp->rx_mtx, fp->rx_mtx_name, NULL, MTX_DEF);
-
fp->igu_sb_id = (sc->igu_base_sb + idx + CNIC_SUPPORT(sc));
fp->fw_sb_id = (sc->base_fw_ndsb + idx + CNIC_SUPPORT(sc));
@@ -15788,6 +15774,89 @@ bxe_add_sysctls(struct bxe_softc *sc)
}
}
+static int
+bxe_alloc_buf_rings(struct bxe_softc *sc)
+{
+#if __FreeBSD_version >= 800000
+
+ int i;
+ struct bxe_fastpath *fp;
+
+ for (i = 0; i < sc->num_queues; i++) {
+
+ fp = &sc->fp[i];
+
+ fp->tx_br = buf_ring_alloc(BXE_BR_SIZE, M_DEVBUF,
+ M_NOWAIT, &fp->tx_mtx);
+ if (fp->tx_br == NULL)
+ return (-1);
+ }
+#endif
+ return (0);
+}
+
+static void
+bxe_free_buf_rings(struct bxe_softc *sc)
+{
+#if __FreeBSD_version >= 800000
+
+ int i;
+ struct bxe_fastpath *fp;
+
+ for (i = 0; i < sc->num_queues; i++) {
+
+ fp = &sc->fp[i];
+
+ if (fp->tx_br) {
+ buf_ring_free(fp->tx_br, M_DEVBUF);
+ fp->tx_br = NULL;
+ }
+ }
+
+#endif
+}
+
+static void
+bxe_init_fp_mutexs(struct bxe_softc *sc)
+{
+ int i;
+ struct bxe_fastpath *fp;
+
+ for (i = 0; i < sc->num_queues; i++) {
+
+ fp = &sc->fp[i];
+
+ snprintf(fp->tx_mtx_name, sizeof(fp->tx_mtx_name),
+ "bxe%d_fp%d_tx_lock", sc->unit, i);
+ mtx_init(&fp->tx_mtx, fp->tx_mtx_name, NULL, MTX_DEF);
+
+ snprintf(fp->rx_mtx_name, sizeof(fp->rx_mtx_name),
+ "bxe%d_fp%d_rx_lock", sc->unit, i);
+ mtx_init(&fp->rx_mtx, fp->rx_mtx_name, NULL, MTX_DEF);
+ }
+}
+
+static void
+bxe_destroy_fp_mutexs(struct bxe_softc *sc)
+{
+ int i;
+ struct bxe_fastpath *fp;
+
+ for (i = 0; i < sc->num_queues; i++) {
+
+ fp = &sc->fp[i];
+
+ if (mtx_initialized(&fp->tx_mtx)) {
+ mtx_destroy(&fp->tx_mtx);
+ }
+
+ if (mtx_initialized(&fp->rx_mtx)) {
+ mtx_destroy(&fp->rx_mtx);
+ }
+ }
+}
+
+
/*
* Device attach function.
*
@@ -15899,8 +15968,25 @@ bxe_attach(device_t dev)
return (ENXIO);
}
+ bxe_init_fp_mutexs(sc);
+
+ if (bxe_alloc_buf_rings(sc) != 0) {
+ bxe_free_buf_rings(sc);
+ bxe_interrupt_free(sc);
+ bxe_del_cdev(sc);
+ if (sc->ifp != NULL) {
+ ether_ifdetach(sc->ifp);
+ }
+ ifmedia_removeall(&sc->ifmedia);
+ bxe_release_mutexes(sc);
+ bxe_deallocate_bars(sc);
+ pci_disable_busmaster(dev);
+ return (ENXIO);
+ }
+
/* allocate ilt */
if (bxe_alloc_ilt_mem(sc) != 0) {
+ bxe_free_buf_rings(sc);
bxe_interrupt_free(sc);
bxe_del_cdev(sc);
if (sc->ifp != NULL) {
@@ -15916,6 +16002,7 @@ bxe_attach(device_t dev)
/* allocate the host hardware/software hsi structures */
if (bxe_alloc_hsi_mem(sc) != 0) {
bxe_free_ilt_mem(sc);
+ bxe_free_buf_rings(sc);
bxe_interrupt_free(sc);
bxe_del_cdev(sc);
if (sc->ifp != NULL) {
@@ -16023,12 +16110,16 @@ bxe_detach(device_t dev)
/* free ilt */
bxe_free_ilt_mem(sc);
+ bxe_free_buf_rings(sc);
+
/* release the interrupts */
bxe_interrupt_free(sc);
/* Release the mutexes*/
+ bxe_destroy_fp_mutexs(sc);
bxe_release_mutexes(sc);
+
/* Release the PCIe BAR mapped memory */
bxe_deallocate_bars(sc);
diff --git a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
index b41f0c662a08..6343d4d01f10 100644
--- a/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
+++ b/sys/dev/cxgb/ulp/tom/cxgb_cpl_io.c
@@ -286,7 +286,7 @@ release_tid(struct toedev *tod, unsigned int tid, int qset)
struct tid_info *t = &td->tid_maps;
#endif
- KASSERT(tid >= 0 && tid < t->ntids,
+ KASSERT(tid < t->ntids,
("%s: tid=%d, ntids=%d", __func__, tid, t->ntids));
m = M_GETHDR_OFLD(qset, CPL_PRIORITY_CONTROL, cpl);
diff --git a/sys/dev/cxgbe/adapter.h b/sys/dev/cxgbe/adapter.h
index c91e6a5124f9..32c9c2b876b4 100644
--- a/sys/dev/cxgbe/adapter.h
+++ b/sys/dev/cxgbe/adapter.h
@@ -438,6 +438,29 @@ struct hw_buf_info {
};
enum {
+ NUM_MEMWIN = 3,
+
+ MEMWIN0_APERTURE = 2048,
+ MEMWIN0_BASE = 0x1b800,
+
+ MEMWIN1_APERTURE = 32768,
+ MEMWIN1_BASE = 0x28000,
+
+ MEMWIN2_APERTURE_T4 = 65536,
+ MEMWIN2_BASE_T4 = 0x30000,
+
+ MEMWIN2_APERTURE_T5 = 128 * 1024,
+ MEMWIN2_BASE_T5 = 0x60000,
+};
+
+struct memwin {
+ struct rwlock mw_lock __aligned(CACHE_LINE_SIZE);
+ uint32_t mw_base; /* constant after setup_memwin */
+ uint32_t mw_aperture; /* ditto */
+ uint32_t mw_curpos; /* protected by mw_lock */
+};
+
+enum {
FL_STARVING = (1 << 0), /* on the adapter's list of starving fl's */
FL_DOOMED = (1 << 1), /* about to be destroyed */
FL_BUF_PACKING = (1 << 2), /* buffer packing enabled */
@@ -671,13 +694,6 @@ struct sge_nm_txq {
#endif
struct sge {
- int timer_val[SGE_NTIMERS];
- int counter_val[SGE_NCOUNTERS];
- int fl_starve_threshold;
- int fl_starve_threshold2;
- int eq_s_qpp;
- int iq_s_qpp;
-
int nrxq; /* total # of Ethernet rx queues */
int ntxq; /* total # of Ethernet tx tx queues */
#ifdef TCP_OFFLOAD
@@ -710,8 +726,6 @@ struct sge {
struct sge_iq **iqmap; /* iq->cntxt_id to iq mapping */
struct sge_eq **eqmap; /* eq->cntxt_id to eq mapping */
- int pad_boundary;
- int pack_boundary;
int8_t safe_hwidx1; /* may not have room for metadata */
int8_t safe_hwidx2; /* with room for metadata and maybe more */
struct sw_zone_info sw_zone_info[SW_ZONE_SIZES];
@@ -743,6 +757,8 @@ struct adapter {
unsigned int pf;
unsigned int mbox;
+ unsigned int vpd_busy;
+ unsigned int vpd_flag;
/* Interrupt information */
int intr_type;
@@ -811,7 +827,9 @@ struct adapter {
TAILQ_HEAD(, sge_fl) sfl;
struct callout sfl_callout;
- struct mtx regwin_lock; /* for indirect reads and memory windows */
+ struct mtx reg_lock; /* for indirect register access */
+
+ struct memwin memwin[NUM_MEMWIN]; /* memory windows */
an_handler_t an_handler __aligned(CACHE_LINE_SIZE);
fw_msg_handler_t fw_msg_handler[7]; /* NUM_FW6_TYPES */
@@ -1035,6 +1053,17 @@ tx_resume_threshold(struct sge_eq *eq)
return (eq->sidx / 4);
}
+static inline int
+t4_use_ldst(struct adapter *sc)
+{
+
+#ifdef notyet
+ return (sc->flags & FW_OK || !sc->use_bd);
+#else
+ return (0);
+#endif
+}
+
/* t4_main.c */
int t4_os_find_pci_capability(struct adapter *, int);
int t4_os_pci_save_state(struct adapter *);
diff --git a/sys/dev/cxgbe/common/common.h b/sys/dev/cxgbe/common/common.h
index f12ad2933a37..d499f7455a56 100644
--- a/sys/dev/cxgbe/common/common.h
+++ b/sys/dev/cxgbe/common/common.h
@@ -32,6 +32,9 @@
#include "t4_hw.h"
+#define GLBL_INTR_MASK (F_CIM | F_MPS | F_PL | F_PCIE | F_MC0 | F_EDC0 | \
+ F_EDC1 | F_LE | F_TP | F_MA | F_PM_TX | F_PM_RX | F_ULP_RX | \
+ F_CPL_SWITCH | F_SGE | F_ULP_TX)
enum {
MAX_NPORTS = 4, /* max # of ports */
@@ -42,22 +45,13 @@ enum {
MACADDR_LEN = 12, /* MAC Address length */
};
-enum { MEM_EDC0, MEM_EDC1, MEM_MC, MEM_MC0 = MEM_MC, MEM_MC1 };
-
enum {
- MEMWIN0_APERTURE = 2048,
- MEMWIN0_BASE = 0x1b800,
-
- MEMWIN1_APERTURE = 32768,
- MEMWIN1_BASE = 0x28000,
-
- MEMWIN2_APERTURE_T4 = 65536,
- MEMWIN2_BASE_T4 = 0x30000,
-
- MEMWIN2_APERTURE_T5 = 128 * 1024,
- MEMWIN2_BASE_T5 = 0x60000,
+ T4_REGMAP_SIZE = (160 * 1024),
+ T5_REGMAP_SIZE = (332 * 1024),
};
+enum { MEM_EDC0, MEM_EDC1, MEM_MC, MEM_MC0 = MEM_MC, MEM_MC1 };
+
enum dev_master { MASTER_CANT, MASTER_MAY, MASTER_MUST };
enum dev_state { DEV_STATE_UNINIT, DEV_STATE_INIT, DEV_STATE_ERR };
@@ -68,11 +62,6 @@ enum {
PAUSE_AUTONEG = 1 << 2
};
-struct memwin {
- uint32_t base;
- uint32_t aperture;
-};
-
struct port_stats {
u64 tx_octets; /* total # of octets in good frames */
u64 tx_frames; /* all good frames */
@@ -214,18 +203,40 @@ struct tp_rdma_stats {
u32 rqe_dfr_mod;
};
+struct sge_params {
+ int timer_val[SGE_NTIMERS];
+ int counter_val[SGE_NCOUNTERS];
+ int fl_starve_threshold;
+ int fl_starve_threshold2;
+ int page_shift;
+ int eq_s_qpp;
+ int iq_s_qpp;
+ int spg_len;
+ int pad_boundary;
+ int pack_boundary;
+ int fl_pktshift;
+};
+
struct tp_params {
- unsigned int ntxchan; /* # of Tx channels */
unsigned int tre; /* log2 of core clocks per TP tick */
unsigned int dack_re; /* DACK timer resolution */
unsigned int la_mask; /* what events are recorded by TP LA */
unsigned short tx_modq[MAX_NCHAN]; /* channel to modulation queue map */
+
uint32_t vlan_pri_map;
uint32_t ingress_config;
- int8_t vlan_shift;
- int8_t vnic_shift;
+ uint32_t rx_pkt_encap;
+
+ int8_t fcoe_shift;
int8_t port_shift;
+ int8_t vnic_shift;
+ int8_t vlan_shift;
+ int8_t tos_shift;
int8_t protocol_shift;
+ int8_t ethertype_shift;
+ int8_t macmatch_shift;
+ int8_t matchtype_shift;
+ int8_t frag_shift;
};
struct vpd_params {
@@ -267,6 +278,7 @@ struct chip_params {
};
struct adapter_params {
+ struct sge_params sge;
struct tp_params tp;
struct vpd_params vpd;
struct pci_params pci;
@@ -307,6 +319,18 @@ struct adapter_params {
#define CHELSIO_T5 0x5
#define CHELSIO_T6 0x6
+/*
+ * State needed to monitor the forward progress of SGE Ingress DMA activities
+ * and possible hangs.
+ */
+struct sge_idma_monitor_state {
+ unsigned int idma_1s_thresh; /* 1s threshold in Core Clock ticks */
+ unsigned int idma_stalled[2]; /* synthesized stalled timers in HZ */
+ unsigned int idma_state[2]; /* IDMA Hang detect state */
+ unsigned int idma_qid[2]; /* IDMA Hung Ingress Queue ID */
+ unsigned int idma_warn[2]; /* time to warning in HZ */
+};
+
struct trace_params {
u32 data[TRACE_LEN / 4];
u32 mask[TRACE_LEN / 4];
@@ -401,6 +425,14 @@ static inline unsigned int us_to_core_ticks(const struct adapter *adap,
return (us * adap->params.vpd.cclk) / 1000;
}
+static inline unsigned int core_ticks_to_us(const struct adapter *adapter,
+ unsigned int ticks)
+{
+ /* add Core Clock / 2 to round ticks to nearest uS */
+ return ((ticks * 1000 + adapter->params.vpd.cclk/2) /
+ adapter->params.vpd.cclk);
+}
+
static inline unsigned int dack_ticks_to_usec(const struct adapter *adap,
unsigned int ticks)
{
@@ -409,9 +441,19 @@ static inline unsigned int dack_ticks_to_usec(const struct adapter *adap,
void t4_set_reg_field(struct adapter *adap, unsigned int addr, u32 mask, u32 val);
+int t4_wr_mbox_meat_timeout(struct adapter *adap, int mbox, const void *cmd,
+ int size, void *rpl, bool sleep_ok, int timeout);
int t4_wr_mbox_meat(struct adapter *adap, int mbox, const void *cmd, int size,
void *rpl, bool sleep_ok);
+static inline int t4_wr_mbox_timeout(struct adapter *adap, int mbox,
+ const void *cmd, int size, void *rpl,
+ int timeout)
+{
+ return t4_wr_mbox_meat_timeout(adap, mbox, cmd, size, rpl, true,
+ timeout);
+}
+
static inline int t4_wr_mbox(struct adapter *adap, int mbox, const void *cmd,
int size, void *rpl)
{
@@ -450,21 +492,31 @@ int t4_eeprom_ptov(unsigned int phys_addr, unsigned int fn, unsigned int sz);
int t4_seeprom_wp(struct adapter *adapter, int enable);
int t4_read_flash(struct adapter *adapter, unsigned int addr, unsigned int nwords,
u32 *data, int byte_oriented);
+int t4_write_flash(struct adapter *adapter, unsigned int addr,
+ unsigned int n, const u8 *data, int byte_oriented);
int t4_load_fw(struct adapter *adapter, const u8 *fw_data, unsigned int size);
+int t4_fwcache(struct adapter *adap, enum fw_params_param_dev_fwcache op);
+int t5_fw_init_extern_mem(struct adapter *adap);
+int t4_load_bootcfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
int t4_load_boot(struct adapter *adap, u8 *boot_data,
unsigned int boot_addr, unsigned int size);
+int t4_flash_erase_sectors(struct adapter *adapter, int start, int end);
int t4_flash_cfg_addr(struct adapter *adapter);
int t4_load_cfg(struct adapter *adapter, const u8 *cfg_data, unsigned int size);
int t4_get_fw_version(struct adapter *adapter, u32 *vers);
int t4_get_tp_version(struct adapter *adapter, u32 *vers);
-int t4_check_fw_version(struct adapter *adapter);
+int t4_get_exprom_version(struct adapter *adapter, u32 *vers);
int t4_init_hw(struct adapter *adapter, u32 fw_params);
-int t4_prep_adapter(struct adapter *adapter);
+int t4_prep_adapter(struct adapter *adapter, u8 *buf);
+int t4_shutdown_adapter(struct adapter *adapter);
+int t4_init_devlog_params(struct adapter *adapter, int fw_attach);
+int t4_init_sge_params(struct adapter *adapter);
int t4_init_tp_params(struct adapter *adap);
int t4_filter_field_shift(const struct adapter *adap, int filter_sel);
-int t4_port_init(struct port_info *p, int mbox, int pf, int vf);
-int t4_reinit_adapter(struct adapter *adap);
+int t4_port_init(struct adapter *adap, int mbox, int pf, int vf, int port_id);
void t4_fatal_err(struct adapter *adapter);
+void t4_db_full(struct adapter *adapter);
+void t4_db_dropped(struct adapter *adapter);
int t4_set_trace_filter(struct adapter *adapter, const struct trace_params *tp,
int filter_index, int enable);
void t4_get_trace_filter(struct adapter *adapter, struct trace_params *tp,
@@ -476,8 +528,10 @@ int t4_config_glbl_rss(struct adapter *adapter, int mbox, unsigned int mode,
int t4_config_vi_rss(struct adapter *adapter, int mbox, unsigned int viid,
unsigned int flags, unsigned int defq);
int t4_read_rss(struct adapter *adapter, u16 *entries);
+void t4_fw_tp_pio_rw(struct adapter *adap, u32 *vals, unsigned int nregs,
+ unsigned int start_index, unsigned int rw);
void t4_read_rss_key(struct adapter *adapter, u32 *key);
-void t4_write_rss_key(struct adapter *adap, const u32 *key, int idx);
+void t4_write_rss_key(struct adapter *adap, u32 *key, int idx);
void t4_read_rss_pf_config(struct adapter *adapter, unsigned int index, u32 *valp);
void t4_write_rss_pf_config(struct adapter *adapter, unsigned int index, u32 val);
void t4_read_rss_vf_config(struct adapter *adapter, unsigned int index,
@@ -504,11 +558,22 @@ int t4_cim_read_la(struct adapter *adap, u32 *la_buf, unsigned int *wrptr);
void t4_cim_read_pif_la(struct adapter *adap, u32 *pif_req, u32 *pif_rsp,
unsigned int *pif_req_wrptr, unsigned int *pif_rsp_wrptr);
void t4_cim_read_ma_la(struct adapter *adap, u32 *ma_req, u32 *ma_rsp);
+int t4_get_flash_params(struct adapter *adapter);
+
+u32 t4_read_pcie_cfg4(struct adapter *adap, int reg, int drv_fw_attach);
int t4_mc_read(struct adapter *adap, int idx, u32 addr,
__be32 *data, u64 *parity);
int t4_edc_read(struct adapter *adap, int idx, u32 addr, __be32 *data, u64 *parity);
int t4_mem_read(struct adapter *adap, int mtype, u32 addr, u32 size,
__be32 *data);
+void t4_idma_monitor_init(struct adapter *adapter,
+ struct sge_idma_monitor_state *idma);
+void t4_idma_monitor(struct adapter *adapter,
+ struct sge_idma_monitor_state *idma,
+ int hz, int ticks);
+
+unsigned int t4_get_regs_len(struct adapter *adapter);
+void t4_get_regs(struct adapter *adap, u8 *buf, size_t buf_size);
const char *t4_get_port_type_description(enum fw_port_type port_type);
void t4_get_port_stats(struct adapter *adap, int idx, struct port_stats *p);
@@ -564,6 +629,13 @@ int t4_fw_initialize(struct adapter *adap, unsigned int mbox);
int t4_query_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
unsigned int vf, unsigned int nparams, const u32 *params,
u32 *val);
+int t4_query_params_rw(struct adapter *adap, unsigned int mbox, unsigned int pf,
+ unsigned int vf, unsigned int nparams, const u32 *params,
+ u32 *val, int rw);
+int t4_set_params_timeout(struct adapter *adap, unsigned int mbox,
+ unsigned int pf, unsigned int vf,
+ unsigned int nparams, const u32 *params,
+ const u32 *val, int timeout);
int t4_set_params(struct adapter *adap, unsigned int mbox, unsigned int pf,
unsigned int vf, unsigned int nparams, const u32 *params,
const u32 *val);
@@ -592,6 +664,8 @@ int t4_change_mac(struct adapter *adap, unsigned int mbox, unsigned int viid,
int idx, const u8 *addr, bool persist, bool add_smt);
int t4_set_addr_hash(struct adapter *adap, unsigned int mbox, unsigned int viid,
bool ucast, u64 vec, bool sleep_ok);
+int t4_enable_vi_params(struct adapter *adap, unsigned int mbox,
+ unsigned int viid, bool rx_en, bool tx_en, bool dcb_en);
int t4_enable_vi(struct adapter *adap, unsigned int mbox, unsigned int viid,
bool rx_en, bool tx_en);
int t4_identify_port(struct adapter *adap, unsigned int mbox, unsigned int viid,
@@ -608,6 +682,9 @@ int t4_i2c_wr(struct adapter *adap, unsigned int mbox,
int port, unsigned int devid,
unsigned int offset, unsigned int len,
u8 *buf);
+int t4_iq_stop(struct adapter *adap, unsigned int mbox, unsigned int pf,
+ unsigned int vf, unsigned int iqtype, unsigned int iqid,
+ unsigned int fl0id, unsigned int fl1id);
int t4_iq_free(struct adapter *adap, unsigned int mbox, unsigned int pf,
unsigned int vf, unsigned int iqtype, unsigned int iqid,
unsigned int fl0id, unsigned int fl1id);
@@ -622,6 +699,7 @@ int t4_sge_ctxt_rd(struct adapter *adap, unsigned int mbox, unsigned int cid,
int t4_sge_ctxt_rd_bd(struct adapter *adap, unsigned int cid, enum ctxt_type ctype,
u32 *data);
int t4_sge_ctxt_flush(struct adapter *adap, unsigned int mbox);
+const char *t4_link_down_rc_str(unsigned char link_down_rc);
int t4_handle_fw_rpl(struct adapter *adap, const __be64 *rpl);
int t4_fwaddrspace_write(struct adapter *adap, unsigned int mbox, u32 addr, u32 val);
int t4_sched_config(struct adapter *adapter, int type, int minmaxen,
@@ -630,4 +708,10 @@ int t4_sched_params(struct adapter *adapter, int type, int level, int mode,
int rateunit, int ratemode, int channel, int cl,
int minrate, int maxrate, int weight, int pktsize,
int sleep_ok);
+int t4_config_watchdog(struct adapter *adapter, unsigned int mbox,
+ unsigned int pf, unsigned int vf,
+ unsigned int timeout, unsigned int action);
+int t4_get_devlog_level(struct adapter *adapter, unsigned int *level);
+int t4_set_devlog_level(struct adapter *adapter, unsigned int level);
+void t4_sge_decode_idma_state(struct adapter *adapter, int state);
#endif /* __CHELSIO_COMMON_H */
diff --git a/sys/dev/cxgbe/common/t4_hw.c b/sys/dev/cxgbe/common/t4_hw.c
index 980ee963e7ee..92104c8c0ae0 100644
--- a/sys/dev/cxgbe/common/t4_hw.c
+++ b/sys/dev/cxgbe/common/t4_hw.c
@@ -1,5 +1,5 @@
/*-
- * Copyright (c) 2012 Chelsio Communications, Inc.
+ * Copyright (c) 2012, 2016 Chelsio Communications, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -117,8 +117,8 @@ void t4_set_reg_field(struct adapter *adapter, unsigned int addr, u32 mask,
* registe